diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2005-09-30 07:07:39 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-30 07:21:06 -0400 |
commit | c56b14d2a3e32695e13cd49b417da889da744d1c (patch) | |
tree | 271722df61c97bd213ad54ac088cd835c09d4d07 | |
parent | e50362eccd8809a224cda5f71714a088ba37b2ab (diff) |
[PATCH] libata irq-pio: add comments and cleanup
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | drivers/scsi/libata-core.c | 12 | ||||
-rw-r--r-- | include/linux/libata.h | 19 |
2 files changed, 10 insertions, 21 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index f8a590e59f10..617836a313f0 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3430,18 +3430,6 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
3430 | break; | 3430 | break; |
3431 | 3431 | ||
3432 | case ATA_PROT_ATAPI: | 3432 | case ATA_PROT_ATAPI: |
3433 | if (qc->tf.flags & ATA_TFLAG_POLLING) | ||
3434 | ata_qc_set_polling(qc); | ||
3435 | |||
3436 | ata_tf_to_host_nolock(ap, &qc->tf); | ||
3437 | ap->hsm_task_state = HSM_ST_FIRST; | ||
3438 | |||
3439 | /* send cdb by polling if no cdb interrupt */ | ||
3440 | if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || | ||
3441 | (qc->tf.flags & ATA_TFLAG_POLLING)) | ||
3442 | queue_work(ata_wq, &ap->packet_task); | ||
3443 | break; | ||
3444 | |||
3445 | case ATA_PROT_ATAPI_NODATA: | 3433 | case ATA_PROT_ATAPI_NODATA: |
3446 | if (qc->tf.flags & ATA_TFLAG_POLLING) | 3434 | if (qc->tf.flags & ATA_TFLAG_POLLING) |
3447 | ata_qc_set_polling(qc); | 3435 | ata_qc_set_polling(qc); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index ea8ab29aa92e..1fcd0ef9e1c9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -158,15 +158,16 @@ enum { | |||
158 | }; | 158 | }; |
159 | 159 | ||
160 | enum hsm_task_states { | 160 | enum hsm_task_states { |
161 | HSM_ST_UNKNOWN, | 161 | HSM_ST_UNKNOWN, /* state unknown */ |
162 | HSM_ST_IDLE, | 162 | HSM_ST_IDLE, /* no command on going */ |
163 | HSM_ST_POLL, | 163 | HSM_ST_POLL, /* same as HSM_ST, waits longer */ |
164 | HSM_ST_TMOUT, | 164 | HSM_ST_TMOUT, /* timeout */ |
165 | HSM_ST, | 165 | HSM_ST, /* (waiting the device to) transfer data */ |
166 | HSM_ST_LAST, | 166 | HSM_ST_LAST, /* (waiting the device to) complete command */ |
167 | HSM_ST_LAST_POLL, | 167 | HSM_ST_LAST_POLL, /* same as HSM_ST_LAST, waits longer */ |
168 | HSM_ST_ERR, | 168 | HSM_ST_ERR, /* error */ |
169 | HSM_ST_FIRST, | 169 | HSM_ST_FIRST, /* (waiting the device to) |
170 | write CDB or first data block */ | ||
170 | }; | 171 | }; |
171 | 172 | ||
172 | /* forward declarations */ | 173 | /* forward declarations */ |