Re: [PATCH] usb: serial: return -ENODEV if disconnected during TIOCMIWAIT

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

 



On Sun, 2016-01-03 at 17:22 +0100, Johan Hovold wrote:
> On Mon, Dec 21, 2015 at 02:17:22PM +0100, Oliver Neukum wrote:
> > Disconnecting a device is not just a hang up. The device is gone.
> > We should tell user space the truth immediately.
> 
> I'm not sure about this one. The usb-serial drivers have always returned
> -EIO on hangup, whatever the reason, and there's nothing wrong with
> that implementation.
> 
> Also note that any further ioctls after returning will also fail with
> -EIO.
> 
> I think it makes sense to just stick to -EIO here.

But write() is happy to return -ENODEV. I'd say that -EIO
is the error return of last resort. If we have anything specific
to report we ought to use it. And if a device is gone, it is gone.
There is no use hiding it.

	Regards
		Oliver


--
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