29 Sep, 2013

4 commits

  • A host might need net_secret[] and never open a single socket.

    Problem added in commit aebda156a570782
    ("net: defer net_secret[] initialization")

    Based on prior patch from Hannes Frederic Sowa.

    Reported-by: Hannes Frederic Sowa
    Signed-off-by: Eric Dumazet
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • There is currently serialization network namespaces exiting and
    network devices exiting as the final part of netdev_run_todo does not
    happen under the rtnl_lock. This is compounded by the fact that the
    only list of devices unregistering in netdev_run_todo is local to the
    netdev_run_todo.

    This lack of serialization in extreme cases results in network devices
    unregistering in netdev_run_todo after the loopback device of their
    network namespace has been freed (making dst_ifdown unsafe), and after
    the their network namespace has exited (making the NETDEV_UNREGISTER,
    and NETDEV_UNREGISTER_FINAL callbacks unsafe).

    Add the missing serialization by a per network namespace count of how
    many network devices are unregistering and having a wait queue that is
    woken up whenever the count is decreased. The count and wait queue
    allow default_device_exit_batch to wait until all of the unregistration
    activity for a network namespace has finished before proceeding to
    unregister the loopback device and then allowing the network namespace
    to exit.

    Only a single global wait queue is used because there is a single global
    lock, and there is a single waiter, per network namespace wait queues
    would be a waste of resources.

    The per network namespace count of unregistering devices gives a
    progress guarantee because the number of network devices unregistering
    in an exiting network namespace must ultimately drop to zero (assuming
    network device unregistration completes).

    The basic logic remains the same as in v1. This patch is now half
    comment and half rtnl_lock_unregistering an expanded version of
    wait_event performs no extra work in the common case where no network
    devices are unregistering when we get to default_device_exit_batch.

    Reported-by: Francesco Ruggeri
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • When a router is doing DNAT for 6to4/6rd packets the latest
    anti-spoofing commit 218774dc ("ipv6: add anti-spoofing checks for
    6to4 and 6rd") will drop them because the IPv6 address embedded does
    not match the IPv4 destination. This patch will allow them to pass by
    testing if we have an address that matches on 6to4/6rd interface. I
    have been hit by this problem using Fedora and IPV6TO4_IPV4ADDR.
    Also, log the dropped packets (with rate limit).

    Signed-off-by: Catalin(ux) M. BOIE
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Catalin\(ux\) M. BOIE
     
  • Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG
    if the usb host controller is capable of building packet from
    discontinuous buffers, but missed handling padding packet when
    building DMA SG.

    This patch attachs the pre-allocated padding packet at the
    end of the sg list, so padding packet can be sent to device
    if drivers require that.

    Reported-by: David Laight
    Acked-by: Oliver Neukum
    Signed-off-by: Ming Lei
    Signed-off-by: David S. Miller

    Ming Lei
     

28 Sep, 2013

11 commits

  • o Commit 7e2cf4feba058476324dc545e3d1b316998c91e6
    ("qlcnic: change driver hardware interface mechanism")
    has overwritten
    commit b43e5ee76a4320c070cf0fe65cf4927198fbb4d1
    ("qlcnic: Register device in FAILED state")

    Signed-off-by: Sucheta Chakraborty
    Signed-off-by: David S. Miller

    Sucheta Chakraborty
     
  • VLAN priority is not being displayed for a VF currently when user executes
    "ip link show" command. This patch fixes it.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • Thix fix allows the VLAN priority to be configured for a VF interface
    via the "ip link set DEVICE vf NUM" path.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • Now the VF interfaces have privilege to add VLANs.
    Allow VLANs to be configured on these interfaces.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • In BE3-R, when UMC is enabled, the number of VLANs that can be added
    to the interface is reduced to 15.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • When the interface runs out of the allocated entries in VLAN table,
    we program the interface in VLAN promiscuous mode.
    Use OPCODE_COMMON_NTWK_RX_FILTER to set VLAN Promiscuous mode
    instead of OPCODE_COMMON_NTWK_VLAN_CONFIG.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • Size of be_nic_res_desc structure is incorrect. Fix it.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • Tx on SH-R can lockup if the packet size is less than 32 bytes.
    Pad such packets to a safer 36-byte size.
    Patch uses the Lancer-R workaround - which checks for packet
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • John W. Linville says:

    ====================
    Regarding the Bluetooth bits, Gustavo says:

    "First Bluetooth fixes to 3.12, it includes:

    * 3 patches to add device id for 3 new hardwares.

    * 2 patches from Johan to fix the rfkill behaviour during setup stage

    * a small clean up in the rfcomm TTY code that fixes a potential racy
    condition (by Gianluca Anzolin)

    * 2 fixes to proper set encryption key size and security level in the
    peripheral role of Bluetooth LE devices. (by Andre Guedes)

    * a fix for dealing devices where pairing is not necessary, we were keeping
    the Bluetooth ACL connection alive for too much time. (by Syam Sidhardhan)"

    Also, I fixed-up an curly-brace indentation problem in the Bluetooth
    code while merging. On top of that...

    Alexey Khoroshilov brings a p54usb fix to avoid a resource leak when
    request_firmware_nowait fails.

    Amitkumar Karwar fixes a firmware hang caused by too much header data
    being appended for USB devices using the mwifiex driver.

    Arend van Spriel provides three fixes: a brcmfmac fix to relocate some
    driver code outside of an .init section; a scheduling while atomic
    fix for bcma; and, another scheduling while atomic fix for brcmsmac.

    Bing Zhao offers a pair of mwifiex fixes: a code change to avoid
    firmware timeouts on USB; and a fix for a NULL pointer dereference.

    Christian Lamparter adds a device ID to p54usb.

    Felix Fietkau implements a quartet of small ath9k fixes, including
    a locking fix, a list management fix, a fix to properly mark a stale
    buffer, and an aggregate buffering fix.

    Larry Finger champions a data alignment fix to make rtlwifi work
    better with ARM builds.

    Solomon Peachy reverts an earlier interrupt handling fix for cw1200
    and replaces it with a new threaded oneshot irq handler implementation.

    Sujith Manoharan fixes an ath9k regression by reverting an earlier
    patch.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Jeff Kirsher says:

    ====================
    Intel Wired LAN Driver Updates

    This series contains updates to igb and i40e.

    Todd provides a fix for 82580 devices in igb, where the ethtool
    loopback test was missing 82580 copper devices.

    Jesse provides five fixes/cleanups to i40e based on feedback from
    Joe Perches and the community.

    v2: fixed up patch 5 in the series based on feedback from Joe Perches
    and David Miller
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • …wireless into for-davem

    Also fixed-up a badly indented closing brace...

    Signed-off-by: John W. Linville <linville@tuxdriver.com>

    John W. Linville
     

27 Sep, 2013

25 commits

  • coccicheck shows:

    drivers/net/ethernet/intel/i40e/i40e_adminq.c:704:2-8: Replace memcpy
    with struct assignment
    drivers/net/ethernet/intel/i40e/i40e_adminq.c:763:1-7: Replace memcpy
    with struct assignment
    drivers/net/ethernet/intel/i40e/i40e_adminq.c:810:2-8: Replace memcpy
    with struct assignment
    drivers/net/ethernet/intel/i40e/i40e_common.c:510:2-8: Replace memcpy
    with struct assignment

    Fix each of them with a *a = *b;

    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • As mentioned by Joe Perches, clean up return values in some functions
    making sure to have consistent return types, not mixing types.

    A couple of Joe's comments suggested returning void, but since
    the functions in question are ndo defined, the return values are fixed.
    So make a comment in the header that notes this is a function called by
    net_device_ops.

    v2: fix post increment bug in return

    CC: Joe Perches
    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • When calling admin queue functions the driver should use aq_ret
    variable to help make clear that the return value is not a regular
    return variable.

    This allows for clean up of the return types that were previously
    converted to int.

    Signed-off-by: Jesse Brandeburg
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • As mentioned by Joe Perches clean up a loop flow.

    Signed-off-by: Jesse Brandeburg
    CC: Joe Perches
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • As mentioned by Joe Perches, we should be using
    foo = alloc(...)
    if (!foo)
    return -ENOMEM;

    return 0;

    Signed-off-by: Jesse Brandeburg
    CC: Joe Perches
    Tested-by: Kavindya Deegala
    Signed-off-by: Jeff Kirsher

    Jesse Brandeburg
     
  • Add back 82580 loopback tests to ethtool.

    Signed-off-by: Todd Fujinaka
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Todd Fujinaka
     
  • David S. Miller
     
  • Outgoing packets sent by via-rhine have their VLAN PCP field off by one
    (when hardware acceleration is enabled). The TX descriptor expects only VID
    and PCP (without a CFI/DEI bit).

    Peter Boström noticed and reported the bug.

    Signed-off-by: Roger Luethi
    Cc: Peter Boström
    Signed-off-by: David S. Miller

    Roger Luethi
     
  • This patch adds explicit call to bcma_core_pci_power_save() from
    a non-atomic context resolving 'scheduling while atomic' issue.

    [ 13.224317] BUG: scheduling while atomic: dhcpcd/1800/0x00000202
    [ 13.224322] Modules linked in: brcmsmac nouveau coretemp kvm_intel kvm cordic brcmutil bcma dell_wmi atl1c ttm mxm_wmi wmi
    [ 13.224354] CPU: 0 PID: 1800 Comm: dhcpcd Tainted: G W 3.11.0-wl #1
    [ 13.224359] Hardware name: Alienware M11x R2/M11x R2, BIOS A04 11/23/2010
    [ 13.224363] ffff880177c12c40 ffff880170fd1968 ffffffff8169af5b 0000000000000007
    [ 13.224374] ffff880170fd1ad0 ffff880170fd1978 ffffffff81697ee2 ffff880170fd19f8
    [ 13.224383] ffffffff816a19f5 00000000000f4240 000000000000d080 ffff880170fd1fd8
    [ 13.224391] Call Trace:
    [ 13.224399] [] dump_stack+0x4f/0x84
    [ 13.224403] [] __schedule_bug+0x43/0x51
    [ 13.224409] [] __schedule+0x6e5/0x810
    [ 13.224412] [] schedule+0x24/0x70
    [ 13.224416] [] schedule_hrtimeout_range_clock+0x10c/0x150
    [ 13.224420] [] ? update_rmtp+0x60/0x60
    [ 13.224424] [] ? hrtimer_start_range_ns+0xf/0x20
    [ 13.224429] [] schedule_hrtimeout_range+0xe/0x10
    [ 13.224432] [] usleep_range+0x3b/0x40
    [ 13.224437] [] bcma_pcie_mdio_read.isra.5+0x8a/0x100 [bcma]
    [ 13.224442] [] bcma_pcie_mdio_writeread.isra.6.constprop.13+0x25/0x30 [bcma]
    [ 13.224448] [] bcma_core_pci_power_save+0x49/0x80 [bcma]
    [ 13.224452] [] bcma_core_pci_up+0x2d/0x60 [bcma]
    [ 13.224460] [] brcms_c_up+0xfc/0x430 [brcmsmac]
    [ 13.224467] [] brcms_up+0x1d/0x20 [brcmsmac]
    [ 13.224473] [] brcms_ops_start+0x298/0x340 [brcmsmac]
    [ 13.224478] [] ? cfg80211_netdev_notifier_call+0xd2/0x5f0
    [ 13.224483] [] ? packet_notifier+0xad/0x1d0
    [ 13.224487] [] ieee80211_do_open+0x325/0xf80
    [ 13.224491] [] ? __raw_notifier_call_chain+0x9/0x10
    [ 13.224495] [] ieee80211_open+0x71/0x80
    [ 13.224498] [] __dev_open+0x87/0xe0
    [ 13.224502] [] __dev_change_flags+0x9c/0x180
    [ 13.224505] [] dev_change_flags+0x23/0x70
    [ 13.224509] [] devinet_ioctl+0x5b8/0x6a0
    [ 13.224512] [] inet_ioctl+0x75/0x90
    [ 13.224516] [] sock_do_ioctl+0x2b/0x70
    [ 13.224519] [] sock_ioctl+0x71/0x2a0
    [ 13.224523] [] do_vfs_ioctl+0x87/0x520
    [ 13.224528] [] ? ____fput+0x9/0x10
    [ 13.224533] [] ? task_work_run+0x9c/0xd0
    [ 13.224537] [] SyS_ioctl+0x91/0xb0
    [ 13.224541] [] system_call_fastpath+0x16/0x1b

    Cc: # 3.11.x
    Cc: Tod Jackson
    Cc: Joe Perches
    Cc: Rafal Milecki
    Cc: Hauke Mehrtens
    Reviewed-by: Hante Meuleman
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Arend van Spriel
     
  • This patch removes the bcma_core_pci_power_save() call from
    the bcma_core_pci_{up,down}() functions as it tries to schedule
    thus requiring to call them from non-atomic context. The function
    bcma_core_pci_power_save() is now exported so the calling module
    can explicitly use it in non-atomic context. This fixes the
    'scheduling while atomic' issue reported by Tod Jackson and
    Joe Perches.

    [ 13.210710] BUG: scheduling while atomic: dhcpcd/1800/0x00000202
    [ 13.210718] Modules linked in: brcmsmac nouveau coretemp kvm_intel kvm cordic brcmutil bcma dell_wmi atl1c ttm mxm_wmi wmi
    [ 13.210756] CPU: 2 PID: 1800 Comm: dhcpcd Not tainted 3.11.0-wl #1
    [ 13.210762] Hardware name: Alienware M11x R2/M11x R2, BIOS A04 11/23/2010
    [ 13.210767] ffff880177c92c40 ffff880170fd1948 ffffffff8169af5b 0000000000000007
    [ 13.210777] ffff880170fd1ab0 ffff880170fd1958 ffffffff81697ee2 ffff880170fd19d8
    [ 13.210785] ffffffff816a19f5 00000000000f4240 000000000000d080 ffff880170fd1fd8
    [ 13.210794] Call Trace:
    [ 13.210813] [] dump_stack+0x4f/0x84
    [ 13.210826] [] __schedule_bug+0x43/0x51
    [ 13.210837] [] __schedule+0x6e5/0x810
    [ 13.210845] [] schedule+0x24/0x70
    [ 13.210855] [] schedule_hrtimeout_range_clock+0x10c/0x150
    [ 13.210867] [] ? update_rmtp+0x60/0x60
    [ 13.210877] [] ? hrtimer_start_range_ns+0xf/0x20
    [ 13.210887] [] schedule_hrtimeout_range+0xe/0x10
    [ 13.210897] [] usleep_range+0x3b/0x40
    [ 13.210910] [] bcma_pcie_mdio_set_phy.isra.3+0x4f/0x80 [bcma]
    [ 13.210921] [] bcma_pcie_mdio_write.isra.4+0xbf/0xd0 [bcma]
    [ 13.210932] [] bcma_pcie_mdio_writeread.isra.6.constprop.13+0x18/0x30 [bcma]
    [ 13.210942] [] bcma_core_pci_power_save+0x3e/0x80 [bcma]
    [ 13.210953] [] bcma_core_pci_up+0x2d/0x60 [bcma]
    [ 13.210975] [] brcms_c_up+0xfc/0x430 [brcmsmac]
    [ 13.210989] [] brcms_up+0x1d/0x20 [brcmsmac]
    [ 13.211003] [] brcms_ops_start+0x298/0x340 [brcmsmac]
    [ 13.211020] [] ? cfg80211_netdev_notifier_call+0xd2/0x5f0
    [ 13.211030] [] ? packet_notifier+0xad/0x1d0
    [ 13.211064] [] ieee80211_do_open+0x325/0xf80
    [ 13.211076] [] ? __raw_notifier_call_chain+0x9/0x10
    [ 13.211086] [] ieee80211_open+0x71/0x80
    [ 13.211101] [] __dev_open+0x87/0xe0
    [ 13.211109] [] __dev_change_flags+0x9c/0x180
    [ 13.211117] [] dev_change_flags+0x23/0x70
    [ 13.211127] [] devinet_ioctl+0x5b8/0x6a0
    [ 13.211136] [] inet_ioctl+0x75/0x90
    [ 13.211147] [] sock_do_ioctl+0x2b/0x70
    [ 13.211155] [] sock_ioctl+0x71/0x2a0
    [ 13.211169] [] do_vfs_ioctl+0x87/0x520
    [ 13.211180] [] ? ____fput+0x9/0x10
    [ 13.211198] [] ? task_work_run+0x9c/0xd0
    [ 13.211202] [] SyS_ioctl+0x91/0xb0
    [ 13.211208] [] system_call_fastpath+0x16/0x1b
    [ 13.211217] NOHZ: local_softirq_pending 202

    The issue was introduced in v3.11 kernel by following commit:

    commit aa51e598d04c6acf5477934cd6383f5a17ce9029
    Author: Hauke Mehrtens
    Date: Sat Aug 24 00:32:31 2013 +0200

    brcmsmac: use bcma PCIe up and down functions

    replace the calls to bcma_core_pci_extend_L1timer() by calls to the
    newly introduced bcma_core_pci_ip() and bcma_core_pci_down()

    Signed-off-by: Hauke Mehrtens
    Cc: Arend van Spriel
    Signed-off-by: John W. Linville

    This fix has been discussed with Hauke Mehrtens [1] selection
    option 3) and is intended for v3.12.

    Ref:
    [1] http://mid.gmane.org/5239B12D.3040206@hauke-m.de

    Cc: # 3.11.x
    Cc: Tod Jackson
    Cc: Joe Perches
    Cc: Rafal Milecki
    Cc: Hauke Mehrtens
    Reviewed-by: Hante Meuleman
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Arend van Spriel
     
  • The driver uses platform_driver_probe() to obtain platform data
    if any. However, that function is placed in the .init section so
    it must be called upon driver module initialization.

    The problem was reported by Fenguang Wu resulting in a kernel
    oops because the .init section was already freed.

    [ 48.966342] Switched to clocksource tsc
    [ 48.970002] kernel tried to execute NX-protected page - exploit attempt? (uid: 0)
    [ 48.970851] BUG: unable to handle kernel paging request at ffffffff82196446
    [ 48.970957] IP: [] classes_init+0x26/0x26
    [ 48.970957] PGD 1e76067 PUD 1e77063 PMD f388063 PTE 8000000002196163
    [ 48.970957] Oops: 0011 [#1]
    [ 48.970957] CPU: 0 PID: 17 Comm: kworker/0:1 Not tainted 3.11.0-rc7-00444-gc52dd7f #23
    [ 48.970957] Workqueue: events brcmf_driver_init
    [ 48.970957] task: ffff8800001d2000 ti: ffff8800001d4000 task.ti: ffff8800001d4000
    [ 48.970957] RIP: 0010:[] [] classes_init+0x26/0x26
    [ 48.970957] RSP: 0000:ffff8800001d5d40 EFLAGS: 00000286
    [ 48.970957] RAX: 0000000000000001 RBX: ffffffff820c5620 RCX: 0000000000000000
    [ 48.970957] RDX: 0000000000000001 RSI: ffffffff816f7380 RDI: ffffffff820c56c0
    [ 48.970957] RBP: ffff8800001d5d50 R08: ffff8800001d2508 R09: 0000000000000002
    [ 48.970957] R10: 0000000000000000 R11: 0001f7ce298c5620 R12: ffff8800001c76b0
    [ 48.970957] R13: ffffffff81e91d40 R14: 0000000000000000 R15: ffff88000e0ce300
    [ 48.970957] FS: 0000000000000000(0000) GS:ffffffff81e84000(0000) knlGS:0000000000000000
    [ 48.970957] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [ 48.970957] CR2: ffffffff82196446 CR3: 0000000001e75000 CR4: 00000000000006b0
    [ 48.970957] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [ 48.970957] DR3: 0000000000000000 DR6: 0000000000000000 DR7: 0000000000000000
    [ 48.970957] Stack:
    [ 48.970957] ffffffff816f7df8 ffffffff820c5620 ffff8800001d5d60 ffffffff816eeec9
    [ 48.970957] ffff8800001d5de0 ffffffff81073dc5 ffffffff81073d68 ffff8800001d5db8
    [ 48.970957] 0000000000000086 ffffffff820c5620 ffffffff824f7fd0 0000000000000000
    [ 48.970957] Call Trace:
    [ 48.970957] [] ? brcmf_sdio_init+0x18/0x70
    [ 48.970957] [] brcmf_driver_init+0x9/0x10
    [ 48.970957] [] process_one_work+0x1d5/0x480
    [ 48.970957] [] ? process_one_work+0x178/0x480
    [ 48.970957] [] worker_thread+0x118/0x3a0
    [ 48.970957] [] ? process_one_work+0x480/0x480
    [ 48.970957] [] kthread+0xe7/0xf0
    [ 48.970957] [] ? finish_task_switch.constprop.57+0x37/0xd0
    [ 48.970957] [] ? __kthread_parkme+0x80/0x80
    [ 48.970957] [] ret_from_fork+0x7a/0xb0
    [ 48.970957] [] ? __kthread_parkme+0x80/0x80
    [ 48.970957] Code: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
    cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
    [ 48.970957] RIP [] classes_init+0x26/0x26
    [ 48.970957] RSP
    [ 48.970957] CR2: ffffffff82196446
    [ 48.970957] ---[ end trace 62980817cd525f14 ]---

    Cc: # 3.10.x, 3.11.x
    Reported-by: Fengguang Wu
    Reviewed-by: Hante Meuleman
    Reviewed-by: Pieter-Paul Giesberts
    Tested-by: Fengguang Wu
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Arend van Spriel
     
  • Bug 60815 - Interface hangs in mwifiex_usb
    https://bugzilla.kernel.org/show_bug.cgi?id=60815

    [ 2.883807] BUG: unable to handle kernel NULL pointer dereference
    at 0000000000000048
    [ 2.883813] IP: [] pfifo_fast_enqueue+0x90/0x90

    [ 2.883834] CPU: 1 PID: 3220 Comm: kworker/u8:90 Not tainted
    3.11.1-monotone-l0 #6
    [ 2.883834] Hardware name: Microsoft Corporation Surface with
    Windows 8 Pro/Surface with Windows 8 Pro,
    BIOS 1.03.0450 03/29/2013

    On Surface Pro, suspend to ram gives a NULL pointer dereference in
    pfifo_fast_enqueue(). The stack trace reveals that the offending
    call is clearing carrier in mwifiex_usb suspend handler.

    Since commit 1499d9f "mwifiex: don't drop carrier flag over suspend"
    has removed the carrier flag handling over suspend/resume in SDIO
    and PCIe drivers, I'm removing it in USB driver too. This also fixes
    the bug for Surface Pro.

    Cc: # 3.5+
    Tested-by: Dmitry Khromov
    Signed-off-by: Bing Zhao
    Signed-off-by: John W. Linville

    Bing Zhao
     
  • Bug 60815 - Interface hangs in mwifiex_usb
    https://bugzilla.kernel.org/show_bug.cgi?id=60815

    We have 4 bytes of interface header for packets delivered to SDIO
    and PCIe, but not for USB interface.

    In Tx AMSDU case, currently 4 bytes of garbage data is unnecessarily
    appended for USB packets. This sometimes leads to a firmware hang,
    because it may not interpret the data packet correctly.

    Problem is fixed by removing this redundant headroom for USB.

    Cc: # 3.5+
    Tested-by: Dmitry Khromov
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    Signed-off-by: John W. Linville

    Amitkumar Karwar
     
  • Added USB ID for Corega WLUSB2GTST USB adapter.

    Cc:
    Reported-by: Joerg Kalisch
    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • This supercedes the older patch ("cw1200: Don't perform SPI transfers in
    interrupt context") that badly attempted to fix this problem.

    This is a far simpler solution, which has the added benefit of
    actually working.

    Signed-off-by: Solomon Peachy
    Signed-off-by: John W. Linville

    Solomon Peachy
     
  • This reverts commit aec8e88c947b7017e2b4bbcb68a4bfc4a1f8ad35.

    This solution turned out to cause interrupt delivery problems, and
    rather than trying to fix this approach, it has been scrapped in favor
    of an alternative (and far simpler) implementation.

    Signed-off-by: Solomon Peachy
    Signed-off-by: John W. Linville

    Solomon Peachy
     
  • For pcie8897, the hs_cfg cancel command (0xe5) times out when host
    comes out of suspend. This is caused by an incompleted host sleep
    handshake between driver and firmware.

    Like SDIO interface, PCIe also needs to go through firmware power
    save events to complete the handshake for host sleep configuration.
    Only USB interface doesn't require power save events for hs_cfg.

    Cc: # 3.10+
    Signed-off-by: Bing Zhao
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: John W. Linville

    Bing Zhao
     
  • The private array at the end of the rtl_priv struct is not aligned.
    On ARM architecture, this causes an alignment trap and is fixed by aligning
    that array with __align(sizeof(void *)). That should properly align that
    space according to the requirements of all architectures.

    Reported-by: Jason Andrews
    Tested-by: Jason Andrews
    Signed-off-by: Larry Finger
    Cc: Stable
    Signed-off-by: John W. Linville

    Larry Finger
     
  • Prevents race conditions when un-aggregated frames are pending in the
    driver.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • If request_firmware_nowait() fails in p54u_load_firmware(),
    p54u_load_firmware_cb is not called and no one decrements usb_dev refcnt.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Signed-off-by: John W. Linville

    Alexey Khoroshilov
     
  • When .release_buffered_frames was implemented, only A-MPDU packets were
    buffered internally. Now that this has changed, the BUF_AMPDU flag needs
    to be checked before calling ath_tx_addto_baw

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • The commit "ath9k: Optimize LNA check" tried
    to use the "rs_firstaggr" flag to optimize the LNA
    combining algorithm when processing subframes in
    an A-MPDU. This doesn't appear to work well in practice,
    so revert it and use the old method of relying on
    "rs_moreaggr".

    Cc: stable@vger.kernel.org # 3.11
    Signed-off-by: Sujith Manoharan
    Signed-off-by: John W. Linville

    Sujith Manoharan
     
  • This might trip up tx completion processing, although the condition that
    triggers this should not (yet) occur in practice.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • Fixes a regression from commit
    "ath9k: shrink a few data structures by reordering fields"

    When cloning a buffer, the stale flag (part of bf_state now) needs to be
    reset after copying the state to prevent tx processing hangs.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • John W. Linville