diff options
| author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2003-03-23 02:06:04 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-03-23 02:06:04 -0800 |
| commit | 190efe3f1eb5a9e9aa1d000dddb3fb72e64743e4 (patch) | |
| tree | 6fd7ef401a568b319ff4a64605fdf0624e235e69 | |
| parent | 901a68b03eb7eae8e5b55c96a543a91bfce36ea3 (diff) | |
[PATCH] 3ware fixups from Adam Radford
| -rw-r--r-- | drivers/scsi/3w-xxxx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 17a9450e9881..8002e4d635b3 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c @@ -622,7 +622,7 @@ static int tw_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int int error, request_id; dma_addr_t dma_handle; unsigned short tw_aen_code; - unsigned long before, timeout; + unsigned long before; unsigned long flags; unsigned int data_buffer_length = 0; unsigned long data_buffer_length_adjusted = 0; @@ -635,7 +635,8 @@ static int tw_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int dprintk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl()\n"); /* Only let one of these through at a time */ - down(&tw_dev->ioctl_sem); + if (down_interruptible(&tw_dev->ioctl_sem)) + return -EINTR; /* First copy down the buffer length */ error = copy_from_user(&data_buffer_length, (void *)arg, sizeof(unsigned int)); @@ -654,7 +655,7 @@ static int tw_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int /* Now allocate ioctl buf memory */ cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, data_buffer_length_adjusted+sizeof(TW_New_Ioctl) - 1, &dma_handle); if (cpu_addr == NULL) { - retval -ENOMEM; + retval = -ENOMEM; goto out; } |
