Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15846
b: refs/heads/master
c: 656563e
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Garzik committed Nov 20, 2005
1 parent dbc3f49 commit c76d46d
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: 1b15688b31d8c88881102426279e8cc03953860b
refs/heads/master: 656563e32c3f1dfdc35b3944305ece1c5dfeade5
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 c76d46d

Please sign in to comment.