1. 24 7月, 2014 1 次提交
  2. 21 7月, 2014 4 次提交
  3. 19 7月, 2014 2 次提交
  4. 18 7月, 2014 7 次提交
    • T
      irqchip: gic: Fix core ID calculation when topology is read from DT · 29e697b1
      Tomasz Figa 提交于
      Certain GIC implementation, namely those found on earlier, single
      cluster, Exynos SoCs, have registers mapped without per-CPU banking,
      which means that the driver needs to use different offset for each CPU.
      
      Currently the driver calculates the offset by multiplying value returned
      by cpu_logical_map() by CPU offset parsed from DT. This is correct when
      CPU topology is not specified in DT and aforementioned function returns
      core ID alone. However when DT contains CPU topology, the function
      changes to return cluster ID as well, which is non-zero on mentioned
      SoCs and so breaks the calculation in GIC driver.
      
      This patch fixes this by masking out cluster ID in CPU offset
      calculation so that only core ID is considered. Multi-cluster Exynos
      SoCs already have banked GIC implementations, so this simple fix should
      be enough.
      Reported-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Reported-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: NTomasz Figa <t.figa@samsung.com>
      Fixes: db0d4db2 ("ARM: gic: allow GIC to support non-banked setups")
      Cc: <stable@vger.kernel.org> # v3.3+
      Link: https://lkml.kernel.org/r/1405610624-18722-1-git-send-email-t.figa@samsung.comSigned-off-by: NJason Cooper <jason@lakedaemon.net>
      29e697b1
    • D
      Drivers: hv: hv_fcopy: fix a race condition for SMP guest · 2ef82d24
      Dexuan Cui 提交于
      We should schedule the 5s "timer work" before starting the data transfer,
      otherwise, the data transfer code may finish so fast on another
      virtual cpu that when the code(fcopy_write()) trying to cancel the 5s
      "timer work" can occasionally fail because the "timer work" may haven't
      been scheduled yet and as a result the fcopy process will be aborted
      wrongly by fcopy_work_func() in 5s.
      
      Thank Liz Zhang <lizzha@microsoft.com> for the initial investigation
      on the bug.
      
      This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1118123Tested-by: NLiz Zhang <lizzha@microsoft.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDexuan Cui <decui@microsoft.com>
      Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2ef82d24
    • G
      usb: Check if port status is equal to RxDetect · bb86cf56
      Gavin Guo 提交于
      When using USB 3.0 pen drive with the [AMD] FCH USB XHCI Controller
      [1022:7814], the second hotplugging will experience the USB 3.0 pen
      drive is recognized as high-speed device. After bisecting the kernel,
      I found the commit number 41e7e056
      (USB: Allow USB 3.0 ports to be disabled.) causes the bug. After doing
      some experiments, the bug can be fixed by avoiding executing the function
      hub_usb3_port_disable(). Because the port status with [AMD] FCH USB
      XHCI Controlleris [1022:7814] is already in RxDetect
      (I tried printing out the port status before setting to Disabled state),
      it's reasonable to check the port status before really executing
      hub_usb3_port_disable().
      
      Fixes: 41e7e056 (USB: Allow USB 3.0 ports to be disabled.)
      Signed-off-by: NGavin Guo <gavin.guo@canonical.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bb86cf56
    • A
      usb: chipidea: udc: Disable auto ZLP generation on ep0 · 953c6646
      Abbas Raza 提交于
      There are 2 methods for ZLP (zero-length packet) generation:
      1) In software
      2) Automatic generation by device controller
      
      1) is implemented in UDC driver and it attaches ZLP to IN packet if
         descriptor->size < wLength
      2) can be enabled/disabled by setting ZLT bit in the QH
      
      When gadget ffs is connected to ubuntu host, the host sends
      get descriptor request and wLength in setup packet is 255 while the
      size of descriptor which will be sent by gadget in IN packet is
      64 byte. So the composite driver sets req->zero = 1.
      In UDC driver following code will be executed then
      
              if (hwreq->req.zero && hwreq->req.length
                  && (hwreq->req.length % hwep->ep.maxpacket == 0))
                      add_td_to_list(hwep, hwreq, 0);
      
      Case-A:
      So in case of ubuntu host, UDC driver will attach a ZLP to the IN packet.
      ubuntu host will request 255 byte in IN request, gadget will send 64 byte
      with ZLP and host will come to know that there is no more data.
      But hold on, by default ZLT=0 for endpoint 0 so hardware also tries to
      automatically generate the ZLP which blocks enumeration for ~6 seconds due
      to endpoint 0 STALL, NAKs are sent to host for any requests (OUT/PING)
      
      Case-B:
      In case when gadget ffs is connected to Apple device, Apple device sends
      setup packet with wLength=64. So descriptor->size = 64 and wLength=64
      therefore req->zero = 0 and UDC driver will not attach any ZLP to the
      IN packet. Apple device requests 64 bytes, gets 64 bytes and doesn't
      further request for IN data. But ZLT=0 by default for endpoint 0 so
      hardware tries to automatically generate the ZLP which blocks enumeration
      for ~6 seconds due to endpoint 0 STALL, NAKs are sent to host for any
      requests (OUT/PING)
      
      According to USB2.0 specs:
      
          8.5.3.2 Variable-length Data Stage
          A control pipe may have a variable-length data phase in which the
          host requests more data than is contained in the specified data
          structure. When all of the data structure is returned to the host,
          the function should indicate that the Data stage is ended by
          returning a packet that is shorter than the MaxPacketSize for the
          pipe. If the data structure is an exact multiple of wMaxPacketSize
          for the pipe, the function will return a zero-length packet to indicate
          the end of the Data stage.
      
      In Case-A mentioned above:
      If we disable software ZLP generation & ZLT=0 for endpoint 0 OR if software
      ZLP generation is not disabled but we set ZLT=1 for endpoint 0 then
      enumeration doesn't block for 6 seconds.
      
      In Case-B mentioned above:
      If we disable software ZLP generation & ZLT=0 for endpoint then enumeration
      still blocks due to ZLP automatically generated by hardware and host not needing
      it. But if we keep software ZLP generation enabled but we set ZLT=1 for
      endpoint 0 then enumeration doesn't block for 6 seconds.
      
      So the proper solution for this issue seems to disable automatic ZLP generation
      by hardware (i.e by setting ZLT=1 for endpoint 0) and let software (UDC driver)
      handle the ZLP generation based on req->zero field.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NAbbas Raza <Abbas_Raza@mentor.com>
      Signed-off-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      953c6646
    • B
      net: huawei_cdc_ncm: add "subclass 3" devices · c2a6c781
      Bjørn Mork 提交于
      Huawei's usage of the subclass and protocol fields is not 100%
      clear to us, but there appears to be a very strict system.
      
      A device with the "shared" device ID 12d1:1506 and this NCM
      function was recently reported (showing only default altsetting):
      
          Interface Descriptor:
            bLength                 9
            bDescriptorType         4
            bInterfaceNumber        1
            bAlternateSetting       0
            bNumEndpoints           1
            bInterfaceClass       255 Vendor Specific Class
            bInterfaceSubClass      3
            bInterfaceProtocol     22
            iInterface              8 CDC Network Control Model (NCM)
            ** UNRECOGNIZED:  05 24 00 10 01
            ** UNRECOGNIZED:  06 24 1a 00 01 1f
            ** UNRECOGNIZED:  0c 24 1b 00 01 00 04 10 14 dc 05 20
            ** UNRECOGNIZED:  0d 24 0f 0a 0f 00 00 00 ea 05 03 00 01
            ** UNRECOGNIZED:  05 24 06 01 01
            Endpoint Descriptor:
              bLength                 7
              bDescriptorType         5
              bEndpointAddress     0x85  EP 5 IN
              bmAttributes            3
                Transfer Type            Interrupt
                Synch Type               None
                Usage Type               Data
              wMaxPacketSize     0x0010  1x 16 bytes
              bInterval               9
      
      Cc: Enrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2a6c781
    • B
      net: qmi_wwan: add two Sierra Wireless/Netgear devices · 53433300
      Bjørn Mork 提交于
      Add two device IDs found in an out-of-tree driver downloadable
      from Netgear.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      53433300
    • D
      wan/x25_asy: integer overflow in x25_asy_change_mtu() · a28d0e87
      Dan Carpenter 提交于
      If "newmtu * 2 + 4" is too large then it can cause an integer overflow
      leading to memory corruption.  Eric Dumazet suggests that 65534 is a
      reasonable upper limit.
      
      Btw, "newmtu" is not allowed to be a negative number because of the
      check in dev_set_mtu(), so that's ok.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a28d0e87
  5. 17 7月, 2014 18 次提交
  6. 16 7月, 2014 8 次提交