You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux
Gabor Juhos 4be8c22e74 generic: ar8216: add detach callback
The current code uses the 'remove' callback to disable
packet mangle on the underlying ethernet device.
However the attached_dev is always NULL when the
'remove' callback is called by phylib, and this causes
NULL pointer dereference, like this:

  [  475.300000] CPU 0 Unable to handle kernel paging request at virtual address 000000f0, epc == 801cdcf0, ra == 801c7eac
  [  475.310000] Oops[#1]:
  [  475.310000] Cpu 0
  [  475.310000] $ 0   : 00000000 00000000 00000000 00000001
  [  475.310000] $ 4   : 828dde00 00000005 828dde08 ffffffff
  [  475.310000] $ 8   : 00380081 00380081 82902a40 00000001
  [  475.310000] $12   : 00000037 00370081 00000001 00000000
  [  475.310000] $16   : 82865000 828dde08 828dde00 00000001
  [  475.310000] $20   : 00000080 00460000 00000002 77151448
  [  475.310000] $24   : 00000000 801abfd4
  [  475.310000] $28   : 82cc2000 82cc3d58 0053c3c4 801c7eac
  [  475.310000] Hi    : 00000007
  [  475.310000] Lo    : 00000004
  [  475.310000] epc   : 801cdcf0 ar8216_remove+0x1c/0x94
  [  475.310000]     Tainted: G           O
  [  475.310000] ra    : 801c7eac phy_remove+0x4c/0x6c
  [  475.310000] Status: 1000cc03    KERNEL EXL IE
  [  475.310000] Cause : 00800008
  [  475.310000] BadVA : 000000f0
  [  475.310000] PrId  : 00019750 (MIPS 74Kc)
  [  475.310000] Modules linked in: ath79_wdt ledtrig_usbdev ledtrig_netdev ag71xx(-) nf_nat_irc nf_nat_ftp nf_conntrack_irc nf_conntrack_ft
  p ipt_MASQUERADE iptable_nat xt_nat nf_nat_ipv4 nf_nat pppoext_conntrack xt_CT iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_co
  nntrack ehci_hcd pppox ipt_REJECT xt_TCPMSS xt_LOG xt_comment xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpu
  dp x_tables ppp_async ppp_generic slhc ath9k(O) ath9k_common(O) ath9k_hw(O) ath(O) mac80211(O) usbcore usb_common nls_base crc_ccitt cfg80
  211(O) compat(O) arc4 crypto_blkcipher aead ledtrig_timer ledtrig_default_on leds_gpio gpio_button_hotplug(O)
  [  475.310000] Process rmmod (pid: 1160, threadinfo=82cc2000, task=83969920, tls=7747c440)
  [  475.310000] Stack : 828dde08 802f5004 802f4680 00000001 828ddf70 801c7eac 802f4680 801ad6d8
          82902940 00000000 828dde08 802f5004 802f4680 801ad770 00000002 80269d94
          00000000 00000001 00000080 828dde08 828dde3c 801ad7fc 82902940 00000000
          83859100 00000000 8384dd2c 8384dd2c 828dde08 801ad230 82902800 00000000
          00000000 001a0041 828dde08 828dde08 802e80e8 801aac44 00000080 00460000
          ...
  [  475.310000] Call Trace:
  [  475.310000] [<801cdcf0>] ar8216_remove+0x1c/0x94
  [  475.310000] [<801c7eac>] phy_remove+0x4c/0x6c
  [  475.310000] [<801ad770>] __device_release_driver+0x6c/0xd0
  [  475.310000] [<801ad7fc>] device_release_driver+0x28/0x40
  [  475.310000] [<801ad230>] bus_remove_device+0xd8/0x10c
  [  475.310000] [<801aac44>] device_del+0x110/0x170
  [  475.310000] [<801aacb8>] device_unregister+0x14/0x28
  [  475.310000] [<801c92b0>] mdiobus_unregister+0x4c/0x70
  [  475.310000] [<82913060>] ag71xx_remove_ar8216_header+0xdc/0x5a8 [ag71xx]
  [  475.310000]
  [  475.310000]
  Code: 1200001c  8c82017c  ac800128 <8c4500f0> 3c03ffdf  3463ffff 00a31824  ac4300f0  ac4000e0

Add a detach callback and disable packet mangling in
that to fix the problem.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 35511
12 years ago
..
adm5120 kernel: update linux 3.7 to 3.7.6 12 years ago
adm8668 create Linksys WRTU54G-TM profile 12 years ago
amazon remove common symbols from 3.3 configs 12 years ago
ar7 all targets: use numerically prefixed uci-defaults file names to better control order of execution 12 years ago
ar71xx kernel: update linux 3.7 to 3.7.6 12 years ago
at91 target: enable XZ BCJ decompressor code after r35097 12 years ago
atheros all targets: use numerically prefixed uci-defaults file names to better control order of execution 12 years ago
au1000 remove common symbols from 3.6 configs 12 years ago
avr32 remove common symbols from 3.3 configs 12 years ago
brcm47xx brcm47xx: fix name of kmod-ocf-ubsec-ssb 12 years ago
brcm63xx remove support for 3.6 kernel 12 years ago
brcm2708 target: enable XZ BCJ decompressor code after r35097 12 years ago
cns3xxx target: enable XZ BCJ decompressor code after r35097 12 years ago
cns21xx kernel: update linux 3.7 to 3.7.6 12 years ago
cobalt remove common symbols from 3.3 configs 12 years ago
ep93xx target: enable XZ BCJ decompressor code after r35097 12 years ago
gemini target: enable XZ BCJ decompressor code after r35097 12 years ago
generic generic: ar8216: add detach callback 12 years ago
iop32x target: enable XZ BCJ decompressor code after r35097 12 years ago
ixp4xx target: enable XZ BCJ decompressor code after r35097 12 years ago
kirkwood all targets: use numerically prefixed uci-defaults file names to better control order of execution 12 years ago
lantiq kernel: update linux 3.7 to 3.7.6 12 years ago
malta kernel: update linux 3.7 to 3.7.6 12 years ago
mcs814x all targets: use numerically prefixed uci-defaults file names to better control order of execution 12 years ago
mpc52xx target: enable XZ BCJ decompressor code after r35097 12 years ago
mpc83xx kernel: update linux 3.7 to 3.7.6 12 years ago
mpc85xx mpc85xx: enable GPIO sysfs interface 12 years ago
mvebu kernel: generic: update to 3.8-rc6 12 years ago
omap4 target: enable XZ BCJ decompressor code after r35097 12 years ago
omap24xx remove common symbols from 3.3 configs 12 years ago
orion all targets: use numerically prefixed uci-defaults file names to better control order of execution 12 years ago
ppc40x kernel: update linux 3.7 to 3.7.6 12 years ago
ppc44x kernel: update linux 3.7 to 3.7.6 12 years ago
pxa target: enable XZ BCJ decompressor code after r35097 12 years ago
ramips kernel: update linux 3.7 to 3.7.6 12 years ago
rb532 kernel: update linux 3.7 to 3.7.6 12 years ago
realview kernel: clean up crypto kconfig options on 3.8 12 years ago
sibyte remove common symbols from 3.3 configs 12 years ago
sparc kernel: update linux 3.6 to 3.6.11 12 years ago
uml kernel: update linux 3.6 to 3.6.11 12 years ago
x86 kernel: update linux 3.7 to 3.7.6 12 years ago
xburst kernel: add missing USB configuration symbols after r34501 12 years ago
Makefile Add kernel_nconfig make target 14 years ago