Hi, this is the first one. Basically GFP_ATOMIC in interrupt and proper error handling in write. This is the simple stuff to motivate myself. Greg, please apply.
Regards Oliver You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== [EMAIL PROTECTED], 2003-01-10 19:33:09+01:00, [EMAIL PROTECTED] - correct write error path - use GFP_ATOMIC in interrupt usb-midi.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c --- a/drivers/usb/class/usb-midi.c Fri Jan 10 19:43:25 2003 +++ b/drivers/usb/class/usb-midi.c Fri Jan 10 19:43:25 2003 @@ -337,7 +337,8 @@ if (status) { printk(KERN_ERR "usbmidi: Cannot submit urb (%d)\n",status); - ret = -EFAULT; + ret = -EIO; + goto error; } add_wait_queue( &ep->wait, &wait ); @@ -354,6 +355,7 @@ set_current_state( TASK_RUNNING ); remove_wait_queue( &ep->wait, &wait ); +error: return ret; } @@ -369,7 +371,6 @@ struct midi_in_endpoint *ep = (struct midi_in_endpoint *)(urb->context); unsigned char *data = urb->transfer_buffer; int i, j, wake; - unsigned long int flags; if ( !ep->urbSubmitted ) { return; @@ -377,7 +378,7 @@ if ( (urb->status == 0) && (urb->actual_length > 0) ) { wake = 0; - spin_lock_irqsave( &ep->lock, flags ); + spin_lock( &ep->lock ); for(j = 0; j < urb->actual_length; j += 4) { int cin = (data[j]>>0)&0xf; @@ -397,7 +398,7 @@ } } - spin_unlock_irqrestore( &ep->lock, flags ); + spin_unlock &ep->lock ); if ( wake ) { wake_up( &ep->wait ); } @@ -407,7 +408,7 @@ urb->dev = ep->usbdev; urb->actual_length = 0; - usb_submit_urb(urb, GFP_KERNEL); + usb_submit_urb(urb, GFP_ATOMIC); } @@ -855,7 +856,6 @@ add_wait_queue( &open_wait, &wait ); up(&open_sem); schedule(); - __set_current_state(TASK_RUNNING); remove_wait_queue( &open_wait, &wait ); if ( signal_pending(current) ) { return -ERESTARTSYS; =================================================================== This BitKeeper patch contains the following changesets: 1.1243 ## Wrapped with gzip_uu ## begin 664 bkpatch2818 M'XL(`$T4'SX``ZU4;6O;,!#^;/V*@\+HZ!R?)+^'E'1-UX5M)&3KYQ`[2F*2 M6$&VUPW\XW>V1[:6D:Y;A<SI=,_)NN<>=`9WA3*QI7?95V78&;S714FNRG6N M>AN]5[LLK[[UM%E3<*8U!9UFV^DRG&1KET:IPMEGRTQXC%#319EN@()%;/&> M/.Z4WP\JMF8WMW<?KV:,#09PO5GD:_59E3`8L&0[7%9JU]L:O=@T/ZR/X5H@ M<LZ%A]+SN5>+4$JWYCXF2UHN11"M$C]B:Z/6PRX]U?N'Z1(Y1ABXP@UJ20DN M&P'O<>%*0.D@=S@"CV(I8XPND,>(T%4X_!,7<,'!1O86_O_2URR%9MB0:F-4 M6L*]R4H%RAAMX+`H-T=`52BX?3>=7WV9?!I?0Y;3+`E7'4KV`:3+?9=-?Y'* M[&<.QG"![!(>\;@T#0^%4Q6)D^X61;NRFW[WTJ9(@3Y1ZWO2"VLN/<3:)UH# MF<A5D&"D/'6*RB>/I\YQY*$D-HD]P8-6.J>R&C6]>`W//;$1G(^>X#*HA72# ML!6<P(=RPQCYW\C-!]M_,;F=E-I3,NM:,`';W+>39#,]V8U_D.%(ND0/&S=& M,,LRS0L!]LUXTB=OK4O=W;E/$,\G9.O%E!<(\D8R[-);8UG%(<OG.YUNS^&5 M.MB7S1)>]]G(Q1;7F9^X*F_#CX"\`[;&HMKF197LLW)>F>2<OC>_$=;@0R\D :X/'E2S<JW1;5?A"FJR"0Q-\/&H8&A7@%```` ` end ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel