Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21773
b: refs/heads/master
c: 5e3c2b9
h: refs/heads/master
i:
  21771: b8aea52
v: v3
  • Loading branch information
Jeff Garzik committed Nov 29, 2005
1 parent 6bd39bc commit d1faca3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 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: 4fe1eaf6f39ed3270aff6068d84a2e6a452da734
refs/heads/master: 5e3c2b95dd560baa41b08c8f5f00bbd6fbeebdcb
20 changes: 16 additions & 4 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,11 +1444,23 @@ void __sata_phy_reset(struct ata_port *ap)
} while (time_before(jiffies, timeout));

/* TODO: phy layer with polling, timeouts, etc. */
if (sata_dev_present(ap))
sstatus = scr_read(ap, SCR_STATUS);
if (sata_dev_present(ap)) {
const char *speed;
u32 tmp;

tmp = (sstatus >> 4) & 0xf;
if (tmp & (1 << 0))
speed = "1.5";
else if (tmp & (1 << 1))
speed = "3.0";
else
speed = "<unknown>";
printk(KERN_INFO "ata%u: SATA link up %s Gbps (SStatus %X)\n",
ap->id, speed, sstatus);
ata_port_probe(ap);
else {
sstatus = scr_read(ap, SCR_STATUS);
printk(KERN_INFO "ata%u: no device found (phy stat %08x)\n",
} else {
printk(KERN_INFO "ata%u: SATA link down (SStatus %X)\n",
ap->id, sstatus);
ata_port_disable(ap);
}
Expand Down

0 comments on commit d1faca3

Please sign in to comment.