summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2004-01-14 14:24:36 +0000
committersos <sos@FreeBSD.org>2004-01-14 14:24:36 +0000
commit3892f4c9cbe53cc2b3f82b43428219cf6f4442a7 (patch)
tree83064151268d1ebceadf159cd8431c810e949b86 /sys/dev/ata
parentf1b545fd1e7501fbbcfb4a8b533441b87bc51ea1 (diff)
downloadFreeBSD-src-3892f4c9cbe53cc2b3f82b43428219cf6f4442a7.zip
FreeBSD-src-3892f4c9cbe53cc2b3f82b43428219cf6f4442a7.tar.gz
Fix potential cable detection problem on older CMD chips.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-chipset.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c
index 2aae069..5e42085 100644
--- a/sys/dev/ata/ata-chipset.c
+++ b/sys/dev/ata/ata-chipset.c
@@ -1816,14 +1816,16 @@ ata_sii_setmode(struct ata_device *atadev, int mode)
mode = ata_limit_mode(atadev, mode, ctlr->chip->max_dma);
- if (ctlr->chip->max_dma < ATA_UDMA2) {
- mode = ata_check_80pin(atadev, mode);
- }
- else if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x79, 1) &
- (atadev->channel->unit ? 0x02 : 0x01))) {
- ata_prtdev(atadev,"DMA limited to UDMA33, non-ATA66 cable or device\n");
- mode = ATA_UDMA2;
+ if (ctlr->chip->cfg2 & SIISETCLK) {
+ if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x79, 1) &
+ (atadev->channel->unit ? 0x02 : 0x01))) {
+ ata_prtdev(atadev,
+ "DMA limited to UDMA33, non-ATA66 cable or device\n");
+ mode = ATA_UDMA2;
+ }
}
+ else
+ mode = ata_check_80pin(atadev, mode);
error = ata_controlcmd(atadev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode);
OpenPOWER on IntegriCloud