Introduce a new loader tunable "hw.ata.ata_dma_check_80pin", defaulting to 1.
This can be used to disable the 80pin cable check on systems which forget to set the bit -- such as certain laptops and Soekris boards. PR: kern/114605 (somewhat reworked) Submitted by: marck MFC after: 1 week
This commit is contained in:
parent
5bfcb0b9b4
commit
854d77bdd6
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user