linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libata] arbitrary size ATAPI PIO support bugfixes
@ 2004-10-18 21:26 Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2004-10-18 21:26 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide

* sg was incorrectly used instead of qc->sg in __atapi_pio_bytes()
* due to obvious typo qc->curbytes wasn't zeroed in ata_qc_new_init()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c	2004-10-18 22:31:59 +02:00
+++ b/drivers/scsi/libata-core.c	2004-10-18 22:31:59 +02:00
@@ -2238,7 +2238,7 @@
 		ap->pio_task_state = PIO_ST_LAST;
 
 next_sg:
-	sg = &sg[qc->cursg];
+	sg = &qc->sg[qc->cursg];
 	page = sg->page;
 
 	count = min(sg_dma_len(sg) - qc->cursg_ofs, bytes);
@@ -2616,7 +2616,7 @@
 		qc->dev = dev;
 		qc->cursect = qc->cursg = qc->cursg_ofs = 0;
 		qc->nsect = 0;
-		qc->nbytes = qc->nbytes = 0;
+		qc->nbytes = qc->curbytes = 0;
 
 		ata_tf_init(ap, &qc->tf, dev->devno);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-18 21:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-18 21:26 [libata] arbitrary size ATAPI PIO support bugfixes Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).