Merge git://git.kernel.org/pub/scm/linux/kernel/git/lwfinger/r8192E into staging-next
* git://git.kernel.org/pub/scm/linux/kernel/git/lwfinger/r8192E: (61 commits)
staging: rtl8192e: Fix compilation warnings
staging: rtl8192e: Fix unload/reload problem
staging: rtl8192e: Remove dead code associated with CONFIG_RTL_RFKILL
staging: rtl8192e: Remove conditional code associated with EEPROM_OLD_FORMAT_SUPPORT
staging: rtl8192e: Remove dead code associated with EFUSE_REPG_WORKAROUND
staging: rtl8192e: Remove LOOP_TEST as parameter
staging: rtl8192e: Remove dead code associated with CONFIG_FW_SETCHAN
staging: rtl8192e: Remove dead code associated with CONFIG_RTLWIFI_DEBUGFS
staging: rtl8192e: Remove dead code associated with _RTL8192_EXT_PATCH_
staging: rtl8192e: Remove ifdefs for CONFIG_RTLLIB_DEBUG
staging: rtl8192e: Remove dead code associated with RTL819x_DEBUG
staging: rtl8192e: Remove dead code associated with _ENABLE_SW_BEACON
staging: rtl8192e: Remove dead code associated with CONFIG_CRYPTO_HMAC
staging: rtl8192e: Remove dead code associated with CONFIG_BT_30
staging: rtl8192e: Remove dead code associated with ENABLE_NULL_PT_DEBUG
staging: rtl8192e: Remove dead code associated with CONFIG_64BIT_DMA
staging: rtl8192e: Remove dead code associated with CONFIG_RTLLIB_CRYPT_TKIP
staging: rtl8192e: Remove dead code associated with IRQF_SHARED
staging: rtl8192e: Remove dead code associated with CONFIG_CFG_80211
staging: rtl8192e: Remove dead code associated with BUILT_IN_CRYPTO
...
Larry Finger [Fri, 15 Jul 2011 21:01:32 +0000 (16:01 -0500)]
staging: rtl8192e: Fix compilation warnings
When the driver is compiled, the following messages result:
CC [M] drivers/staging/rtl8192e/r8192E_phy.o
drivers/staging/rtl8192e/r8192E_phy.c: In function ‘rtl8192_phy_ConfigRFWithHeaderFile’:
drivers/staging/rtl8192e/r8192E_phy.c:791:25: warning: array subscript is above array bounds
drivers/staging/rtl8192e/r8192E_phy.c:780:25: warning: array subscript is above array bounds
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Larry Finger [Wed, 13 Jul 2011 16:06:34 +0000 (11:06 -0500)]
staging: rtl8192e: Fix kernel panics due to RX skb allocation failures
This driver uses RX skb's of O(2), thus it is possible for memory fragmentation
to prevent the allocation of a new one to replace a newly-received buffer.
When such a failure occurs, the kernel panics.
The fix is to drop an incoming packet whenever such an allocation fails. This
fix matches the one done in rtlwifi for other Realtek PCI devices.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Mark Einon [Tue, 23 Aug 2011 22:40:39 +0000 (23:40 +0100)]
staging: et131x: Fix free IRQ from IRQ context warning after tx_timeout
When a tx timeout occured, et131x_tx_timeout closed and re-opened the device to fix.
As et131x_close called free_irq(), bad things ensued (see warning trace below), namely a
storm of errors and warnings.
Fixed by replacing the close() and open() calls with just the relevant functions previously
called from these.
Verified on an ET-1310 device.
Signed-off-by: Mark Einon <mark.einon@gmail.com>
----------
Aug 2 21:26:08 msilap kernel: [ 6484.816024] ------------[ cut here ]------------
Aug 2 21:26:08 msilap kernel: [ 6484.816039] WARNING: at /home/mark/Source/staging-2.6/net/sched/sch_generic.c:255 dev_watchdog+0xf0/0x150()
Aug 2 21:26:08 msilap kernel: [ 6484.816045] Hardware name: MS-1727
Aug 2 21:26:08 msilap kernel: [ 6484.816050] NETDEV WATCHDOG: eth1 (et131x): transmit queue 0 timed out
Aug 2 21:26:08 msilap kernel: [ 6484.816054] Modules linked in: et131x(C) aes_generic tcp_lp fuse nouveau ttm drm_kms_helper drm i2c_algo_bit sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table mperf uinput arc4 iwlagn snd_hda_codec_hdmi mac80211 sdhci_pci sdhci snd_hda_codec_realtek cfg80211 snd_hda_intel snd_hda_codec mmc_core snd_hwdep firewire_ohci firewire_core jmb38x_ms snd_seq snd_seq_device snd_pcm mxm_wmi ir_lirc_codec lirc_dev ir_sony_decoder i2c_i801 ir_jvc_decoder ir_rc6_decoder rc_rc6_mce i7core_edac edac_core snd_timer pcspkr rfkill r8169 mii i2c_core video ir_rc5_decoder memstick iTCO_wdt iTCO_vendor_support ir_nec_decoder ene_ir rc_core joydev microcode wmi snd crc_itu_t soundcore snd_page_alloc [last unloaded: et131x]
Aug 2 21:26:08 msilap kernel: [ 6484.816163] Pid: 0, comm: kworker/0:1 Tainted: G C 3.0.0-rc6+ #21
Aug 2 21:26:08 msilap kernel: [ 6484.816167] Call Trace:
Aug 2 21:26:08 msilap kernel: [ 6484.816171] <IRQ> [<ffffffff8103caf4>] warn_slowpath_common+0x85/0x9d
Aug 2 21:26:08 msilap kernel: [ 6484.816189] [<ffffffff8103cbaf>] warn_slowpath_fmt+0x46/0x48
Aug 2 21:26:08 msilap kernel: [ 6484.816196] [<ffffffff813aa6fb>] ? netif_tx_lock+0x4a/0x7b
Aug 2 21:26:08 msilap kernel: [ 6484.816203] [<ffffffff813aa86f>] dev_watchdog+0xf0/0x150
Aug 2 21:26:08 msilap kernel: [ 6484.816211] [<ffffffff810497b6>] run_timer_softirq+0x1a9/0x279
Aug 2 21:26:08 msilap kernel: [ 6484.816218] [<ffffffff813aa77f>] ? netif_tx_unlock+0x53/0x53
Aug 2 21:26:08 msilap kernel: [ 6484.816226] [<ffffffff810429d7>] __do_softirq+0xd5/0x1a4
Aug 2 21:26:08 msilap kernel: [ 6484.816234] [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug 2 21:26:08 msilap kernel: [ 6484.816245] [<ffffffff8144561c>] call_softirq+0x1c/0x26
Aug 2 21:26:08 msilap kernel: [ 6484.816251] [<ffffffff81003b9f>] do_softirq+0x46/0x83
Aug 2 21:26:08 msilap kernel: [ 6484.816257] [<ffffffff81042ca2>] irq_exit+0x52/0x9b
Aug 2 21:26:08 msilap kernel: [ 6484.816265] [<ffffffff81445749>] smp_apic_timer_interrupt+0x7c/0x8a
Aug 2 21:26:08 msilap kernel: [ 6484.816273] [<ffffffff814450d3>] apic_timer_interrupt+0x13/0x20
Aug 2 21:26:08 msilap kernel: [ 6484.816278] <EOI> [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug 2 21:26:08 msilap kernel: [ 6484.816291] [<ffffffff8124ad87>] ? intel_idle+0xd1/0xf8
Aug 2 21:26:08 msilap kernel: [ 6484.816297] [<ffffffff8124ad69>] ? intel_idle+0xb3/0xf8
Aug 2 21:26:08 msilap kernel: [ 6484.816306] [<ffffffff8136a767>] cpuidle_idle_call+0xe2/0x160
Aug 2 21:26:08 msilap kernel: [ 6484.816315] [<ffffffff81001293>] cpu_idle+0xaa/0xcc
Aug 2 21:26:08 msilap kernel: [ 6484.816323] [<ffffffff81436b4e>] start_secondary+0x248/0x24f
Aug 2 21:26:08 msilap kernel: [ 6484.816329] ---[ end trace 10ae1b2c6bae932f ]---
Aug 2 21:26:08 msilap kernel: [ 6484.816337] et131x 0000:02:00.0: Send stuck - reset. tcb->WrIndex 0, flags 0x00000000
Aug 2 21:26:08 msilap kernel: [ 6484.816344] ------------[ cut here ]------------
Aug 2 21:26:08 msilap kernel: [ 6484.816353] WARNING: at /home/mark/Source/staging-2.6/kernel/irq/manage.c:1131 __free_irq+0x58/0x192()
Aug 2 21:26:08 msilap kernel: [ 6484.816358] Hardware name: MS-1727
Aug 2 21:26:08 msilap kernel: [ 6484.816362] Trying to free IRQ 16 from IRQ context!
Aug 2 21:26:08 msilap kernel: [ 6484.816365] Modules linked in: et131x(C) aes_generic tcp_lp fuse nouveau ttm drm_kms_helper drm i2c_algo_bit sunrpc ipv6 cpufreq_ondemand acpi_cpufreq freq_table mperf uinput arc4 iwlagn snd_hda_codec_hdmi mac80211 sdhci_pci sdhci snd_hda_codec_realtek cfg80211 snd_hda_intel snd_hda_codec mmc_core snd_hwdep firewire_ohci firewire_core jmb38x_ms snd_seq snd_seq_device snd_pcm mxm_wmi ir_lirc_codec lirc_dev ir_sony_decoder i2c_i801 ir_jvc_decoder ir_rc6_decoder rc_rc6_mce i7core_edac edac_core snd_timer pcspkr rfkill r8169 mii i2c_core video ir_rc5_decoder memstick iTCO_wdt iTCO_vendor_support ir_nec_decoder ene_ir rc_core joydev microcode wmi snd crc_itu_t soundcore snd_page_alloc [last unloaded: et131x]
Aug 2 21:26:08 msilap kernel: [ 6484.816459] Pid: 0, comm: kworker/0:1 Tainted: G WC 3.0.0-rc6+ #21
Aug 2 21:26:08 msilap kernel: [ 6484.816464] Call Trace:
Aug 2 21:26:08 msilap kernel: [ 6484.816467] <IRQ> [<ffffffff8103caf4>] warn_slowpath_common+0x85/0x9d
Aug 2 21:26:08 msilap kernel: [ 6484.816480] [<ffffffff8103cbaf>] warn_slowpath_fmt+0x46/0x48
Aug 2 21:26:08 msilap kernel: [ 6484.816488] [<ffffffff81092276>] __free_irq+0x58/0x192
Aug 2 21:26:08 msilap kernel: [ 6484.816496] [<ffffffff8109240e>] free_irq+0x5e/0x77
Aug 2 21:26:08 msilap kernel: [ 6484.816506] [<ffffffffa00bf58e>] et131x_close+0x4b/0x5e [et131x]
Aug 2 21:26:08 msilap kernel: [ 6484.816516] [<ffffffffa00bf64d>] et131x_tx_timeout+0xac/0xc7 [et131x]
Aug 2 21:26:08 msilap kernel: [ 6484.816523] [<ffffffff813aa883>] dev_watchdog+0x104/0x150
Aug 2 21:26:08 msilap kernel: [ 6484.816530] [<ffffffff810497b6>] run_timer_softirq+0x1a9/0x279
Aug 2 21:26:08 msilap kernel: [ 6484.816537] [<ffffffff813aa77f>] ? netif_tx_unlock+0x53/0x53
Aug 2 21:26:08 msilap kernel: [ 6484.816544] [<ffffffff810429d7>] __do_softirq+0xd5/0x1a4
Aug 2 21:26:08 msilap kernel: [ 6484.816552] [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug 2 21:26:08 msilap kernel: [ 6484.816560] [<ffffffff8144561c>] call_softirq+0x1c/0x26
Aug 2 21:26:08 msilap kernel: [ 6484.816566] [<ffffffff81003b9f>] do_softirq+0x46/0x83
Aug 2 21:26:08 msilap kernel: [ 6484.816572] [<ffffffff81042ca2>] irq_exit+0x52/0x9b
Aug 2 21:26:08 msilap kernel: [ 6484.816580] [<ffffffff81445749>] smp_apic_timer_interrupt+0x7c/0x8a
Aug 2 21:26:08 msilap kernel: [ 6484.816588] [<ffffffff814450d3>] apic_timer_interrupt+0x13/0x20
Aug 2 21:26:08 msilap kernel: [ 6484.816592] <EOI> [<ffffffff810079ed>] ? paravirt_read_tsc+0x9/0xd
Aug 2 21:26:08 msilap kernel: [ 6484.816604] [<ffffffff8124ad87>] ? intel_idle+0xd1/0xf8
Aug 2 21:26:08 msilap kernel: [ 6484.816610] [<ffffffff8124ad69>] ? intel_idle+0xb3/0xf8
Aug 2 21:26:08 msilap kernel: [ 6484.816617] [<ffffffff8136a767>] cpuidle_idle_call+0xe2/0x160
Aug 2 21:26:08 msilap kernel: [ 6484.816625] [<ffffffff81001293>] cpu_idle+0xaa/0xcc
Aug 2 21:26:08 msilap kernel: [ 6484.816632] [<ffffffff81436b4e>] start_secondary+0x248/0x24f Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Tue, 23 Aug 2011 22:40:38 +0000 (23:40 +0100)]
staging: et131x: Fix link detection signalling
Remove redundant code around netif_carrier_XXX calls, and associated adapter->media_state, which prevented the link from being reported as off.
Tested on an ET-1310 device.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Einon [Tue, 23 Aug 2011 22:40:37 +0000 (23:40 +0100)]
staging: et131x: Rename var name 'etdev' to 'adapter' throughout module
Used regex (from vim) :%s/\<etdev\>/adapter/g
Changed because:
* 'etdev' is easily confused as a misspelling of 'netdev'
* 'adapter' is more widely used for this struct type in net drivers. This
change made comparing code with other drivers much easier.
Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cleanup kvp_get_domain_name(). If getaddrinfo() fails, deal with it properly
(this can happen if no IP address has been assigned). Also, don't specify
a specific service in the call to getaddrinfo() to make this code as generic
as possible. Lastly, move the call to gethostname() after the local variables.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Fri, 15 Jul 2011 20:38:56 +0000 (13:38 -0700)]
Staging: hv: vmbus: Don't wait indefinitely for IRQ resouces
If an attempt is made to load the vmbus driver on a non-Hyper-V platform,
the load operation will hang since we currently wait indefinitely to
retrieve the IRQ information. This is done in the context of an acpi callback
context (which will obviously not happen when this driver is
loaded on a non-Hyper-V platform). This patch fixes the problem.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kbuild: introduce ccflags-y, asflags-y and ldflags-y
Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.
Replace their usage by Kbuild's `{as,cc,ld}flags-y'.
Randy Dunlap [Mon, 8 Aug 2011 18:31:48 +0000 (11:31 -0700)]
staging: fix ft1000 sparse warnings
Fix sparse warnings in staging/ft1000/:
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:69:7: warning: obsolete struct initializer, use C99 syntax
and make many functions & data static. Examples:
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:65:23: warning: symbol 'fw_entry' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:836:6: warning: symbol 'ft1000_send_cmd' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:1014:6: warning: symbol 'ft1000_proc_drvmsg' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:1788:5: warning: symbol 'ft1000_copy_down_pkt' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2096:6: warning: symbol 'stop_ft1000_card' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2155:19: warning: symbol 'init_ft1000_card' was not declared. Should it be static?
rivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c:172:5: warning: symbol 'ft1000_confcheck' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:50:5: warning: symbol 'ft1000ReadProc' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:194:6: warning: symbol 'ft1000InitProc' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:207:6: warning: symbol 'ft1000CleanupProc' was not declared. Should it be static?
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...kfree(x)...+> }
when any
when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
when forall
(
return \(0\|<+...x...+>\|ptr\);
|
* return ...;
)
}
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kevin McKinney [Tue, 16 Aug 2011 02:10:12 +0000 (22:10 -0400)]
Staging: bcm: Fix a coding style error reported by checkpatch.pl
Tool checkpatch.pl reported the following error: extern struct class *bcm_class;"
declaration not allowed in .c files. Therefore, I move this declaration into
the header "headers.h" file.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
daemonize() is only needed when a user-space task does kernel_thread().
r8712_cmd_thread() is kthread_create()'ed and thus it doesn't need
the soon-to-be-deprecated daemonize(). It is the only caller of
thread_enter() which actually does the call.
Note:
- we are going to remove the sigdelset(blocked) code from
allow_signal(), this means that without this patch
thread_enter() can't work after that. Not to mention
daemonize() should be deprecated.
- as a side effect, this patch changes ->comm. Hopefully
this is fine, and padapter->pnetdev->name probably makes
more sense anyway.
Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Matt Fleming <matt.fleming@intel.com> Acked-by: Tejun Heo <tj@kernel.org> Acked-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Manohar Vanga [Fri, 12 Aug 2011 10:30:48 +0000 (12:30 +0200)]
staging: vme: keep track of registered buses
This patch adds a list which keeps track of all registered VME
buses. This is required for adding refcounting later to bridge
modules, something that is not currently implemented.
This is based on the changes introduced by Emilio G. Cota in the
patch:
Manohar Vanga [Wed, 10 Aug 2011 09:33:46 +0000 (11:33 +0200)]
staging: vme: make [alloc|free]_consistent bridge specific
Make PCI dependent functions ([alloc|free]_consistent() in
'vme.c') bridge specific. By removing the dependency of the
VME bridge framework on PCI, this patch allows for addition of
non-PCI based VME bridges.