applied patch from PieterPanman for broadcom570x network chipsets. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28712 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -138,12 +138,12 @@ BEOS_ADD_ONS_DRIVERS_GRAPHICS = $(X86_ONLY)radeon $(X86_ONLY)nvidia
|
|||||||
$(X86_ONLY)s3 $(X86_ONLY)vesa #$(X86_ONLY)via #$(X86_ONLY)vmware
|
$(X86_ONLY)s3 $(X86_ONLY)vesa #$(X86_ONLY)via #$(X86_ONLY)vmware
|
||||||
;
|
;
|
||||||
BEOS_ADD_ONS_DRIVERS_MIDI = emuxki ;
|
BEOS_ADD_ONS_DRIVERS_MIDI = emuxki ;
|
||||||
BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x etherpci $(X86_ONLY)ipro1000
|
BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x
|
||||||
|
$(X86_ONLY)broadcom570x etherpci $(X86_ONLY)ipro1000
|
||||||
pegasus $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900
|
pegasus $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900
|
||||||
$(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce
|
$(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce
|
||||||
#vlance
|
#vlance
|
||||||
$(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm
|
$(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect usb_ecm
|
||||||
$(GPL_ONLY)bcm570x
|
|
||||||
;
|
;
|
||||||
#BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ;
|
#BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ;
|
||||||
BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi
|
BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi
|
||||||
|
|||||||
@@ -31,26 +31,17 @@ __haiku_select_miibus_driver(device_t dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// copied from if_bge.c
|
|
||||||
static void
|
|
||||||
bge_writembx(struct bge_softc *sc, int off, int val)
|
|
||||||
{
|
|
||||||
if (sc->bge_asicrev == BGE_ASICREV_BCM5906)
|
|
||||||
off += BGE_LPMBX_IRQ0_HI - BGE_MBX_IRQ0_HI;
|
|
||||||
|
|
||||||
CSR_WRITE_4(sc, off, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__haiku_disable_interrupts(device_t dev)
|
__haiku_disable_interrupts(device_t dev)
|
||||||
{
|
{
|
||||||
struct bge_softc *sc = device_get_softc(dev);
|
struct bge_softc *sc = device_get_softc(dev);
|
||||||
|
|
||||||
uint32 statusword = CSR_READ_4(sc, BGE_MAC_STS) & BGE_MACSTAT_LINK_CHANGED;
|
uint32 notInterrupted = pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4)
|
||||||
|
& BGE_PCISTATE_INTR_STATE;
|
||||||
|
// bit of a strange register name. a nonzero actually means
|
||||||
|
// it is _not_ interrupted by the network chip
|
||||||
|
|
||||||
if ((sc->bge_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && !statusword
|
if (notInterrupted)
|
||||||
&& (pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE,4) & BGE_PCISTATE_INTR_STATE))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
|
BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
|
||||||
|
|||||||
@@ -378,7 +378,9 @@ static int bge_blockinit(struct bge_softc *);
|
|||||||
static int bge_has_eaddr(struct bge_softc *);
|
static int bge_has_eaddr(struct bge_softc *);
|
||||||
static uint32_t bge_readmem_ind(struct bge_softc *, int);
|
static uint32_t bge_readmem_ind(struct bge_softc *, int);
|
||||||
static void bge_writemem_ind(struct bge_softc *, int, int);
|
static void bge_writemem_ind(struct bge_softc *, int, int);
|
||||||
|
#ifndef __HAIKU__
|
||||||
static void bge_writembx(struct bge_softc *, int, int);
|
static void bge_writembx(struct bge_softc *, int, int);
|
||||||
|
#endif
|
||||||
#ifdef notdef
|
#ifdef notdef
|
||||||
static uint32_t bge_readreg_ind(struct bge_softc *, int);
|
static uint32_t bge_readreg_ind(struct bge_softc *, int);
|
||||||
#endif
|
#endif
|
||||||
@@ -553,7 +555,11 @@ bge_writemem_direct(struct bge_softc *sc, int off, int val)
|
|||||||
CSR_WRITE_4(sc, off, val);
|
CSR_WRITE_4(sc, off, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __HAIKU__
|
||||||
static void
|
static void
|
||||||
|
#else
|
||||||
|
void
|
||||||
|
#endif
|
||||||
bge_writembx(struct bge_softc *sc, int off, int val)
|
bge_writembx(struct bge_softc *sc, int off, int val)
|
||||||
{
|
{
|
||||||
if (sc->bge_asicrev == BGE_ASICREV_BCM5906)
|
if (sc->bge_asicrev == BGE_ASICREV_BCM5906)
|
||||||
|
|||||||
@@ -2586,3 +2586,8 @@ struct bge_softc {
|
|||||||
#define BGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->bge_mtx, MA_OWNED)
|
#define BGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->bge_mtx, MA_OWNED)
|
||||||
#define BGE_UNLOCK(_sc) mtx_unlock(&(_sc)->bge_mtx)
|
#define BGE_UNLOCK(_sc) mtx_unlock(&(_sc)->bge_mtx)
|
||||||
#define BGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->bge_mtx)
|
#define BGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->bge_mtx)
|
||||||
|
|
||||||
|
#ifdef __HAIKU__
|
||||||
|
// this function declaration is placed here because it is used in glue.c
|
||||||
|
void bge_writembx(struct bge_softc *, int, int);
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user