diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2012-10-10 17:51:23 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2012-10-10 17:51:23 +0000 |
| commit | f5d569f322ed68a5b80cb0a17799aedb87764c06 (patch) | |
| tree | 49d6321eb67831583c04ab0d049692d41023457c /sys/dev/ata | |
| parent | b9b6413b402fb3f5ebe9754087868bfa04353300 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ata')
| -rw-r--r-- | sys/dev/ata/ata-sata.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-sata.c b/sys/dev/ata/ata-sata.c index 9ab38d6c0edcb..2a85d38d3cde8 100644 --- a/sys/dev/ata/ata-sata.c +++ b/sys/dev/ata/ata-sata.c @@ -53,7 +53,8 @@ ata_sata_phy_check_events(device_t dev, int port) struct ata_channel *ch = device_get_softc(dev); u_int32_t error, status; - ata_sata_scr_read(ch, port, ATA_SERROR, &error); + if (ata_sata_scr_read(ch, port, ATA_SERROR, &error)) + return; /* Check that SError value is sane. */ if (error == 0xffffffff) @@ -66,8 +67,9 @@ ata_sata_phy_check_events(device_t dev, int port) /* if we have a connection event deal with it */ if ((error & ATA_SE_PHY_CHANGED) && (ch->pm_level == 0)) { if (bootverbose) { - ata_sata_scr_read(ch, port, ATA_SSTATUS, &status); - if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && + if (ata_sata_scr_read(ch, port, ATA_SSTATUS, &status)) { + device_printf(dev, "PHYRDY change\n"); + } else if (((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_ONLINE) && ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) { device_printf(dev, "CONNECT requested\n"); |
