linux/drivers/net/ethernet
Linus Walleij b268daffdc net: smc91: fix crash regression on the versatile
After commit e9e4ea74f0
"net: smc91x: dont't use SMC_outw for fixing up halfword-aligned data"
The Versatile SMSC LAN91C111 is crashing like this:

------------[ cut here ]------------
kernel BUG at /home/linus/linux/drivers/net/ethernet/smsc/smc91x.c:599!
Internal error: Oops - BUG: 0 [#1] ARM
Modules linked in:
CPU: 0 PID: 43 Comm: udhcpc Not tainted 3.13.0-rc1+ #24
task: c6ccfaa0 ti: c6cd0000 task.ti: c6cd0000
PC is at smc_hardware_send_pkt+0x198/0x22c
LR is at smc_hardware_send_pkt+0x24/0x22c
pc : [<c01be324>]    lr : [<c01be1b0>]    psr: 20000013
sp : c6cd1d08  ip : 00000001  fp : 00000000
r10: c02adb08  r9 : 00000000  r8 : c6ced802
r7 : c786fba0  r6 : 00000146  r5 : c8800000  r4 : c78d6000
r3 : 0000000f  r2 : 00000146  r1 : 00000000  r0 : 00000031
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: 06cf4000  DAC: 00000015
Process udhcpc (pid: 43, stack limit = 0xc6cd01c0)
Stack: (0xc6cd1d08 to 0xc6cd2000)
1d00:                   00000010 c8800000 c78d6000 c786fba0 c78d6000 c01be868
1d20: c01be7a4 00004000 00000000 c786fba0 c6c12b80 c0208554 000004d0 c780fc60
1d40: 00000220 c01fb734 00000000 00000000 00000000 c6c9a440 c6c12b80 c78d6000
1d60: c786fba0 c6c9a440 00000000 c021d1d8 00000000 00000000 c6c12b80 c78d6000
1d80: c786fba0 00000001 c6c9a440 c02087f8 c6c9a4a0 00080008 00000000 00000000
1da0: c78d6000 c786fba0 c78d6000 00000138 00000000 00000000 00000000 00000000
1dc0: 00000000 c027ba74 00000138 00000138 00000001 00000010 c6cedc00 00000000
1de0: 00000008 c7404400 c6cd1eec c6cd1f14 c067a73c c065c0b8 00000000 c067a740
1e00: 01ffffff 002040d0 00000000 00000000 00000000 00000000 00000000 ffffffff
1e20: 43004400 00110022 c6cdef20 c027ae8c c6ccfaa0 be82d65c 00000014 be82d3cc
1e40: 00000000 00000000 00000000 c01f2870 00000000 00000000 00000000 c6cd1e88
1e60: c6ccfaa0 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1e80: 00000000 00000000 00000031 c7802310 c7802300 00000138 c7404400 c0771da0
1ea0: 00000000 c6cd1eec c7800340 00000138 be82d65c 00000014 be82d3cc c6cd1f08
1ec0: 00000014 00000000 c7404400 c7404400 00000138 c01f4628 c78d6000 00000000
1ee0: 00000000 be82d3cc 00000138 c6cd1f08 00000014 c6cd1ee4 00000001 00000000
1f00: 00000000 00000000 00080011 00000002 06000000 ffffffff 0000ffff 00000002
1f20: 06000000 ffffffff 0000ffff c00928c8 c065c520 c6cd1f58 00000003 c009299c
1f40: 00000003 c065c520 c7404400 00000000 c7404400 c01f2218 c78106b0 c7441cb0
1f60: 00000000 00000006 c06799fc 00000000 00000000 00000006 00000000 c01f3ee0
1f80: 00000000 00000000 be82d678 be82d65c 00000014 00000001 00000122 c00139c8
1fa0: c6cd0000 c0013840 be82d65c 00000014 00000006 be82d3cc 00000138 00000000
1fc0: be82d65c 00000014 00000001 00000122 00000000 00000000 00018cb1 00000000
1fe0: 00003801 be82d3a8 0003a0c7 b6e9af08 60000010 00000006 00000000 00000000
[<c01be324>] (smc_hardware_send_pkt+0x198/0x22c) from [<c01be868>] (smc_hard_start_xmit+0xc4/0x1e8)
[<c01be868>] (smc_hard_start_xmit+0xc4/0x1e8) from [<c0208554>] (dev_hard_start_xmit+0x460/0x4cc)
[<c0208554>] (dev_hard_start_xmit+0x460/0x4cc) from [<c021d1d8>] (sch_direct_xmit+0x94/0x18c)
[<c021d1d8>] (sch_direct_xmit+0x94/0x18c) from [<c02087f8>] (dev_queue_xmit+0x238/0x42c)
[<c02087f8>] (dev_queue_xmit+0x238/0x42c) from [<c027ba74>] (packet_sendmsg+0xbe8/0xd28)
[<c027ba74>] (packet_sendmsg+0xbe8/0xd28) from [<c01f2870>] (sock_sendmsg+0x84/0xa8)
[<c01f2870>] (sock_sendmsg+0x84/0xa8) from [<c01f4628>] (SyS_sendto+0xb8/0xdc)
[<c01f4628>] (SyS_sendto+0xb8/0xdc) from [<c0013840>] (ret_fast_syscall+0x0/0x2c)
Code: e3130002 1a000001 e3130001 0affffcd (e7f001f2)
---[ end trace 81104fe70e8da7fe ]---
Kernel panic - not syncing: Fatal exception in interrupt

This is because the macro operations in smc91x.h defined
for Versatile are missing SMC_outsw() as used in this
commit.

The Versatile needs and uses the same accessors as the other
platforms in the first if(...) clause, just switch it to using
that and we have one problem less to worry about.

Checkpatch complains about spacing, but I have opted to
follow the style of this .h-file.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-11-29 16:21:37 -05:00
..
3com net: typhoon: remove unnecessary pci_set_drvdata() 2013-10-18 00:03:28 -04:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-11-13 17:40:34 +09:00
adaptec net: starfire: remove unnecessary pci_set_drvdata() 2013-10-18 00:03:28 -04:00
adi adi: Remove extern from function prototypes 2013-09-24 10:09:18 -04:00
aeroflex drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent 2013-08-29 21:55:23 -04:00
allwinner
alteon
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-11-13 17:40:34 +09:00
apple macmace: add missing platform_set_drvdata() in mace_probe() 2013-11-11 14:02:08 -05:00
arc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-11-13 17:40:34 +09:00
atheros alx: Reset phy speed after resume 2013-11-14 17:14:42 -05:00
broadcom tg3: Convert to use hwmon_device_register_with_groups 2013-11-28 18:22:02 -05:00
brocade Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
cadence Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
calxeda net: calxedaxgmac: Fix panic caused by MTU change of active interface 2013-11-07 19:25:53 -05:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-04 13:48:30 -05:00
cirrus net: ep93xx_eth: use dev_get_platdata() 2013-08-30 17:43:35 -04:00
cisco net: enic: remove unnecessary pci_set_drvdata() 2013-10-18 00:03:30 -04:00
davicom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-10-23 16:49:34 -04:00
dec net: tulip: use DEFINE_PCI_DEVICE_TABLE 2013-10-22 02:19:23 -04:00
dlink net: dl2k: remove unnecessary pci_set_drvdata() 2013-10-21 17:21:00 -04:00
emulex be2net: call napi_disable() for all event queues 2013-11-28 18:54:02 -05:00
faraday drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent 2013-08-29 21:55:23 -04:00
freescale net:fec: fix WARNING caused by lack of calls to dma_mapping_error() 2013-11-14 16:37:33 -05:00
fujitsu net: fujitsu: Remove ISA depdendency from Kconfig 2013-10-07 15:52:54 -04:00
hp hp100: replace hardcoded name in /proc/interrupts with interface name 2013-09-27 17:38:32 -04:00
i825xx net:drivers/net: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO 2013-11-07 03:01:59 -05:00
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-11-13 17:40:34 +09:00
icplus net: icplus: remove unnecessary pci_set_drvdata() 2013-10-21 17:21:01 -04:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-19 15:50:47 -08:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-11-19 15:50:47 -08:00
mellanox Main batch of InfiniBand/RDMA changes for 3.13: 2013-11-18 15:36:04 -08:00
micrel net: ksz884x: use DEFINE_PCI_DEVICE_TABLE 2013-10-22 02:19:23 -04:00
microchip
moxa ethernet: moxa: remove duplicate includes 2013-10-21 18:46:45 -04:00
myricom net: myri10ge: remove unnecessary pci_set_drvdata() 2013-10-21 17:21:02 -04:00
natsemi xtsonic: add missing platform_set_drvdata() in xtsonic_probe() 2013-11-11 14:02:08 -05:00
neterion Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-14 16:30:30 +09:00
nuvoton drivers:net: delete premature free_irq 2013-09-04 13:18:19 -04:00
nvidia net: Explicitly initialize u64_stats_sync structures for lockdep 2013-11-06 12:40:25 +01:00
nxp DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent() 2013-10-31 14:48:56 +00:00
octeon Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
oki-semi pch_gbe: Validate hwtstamp_config completely before applying it 2013-11-14 16:22:10 -05:00
packetengines net: packetengines: remove unnecessary pci_set_drvdata() 2013-10-21 17:21:02 -04:00
pasemi net: pasemi: remove unnecessary pci_set_drvdata() 2013-10-22 02:11:51 -04:00
qlogic Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
rdc net: r6040: remove unnecessary pci_set_drvdata() 2013-10-22 02:11:52 -04:00
realtek net: 8139cp: fix a BUG_ON triggered by wrong bytes_compl 2013-11-29 16:18:23 -05:00
renesas sh_eth: check platform data pointer 2013-11-04 15:49:28 -05:00
seeq net: seeq: use dev_get_platdata() 2013-08-30 17:43:37 -04:00
sfc Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
sgi net:drivers/net: Miscellaneous conversions to ETH_ALEN 2013-10-02 17:04:45 -04:00
silan
sis net: sis190: remove unnecessary pci_set_drvdata() 2013-10-22 02:11:52 -04:00
smsc net: smc91: fix crash regression on the versatile 2013-11-29 16:21:37 -05:00
stmicro stmmac: Validate hwtstamp_config completely before applying it 2013-11-14 16:22:10 -05:00
sun net: niu: remove unnecessary pci_set_drvdata() 2013-10-23 16:58:41 -04:00
tehuti net: tehuti: remove unnecessary pci_set_drvdata() 2013-10-23 16:58:41 -04:00
ti net: ethernet: ti/cpsw: do not crash on single-MAC machines during resume 2013-11-15 17:58:19 -05:00
tile Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-14 16:30:30 +09:00
toshiba net: tc35815: remove unnecessary pci_set_drvdata() 2013-10-23 16:58:41 -04:00
tundra net: tsi108: use dev_get_platdata() 2013-08-30 17:43:38 -04:00
via via-velocity: fix netif_receive_skb use in irq disabled section. 2013-11-28 18:43:35 -05:00
wiznet net: w5100: use dev_get_platdata() 2013-08-30 17:43:38 -04:00
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-11-13 17:40:34 +09:00
xircom
xscale ixp4xx_eth: Validate hwtstamp_config completely before applying it 2013-11-14 16:22:10 -05:00
dnet.c
dnet.h
ethoc.c net: ethoc: use dev_get_platdata() 2013-08-30 17:43:35 -04:00
fealnx.c net: fealnx: remove unnecessary pci_set_drvdata() 2013-10-21 17:21:01 -04:00
jme.c net: jme: remove unnecessary pci_set_drvdata() 2013-10-21 17:21:01 -04:00
jme.h jme: Remove unused #define PFX 2013-11-07 02:14:32 -05:00
Kconfig
korina.c net:drivers/net: Miscellaneous conversions to ETH_ALEN 2013-10-02 17:04:45 -04:00
lantiq_etop.c net: lantiq_etop: remove deprecated IRQF_DISABLED 2013-09-15 22:01:05 -04:00
Makefile
netx-eth.c net: netx-eth: remove unnecessary casting 2013-09-04 00:27:27 -04:00
s6gmac.c