Re: [PATCH]mdc800: proper memory barriers
Greg KH <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Mar 30, 2007 at 12:30:11PM +0200, Oliver Neukum wrote: > Hi, > > some drivers were indeed written before the days of out of order > execution and it shows. This adds the barriers that make sure that > the flags are set in the proper order. > > Regards > Oliver > Signed-off-by: Oliver Neukum <[email protected]> > -- > --- a/drivers/usb/image/mdc800.c 2007-03-30 12:17:06.000000000 +0200 > +++ b/drivers/usb/image/mdc800.c 2007-03-30 12:17:11.000000000 +0200 > @@ -280,7 +280,7 @@ > /* > * USB IRQ Handler for InputLine > */ > -static void mdc800_usb_irq (struct urb *urb) > +static void mdc800_usb_irq(struct urb *urb) > { > int data_received=0, wake_up; > unsigned char* b=urb->transfer_buffer; > @@ -330,7 +330,9 @@ > > if (wake_up) > { > + smp_mb(); > mdc800->camera_request_ready=0; > + smp_wmb(); Ick, is there any other way to achieve this, other than useing smp_mb()? A lock perhaps? I _really_ don't want to see that macro/function be used in drivers, it shows something is wrong with the logic if it is needed. thanks, greg k-h ------------------------------------------------------------------------- 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