1. 18 1月, 2020 4 次提交
  2. 17 1月, 2020 6 次提交
  3. 16 1月, 2020 9 次提交
    • R
      USB: serial: option: add support for Quectel RM500Q in QDL mode · f3eaabbf
      Reinhard Speyerer 提交于
      Add support for Quectel RM500Q in QDL mode.
      
      T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 24 Spd=480  MxCh= 0
      D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=2c7c ProdID=0800 Rev= 0.00
      S:  Manufacturer=Qualcomm CDMA Technologies MSM
      S:  Product=QUSB_BULK_SN:xxxxxxxx
      S:  SerialNumber=xxxxxxxx
      C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=  2mA
      I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=10 Driver=option
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      It is assumed that the ZLP flag required for other Qualcomm-based
      5G devices also applies to Quectel RM500Q.
      Signed-off-by: NReinhard Speyerer <rspmn@arcor.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      f3eaabbf
    • M
      block: fix an integer overflow in logical block size · ad6bf88a
      Mikulas Patocka 提交于
      Logical block size has type unsigned short. That means that it can be at
      most 32768. However, there are architectures that can run with 64k pages
      (for example arm64) and on these architectures, it may be possible to
      create block devices with 64k block size.
      
      For exmaple (run this on an architecture with 64k pages):
      
      Mount will fail with this error because it tries to read the superblock using 2-sector
      access:
        device-mapper: writecache: I/O is not aligned, sector 2, size 1024, block size 65536
        EXT4-fs (dm-0): unable to read superblock
      
      This patch changes the logical block size from unsigned short to unsigned
      int to avoid the overflow.
      
      Cc: stable@vger.kernel.org
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      ad6bf88a
    • D
      scsi: mptfusion: Fix double fetch bug in ioctl · 28d76df1
      Dan Carpenter 提交于
      Tom Hatskevich reported that we look up "iocp" then, in the called
      functions we do a second copy_from_user() and look it up again.
      The problem that could cause is:
      
      drivers/message/fusion/mptctl.c
         674          /* All of these commands require an interrupt or
         675           * are unknown/illegal.
         676           */
         677          if ((ret = mptctl_syscall_down(iocp, nonblock)) != 0)
                                                     ^^^^
      We take this lock.
      
         678                  return ret;
         679
         680          if (cmd == MPTFWDOWNLOAD)
         681                  ret = mptctl_fw_download(arg);
                                                       ^^^
      Then the user memory changes and we look up "iocp" again but a different
      one so now we are holding the incorrect lock and have a race condition.
      
         682          else if (cmd == MPTCOMMAND)
         683                  ret = mptctl_mpt_command(arg);
      
      The security impact of this bug is not as bad as it could have been
      because these operations are all privileged and root already has
      enormous destructive power.  But it's still worth fixing.
      
      This patch passes the "iocp" pointer to the functions to avoid the
      second lookup.  That deletes 100 lines of code from the driver so
      it's a nice clean up as well.
      
      Link: https://lore.kernel.org/r/20200114123414.GA7957@kadamReported-by: NTom Hatskevich <tom2001tom.23@gmail.com>
      Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      28d76df1
    • L
      scsi: storvsc: Correctly set number of hardware queues for IDE disk · 7b571c19
      Long Li 提交于
      Commit 0ed88102 ("scsi: storvsc: setup 1:1 mapping between hardware
      queue and CPU queue") introduced a regression for disks attached to
      IDE. For these disks the host VSP only offers one VMBUS channel. Setting
      multiple queues can overload the VMBUS channel and result in performance
      drop for high queue depth workload on system with large number of CPUs.
      
      Fix it by leaving the number of hardware queues to 1 (default value) for
      IDE disks.
      
      Fixes: 0ed88102 ("scsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue")
      Link: https://lore.kernel.org/r/1578960516-108228-1-git-send-email-longli@linuxonhyperv.comReviewed-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NLong Li <longli@microsoft.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      7b571c19
    • A
      scsi: fnic: fix invalid stack access · 42ec15ce
      Arnd Bergmann 提交于
      gcc -O3 warns that some local variables are not properly initialized:
      
      drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_hang_notify':
      drivers/scsi/fnic/vnic_dev.c:511:16: error: 'a0' is used uninitialized in this function [-Werror=uninitialized]
        vdev->args[0] = *a0;
        ~~~~~~~~~~~~~~^~~~~
      drivers/scsi/fnic/vnic_dev.c:691:6: note: 'a0' was declared here
        u64 a0, a1;
            ^~
      drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized]
        vdev->args[1] = *a1;
        ~~~~~~~~~~~~~~^~~~~
      drivers/scsi/fnic/vnic_dev.c:691:10: note: 'a1' was declared here
        u64 a0, a1;
                ^~
      drivers/scsi/fnic/vnic_dev.c: In function 'fnic_dev_mac_addr':
      drivers/scsi/fnic/vnic_dev.c:512:16: error: 'a1' is used uninitialized in this function [-Werror=uninitialized]
        vdev->args[1] = *a1;
        ~~~~~~~~~~~~~~^~~~~
      drivers/scsi/fnic/vnic_dev.c:698:10: note: 'a1' was declared here
        u64 a0, a1;
                ^~
      
      Apparently the code relies on the local variables occupying adjacent memory
      locations in the same order, but this is of course not guaranteed.
      
      Use an array of two u64 variables where needed to make it work correctly.
      
      I suspect there is also an endianness bug here, but have not digged in deep
      enough to be sure.
      
      Fixes: 5df6d737 ("[SCSI] fnic: Add new Cisco PCI-Express FCoE HBA")
      Fixes: mmtom ("init/Kconfig: enable -O3 for all arches")
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20200107201602.4096790-1-arnd@arndb.deSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      42ec15ce
    • M
      drm/amd/display: Reorder detect_edp_sink_caps before link settings read. · 3b7c5975
      Mario Kleiner 提交于
      read_current_link_settings_on_detect() on eDP 1.4+ may use the
      edp_supported_link_rates table which is set up by
      detect_edp_sink_caps(), so that function needs to be called first.
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Martin Leung <martin.leung@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      3b7c5975
    • A
      drm/amdgpu: update goldensetting for renoir · f2360e33
      Aaron Liu 提交于
      Update mmSDMA0_UTCL1_WATERMK golden setting for renoir.
      Signed-off-by: NAaron Liu <aaron.liu@amd.com>
      Reviewed-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      f2360e33
    • W
      drm/dp_mst: Have DP_Tx send one msg at a time · 5a64967a
      Wayne Lin 提交于
      [Why]
      Noticed this while testing MST with the 4 ports MST hub from
      StarTech.com. Sometimes can't light up monitors normally and get the
      error message as 'sideband msg build failed'.
      
      Look into aux transactions, found out that source sometimes will send
      out another down request before receiving the down reply of the
      previous down request. On the other hand, in drm_dp_get_one_sb_msg(),
      current code doesn't handle the interleaved replies case. Hence, source
      can't build up message completely and can't light up monitors.
      
      [How]
      For good compatibility, enforce source to send out one down request at a
      time. Add a flag, is_waiting_for_dwn_reply, to determine if the source
      can send out a down request immediately or not.
      
      - Check the flag before calling process_single_down_tx_qlock to send out
      a msg
      - Set the flag when successfully send out a down request
      - Clear the flag when successfully build up a down reply
      - Clear the flag when find erros during sending out a down request
      - Clear the flag when find errors during building up a down reply
      - Clear the flag when timeout occurs during waiting for a down reply
      - Use drm_dp_mst_kick_tx() to try to send another down request in queue
      at the end of drm_dp_mst_wait_tx_reply() (attempt to send out messages
      in queue when errors occur)
      
      Cc: Lyude Paul <lyude@redhat.com>
      Signed-off-by: NWayne Lin <Wayne.Lin@amd.com>
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200113093649.11755-1-Wayne.Lin@amd.com
      5a64967a
    • J
      Fix built-in early-load Intel microcode alignment · f5ae2ea6
      Jari Ruusu 提交于
      Intel Software Developer's Manual, volume 3, chapter 9.11.6 says:
      
       "Note that the microcode update must be aligned on a 16-byte boundary
        and the size of the microcode update must be 1-KByte granular"
      
      When early-load Intel microcode is loaded from initramfs, userspace tool
      'iucode_tool' has already 16-byte aligned those microcode bits in that
      initramfs image.  Image that was created something like this:
      
       iucode_tool --write-earlyfw=FOO.cpio microcode-files...
      
      However, when early-load Intel microcode is loaded from built-in
      firmware BLOB using CONFIG_EXTRA_FIRMWARE= kernel config option, that
      16-byte alignment is not guaranteed.
      
      Fix this by forcing all built-in firmware BLOBs to 16-byte alignment.
      
      [ If we end up having other firmware with much bigger alignment
        requirements, we might need to introduce some method for the firmware
        to specify it, this is the minimal "just increase the alignment a bit
        to account for this one special case" patch    - Linus ]
      Signed-off-by: NJari Ruusu <jari.ruusu@gmail.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Luis Chamberlain <mcgrof@kernel.org>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f5ae2ea6
  4. 15 1月, 2020 6 次提交
    • D
      null_blk: Fix zone write handling · 16c731fe
      Damien Le Moal 提交于
      null_zone_write() only allows writing empty and implicitly opened zones.
      Writing to closed and explicitly opened zones must also be allowed and
      the zone condition must be transitioned to implicit open if the zone
      is not explicitly opened already.
      
      Fixes: da644b2c ("null_blk: add zone open, close, and finish support")
      Signed-off-by: NDamien Le Moal <damien.lemoal@wdc.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      16c731fe
    • I
      staging: comedi: ni_routes: allow partial routing information · 9fea3a40
      Ian Abbott 提交于
      This patch fixes a regression on setting up asynchronous commands to use
      external trigger sources when board-specific routing information is
      missing.
      
      `ni_find_device_routes()` (called via `ni_assign_device_routes()`) finds
      the table of register values for the device family and the set of valid
      routes for the specific board.  If both are found,
      `tables->route_values` is set to point to the table of register values
      for the device family and `tables->valid_routes` is set to point to the
      list of valid routes for the specific board.  If either is not found,
      both `tables->route_values` and `tables->valid_routes` are left set at
      their initial null values (initialized by `ni_assign_device_routes()`)
      and the function returns `-ENODATA`.
      
      Returning an error results in some routing functionality being disabled.
      Unfortunately, leaving `table->route_values` set to `NULL` also breaks
      the setting up of asynchronous commands that are configured to use
      external trigger sources.  Calls to `ni_check_trigger_arg()` or
      `ni_check_trigger_arg_roffs()` while checking the asynchronous command
      set-up would result in a null pointer dereference if
      `table->route_values` is `NULL`.  The null pointer dereference is fixed
      in another patch, but it now results in failure to set up the
      asynchronous command.  That is a regression from the behavior prior to
      commit 347e2448 ("staging: comedi: tio: implement global tio/ctr
      routing") and commit 56d0b826 ("staging: comedi: ni_mio_common:
      implement new routing for TRIG_EXT").
      
      Change `ni_find_device_routes()` to set `tables->route_values` and/or
      `tables->valid_routes` to valid information even if the other one can
      only be set to `NULL` due to missing information.  The function will
      still return an error in that case.  This should result in
      `tables->valid_routes` being valid for all currently supported device
      families even if the board-specific routing information is missing.
      That should be enough to fix the regression on setting up asynchronous
      commands to use external triggers for boards with missing routing
      information.
      
      Fixes: 347e2448 ("staging: comedi: tio: implement global tio/ctr routing")
      Fixes: 56d0b826 ("staging: comedi: ni_mio_common: implement new routing for TRIG_EXT").
      Cc: <stable@vger.kernel.org> # 4.20+
      Cc: Spencer E. Olson <olsonse@umich.edu>
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Link: https://lore.kernel.org/r/20200114182532.132058-3-abbotti@mev.co.ukSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9fea3a40
    • I
      staging: comedi: ni_routes: fix null dereference in ni_find_route_source() · 01e20b66
      Ian Abbott 提交于
      In `ni_find_route_source()`, `tables->route_values` gets dereferenced.
      However it is possible that `tables->route_values` is `NULL`, leading to
      a null pointer dereference.  `tables->route_values` will be `NULL` if
      the call to `ni_assign_device_routes()` during board initialization
      returned an error due to missing device family routing information or
      missing board-specific routing information.  For example, there is
      currently no board-specific routing information provided for the
      PCIe-6251 board and several other boards, so those are affected by this
      bug.
      
      The bug is triggered when `ni_find_route_source()` is called via
      `ni_check_trigger_arg()` or `ni_check_trigger_arg_roffs()` when checking
      the arguments for setting up asynchronous commands.  Fix it by returning
      `-EINVAL` if `tables->route_values` is `NULL`.
      
      Even with this fix, setting up asynchronous commands to use external
      trigger sources for boards with missing routing information will still
      fail gracefully.  Since `ni_find_route_source()` only depends on the
      device family routing information, it would be better if that was made
      available even if the board-specific routing information is missing.
      That will be addressed by another patch.
      
      Fixes: 4bb90c87 ("staging: comedi: add interface to ni routing table information")
      Cc: <stable@vger.kernel.org> # 4.20+
      Cc: Spencer E. Olson <olsonse@umich.edu>
      Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
      Link: https://lore.kernel.org/r/20200114182532.132058-2-abbotti@mev.co.ukSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01e20b66
    • K
      usb: core: hub: Improved device recognition on remote wakeup · 9c06ac4c
      Keiya Nobuta 提交于
      If hub_activate() is called before D+ has stabilized after remote
      wakeup, the following situation might occur:
      
               __      ___________________
              /  \    /
      D+   __/    \__/
      
      Hub  _______________________________
                |  ^   ^           ^
                |  |   |           |
      Host _____v__|___|___________|______
                |  |   |           |
                |  |   |           \-- Interrupt Transfer (*3)
                |  |    \-- ClearPortFeature (*2)
                |   \-- GetPortStatus (*1)
                \-- Host detects remote wakeup
      
      - D+ goes high, Host starts running by remote wakeup
      - D+ is not stable, goes low
      - Host requests GetPortStatus at (*1) and gets the following hub status:
        - Current Connect Status bit is 0
        - Connect Status Change bit is 1
      - D+ stabilizes, goes high
      - Host requests ClearPortFeature and thus Connect Status Change bit is
        cleared at (*2)
      - After waiting 100 ms, Host starts the Interrupt Transfer at (*3)
      - Since the Connect Status Change bit is 0, Hub returns NAK.
      
      In this case, port_event() is not called in hub_event() and Host cannot
      recognize device. To solve this issue, flag change_bits even if only
      Connect Status Change bit is 1 when got in the first GetPortStatus.
      
      This issue occurs rarely because it only if D+ changes during a very
      short time between GetPortStatus and ClearPortFeature. However, it is
      fatal if it occurs in embedded system.
      Signed-off-by: NKeiya Nobuta <nobuta.keiya@fujitsu.com>
      Cc: stable <stable@vger.kernel.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Link: https://lore.kernel.org/r/20200109051448.28150-1-nobuta.keiya@fujitsu.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9c06ac4c
    • K
      Revert "gpio: thunderx: Switch to GPIOLIB_IRQCHIP" · a564ac35
      Kevin Hao 提交于
      This reverts commit a7fc89f9 because
      there are some bugs in this commit, and we don't have a simple way to
      fix these bugs. So revert this commit to make the thunderx gpio work
      on the stable kernel at least. We will switch to GPIOLIB_IRQCHIP
      for thunderx gpio by following patches.
      
      Fixes: a7fc89f9 ("gpio: thunderx: Switch to GPIOLIB_IRQCHIP")
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Link: https://lore.kernel.org/r/20200114082821.14015-2-haokexin@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
      a564ac35
    • W
      drm/dp_mst: clear time slots for ports invalid · 7617e962
      Wayne Lin 提交于
      [Why]
      When change the connection status in a MST topology, mst device
      which detect the event will send out CONNECTION_STATUS_NOTIFY messgae.
      
      e.g. src-mst-mst-sst => src-mst (unplug) mst-sst
      
      Currently, under the above case of unplugging device, ports which have
      been allocated payloads and are no longer in the topology still occupy
      time slots and recorded in proposed_vcpi[] of topology manager.
      
      If we don't clean up the proposed_vcpi[], when code flow goes to try to
      update payload table by calling drm_dp_update_payload_part1(), we will
      fail at checking port validation due to there are ports with proposed
      time slots but no longer in the mst topology. As the result of that, we
      will also stop updating the DPCD payload table of down stream port.
      
      [How]
      While handling the CONNECTION_STATUS_NOTIFY message, add a detection to
      see if the event indicates that a device is unplugged to an output port.
      If the detection is true, then iterrate over all proposed_vcpi[] to
      see whether a port of the proposed_vcpi[] is still in the topology or
      not. If the port is invalid, set its num_slots to 0.
      
      Thereafter, when try to update payload table by calling
      drm_dp_update_payload_part1(), we can successfully update the DPCD
      payload table of down stream port and clear the proposed_vcpi[] to NULL.
      
      Changes since v1:(https://patchwork.kernel.org/patch/11275801/)
      * Invert the conditional to reduce the indenting
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Signed-off-by: NWayne Lin <Wayne.Lin@amd.com>
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      [removed cc for stable - there's too many patches this depends on for
      this to backport cleanly]
      Link: https://patchwork.freedesktop.org/patch/msgid/20200106102158.28261-1-Wayne.Lin@amd.com
      7617e962
  5. 14 1月, 2020 6 次提交
  6. 13 1月, 2020 9 次提交
    • K
      USB: serial: option: Add support for Quectel RM500Q · accf227d
      Kristian Evensen 提交于
      RM500Q is a 5G module from Quectel, supporting both standalone and
      non-standalone modes. Unlike other recent Quectel modems, it is possible
      to identify the diagnostic interface (bInterfaceProtocol is unique).
      Thus, there is no need to check for the number of endpoints or reserve
      interfaces. The interface number is still dynamic though, so matching on
      interface number is not possible and two entries have to be added to the
      table.
      
      Output from usb-devices with all interfaces enabled (order is diag,
      nmea, at_port, modem, rmnet and adb):
      
      Bus 004 Device 007: ID 2c7c:0800 Quectel Wireless Solutions Co., Ltd.
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               3.20
        bDeviceClass            0 (Defined at Interface level)
        bDeviceSubClass         0
        bDeviceProtocol         0
        bMaxPacketSize0         9
        idVendor           0x2c7c Quectel Wireless Solutions Co., Ltd.
        idProduct          0x0800
        bcdDevice            4.14
        iManufacturer           1 Quectel
        iProduct                2 LTE-A Module
        iSerial                 3 40046d60
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength          328
          bNumInterfaces          6
          bConfigurationValue     1
          iConfiguration          4 DIAG_SER_RMNET
          bmAttributes         0xa0
            (Bus Powered)
            Remote Wakeup
          MaxPower              224mA
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol     48
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x01  EP 1 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           3
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      0
            bInterfaceProtocol      0
            iInterface              0
            ** UNRECOGNIZED:  05 24 00 10 01
            ** UNRECOGNIZED:  05 24 01 00 00
            ** UNRECOGNIZED:  04 24 02 02
            ** UNRECOGNIZED:  05 24 06 00 00
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x83  EP 3 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x000a  1x 10 bytes
              bInterval               9
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x82  EP 2 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x02  EP 2 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        2
            bAlternateSetting       0
            bNumEndpoints           3
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      0
            bInterfaceProtocol      0
            iInterface              0
            ** UNRECOGNIZED:  05 24 00 10 01
            ** UNRECOGNIZED:  05 24 01 00 00
            ** UNRECOGNIZED:  04 24 02 02
            ** UNRECOGNIZED:  05 24 06 00 00
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x85  EP 5 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x000a  1x 10 bytes
              bInterval               9
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x84  EP 4 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x03  EP 3 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        3
            bAlternateSetting       0
            bNumEndpoints           3
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      0
            bInterfaceProtocol      0
            iInterface              0
            ** UNRECOGNIZED:  05 24 00 10 01
            ** UNRECOGNIZED:  05 24 01 00 00
            ** UNRECOGNIZED:  04 24 02 02
            ** UNRECOGNIZED:  05 24 06 00 00
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x87  EP 7 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x000a  1x 10 bytes
              bInterval               9
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x86  EP 6 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x04  EP 4 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        4
            bAlternateSetting       0
            bNumEndpoints           3
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass    255 Vendor Specific Subclass
            bInterfaceProtocol    255 Vendor Specific Protocol
            iInterface              5 CDEV Serial
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x88  EP 8 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0008  1x 8 bytes
              bInterval               9
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x8e  EP 14 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               6
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x0f  EP 15 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               2
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        5
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass     66
            bInterfaceProtocol      1
            iInterface              6 ADB Interface
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x05  EP 5 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x89  EP 9 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0400  1x 1024 bytes
              bInterval               0
              bMaxBurst               0
      Binary Object Store Descriptor:
        bLength                 5
        bDescriptorType        15
        wTotalLength           42
        bNumDeviceCaps          3
        USB 2.0 Extension Device Capability:
          bLength                 7
          bDescriptorType        16
          bDevCapabilityType      2
          bmAttributes   0x00000006
            Link Power Management (LPM) Supported
        SuperSpeed USB Device Capability:
          bLength                10
          bDescriptorType        16
          bDevCapabilityType      3
          bmAttributes         0x00
          wSpeedsSupported   0x000f
            Device can operate at Low Speed (1Mbps)
            Device can operate at Full Speed (12Mbps)
            Device can operate at High Speed (480Mbps)
            Device can operate at SuperSpeed (5Gbps)
          bFunctionalitySupport   1
            Lowest fully-functional device speed is Full Speed (12Mbps)
          bU1DevExitLat           1 micro seconds
          bU2DevExitLat         500 micro seconds
        ** UNRECOGNIZED:  14 10 0a 00 01 00 00 00 00 11 00 00 30 40 0a 00 b0 40 0a 00
      Device Status:     0x0000
        (Bus Powered)
      Signed-off-by: NKristian Evensen <kristian.evensen@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      accf227d
    • J
      USB: serial: simple: Add Motorola Solutions TETRA MTP3xxx and MTP85xx · 260e41ac
      Jerónimo Borque 提交于
      Add device-ids for the Motorola Solutions TETRA radios MTP3xxx series
      and MTP85xx series
      
      $ lsusb -vd 0cad:
      
      Bus 001 Device 009: ID 0cad:9015 Motorola CGISS TETRA PEI interface
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               2.00
        bDeviceClass            0
        bDeviceSubClass         0
        bDeviceProtocol         0
        bMaxPacketSize0        64
        idVendor           0x0cad Motorola CGISS
        idProduct          0x9015
        bcdDevice           24.16
        iManufacturer           1
        iProduct                2
        iSerial                 0
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength       0x0037
          bNumInterfaces          2
          bConfigurationValue     1
          iConfiguration          3
          bmAttributes         0x80
            (Bus Powered)
          MaxPower              500mA
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      0
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x01  EP 1 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      0
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x82  EP 2 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x02  EP 2 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0040  1x 64 bytes
              bInterval               0
      
      Bus 001 Device 010: ID 0cad:9013 Motorola CGISS TETRA PEI interface
      Device Descriptor:
        bLength                18
        bDescriptorType         1
        bcdUSB               2.00
        bDeviceClass            0
        bDeviceSubClass         0
        bDeviceProtocol         0
        bMaxPacketSize0        64
        idVendor           0x0cad Motorola CGISS
        idProduct          0x9013
        bcdDevice           24.16
        iManufacturer           1
        iProduct                2
        iSerial                 0
        bNumConfigurations      1
        Configuration Descriptor:
          bLength                 9
          bDescriptorType         2
          wTotalLength       0x0037
          bNumInterfaces          2
          bConfigurationValue     1
          iConfiguration          3
          bmAttributes         0x80
            (Bus Powered)
          MaxPower              500mA
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        0
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      0
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x81  EP 1 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x01  EP 1 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           2
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      0
            bInterfaceProtocol      0
            iInterface              0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x82  EP 2 IN
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x02  EP 2 OUT
              bmAttributes            2
                Transfer Type            Bulk
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0200  1x 512 bytes
              bInterval               0
      Signed-off-by: NJerónimo Borque <jeronimo@borque.com.ar>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      260e41ac
    • T
      drm/rockchip: fix integer type used for storing dp data rate · c3b040b5
      Tobias Schramm 提交于
      commit 2589c402 ("drm/rockchip: Avoid drm_dp_link helpers") changes
      the type of variables used to store the display port data rate and
      number of lanes to u8. However u8 is not sufficient to store the link
      data rate of the display port.
      This commit reverts the type of data rate to unsigned int.
      
      Fixes: 2589c402 ("drm/rockchip: Avoid drm_dp_link helpers")
      Signed-off-by: NTobias Schramm <t.schramm@manjaro.org>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200109073129.378507-2-t.schramm@manjaro.org
      c3b040b5
    • C
      drm/i915/gt: Mark ring->vma as active while pinned · dce54e86
      Chris Wilson 提交于
      As we use the active state to keep the vma alive while we are reading
      its contents during GPU error capture, we need to mark the
      ring->vma as active during execution if we want to include the rinbuffer
      in the error state.
      Reported-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Fixes: b1e3177b ("drm/i915: Coordinate i915_active with its own mutex")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Acked-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-3-chris@chris-wilson.co.uk
      (cherry picked from commit 8ccfc20a)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      dce54e86
    • C
      drm/i915/gt: Mark context->state vma as active while pinned · e2c56d89
      Chris Wilson 提交于
      As we use the active state to keep the vma alive while we are reading
      its contents during GPU error capture, we need to mark the
      context->state vma as active during execution if we want to include it
      in the error state.
      Reported-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Fixes: b1e3177b ("drm/i915: Coordinate i915_active with its own mutex")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
      Acked-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-2-chris@chris-wilson.co.uk
      (cherry picked from commit 1b8bfc57)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      e2c56d89
    • C
      drm/i915/gt: Skip trying to unbind in restore_ggtt_mappings · c3866f54
      Chris Wilson 提交于
      Currently we first to try to unbind the VMA (and lazily rebind on next
      use) as an optimisation during restore_ggtt_mappings. Ideally, the only
      objects in the GGTT upon resume are the pinned kernel objects which
      can't be unbound and need to be restored. As the unbind interferes with
      the plan to mark those objects as active for error capture, forgo the
      optimisation.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-1-chris@chris-wilson.co.uk
      (cherry picked from commit 80e5351d)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      c3866f54
    • Y
      drm/i915: Add missing include file <linux/math64.h> · ea38aa2e
      YueHaibing 提交于
      Fix build error:
      ./drivers/gpu/drm/i915/selftests/i915_random.h: In function i915_prandom_u32_max_state:
      ./drivers/gpu/drm/i915/selftests/i915_random.h:48:23: error:
       implicit declaration of function mul_u32_u32; did you mean mul_u64_u32_div? [-Werror=implicit-function-declaration]
        return upper_32_bits(mul_u32_u32(prandom_u32_state(state), ep_ro));
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Fixes: 7ce5b685 ("drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result")
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200107135014.36472-1-yuehaibing@huawei.com
      (cherry picked from commit 62bf5465)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      ea38aa2e
    • G
      iio: light: vcnl4000: Fix scale for vcnl4040 · bc80573e
      Guido Günther 提交于
      According to the data sheet the ambient sensor's scale is 0.12 lux/step
      (not 0.024 lux/step as used by vcnl4200) when the integration time is
      80ms. The integration time is currently hardcoded in the driver to that
      value.
      
      See p. 8 in https://www.vishay.com/docs/84307/designingvcnl4040.pdf
      
      Fixes: 5a441aad ("iio: light: vcnl4000 add support for the VCNL4040 proximity and light sensor")
      Signed-off-by: NGuido Günther <agx@sigxcpu.org>
      Reviewed-by: NMarco Felsch <m.felsch@pengutronix.de>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bc80573e
    • L
      iio: buffer: align the size of scan bytes to size of the largest element · 883f6165
      Lars Möllendorf 提交于
      Previous versions of `iio_compute_scan_bytes` only aligned each element
      to its own length (i.e. its own natural alignment). Because multiple
      consecutive sets of scan elements are buffered this does not work in
      case the computed scan bytes do not align with the natural alignment of
      the first scan element in the set.
      
      This commit fixes this by aligning the scan bytes to the natural
      alignment of the largest scan element in the set.
      
      Fixes: 959d2952 ("staging:iio: make iio_sw_buffer_preenable much more general.")
      Signed-off-by: NLars Möllendorf <lars.moellendorf@plating.de>
      Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      883f6165