linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Suchanek <msuchanek@suse.de>
To: Jens Axboe <axboe@kernel.dk>, Jonathan Corbet <corbet@lwn.net>,
	Borislav Petkov <bp@alien8.de>, Tim Waugh <tim@cyberelk.net>,
	"David S. Miller" <davem@davemloft.net>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Michal Suchanek <msuchanek@suse.de>,
	Kees Cook <keescook@chromium.org>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH resend 5/6] Documentetion: cdrom: introduce CDS_DRIVE_ERROR
Date: Fri, 26 Jan 2018 17:58:39 +0100	[thread overview]
Message-ID: <b2855d98b131fec0fa20b505e09636465c46a423.1516985620.git.msuchanek@suse.de> (raw)
In-Reply-To: <cover.1516985620.git.msuchanek@suse.de>
In-Reply-To: <cover.1516985620.git.msuchanek@suse.de>

CDS_DRIVE_NOT_READY is used for the state in which CDROM is 'becoming
ready' (typically analyzing the disc) but also as the fallback when
nothing else applies. Introduce CDS_DRIVE_ERROR for the fallback case.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 Documentation/cdrom/cdrom-standard.tex | 8 +++++++-
 Documentation/cdrom/ide-cd             | 6 ++++++
 Documentation/ioctl/cdrom.txt          | 1 +
 3 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/Documentation/cdrom/cdrom-standard.tex b/Documentation/cdrom/cdrom-standard.tex
index 8f85b0e41046..018284ba696a 100644
--- a/Documentation/cdrom/cdrom-standard.tex
+++ b/Documentation/cdrom/cdrom-standard.tex
@@ -371,11 +371,17 @@ $$
 CDS_NO_INFO& no information available\cr
 CDS_NO_DISC& no disc is inserted, tray is closed\cr
 CDS_TRAY_OPEN& tray is opened\cr
-CDS_DRIVE_NOT_READY& something is wrong, tray is moving?\cr
+CDS_DRIVE_NOT_READY& tray just closed?\cr
 CDS_DISC_OK& a disc is loaded and everything is fine\cr
+CDS_DRIVE_ERROR& something is wrong\cr
 }
 $$
 
+Note: The IDE and SCSI cdroms have a status code 'drive becoming ready' which
+is typically returned when the drive has just closed and is analyzing the disc.
+For other cdrom types this state is not reported by the hardware or not
+implemented by the driver.
+
 \subsection{$Int\ media_changed(struct\ cdrom_device_info * cdi, int\ disc_nr)$}
 
 This function is very similar to the original function in $struct\ 
diff --git a/Documentation/cdrom/ide-cd b/Documentation/cdrom/ide-cd
index a5f2a7f1ff46..9324a8fd9a39 100644
--- a/Documentation/cdrom/ide-cd
+++ b/Documentation/cdrom/ide-cd
@@ -455,6 +455,9 @@ main (int argc, char **argv)
 		case CDS_DRIVE_NOT_READY:
 			printf ("Drive Not Ready.\n");
 			break;
+		case CDS_DRIVE_ERROR:
+			printf ("Drive problem.\n");
+			break;
 		default:
 			printf ("This Should not happen!\n");
 			break;
@@ -481,6 +484,9 @@ main (int argc, char **argv)
 			case CDS_NO_INFO:
 				printf ("No Information available.");
 				break;
+			case CDS_DRIVE_ERROR:
+				printf ("Drive problem.\n");
+				break;
 			default:
 				printf ("This Should not happen!\n");
 				break;
diff --git a/Documentation/ioctl/cdrom.txt b/Documentation/ioctl/cdrom.txt
index a4d62a9d6771..7720d11807c3 100644
--- a/Documentation/ioctl/cdrom.txt
+++ b/Documentation/ioctl/cdrom.txt
@@ -700,6 +700,7 @@ CDROM_DRIVE_STATUS		Get tray position, etc.
 	    CDS_TRAY_OPEN
 	    CDS_DRIVE_NOT_READY
 	    CDS_DISC_OK
+	    CDS_DRIVE_ERROR
 	    -1			error
 
 	error returns:
-- 
2.13.6

  parent reply	other threads:[~2018-01-26 16:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 15:13 [PATCH 0/6] Fix cdrom autoclose Michal Suchanek
2017-12-14 15:13 ` [PATCH 1/6] delay: add poll_event_interruptible Michal Suchanek
2017-12-14 15:13 ` [PATCH 2/6] cdrom: factor out common open_for_* code Michal Suchanek
2017-12-14 15:13 ` [PATCH 3/6] cdrom: wait for tray to close Michal Suchanek
2017-12-15 17:20   ` Michal Suchánek
2017-12-14 15:13 ` [PATCH 4/6] cdrom: introduce CDS_DRIVE_ERROR Michal Suchanek
2017-12-14 15:13 ` [PATCH 5/6] Documentetion: " Michal Suchanek
2017-12-14 15:13 ` [PATCH 6/6] cdrom: wait for drive to become ready Michal Suchanek
2018-01-26 16:58 ` [PATCH resend 0/6] Fix cdrom autoclose Michal Suchanek
2018-01-26 16:58   ` [PATCH resend 1/6] delay: add poll_event_interruptible Michal Suchanek
2018-01-29 17:00     ` Bart Van Assche
2018-01-26 16:58   ` [PATCH resend 2/6] cdrom: factor out common open_for_* code Michal Suchanek
2018-01-29 17:02     ` Bart Van Assche
2018-01-26 16:58   ` [PATCH resend 3/6] cdrom: wait for tray to close Michal Suchanek
2018-01-29 17:05     ` Bart Van Assche
2018-01-31 18:20       ` Michal Suchánek
2019-10-23 12:19       ` Michal Suchánek
2018-01-26 16:58   ` [PATCH resend 4/6] cdrom: introduce CDS_DRIVE_ERROR Michal Suchanek
2018-01-26 16:58   ` Michal Suchanek [this message]
2018-01-26 16:58   ` [PATCH resend 6/6] cdrom: wait for drive to become ready Michal Suchanek
2018-01-29 17:11     ` Bart Van Assche
2018-01-26 20:04   ` [PATCH resend 0/6] Fix cdrom autoclose James Bottomley
2018-01-27 22:53     ` Michal Suchánek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2855d98b131fec0fa20b505e09636465c46a423.1516985620.git.msuchanek@suse.de \
    --to=msuchanek@suse.de \
    --cc=axboe@kernel.dk \
    --cc=bp@alien8.de \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=keescook@chromium.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pombredanne@nexb.com \
    --cc=tglx@linutronix.de \
    --cc=tim@cyberelk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).