|
|
@@ -674,6 +674,10 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
|
|
|
unsigned int offset;
|
|
|
unsigned char *buf;
|
|
|
|
|
|
+ if (!qc->cursg) {
|
|
|
+ qc->curbytes = qc->nbytes;
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (qc->curbytes == qc->nbytes - qc->sect_size)
|
|
|
ap->hsm_task_state = HSM_ST_LAST;
|
|
|
|
|
|
@@ -699,6 +703,8 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
|
|
|
|
|
|
if (qc->cursg_ofs == qc->cursg->length) {
|
|
|
qc->cursg = sg_next(qc->cursg);
|
|
|
+ if (!qc->cursg)
|
|
|
+ ap->hsm_task_state = HSM_ST_LAST;
|
|
|
qc->cursg_ofs = 0;
|
|
|
}
|
|
|
}
|