Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141731
b: refs/heads/master
c: dcf5371
h: refs/heads/master
i:
  141729: 2ba4734
  141727: 39ab0fd
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Apr 3, 2009
1 parent 566e330 commit 162bce9
Show file tree
Hide file tree
Showing 28 changed files with 121 additions and 124 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d539cfb03ad31e4ba5d6b18ea65954da9a785fe6
refs/heads/master: dcf5371cdea03b09b6cc506d2cd538138bd643a8
4 changes: 2 additions & 2 deletions trunk/drivers/staging/epl/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,13 +634,13 @@
extern "C" {
#endif

void DumpData(char *szStr_p, u8 *pbData_p, WORD wSize_p);
void DumpData(char *szStr_p, u8 *pbData_p, u16 wSize_p);

#ifdef __cplusplus
} // von extern "C"
#endif
#define DEBUG_DUMP_DATA(lvl,str,ptr,siz) if ((DEBUG_GLB_LVL() & (lvl))==(lvl)) \
DumpData (str, (u8 *)(ptr), (WORD)(siz));
DumpData (str, (u8 *)(ptr), (u16)(siz));
#else

#define DEBUG_DUMP_DATA(lvl,str,ptr,siz)
Expand Down
20 changes: 10 additions & 10 deletions trunk/drivers/staging/epl/Edrv8139.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ tEplKernel EdrvDefineRxMacAddrEntry(u8 * pbMacAddr_p)
dwData = ether_crc(6, pbMacAddr_p);
printk("EdrvDefineRxMacAddrEntry('%02X:%02X:%02X:%02X:%02X:%02X') hash = %u / %u ether_crc = 0x%08lX\n",
(WORD) pbMacAddr_p[0], (WORD) pbMacAddr_p[1], (WORD) pbMacAddr_p[2],
(WORD) pbMacAddr_p[3], (WORD) pbMacAddr_p[4], (WORD) pbMacAddr_p[5],
(WORD) bHash, (WORD) (dwData >> 26), dwData);
(u16) pbMacAddr_p[0], (u16) pbMacAddr_p[1], (u16) pbMacAddr_p[2],
(u16) pbMacAddr_p[3], (u16) pbMacAddr_p[4], (u16) pbMacAddr_p[5],
(u16) bHash, (u16) (dwData >> 26), dwData);
*/
if (bHash > 31) {
dwData = EDRV_REGDW_READ(EDRV_REGDW_MAR4);
Expand Down Expand Up @@ -624,7 +624,7 @@ tEplKernel EdrvSendTxMsg(tEdrvTxBuffer * pBuffer_p)
printk("%s InvOp TSD%u = 0x%08X", __func__,
EdrvInstance_l.m_uiCurTxDesc, dwTemp);
printk(" Cmd = 0x%02X\n",
(WORD) EDRV_REGB_READ(EDRV_REGB_COMMAND));
(u16) EDRV_REGB_READ(EDRV_REGB_COMMAND));
goto Exit;
}
// save pointer to buffer structure for TxHandler
Expand Down Expand Up @@ -761,10 +761,10 @@ static int TgtEthIsr(int nIrqNum_p, void *ppDevInstData_p,
// EdrvInterruptHandler();
tEdrvRxBuffer RxBuffer;
tEdrvTxBuffer *pTxBuffer;
WORD wStatus;
u16 wStatus;
u32 dwTxStatus;
u32 dwRxStatus;
WORD wCurRx;
u16 wCurRx;
u8 *pbRxBuf;
unsigned int uiLength;
int iHandled = IRQ_HANDLED;
Expand Down Expand Up @@ -898,7 +898,7 @@ static int TgtEthIsr(int nIrqNum_p, void *ppDevInstData_p,

// calulate new offset (u32 aligned)
wCurRx =
(WORD) ((wCurRx + uiLength + sizeof(dwRxStatus) +
(u16) ((wCurRx + uiLength + sizeof(dwRxStatus) +
3) & ~0x3);
EDRV_TRACE_CAPR(wCurRx - 0x10);
EDRV_REGW_WRITE(EDRV_REGW_CAPR, wCurRx - 0x10);
Expand Down Expand Up @@ -1087,7 +1087,7 @@ static int EdrvInitOne(struct pci_dev *pPciDev, const struct pci_device_id *pId)
dwTemp = EDRV_REGDW_READ(EDRV_REGDW_TSAD3);

printk(" Command = 0x%02X\n",
(WORD) EDRV_REGB_READ(EDRV_REGB_COMMAND));
(u16) EDRV_REGB_READ(EDRV_REGB_COMMAND));

// set pointer for receive buffer in controller
printk("%s set pointer to Rx buffer\n", __func__);
Expand All @@ -1098,7 +1098,7 @@ static int EdrvInitOne(struct pci_dev *pPciDev, const struct pci_device_id *pId)
EDRV_REGB_WRITE(EDRV_REGB_COMMAND,
(EDRV_REGB_COMMAND_RE | EDRV_REGB_COMMAND_TE));
printk(" Command = 0x%02X\n",
(WORD) EDRV_REGB_READ(EDRV_REGB_COMMAND));
(u16) EDRV_REGB_READ(EDRV_REGB_COMMAND));

// clear missed packet counter to enable Rx/Tx process
EDRV_REGDW_WRITE(EDRV_REGDW_MPC, 0);
Expand All @@ -1123,7 +1123,7 @@ static int EdrvInitOne(struct pci_dev *pPciDev, const struct pci_device_id *pId)
// enable transmitter and receiver
printk("%s enable Tx and Rx", __func__);
EDRV_REGB_WRITE(EDRV_REGB_COMMAND, (EDRV_REGB_COMMAND_RE | EDRV_REGB_COMMAND_TE));
printk(" Command = 0x%02X\n", (WORD) EDRV_REGB_READ(EDRV_REGB_COMMAND));
printk(" Command = 0x%02X\n", (u16) EDRV_REGB_READ(EDRV_REGB_COMMAND));
*/
// disable early interrupts
EDRV_REGW_WRITE(EDRV_REGW_MULINT, 0);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/epl/EdrvFec.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@

// Rx and Tx buffer descriptor format
typedef struct {
WORD m_wStatus; // control / status --- used by edrv, do not change in application
WORD m_wLength; // transfer length
u16 m_wStatus; // control / status --- used by edrv, do not change in application
u16 m_wLength; // transfer length
u8 *m_pbData; // buffer address
} tBufferDescr;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/epl/EdrvSim.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@
//---------------------------------------------------------------------------

void EdrvRxInterruptHandler(u8 bBufferInFrame_p, u8 * pbEthernetData_p,
WORD wDataLen_p);
u16 wDataLen_p);

#endif // #ifndef _EDRVSIM_H_
4 changes: 2 additions & 2 deletions trunk/drivers/staging/epl/Epl.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ typedef struct {
unsigned int m_uiNodeId;
tEplNmtState m_NmtState;
tEplNmtNodeEvent m_NodeEvent;
WORD m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError
u16 m_wErrorCode; // EPL error code if m_NodeEvent == kEplNmtNodeEventError
BOOL m_fMandatory;

} tEplApiEventNode;

typedef struct {
tEplNmtState m_NmtState; // local NMT state
tEplNmtBootEvent m_BootEvent;
WORD m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError
u16 m_wErrorCode; // EPL error code if m_BootEvent == kEplNmtBootEventError

} tEplApiEventBoot;

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/epl/EplAmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ extern "C" {
#define AmiSetByteToBe(pAddr_p, bByteVal_p) {*(u8 *)(pAddr_p) = (bByteVal_p);}
#define AmiSetByteToLe(pAddr_p, bByteVal_p) {*(u8 *)(pAddr_p) = (bByteVal_p);}

void AmiSetWordToBe(void *pAddr_p, WORD wWordVal_p);
void AmiSetWordToBe(void *pAddr_p, u16 wWordVal_p);
void AmiSetDwordToBe(void *pAddr_p, u32 dwDwordVal_p);
void AmiSetWordToLe(void *pAddr_p, WORD wWordVal_p);
void AmiSetWordToLe(void *pAddr_p, u16 wWordVal_p);
void AmiSetDwordToLe(void *pAddr_p, u32 dwDwordVal_p);

//---------------------------------------------------------------------------
Expand All @@ -126,9 +126,9 @@ void AmiSetDwordToLe(void *pAddr_p, u32 dwDwordVal_p);
#define AmiGetByteFromBe(pAddr_p) (*(u8 *)(pAddr_p))
#define AmiGetByteFromLe(pAddr_p) (*(u8 *)(pAddr_p))

WORD AmiGetWordFromBe(void *pAddr_p);
u16 AmiGetWordFromBe(void *pAddr_p);
u32 AmiGetDwordFromBe(void *pAddr_p);
WORD AmiGetWordFromLe(void *pAddr_p);
u16 AmiGetWordFromLe(void *pAddr_p);
u32 AmiGetDwordFromLe(void *pAddr_p);

//---------------------------------------------------------------------------
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/staging/epl/EplApiGeneric.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ static tEplKernel EplApiCbSdoCon(tEplSdoComFinished *pSdoComFinished_p);
static tEplKernel EplApiCbNodeEvent(unsigned int uiNodeId_p,
tEplNmtNodeEvent NodeEvent_p,
tEplNmtState NmtState_p,
WORD wErrorCode_p, BOOL fMandatory_p);
u16 wErrorCode_p, BOOL fMandatory_p);

static tEplKernel EplApiCbBootEvent(tEplNmtBootEvent BootEvent_p,
tEplNmtState NmtState_p,
WORD wErrorCode_p);
u16 wErrorCode_p);
#endif

