1. 05 10月, 2017 6 次提交
    • L
      usb: xhci: Fix memory leak when xhci_disable_slot() returns error · 11ec7588
      Lu Baolu 提交于
      If xhci_disable_slot() returns success, a disable slot command
      trb was queued in the command ring. The command completion
      handler will free the virtual device data structure associated
      with the slot. On the other hand, when xhci_disable_slot()
      returns error, the invokers should take the responsibilities to
      free the slot related data structure. Otherwise, memory leakage
      happens.
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      11ec7588
    • L
      usb: xhci: Fix potential memory leak in xhci_disable_slot() · cd3f1790
      Lu Baolu 提交于
      xhci_disable_slot() allows the invoker to pass a command pointer
      as paramenter. Otherwise, it will allocate one. This will cause
      memory leak when a command structure was allocated inside of this
      function while queuing command trb fails. Another problem comes up
      when the invoker passed a command pointer, but xhci_disable_slot()
      frees it when it detects a dead host.
      
      This patch fixes these two problems by removing the command parameter
      from xhci_disable_slot().
      
      Fixes: f9e609b8 ("usb: xhci: Add helper function xhci_disable_slot().")
      Cc: Guoqing Zhang <guoqing.zhang@intel.com>
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cd3f1790
    • L
      usb: xhci: Disable slot even when virt-dev is null · b64149ca
      Lu Baolu 提交于
      xhci_disable_slot() is a helper for disabling a slot when a device
      goes away or recovers from error situations. Currently, it checks
      the corespoding virt-dev pointer and returns directly (w/o issuing
      disable slot command) if it's null.
      
      This is unnecessary and will cause problems in case where virt-dev
      allocation fails and xhci_disable_slot() is called to roll back the
      hardware state. Refer to the implementation of xhci_alloc_dev().
      
      This patch removes lines to check virt-dev in xhci_disable_slot().
      
      Fixes: f9e609b8 ("usb: xhci: Add helper function xhci_disable_slot().")
      Cc: Guoqing Zhang <guoqing.zhang@intel.com>
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b64149ca
    • L
      usb: xhci: Add debugfs interface for xHCI driver · 02b6fdc2
      Lu Baolu 提交于
      This adds debugfs consumer for xHCI driver. The debugfs entries
      read all host registers, device/endpoint contexts, command ring,
      event ring and various endpoint rings. With these entries, users
      can check the registers and memory spaces used by a host during
      run time, or save all the information with a simple 'cp -r' for
      post-mortem programs.
      
      The file hierarchy looks like this.
      
      [root of debugfs]
      |__usb
      |____[e,u,o]hci                 <---------[root for other HCIs]
      |____xhci                       <---------------[root for xHCI]
      |______0000:00:14.0             <--------------[xHCI host name]
      |________reg-cap                <--------[capability registers]
      |________reg-op                 <-------[operational registers]
      |________reg-runtime            <-----------[runtime registers]
      |________reg-ext-#cap_name      <----[extended capability regs]
      |________command-ring           <-------[root for command ring]
      |__________cycle                <------------------[ring cycle]
      |__________dequeue              <--------[ring dequeue pointer]
      |__________enqueue              <--------[ring enqueue pointer]
      |__________trbs                 <-------------------[ring trbs]
      |________event-ring             <---------[root for event ring]
      |__________cycle                <------------------[ring cycle]
      |__________dequeue              <--------[ring dequeue pointer]
      |__________enqueue              <--------[ring enqueue pointer]
      |__________trbs                 <-------------------[ring trbs]
      |________devices                <------------[root for devices]
      |__________#slot_id             <-----------[root for a device]
      |____________name               <-----------------[device name]
      |____________slot-context       <----------------[slot context]
      |____________ep-context         <-----------[endpoint contexts]
      |____________ep#ep_index        <--------[root for an endpoint]
      |______________cycle            <------------------[ring cycle]
      |______________dequeue          <--------[ring dequeue pointer]
      |______________enqueue          <--------[ring enqueue pointer]
      |______________trbs             <-------------------[ring trbs]
      Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      02b6fdc2
    • M
      xhci: add port speed ID to portsc tracing · 8f114877
      Mathias Nyman 提交于
      Shows the port speed protocol speed ID (PSID) in use.
      speed ID may map to custom speeds, but in most cases it uses default
      
      1 = Full-Speed        12 MB/s
      2 = Low-Speed         1.5 Mb/s
      3 = High-speed        480 Mb/s
      4 = SuperSpeed        5 Gb/s
      5 = SuperSpeedPlus    10 Gb/s
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8f114877
    • T
      usb: host: xhci support option to disable the xHCI USB2 HW LPM · 4750bc78
      Thang Q. Nguyen 提交于
      XHCI specification 1.1 does not require xHCI-compliant controllers
      to always enable hardware USB2 LPM. However, the current xHCI
      driver always enable it when seeing HLC=1.
      This patch supports an option for users to control disabling
      USB2 Hardware LPM via DT/ACPI attribute.
      This option is needed in case user would like to disable this
      feature. For example, their xHCI controller has its USB2 HW LPM
      broken.
      Signed-off-by: NTung Nguyen <tunguyen@apm.com>
      Signed-off-by: NThang Q. Nguyen <tqnguyen@apm.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4750bc78
  2. 04 10月, 2017 19 次提交
  3. 18 9月, 2017 7 次提交
  4. 17 9月, 2017 8 次提交
    • L
      Linux 4.14-rc1 · 2bd6bf03
      Linus Torvalds 提交于
      2bd6bf03
    • L
      Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs · 194a4ef9
      Linus Torvalds 提交于
      Pull UBI updates from Richard Weinberger:
       "Minor improvements"
      
      * tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs:
        UBI: Fix two typos in comments
        ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate"
        ubi: pr_err() strings should end with newlines
        ubi: pr_err() strings should end with newlines
        ubi: pr_err() strings should end with newlines
      194a4ef9
    • L
      Merge branch 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 2896b80e
      Linus Torvalds 提交于
      Pull UML updates from Richard Weinberger:
      
       - minor improvements
      
       - fixes for Debian's new gcc defaults (pie enabled by default)
      
       - fixes for XSTATE/XSAVE to make UML work again on modern systems
      
      * 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: return negative in tuntap_open_tramp()
        um: remove a stray tab
        um: Use relative modversions with LD_SCRIPT_DYN
        um: link vmlinux with -no-pie
        um: Fix CONFIG_GCOV for modules.
        Fix minor typos and grammar in UML start_up help
        um: defconfig: Cleanup from old Kconfig options
        um: Fix FP register size for XSTATE/XSAVE
      2896b80e
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 48bddb14
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix hotplug deadlock in hv_netvsc, from Stephen Hemminger.
      
       2) Fix double-free in rmnet driver, from Dan Carpenter.
      
       3) INET connection socket layer can double put request sockets, fix
          from Eric Dumazet.
      
       4) Don't match collect metadata-mode tunnels if the device is down,
          from Haishuang Yan.
      
       5) Do not perform TSO6/GSO on ipv6 packets with extensions headers in
          be2net driver, from Suresh Reddy.
      
       6) Fix scaling error in gen_estimator, from Eric Dumazet.
      
       7) Fix 64-bit statistics deadlock in systemport driver, from Florian
          Fainelli.
      
       8) Fix use-after-free in sctp_sock_dump, from Xin Long.
      
       9) Reject invalid BPF_END instructions in verifier, from Edward Cree.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
        mlxsw: spectrum_router: Only handle IPv4 and IPv6 events
        Documentation: link in networking docs
        tcp: fix data delivery rate
        bpf/verifier: reject BPF_ALU64|BPF_END
        sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
        sctp: fix an use-after-free issue in sctp_sock_dump
        netvsc: increase default receive buffer size
        tcp: update skb->skb_mstamp more carefully
        net: ipv4: fix l3slave check for index returned in IP_PKTINFO
        net: smsc911x: Quieten netif during suspend
        net: systemport: Fix 64-bit stats deadlock
        net: vrf: avoid gcc-4.6 warning
        qed: remove unnecessary call to memset
        tg3: clean up redundant initialization of tnapi
        tls: make tls_sw_free_resources static
        sctp: potential read out of bounds in sctp_ulpevent_type_enabled()
        MAINTAINERS: review Renesas DT bindings as well
        net_sched: gen_estimator: fix scaling error in bytes/packets samples
        nfp: wait for the NSP resource to appear on boot
        nfp: wait for board state before talking to the NSP
        ...
      48bddb14
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · c8503720
      Linus Torvalds 提交于
      Pull more input updates from Dmitry Torokhov:
       "A second round of updates for the input subsystem:
      
         - a new driver for PWM-controlled vibrators
      
         - ucb1400 touchscreen driver had completely busted suspend/resume
           handling
      
         - we now handle "home" button found on some devices with Goodix
           touchscreens
      
         - assorted other fixups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: i8042 - add Gigabyte P57 to the keyboard reset table
        Input: xpad - validate USB endpoint type during probe
        Input: ucb1400_ts - fix suspend and resume handling
        Input: edt-ft5x06 - fix access to non-existing register
        Input: elantech - make arrays debounce_packet static, reduces object code size
        Input: surface3_spi - make const array header static, reduces object code size
        Input: goodix - add support for capacitive home button
        Input: add a driver for PWM controllable vibrators
        Input: adi - make array seq static, reduces object code size
      c8503720
    • M
      firmware: Restore support for built-in firmware · df85b2d7
      Markus Trippelsdorf 提交于
      Commit 5620a0d1 ("firmware: delete in-kernel firmware") removed the
      entire firmware directory.  Unfortunately it thereby also removed the
      support for built-in firmware.
      
      This restores the ability to build firmware directly into the kernel by
      pruning the original Makefile to the necessary minimum.  The default for
      EXTRA_FIRMWARE_DIR is now the standard directory /lib/firmware/.
      
      Fixes: 5620a0d1 ("firmware: delete in-kernel firmware")
      Signed-off-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Acked-by: NGreg K-H <gregkh@linuxfoundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      df85b2d7
    • I
      mlxsw: spectrum_router: Only handle IPv4 and IPv6 events · 8e29f979
      Ido Schimmel 提交于
      The driver doesn't support events from address families other than IPv4
      and IPv6, so ignore them. Otherwise, we risk queueing a work item before
      it's initialized.
      
      This can happen in case a VRF is configured when MROUTE_MULTIPLE_TABLES
      is enabled, as the VRF driver will try to add an l3mdev rule for the
      IPMR family.
      
      Fixes: 65e65ec1 ("mlxsw: spectrum_router: Don't ignore IPv6 notifications")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reported-by: NAndreas Rammhold <andreas@rammhold.de>
      Reported-by: NFlorian Klink <flokli@flokli.de>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e29f979
    • P
      Documentation: link in networking docs · 2130c028
      Pavel Machek 提交于
      Fix link in filter.txt.
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2130c028