From bb342a371310d276dd709b74930813083cd3e700 Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Mon, 14 Apr 2003 09:45:25 +0000 Subject: [PATCH] Before attaching device set PCIM_CMD_PORTEN in addition to PCIM_CMD_MEMEN and PCIM_CMD_BUSMASTEREN, becaise some braindead BIOSes (such as one found in my vprmatrix notebook) forget to initialize it properly resulting in attachment failure. --- sys/dev/fxp/if_fxp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index bf9d18fdb146..8829739c78c5 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -385,11 +385,11 @@ fxp_attach(device_t dev) s = splimp(); /* - * Enable bus mastering. Enable memory space too, in case + * Enable bus mastering. Enable memory/port space too, in case * BIOS/Prom forgot about it. */ val = pci_read_config(dev, PCIR_COMMAND, 2); - val |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); + val |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); pci_write_config(dev, PCIR_COMMAND, val, 2); val = pci_read_config(dev, PCIR_COMMAND, 2);