Re: [PATCH 3/6] cdrom: wait for tray to close

2017-12-15 Thread Michal Suchánek
On Thu, 14 Dec 2017 16:13:52 +0100 Michal Suchanek wrote: > @@ -2312,7 +2328,8 @@ static int cdrom_ioctl_closetray(struct > cdrom_device_info *cdi) > if (!CDROM_CAN(CDC_CLOSE_TRAY)) > return -ENOSYS; > - return cdi->ops->tray_move(cdi, 0); > + > +

Re: [PATCH 3/6] cdrom: wait for tray to close

2017-12-15 Thread Michal Suchánek
On Thu, 14 Dec 2017 16:13:52 +0100 Michal Suchanek wrote: > @@ -2312,7 +2328,8 @@ static int cdrom_ioctl_closetray(struct > cdrom_device_info *cdi) > if (!CDROM_CAN(CDC_CLOSE_TRAY)) > return -ENOSYS; > - return cdi->ops->tray_move(cdi, 0); > + > + return

[PATCH 3/6] cdrom: wait for tray to close

2017-12-14 Thread Michal Suchanek
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

[PATCH 3/6] cdrom: wait for tray to close

2017-12-14 Thread Michal Suchanek
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