Re: [PATCH]generic usb serial driver

Oliver Neukum <[email protected]>
Newsgroups gmane.linux.usb.devel
Organization Novell
Message-ID <[email protected]>
Am Freitag, 30. März 2007 10:39 schrieb Greg KH:
> > To solve this with locking would require both CPU A and CPU B to take
> > the lock, which means that the urb would have to be submitted with
> > GFP_ATOMIC.
> 
> Can't this all be solved with a simple:
> 
>         get port spinlock
>         a = urb->status
>         write_busy = 0
>         unlock spinlock
> 
> In the callback, and in the write path:
> 
>         get port spinlock
>         if write_busy
>                 unlock
>                 exit
>         write_busy = 1
>         unlock port spinlock
>         submit_urb
> 

Oops. You are right. That would work.
If you think that's simpler, yes it can be done.

	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.