1. 01 Nov, 2018 7 commits
    • Serge Semin's avatar
      ntb: idt: Discard temperature sensor IRQ handler · b8babacb
      Serge Semin authored
      IDT PCIe-switch temperature sensor interface is very broken. First
      of all only a few combinations of TMPCTL threshold enable bits
      really cause the interrupts unmasked. Even if an individual bit
      indicates the event unmasked, corresponding IRQ just isn't generated.
      Most of the threshold enable bits combinations are in fact useless and
      non of them can help to create a fully functional alarm interface.
      So to speak, we can't create a well defined hwmon alarms based on
      the IDT PCI-switch threshold IRQs.
      
      Secondly a single threshold IRQ (not a combination of thresholds) can
      be successfully enabled without the issue described above. But in this
      case we experienced an enormous number of interrupts generated by
      the chip if the temperature got near the enabled threshold value. Filter
      adjustment didn't help much. It also doesn't provide a hysteresis settings.
      Due to the temperature sample fluctuations near the threshold the
      interrupts spate makes the system nearly unusable until the temperature
      value finally settled so being pushed either to be fully higher or lower
      the threshold.
      
      All of these issues makes the temperature sensor alarm interface useless
      and even at some point dangerous to be used in the driver. In this case
      it is safer to completely discard it and disable the temperature alarm
      interrupts.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      b8babacb
    • Serge Semin's avatar
      ntb: idt: Add basic hwmon sysfs interface · aed1b7b3
      Serge Semin authored
      IDT PCIe switches provide an embedded temperature sensor working
      within [0; 127.5]C with resolution of 0.5C. They also can generate
      a PCIe upstream interrupt in case if the temperature passes through
      specified thresholds. Since this thresholds interface is very broken
      the created hwmon-sysfs interface exposes only the next set of hwmon
      nodes: current input temperature, lowest and highest values measured,
      history resetting, value offset. HWmon alarm interface isn't provided.
      
      IDT PCIe switch also've got an ADC/filter settings of the sensor.
      This driver doesn't expose them to the hwmon-sysfs interface at the
      moment, except the offset node.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      aed1b7b3
    • Serge Semin's avatar
      ntb: idt: Alter temperature read method · 40070408
      Serge Semin authored
      In order to create a hwmon interface for the IDT PCIe-switch temperature
      sensor the already available reader method should be improved. Particularly
      we need to redesign it so one would be able to read temperature/offset
      values from registers of the passed types. Since IDT sensor interface
      provides temperature in unsigned format 0:7:1 (7 bits for real value
      and one for fraction) we also need to have helpers for the typical sysfs
      temperature data type conversion to and from this format. Even though
      the IDT PCIe-switch provided temperature offset got the same but signed
      type it can be translated by these methods too.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      40070408
    • Aaron Sierra's avatar
      ntb_netdev: Simplify remove with client device drvdata · 906e86b2
      Aaron Sierra authored
      Replace the elaborate private structure global linked-list used in
      ntb_netdev_probe() and ntb_netdev_remove() by stashing our private
      data in the NTB transport client device.
      Signed-off-by: default avatarAaron Sierra <asierra@xes-inc.com>
      Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      906e86b2
    • Aaron Sierra's avatar
      NTB: transport: Try harder to alloc an aligned MW buffer · fc5d1829
      Aaron Sierra authored
      Be a little wasteful if the (likely CMA) message window buffer is not
      suitably aligned after our first attempt; allocate a buffer twice as big
      as we need and manually align our MW buffer within it.
      
      This was needed on Intel Broadwell DE platforms with intel_iommu=off
      Signed-off-by: default avatarAaron Sierra <asierra@xes-inc.com>
      Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      fc5d1829
    • Gustavo A. R. Silva's avatar
      ntb: ntb_transport: Mark expected switch fall-throughs · 846429bc
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Addresses-Coverity-ID: 1373888 ("Missing break in switch")
      Addresses-Coverity-ID: 1373889 ("Missing break in switch")
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Acked-by: default avatarAllen Hubbe <allenbh@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      846429bc
    • Serge Semin's avatar
      ntb: idt: Set PCIe bus address to BARLIMITx · 37a3e969
      Serge Semin authored
      IDT NTB driver sets the upper limit of actual translation address
      being written to the corresponding memory window setup. It is achieved
      by BARLIMITx register initialization. Needless to say, that the register
      works within PCIe bus address space.
      
      In general CPU and PCIe address spaces are different. It means,
      that addresses used for Memory TLPs routine can be different from
      CPU addresses. While in most of cases they are the same, there are
      exceptions when the proper mapping must be performed to have the
      portable driver code. There used to be a virt_to_bus()/bus_to_virt()
      interface for this purpose. But it's deprecated now. It was also a
      mistake to use pci_resource_start() since the return address of the
      method is at the CPU address space. In order to achieve the desired
      purpose we need to use pci_bus_address() helper. This method shall
      return a PCIe bus base address of the corresponding BAR resource.
      Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Acked-by: default avatarAllen Hubbe <allenbh@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      37a3e969
  2. 31 Oct, 2018 3 commits
  3. 22 Oct, 2018 8 commits
  4. 21 Oct, 2018 3 commits
  5. 20 Oct, 2018 11 commits
  6. 19 Oct, 2018 8 commits
    • Masami Hiramatsu's avatar
      selftests: ftrace: Add synthetic event syntax testcase · ba0e41ca
      Masami Hiramatsu authored
      Add a testcase to check the syntax and field types for
      synthetic_events interface.
      
      Link: http://lkml.kernel.org/r/153986838264.18251.16627517536956299922.stgit@devboxAcked-by: default avatarShuah Khan <shuah@kernel.org>
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      ba0e41ca
    • Masami Hiramatsu's avatar
      tracing: Fix synthetic event to allow semicolon at end · a360d9e4
      Masami Hiramatsu authored
      Fix synthetic event to allow independent semicolon at end.
      
      The synthetic_events interface accepts a semicolon after the
      last word if there is no space.
      
       # echo "myevent u64 var;" >> synthetic_events
      
      But if there is a space, it returns an error.
      
       # echo "myevent u64 var ;" > synthetic_events
       sh: write error: Invalid argument
      
      This behavior is difficult for users to understand. Let's
      allow the last independent semicolon too.
      
      Link: http://lkml.kernel.org/r/153986835420.18251.2191216690677025744.stgit@devbox
      
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
      Cc: stable@vger.kernel.org
      Fixes: commit 4b147936 ("tracing: Add support for 'synthetic' events")
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      a360d9e4
    • Masami Hiramatsu's avatar
      tracing: Fix synthetic event to accept unsigned modifier · 282447ba
      Masami Hiramatsu authored
      Fix synthetic event to accept unsigned modifier for its field type
      correctly.
      
      Currently, synthetic_events interface returns error for "unsigned"
      modifiers as below;
      
       # echo "myevent unsigned long var" >> synthetic_events
       sh: write error: Invalid argument
      
      This is because argv_split() breaks "unsigned long" into "unsigned"
      and "long", but parse_synth_field() doesn't expected it.
      
      With this fix, synthetic_events can handle the "unsigned long"
      correctly like as below;
      
       # echo "myevent unsigned long var" >> synthetic_events
       # cat synthetic_events
       myevent	unsigned long var
      
      Link: http://lkml.kernel.org/r/153986832571.18251.8448135724590496531.stgit@devbox
      
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Tom Zanussi <tom.zanussi@linux.intel.com>
      Cc: stable@vger.kernel.org
      Fixes: commit 4b147936 ("tracing: Add support for 'synthetic' events")
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      282447ba
    • David S. Miller's avatar
      Revert "bond: take rcu lock in netpoll_send_skb_on_dev" · 48995423
      David S. Miller authored
      This reverts commit 6fe94878.
      
      It is causing more serious regressions than the RCU warning
      it is fixing.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      48995423
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-4.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · c7b70a64
      Greg Kroah-Hartman authored
      I wrote:
        "USB fixes for 4.19-final
      
         Here are a small number of last-minute USB driver fixes
      
         Included here are:
           - spectre fix for usb storage gadgets
           - xhci fixes
           - cdc-acm fixes
           - usbip fixes for reported problems
      
         All of these have been in linux-next with no reported issues."
      
      * tag 'usb-4.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: gadget: storage: Fix Spectre v1 vulnerability
        USB: fix the usbfs flag sanitization for control transfers
        usb: xhci: pci: Enable Intel USB role mux on Apollo Lake platforms
        usb: roles: intel_xhci: Fix Unbalanced pm_runtime_enable
        cdc-acm: correct counting of UART states in serial state notification
        cdc-acm: do not reset notification buffer index upon urb unlinking
        cdc-acm: fix race between reset and control messaging
        usb: usbip: Fix BUG: KASAN: slab-out-of-bounds in vhci_hub_control()
        selftests: usbip: add wait after attach and before checking port status
      c7b70a64
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-linus-20181019' of git://git.kernel.dk/linux-block · b2a205ff
      Greg Kroah-Hartman authored
      Jens writes:
        "Block fixes for 4.19-final
      
         Two small fixes that should go into this release."
      
      * tag 'for-linus-20181019' of git://git.kernel.dk/linux-block:
        block: don't deal with discard limit in blkdev_issue_discard()
        nvme: remove ns sibling before clearing path
      b2a205ff
    • Boris Brezillon's avatar
      drm/sun4i: Fix an ulong overflow in the dotclock driver · e84cb605
      Boris Brezillon authored
      The calculated ideal rate can easily overflow an unsigned long, thus
      making the best div selection buggy as soon as no ideal match is found
      before the overflow occurs.
      
      Fixes: 4731a72d ("drm/sun4i: request exact rates to our parents")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
      Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181018100250.12565-1-boris.brezillon@bootlin.com
      e84cb605
    • Greg Kroah-Hartman's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 91b15613
      Greg Kroah-Hartman authored
      David writes:
        "Networking
      
         1) Fix gro_cells leak in xfrm layer, from Li RongQing.
      
         2) BPF selftests change RLIMIT_MEMLOCK blindly, don't do that.  From
            Eric Dumazet.
      
         3) AF_XDP calls synchronize_net() under RCU lock, fix from Björn
            Töpel.
      
         4) Out of bounds packet access in _decode_session6(), from Alexei
            Starovoitov.
      
         5) Several ethtool bugs, where we copy a struct into the kernel twice
            and our validations of the values in the first copy can be
            invalidated by the second copy due to asynchronous updates to the
            memory by the user.  From Wenwen Wang.
      
         6) Missing netlink attribute validation in cls_api, from Davide
            Caratti.
      
         7) LLC SAP sockets neet to be SOCK_RCU FREE, from Cong Wang.
      
         8) rxrpc operates on wrong kvec, from Yue Haibing.
      
         9) A regression was introduced by the disassosciation of route
            neighbour references in rt6_probe(), causing probe for
            neighbourless routes to not be properly rate limited.  Fix from
            Sabrina Dubroca.
      
         10) Unsafe RCU locking in tipc, from Tung Nguyen.
      
         11) Use after free in inet6_mc_check(), from Eric Dumazet.
      
         12) PMTU from icmp packets should update the SCTP transport pathmtu,
             from Xin Long.
      
         13) Missing peer put on error in rxrpc, from David Howells.
      
         14) Fix pedit in nfp driver, from Pieter Jansen van Vuuren.
      
         15) Fix overflowing shift statement in qla3xxx driver, from Nathan
             Chancellor.
      
         16) Fix Spectre v1 in ptp code, from Gustavo A. R. Silva.
      
         17) udp6_unicast_rcv_skb() interprets udpv6_queue_rcv_skb() return
             value in an inverted manner, fix from Paolo Abeni.
      
         18) Fix missed unresolved entries in ipmr dumps, from Nikolay
             Aleksandrov.
      
         19) Fix NAPI handling under high load, we can completely miss events
             when NAPI has to loop more than one time in a cycle.  From Heiner
             Kallweit."
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (49 commits)
        ip6_tunnel: Fix encapsulation layout
        tipc: fix info leak from kernel tipc_event
        net: socket: fix a missing-check bug
        net: sched: Fix for duplicate class dump
        r8169: fix NAPI handling under high load
        net: ipmr: fix unresolved entry dumps
        net: mscc: ocelot: Fix comment in ocelot_vlant_wait_for_completion()
        sctp: fix the data size calculation in sctp_data_size
        virtio_net: avoid using netif_tx_disable() for serializing tx routine
        udp6: fix encap return code for resubmitting
        mlxsw: core: Fix use-after-free when flashing firmware during init
        sctp: not free the new asoc when sctp_wait_for_connect returns err
        sctp: fix race on sctp_id2asoc
        r8169: re-enable MSI-X on RTL8168g
        net: bpfilter: use get_pid_task instead of pid_task
        ptp: fix Spectre v1 vulnerability
        net: qla3xxx: Remove overflowing shift statement
        geneve, vxlan: Don't set exceptions if skb->len < mtu
        geneve, vxlan: Don't check skb_dst() twice
        sctp: get pr_assoc and pr_stream all status with SCTP_PR_SCTP_ALL instead
        ...
      91b15613