OptionRomPkg: Ax88772b: Fixing register access issue in Apple Eth Adapter
The USB command CMD_RXQTC ("RX Queue Cascade Threshold Control") tries to access the register and is always failing when using the Apple Ethernet adapter. It is fixed by checking flag before sending command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
committed by
Ruiyu Ni
parent
45e675f2d0
commit
7361d3ff88
@@ -625,15 +625,18 @@ Ax88772Reset (
|
||||
|
||||
if (EFI_ERROR(Status)) goto err;
|
||||
|
||||
SetupMsg.RequestType = USB_REQ_TYPE_VENDOR
|
||||
| USB_TARGET_DEVICE;
|
||||
SetupMsg.Request = CMD_RXQTC;
|
||||
SetupMsg.Value = 0x8000;
|
||||
SetupMsg.Index = 0x8001;
|
||||
SetupMsg.Length = 0;
|
||||
Status = Ax88772UsbCommand ( pNicDevice,
|
||||
if (pNicDevice->Flags != FLAG_TYPE_AX88772) {
|
||||
SetupMsg.RequestType = USB_REQ_TYPE_VENDOR
|
||||
| USB_TARGET_DEVICE;
|
||||
SetupMsg.Request = CMD_RXQTC;
|
||||
SetupMsg.Value = 0x8000;
|
||||
SetupMsg.Index = 0x8001;
|
||||
SetupMsg.Length = 0;
|
||||
Status = Ax88772UsbCommand ( pNicDevice,
|
||||
&SetupMsg,
|
||||
NULL );
|
||||
NULL );
|
||||
}
|
||||
|
||||
err:
|
||||
return Status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user