mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-09-22 04:32:41 +00:00
[libata] Print out SATA speed, if link is up
Make the SATA phy probe messages a bit more informative. Note this only applies to drivers that use __sata_phy_reset(), which excludes some drivers.
This commit is contained in:
parent
1b15688b31
commit
656563e32c
1 changed files with 16 additions and 4 deletions
|
@ -1444,11 +1444,23 @@ void __sata_phy_reset(struct ata_port *ap)
|
||||||
} while (time_before(jiffies, timeout));
|
} while (time_before(jiffies, timeout));
|
||||||
|
|
||||||
/* TODO: phy layer with polling, timeouts, etc. */
|
/* 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);
|
ata_port_probe(ap);
|
||||||
else {
|
} else {
|
||||||
sstatus = scr_read(ap, SCR_STATUS);
|
printk(KERN_INFO "ata%u: SATA link down (SStatus %X)\n",
|
||||||
printk(KERN_INFO "ata%u: no device found (phy stat %08x)\n",
|
|
||||||
ap->id, sstatus);
|
ap->id, sstatus);
|
||||||
ata_port_disable(ap);
|
ata_port_disable(ap);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue