1. 29 Mar, 2016 1 commit
    • Bjørn Mork's avatar
      qmi_wwan: add "D-Link DWM-221 B1" device id · e84810c7
      Bjørn Mork authored
      Thomas reports:
      "Windows:
      
      00 diagnostics
      01 modem
      02 at-port
      03 nmea
      04 nic
      
      Linux:
      
      T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=2001 ProdID=7e19 Rev=02.32
      S:  Manufacturer=Mobile Connect
      S:  Product=Mobile Connect
      S:  SerialNumber=0123456789ABCDEF
      C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
      I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
      I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
      I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage"
      Reported-by: default avatarThomas Schäfer <tschaefer@t-online.de>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e84810c7
  2. 28 Mar, 2016 19 commits
  3. 25 Mar, 2016 5 commits
  4. 24 Mar, 2016 15 commits
    • Petri Gynther's avatar
      net: bcmgenet: fix skb_len in bcmgenet_xmit_single() · 7dd39913
      Petri Gynther authored
      skb_len needs to be skb_headlen(skb) in bcmgenet_xmit_single().
      
      Fragmented skbs can have only Ethernet + IP + TCP headers (14+20+20=54 bytes)
      in the linear buffer, followed by the rest in fragments. Bumping skb_len to
      ETH_ZLEN would be incorrect for this case, as it would introduce garbage
      between TCP header and the fragment data.
      
      This also works with regular/non-fragmented small packets < ETH_ZLEN bytes.
      Successfully tested this on GENETv3 with 42-byte ARP frames.
      
      For testing, I used:
      ethtool -K eth0 tx-checksum-ipv4 off
      ethtool -K eth0 tx-checksum-ipv6 off
      echo 0 > /proc/sys/net/ipv4/tcp_timestamps
      
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7dd39913
    • Petri Gynther's avatar
      net: bcmgenet: fix dev->stats.tx_bytes accounting · 55868120
      Petri Gynther authored
      1. Add bytes_compl local variable to __bcmgenet_tx_reclaim() to collect
         transmitted bytes. dev->stats updates can then be moved outside the
         while-loop. bytes_compl is also needed for future BQL support.
      2. When bcmgenet device uses Tx checksum offload, each transmitted skb
         gets an extra 64-byte header prepended to it. Before this header is
         prepended to the skb, we need to save the skb "wire" length in
         GENET_CB(skb)->bytes_sent, so that proper Tx bytes accounting can
         be done in __bcmgenet_tx_reclaim().
      3. skb->len covers the entire length of skb, whether it is linear or
         fragmented. Thus, when we clean the fragments, do not increase
         transmitted bytes.
      
      Fixes: 1c1008c7 ("net: bcmgenet: add main driver file")
      Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55868120
    • Nicolas Dichtel's avatar
      switchdev: fix typo in comments/doc · 3e347660
      Nicolas Dichtel authored
      Two minor typo.
      Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e347660
    • Cyrille Pitchen's avatar
      net: macb: replace macb_writel() call by queue_writel() to update queue ISR · ba504994
      Cyrille Pitchen authored
      macb_interrupt() should not use macb_writel(bp, ISR, <value>) but only
      queue_writel(queue, ISR, <value>).
      
      There is one IRQ and one set of {ISR, IER, IDR, IMR} [1] registers per
      queue on gem hardware, though only queue0 is actually used for now to
      receive frames: other queues can already be used to transmit frames.
      
      The queue_readl() and queue_writel() helper macros are designed to access
      the relevant IRQ registers.
      
      [1]
      ISR: Interrupt Status Register
      IER: Interrupt Enable Register
      IDR: Interrupt Disable Register
      IMR: Interrupt Mask Register
      Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
      Fixes: bfbb92c4 ("net: macb: Handle the RXUBR interrupt on all devices")
      Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba504994
    • David S. Miller's avatar
      Merge branch 'hns-fixes' · 7629d9c1
      David S. Miller authored
      Yisen Zhuang says:
      
      ====================
      net: hns: fix some bugs in HNS driver
      
      Here are some bug fixed patches for HNS driver.
      
      They are:
      
      >from Kejian, fix for the warning of passing zero to 'PTR_ERR'
      
      >from qianqian, four fixes for inappropriate operation in hns driver
      
      >from Sheng, one fix for optimization of irq proccess in hns driver, and
      one fix for hilink status for hns driver.
      
      For more details, please see individual patches.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7629d9c1
    • Sheng Li's avatar
      net: hns: bug fix about getting hilink status for HNS v2 · c1203fe7
      Sheng Li authored
      The hilink status reg in HNS V2 is different from HNS v1. In HNS V2, It
      distinguishes differnt lane status according to the bit-field of the reg.
      As is shown below:
      [0:0] ---> lane0
      [1:1] ---> lane1
      ...
      
      But the current driver reads the reg to get the hilink status ONLY
      concidering HNS V1 situation. Here is a patch to support both of them.
      Signed-off-by: default avatarSheng Li <lisheng011@huawei.com>
      Signed-off-by: default avatarDaode Huang <huangdaode@hisilicon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1203fe7
    • Kejian Yan's avatar
      net: hns: fix warning of passing zero to 'PTR_ERR' · daa8cfd9
      Kejian Yan authored
      There is a misuse of PTR as shown below:
      
      	ae_node = (void *)of_parse_phandle(dev->of_node,
      					   "ae-handle",
      					   0);
      	if (IS_ERR_OR_NULL(ae_node)) {
      		ret = PTR_ERR(ae_node);
      		dev_err(dev, "not find ae-handle\n");
      		goto out_read_prop_fail;
      	}
      
      if the ae_node is NULL, PTR_ERR(ae_node) means it returns success. And the
      return value should be -ENODEV.
      Signed-off-by: default avatarKejian Yan <yankejian@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <Yisen.Zhuang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      daa8cfd9
    • Sheng Li's avatar
      net: hns: optimizate irq proccess for HNS V2 · 4b34aa41
      Sheng Li authored
      In hns V1, common_poll should check and clean fbd pkts, because it
      can not pend irq to clean them if there is no new pkt comes in.
      But hns V2 hw fixes this bug, and will pend irq itself to do this.
      So, for hns V2, we set ring_data->fini_process to NULL.
      Signed-off-by: default avatarSheng Li <lisheng011@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <Yisen.Zhuang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b34aa41
    • Qianqian Xie's avatar
      net: hns: remove useless variable assignment and comment · 1c3bae6e
      Qianqian Xie authored
      The variable head in hns_nic_tx_fini_pro has read a value, but it is
      obviously no use. The patch will fix it.
      And the comment is nothing to do with the routine, so it has to be removed
      Signed-off-by: default avatarQianqian Xie <xieqianqian@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <Yisen.Zhuang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c3bae6e
    • Qianqian Xie's avatar
      net: hns: bug fix for return values · 055a9417
      Qianqian Xie authored
      The return values in the first two functions mdiobus_write()
      are ignored. The patch will fix it.
      Signed-off-by: default avatarQianqian Xie <xieqianqian@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <Yisen.Zhuang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      055a9417
    • Qianqian Xie's avatar
      net: hns: optimizate fmt of snprintf() · 8d71397b
      Qianqian Xie authored
      It misses string format in function snprintf(), as below:
      snprintf(buff, ETH_GSTRING_LEN, g_gmac_stats_string[i].desc);
      
      It needs to add "%s" to fix it as below:
      snprintf(buff, ETH_GSTRING_LEN, "%s", g_gmac_stats_string[i].desc);
      Signed-off-by: default avatarQianqian Xie <xieqianqian@huawei.com>
      Signed-off-by: default avatarKejian Yan <yankejian@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <Yisen.Zhuang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d71397b
    • Qianqian Xie's avatar
      net: hns: fix a bug for cycle index · 52613126
      Qianqian Xie authored
      The cycle index should be varied while the variable j is a fixed value.
      The patch will fix this bug.
      Signed-off-by: default avatarQianqian Xie <xieqianqian@huawei.com>
      Signed-off-by: default avatarYisen Zhuang <Yisen.Zhuang@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52613126
    • subashab@codeaurora.org's avatar
      xfrm: Fix crash observed during device unregistration and decryption · 071d36bf
      subashab@codeaurora.org authored
      A crash is observed when a decrypted packet is processed in receive
      path. get_rps_cpus() tries to dereference the skb->dev fields but it
      appears that the device is freed from the poison pattern.
      
      [<ffffffc000af58ec>] get_rps_cpu+0x94/0x2f0
      [<ffffffc000af5f94>] netif_rx_internal+0x140/0x1cc
      [<ffffffc000af6094>] netif_rx+0x74/0x94
      [<ffffffc000bc0b6c>] xfrm_input+0x754/0x7d0
      [<ffffffc000bc0bf8>] xfrm_input_resume+0x10/0x1c
      [<ffffffc000ba6eb8>] esp_input_done+0x20/0x30
      [<ffffffc0000b64c8>] process_one_work+0x244/0x3fc
      [<ffffffc0000b7324>] worker_thread+0x2f8/0x418
      [<ffffffc0000bb40c>] kthread+0xe0/0xec
      
      -013|get_rps_cpu(
           |    dev = 0xFFFFFFC08B688000,
           |    skb = 0xFFFFFFC0C76AAC00 -> (
           |      dev = 0xFFFFFFC08B688000 -> (
           |        name =
      "......................................................
           |        name_hlist = (next = 0xAAAAAAAAAAAAAAAA, pprev =
      0xAAAAAAAAAAA
      
      Following are the sequence of events observed -
      
      - Encrypted packet in receive path from netdevice is queued
      - Encrypted packet queued for decryption (asynchronous)
      - Netdevice brought down and freed
      - Packet is decrypted and returned through callback in esp_input_done
      - Packet is queued again for process in network stack using netif_rx
      
      Since the device appears to have been freed, the dereference of
      skb->dev in get_rps_cpus() leads to an unhandled page fault
      exception.
      
      Fix this by holding on to device reference when queueing packets
      asynchronously and releasing the reference on call back return.
      
      v2: Make the change generic to xfrm as mentioned by Steffen and
      update the title to xfrm
      Suggested-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarJerome Stanislaus <jeromes@codeaurora.org>
      Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      071d36bf
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · e46b4e2b
      Linus Torvalds authored
      Pull tracing updates from Steven Rostedt:
       "Nothing major this round.  Mostly small clean ups and fixes.
      
        Some visible changes:
      
         - A new flag was added to distinguish traces done in NMI context.
      
         - Preempt tracer now shows functions where preemption is disabled but
           interrupts are still enabled.
      
        Other notes:
      
         - Updates were done to function tracing to allow better performance
           with perf.
      
         - Infrastructure code has been added to allow for a new histogram
           feature for recording live trace event histograms that can be
           configured by simple user commands.  The feature itself was just
           finished, but needs a round in linux-next before being pulled.
      
           This only includes some infrastructure changes that will be needed"
      
      * tag 'trace-v4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (22 commits)
        tracing: Record and show NMI state
        tracing: Fix trace_printk() to print when not using bprintk()
        tracing: Remove redundant reset per-CPU buff in irqsoff tracer
        x86: ftrace: Fix the misleading comment for arch/x86/kernel/ftrace.c
        tracing: Fix crash from reading trace_pipe with sendfile
        tracing: Have preempt(irqs)off trace preempt disabled functions
        tracing: Fix return while holding a lock in register_tracer()
        ftrace: Use kasprintf() in ftrace_profile_tracefs()
        ftrace: Update dynamic ftrace calls only if necessary
        ftrace: Make ftrace_hash_rec_enable return update bool
        tracing: Fix typoes in code comment and printk in trace_nop.c
        tracing, writeback: Replace cgroup path to cgroup ino
        tracing: Use flags instead of bool in trigger structure
        tracing: Add an unreg_all() callback to trigger commands
        tracing: Add needs_rec flag to event triggers
        tracing: Add a per-event-trigger 'paused' field
        tracing: Add get_syscall_name()
        tracing: Add event record param to trigger_ops.func()
        tracing: Make event trigger functions available
        tracing: Make ftrace_event_field checking functions available
        ...
      e46b4e2b
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · faea72dd
      Linus Torvalds authored
      Pull thermal updates from Zhang Rui:
      
       - Fix a regression where bogus trip points on some Lenovo laptops start
         to screw up thermal control after commit 81ad4276 ("Thermal:
         initialize thermal zone device correctly").
      
         On these Lenovo laptops, a bogus passive trip point is reported,
         which is 0 degree Celsius.  Without commit 81ad4276, thermal zone
         fails to set cooling devices to proper cooling state, which is a bug.
         But with commit 81ad4276 applied, the processors are always
         throttled on these Lenovo laptops because the current temperature is
         always higher than the passive trip point.
      
         Fix things to ignore such bogus trip points.  (Zhang Rui)
      
       - Introduce Mediatek thermal driver.  (Sascha Hauer)
      
       - Introduce devm_ versions of OF thermal sensor register API.  (Laxman
         Dewangan)
      
       - Changes in Kconfigs to allow compile test on UM arch.  (Krzysztof
         Kozlowski)
      
       - Introduce Skylake support in intel_pch_thermal driver.  (Srinivas
         Pandruvada)
      
       - Several small fixes on Rockchip, TI-SoC, Tegra, RCar, and Exynos
         thermal drivers.
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (26 commits)
        Thermal: Ignore invalid trip points
        thermal: trace: migrating thermal traces to use TRACE_DEFINE_ENUM() macros
        thermal: intel_pch_thermal: Enable Skylake PCH thermal
        thermal: doc: Add details of devm_thermal_zone_of_sensor_{register,unregister}
        thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register
        thermal: doc: Add details of thermal_zone_of_sensor_{register,unregister}
        thermal: exynos: Defer probe if vtmu is present but not registered
        thermal: exynos: Use devm_regulator_get_optional() for vtmu
        thermal: exynos: List vtmu-supply as optional property in DT binding
        thermal: exynos: Print a message about exceeded number of supported trip-points
        thermal: exynos: Document number of supported trip-points
        thermal: exynos: Document compatible for Exynos5433 TMU
        thermal: mtk: allow compile testing on UM
        thermal: tegra_soctherm: fix sign bit of temperature
        thermal: Fix build error of missing devm_ioremap_resource on UM
        thermal: ti-soc-thermal: clean up the error handling a bit
        thermal: rcar: Use ARCH_RENESAS
        thermal: rcar_thermal: don't open code of_device_get_match_data()
        thermal: db8500_cpufreq_cooling: Compile with COMPILE_TEST
        thermal: rockchip: fix the tsadc sequence output on rk3228/rk3399
        ...
      faea72dd