#if (((EPL_MODULE_INTEGRATION) & (EPL_MODULE_LEDU)) != 0)
Expand Down Expand Up @@ -1412,7 +1412,7 @@ static tEplKernel EplApiUpdateDllConfig(BOOL fUpdateIdentity_p)
tEplDllConfigParam DllConfigParam;
tEplDllIdentParam DllIdentParam;
tEplObdSize ObdSize;
WORD wTemp;
u16 wTemp;
u8 bTemp;

// configure Dll
Expand Down Expand Up @@ -1632,7 +1632,7 @@ static tEplKernel EplApiUpdateDllConfig(BOOL fUpdateIdentity_p)
static tEplKernel EplApiUpdateObd(void)
{
tEplKernel Ret = kEplSuccessful;
WORD wTemp;
u16 wTemp;
u8 bTemp;

// set node id in OD
Expand Down Expand Up @@ -1675,14 +1675,14 @@ static tEplKernel EplApiUpdateObd(void)
} */
}

wTemp = (WORD) EplApiInstance_g.m_InitParam.m_uiIsochrTxMaxPayload;
wTemp = (u16) EplApiInstance_g.m_InitParam.m_uiIsochrTxMaxPayload;
Ret = EplObdWriteEntry(0x1F98, 1, &wTemp, 2);
/* if(Ret != kEplSuccessful)
{
goto Exit;
}*/

