Re: [PATCH] ax88179_178a: don't send commands to detached device

From: Alan Stern
Date: Wed May 14 2014 - 11:13:04 EST


On Wed, 14 May 2014, Emil Goode wrote:

> The .stop and .unbind callbacks of struct driver_info are
> called even after a DETACH hot-plug event. In the case of
> the ax88179_178a minidriver we need to make sure we are not
> trying to send commands to a device that has been detached.
> This leads to failure messages like below.
>
> ax88179_178a 1-1.3:1.0 (unregistered net_device):
> Failed to write reg index 0x0001: -19

Most driver don't bother to do this. A few error messages in the log
when a device gets unplugged are harmless. Besides, this won't help
with errors that occur between the time the device is unplugged and the
time when the unbind callback runs.

Alan Stern

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