pAC->TxDescrPerRing = TX_RING_SIZE / RxDescrSize;
for (i=0; i<pAC->GIni.GIMacsFound; i++) {
+ TXD **txd_head, **txd_tail, **txd_prev;
+
+ txd_head = &pAC->TxPort[i][0].pTxdRingHead;
+ txd_tail = &pAC->TxPort[i][0].pTxdRingTail;
+ txd_prev = &pAC->TxPort[i][0].pTxdRingPrev;
+
SetupRing(
pAC,
pAC->TxPort[i][0].pTxDescrRing,
pAC->TxPort[i][0].VTxDescrRing,
- (RXD**)&pAC->TxPort[i][0].pTxdRingHead,
- (RXD**)&pAC->TxPort[i][0].pTxdRingTail,
- (RXD**)&pAC->TxPort[i][0].pTxdRingPrev,
+ (RXD**)txd_head,
+ (RXD**)txd_tail,
+ (RXD**)txd_prev,
&pAC->TxPort[i][0].TxdRingFree,
SK_TRUE);
SetupRing(
SK_GEPORT *pPrt; /* GIni Port struct pointer */
int Done;
SK_U32 GpReg; /* General Purpose register value */
+ SK_U32 *pGpReg; /* Pointer to -- " -- */
SK_U16 Isrc; /* Interrupt source register */
SK_U16 IsrcSum; /* Interrupt source register sum */
SK_U16 LpAb; /* Link Partner Ability */
SK_BOOL AutoNeg; /* Is Auto-negotiation used ? */
SK_U8 NextMode; /* Next AutoSensing Mode */
+ pGpReg = &GpReg;
+
pPrt = &pAC->GIni.GP[Port];
if (pPrt->PHWLinkUp) {
if (pPrt->PLinkBroken) {
/* Link was broken */
- XM_IN32(IoC, Port, XM_GP_PORT, &GpReg);
+ XM_IN32(IoC, Port, XM_GP_PORT, pGpReg);
if ((GpReg & XM_GP_INP_ASS) == 0) {
/* The Link is in sync */
* here we usually can check whether the link is in sync and
* auto-negotiation is done.
*/
- XM_IN32(IoC, Port, XM_GP_PORT, &GpReg);
+ XM_IN32(IoC, Port, XM_GP_PORT, pGpReg);
XM_IN16(IoC, Port, XM_ISRC, &Isrc);
IsrcSum |= Isrc;
{
SK_U16 RcReg;
SK_U32 MdReg;
+ SK_U32 *pMdReg = &MdReg;
if (pAC->GIni.GIGenesis) {
- XM_IN32(IoC, Port, XM_MODE, &MdReg);
+ XM_IN32(IoC, Port, XM_MODE, pMdReg);
/* enable or disable promiscuous mode */
if (Enable) {
MdReg |= XM_MD_ENA_PROM;
{
SK_U16 RcReg;
SK_U32 MdReg;
+ SK_U32 *pMdReg = &MdReg;
if (pAC->GIni.GIGenesis) {
- XM_IN32(IoC, Port, XM_MODE, &MdReg);
+ XM_IN32(IoC, Port, XM_MODE, pMdReg);
/* enable or disable hashing */
if (Enable) {
MdReg |= XM_MD_ENA_HASH;
int Port) /* Port Index (MAC_1 + n) */
{
SK_U32 MdReg;
+ SK_U32 *pMdReg = &MdReg;
if (pAC->GIni.GIGenesis) {
- XM_IN32(IoC, Port, XM_MODE, &MdReg);
+ XM_IN32(IoC, Port, XM_MODE, pMdReg);
XM_OUT32(IoC, Port, XM_MODE, MdReg | XM_MD_FTF);
}
int Port) /* Port Index (MAC_1 + n) */
{
SK_U32 MdReg;
+ SK_U32 *pMdReg = &MdReg;
if (pAC->GIni.GIGenesis) {
- XM_IN32(IoC, Port, XM_MODE, &MdReg);
+ XM_IN32(IoC, Port, XM_MODE, pMdReg);
XM_OUT32(IoC, Port, XM_MODE, MdReg | XM_MD_FRF);
}
{
SK_GEPORT *pPrt;
SK_U32 DWord;
+ SK_U32 *pDWord = &DWord;
SK_U16 Word;
pPrt = &pAC->GIni.GP[Port];
XM_OUT16(IoC, Port, XM_MMU_CMD, Word);
- XM_IN32(IoC, Port, XM_MODE, &DWord);
+ XM_IN32(IoC, Port, XM_MODE, pDWord);
if (pPrt->PFlowCtrlStatus == SK_FLOW_STAT_SYMMETRIC ||
pPrt->PFlowCtrlStatus == SK_FLOW_STAT_LOC_SEND) {
{
SK_U64 Status; /* Overflow status */
SK_U32 RegVal;
+ SK_U32 *pRegVal = &RegVal;
Status = 0;
if ((IStatus & XM_IS_RXC_OV) != 0) {
- XM_IN32(IoC, Port, XM_RX_CNT_EV, &RegVal);
+ XM_IN32(IoC, Port, XM_RX_CNT_EV, pRegVal);
Status |= (SK_U64)RegVal << 32;
}
if ((IStatus & XM_IS_TXC_OV) != 0) {
- XM_IN32(IoC, Port, XM_TX_CNT_EV, &RegVal);
+ XM_IN32(IoC, Port, XM_TX_CNT_EV, pRegVal);
Status |= (SK_U64)RegVal;
}