diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 20:19:08 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 20:19:08 -0500 |
commit | 9b73e76f3cf63379dcf45fcd4f112f5812418d0a (patch) | |
tree | 4e6bef87cd0cd6d848fc39a5ae25b981dbbe035b /drivers/scsi/wd7000.c | |
parent | 50d9a126240f9961cfdd063336bbeb91f77a7dce (diff) | |
parent | 23c3e290fb9ce38cabc2822b47583fc8702411bf (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
[SCSI] usbstorage: use last_sector_bug flag universally
[SCSI] libsas: abstract STP task status into a function
[SCSI] ultrastor: clean up inline asm warnings
[SCSI] aic7xxx: fix firmware build
[SCSI] aacraid: fib context lock for management ioctls
[SCSI] ch: remove forward declarations
[SCSI] ch: fix device minor number management bug
[SCSI] ch: handle class_device_create failure properly
[SCSI] NCR5380: fix section mismatch
[SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
[SCSI] IB/iSER: add logical unit reset support
[SCSI] don't use __GFP_DMA for sense buffers if not required
[SCSI] use dynamically allocated sense buffer
[SCSI] scsi.h: add macro for enclosure bit of inquiry data
[SCSI] sd: add fix for devices with last sector access problems
[SCSI] fix pcmcia compile problem
[SCSI] aacraid: add Voodoo Lite class of cards.
[SCSI] aacraid: add new driver features flags
[SCSI] qla2xxx: Update version number to 8.02.00-k7.
[SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
...
Diffstat (limited to 'drivers/scsi/wd7000.c')
-rw-r--r-- | drivers/scsi/wd7000.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index 03cd44f231df..b4304ae78527 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c | |||
@@ -1108,13 +1108,10 @@ static int wd7000_queuecommand(struct scsi_cmnd *SCpnt, | |||
1108 | scb->host = host; | 1108 | scb->host = host; |
1109 | 1109 | ||
1110 | nseg = scsi_sg_count(SCpnt); | 1110 | nseg = scsi_sg_count(SCpnt); |
1111 | if (nseg) { | 1111 | if (nseg > 1) { |
1112 | struct scatterlist *sg; | 1112 | struct scatterlist *sg; |
1113 | unsigned i; | 1113 | unsigned i; |
1114 | 1114 | ||
1115 | if (SCpnt->device->host->sg_tablesize == SG_NONE) { | ||
1116 | panic("wd7000_queuecommand: scatter/gather not supported.\n"); | ||
1117 | } | ||
1118 | dprintk("Using scatter/gather with %d elements.\n", nseg); | 1115 | dprintk("Using scatter/gather with %d elements.\n", nseg); |
1119 | 1116 | ||
1120 | sgb = scb->sgb; | 1117 | sgb = scb->sgb; |
@@ -1128,7 +1125,10 @@ static int wd7000_queuecommand(struct scsi_cmnd *SCpnt, | |||
1128 | } | 1125 | } |
1129 | } else { | 1126 | } else { |
1130 | scb->op = 0; | 1127 | scb->op = 0; |
1131 | any2scsi(scb->dataptr, isa_virt_to_bus(scsi_sglist(SCpnt))); | 1128 | if (nseg) { |
1129 | struct scatterlist *sg = scsi_sglist(SCpnt); | ||
1130 | any2scsi(scb->dataptr, isa_page_to_bus(sg_page(sg)) + sg->offset); | ||
1131 | } | ||
1132 | any2scsi(scb->maxlen, scsi_bufflen(SCpnt)); | 1132 | any2scsi(scb->maxlen, scsi_bufflen(SCpnt)); |
1133 | } | 1133 | } |
1134 | 1134 | ||
@@ -1524,7 +1524,7 @@ static __init int wd7000_detect(struct scsi_host_template *tpnt) | |||
1524 | * For boards before rev 6.0, scatter/gather isn't supported. | 1524 | * For boards before rev 6.0, scatter/gather isn't supported. |
1525 | */ | 1525 | */ |
1526 | if (host->rev1 < 6) | 1526 | if (host->rev1 < 6) |
1527 | sh->sg_tablesize = SG_NONE; | 1527 | sh->sg_tablesize = 1; |
1528 | 1528 | ||
1529 | present++; /* count it */ | 1529 | present++; /* count it */ |
1530 | 1530 | ||