aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/3w-xxxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/3w-xxxx.c')
-rw-r--r--drivers/scsi/3w-xxxx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 5a2337306037..b1125341f4c8 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -199,7 +199,6 @@
199 199
200#include <linux/module.h> 200#include <linux/module.h>
201#include <linux/reboot.h> 201#include <linux/reboot.h>
202#include <linux/smp_lock.h>
203#include <linux/spinlock.h> 202#include <linux/spinlock.h>
204#include <linux/interrupt.h> 203#include <linux/interrupt.h>
205#include <linux/moduleparam.h> 204#include <linux/moduleparam.h>
@@ -221,6 +220,7 @@
221 220
222/* Globals */ 221/* Globals */
223#define TW_DRIVER_VERSION "1.26.02.003" 222#define TW_DRIVER_VERSION "1.26.02.003"
223static DEFINE_MUTEX(tw_mutex);
224static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; 224static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT];
225static int tw_device_extension_count = 0; 225static int tw_device_extension_count = 0;
226static int twe_major = -1; 226static int twe_major = -1;
@@ -900,10 +900,10 @@ static long tw_chrdev_ioctl(struct file *file, unsigned int cmd, unsigned long a
900 900
901 dprintk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl()\n"); 901 dprintk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl()\n");
902 902
903 lock_kernel(); 903 mutex_lock(&tw_mutex);
904 /* Only let one of these through at a time */ 904 /* Only let one of these through at a time */
905 if (mutex_lock_interruptible(&tw_dev->ioctl_lock)) { 905 if (mutex_lock_interruptible(&tw_dev->ioctl_lock)) {
906 unlock_kernel(); 906 mutex_unlock(&tw_mutex);
907 return -EINTR; 907 return -EINTR;
908 } 908 }
909 909
@@ -1034,7 +1034,7 @@ out2:
1034 dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_New_Ioctl) - 1, cpu_addr, dma_handle); 1034 dma_free_coherent(&tw_dev->tw_pci_dev->dev, data_buffer_length_adjusted+sizeof(TW_New_Ioctl) - 1, cpu_addr, dma_handle);
1035out: 1035out:
1036 mutex_unlock(&tw_dev->ioctl_lock); 1036 mutex_unlock(&tw_dev->ioctl_lock);
1037 unlock_kernel(); 1037 mutex_unlock(&tw_mutex);
1038 return retval; 1038 return retval;
1039} /* End tw_chrdev_ioctl() */ 1039} /* End tw_chrdev_ioctl() */
1040 1040
@@ -1044,7 +1044,6 @@ static int tw_chrdev_open(struct inode *inode, struct file *file)
1044{ 1044{
1045 unsigned int minor_number; 1045 unsigned int minor_number;
1046 1046
1047 cycle_kernel_lock();
1048 dprintk(KERN_WARNING "3w-xxxx: tw_ioctl_open()\n"); 1047 dprintk(KERN_WARNING "3w-xxxx: tw_ioctl_open()\n");
1049 1048
1050 minor_number = iminor(inode); 1049 minor_number = iminor(inode);