linux/drivers/net/ethernet/broadcom/bnx2x
Scott Wood 9b70de6d02 bnx2x: Align RX buffers
The bnx2x driver is not providing proper alignment on the receive buffers it
passes to build_skb(), causing skb_shared_info to be misaligned.
skb_shared_info contains an atomic, and while PPC normally supports
unaligned accesses, it does not support unaligned atomics.

Aligning the size of rx buffers will ensure that page_frag_alloc() returns
aligned addresses.

This can be reproduced on PPC by setting the network MTU to 1450 (or other
non-multiple-of-4) and then generating sufficient inbound network traffic
(one or two large "wget"s usually does it), producing the following oops:

Unable to handle kernel paging request for unaligned access at address 0xc00000ffc43af656
Faulting instruction address: 0xc00000000080ef8c
Oops: Kernel access of bad area, sig: 7 [#1]
SMP NR_CPUS=2048
NUMA
PowerNV
Modules linked in: vmx_crypto powernv_rng rng_core powernv_op_panel leds_powernv led_class nfsd ip_tables x_tables autofs4 xfs lpfc bnx2x mdio libcrc32c crc_t10dif crct10dif_generic crct10dif_common
CPU: 104 PID: 0 Comm: swapper/104 Not tainted 4.11.0-rc8-00088-g4c761da #2
task: c00000ffd4892400 task.stack: c00000ffd4920000
NIP: c00000000080ef8c LR: c00000000080eee8 CTR: c0000000001f8320
REGS: c00000ffffc33710 TRAP: 0600   Not tainted  (4.11.0-rc8-00088-g4c761da)
MSR: 9000000000009033 <SF,HV,EE,ME,IR,DR,RI,LE>
  CR: 24082042  XER: 00000000
CFAR: c00000000080eea0 DAR: c00000ffc43af656 DSISR: 00000000 SOFTE: 1
GPR00: c000000000907f64 c00000ffffc33990 c000000000dd3b00 c00000ffcaf22100
GPR04: c00000ffcaf22e00 0000000000000000 0000000000000000 0000000000000000
GPR08: 0000000000b80008 c00000ffc43af636 c00000ffc43af656 0000000000000000
GPR12: c0000000001f6f00 c00000000fe1a000 000000000000049f 000000000000c51f
GPR16: 00000000ffffef33 0000000000000000 0000000000008a43 0000000000000001
GPR20: c00000ffc58a90c0 0000000000000000 000000000000dd86 0000000000000000
GPR24: c000007fd0ed10c0 00000000ffffffff 0000000000000158 000000000000014a
GPR28: c00000ffc43af010 c00000ffc9144000 c00000ffcaf22e00 c00000ffcaf22100
NIP [c00000000080ef8c] __skb_clone+0xdc/0x140
LR [c00000000080eee8] __skb_clone+0x38/0x140
Call Trace:
[c00000ffffc33990] [c00000000080fb74] skb_clone+0x74/0x110 (unreliable)
[c00000ffffc339c0] [c000000000907f64] packet_rcv+0x144/0x510
[c00000ffffc33a40] [c000000000827b64] __netif_receive_skb_core+0x5b4/0xd80
[c00000ffffc33b00] [c00000000082b2bc] netif_receive_skb_internal+0x2c/0xc0
[c00000ffffc33b40] [c00000000082c49c] napi_gro_receive+0x11c/0x260
[c00000ffffc33b80] [d000000066483d68] bnx2x_poll+0xcf8/0x17b0 [bnx2x]
[c00000ffffc33d00] [c00000000082babc] net_rx_action+0x31c/0x480
[c00000ffffc33e10] [c0000000000d5a44] __do_softirq+0x164/0x3d0
[c00000ffffc33f00] [c0000000000d60a8] irq_exit+0x108/0x120
[c00000ffffc33f20] [c000000000015b98] __do_irq+0x98/0x200
[c00000ffffc33f90] [c000000000027f14] call_do_irq+0x14/0x24
[c00000ffd4923a90] [c000000000015d94] do_IRQ+0x94/0x110
[c00000ffd4923ae0] [c000000000008d90] hardware_interrupt_common+0x150/0x160

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-30 22:50:19 -04:00
..
Makefile bnx2x: Segregate SR-IOV code 2013-01-07 19:49:14 -08:00
bnx2x.h bnx2x: fix spelling mistake in macros HW_INTERRUT_ASSERT_SET_* 2017-04-04 10:04:49 -07:00
bnx2x_cmn.c bnx2x: Align RX buffers 2017-04-30 22:50:19 -04:00
bnx2x_cmn.h net: Update API for VF vlan protocol 802.1ad support 2016-09-24 08:01:26 -04:00
bnx2x_dcb.c bnx2x: extend DCBx support 2016-02-16 20:12:16 -05:00
bnx2x_dcb.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_dump.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_ethtool.c net: broadcom: bnx2x: use new api ethtool_{get|set}_link_ksettings 2017-01-24 13:49:19 -05:00
bnx2x_fw_defs.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_fw_file_hdr.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_hsi.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-03-08 12:34:12 -05:00
bnx2x_init.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_init_ops.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_link.c bnx2x: Get rid of useless temporary variable 2017-04-30 22:28:00 -04:00
bnx2x_link.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_main.c bnx2x: fix spelling mistake in macros HW_INTERRUT_ASSERT_SET_* 2017-04-04 10:04:49 -07:00
bnx2x_mfw_req.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_reg.h bnx2x: Fix 84833 phy command handler 2016-02-21 22:50:55 -05:00
bnx2x_sp.c bnx2x: free the mac filter group list before freeing the cmd 2016-09-27 09:55:18 -04:00
bnx2x_sp.h bnx2x: Don't flush multicast MACs 2016-08-24 09:45:20 -07:00
bnx2x_sriov.c bnx2x: fix incorrect filter count in an error message 2017-03-07 13:47:15 -08:00
bnx2x_sriov.h bnx2x: do not rollback VF MAC/VLAN filters we did not configure 2017-03-07 13:47:15 -08:00
bnx2x_stats.c bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_stats.h bnx2x: Rebrand from 'broadcom' into 'qlogic' 2015-07-22 10:47:26 -07:00
bnx2x_vfpf.c bnx2x: add missing configuration of VF VLAN filters 2017-03-07 13:47:15 -08:00
bnx2x_vfpf.h bnx2x: add vlan filtering offload 2015-07-29 23:24:45 -07:00