Subject: Re: usb panic
To: None <M.Drochner@fz-juelich.de>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: current-users
Date: 01/23/2007 23:27:15
--MP_Xn3ay9kllvhmjq+svaOKKmk
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tue, 23 Jan 2007 12:23:51 +0100
Matthias Drochner <M.Drochner@fz-juelich.de> wrote:

> 
> smb@cs.columbia.edu said:
> > uvisor0 at uhub1 port 2uhci1: device addr 2 (config 1): can't set
> > self powered  onfiguration 
> 
> Hmm - this is related to a change I made last week.
> It seems that this change triggers an error handling
> bug in the uvisor device driver.
> 
> My change makes that a status bit of the device is checked
> which tells whether the device is self powered or needs to
> get by with the power delivered by the USB. If the device
> driver tries to set a device configuration which needs
> external power but the status bit tells there is none that
> message is printed and an error returned.
> The uvisor driver doesn't deal with errors during attach
> correctly: sc_udev is used in detach, whether initialized
> or not. Tha appended patch should avoid the panic.

It avoids the panic but doesn't attach ucom0; it still complains about
power:

uvisor0: failed  to set configuration, err=NO_POWER

That happens with and without AC power to the Palmpilot.
> 
> Now we need to get the thing configured... I don't have
> a device myself which can work with and without external
> power (except a hub, but hubs are different). So it would be
> nice if you could do some checks:
> If you connect external power to the Palmpilot, does it work
> as before?
> Can you build sysutils/usbutil from pkgsrc and dump the
> USB descriptors by
> usbctl -f /dev/usb1 -a 2
> (assuming the device is on usb1 and its address is 2).
> 
Attached.  The output is identical, with or without plugging in the AC
adapter.  Since the Palmpilot is always self-powered, I don't think
that would matter.



		--Steve Bellovin, http://www.cs.columbia.edu/~smb

--MP_Xn3ay9kllvhmjq+svaOKKmk
Content-Type: application/octet-stream; name=usb
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=usb

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