aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/smsc/smc91x.c
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2016-10-17 21:45:30 +0200
committerDavid S. Miller <davem@davemloft.net>2016-10-18 14:14:21 -0400
commitd09d747ae4c25a89aa04c0881ea52e90a09bedfd (patch)
treeaa2152bf6253451a3abdbe40eda23024e815899d /drivers/net/ethernet/smsc/smc91x.c
parentARM: pxa: enhance smc91x platform data (diff)
downloadlinux-dev-d09d747ae4c25a89aa04c0881ea52e90a09bedfd.tar.xz
linux-dev-d09d747ae4c25a89aa04c0881ea52e90a09bedfd.zip
net: smc91x: isolate u16 writes alignment workaround
Writes to u16 has a special handling on 3 PXA platforms, where the hardware wiring forces these writes to be u32 aligned. This patch isolates this handling for PXA platforms as before, but enables this "workaround" to be set up dynamically, which will be the case in device-tree build types. This patch was tested on 2 PXA platforms : mainstone, which relies on the workaround, and lubbock, which doesn't. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/smsc/smc91x.c')
-rw-r--r--drivers/net/ethernet/smsc/smc91x.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index 9b4780f87863..705d99b2d947 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -602,7 +602,8 @@ static void smc_hardware_send_pkt(unsigned long data)
SMC_PUSH_DATA(lp, buf, len & ~1);
/* Send final ctl word with the last byte if there is one */
- SMC_outw(((len & 1) ? (0x2000 | buf[len-1]) : 0), ioaddr, DATA_REG(lp));
+ SMC_outw(lp, ((len & 1) ? (0x2000 | buf[len - 1]) : 0), ioaddr,
+ DATA_REG(lp));
/*
* If THROTTLE_TX_PKTS is set, we stop the queue here. This will