Return-path: Received: from mail-yw0-f46.google.com ([209.85.213.46]:33207 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965956Ab2EODBQ (ORCPT ); Mon, 14 May 2012 23:01:16 -0400 Received: by yhmm54 with SMTP id m54so4910075yhm.19 for ; Mon, 14 May 2012 20:01:15 -0700 (PDT) Message-ID: <4FB1C6F8.7060902@lwfinger.net> (sfid-20120515_050129_368024_2B3DB1D3) Date: Mon, 14 May 2012 22:01:12 -0500 From: Larry Finger MIME-Version: 1.0 To: Stanislav Yakovlev CC: linville@tuxdriver.com, linux-wireless@vger.kernel.org Subject: Re: [PATCH] net/wireless: ipw2100: Fix WARN_ON occurring in wiphy_register called by ipw2100_pci_init_one References: <1337036779-16348-1-git-send-email-stas.yakovlev@gmail.com> In-Reply-To: <1337036779-16348-1-git-send-email-stas.yakovlev@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 05/14/2012 06:06 PM, Stanislav Yakovlev wrote: > The problem was found by Larry Finger: > http://marc.info/?l=linux-wireless&m=133702401700614&w=2 > > The problem is identical to the one for ipw2200 which is already fixed: > http://marc.info/?l=linux-wireless&m=133457257407196&w=2 > > [ 17.766431] ------------[ cut here ]------------ > [ 17.766467] WARNING: at net/wireless/core.c:562 wiphy_register+0x34c/0x3c0 [cfg80211]() > [ 17.766471] Hardware name: Latitude D600 > [ 17.766474] Modules linked in: ipw2100(+) libipw pcmcia cfg80211 ppdev parport_pc yenta_socket sr_mod pcmcia_rsrc parport iTCO_wdt cdrom sg rfkill pcmcia_ > core lib80211 tg3 video button battery ac iTCO_vendor_support joydev shpchp pcspkr pciehp pci_hotplug autofs4 radeon ttm drm_kms_helper uhci_hcd ehci_hcd rtc > _cmos thermal drm hwmon i2c_algo_bit i2c_core processor usbcore usb_common ata_generic ata_piix ahci libahci libata > [ 17.766525] Pid: 474, comm: modprobe Not tainted 3.4.0-rc7-wl+ #6 > [ 17.766528] Call Trace: > [ 17.766541] [] ? printk+0x28/0x2a > [ 17.766552] [] warn_slowpath_common+0x6d/0xa0 > [ 17.766563] [] ? wiphy_register+0x34c/0x3c0 [cfg80211] > [ 17.766573] [] ? wiphy_register+0x34c/0x3c0 [cfg80211] > [ 17.766578] [] warn_slowpath_null+0x1d/0x20 > [ 17.766588] [] wiphy_register+0x34c/0x3c0 [cfg80211] > [ 17.766605] [] ipw2100_wdev_init+0x196/0x1c0 [ipw2100] > [ 17.766616] [] ipw2100_pci_init_one+0x2b2/0x694 [ipw2100] > [ 17.766632] [] local_pci_probe+0x42/0xb0 > [ 17.766637] [] pci_device_probe+0x60/0x90 > [ 17.766645] [] ? sysfs_create_link+0x12/0x20 > [ 17.766654] [] really_probe+0x56/0x2e0 > [ 17.766659] [] ? create_dir+0x5d/0xa0 > [ 17.766667] [] ? pm_runtime_barrier+0x3b/0xa0 > [ 17.766672] [] driver_probe_device+0x44/0xa0 > [ 17.766677] [] ? pci_match_device+0x97/0xa0 > [ 17.766681] [] __driver_attach+0x89/0x90 > [ 17.766686] [] ? driver_probe_device+0xa0/0xa0 > [ 17.766691] [] bus_for_each_dev+0x3a/0x70 > [ 17.766695] [] driver_attach+0x1c/0x30 > [ 17.766699] [] ? driver_probe_device+0xa0/0xa0 > [ 17.766704] [] bus_add_driver+0x187/0x280 > [ 17.766710] [] ? kset_find_obj+0x2d/0x60 > [ 17.766715] [] ? pci_device_probe+0x90/0x90 > [ 17.766719] [] ? pci_device_probe+0x90/0x90 > [ 17.766724] [] driver_register+0x65/0x110 > [ 17.766729] [] __pci_register_driver+0x3d/0xa0 > [ 17.766738] [] ipw2100_init+0x5c/0x1000 [ipw2100] > [ 17.766743] [] do_one_initcall+0x2f/0x170 > [ 17.766749] [] ? 0xe09f6fff > [ 17.766757] [] sys_init_module+0xa8/0x210 > [ 17.766766] [] syscall_call+0x7/0xb > [ 17.766769] ---[ end trace 559898c6bb0d1c75 ]--- > [ 17.767093] ipw2100: probe of 0000:02:03.0 failed with error -5 > > This warning appears only if we apply Ben Hutchings' fix > http://marc.info/?l=linux-wireless&m=132720204412667&w=2 > for the bug reported by Cesare Leonardi > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=656813 > with cfg80211 warning during device registration > ("cfg80211: failed to add phy80211 symlink to netdev!"). > > We separate device bring up and registration with network stack > to avoid the problem. > > Signed-off-by: Stanislav Yakovlev > --- > > Larry, can you test it once again? Tested-by: Larry Finger Yes, this patch fixes the problem. Larry