Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21783
b: refs/heads/master
c: 422b759
h: refs/heads/master
i:
  21781: f07109c
  21779: 473f5e2
  21775: d42e810
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 18, 2006
1 parent dd3317f commit 9fe28f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 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: 7c76d1e83961a4e355c3ebd53191bc6072c238bd
refs/heads/master: 422b75956cd11f9d9214e6e2a99d6e52d98812d4
24 changes: 16 additions & 8 deletions trunk/drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,24 @@ static void ahci_start_engine(struct ata_port *ap)
readl(port_mmio + PORT_CMD); /* flush */
}

static void ahci_phy_reset(struct ata_port *ap)
static unsigned int ahci_dev_classify(struct ata_port *ap)
{
void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
struct ata_taskfile tf;
u32 tmp;

tmp = readl(port_mmio + PORT_SIG);
tf.lbah = (tmp >> 24) & 0xff;
tf.lbam = (tmp >> 16) & 0xff;
tf.lbal = (tmp >> 8) & 0xff;
tf.nsect = (tmp) & 0xff;

return ata_dev_classify(&tf);
}

static void ahci_phy_reset(struct ata_port *ap)
{
void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr;
struct ata_device *dev = &ap->device[0];
u32 new_tmp, tmp;

Expand All @@ -495,13 +509,7 @@ static void ahci_phy_reset(struct ata_port *ap)
if (ap->flags & ATA_FLAG_PORT_DISABLED)
return;

tmp = readl(port_mmio + PORT_SIG);
tf.lbah = (tmp >> 24) & 0xff;
tf.lbam = (tmp >> 16) & 0xff;
tf.lbal = (tmp >> 8) & 0xff;
tf.nsect = (tmp) & 0xff;

dev->class = ata_dev_classify(&tf);
dev->class = ahci_dev_classify(ap);
if (!ata_dev_present(dev)) {
ata_port_disable(ap);
return;
Expand Down

0 comments on commit 9fe28f4

Please sign in to comment.