Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342074
b: refs/heads/master
c: 2925f6c
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Leach authored and David S. Miller committed Dec 11, 2012
1 parent ee33c85 commit e8e9fcc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 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: a71258d79e3d05632e90c9f7db5ccf929d276529
refs/heads/master: 2925f6c0c7af32720dcbadc586463aeceb6baa22
16 changes: 8 additions & 8 deletions trunk/drivers/net/ethernet/smsc/smc911x.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ static inline void SMC_insl(struct smc911x_local *lp, int reg,
void __iomem *ioaddr = lp->base + reg;

if (lp->cfg.flags & SMC911X_USE_32BIT) {
readsl(ioaddr, addr, count);
ioread32_rep(ioaddr, addr, count);
return;
}

if (lp->cfg.flags & SMC911X_USE_16BIT) {
readsw(ioaddr, addr, count * 2);
ioread16_rep(ioaddr, addr, count * 2);
return;
}

Expand All @@ -177,12 +177,12 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
void __iomem *ioaddr = lp->base + reg;

if (lp->cfg.flags & SMC911X_USE_32BIT) {
writesl(ioaddr, addr, count);
iowrite32_rep(ioaddr, addr, count);
return;
}

if (lp->cfg.flags & SMC911X_USE_16BIT) {
writesw(ioaddr, addr, count * 2);
iowrite16_rep(ioaddr, addr, count * 2);
return;
}

Expand All @@ -196,14 +196,14 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg,
writew(v & 0xFFFF, (lp)->base + (r)); \
writew(v >> 16, (lp)->base + (r) + 2); \
} while (0)
#define SMC_insl(lp, r, p, l) readsw((short*)((lp)->base + (r)), p, l*2)
#define SMC_outsl(lp, r, p, l) writesw((short*)((lp)->base + (r)), p, l*2)
#define SMC_insl(lp, r, p, l) ioread16_rep((short*)((lp)->base + (r)), p, l*2)
#define SMC_outsl(lp, r, p, l) iowrite16_rep((short*)((lp)->base + (r)), p, l*2)

#elif SMC_USE_32BIT
#define SMC_inl(lp, r) readl((lp)->base + (r))
#define SMC_outl(v, lp, r) writel(v, (lp)->base + (r))
#define SMC_insl(lp, r, p, l) readsl((int*)((lp)->base + (r)), p, l)
#define SMC_outsl(lp, r, p, l) writesl((int*)((lp)->base + (r)), p, l)
#define SMC_insl(lp, r, p, l) ioread32_rep((int*)((lp)->base + (r)), p, l)
#define SMC_outsl(lp, r, p, l) iowrite32_rep((int*)((lp)->base + (r)), p, l)

#endif /* SMC_USE_16BIT */
#endif /* SMC_DYNAMIC_BUS_CONFIG */
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ smsc911x_tx_writefifo(struct smsc911x_data *pdata, unsigned int *buf,
}

if (pdata->config.flags & SMSC911X_USE_32BIT) {
writesl(pdata->ioaddr + TX_DATA_FIFO, buf, wordcount);
iowrite32_rep(pdata->ioaddr + TX_DATA_FIFO, buf, wordcount);
goto out;
}

Expand Down Expand Up @@ -285,7 +285,7 @@ smsc911x_tx_writefifo_shift(struct smsc911x_data *pdata, unsigned int *buf,
}

if (pdata->config.flags & SMSC911X_USE_32BIT) {
writesl(pdata->ioaddr + __smsc_shift(pdata,
iowrite32_rep(pdata->ioaddr + __smsc_shift(pdata,
TX_DATA_FIFO), buf, wordcount);
goto out;
}
Expand Down Expand Up @@ -319,7 +319,7 @@ smsc911x_rx_readfifo(struct smsc911x_data *pdata, unsigned int *buf,
}

if (pdata->config.flags & SMSC911X_USE_32BIT) {
readsl(pdata->ioaddr + RX_DATA_FIFO, buf, wordcount);
ioread32_rep(pdata->ioaddr + RX_DATA_FIFO, buf, wordcount);
goto out;
}

Expand Down Expand Up @@ -351,7 +351,7 @@ smsc911x_rx_readfifo_shift(struct smsc911x_data *pdata, unsigned int *buf,
}

if (pdata->config.flags & SMSC911X_USE_32BIT) {
readsl(pdata->ioaddr + __smsc_shift(pdata,
ioread32_rep(pdata->ioaddr + __smsc_shift(pdata,
RX_DATA_FIFO), buf, wordcount);
goto out;
}
Expand Down

0 comments on commit e8e9fcc

Please sign in to comment.