1. 13 8月, 2014 1 次提交
  2. 26 7月, 2014 1 次提交
  3. 25 7月, 2014 1 次提交
  4. 24 7月, 2014 3 次提交
  5. 23 7月, 2014 4 次提交
    • C
      drm/radeon: fix irq ring buffer overflow handling · e8c214d2
      Christian König 提交于
      We must mask out the overflow bit as well, otherwise
      the wptr will never match the rptr again and the interrupt
      handler will loop forever.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      e8c214d2
    • T
      libata: introduce ata_host->n_tags to avoid oops on SAS controllers · 1a112d10
      Tejun Heo 提交于
      1871ee13 ("libata: support the ata host which implements a queue
      depth less than 32") directly used ata_port->scsi_host->can_queue from
      ata_qc_new() to determine the number of tags supported by the host;
      unfortunately, SAS controllers doing SATA don't initialize ->scsi_host
      leading to the following oops.
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000058
       IP: [<ffffffff814e0618>] ata_qc_new_init+0x188/0x1b0
       PGD 0
       Oops: 0002 [#1] SMP
       Modules linked in: isci libsas scsi_transport_sas mgag200 drm_kms_helper ttm
       CPU: 1 PID: 518 Comm: udevd Not tainted 3.16.0-rc6+ #62
       Hardware name: Intel Corporation S2600CO/S2600CO, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
       task: ffff880c1a00b280 ti: ffff88061a000000 task.ti: ffff88061a000000
       RIP: 0010:[<ffffffff814e0618>]  [<ffffffff814e0618>] ata_qc_new_init+0x188/0x1b0
       RSP: 0018:ffff88061a003ae8  EFLAGS: 00010012
       RAX: 0000000000000001 RBX: ffff88000241ca80 RCX: 00000000000000fa
       RDX: 0000000000000020 RSI: 0000000000000020 RDI: ffff8806194aa298
       RBP: ffff88061a003ae8 R08: ffff8806194a8000 R09: 0000000000000000
       R10: 0000000000000000 R11: ffff88000241ca80 R12: ffff88061ad58200
       R13: ffff8806194aa298 R14: ffffffff814e67a0 R15: ffff8806194a8000
       FS:  00007f3ad7fe3840(0000) GS:ffff880627620000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000000000058 CR3: 000000061a118000 CR4: 00000000001407e0
       Stack:
        ffff88061a003b20 ffffffff814e96e1 ffff88000241ca80 ffff88061ad58200
        ffff8800b6bf6000 ffff880c1c988000 ffff880619903850 ffff88061a003b68
        ffffffffa0056ce1 ffff88061a003b48 0000000013d6e6f8 ffff88000241ca80
       Call Trace:
        [<ffffffff814e96e1>] ata_sas_queuecmd+0xa1/0x430
        [<ffffffffa0056ce1>] sas_queuecommand+0x191/0x220 [libsas]
        [<ffffffff8149afee>] scsi_dispatch_cmd+0x10e/0x300
        [<ffffffff814a3bc5>] scsi_request_fn+0x2f5/0x550
        [<ffffffff81317613>] __blk_run_queue+0x33/0x40
        [<ffffffff8131781a>] queue_unplugged+0x2a/0x90
        [<ffffffff8131ceb4>] blk_flush_plug_list+0x1b4/0x210
        [<ffffffff8131d274>] blk_finish_plug+0x14/0x50
        [<ffffffff8117eaa8>] __do_page_cache_readahead+0x198/0x1f0
        [<ffffffff8117ee21>] force_page_cache_readahead+0x31/0x50
        [<ffffffff8117ee7e>] page_cache_sync_readahead+0x3e/0x50
        [<ffffffff81172ac6>] generic_file_read_iter+0x496/0x5a0
        [<ffffffff81219897>] blkdev_read_iter+0x37/0x40
        [<ffffffff811e307e>] new_sync_read+0x7e/0xb0
        [<ffffffff811e3734>] vfs_read+0x94/0x170
        [<ffffffff811e43c6>] SyS_read+0x46/0xb0
        [<ffffffff811e33d1>] ? SyS_lseek+0x91/0xb0
        [<ffffffff8171ee29>] system_call_fastpath+0x16/0x1b
       Code: 00 00 00 88 50 29 83 7f 08 01 19 d2 83 e2 f0 83 ea 50 88 50 34 c6 81 1d 02 00 00 40 c6 81 17 02 00 00 00 5d c3 66 0f 1f 44 00 00 <89> 14 25 58 00 00 00
      
      Fix it by introducing ata_host->n_tags which is initialized to
      ATA_MAX_QUEUE - 1 in ata_host_init() for SAS controllers and set to
      scsi_host_template->can_queue in ata_host_register() for !SAS ones.
      As SAS hosts are never registered, this will give them the same
      ATA_MAX_QUEUE - 1 as before.  Note that we can't use
      scsi_host->can_queue directly for SAS hosts anyway as they can go
      higher than the libata maximum.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NMike Qiu <qiudayu@linux.vnet.ibm.com>
      Reported-by: NJesse Brandeburg <jesse.brandeburg@gmail.com>
      Reported-by: NPeter Hurley <peter@hurleysoftware.com>
      Reported-by: NPeter Zijlstra <peterz@infradead.org>
      Tested-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Fixes: 1871ee13 ("libata: support the ata host which implements a queue depth less than 32")
      Cc: Kevin Hao <haokexin@gmail.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: stable@vger.kernel.org
      1a112d10
    • C
      drm/i915: Simplify i915_gem_release_all_mmaps() · eedd10f4
      Chris Wilson 提交于
      An object can only have an active gtt mapping if it is currently bound
      into the global gtt. Therefore we can simply walk the list of all bound
      objects and check the flag upon those for an active gtt mapping.
      
      From commit 48018a57
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Fri Dec 13 15:22:31 2013 -0200
      
          drm/i915: release the GTT mmaps when going into D3
      
      Also note that the WARN is inappropriate for this function as GPU
      activity is orthogonal to GTT mmap status. Rather it is the caller that
      relies upon this condition and so it should assert that the GPU is idle
      itself.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=80081Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: cherry-pick from -next to -fixes.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      eedd10f4
    • C
  6. 22 7月, 2014 6 次提交
  7. 21 7月, 2014 5 次提交
  8. 19 7月, 2014 4 次提交
  9. 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
  10. 17 7月, 2014 8 次提交