wTemp = (WORD) EplApiInstance_g.m_InitParam.m_uiIsochrRxMaxPayload;
wTemp = (u16) EplApiInstance_g.m_InitParam.m_uiIsochrRxMaxPayload;
Ret = EplObdWriteEntry(0x1F98, 2, &wTemp, 2);
/* if(Ret != kEplSuccessful)
{
Expand All @@ -1701,7 +1701,7 @@ static tEplKernel EplApiUpdateObd(void)
if (EplApiInstance_g.m_InitParam.m_uiPreqActPayloadLimit <=
EPL_C_DLL_ISOCHR_MAX_PAYL) {
wTemp =
(WORD) EplApiInstance_g.m_InitParam.m_uiPreqActPayloadLimit;
(u16) EplApiInstance_g.m_InitParam.m_uiPreqActPayloadLimit;
Ret = EplObdWriteEntry(0x1F98, 4, &wTemp, 2);
/* if(Ret != kEplSuccessful)
{
Expand All @@ -1712,7 +1712,7 @@ static tEplKernel EplApiUpdateObd(void)
if (EplApiInstance_g.m_InitParam.m_uiPresActPayloadLimit <=
EPL_C_DLL_ISOCHR_MAX_PAYL) {
wTemp =
(WORD) EplApiInstance_g.m_InitParam.m_uiPresActPayloadLimit;
(u16) EplApiInstance_g.m_InitParam.m_uiPresActPayloadLimit;
Ret = EplObdWriteEntry(0x1F98, 5, &wTemp, 2);
/* if(Ret != kEplSuccessful)
{
Expand Down Expand Up @@ -1740,7 +1740,7 @@ static tEplKernel EplApiUpdateObd(void)

if (EplApiInstance_g.m_InitParam.m_uiAsyncMtu <=
EPL_C_DLL_MAX_ASYNC_MTU) {
wTemp = (WORD) EplApiInstance_g.m_InitParam.m_uiAsyncMtu;
wTemp = (u16) EplApiInstance_g.m_InitParam.m_uiAsyncMtu;
Ret = EplObdWriteEntry(0x1F98, 8, &wTemp, 2);
/* if(Ret != kEplSuccessful)
{
Expand All @@ -1749,7 +1749,7 @@ static tEplKernel EplApiUpdateObd(void)
}

if (EplApiInstance_g.m_InitParam.m_uiPrescaler <= 1000) {
wTemp = (WORD) EplApiInstance_g.m_InitParam.m_uiPrescaler;
wTemp = (u16) EplApiInstance_g.m_InitParam.m_uiPrescaler;
Ret = EplObdWriteEntry(0x1F98, 9, &wTemp, 2);
// ignore return code
Ret = kEplSuccessful;
Expand Down Expand Up @@ -1944,7 +1944,7 @@ static tEplKernel EplApiCbSdoCon(tEplSdoComFinished *pSdoComFinished_p)
static tEplKernel EplApiCbNodeEvent(unsigned int uiNodeId_p,
tEplNmtNodeEvent NodeEvent_p,
tEplNmtState NmtState_p,
WORD wErrorCode_p, BOOL fMandatory_p)
u16 wErrorCode_p, BOOL fMandatory_p)
{
tEplKernel Ret;
tEplApiEventArg EventArg;
Expand Down Expand Up @@ -1987,7 +1987,7 @@ static tEplKernel EplApiCbNodeEvent(unsigned int uiNodeId_p,

static tEplKernel EplApiCbBootEvent(tEplNmtBootEvent BootEvent_p,
tEplNmtState NmtState_p,
WORD wErrorCode_p)
u16 wErrorCode_p)
{
tEplKernel Ret;
tEplApiEventArg EventArg;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/epl/EplDll.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ typedef struct {

typedef struct {
unsigned int m_uiNodeId;
WORD m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16
WORD m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16
u16 m_wPreqPayloadLimit; // object 0x1F8B: NMT_MNPReqPayloadLimitList_AU16
u16 m_wPresPayloadLimit; // object 0x1F8D: NMT_PResPayloadLimitList_AU16
u32 m_dwPresTimeout; // object 0x1F92: NMT_MNCNPResTimeout_AU32

} tEplDllNodeInfo;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/epl/EplDllk.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,18 +720,18 @@ tEplKernel EplDllkProcess(tEplEvent * pEvent_p)
// MTU
AmiSetWordToLe(&pTxFrame->m_Data.m_Asnd.m_Payload.
m_IdentResponse.m_le_wMtu,
(WORD) EplDllkInstance_g.
(u16) EplDllkInstance_g.
m_DllConfigParam.m_uiAsyncMtu);
// PollInSize
AmiSetWordToLe(&pTxFrame->m_Data.m_Asnd.m_Payload.
m_IdentResponse.m_le_wPollInSize,
(WORD) EplDllkInstance_g.
(u16) EplDllkInstance_g.
m_DllConfigParam.
m_uiPreqActPayloadLimit);
// PollOutSize
AmiSetWordToLe(&pTxFrame->m_Data.m_Asnd.m_Payload.
m_IdentResponse.m_le_wPollOutSize,
(WORD) EplDllkInstance_g.
(u16) EplDllkInstance_g.
m_DllConfigParam.
m_uiPresActPayloadLimit);
// ResponseTime / PresMaxLatency
Expand Down Expand Up @@ -935,7 +935,7 @@ tEplKernel EplDllkProcess(tEplEvent * pEvent_p)
// EplDllkInstance_g.m_aNodeInfo[uiIndex].m_uiNodeId = uiIndex + 1;
EplDllkInstance_g.m_aNodeInfo[uiIndex].
m_wPresPayloadLimit =
(WORD) EplDllkInstance_g.
(u16) EplDllkInstance_g.
m_DllConfigParam.
m_uiIsochrRxMaxPayload;
}
Expand Down Expand Up @@ -3484,7 +3484,7 @@ static tEplKernel EplDllkCheckFrame(tEplFrame * pFrame_p,
unsigned int uiFrameSize_p)
{
tEplMsgType MsgType;
WORD wEtherType;
u16 wEtherType;

// check frame
if (pFrame_p != NULL) {
Expand Down
22 changes: 11 additions & 11 deletions trunk/drivers/staging/epl/EplFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ typedef struct {
// Offset 21
u8 m_le_bRes2; // reserved
// Offset 22
WORD m_le_wSize;
u16 m_le_wSize;
// Offset 24
u8 m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16 */ ];

