Received: by 10.223.176.5 with SMTP id f5csp844870wra; Sat, 27 Jan 2018 10:59:07 -0800 (PST) X-Google-Smtp-Source: AH8x224zciiKgEyyQ0fZbrG3T438RKOEPftkxOREv8mcKc/yrW9hJ5OVWKQYKiFTaiJeXoDl0q8v X-Received: by 10.98.16.79 with SMTP id y76mr22505895pfi.111.1517079547803; Sat, 27 Jan 2018 10:59:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517079547; cv=none; d=google.com; s=arc-20160816; b=MWZyx+FdGKCLO0EBg65cQPgB0FDrVLfN5FJ/mXa1ZfwjchQf0X2l+qmYVE5CyJC/Yw Ofx45si03OTkGvNzzbVmhMzixXaWhhQIHud2PtToVrPCw//Vb89I5eTg0H6HlHQjnpMB 7mejJ73fb4IDFw3wKLYw7ujLkeswG5ml9/GK1jwiilQbqKLGch+Z4nI+OHjVJB89/Pl3 dVgpgThwfT0pwxI/R04lNEeL32vgWNnDL3tfpxZEwWIsKUJElBgpwBEohEQwGOP77pbW 5aTLgaQKGsf4MQcYRIGe046MfHCNZdrFq0n1e767COTXn+66HE2eFV1TxMyE6agVdhi6 BD3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:to:from :arc-authentication-results; bh=Z2NSd1ELHN7GMYPlAmpHixNDBxxSJcPfENSRTnO9Qso=; b=TXiJcJPWdQk832SDhCmpnWTLUsLOT+/AXgE+O3Crcwbuf9+YzcvR/n15AhwcGMSXyi +cX4jnaWfy/KJzcSsON4V/VO9Gx2+PJIf4S62x0yBcos8Ll6VNudUpFrLZNr3Y/LhJoy JPQ3zEW5OtHbeXf5DygO13TkZwCVQBnVm84mIqvj0aOdmYtRLS+9Vb4vVFBKv/2lcBHz o5hcf673Eg/doJKQpCrvGU0TKSTcaEftBODgbLI9HXDwvX25COV6o7B559r4gxGICAzT apgEW6bhCeTh/i3axq3fnWyQL3VMUgBs8ZwQz/v1++1KCRWUL6dPjQUX8eydDgwoLL55 EBew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6-v6si5774675pln.755.2018.01.27.10.58.53; Sat, 27 Jan 2018 10:59:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752156AbeA0S62 (ORCPT + 99 others); Sat, 27 Jan 2018 13:58:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:55312 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533AbeA0S60 (ORCPT ); Sat, 27 Jan 2018 13:58:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5AC3EAEDF; Sat, 27 Jan 2018 18:54:45 +0000 (UTC) From: Michal Suchanek To: Jens Axboe , Jonathan Corbet , Borislav Petkov , Tim Waugh , "David S. Miller" , "James E.J. Bottomley" , "Martin K. Petersen" , Michal Suchanek , Kees Cook , Christophe JAILLET , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , Philippe Ombredanne , 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 Message-Id: X-Mailer: git-send-email 2.13.6 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: -- 2.13.6