Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29343
b: refs/heads/master
c: e27486d
h: refs/heads/master
i:
  29341: 7b855a0
  29339: cdb5dbc
  29335: 4ceda94
  29327: 9cdeb45
  29311: cd7e93a
v: v3
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Nov 9, 2005
1 parent edcd262 commit 9a244d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 467b16d4bebe8d251ca974eaa5da50b315206e9d
refs/heads/master: e27486db89ef04d5df1727c52362fa3d50cff241
20 changes: 11 additions & 9 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3056,8 +3056,8 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc)
}

/**
* ata_dataout_task - Write first data block to hardware
* @_data: Port to which ATA/ATAPI device is attached.
* ata_pio_first_block - Write first data block to hardware
* @ap: Port to which ATA/ATAPI device is attached.
*
* When device has indicated its readiness to accept
* the data, this function sends out the CDB or
Expand All @@ -3070,9 +3070,8 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc)
* Kernel thread context (may sleep)
*/

static void ata_dataout_task(void *_data)
static void ata_pio_first_block(struct ata_port *ap)
{
struct ata_port *ap = _data;
struct ata_queued_cmd *qc;
u8 status;
unsigned long flags;
Expand Down Expand Up @@ -3346,6 +3345,10 @@ static void ata_pio_task(void *_data)
qc_completed = 0;

switch (ap->hsm_task_state) {
case HSM_ST_FIRST:
ata_pio_first_block(ap);
return;

case HSM_ST:
ata_pio_block(ap);
break;
Expand Down Expand Up @@ -3796,10 +3799,10 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc)
if (qc->tf.flags & ATA_TFLAG_WRITE) {
/* PIO data out protocol */
ap->hsm_task_state = HSM_ST_FIRST;
queue_work(ata_wq, &ap->dataout_task);
queue_work(ata_wq, &ap->pio_task);

/* always send first data block using
* the ata_dataout_task() codepath.
* the ata_pio_task() codepath.
*/
} else {
/* PIO data in protocol */
Expand All @@ -3826,7 +3829,7 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc)
/* send cdb by polling if no cdb interrupt */
if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
(qc->tf.flags & ATA_TFLAG_POLLING))
queue_work(ata_wq, &ap->dataout_task);
queue_work(ata_wq, &ap->pio_task);
break;

case ATA_PROT_ATAPI_DMA:
Expand All @@ -3838,7 +3841,7 @@ int ata_qc_issue_prot(struct ata_queued_cmd *qc)

/* send cdb by polling if no cdb interrupt */
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
queue_work(ata_wq, &ap->dataout_task);
queue_work(ata_wq, &ap->pio_task);
break;

default:
Expand Down Expand Up @@ -4426,7 +4429,6 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
ap->active_tag = ATA_TAG_POISON;
ap->last_ctl = 0xFF;

INIT_WORK(&ap->dataout_task, ata_dataout_task, ap);
INIT_WORK(&ap->pio_task, ata_pio_task, ap);

for (i = 0; i < ATA_MAX_DEVICES; i++)
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,6 @@ struct ata_port {
struct ata_host_stats stats;
struct ata_host_set *host_set;

struct work_struct dataout_task;

struct work_struct pio_task;
unsigned int hsm_task_state;
unsigned long pio_task_timeout;
Expand Down

0 comments on commit 9a244d8

Please sign in to comment.