On Mon, Jan 29, 2018 at 05:05:47PM +, Bart Van Assche wrote:
> On Fri, 2018-01-26 at 17:58 +0100, Michal Suchanek wrote:
> > +static int cdrom_tray_close(struct cdrom_device_info *cdi)
> > +{
> > + int ret;
> > +
> > + ret = cdi->ops->tray_move(cdi, 0);
> > + if (ret || !cdi->ops->drive_s
On Mon, 29 Jan 2018 17:05:47 +
Bart Van Assche wrote:
> On Fri, 2018-01-26 at 17:58 +0100, Michal Suchanek wrote:
> > +static int cdrom_tray_close(struct cdrom_device_info *cdi)
> > +{
> > + int ret;
> > +
> > + ret = cdi->ops->tray_move(cdi, 0);
> > + if (ret || !cdi->ops->drive_status
On Fri, 2018-01-26 at 17:58 +0100, Michal Suchanek wrote:
> +static int cdrom_tray_close(struct cdrom_device_info *cdi)
> +{
> + int ret;
> +
> + ret = cdi->ops->tray_move(cdi, 0);
> + if (ret || !cdi->ops->drive_status)
> + return ret;
> +
> + return poll_event_interrup
The scsi command to close tray only starts the motor and does not wait
for the tray to close. Wait until the state chages from TRAY_OPEN so
users do not race with the tray closing.
This looks like inifinte wait but unless the drive is broken it either
closes the tray within a few seconds or report