arbitrary size ATAPI PIO support bugfixes
* 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 <[email protected]>
drivers/scsi/libata-core.c +2 -2
@@ -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);