Expand All @@ -164,7 +164,7 @@ typedef struct {
// Offset 21
u8 m_le_bRes2; // reserved
// Offset 22
WORD m_le_wSize;
u16 m_le_wSize;
// Offset 24
u8 m_le_abPayload[256 /*D_NMT_IsochrRxMaxPayload_U16
/ D_NMT_IsochrTxMaxPayload_U16 */ ];
Expand All @@ -188,8 +188,8 @@ typedef struct {
} PACK_STRUCT tEplSoaFrame;

typedef struct {
WORD m_wEntryType;
WORD m_wErrorCode;
u16 m_wEntryType;
u16 m_wErrorCode;
tEplNetTime m_TimeStamp;
u8 m_abAddInfo[8];

Expand All @@ -215,11 +215,11 @@ typedef struct {
u8 m_le_bEplProfileVersion;
u8 m_le_bRes1;
u32 m_le_dwFeatureFlags; // NMT_FeatureFlags_U32
WORD m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU
WORD m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16
WORD m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16
u16 m_le_wMtu; // NMT_CycleTiming_REC.AsyncMTU_U16: C_IP_MIN_MTU - C_IP_MAX_MTU
u16 m_le_wPollInSize; // NMT_CycleTiming_REC.PReqActPayload_U16
u16 m_le_wPollOutSize; // NMT_CycleTiming_REC.PResActPayload_U16
u32 m_le_dwResponseTime; // NMT_CycleTiming_REC.PResMaxLatency_U32
WORD m_le_wRes2;
u16 m_le_wRes2;
u32 m_le_dwDeviceType; // NMT_DeviceType_U32
u32 m_le_dwVendorId; // NMT_IdentityObject_REC.VendorId_U32
u32 m_le_dwProductCode; // NMT_IdentityObject_REC.ProductCode_U32
Expand Down Expand Up @@ -251,8 +251,8 @@ typedef struct {
u8 m_le_bTransactionId;
u8 m_le_bFlags;
u8 m_le_bCommandId;
WORD m_le_wSegmentSize;
WORD m_le_wReserved;
u16 m_le_wSegmentSize;
u16 m_le_wReserved;
u8 m_le_abCommandData[8]; // just reserve a minimum number of bytes as a placeholder

} PACK_STRUCT tEplAsySdoCom;
Expand Down Expand Up @@ -310,7 +310,7 @@ typedef struct {
// Offset 6
u8 m_be_abSrcMac[6]; // MAC address of the transmitting node
// Offset 12
WORD m_be_wEtherType; // Ethernet message type (big endian)
u16 m_be_wEtherType; // Ethernet message type (big endian)
// Offset 14
u8 m_le_bMessageType; // EPL message type
// Offset 15
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/epl/EplNmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ typedef struct {
typedef struct {
unsigned int m_uiNodeId; // NodeId
tEplNmtState m_NmtState; // NMT state (remember distinguish between MN / CN)
WORD m_wErrorCode; // EPL error code in case of NMT state NotActive
u16 m_wErrorCode; // EPL error code in case of NMT state NotActive

} tEplHeartbeatEvent;

Expand Down
Loading

0 comments on commit 162bce9

Please sign in to comment.