Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44623
b: refs/heads/master
c: 33480a0
h: refs/heads/master
i:
  44621: 3cd3d8b
  44619: 036c407
  44615: 2a01e95
  44607: a89fc76
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Dec 16, 2006
1 parent bbf2b6f commit 6078559
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: c10340aca270abb141154cd93dcf1be0b92143fc
refs/heads/master: 33480a0ede8dcc7e6483054279008f972bd56fd3
14 changes: 10 additions & 4 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,
}

/**
* ata_exec_internal_sg - execute libata internal command
* ata_exec_internal - execute libata internal command
* @dev: Device to which the command is sent
* @tf: Taskfile registers for the command and the result
* @cdb: CDB for packet command
Expand All @@ -1353,11 +1353,17 @@ unsigned ata_exec_internal(struct ata_device *dev,
struct ata_taskfile *tf, const u8 *cdb,
int dma_dir, void *buf, unsigned int buflen)
{
struct scatterlist sg;
struct scatterlist *psg = NULL, sg;
unsigned int n_elem = 0;

sg_init_one(&sg, buf, buflen);
if (dma_dir != DMA_NONE) {
WARN_ON(!buf);
sg_init_one(&sg, buf, buflen);
psg = &sg;
n_elem++;
}

return ata_exec_internal_sg(dev, tf, cdb, dma_dir, &sg, 1);
return ata_exec_internal_sg(dev, tf, cdb, dma_dir, psg, n_elem);
}

/**
Expand Down

0 comments on commit 6078559

Please sign in to comment.