X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2F3w-xxxx.c;h=c03f1d2c9e2ec1f08e1f37d1ab389bc68d517fc6;hb=0723d4a8064d52ae44ef2e19749a190b08846be3;hp=8c22329aa85e1585035127185c0597cb51a95827;hpb=886c35fbcf6fb2eee15687efc2d64d99b6ad9a4a;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 8c22329aa85..c03f1d2c9e2 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -198,6 +198,7 @@ #include #include +#include #include #include #include @@ -1027,10 +1028,12 @@ out: } /* End tw_chrdev_ioctl() */ /* This function handles open for the character device */ +/* NOTE that this function races with remove. */ static int tw_chrdev_open(struct inode *inode, struct file *file) { unsigned int minor_number; + cycle_kernel_lock(); dprintk(KERN_WARNING "3w-xxxx: tw_ioctl_open()\n"); minor_number = iminor(inode); @@ -1463,12 +1466,7 @@ static int tw_scsiop_inquiry(TW_Device_Extension *tw_dev, int request_id) static void tw_transfer_internal(TW_Device_Extension *tw_dev, int request_id, void *data, unsigned int len) { - struct scsi_cmnd *cmd = tw_dev->srb[request_id]; - unsigned long flags; - - local_irq_save(flags); - scsi_sg_copy_from_buffer(cmd, data, len); - local_irq_restore(flags); + scsi_sg_copy_from_buffer(tw_dev->srb[request_id], data, len); } /* This function is called by the isr to complete an inquiry command */