Re: Software based unplug of USB device?

From: Johannes Erdfelt
Date: Mon May 03 2004 - 13:16:48 EST


On Mon, May 03, 2004, Greg KH <greg@xxxxxxxxx> wrote:
> On Mon, May 03, 2004 at 12:21:20PM +0200, Joerg Pommnitz wrote:
> > Hello listees,
> > we are struggling with a 3rd party USB device. It comes with its own
> > firmware and its own Linux USB serial drivers.
>
> Which device and driver is this? Do you have a pointer to the driver?
>
> > Unfortunately the
> > communication between the device and the user application seems to break
> > down from time to time. This situation can easily be resolved by
> > unplugging and then re-plugging the device. Unfortunately this requires
> > manual intervention.
> > While resolving the real issue would be the preferred way to deal with
> > this problem, we would settle for a way to do a software unplug/re-plug.
>
> Do you want to do this from within the kernel, or from userspace? If
> from within the kernel, you should be able to drop the power to a hub
> port and reenable it, but I haven't checked to see if that works in a
> long time.

Wouldn't usb_reset_device() work? That's assuming the device isn't
totally and completely hosed.

It can be done via usbfs as well.

JE

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