diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 15:44:02 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 15:44:02 -0500 |
commit | 8cedcfd43a0b00741fff43d6a4c1a8b7748db3b0 (patch) | |
tree | 41758e4da78f94a20813554ef9f5ed9b323a4f8c /drivers/scsi/sata_qstor.c | |
parent | cd8200e6d4f9f05e6ea48f7c000be890337396ac (diff) | |
parent | 70d9d825e0a5a78ec1dacaaaf5c72ff5b0206fab (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/scsi/sata_qstor.c')
-rw-r--r-- | drivers/scsi/sata_qstor.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 6998c5141607..3184178e4950 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -271,16 +271,17 @@ static void qs_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
271 | 271 | ||
272 | static void qs_fill_sg(struct ata_queued_cmd *qc) | 272 | static void qs_fill_sg(struct ata_queued_cmd *qc) |
273 | { | 273 | { |
274 | struct scatterlist *sg = qc->sg; | 274 | struct scatterlist *sg; |
275 | struct ata_port *ap = qc->ap; | 275 | struct ata_port *ap = qc->ap; |
276 | struct qs_port_priv *pp = ap->private_data; | 276 | struct qs_port_priv *pp = ap->private_data; |
277 | unsigned int nelem; | 277 | unsigned int nelem; |
278 | u8 *prd = pp->pkt + QS_CPB_BYTES; | 278 | u8 *prd = pp->pkt + QS_CPB_BYTES; |
279 | 279 | ||
280 | assert(sg != NULL); | 280 | assert(qc->__sg != NULL); |
281 | assert(qc->n_elem > 0); | 281 | assert(qc->n_elem > 0); |
282 | 282 | ||
283 | for (nelem = 0; nelem < qc->n_elem; nelem++,sg++) { | 283 | nelem = 0; |
284 | ata_for_each_sg(sg, qc) { | ||
284 | u64 addr; | 285 | u64 addr; |
285 | u32 len; | 286 | u32 len; |
286 | 287 | ||
@@ -294,6 +295,7 @@ static void qs_fill_sg(struct ata_queued_cmd *qc) | |||
294 | 295 | ||
295 | VPRINTK("PRD[%u] = (0x%llX, 0x%X)\n", nelem, | 296 | VPRINTK("PRD[%u] = (0x%llX, 0x%X)\n", nelem, |
296 | (unsigned long long)addr, len); | 297 | (unsigned long long)addr, len); |
298 | nelem++; | ||
297 | } | 299 | } |
298 | } | 300 | } |
299 | 301 | ||