nardelli wrote:
Greg KH wrote:


@@ -456,7 +460,8 @@ static void visor_close (struct usb_seri
return;
/* shutdown our urbs */
- usb_unlink_urb (port->read_urb);
+ if (port->read_urb)
+ usb_unlink_urb (port->read_urb);


I really do not think these extra checks for read_urb all of the place
need to be added.  We take care of it in the open() call, right?


Yes - less clutter and more efficient too.



Maybe I spoke too soon here.  We have 1 bulk in, 2 bulk out, and 1 interrupt
in endpoint, which by the logic in usb-serial, translates to 2 ports.  Only
one of those ports can have a read_urb associated with it, unless we want to
do some really fancy juggling.  This means that we're going to have a port
that does not have a valid read_urb associated with it, even after open().
In this case, any attempt to read from /dev/ttyUSB0 (even if it is useless)
would result in a null pointer access violation unless there is some
form of protection around it.  Not permitting reads on this port would get
around this, but putting 'if' checks around access to read_urb is probably
much simpler.

I'm at a loss why this device has an uneven number of bulk in and bulk out
endpoints.

Any thoughts?

--
Joe Nardelli
[EMAIL PROTECTED]


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to