Re: [linux-usb-devel] [PATCH] visor: Fix Oops on disconnect

Greg KH
2004-05-22T02:32:17Z

On Fri, May 21, 2004 at 10:48:54AM -0400, nardelli wrote:
>
> The old check would error out of visor_open() with -ENODEV if there was
> not a read_urb for any device, and there was a comment that this was
> needed for 'some brain dead Sony devices'. I modified this to error out
> only for Sony devices, instead of just a comment about them. This
> should not modify the behavior on Sonys, but may on others (namely treos).
>
> I'd really like to know more about why some Sony devices do not have a
> read_urb, but at least for now, I did not change functionality for them.

The problem is that the "bad" Sony devices return that they have 2 ports
available, however their endpoints do not reflect this. So I check for
a read urb to test if this really is a valid port or not.

Hm, now that I can modify the number of ports on the fly, we should just
catch this in the initialization of the device which would solve this
problem the "right way".

thanks,

greg k-h