Skip to content

Commit

Permalink
usb_asix: fix for 88772B
Browse files Browse the repository at this point in the history
* select RX header format type 1 for AX88772B.
* should help with #8238
  • Loading branch information
korli committed Nov 7, 2012
1 parent 4549786 commit 62cff38
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions src/add-ons/kernel/drivers/network/usb_asix/AX88772Device.cpp
Expand Up @@ -368,12 +368,6 @@ AX88772Device::_SetupAX88772()

snooze(150000);

result = WriteRXControlRegister(0);
if (result != B_OK) {
TRACE_ALWAYS("Error of writing %#04x RX Control:%#010x\n", 0, result);
return result;
}

return B_OK;
}

Expand Down Expand Up @@ -449,12 +443,6 @@ AX88772Device::_SetupAX88772A()
if (result != B_OK)
return result;

result = WriteRXControlRegister(0);
if (result != B_OK) {
TRACE_ALWAYS("Error of writing %#04x RX Control:%#010x\n", 0, result);
return result;
}

fIPG[0] = 0x15;
fIPG[1] = 0x16;
fIPG[2] = 0x1A;
Expand All @@ -481,12 +469,6 @@ AX88772Device::_SetupAX88772B()
if (result != B_OK)
return result;

result = WriteRXControlRegister(0);
if (result != B_OK) {
TRACE_ALWAYS("Error of writing %#04x RX Control:%#010x\n", 0, result);
return result;
}

fIPG[0] = 0x15;
fIPG[1] = 0x16;
fIPG[2] = 0x1A;
Expand All @@ -513,6 +495,9 @@ AX88772Device::StartDevice()
"%d bytes of %d written.\n", actualLength, sizeof(fIPG));

}

uint16 rxcontrol = 0;

// AX88772B uses different maximum frame burst configuration.
if (fDeviceInfo.fType == DeviceInfo::AX88772B) {
result = gUSBModule->send_request(fDevice,
Expand All @@ -526,9 +511,11 @@ AX88772Device::StartDevice()
TRACE_ALWAYS("Error of writing frame burst:%#010x\n", result);
return result;
}

rxcontrol = RXCTL_USB_MFB;
}

uint16 rxcontrol = RXCTL_START | RXCTL_BROADCAST;
rxcontrol |= RXCTL_START | RXCTL_BROADCAST;
result = WriteRXControlRegister(rxcontrol);
if (result != B_OK) {
TRACE_ALWAYS("Error of writing %#04x RX Control:%#010x\n",
Expand Down

0 comments on commit 62cff38

Please sign in to comment.