diff --git a/src/add-ons/kernel/drivers/network/bcm440x/README b/src/add-ons/kernel/drivers/network/bcm440x/README index d8563507e7..c7a35c2c70 100644 --- a/src/add-ons/kernel/drivers/network/bcm440x/README +++ b/src/add-ons/kernel/drivers/network/bcm440x/README @@ -4,7 +4,7 @@ Copyright 2003-4 Nathan Whitehorn, portions copyright 2000-2004 Broadcom Corpora To install, double-click the file appropriately named "Double Click to Install". This has not been tested with net_server, but it should work. -The driver is based on version 3.0.7 of the Linux drivers provided by Broadcom corporation, which can be obtained from their website, and is licensed under the GNU General Public License, which can be obtained from the Free Software Foundation. +The driver is based on version 3.0.8 of the Linux drivers provided by Broadcom corporation, which can be obtained from their website, and is licensed under the GNU General Public License, which can be obtained from the Free Software Foundation. Questions and support requests should be directed to me at nathanw@uchicago.edu diff --git a/src/add-ons/kernel/drivers/network/bcm440x/b44lm.c b/src/add-ons/kernel/drivers/network/bcm440x/b44lm.c index 6c5012434f..5e95691a05 100644 --- a/src/add-ons/kernel/drivers/network/bcm440x/b44lm.c +++ b/src/add-ons/kernel/drivers/network/bcm440x/b44lm.c @@ -1080,22 +1080,17 @@ LM_STATUS b44_LM_ServiceInterrupts(PLM_DEVICE_BLOCK pDevice) { LM_UINT32 intstatus, intmask; - LM_UINT32 count = 0; - + while (1) { intstatus = REG_RD(pDevice, intstatus); intmask = REG_RD(pDevice, intmask); - count++; - + /* defer unsolicited interrupts */ intstatus &= intmask; /* if not for us */ if (intstatus == 0) - if (count > 0) - return LM_STATUS_SUCCESS; - else - return 12; + return LM_STATUS_SUCCESS; /* clear the interrupt */ REG_WR(pDevice, intstatus, intstatus); diff --git a/src/add-ons/kernel/drivers/network/bcm440x/b44um.c b/src/add-ons/kernel/drivers/network/bcm440x/b44um.c index 1d2ebf1813..6c6741fc45 100644 --- a/src/add-ons/kernel/drivers/network/bcm440x/b44um.c +++ b/src/add-ons/kernel/drivers/network/bcm440x/b44um.c @@ -3,11 +3,11 @@ #include #include #include -#include #include "b44mm.h" #include "b44lm.h" #include "mempool.h" +#include "ether_driver.h" struct pci_module_info *pci = NULL; @@ -226,7 +226,9 @@ status_t b44_read(void *cookie,off_t pos,void *data,size_t *numBytes) { if (pUmDevice->block) acquire_sem(pUmDevice->packet_release_sem); - + else + acquire_sem_etc(pUmDevice->packet_release_sem,1,B_RELATIVE_TIMEOUT,0); // Decrement the receive sem anyway, but don't block + cpu = disable_interrupts(); acquire_spinlock(&pUmDevice->lock); @@ -238,7 +240,7 @@ status_t b44_read(void *cookie,off_t pos,void *data,size_t *numBytes) { if (pPacket == 0) return B_ERROR; - + pUmPacket = (struct B_UM_PACKET *) pPacket; if ((pPacket->PacketStatus != LM_STATUS_SUCCESS) || ((pPacket->PacketSize) > 1518)) {