Updated to version 3.0.8, improved (made work) nonblocking mode.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10292 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Nathan Whitehorn
2004-11-30 04:38:11 +00:00
parent 01e4e91366
commit 1c5f7ab9d6
3 changed files with 9 additions and 12 deletions
@@ -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 [email protected]
@@ -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);
@@ -3,11 +3,11 @@
#include <KernelExport.h>
#include <malloc.h>
#include <string.h>
#include <ether_driver.h>
#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)) {