diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index efdd27e2935a..8da8a1082810 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -75,6 +75,7 @@ uma_zone_t ata_request_zone; uma_zone_t ata_composite_zone; int ata_wc = 1; int ata_setmax = 0; +int ata_dma_check_80pin = 1; /* local vars */ static int ata_dma = 1; @@ -85,6 +86,10 @@ SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters"); TUNABLE_INT("hw.ata.ata_dma", &ata_dma); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0, "ATA disk DMA mode control"); +TUNABLE_INT("hw.ata.ata_dma_check_80pin", &ata_dma_check_80pin); +SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_check_80pin, + CTLFLAG_RDTUN, &ata_dma_check_80pin, 1, + "Check for 80pin cable before setting ATA DMA mode"); TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0, "ATAPI device DMA mode control"); diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h index 4bccc4d84c46..b2283b9c01ba 100644 --- a/sys/dev/ata/ata-all.h +++ b/sys/dev/ata/ata-all.h @@ -544,7 +544,8 @@ extern struct intr_config_hook *ata_delayed_attach; extern devclass_t ata_devclass; extern int ata_wc; extern int ata_setmax; - +extern int ata_dma_check_80pin; + /* public prototypes */ /* ata-all.c: */ int ata_probe(device_t dev); diff --git a/sys/dev/ata/ata-chipset.c b/sys/dev/ata/ata-chipset.c index b5b5d00f5ed4..23ed09072a06 100644 --- a/sys/dev/ata/ata-chipset.c +++ b/sys/dev/ata/ata-chipset.c @@ -6392,6 +6392,12 @@ ata_check_80pin(device_t dev, int mode) { struct ata_device *atadev = device_get_softc(dev); + if (!ata_dma_check_80pin) { + if (bootverbose) + device_printf(dev, "Skipping 80pin cable check\n"); + return mode; + } + if (mode > ATA_UDMA2 && !(atadev->param.hwres & ATA_CABLE_ID)) { ata_print_cable(dev, "device"); mode = ATA_UDMA2;