Ticket #1590: broadcom_1.diff
File broadcom_1.diff, 4.6 KB (added by , 15 years ago) |
---|
-
build/jam/HaikuImage
143 143 #vlance 144 144 $(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm 145 145 $(GPL_ONLY)bcm570x 146 broadcom570x 146 147 ; 147 148 #BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ; 148 149 BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi -
src/add-ons/kernel/drivers/network/broadcom570x/dev/bge/if_bgereg.h
2586 2586 #define BGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->bge_mtx, MA_OWNED) 2587 2587 #define BGE_UNLOCK(_sc) mtx_unlock(&(_sc)->bge_mtx) 2588 2588 #define BGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->bge_mtx) 2589 2590 // these functions declarations are placed here because they are used in glue.c 2591 void bge_writembx(struct bge_softc *, int, int); 2592 void bge_link_upd(struct bge_softc *); -
src/add-ons/kernel/drivers/network/broadcom570x/dev/bge/if_bge.c
378 378 static int bge_has_eaddr(struct bge_softc *); 379 379 static uint32_t bge_readmem_ind(struct bge_softc *, int); 380 380 static void bge_writemem_ind(struct bge_softc *, int, int); 381 static void bge_writembx(struct bge_softc *, int, int);382 381 #ifdef notdef 383 382 static uint32_t bge_readreg_ind(struct bge_softc *, int); 384 383 #endif … … 398 397 static void bge_sig_legacy(struct bge_softc *, int); 399 398 static void bge_sig_pre_reset(struct bge_softc *, int); 400 399 static int bge_reset(struct bge_softc *); 401 static void bge_link_upd(struct bge_softc *);402 400 403 401 /* 404 402 * The BGE_REGISTER_DEBUG option is only for low-level debugging. It may … … 553 551 CSR_WRITE_4(sc, off, val); 554 552 } 555 553 556 staticvoid554 void 557 555 bge_writembx(struct bge_softc *sc, int off, int val) 558 556 { 559 557 if (sc->bge_asicrev == BGE_ASICREV_BCM5906) … … 4320 4318 return (0); 4321 4319 } 4322 4320 4323 staticvoid4321 void 4324 4322 bge_link_upd(struct bge_softc *sc) 4325 4323 { 4326 4324 struct mii_data *mii; -
src/add-ons/kernel/drivers/network/broadcom570x/dev/bge/glue.c
31 31 } 32 32 33 33 34 // copied from if_bge.c35 static void36 bge_writembx(struct bge_softc *sc, int off, int val)37 {38 if (sc->bge_asicrev == BGE_ASICREV_BCM5906)39 off += BGE_LPMBX_IRQ0_HI - BGE_MBX_IRQ0_HI;40 41 CSR_WRITE_4(sc, off, val);42 }43 44 45 34 int 46 35 __haiku_disable_interrupts(device_t dev) 47 36 { 48 37 struct bge_softc *sc = device_get_softc(dev); 49 38 50 uint32 statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED; 39 uint32 linkChanged = CSR_READ_4(sc, BGE_MAC_STS) 40 & BGE_MACSTAT_LINK_CHANGED; 41 uint32 notInterrupted = pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4) 42 & BGE_PCISTATE_INTR_STATE; 43 // bit of a strange register name. a nonzero actually means 44 // it is _not_ interrupted 51 45 52 if ((sc->bge_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && !statusword 53 && (pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE,4) & BGE_PCISTATE_INTR_STATE)) 46 if (notInterrupted) 54 47 return 0; 55 48 49 // this part is copied from bge_intr. Perhaps it is needed here 50 // to stop the storm of interrupts. 51 if ((sc->bge_asicrev == BGE_ASICREV_BCM5700 && 52 sc->bge_chipid != BGE_CHIPID_BCM5700_B2) || 53 linkChanged || sc->bge_link_evt) 54 bge_link_upd(sc); 55 56 56 BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR); 57 57 bge_writembx(sc, BGE_MBX_IRQ0_LO, 1); 58 58 -
src/libs/compat/freebsd_network/fbsd_mii_physubr.c
510 510 } 511 511 512 512 if (sc->mii_capabilities & BMSR_ANEG) { 513 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 514 MII_NMEDIA); /* intentionally invalid index */ 513 //ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 514 // MII_NMEDIA); /* intentionally invalid index */ 515 //TODO: Why was this done? Incomplete code? 516 dprintf("don't know how to handle sc->mii_capabilities & BMSR_ANEG\n"); 515 517 PRINT("auto"); 516 518 } 517 519 #undef ADD