linux-ide.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 0/6] Fix cdrom autoclose
Date: Fri, 26 Jan 2018 17:58:34 +0100	[thread overview]
Message-ID: <cover.1516985620.git.msuchanek@suse.de> (raw)
In-Reply-To: <cover.1513263482.git.msuchanek@suse.de>

Hello,

  there is cdrom autoclose feature that is supposed to close the tray, wait for
  the disc to become ready, and then open the device.

  This used to work in ancient times. Then in old times there was a hack in
  util-linux which worked around the breakage which probably resulted from
  switching to scsi emulation.

  Currently util-linux maintainer refuses to merge another hack on the basis that
  kernel still has the feature so it should be fixed there. Indeed, to implement
  this feature effectively from userspace one would need to know when the CD-ROM
  is in the "drive becoming ready" state which is knowledge that never leaves the
  hardware-specific driver and is passed neither to userspace nor the generic
  cdrom driver.

  So this patchset fixes the kernel autoclose implementation in cdrom.c and to
  do so reports the "drive becoming ready" state from the harware specific
  drivers.

First time I did not get any feedback for the patches. I found a defect in
tray_close - it used status function without checking it exists. So resending
with the defect corrected.

Michal Suchanek (6):
  delay: add poll_event_interruptible
  cdrom: factor out common open_for_* code
  cdrom: wait for tray to close
  cdrom: introduce CDS_DRIVE_ERROR
  Documentetion: cdrom: introduce CDS_DRIVE_ERROR
  cdrom: wait for drive to become ready

 Documentation/cdrom/cdrom-standard.tex |   8 ++-
 Documentation/cdrom/ide-cd             |   6 ++
 Documentation/ioctl/cdrom.txt          |   1 +
 drivers/block/paride/pcd.c             |   2 +-
 drivers/cdrom/cdrom.c                  | 124 ++++++++++++++++-----------------
 drivers/cdrom/gdrom.c                  |   2 +-
 drivers/ide/ide-cd_ioctl.c             |  12 ++--
 drivers/scsi/sr_ioctl.c                |   2 +-
 include/linux/delay.h                  |  12 ++++
 include/uapi/linux/cdrom.h             |   1 +
 10 files changed, 99 insertions(+), 71 deletions(-)

-- 
2.13.6


  parent reply	other threads:[~2018-01-26 19:50 UTC|newest]

Thread overview: 17+ 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 5/6] Documentetion: cdrom: introduce CDS_DRIVE_ERROR Michal Suchanek
2018-01-26 16:58 ` Michal Suchanek [this message]
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   ` [PATCH resend 5/6] Documentetion: " Michal Suchanek
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=cover.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).