FreeBSD Bugzilla – Attachment 12546 Details for
Bug 24177
Workaround patch for fxp on Alpha
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.13 KB, created by
Kees Jan Koster
on 2001-01-09 10:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Kees Jan Koster
Created:
2001-01-09 10:10:01 UTC
Size:
3.13 KB
patch
obsolete
>Index: if_fxp.c >=================================================================== >RCS file: /home/ncvs/src/sys/pci/if_fxp.c,v >retrieving revision 1.77.2.6 >diff -u -r1.77.2.6 if_fxp.c >--- if_fxp.c 2000/07/19 14:36:36 1.77.2.6 >+++ if_fxp.c 2000/07/25 18:53:08 >@@ -515,6 +515,8 @@ > return ENXIO; > } > >+#define FXP_PREFER_IOSPACE >+ > static int > fxp_attach(device_t dev) > { >@@ -533,12 +535,31 @@ > * Enable bus mastering. > */ > val = pci_read_config(dev, PCIR_COMMAND, 2); >+#ifdef FXP_PREFER_IOSPACE /*XXX*/ >+ val |= (PCIM_CMD_PORTEN|PCIM_CMD_BUSMASTEREN); >+#else > val |= (PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); >+#endif > pci_write_config(dev, PCIR_COMMAND, val, 2); > > /* > * Map control/status registers. > */ >+#ifdef FXP_PREFER_IOSPACE /*XXX*/ >+ device_printf(dev, "using i/o space access\n"); >+ rid = FXP_PCI_IOBA; >+ sc->io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, >+ 0, ~0, 1, RF_ACTIVE); >+ if (!sc->io) { >+ device_printf(dev, "could not map memory\n"); >+ error = ENXIO; >+ goto fail; >+ } >+ >+ sc->sc_st = rman_get_bustag(sc->io); >+ sc->sc_sh = rman_get_bushandle(sc->io); >+ >+#else > rid = FXP_PCI_MMBA; > sc->mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, > 0, ~0, 1, RF_ACTIVE); >@@ -550,7 +571,7 @@ > > sc->sc_st = rman_get_bustag(sc->mem); > sc->sc_sh = rman_get_bushandle(sc->mem); >- >+#endif > /* > * Allocate our interrupt. > */ >@@ -575,7 +596,11 @@ > /* Failed! */ > bus_teardown_intr(dev, sc->irq, sc->ih); > bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq); >+#ifdef FXP_PREFER_IOSPACE /* XXX */ > bus_release_resource(dev, SYS_RES_MEMORY, FXP_PCI_MMBA, sc->mem); >+#else >+ bus_release_resource(dev, SYS_RES_IOPORT, FXP_PCI_IOBA, sc->io); >+#endif > error = ENXIO; > goto fail; > } >@@ -639,8 +664,11 @@ > */ > bus_teardown_intr(dev, sc->irq, sc->ih); > bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq); >+#ifdef FXP_PREFER_IOSPACE /* XXX */ >+ bus_release_resource(dev, SYS_RES_IOPORT, FXP_PCI_IOBA, sc->io); >+#else > bus_release_resource(dev, SYS_RES_MEMORY, FXP_PCI_MMBA, sc->mem); >- >+#endif > /* > * Free all the receive buffers. > */ >Index: if_fxpvar.h >=================================================================== >RCS file: /home/ncvs/src/sys/pci/if_fxpvar.h,v >retrieving revision 1.9.2.1 >diff -u -r1.9.2.1 if_fxpvar.h >--- if_fxpvar.h 2000/03/29 02:02:39 1.9.2.1 >+++ if_fxpvar.h 2000/07/25 18:28:23 >@@ -46,6 +46,7 @@ > #else > struct arpcom arpcom; /* per-interface network data */ > struct resource *mem; /* resource descriptor for registers */ >+ struct resource *io; /* resource descriptor for registers */ > struct resource *irq; /* resource descriptor for interrupt */ > void *ih; /* interrupt handler cookie */ > #endif /* __NetBSD__ */
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 24177
: 12546