diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-14 17:09:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-14 17:09:08 -0700 |
commit | f05472f10db38ac5a1ac3f1fa469510471152561 (patch) | |
tree | 991f3ec1e2702a5b575b3e3959216ce3f13a59f8 /drivers/scsi/sg.c | |
parent | 11f16971ceeb0f442e58f318b0cfde8eb35296bb (diff) | |
parent | 7676f83aeb774e7a3abe6af06ec92b29488b5b79 (diff) | |
download | lwn-f05472f10db38ac5a1ac3f1fa469510471152561.tar.gz lwn-f05472f10db38ac5a1ac3f1fa469510471152561.zip |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (679 commits)
commit 7676f83aeb774e7a3abe6af06ec92b29488b5b79
Author: James Bottomley <James.Bottomley@steeleye.com>
Date: Fri Apr 14 09:47:59 2006 -0500
[SCSI] scsi_transport_sas: don't scan a non-existent end device
Any end device that can't support any of the scanning protocols
shouldn't be scanned, so set its id to -1 to prevent
scsi_scan_target() being called for it.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
commit 3c0c25b97c7d020ef07f6366cf1d668a8e980c7c
Author: Moore, Eric <Eric.Moore@lsil.com>
Date: Thu Apr 13 16:08:17 2006 -0600
[SCSI] mptfusion - fix panic in mptsas_slave_configure
Driver panic when RAID logical volume was present when driver
loaded, or when a RAID logical volume was created on the fly.
...
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 7405d0df95db..b098942445ec 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -748,6 +748,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp, /* * most likely out of mem, but could also be a bad map */ + sg_finish_rem_req(srp); return -ENOMEM; } else return 0; @@ -1044,7 +1045,7 @@ sg_ioctl(struct inode *inode, struct file *filp, if (!sg_allow_access(opcode, sdp->device->type)) return -EPERM; } - return scsi_ioctl_send_command(sdp->device, p); + return sg_scsi_ioctl(filp, sdp->device->request_queue, NULL, p); case SG_SET_DEBUG: result = get_user(val, ip); if (result) @@ -1798,8 +1799,10 @@ sg_build_direct(Sg_request * srp, Sg_fd * sfp, int dxfer_len) res = st_map_user_pages(schp->buffer, mx_sc_elems, (unsigned long)hp->dxferp, dxfer_len, (SG_DXFER_TO_DEV == hp->dxfer_direction) ? 1 : 0); - if (res <= 0) + if (res <= 0) { + sg_remove_scat(schp); return 1; + } schp->k_use_sg = res; schp->dio_in_use = 1; hp->info |= SG_INFO_DIRECT_IO; |