diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-20 03:36:45 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-20 03:36:45 -0500 |
commit | 656563e32c3f1dfdc35b3944305ece1c5dfeade5 (patch) | |
tree | 2c04a7099de3b088a95bc36401ebac4287cdf3c7 /drivers | |
parent | 1b15688b31d8c88881102426279e8cc03953860b (diff) |
[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.c | 20 |
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) | |||
1444 | } while (time_before(jiffies, timeout)); | 1444 | } while (time_before(jiffies, timeout)); |
1445 | 1445 | ||
1446 | /* TODO: phy layer with polling, timeouts, etc. */ | 1446 | /* TODO: phy layer with polling, timeouts, etc. */ |
1447 | if (sata_dev_present(ap)) | 1447 | sstatus = scr_read(ap, SCR_STATUS); |
1448 | if (sata_dev_present(ap)) { | ||
1449 | const char *speed; | ||
1450 | u32 tmp; | ||
1451 | |||
1452 | tmp = (sstatus >> 4) & 0xf; | ||
1453 | if (tmp & (1 << 0)) | ||
1454 | speed = "1.5"; | ||
1455 | else if (tmp & (1 << 1)) | ||
1456 | speed = "3.0"; | ||
1457 | else | ||
1458 | speed = "<unknown>"; | ||
1459 | printk(KERN_INFO "ata%u: SATA link up %s Gbps (SStatus %X)\n", | ||
1460 | ap->id, speed, sstatus); | ||
1448 | ata_port_probe(ap); | 1461 | ata_port_probe(ap); |
1449 | else { | 1462 | } else { |
1450 | sstatus = scr_read(ap, SCR_STATUS); | 1463 | printk(KERN_INFO "ata%u: SATA link down (SStatus %X)\n", |
1451 | printk(KERN_INFO "ata%u: no device found (phy stat %08x)\n", | ||
1452 | ap->id, sstatus); | 1464 | ap->id, sstatus); |
1453 | ata_port_disable(ap); | 1465 | ata_port_disable(ap); |
1454 | } | 1466 | } |