1. 30 6月, 2019 1 次提交
  2. 29 6月, 2019 3 次提交
  3. 28 6月, 2019 1 次提交
    • L
      mt76: usb: fix rx A-MSDU support · 2a92b08b
      Lorenzo Bianconi 提交于
      Commit f8f527b1 ("mt76: usb: use EP max packet aligned buffer sizes
      for rx") breaks A-MSDU support. When A-MSDU is enable the device can
      receive frames up to q->buf_size but they will be discarded in
      mt76u_process_rx_entry since there is no enough room for
      skb_shared_info. Fix the issue reallocating the skb and copying in the
      linear area the first 128B of the received frames and in the frag_list
      the remaining part
      
      Fixes: f8f527b1 ("mt76: usb: use EP max packet aligned buffer sizes for rx")
      Signed-off-by: NLorenzo Bianconi <lorenzo@kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      2a92b08b
  4. 27 6月, 2019 4 次提交
  5. 26 6月, 2019 2 次提交
    • Y
      bonding: Always enable vlan tx offload · 30d8177e
      YueHaibing 提交于
      We build vlan on top of bonding interface, which vlan offload
      is off, bond mode is 802.3ad (LACP) and xmit_hash_policy is
      BOND_XMIT_POLICY_ENCAP34.
      
      Because vlan tx offload is off, vlan tci is cleared and skb push
      the vlan header in validate_xmit_vlan() while sending from vlan
      devices. Then in bond_xmit_hash, __skb_flow_dissect() fails to
      get information from protocol headers encapsulated within vlan,
      because 'nhoff' is points to IP header, so bond hashing is based
      on layer 2 info, which fails to distribute packets across slaves.
      
      This patch always enable bonding's vlan tx offload, pass the vlan
      packets to the slave devices with vlan tci, let them to handle
      vlan implementation.
      
      Fixes: 278339a4 ("bonding: propogate vlan_features to bonding master")
      Suggested-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30d8177e
    • K
      ath: fix SPDX tags · 0766789b
      Kalle Valo 提交于
      Commit ec8f24b7 ("treewide: Add SPDX license identifier -
      Makefile/Kconfig") marked various Makefiles and Kconfig files within ath
      directories as GPL-2.0. But these modules and drivers are actually ISC:
      
      * ath
      * ar5523
      * ath10k
      * ath5k
      * ath6kl
      * ath9k
      * wcn36xx
      * wil6210
      
      Fix SPDX tags accordingly.
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      0766789b
  6. 25 6月, 2019 1 次提交
    • B
      qmi_wwan: Fix out-of-bounds read · 904d88d7
      Bjørn Mork 提交于
      The syzbot reported
      
       Call Trace:
        __dump_stack lib/dump_stack.c:77 [inline]
        dump_stack+0xca/0x13e lib/dump_stack.c:113
        print_address_description+0x67/0x231 mm/kasan/report.c:188
        __kasan_report.cold+0x1a/0x32 mm/kasan/report.c:317
        kasan_report+0xe/0x20 mm/kasan/common.c:614
        qmi_wwan_probe+0x342/0x360 drivers/net/usb/qmi_wwan.c:1417
        usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361
        really_probe+0x281/0x660 drivers/base/dd.c:509
        driver_probe_device+0x104/0x210 drivers/base/dd.c:670
        __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:777
        bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454
      
      Caused by too many confusing indirections and casts.
      id->driver_info is a pointer stored in a long.  We want the
      pointer here, not the address of it.
      
      Thanks-to: Hillf Danton <hdanton@sina.com>
      Reported-by: syzbot+b68605d7fadd21510de1@syzkaller.appspotmail.com
      Cc: Kristian Evensen <kristian.evensen@gmail.com>
      Fixes: e4bf6348 ("qmi_wwan: Add quirk for Quectel dynamic config")
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      904d88d7
  7. 24 6月, 2019 7 次提交
  8. 23 6月, 2019 3 次提交
  9. 22 6月, 2019 2 次提交
  10. 20 6月, 2019 2 次提交
  11. 19 6月, 2019 10 次提交
  12. 18 6月, 2019 3 次提交
    • D
      brcmfmac: sdio: Don't tune while the card is off · 65dade60
      Douglas Anderson 提交于
      When Broadcom SDIO cards are idled they go to sleep and a whole
      separate subsystem takes over their SDIO communication.  This is the
      Always-On-Subsystem (AOS) and it can't handle tuning requests.
      
      Specifically, as tested on rk3288-veyron-minnie (which reports having
      BCM4354/1 in dmesg), if I force a retune in brcmf_sdio_kso_control()
      when "on = 1" (aka we're transition from sleep to wake) by whacking:
        bus->sdiodev->func1->card->host->need_retune = 1
      ...then I can often see tuning fail.  In this case dw_mmc reports "All
      phases bad!").  Note that I don't get 100% failure, presumably because
      sometimes the card itself has already transitioned away from the AOS
      itself by the time we try to wake it up.  If I force retuning when "on
      = 0" (AKA force retuning right before sending the command to go to
      sleep) then retuning is always OK.
      
      NOTE: we need _both_ this patch and the patch to avoid triggering
      tuning due to CRC errors in the sleep/wake transition, AKA ("brcmfmac:
      sdio: Disable auto-tuning around commands expected to fail").  Though
      both patches handle issues with Broadcom's AOS, the problems are
      distinct:
      1. We want to defer (but not ignore) asynchronous (like
         timer-requested) tuning requests till the card is awake.  However,
         we want to ignore CRC errors during the transition, we don't want
         to queue deferred tuning request.
      2. You could imagine that the AOS could implement retuning but we
         could still get errors while transitioning in and out of the AOS.
         Similarly you could imagine a seamless transition into and out of
         the AOS (with no CRC errors) even if the AOS couldn't handle
         tuning.
      
      ALSO NOTE: presumably there is never a desperate need to retune in
      order to wake up the card, since doing so is impossible.  Luckily the
      only way the card can get into sleep state is if we had a good enough
      tuning to send it the command to put it into sleep, so presumably that
      "good enough" tuning is enough to wake us up, at least with a few
      retries.
      
      Cc: stable@vger.kernel.org #v4.18+
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Acked-by: NKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      65dade60
    • D
      brcmfmac: sdio: Disable auto-tuning around commands expected to fail · 2de0b42d
      Douglas Anderson 提交于
      There are certain cases, notably when transitioning between sleep and
      active state, when Broadcom SDIO WiFi cards will produce errors on the
      SDIO bus.  This is evident from the source code where you can see that
      we try commands in a loop until we either get success or we've tried
      too many times.  The comment in the code reinforces this by saying
      "just one write attempt may fail"
      
      Unfortunately these failures sometimes end up causing an "-EILSEQ"
      back to the core which triggers a retuning of the SDIO card and that
      blocks all traffic to the card until it's done.
      
      Let's disable retuning around the commands we expect might fail.
      
      Cc: stable@vger.kernel.org #v4.18+
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Acked-by: NAdrian Hunter <adrian.hunter@intel.com>
      Reviewed-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Acked-by: NKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      2de0b42d
    • D
      Revert "brcmfmac: disable command decode in sdio_aos" · abdd5dcc
      Douglas Anderson 提交于
      This reverts commit 29f65891.
      
      After that patch landed I find that my kernel log on
      rk3288-veyron-minnie and rk3288-veyron-speedy is filled with:
      brcmfmac: brcmf_sdio_bus_sleep: error while changing bus sleep state -110
      
      This seems to happen every time the Broadcom WiFi transitions out of
      sleep mode.  Reverting the commit fixes the problem for me, so that's
      what this patch does.
      
      Note that, in general, the justification in the original commit seemed
      a little weak.  It looked like someone was testing on a SD card
      controller that would sometimes die if there were CRC errors on the
      bus.  This used to happen back in early days of dw_mmc (the controller
      on my boards), but we fixed it.  Disabling a feature on all boards
      just because one SD card controller is broken seems bad.
      
      Fixes: 29f65891 ("brcmfmac: disable command decode in sdio_aos")
      Cc: Wright Feng <wright.feng@cypress.com>
      Cc: Double Lo <double.lo@cypress.com>
      Cc: Madhan Mohan R <madhanmohan.r@cypress.com>
      Cc: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Cc: stable@vger.kernel.org
      Acked-by: NKalle Valo <kvalo@codeaurora.org>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      abdd5dcc
  13. 17 6月, 2019 1 次提交
    • I
      be2net: Fix number of Rx queues used for flow hashing · 718f4a25
      Ivan Vecera 提交于
      Number of Rx queues used for flow hashing returned by the driver is
      incorrect and this bug prevents user to use the last Rx queue in
      indirection table.
      
      Let's say we have a NIC with 6 combined queues:
      
      [root@sm-03 ~]# ethtool -l enp4s0f0
      Channel parameters for enp4s0f0:
      Pre-set maximums:
      RX:             5
      TX:             5
      Other:          0
      Combined:       6
      Current hardware settings:
      RX:             0
      TX:             0
      Other:          0
      Combined:       6
      
      Default indirection table maps all (6) queues equally but the driver
      reports only 5 rings available.
      
      [root@sm-03 ~]# ethtool -x enp4s0f0
      RX flow hash indirection table for enp4s0f0 with 5 RX ring(s):
          0:      0     1     2     3     4     5     0     1
          8:      2     3     4     5     0     1     2     3
         16:      4     5     0     1     2     3     4     5
         24:      0     1     2     3     4     5     0     1
      ...
      
      Now change indirection table somehow:
      
      [root@sm-03 ~]# ethtool -X enp4s0f0 weight 1 1
      [root@sm-03 ~]# ethtool -x enp4s0f0
      RX flow hash indirection table for enp4s0f0 with 6 RX ring(s):
          0:      0     0     0     0     0     0     0     0
      ...
         64:      1     1     1     1     1     1     1     1
      ...
      
      Now it is not possible to change mapping back to equal (default) state:
      
      [root@sm-03 ~]# ethtool -X enp4s0f0 equal 6
      Cannot set RX flow hash configuration: Invalid argument
      
      Fixes: 594ad54a ("be2net: Add support for setting and getting rx flow hash options")
      Reported-by: NTianhao <tizhao@redhat.com>
      Signed-off-by: NIvan Vecera <ivecera@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      718f4a25