aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-04-21ks8851: Fix mutex deadlock in ks8851_net_stop()Stephen Boyd1-5/+6
There is a potential deadlock scenario when the ks8851 driver is removed. The interrupt handler schedules a workqueue which acquires a mutex that ks8851_net_stop() also acquires before flushing the workqueue. Previously lockdep wouldn't be able to find this problem but now that it has the support we can trigger this lockdep warning by rmmoding the driver after an ifconfig up. Fix the possible deadlock by disabling the interrupts in the chip and then release the lock across the workqueue flushing. The mutex is only there to proect the registers anyway so this should be ok. ======================================================= [ INFO: possible circular locking dependency detected ] 3.0.21-00021-g8b33780-dirty #2911 ------------------------------------------------------- rmmod/125 is trying to acquire lock: ((&ks->irq_work)){+.+...}, at: [<c019e0b8>] flush_work+0x0/0xac but task is already holding lock: (&ks->lock){+.+...}, at: [<bf00b850>] ks8851_net_stop+0x64/0x138 [ks8851] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ks->lock){+.+...}: [<c01b89c8>] __lock_acquire+0x940/0x9f8 [<c01b9058>] lock_acquire+0x10c/0x130 [<c083dbec>] mutex_lock_nested+0x68/0x3dc [<bf00bd48>] ks8851_irq_work+0x24/0x46c [ks8851] [<c019c580>] process_one_work+0x2d8/0x518 [<c019cb98>] worker_thread+0x220/0x3a0 [<c01a2ad4>] kthread+0x88/0x94 [<c0107008>] kernel_thread_exit+0x0/0x8 -> #0 ((&ks->irq_work)){+.+...}: [<c01b7984>] validate_chain+0x914/0x1018 [<c01b89c8>] __lock_acquire+0x940/0x9f8 [<c01b9058>] lock_acquire+0x10c/0x130 [<c019e104>] flush_work+0x4c/0xac [<bf00b858>] ks8851_net_stop+0x6c/0x138 [ks8851] [<c06b209c>] __dev_close_many+0x98/0xcc [<c06b2174>] dev_close_many+0x68/0xd0 [<c06b22ec>] rollback_registered_many+0xcc/0x2b8 [<c06b2554>] rollback_registered+0x28/0x34 [<c06b25b8>] unregister_netdevice_queue+0x58/0x7c [<c06b25f4>] unregister_netdev+0x18/0x20 [<bf00c1f4>] ks8851_remove+0x64/0xb4 [ks8851] [<c049ddf0>] spi_drv_remove+0x18/0x1c [<c0468e98>] __device_release_driver+0x7c/0xbc [<c0468f64>] driver_detach+0x8c/0xb4 [<c0467f00>] bus_remove_driver+0xb8/0xe8 [<c01c1d20>] sys_delete_module+0x1e8/0x27c [<c0105ec0>] ret_fast_syscall+0x0/0x3c other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ks->lock); lock((&ks->irq_work)); lock(&ks->lock); lock((&ks->irq_work)); *** DEADLOCK *** 4 locks held by rmmod/125: #0: (&__lockdep_no_validate__){+.+.+.}, at: [<c0468f44>] driver_detach+0x6c/0xb4 #1: (&__lockdep_no_validate__){+.+.+.}, at: [<c0468f50>] driver_detach+0x78/0xb4 #2: (rtnl_mutex){+.+.+.}, at: [<c06b25e8>] unregister_netdev+0xc/0x20 #3: (&ks->lock){+.+...}, at: [<bf00b850>] ks8851_net_stop+0x64/0x138 [ks8851] Cc: Ben Dooks <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-19net ax25: Reorder ax25_exit to remove races.Eric W. Biederman1-4/+5
While reviewing the sysctl code in ax25 I spotted races in ax25_exit where it is possible to receive notifications and packets after already freeing up some of the data structures needed to process those notifications and updates. Call unregister_netdevice_notifier early so that the rest of the cleanup code does not need to deal with network devices. This takes advantage of my recent enhancement to unregister_netdevice_notifier to send unregister notifications of all network devices that are current registered. Move the unregistration for packet types, socket types and protocol types before we cleanup any of the ax25 data structures to remove the possibilities of other races. Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-19icplus: fix interrupt for IC+ 101A/G and 1001LFGiuseppe CAVALLARO1-1/+11
This patch fixes and adds the irq handler for the IC+ 101A/G where we need to read the reg17 to clean the irq. Also remove the flag for the 1001LF where no interrupt can be used for this device. Signed-off-by: Giuseppe Cavallaro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-19net: qmi_wwan: support Sierra Wireless MC77xx devices in QMI modeBjørn Mork1-0/+30
The MC77xx devices can operate in two modes: "Direct IP" or "QMI", switchable using a password protected AT command. Both product ID and USB interface configuration will change when switched. The "sierra_net" driver supports the "Direct IP" mode. This driver supports the "QMI" mode. There are also multiple possible USB interface configurations in each mode, some providing more than one wwan interface. Like many other devices made for Windows, different interface types are identified using a static interface number. We define a Sierra specific interface whitelist to support this. Signed-off-by: Bjørn Mork <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-19bnx2x: off by one in bnx2x_ets_e3b0_sp_pri_to_cos_set()Dan Carpenter1-6/+6
The sp_pri_to_cos[] array size depends on the config but lets say it is BX_E3B0_MAX_NUM_COS_PORT0 and max_num_of_cos is also DCBX_E3B0_MAX_NUM_COS_PORT0. In the original code "pri == max_num_of_cos" was accepted but it is one past the end of the array. Also we used "pri" before capping it. It's a harmless read past the end of the array, but it would affect which error message gets printed. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-19ksz884x: don't copy too much in netdev_set_mac_address()Dan Carpenter1-1/+1
MAX_ADDR_LEN is 32. ETH_ALEN is 6. mac->sa_data is a 14 byte array, so the memcpy() is doing a read past the end of the array. I asked about this on netdev and Ben Hutchings told me it's supposed to be copying ETH_ALEN bytes (thanks Ben). Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-18tcp: fix retransmit of partially acked framesEric Dumazet1-0/+1
Alexander Beregalov reported skb_over_panic errors and provided stack trace. I occurs commit a21d45726aca (tcp: avoid order-1 allocations on wifi and tx path) added a regression, when a retransmit is done after a partial ACK. tcp_retransmit_skb() tries to aggregate several frames if the first one has enough available room to hold the following ones payload. This is controlled by /proc/sys/net/ipv4/tcp_retrans_collapse tunable (default : enabled) Problem is we must make sure _pskb_trim_head() doesnt fool skb_availroom() when pulling some bytes from skb (this pull is done when receiver ACK part of the frame). Reported-by: Alexander Beregalov <[email protected]> Cc: Marc MERLIN <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-18Merge branch 'for-davem' of ↵David S. Miller11-24/+61
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless From John: Another batch of fixes intended for 3.4... First up, we have a minor signedness fix for libertas from Amitkumar Karwar. Next, Arend gives us a brcm80211 fix for correctly enabling Tx FIFOs on channels 12 and 13. Bing Zhao gives us some register address corrections for mwifiex. Felix give us a trio of fixes -- one for ath9k to wake the hardware properly from full sleep, one for mac80211 to properly handle packets in cooked monitor mode, and one for ensuring that the proper HT mode selection is honored. Hauke gives us a bcma fix for handling the lack of an sprom. Jonathon Bither gives us an ath5k fix for a missing THIS_MODULE build issue, and another ath5k fix for an io mapping leak. Lukasz Kucharczyk fixes a bitwise check in cfg80211, and Sujith gives us an ath9k fix for assigning sequence numbers for fragmented frames. Finally, we have a MAINTAINERS change from Wey-Yi Guy -- congrats to Johannes Berg for taking the lead on iwlwifi. :-) Signed-off-by: David S. Miller <[email protected]>
2012-04-18Merge branch 'master' of ↵John W. Linville11-24/+61
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2012-04-18netns: do not leak net_generic data on failed initJulian Anastasov1-15/+18
ops_init should free the net_generic data on init failure and __register_pernet_operations should not call ops_free when NET_NS is not enabled. Signed-off-by: Julian Anastasov <[email protected]> Reviewed-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17Merge branch 'master' of ↵David S. Miller2-8/+12
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net
2012-04-17net/sock.h: fix sk_peek_off kernel-doc warningRandy Dunlap1-0/+1
Fix kernel-doc warning in net/sock.h: Warning(include/net/sock.h:377): No description found for parameter 'sk_peek_off' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17tcp: fix tcp_grow_window() for large incoming framesEric Dumazet1-0/+1
tcp_grow_window() has to grow rcv_ssthresh up to window_clamp, allowing sender to increase its window. tcp_grow_window() still assumes a tcp frame is under MSS, but its no longer true with LRO/GRO. This patch fixes one of the performance issue we noticed with GRO on. Signed-off-by: Eric Dumazet <[email protected]> Cc: Neal Cardwell <[email protected]> Cc: Tom Herbert <[email protected]> Acked-by: Neal Cardwell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17drivers/net/wan/farsync.c: add missing iounmapJulia Lawall1-0/+1
Free card->mem in the error-handling code since it was successfully allocated just above. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17davinci_mdio: Fix MDIO timeout checkChristian Riesch1-0/+5
Under heavy load (flood ping) it is possible for the MDIO timeout to expire before the loop checks the GO bit again. This patch adds an additional check whether the operation was done before actually returning -ETIMEDOUT. To reproduce this bug, flood ping the device, e.g., ping -f -l 1000 After some time, a "timed out waiting for user access" warning may appear. And even worse, link may go down since the PHY reported a timeout. Signed-off-by: Christian Riesch <[email protected]> Cc: <[email protected]> Cc: Cyril Chemparathy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17ipv6: clean up rt6_clean_expiresJiri Bohac1-1/+1
Functionally, this change is a NOP. Semantically, rt6_clean_expires() wants to do rt->dst.from = NULL instead of rt->dst.expires = 0. It is clearing the RTF_EXPIRES flag, so the union is going to be treated as a pointer (dst.from) not a long (dst.expires). Signed-off-by: Jiri Bohac <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17ipv6: fix rt6_update_expiresJiri Bohac1-2/+8
Commit 1716a961 (ipv6: fix problem with expired dst cache) broke PMTU discovery. rt6_update_expires() calls dst_set_expires(), which only updates dst->expires if it has not been set previously (expires == 0) or if the new expires is earlier than the current dst->expires. rt6_update_expires() needs to zero rt->dst.expires, otherwise it will contain ivalid data left over from rt->dst.from and will confuse dst_set_expires(). Signed-off-by: Jiri Bohac <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17arcnet: rimi: Fix device name in debug outputJiri Kosina1-4/+4
arcrimi_probe() calls BUGMSG() before register_netdev() happens. BUGMSG() itself prints dev->name, but as the format string hasn't been expanded by register_netdev() yet, the output contains bogus device name such as arc%d: Given: node 00h, shmem 0h, irq 0 As we don't know the device name yet, just drop the prefix completely from the debugging messages. Reported-by: Steven Young <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-17ixgbe: Identify FCoE rings earlier to resolve memory corruption w/ FCoEAlexander Duyck2-8/+10
This patch makes it so that we identify FCoE rings earlier than ixgbe_set_rx_buffer_len. Instead we identify the Rx FCoE rings at allocation time in ixgbe_alloc_q_vector. The motivation behind this change is to avoid memory corruption when FCoE is enabled. Without this change we were initializing the rings at 0, and 2K on systems with 4K pages, then when we bumped the buffer size to 4K with order 1 pages we were accessing offsets 2K and 6K instead of 0 and 4K. This was resulting in memory corruptions. Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Yi Zou <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-04-17ixgbe: add missing rtnl_lock in PM resume pathBenjamin Poirier1-0/+2
Upon resume from standby, ixgbe may trigger the ASSERT_RTNL() in netif_set_real_num_tx_queues(). The call stack is: netif_set_real_num_tx_queues ixgbe_set_num_queues ixgbe_init_interrupt_scheme ixgbe_resume Signed-off-by: Benjamin Poirier <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-04-17ath9k: Fix TX fragmentationSujith Manoharan1-1/+9
Assigning sequence number for frames without taking care of the fragment field breaks transmission of fragmented frames. Fix this by assigning the fragment number properly. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-17mac80211: fix logic error in ibss channel type checkFelix Fietkau1-2/+2
The broken check leads to rate control attempting to use HT40 while the driver is configured for HT20. This leads to interesting hardware issues. HT40 can only be used if the channel type is either HT40- or HT40+ and if the channel type of the cell matches the local type. Signed-off-by: Felix Fietkau <[email protected]> Cc: [email protected] Signed-off-by: John W. Linville <[email protected]>
2012-04-17MAINTAINERS: Add maintainer for iwlwifiWey-Yi Guy1-0/+1
Add Johannes Berg as the primary maintainer for iwlwifi driver Signed-off-by: Wey-Yi Guy <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-17mac80211: fix truncated packets in cooked monitor rxFelix Fietkau1-4/+6
Cooked monitor rx was recently changed to use ieee80211_add_rx_radiotap_header instead of generating only limited radiotap information. ieee80211_add_rx_radiotap_header assumes that FCS info is still present if the hardware supports receiving it, however when cooked monitor rx packets are processed, FCS info has already been stripped. Fix this by adding an extra flag indicating FCS presence. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-16dummy: Add ndo_uninit().Hiroaki SHIMODA1-3/+3
In register_netdevice(), when ndo_init() is successful and later some error occurred, ndo_uninit() will be called. So dummy deivce is desirable to implement ndo_uninit() method to free percpu stats for this case. And, ndo_uninit() is also called along with dev->destructor() when device is unregistered, so in order to prevent dev->dstats from being freed twice, dev->destructor is modified to free_netdev(). Signed-off-by: Hiroaki SHIMODA <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-16net: usb: smsc75xx: fix mtuStephane Fillod1-0/+1
Make smsc75xx recalculate the hard_mtu after adjusting the hard_header_len. Without this, usbnet adjusts the MTU down to 1492 bytes, and the host is unable to receive standard 1500-byte frames from the device. Inspired by same fix on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9. Tested on ARM/Omap3 with EVB-LAN7500-LC. Signed-off-by: Stephane Fillod <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-16net_sched: red: Make minor corrections to commentsDavid Ward1-3/+3
Signed-off-by: David Ward <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-16net_sched: gred: Fix oops in gred_dump() in WRED modeDavid Ward1-5/+2
A parameter set exists for WRED mode, called wred_set, to hold the same values for qavg and qidlestart across all VQs. The WRED mode values had been previously held in the VQ for the default DP. After these values were moved to wred_set, the VQ for the default DP was no longer created automatically (so that it could be omitted on purpose, to have packets in the default DP enqueued directly to the device without using RED). However, gred_dump() was overlooked during that change; in WRED mode it still reads qavg/qidlestart from the VQ for the default DP, which might not even exist. As a result, this command sequence will cause an oops: tc qdisc add dev $DEV handle $HANDLE parent $PARENT gred setup \ DPs 3 default 2 grio tc qdisc change dev $DEV handle $HANDLE gred DP 0 prio 8 $RED_OPTIONS tc qdisc change dev $DEV handle $HANDLE gred DP 1 prio 8 $RED_OPTIONS This fixes gred_dump() in WRED mode to use the values held in wred_set. Signed-off-by: David Ward <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-16can: usb: PCAN-USB Pro: fix mem leaks in pcan_usb_pro_init() on error pathsJesper Juhl1-0/+2
If either call to pcan_usb_pro_send_req() in drivers/net/can/usb/peak_usb/pcan_usb_pro.c::pcan_usb_pro_init() fails, we'll leak the memory we allocated to 'usb_if' with kzalloc() when the 'usb_if' variable goes out of scope without having been assigned to anything as we 'return err;'. Fix this by adding appropriate kfree(usb_if) calls to the error paths. Signed-off-by: Jesper Juhl <[email protected]> Acked-by: Stephane Grosjean <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2012-04-16bcma: use fallback sprom if no on chip sprom is availableHauke Mehrtens1-2/+5
bcma should check for a fallback sprom every time it can not find a sprom on the card itself or a normal external sprom mapped into the memory of the chip. When otp sprom support was introduced it tried to read out the sprom from the wireless chip also if no otp sprom was available. This caused a Data bus error in bcma_sprom_get() when reading out the sprom for the SoC. This fixes a regression introduced in commit: commit 10d8493cd9efd38b1947b7a74276dbdc8311aa1a Author: Arend van Spriel <[email protected]> Date: Tue Mar 6 15:50:48 2012 +0100 bcma: add support for on-chip OTP memory used for SPROM storage This patch was tested on a Netgear WNDR3400 (Broadcom BCM4718 SoC). Reported-by: Nick Bowler <[email protected]> Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-14net/ethernet: ks8851_mll fix rx frame buffer overflowDavide Ciminaghi1-1/+1
At the beginning of ks_rcv(), a for loop retrieves the header information relevant to all the frames stored in the mac's internal buffers. The number of pending frames is stored as an 8 bits field in KS_RXFCTR. If interrupts are disabled long enough to allow for more than 32 frames to accumulate in the MAC's internal buffers, a buffer overflow occurs. This patch fixes the problem by making the driver's frame_head_info buffer big enough. Well actually, since the chip appears to have 12K of internal rx buffers and the shortest ethernet frame should be 64 bytes long, maybe the limit could be set to 12*1024/64 = 192 frames, but 255 should be safer. Signed-off-by: Davide Ciminaghi <[email protected]> Signed-off-by: Raffaele Recalcati <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-14ixgbe: fix WoL issue with fiberDon Skidmore1-0/+10
There are times we turn of the laser before shutdown. This is a bad thing if we want to wake on lan to work so now we make sure the laser is on before shutdown if we support WoL. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-04-14e1000e: issues in Sx on 82577/8/9Bruce Allan1-5/+10
A workaround was previously put in the driver to reset the device when transitioning to Sx in order to activate the changed settings of the PHY OEM bits (Low Power Link Up, or LPLU, and GbE disable configuration) for 82577/8/9 devices. After further review, it was found such a reset can cause the 82579 to confuse which version of 82579 it actually is and broke LPLU on all 82577/8/9 devices. The workaround during an S0->Sx transition on 82579 (instead of resetting the PHY) is to restart auto-negotiation after the OEM bits are configured; the restart of auto-negotiation activates the new OEM bits as does the reset. With 82577/8, the reset is changed to a generic reset which fixes the LPLU bits getting set wrong. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-04-13net: smsc911x: fix skb handling in receive pathWill Deacon1-9/+5
The SMSC911x driver resets the ->head, ->data and ->tail pointers in the skb on the reset path in order to avoid buffer overflow due to packet padding performed by the hardware. This patch fixes the receive path so that the skb pointers are fixed up after the data has been read from the device, The error path is also fixed to use number of words consistently and prevent erroneous FIFO fastforwarding when skipping over bad data. Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13mwifiex: update pcie8766 scratch register addressesBing Zhao1-9/+9
The scratch register addresses have been changed for newer chips. Since the old chip was never shipped and it will not be supported any more, just update register addresses to support the new chips. Cc: <[email protected]> # 3.2.y, 3.3.y Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-13ath9k: wake up the hardware from full sleep when idle is turned offFelix Fietkau1-1/+8
The hardware needs a reset to recover from full sleep. Issue this reset directly in the ath9k_config call that turns off idle, otherwise tx remains dead until the first channel change after the idle state change Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-13ath5k: unmap io memory on probe failureJonathan Bither1-2/+4
Signed-off-by: Jonathan Bither <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-13ath5k: fix undefined 'THIS_MODULE'Jonathan Bither1-0/+1
When cross compiling ath5k for a Mips machine with kernel 3.2.14 the compilation fails with "/ath5k/ahb.c:231:12: error: 'THIS_MODULE' undeclared here (not in a function)" Fix the build by including <linux/export.h> Signed-off-by: Jonathan Bither <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-13cfg80211: fix interface combinations check.Lukasz Kucharczyk1-1/+1
Signed-off-by: Lukasz Kucharczyk <[email protected]> Cc: [email protected] Signed-off-by: John W. Linville <[email protected]>
2012-04-13brcm80211: smac: resume transmit fifo upon receiving framesArend van Spriel1-0/+8
There have been reports about not being able to use access-points on channel 12 and 13 or having connectivity issues when these channels were part of the selected regulatory domain. Upon switching to these channels the brcmsmac driver suspends the transmit dma fifos. This patch resumes them upon handing over the first received beacon to mac80211. This patch is to be applied to the stable tree for kernel versions 3.2 and 3.3. Cc: [email protected] Tested-by: Francesco Saverio Schiavarelli <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Brett Rudley <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-13libertas: fix signedness bug in lbs_auth_to_authtype()Amitkumar Karwar1-2/+7
Return type for lbs_auth_to_authtype() is changed from "u8" to "int" to return negative error code correctly. Also an error check is added in connect handler for invalid auth type. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kiran Divekar <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-04-13ks8851: Fix missing mutex_lock/unlockMatt Renzelmann1-4/+4
Move the ks8851_rdreg16 call above the call to request_irq and cache the result for subsequent repeated use. A spurious interrupt may otherwise cause a crash. Thanks to Stephen Boyd, Flavio Leitner, and Ben Hutchings for feedback. Signed-off-by: Matt Renzelmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13drivers/net/ethernet/xilinx/axi ethernet: Correct CopyrightMichal Simek4-11/+9
Also fix MAINTAINERS file to reflect autorship. Daniel and Ariane changed coding style but not any functional changes in the driver itself. Signed-off-by: Michal Simek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-138139cp: set intr mask after its handler is registeredJason Wang1-2/+8
We set intr mask before its handler is registered, this does not work well when 8139cp is sharing irq line with other devices. As the irq could be enabled by the device before 8139cp's hander is registered which may lead unhandled irq. Fix this by introducing an helper cp_irq_enable() and call it after request_irq(). Signed-off-by: Jason Wang <[email protected]> Reviewed-by: Flavio Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13atl1: fix kernel panic in case of DMA errorsTony Zelenoff3-10/+7
Problem: There was two separate work_struct structures which share one handler. Unfortunately getting atl1_adapter structure from work_struct in case of DMA error was done from incorrect offset which cause kernel panics. Solution: The useless work_struct for DMA error removed and handler name changed to more generic one. Signed-off-by: Tony Zelenoff <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13skbuff: struct ubuf_info callback type safetyMichael S. Tsirkin4-8/+8
The skb struct ubuf_info callback gets passed struct ubuf_info itself, not the arg value as the field name and the function signature seem to imply. Rename the arg field to ctx to match usage, add documentation and change the callback argument type to make usage clear and to have compiler check correctness. Signed-off-by: Michael S. Tsirkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13ppp: Fix race condition with queue start/stopDavid Woodhouse1-9/+6
Commit e675f0cc9a872fd152edc0c77acfed19bf28b81e ("ppp: Don't stop and restart queue on every TX packet") introduced a race condition which could leave the net queue stopped even when the channel is no longer busy. By calling netif_stop_queue() from ppp_start_xmit(), based on the return value from ppp_xmit_process() but *after* all the locks have been dropped, we could potentially do so *after* the channel has actually finished transmitting and attempted to re-wake the queue. Fix this by moving the netif_stop_queue() into ppp_xmit_process() under the xmit lock. I hadn't done this previously, because it gets called from other places than ppp_start_xmit(). But I now think it's the better option. The net queue *should* be stopped if the channel becomes congested due to writes from pppd, anyway. Signed-off-by: David Woodhouse <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13ipv6: fix problem with expired dst cacheGao feng6-41/+99
If the ipv6 dst cache which copy from the dst generated by ICMPV6 RA packet. this dst cache will not check expire because it has no RTF_EXPIRES flag. So this dst cache will always be used until the dst gc run. Change the struct dst_entry,add a union contains new pointer from and expires. When rt6_info.rt6i_flags has no RTF_EXPIRES flag,the dst.expires has no use. we can use this field to point to where the dst cache copy from. The dst.from is only used in IPV6. rt6_check_expired check if rt6_info.dst.from is expired. ip6_rt_copy only set dst.from when the ort has flag RTF_ADDRCONF and RTF_DEFAULT.then hold the ort. ip6_dst_destroy release the ort. Add some functions to operate the RTF_EXPIRES flag and expires(from) together. and change the code to use these new adding functions. Changes from v5: modify ip6_route_add and ndisc_router_discovery to use new adding functions. Only set dst.from when the ort has flag RTF_ADDRCONF and RTF_DEFAULT.then hold the ort. Signed-off-by: Gao feng <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13caif_hsi: use dev_dbg not dev_err for reportingKim Lilliestierna XX1-2/+2
Use dev_dbg instead of dev_err for reporting in cfhsi_wakeup_cb. Signed-off-by: Kim Lilliestierna <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-13caif-hsi: Free flip_buffer at shutdown[email protected]1-2/+3
Fix memory leak of RX flip-buffer. Signed-off-by: Sjur Brændeland <[email protected]> Signed-off-by: David S. Miller <[email protected]>