Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62003
b: refs/heads/master
c: e59f0da
h: refs/heads/master
i:
  62001: 8fc7dbf
  61999: 2065b91
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jul 20, 2007
1 parent d808167 commit 9bb8729
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 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: a9cf5e858100b2f82ad61028c26a1a3de11c4839
refs/heads/master: e59f0dad33176a13803ff8a41cc639a06c43d381
23 changes: 14 additions & 9 deletions trunk/drivers/ata/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,15 +464,15 @@ static void sil24_dev_config(struct ata_device *dev)
writel(PORT_CS_CDB16, port + PORT_CTRL_CLR);
}

static inline void sil24_update_tf(struct ata_port *ap)
static void sil24_read_tf(struct ata_port *ap, int tag, struct ata_taskfile *tf)
{
struct sil24_port_priv *pp = ap->private_data;
void __iomem *port = ap->ioaddr.cmd_addr;
struct sil24_prb __iomem *prb = port;
struct sil24_prb __iomem *prb;
u8 fis[6 * 4];

memcpy_fromio(fis, prb->fis, 6 * 4);
ata_tf_from_fis(fis, &pp->tf);
prb = port + PORT_LRAM + sil24_tag(tag) * PORT_LRAM_SLOT_SZ;
memcpy_fromio(fis, prb->fis, sizeof(fis));
ata_tf_from_fis(fis, tf);
}

static u8 sil24_check_status(struct ata_port *ap)
Expand Down Expand Up @@ -538,6 +538,7 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class,
struct sil24_port_priv *pp = ap->private_data;
struct sil24_prb *prb = &pp->cmd_block[0].ata.prb;
dma_addr_t paddr = pp->cmd_block_dma;
struct ata_taskfile tf;
u32 mask, irq_stat;
const char *reason;

Expand Down Expand Up @@ -577,8 +578,8 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class,
goto err;
}

sil24_update_tf(ap);
*class = ata_dev_classify(&pp->tf);
sil24_read_tf(ap, 0, &tf);
*class = ata_dev_classify(&tf);

if (*class == ATA_DEV_UNKNOWN)
*class = ATA_DEV_NONE;
Expand Down Expand Up @@ -754,6 +755,7 @@ static void sil24_thaw(struct ata_port *ap)
static void sil24_error_intr(struct ata_port *ap)
{
void __iomem *port = ap->ioaddr.cmd_addr;
struct sil24_port_priv *pp = ap->private_data;
struct ata_eh_info *ehi = &ap->eh_info;
int freeze = 0;
u32 irq_stat;
Expand Down Expand Up @@ -808,7 +810,7 @@ static void sil24_error_intr(struct ata_port *ap)
/* record error info */
qc = ata_qc_from_tag(ap, ap->active_tag);
if (qc) {
sil24_update_tf(ap);
sil24_read_tf(ap, qc->tag, &pp->tf);
qc->err_mask |= err_mask;
} else
ehi->err_mask |= err_mask;
Expand All @@ -825,8 +827,11 @@ static void sil24_error_intr(struct ata_port *ap)

static void sil24_finish_qc(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
struct sil24_port_priv *pp = ap->private_data;

if (qc->flags & ATA_QCFLAG_RESULT_TF)
sil24_update_tf(qc->ap);
sil24_read_tf(ap, qc->tag, &pp->tf);
}

static inline void sil24_host_intr(struct ata_port *ap)
Expand Down

0 comments on commit 9bb8729

Please sign in to comment.