Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77002
b: refs/heads/master
c: 9a3dd65
h: refs/heads/master
v: v3
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Jan 12, 2008
1 parent e01514c commit d18375a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe7ed98fd49a28287aca8b0ba8da8fb9ca35a055
refs/heads/master: 9a3dd65bafcfa3338cfb4b6b7e12ff59aca0ac28
12 changes: 6 additions & 6 deletions trunk/drivers/scsi/wd7000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,13 +1108,10 @@ static int wd7000_queuecommand(struct scsi_cmnd *SCpnt,
scb->host = host;

nseg = scsi_sg_count(SCpnt);
if (nseg) {
if (nseg > 1) {
struct scatterlist *sg;
unsigned i;

if (SCpnt->device->host->sg_tablesize == SG_NONE) {
panic("wd7000_queuecommand: scatter/gather not supported.\n");
}
dprintk("Using scatter/gather with %d elements.\n", nseg);

sgb = scb->sgb;
Expand All @@ -1128,7 +1125,10 @@ static int wd7000_queuecommand(struct scsi_cmnd *SCpnt,
}
} else {
scb->op = 0;
any2scsi(scb->dataptr, isa_virt_to_bus(scsi_sglist(SCpnt)));
if (nseg) {
struct scatterlist *sg = scsi_sglist(SCpnt);
any2scsi(scb->dataptr, isa_page_to_bus(sg_page(sg)) + sg->offset);
}
any2scsi(scb->maxlen, scsi_bufflen(SCpnt));
}

Expand Down Expand Up @@ -1524,7 +1524,7 @@ static __init int wd7000_detect(struct scsi_host_template *tpnt)
* For boards before rev 6.0, scatter/gather isn't supported.
*/
if (host->rev1 < 6)
sh->sg_tablesize = SG_NONE;
sh->sg_tablesize = 1;

present++; /* count it */

Expand Down

0 comments on commit d18375a

Please sign in to comment.