From patchwork Thu Dec 14 15:13:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Suchanek X-Patchwork-Id: 10112433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C76B60352 for ; Thu, 14 Dec 2017 15:16:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EC14290A3 for ; Thu, 14 Dec 2017 15:16:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73380290AB; Thu, 14 Dec 2017 15:16:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15ED1290AA for ; Thu, 14 Dec 2017 15:16:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752879AbdLNPPU (ORCPT ); Thu, 14 Dec 2017 10:15:20 -0500 Received: from mx2.suse.de ([195.135.220.15]:52165 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753241AbdLNPOj (ORCPT ); Thu, 14 Dec 2017 10:14:39 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 98928ADFE; Thu, 14 Dec 2017 15:14:37 +0000 (UTC) From: Michal Suchanek To: Tim Waugh , Borislav Petkov , "David S. Miller" , Jens Axboe , "James E.J. Bottomley" , "Martin K. Petersen" , Michal Suchanek , Kees Cook , Christophe JAILLET , linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org Subject: [PATCH 5/6] Documentetion: cdrom: introduce CDS_DRIVE_ERROR Date: Thu, 14 Dec 2017 16:13:54 +0100 Message-Id: <794a72f8f78b076a9b8a47cbc8cb63e650a2ce37.1513263482.git.msuchanek@suse.de> X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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: