broadcom570x: Actually use MSIs.
We don't need to enable or disable interrupts when using them, which should fix the TODO that lead to them being disabled always.
This commit is contained in:
@@ -3162,12 +3162,6 @@ bge_can_use_msi(struct bge_softc *sc)
|
|||||||
{
|
{
|
||||||
int can_use_msi = 0;
|
int can_use_msi = 0;
|
||||||
|
|
||||||
#ifdef __HAIKU__
|
|
||||||
// temporary workaround, the int disable happens in msi enable through
|
|
||||||
// setup intr in our case which undoes the re-enabling done by the driver
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (sc->bge_msi == 0)
|
if (sc->bge_msi == 0)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ 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);
|
||||||
|
if (sc->bge_flags & BGE_FLAG_MSI)
|
||||||
|
return 1;
|
||||||
|
|
||||||
uint32 notInterrupted = pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4)
|
uint32 notInterrupted = pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4)
|
||||||
& BGE_PCISTATE_INTR_STATE;
|
& BGE_PCISTATE_INTR_STATE;
|
||||||
@@ -62,6 +64,9 @@ void
|
|||||||
__haiku_reenable_interrupts(device_t dev)
|
__haiku_reenable_interrupts(device_t dev)
|
||||||
{
|
{
|
||||||
struct bge_softc *sc = device_get_softc(dev);
|
struct bge_softc *sc = device_get_softc(dev);
|
||||||
|
if (sc->bge_flags & BGE_FLAG_MSI)
|
||||||
|
return;
|
||||||
|
|
||||||
BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_CLEAR_INTA);
|
BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_CLEAR_INTA);
|
||||||
BGE_CLRBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
|
BGE_CLRBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);
|
||||||
bge_writembx(sc, BGE_MBX_IRQ0_LO, 0);
|
bge_writembx(sc, BGE_MBX_IRQ0_LO, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user