# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.590 -> 1.591 # drivers/usb/microtek.c 1.7 -> 1.8 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/08/20 greg@kroah.com 1.591 # microtek driver update to the latest version. # -------------------------------------------- # diff -Nru a/drivers/usb/microtek.c b/drivers/usb/microtek.c --- a/drivers/usb/microtek.c Wed Aug 21 11:47:27 2002 +++ b/drivers/usb/microtek.c Wed Aug 21 11:47:27 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 @@ -144,7 +146,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v0.4.3" +#define DRIVER_VERSION "v0.4.4" #define DRIVER_AUTHOR "John Fremlin , Oliver Neukum " #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; }