Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21787
b: refs/heads/master
c: 4ba946e
h: refs/heads/master
i:
  21785: 7b1789c
  21783: 9fe28f4
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 27, 2006
1 parent cb5bc73 commit ef46f72
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 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: 71e834f563799e09c6bd7d6638993b464fac26f5
refs/heads/master: 4ba946e9d8e10fada7bbce527f6ea05842592e06
30 changes: 12 additions & 18 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ static int fgb(u32 bitmap);
static int ata_choose_xfer_mode(const struct ata_port *ap,
u8 *xfer_mode_out,
unsigned int *xfer_shift_out);
static void __ata_qc_complete(struct ata_queued_cmd *qc);

static unsigned int ata_unique_id = 1;
static struct workqueue_struct *ata_wq;
Expand Down Expand Up @@ -3593,21 +3592,6 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
return qc;
}

static void __ata_qc_complete(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
unsigned int tag;

qc->flags = 0;
tag = qc->tag;
if (likely(ata_tag_valid(tag))) {
if (tag == ap->active_tag)
ap->active_tag = ATA_TAG_POISON;
qc->tag = ATA_TAG_POISON;
clear_bit(tag, &ap->qactive);
}
}

/**
* ata_qc_free - free unused ata_queued_cmd
* @qc: Command to complete
Expand All @@ -3620,9 +3604,19 @@ static void __ata_qc_complete(struct ata_queued_cmd *qc)
*/
void ata_qc_free(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
unsigned int tag;

assert(qc != NULL); /* ata_qc_from_tag _might_ return NULL */

__ata_qc_complete(qc);
qc->flags = 0;
tag = qc->tag;
if (likely(ata_tag_valid(tag))) {
if (tag == ap->active_tag)
ap->active_tag = ATA_TAG_POISON;
qc->tag = ATA_TAG_POISON;
clear_bit(tag, &ap->qactive);
}
}

/**
Expand Down Expand Up @@ -3662,7 +3656,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
if (rc != 0)
return;

__ata_qc_complete(qc);
ata_qc_free(qc);

VPRINTK("EXIT\n");
}
Expand Down

0 comments on commit ef46f72

Please sign in to comment.