summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-pci.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-02-22 10:45:40 +0000
committermav <mav@FreeBSD.org>2010-02-22 10:45:40 +0000
commit69414838331fba17e430ba1b57b262f7eab2bf22 (patch)
tree1f75e722086ed89cb4ae3b357ebc73448c972241 /sys/dev/ata/ata-pci.c
parent6fc9b03b75545a8c9c81c318b8edd419293b4a5b (diff)
downloadFreeBSD-src-69414838331fba17e430ba1b57b262f7eab2bf22.zip
FreeBSD-src-69414838331fba17e430ba1b57b262f7eab2bf22.tar.gz
Improve output for controllers that doesn't report SATA speed.
Diffstat (limited to 'sys/dev/ata/ata-pci.c')
-rw-r--r--sys/dev/ata/ata-pci.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 8c4c01f..5271073 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -714,10 +714,14 @@ static int
ata_pcichannel_getrev(device_t dev, int target)
{
struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev));
-
- if (ctlr->getrev)
- return (ctlr->getrev(dev, target));
- else
+ struct ata_channel *ch = device_get_softc(dev);
+
+ if (ch->flags & ATA_SATA) {
+ if (ctlr->getrev)
+ return (ctlr->getrev(dev, target));
+ else
+ return (0xff);
+ } else
return (0);
}
OpenPOWER on IntegriCloud