1. 11 5月, 2016 10 次提交
  2. 02 5月, 2016 1 次提交
  3. 14 4月, 2016 1 次提交
    • A
      dmaengine: dw: rename masters to reflect actual topology · c422025c
      Andy Shevchenko 提交于
      The source and destination masters are reflecting buses or their layers to
      where the different devices can be connected. The patch changes the master
      names to reflect which one is related to which independently on the transfer
      direction.
      
      The outcome of the change is that the memory data width is now always limited
      by a data width of the master which is dedicated to communicate to memory.
      
      The patch will not break anything since all current users have the same data
      width for all masters. Though it would be nice to revisit avr32 platforms to
      check what is the actual hardware topology in use there. It seems that it has
      one bus and two masters on it as stated by Table 8-2, that's why everything
      works independently on the master in use. The purpose of the sequential patch
      is to fix the driver for configuration of more than one bus.
      
      The change is done in the assumption that src_master and dst_master are
      reflecting a connection to the memory and peripheral correspondently on avr32
      and otherwise on the rest.
      Acked-by: NHans-Christian Egtvedt <egtvedt@samfundet.no>
      Acked-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      c422025c
  4. 18 3月, 2016 1 次提交
  5. 12 3月, 2016 2 次提交
  6. 04 3月, 2016 1 次提交
  7. 01 3月, 2016 2 次提交
  8. 26 2月, 2016 2 次提交
    • O
      sata_via: Implement hotplug for VT6421 · 57e5568f
      Ondrej Zary 提交于
      Enable IRQ on hotplug and add an interrupt handler to handle it.
      
      This allows hotplug to work:
      ata5: exception Emask 0x10 SAct 0x0 SErr 0x70000 action 0xe frozen
      ata5: SError: { PHYRdyChg PHYInt CommWake }
      ata5: hard resetting link
      ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
      ata5.00: LPM support broken, forcing max_power
      ata5.00: ATA-7: WDC WD800JD-75MSA3, 10.01E04, max UDMA/133
      ata5.00: 156250000 sectors, multi 0: LBA48 NCQ (depth 0/32)
      ata5.00: LPM support broken, forcing max_power
      ata5.00: configured for UDMA/133
      ata5: EH complete
      scsi 4:0:0:0: Direct-Access     ATA      WDC WD800JD-75MS 1E04 PQ: 0 ANSI: 5
      sd 4:0:0:0: [sdb] 156250000 512-byte logical blocks: (80.0 GB/74.5 GiB)
      sd 4:0:0:0: [sdb] Write Protect is off
      sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
      sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
      sd 4:0:0:0: Attached scsi generic sg1 type 0
      sd 4:0:0:0: [sdb] Attached SCSI disk
      
      And also hot unplug:
      ata5: exception Emask 0x10 SAct 0x0 SErr 0x1b0000 action 0xe frozen
      ata5: SError: { PHYRdyChg PHYInt 10B8B Dispar }
      ata5: hard resetting link
      ata5: SATA link down (SStatus 0 SControl 310)
      ata5: hard resetting link
      ata5: SATA link down (SStatus 0 SControl 310)
      ata5: hard resetting link
      ata5: SATA link down (SStatus 0 SControl 310)
      ata5.00: disabled
      ata5: EH complete
      ata5.00: detaching (SCSI 4:0:0:0)
      sd 4:0:0:0: [sdb] Synchronizing SCSI cache
      sd 4:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
      sd 4:0:0:0: [sdb] Stopping disk
      sd 4:0:0:0: [sdb] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
      Signed-off-by: NOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      57e5568f
    • O
      sata_via: Apply WD workaround only when needed on VT6421 · 44a9b494
      Ondrej Zary 提交于
      Currently, workaround for broken WD drives is applied always, slowing
      down all drives. And it has a bug - it's not applied after resume.
      
      Apply the workaround only if the error really appears
      (SErr == 0x1000500). This allows unaffected drives to run at full speed
      (provided that no affected drive is connected to the controller).
      Also make sure the workaround is re-applied on resume.
      
      Tested on VT6421.
      As SCR registers access is known to cause problems on VT6420 (and I
      don't have it to test), keep the workaround applied always on VT6420.
      
      Unaffected drive (Hitachi HDS721680PLA380):
      Before:
      $ hdparm -t --direct /dev/sdb
      /dev/sdb:
       Timing O_DIRECT disk reads: 160 MB in  3.01 seconds =  53.16 MB/sec
      
      After:
      $ hdparm -t --direct /dev/sdb
      /dev/sdb:
       Timing O_DIRECT disk reads: 200 MB in  3.01 seconds =  66.47 MB/sec
      
      Affected drive (WDC WD5003ABYX-18WERA0):
      Before:
      $ hdparm -t --direct /dev/sda
      
      /dev/sda:
       Timing O_DIRECT disk reads: 180 MB in  3.02 seconds =  59.51 MB/sec
      
      After:
      $ hdparm -t --direct /dev/sdb
      /dev/sdb:
       Timing O_DIRECT disk reads: 156 MB in  3.03 seconds =  51.48 MB/sec
      $ hdparm -t --direct /dev/sdb
      /dev/sdb:
       Timing O_DIRECT disk reads: 180 MB in  3.02 seconds =  59.64 MB/sec
      
      The first hdparm is slower because of the error:
      [   50.408042] ata5: Incompatible drive: enabling workaround. This slows down transfer rate to ~60 MB/s
      [   50.728052] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
      [   50.744834] ata5.00: configured for UDMA/133
      Signed-off-by: NOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      44a9b494
  9. 19 2月, 2016 8 次提交
  10. 16 2月, 2016 1 次提交
  11. 11 2月, 2016 6 次提交
  12. 06 2月, 2016 1 次提交
    • B
      PCI: Remove includes of asm/pci-bridge.h · 952bbcb0
      Bjorn Helgaas 提交于
      Drivers should include asm/pci-bridge.h only when they need the arch-
      specific things provided there.  Outside of the arch/ directories, the only
      drivers that actually need things provided by asm/pci-bridge.h are the
      powerpc RPA hotplug drivers in drivers/pci/hotplug/rpa*.
      
      Remove the includes of asm/pci-bridge.h from the other drivers, adding an
      include of linux/pci.h if necessary.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      952bbcb0
  13. 02 2月, 2016 1 次提交
    • T
      libata: fix sff host state machine locking while polling · 8eee1d3e
      Tejun Heo 提交于
      The bulk of ATA host state machine is implemented by
      ata_sff_hsm_move().  The function is called from either the interrupt
      handler or, if polling, a work item.  Unlike from the interrupt path,
      the polling path calls the function without holding the host lock and
      ata_sff_hsm_move() selectively grabs the lock.
      
      This is completely broken.  If an IRQ triggers while polling is in
      progress, the two can easily race and end up accessing the hardware
      and updating state machine state at the same time.  This can put the
      state machine in an illegal state and lead to a crash like the
      following.
      
        kernel BUG at drivers/ata/libata-sff.c:1302!
        invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
        Modules linked in:
        CPU: 1 PID: 10679 Comm: syz-executor Not tainted 4.5.0-rc1+ #300
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
        task: ffff88002bd00000 ti: ffff88002e048000 task.ti: ffff88002e048000
        RIP: 0010:[<ffffffff83a83409>]  [<ffffffff83a83409>] ata_sff_hsm_move+0x619/0x1c60
        ...
        Call Trace:
         <IRQ>
         [<ffffffff83a84c31>] __ata_sff_port_intr+0x1e1/0x3a0 drivers/ata/libata-sff.c:1584
         [<ffffffff83a85611>] ata_bmdma_port_intr+0x71/0x400 drivers/ata/libata-sff.c:2877
         [<     inline     >] __ata_sff_interrupt drivers/ata/libata-sff.c:1629
         [<ffffffff83a85bf3>] ata_bmdma_interrupt+0x253/0x580 drivers/ata/libata-sff.c:2902
         [<ffffffff81479f98>] handle_irq_event_percpu+0x108/0x7e0 kernel/irq/handle.c:157
         [<ffffffff8147a717>] handle_irq_event+0xa7/0x140 kernel/irq/handle.c:205
         [<ffffffff81484573>] handle_edge_irq+0x1e3/0x8d0 kernel/irq/chip.c:623
         [<     inline     >] generic_handle_irq_desc include/linux/irqdesc.h:146
         [<ffffffff811a92bc>] handle_irq+0x10c/0x2a0 arch/x86/kernel/irq_64.c:78
         [<ffffffff811a7e4d>] do_IRQ+0x7d/0x1a0 arch/x86/kernel/irq.c:240
         [<ffffffff86653d4c>] common_interrupt+0x8c/0x8c arch/x86/entry/entry_64.S:520
         <EOI>
         [<     inline     >] rcu_lock_acquire include/linux/rcupdate.h:490
         [<     inline     >] rcu_read_lock include/linux/rcupdate.h:874
         [<ffffffff8164b4a1>] filemap_map_pages+0x131/0xba0 mm/filemap.c:2145
         [<     inline     >] do_fault_around mm/memory.c:2943
         [<     inline     >] do_read_fault mm/memory.c:2962
         [<     inline     >] do_fault mm/memory.c:3133
         [<     inline     >] handle_pte_fault mm/memory.c:3308
         [<     inline     >] __handle_mm_fault mm/memory.c:3418
         [<ffffffff816efb16>] handle_mm_fault+0x2516/0x49a0 mm/memory.c:3447
         [<ffffffff8127dc16>] __do_page_fault+0x376/0x960 arch/x86/mm/fault.c:1238
         [<ffffffff8127e358>] trace_do_page_fault+0xe8/0x420 arch/x86/mm/fault.c:1331
         [<ffffffff8126f514>] do_async_page_fault+0x14/0xd0 arch/x86/kernel/kvm.c:264
         [<ffffffff86655578>] async_page_fault+0x28/0x30 arch/x86/entry/entry_64.S:986
      
      Fix it by ensuring that the polling path is holding the host lock
      before entering ata_sff_hsm_move() so that all hardware accesses and
      state updates are performed under the host lock.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-and-tested-by: NDmitry Vyukov <dvyukov@google.com>
      Link: http://lkml.kernel.org/g/CACT4Y+b_JsOxJu2EZyEf+mOXORc_zid5V1-pLZSroJVxyWdSpw@mail.gmail.com
      Cc: stable@vger.kernel.org
      8eee1d3e
  14. 29 1月, 2016 1 次提交
    • T
      libata-sff: use WARN instead of BUG on illegal host state machine state · a588afc9
      Tejun Heo 提交于
      ata_sff_hsm_move() triggers BUG if it sees a host state machine state
      that it dind't expect.  The risk for data corruption when the
      condition occurs is low as it's highly unlikely that it would lead to
      spurious completion of commands.  The BUG occasionally triggered for
      subtle race conditions in the driver.  Let's downgrade it to WARN so
      that it doesn't kill the machine unnecessarily.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      a588afc9
  15. 26 1月, 2016 2 次提交