Re: [PATCH v2 33/85] USB: serial: clean up usb-serial bus device removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2013-03-14 at 16:23 +0100, Johan Hovold wrote:
> Make sure to unregister the tty-device before calling subdriver
> port_remove.
> 
> This way remove will reverse probe, and specifically any port data
> released in port_remove will be available throughout tty unregister.
> 
> Note that the order currently does not matter as the tty-layer can make
> callbacks also after the device has been unregistered. This is
> handled in usb-serial core using the disconnected flag, which is
> already set when usb-serial bus device remove is called.
> 
> Cc: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
> Reported-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Johan Hovold <jhovold@xxxxxxxxx>

Looks fine to me.

The thing I did notice is that the ftdi usb serial mini-driver has its
own ioctl() handler for TIOCMIWAIT which can be holding the tty
reference open after the unregister.

Its port_remove() method, ftdi_sio_port_remove(), does the wake up to
kick it off the loop.

Now that the call order is reversed, that will need to be fixed. A quick
review of the usage seems like the whole ioctl() should be torn out
along with the private delta_msr_wait.

Regards,
Peter Hurley

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux