summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-20 03:36:45 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-20 03:36:45 -0500
commit656563e32c3f1dfdc35b3944305ece1c5dfeade5 (patch)
tree2c04a7099de3b088a95bc36401ebac4287cdf3c7 /drivers
parent1b15688b31d8c88881102426279e8cc03953860b (diff)
downloadblackbird-op-linux-656563e32c3f1dfdc35b3944305ece1c5dfeade5.tar.gz
blackbird-op-linux-656563e32c3f1dfdc35b3944305ece1c5dfeade5.zip
[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.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-core.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 665ae79e1fd6..9f27e8d0e774 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -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);
}
OpenPOWER on IntegriCloud