diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2005-09-30 07:09:31 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-30 07:21:06 -0400 |
commit | f9997be974be40e884e9e8157ded2f2f9aed454c (patch) | |
tree | 3881cac4d9ac8758ac008054a5e9af88a7184bbf | |
parent | c56b14d2a3e32695e13cd49b417da889da744d1c (diff) |
[PATCH] libata irq-pio: rename atapi_packet_task() and comments
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 | 25 | ||||
-rw-r--r-- | include/linux/libata.h | 6 |
2 files changed, 16 insertions, 15 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 617836a313f0..a63758da4892 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3416,7 +3416,7 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
3416 | if (qc->tf.flags & ATA_TFLAG_WRITE) { | 3416 | if (qc->tf.flags & ATA_TFLAG_WRITE) { |
3417 | /* PIO data out protocol */ | 3417 | /* PIO data out protocol */ |
3418 | ap->hsm_task_state = HSM_ST_FIRST; | 3418 | ap->hsm_task_state = HSM_ST_FIRST; |
3419 | queue_work(ata_wq, &ap->packet_task); | 3419 | queue_work(ata_wq, &ap->dataout_task); |
3420 | 3420 | ||
3421 | /* send first data block by polling */ | 3421 | /* send first data block by polling */ |
3422 | } else { | 3422 | } else { |
@@ -3440,7 +3440,7 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
3440 | /* send cdb by polling if no cdb interrupt */ | 3440 | /* send cdb by polling if no cdb interrupt */ |
3441 | if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || | 3441 | if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || |
3442 | (qc->tf.flags & ATA_TFLAG_POLLING)) | 3442 | (qc->tf.flags & ATA_TFLAG_POLLING)) |
3443 | queue_work(ata_wq, &ap->packet_task); | 3443 | queue_work(ata_wq, &ap->dataout_task); |
3444 | break; | 3444 | break; |
3445 | 3445 | ||
3446 | case ATA_PROT_ATAPI_DMA: | 3446 | case ATA_PROT_ATAPI_DMA: |
@@ -3452,7 +3452,7 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
3452 | 3452 | ||
3453 | /* send cdb by polling if no cdb interrupt */ | 3453 | /* send cdb by polling if no cdb interrupt */ |
3454 | if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) | 3454 | if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) |
3455 | queue_work(ata_wq, &ap->packet_task); | 3455 | queue_work(ata_wq, &ap->dataout_task); |
3456 | break; | 3456 | break; |
3457 | 3457 | ||
3458 | default: | 3458 | default: |
@@ -3952,20 +3952,21 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs) | |||
3952 | } | 3952 | } |
3953 | 3953 | ||
3954 | /** | 3954 | /** |
3955 | * atapi_packet_task - Write CDB bytes to hardware | 3955 | * ata_dataout_task - Write first data block to hardware |
3956 | * @_data: Port to which ATAPI device is attached. | 3956 | * @_data: Port to which ATA/ATAPI device is attached. |
3957 | * | 3957 | * |
3958 | * When device has indicated its readiness to accept | 3958 | * When device has indicated its readiness to accept |
3959 | * a CDB, this function is called. Send the CDB. | 3959 | * the data, this function sends out the CDB or |
3960 | * If DMA is to be performed, exit immediately. | 3960 | * the first data block by PIO. |
3961 | * Otherwise, we are in polling mode, so poll | 3961 | * After this, |
3962 | * status under operation succeeds or fails. | 3962 | * - If polling, ata_pio_task() handles the rest. |
3963 | * - Otherwise, interrupt handler takes over. | ||
3963 | * | 3964 | * |
3964 | * LOCKING: | 3965 | * LOCKING: |
3965 | * Kernel thread context (may sleep) | 3966 | * Kernel thread context (may sleep) |
3966 | */ | 3967 | */ |
3967 | 3968 | ||
3968 | static void atapi_packet_task(void *_data) | 3969 | static void ata_dataout_task(void *_data) |
3969 | { | 3970 | { |
3970 | struct ata_port *ap = _data; | 3971 | struct ata_port *ap = _data; |
3971 | struct ata_queued_cmd *qc; | 3972 | struct ata_queued_cmd *qc; |
@@ -3978,7 +3979,7 @@ static void atapi_packet_task(void *_data) | |||
3978 | 3979 | ||
3979 | /* sleep-wait for BSY to clear */ | 3980 | /* sleep-wait for BSY to clear */ |
3980 | DPRINTK("busy wait\n"); | 3981 | DPRINTK("busy wait\n"); |
3981 | if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB)) | 3982 | if (ata_busy_sleep(ap, ATA_TMOUT_DATAOUT_QUICK, ATA_TMOUT_DATAOUT)) |
3982 | goto err_out; | 3983 | goto err_out; |
3983 | 3984 | ||
3984 | /* make sure DRQ is set */ | 3985 | /* make sure DRQ is set */ |
@@ -4141,7 +4142,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, | |||
4141 | ap->active_tag = ATA_TAG_POISON; | 4142 | ap->active_tag = ATA_TAG_POISON; |
4142 | ap->last_ctl = 0xFF; | 4143 | ap->last_ctl = 0xFF; |
4143 | 4144 | ||
4144 | INIT_WORK(&ap->packet_task, atapi_packet_task, ap); | 4145 | INIT_WORK(&ap->dataout_task, ata_dataout_task, ap); |
4145 | INIT_WORK(&ap->pio_task, ata_pio_task, ap); | 4146 | INIT_WORK(&ap->pio_task, ata_pio_task, ap); |
4146 | 4147 | ||
4147 | for (i = 0; i < ATA_MAX_DEVICES; i++) | 4148 | for (i = 0; i < ATA_MAX_DEVICES; i++) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 1fcd0ef9e1c9..7e6feb97406e 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -129,8 +129,8 @@ enum { | |||
129 | ATA_TMOUT_PIO = 30 * HZ, | 129 | ATA_TMOUT_PIO = 30 * HZ, |
130 | ATA_TMOUT_BOOT = 30 * HZ, /* hueristic */ | 130 | ATA_TMOUT_BOOT = 30 * HZ, /* hueristic */ |
131 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */ | 131 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* hueristic */ |
132 | ATA_TMOUT_CDB = 30 * HZ, | 132 | ATA_TMOUT_DATAOUT = 30 * HZ, |
133 | ATA_TMOUT_CDB_QUICK = 5 * HZ, | 133 | ATA_TMOUT_DATAOUT_QUICK = 5 * HZ, |
134 | 134 | ||
135 | /* ATA bus states */ | 135 | /* ATA bus states */ |
136 | BUS_UNKNOWN = 0, | 136 | BUS_UNKNOWN = 0, |
@@ -319,7 +319,7 @@ struct ata_port { | |||
319 | struct ata_host_stats stats; | 319 | struct ata_host_stats stats; |
320 | struct ata_host_set *host_set; | 320 | struct ata_host_set *host_set; |
321 | 321 | ||
322 | struct work_struct packet_task; | 322 | struct work_struct dataout_task; |
323 | 323 | ||
324 | struct work_struct pio_task; | 324 | struct work_struct pio_task; |
325 | unsigned int hsm_task_state; | 325 | unsigned int hsm_task_state; |