diff options
-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 | ||