Re: [patch]usb_serial_driver insufficient for clean disconnect handling

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Novell
Message-ID <[email protected]>
Am Donnerstag, 15. März 2007 23:10 schrieb Greg KH:
> > As we often discussed, before a disconnect handler may return, it has
> > to finish all IO to the device. That means that usb_kill_urb() has to be
> > called on all URBs that might be active.
> > The serial driver does kill all standard URBs (bulk/interrupt in/out)
> > but it does not and indeed cannot deal with any private URBs (eg.
> > control URBs as in mos7720/mos7840).
> > The shutdown() method is unable to do the job because it can be
> > delayed if additional references to the port exist.
> > 
> > To allow killing them in time I propose this additional method for
> > usb_serial_driver.
> 
> This looks good to me, thanks for doing this.  I missed this change when
> we switched to the driver model.
> 
> However, shouldn't we just be calling "shutdown" here instead?  Lots of

Upon further consideration you are probably right. This means strengthening
locking in serial core to the point that after a certain point, when we
commit to calling shutdown nothing goes down into the subdrivers.
Doing this in usbserial will complicate that driver but simplify all
subdrivers. As there are many subdrivers that option is better.

	Regards
		Oliver

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.