FreeBSD Bugzilla – Attachment 6270 Details for
Bug 14380
[PATCH] if_de workaround for when BIOS doesn't set busmaster
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.62 KB, created by
wghicks
on 1999-10-17 21:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
wghicks
Created:
1999-10-17 21:40:01 UTC
Size:
1.62 KB
patch
obsolete
>--- src/sys/pci/if_de.c.orig Sat Sep 25 12:06:00 1999 >+++ src/sys/pci/if_de.c Sun Oct 17 18:33:32 1999 >@@ -81,6 +81,7 @@ > > #include <net/if_var.h> > #include <vm/pmap.h> >+#include <pci/pcireg.h> > #include <pci/pcivar.h> > #include <pci/dc21040reg.h> > >@@ -5136,6 +5137,7 @@ > #endif > int retval, idx; > u_int32_t revinfo, cfdainfo, id; >+ u_int32_t cfcsinfo; > #if !defined(TULIP_IOMAPPED) > vm_offset_t pa_csrs; > #endif >@@ -5154,6 +5156,37 @@ > revinfo = pci_conf_read(config_id, PCI_CFRV) & 0xFF; > id = pci_conf_read(config_id, PCI_CFID); > cfdainfo = pci_conf_read(config_id, PCI_CFDA); >+ cfcsinfo = pci_conf_read(config_id, PCI_CFCS); >+ >+#if defined(TULIP_DEBUG) >+ printf(" revinfo = 0x%02x\n", revinfo); >+ printf(" id = 0x%08x\n", id); >+ printf(" cfdainfo = 0x%08x\n", cfdainfo); >+ printf(" cfcsinfo = 0x%08x\n", cfcsinfo); >+#endif >+ >+ /* turn busmaster on in case BIOS doesn't set it */ >+ if(!(cfcsinfo & PCIM_CMD_BUSMASTEREN)) { >+ printf("de%d: enabling busmaster operation\n", unit); >+ cfcsinfo |= PCIM_CMD_BUSMASTEREN; >+ pci_conf_write(config_id, PCI_CFCS, cfcsinfo); >+ } >+ >+#if 0 >+#if defined(TULIP_IOMAPPED) >+ /* XXX - "other operating systems" set this bit too */ >+ if(!(cfcsinfo & PCIM_CMD_PORTEN)) { >+ printf("de%d: enabling port mapped operation\n", unit); >+ cfcsinfo |= PCIM_CMD_PORTEN; >+ pci_conf_write(config_id, PCI_CFCS, cfcsinfo); >+ } >+#endif >+#endif >+ >+#if defined(TULIP_DEBUG) >+ printf(" cfcsinfo = 0x%08x\n", >+ (unsigned) pci_conf_read(config_id, PCI_CFCS)); >+#endif > > if (PCI_VENDORID(id) == DEC_VENDORID) { > if (PCI_CHIPID(id) == CHIPID_21040)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 14380
: 6270