/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module Name:\r
- \r
- \r
+\r
+\r
E100B.C\r
\r
Abstract:\r
0x60, 0,\r
(UINT8)0xf2, 0x48,\r
0, 0x40,\r
- (UINT8)0xf2, (UINT8)0x80, // 0x40=Force full-duplex \r
+ (UINT8)0xf2, (UINT8)0x80, // 0x40=Force full-duplex\r
0x3f, 0x05,\r
};\r
\r
This function calls the MemIo callback to read a byte from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
- \r
+\r
Arguments:\r
Port - Which port to read from.\r
\r
UINT8 Results;\r
\r
(*AdapterInfo->Mem_Io) (\r
- AdapterInfo->Unique_ID, \r
- PXE_MEM_READ, \r
- 1, \r
+ AdapterInfo->Unique_ID,\r
+ PXE_MEM_READ,\r
+ 1,\r
(UINT64)Port,\r
(UINT64) (UINTN) &Results\r
);\r
This function calls the MemIo callback to read a word from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to read a dword from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to write a byte from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to write a word from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
This function calls the MemIo callback to write a dword from the device's\r
address space\r
Since UNDI3.0 uses the TmpMemIo function (instead of the callback routine)\r
- which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have \r
+ which also takes the UniqueId parameter (as in UNDI3.1 spec) we don't have\r
to make undi3.0 a special case\r
\r
Arguments:\r
AdapterInfo->rx_phy_addr = AdapterInfo->Mapped_MemoryPtr;\r
AdapterInfo->tx_phy_addr = AdapterInfo->Mapped_MemoryPtr + rx_size;\r
AdapterInfo->stat_phy_addr = AdapterInfo->tx_phy_addr + tx_size;\r
- \r
+\r
//\r
// auto detect.\r
//\r
cur_ptr[Index].PhysTCBAddress =\r
(UINT32) AdapterInfo->tx_phy_addr + (Index * sizeof (TxCB));\r
\r
- cur_ptr[Index].PhysArrayAddr = (UINT32)(cur_ptr[Index].PhysTCBAddress + array_off); \r
+ cur_ptr[Index].PhysArrayAddr = (UINT32)(cur_ptr[Index].PhysTCBAddress + array_off);\r
cur_ptr[Index].PhysTBDArrayAddres = (UINT32)(cur_ptr[Index].PhysTCBAddress + array_off);\r
\r
cur_ptr->free_data_ptr = (UINT64) 0;\r
UINTN wait;\r
UINT8 tmp;\r
\r
- if ((AdapterInfo->DeviceID == D102_DEVICE_ID) || \r
+ if ((AdapterInfo->DeviceID == D102_DEVICE_ID) ||\r
(AdapterInfo->RevID >= D102_REVID)) {\r
\r
wait = 500;\r
\r
Returns:\r
None\r
- \r
+\r
--*/\r
{\r
UINT8 tmp;\r
\r
- if ((AdapterInfo->DeviceID == D102_DEVICE_ID) || \r
+ if ((AdapterInfo->DeviceID == D102_DEVICE_ID) ||\r
(AdapterInfo->RevID >= D102_REVID)) {\r
\r
tmp = InByte (AdapterInfo, AdapterInfo->ioaddr + SCBGenCtrl2);\r
db.Data[0x08] = AdapterInfo->statistics->rx_crc_errs +\r
AdapterInfo->statistics->rx_align_errs;\r
\r
- db.Data[0x04] = db.Data[0x02] + \r
+ db.Data[0x04] = db.Data[0x02] +\r
db.Data[0x08] +\r
AdapterInfo->statistics->rx_resource_errs +\r
AdapterInfo->statistics->rx_overrun_errs;\r
\r
Routine Description:\r
This routine will write a value to the specified MII register\r
- of an external MDI compliant device (e.g. PHY 100). The command will \r
+ of an external MDI compliant device (e.g. PHY 100). The command will\r
execute in polled mode.\r
- \r
+\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
RegAddress - The MII register that we are writing to\r
DataValue - The value that we are writing to the MII register.\r
\r
Returns:\r
- nothing \r
+ nothing\r
--*/\r
{\r
UINT32 WriteCommand;\r
\r
WriteCommand = ((UINT32) DataValue) |\r
- ((UINT32)(RegAddress << 16)) | \r
+ ((UINT32)(RegAddress << 16)) |\r
((UINT32)(PhyAddress << 21)) |\r
((UINT32)(MDI_WRITE << 26));\r
\r
\r
//\r
// poll for the mdi write to complete\r
- while ((InLong (AdapterInfo, AdapterInfo->ioaddr + SCBCtrlMDI) & \r
+ while ((InLong (AdapterInfo, AdapterInfo->ioaddr + SCBCtrlMDI) &\r
MDI_PHY_READY) == 0){\r
DelayIt (AdapterInfo, 20);\r
}\r
This routine will read a value from the specified MII register\r
of an external MDI compliant device (e.g. PHY 100), and return\r
it to the calling routine. The command will execute in polled mode.\r
- \r
+\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
RegAddress - The MII register that we are reading from\r
DataValue - pointer to the value that we read from the MII register.\r
\r
Returns:\r
- \r
+\r
--*/\r
{\r
UINT32 ReadCommand;\r
\r
Routine Description:\r
This routine will reset the PHY that the adapter is currently\r
- configured to use. \r
- \r
+ configured to use.\r
+\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
\r
Returns:\r
- \r
+\r
--*/\r
{\r
UINT16 MdiControlReg;\r
\r
- MdiControlReg = (MDI_CR_AUTO_SELECT | \r
- MDI_CR_RESTART_AUTO_NEG | \r
+ MdiControlReg = (MDI_CR_AUTO_SELECT |\r
+ MDI_CR_RESTART_AUTO_NEG |\r
MDI_CR_RESET);\r
\r
//\r
this range.\r
6. Driver ignores FORCEFDX and SPEED overrides if a 503 interface\r
is detected.\r
- \r
+\r
Arguments:\r
AdapterInfo - pointer to the structure that contains the NIC's context.\r
\r
Returns:\r
TRUE - If a Phy was detected, and configured correctly.\r
- FALSE - If a valid phy could not be detected and configured. \r
- \r
+ FALSE - If a valid phy could not be detected and configured.\r
+\r
--*/\r
{\r
UINT16 *eedata;\r
&MdiStatusReg\r
);\r
\r
- if (!((MdiControlReg == 0xffff) || \r
+ if (!((MdiControlReg == 0xffff) ||\r
((MdiStatusReg == 0) && (MdiControlReg == 0)))) {\r
\r
//\r
\r
Returns:\r
TRUE - If the phy could be configured correctly\r
- FALSE - If the phy couldn't be configured correctly, because an \r
+ FALSE - If the phy couldn't be configured correctly, because an\r
unsupported over-ride option was used\r
- \r
+\r
--*/\r
{\r
UINT16 MdiControlReg;\r
// value accordingly\r
//\r
AdapterInfo->LinkSpeed = AdapterInfo->LinkSpeedReq;\r
- AdapterInfo->Duplex = (UINT8) ((AdapterInfo->DuplexReq & PXE_FORCE_FULL_DUPLEX) ? \r
+ AdapterInfo->Duplex = (UINT8) ((AdapterInfo->DuplexReq & PXE_FORCE_FULL_DUPLEX) ?\r
FULL_DUPLEX : HALF_DUPLEX);\r
\r
//\r
// advertised ablilities, and then assuming that the highest common\r
// denominator was chosed by NWAY.\r
//\r
- if ((MdiLinkPartnerAdReg & NWAY_LP_ABILITY) && \r
+ if ((MdiLinkPartnerAdReg & NWAY_LP_ABILITY) &&\r
(MdiStatusReg & MDI_SR_AUTO_NEG_COMPLETE)) {\r
\r
//\r