Hi,

these are the smp locking fixes to 2.4 microtek.
They are for the same issues like the storage fixes.

        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], 2002-06-18 11:33:32+02:00, [EMAIL PROTECTED]
  confirm to stupid locking rules




diff -Nru a/drivers/usb/microtek.c b/drivers/usb/microtek.c
--- a/drivers/usb/microtek.c    Tue Jun 18 19:54:34 2002
+++ b/drivers/usb/microtek.c    Tue Jun 18 19:54:34 2002
@@ -117,6 +117,8 @@
  *     20010320 Version 0.4.3
  *     20010408 Identify version on module load.
  *     20011003 Fix multiple requests
+ *     20020618 Version 0.4.4
+ *     20020618 Confirm to utterly stupid rules about io_request_lock
  */
 
 #include <linux/module.h>
@@ -144,7 +146,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v0.4.3"
+#define DRIVER_VERSION "v0.4.4"
 #define DRIVER_AUTHOR "John Fremlin <[EMAIL PROTECTED]>, Oliver Neukum 
<[EMAIL PROTECTED]>"
 #define DRIVER_DESC "Microtek Scanmaker X6 USB scanner driver"
 
@@ -326,10 +328,12 @@
 }  */
 
 static inline void mts_urb_abort(struct mts_desc* desc) {
+       spin_unlock_irq(&io_request_lock);
        MTS_DEBUG_GOT_HERE();
        mts_debug_dump(desc);
 
        usb_unlink_urb( &desc->urb );
+       spin_lock_irq(&io_request_lock);
 }
 
 static struct mts_desc * mts_list; /* list of active scanners */
@@ -414,12 +418,14 @@
 
 static int mts_scsi_host_reset (Scsi_Cmnd *srb)
 {
-       struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
 
+       struct mts_desc* desc = (struct mts_desc*)(srb->host->hostdata[0]);
+       spin_unlock_irq(&io_request_lock);
        MTS_DEBUG_GOT_HERE();
        mts_debug_dump(desc);
 
        usb_reset_device(desc->usb_dev); /*FIXME: untested on new reset code */
+       spin_lock_irq(&io_request_lock);
        return 0;  /* RANT why here 0 and not SUCCESS */
 }
 
@@ -435,6 +441,7 @@
        /* What a hideous hack! */
 
        char local_name[48];
+       spin_unlock_irq(&io_request_lock);
 
        MTS_DEBUG_GOT_HERE();
 
@@ -445,6 +452,7 @@
 
        if (!sht->proc_name) {
                MTS_ERROR( "unable to allocate memory for proc interface!!\n" );
+               spin_lock_irq(&io_request_lock);
                return 0;
        }
 
@@ -457,11 +465,12 @@
        if (desc->host == NULL) {
                MTS_ERROR("Cannot register due to low memory");
                kfree(sht->proc_name);
+               spin_lock_irq(&io_request_lock);
                return 0;
        }
        desc->host->hostdata[0] = (unsigned long)desc;
 /* FIXME: what if sizeof(void*) != sizeof(unsigned long)? */
-
+       spin_lock_irq(&io_request_lock);
        return 1;
 }
 

===================================================================


This BitKeeper patch contains the following changesets:
1.719
## Wrapped with gzip_uu ##


begin 664 bkpatch9795
M'XL(`-IS#ST``ZU5:V_:,!3]C'_%52M-?8C$3T*8J-A*M:%-:T75?IDFE(>!
MB!"WMD-7B1\_)ZAT[5B7K8L26_:]/C[W^"39ARLC=:^E\FPE-=J'C\I8-Y2%
M*J0W5TN99T7YW5-ZYH)CI5S0KZ;]S0H_7K2MEM+X=Y0CEW(1V60.+F)Z+>*Q
M[8R]OY&]UOCLP]7G=V.$^GTXG4?%3%Y*"_T^BA>#M)2YM]`JFE>[K;?A-<68
M8($)9;R#Z1H'F(AU)TBC@#,<"L%3(@F:YM$JD\4@EW&D8^D5;N43#(H[A%$F
M""=KU@T%0T,@7D!"P-3''9]T@9`>8SU&CS'M80R;$@>[Q(!C`FV,WL/KB9^B
M!!)53#.]!*O`V/(F2R%7R2(K9J#+7!KT"5C8#4)T\:@::O_EA1".,#K9P3C5
M59W&+TWL+[-$*RL77O(3?4$<?1H(WG7*I5-"PR`-2!PSGKXDT@O`U6%T<<BH
M<(JXVG!MB=WYN_WQ&M)HIN5LD$JS:`9(,`Y<WQ7!FF'6"6KG$/+4.+0G1"/C
M4&BS_^8<+7,9F<HI49&ZT4Q'<5P-,S71\K:4QDXJ+SD+;70^A[:^JV]GB8O?
M2/X/YAH1]R91!$>MA^.%:P><J0*PQSW^)'+ZZ/?26JGS^P??UWZ'*%:E_:6$
M(>$!$+=3W>VG<IH5$H;CT?79>.*>R]'Y%]A;U=OMH1&C[F!0R]QDQ:0L*H1)
MIF\/WCR#/7SK4AG=IKZ4..2D9L!=#=3E6UTF%I;63)R9DB.H6NC#P?/`X8'1
M<?MD[CZNFS:-;/05?W.0C?AQVHS?B+.@:<V\5K'5!%2$S3*'O,-K>>KNS_G;
8OT,RE\G"E,M^/!6A)%2@'P_N>4*9!@``
`
end


----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                      >>>     http://thinkgeek.com/sf    <<<

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to