1. 17 10月, 2013 1 次提交
    • A
      ATA / ACPI: remove power dependent device handling · b08fc109
      Aaron Lu 提交于
      Previously, we wanted SCSI devices corrsponding to ATA devices to
      be runtime resumed when the power resource for those ATA device was
      turned on by some other device, so we added the SCSI device to the
      dependent device list of the ATA device's ACPI node.  However, this
      code has no effect after commit 41863fce (ACPI / power: Drop automaitc
      resume of power resource dependent devices) and the mechanism it was
      supposed to implement is regarded as a bad idea now, so drop it.
      
      [rjw: Changelog]
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b08fc109
  2. 26 9月, 2013 1 次提交
  3. 03 9月, 2013 1 次提交
  4. 28 8月, 2013 1 次提交
  5. 25 8月, 2013 4 次提交
  6. 24 8月, 2013 1 次提交
    • A
      ata: acpi: rework the ata acpi bind support · f1bc1e4c
      Aaron Lu 提交于
      Binding ACPI handle to SCSI device has several drawbacks, namely:
      1 During ATA device initialization time, ACPI handle will be needed
        while SCSI devices are not created yet. So each time ACPI handle is
        needed, instead of retrieving the handle by ACPI_HANDLE macro,
        a namespace scan is performed to find the handle for the corresponding
        ATA device. This is inefficient, and also expose a restriction on
        calling path not holding any lock.
      2 The binding to SCSI device tree makes code complex, while at the same
        time doesn't bring us any benefit. All ACPI handlings are still done
        in ATA module, not in SCSI.
      
      Rework the ATA ACPI binding code to bind ACPI handle to ATA transport
      devices(ATA port and ATA device). The binding needs to be done only once,
      since the ATA transport devices do not go away with hotplug. And due to
      this, the flush_work call in hotplug handler for ATA bay is no longer
      needed.
      
      Tested on an Intel test platform for binding and runtime power off for
      ODD(ZPODD) and hard disk; on an ASUS S400C for binding and normal boot
      and S3, where its SATA port node has _SDD and _GTF control methods when
      configured as an AHCI controller and its PATA device node has _GTF
      control method when configured as an IDE controller. SATA PMP binding
      and ATA hotplug is not tested.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Tested-by: NDirk Griesbach <spamthis@freenet.de>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      f1bc1e4c
  7. 20 8月, 2013 1 次提交
    • A
      sata_fsl: save irqs while coalescing · 99bbdfa6
      Anthony Foiani 提交于
      Before this patch, I was seeing the following lockdep splat on my
      MPC8315 (PPC32) target:
      
        [    9.086051] =================================
        [    9.090393] [ INFO: inconsistent lock state ]
        [    9.094744] 3.9.7-ajf-gc39503d #1 Not tainted
        [    9.099087] ---------------------------------
        [    9.103432] inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
        [    9.109431] scsi_eh_1/39 [HC1[1]:SC0[0]:HE0:SE1] takes:
        [    9.114642]  (&(&host->lock)->rlock){?.+...}, at: [<c02f4168>] sata_fsl_interrupt+0x50/0x250
        [    9.123137] {HARDIRQ-ON-W} state was registered at:
        [    9.128004]   [<c006cdb8>] lock_acquire+0x90/0xf4
        [    9.132737]   [<c043ef04>] _raw_spin_lock+0x34/0x4c
        [    9.137645]   [<c02f3560>] fsl_sata_set_irq_coalescing+0x68/0x100
        [    9.143750]   [<c02f36a0>] sata_fsl_init_controller+0xa8/0xc0
        [    9.149505]   [<c02f3f10>] sata_fsl_probe+0x17c/0x2e8
        [    9.154568]   [<c02acc90>] driver_probe_device+0x90/0x248
        [    9.159987]   [<c02acf0c>] __driver_attach+0xc4/0xc8
        [    9.164964]   [<c02aae74>] bus_for_each_dev+0x5c/0xa8
        [    9.170028]   [<c02ac218>] bus_add_driver+0x100/0x26c
        [    9.175091]   [<c02ad638>] driver_register+0x88/0x198
        [    9.180155]   [<c0003a24>] do_one_initcall+0x58/0x1b4
        [    9.185226]   [<c05aeeac>] kernel_init_freeable+0x118/0x1c0
        [    9.190823]   [<c0004110>] kernel_init+0x18/0x108
        [    9.195542]   [<c000f6b8>] ret_from_kernel_thread+0x64/0x6c
        [    9.201142] irq event stamp: 160
        [    9.204366] hardirqs last  enabled at (159): [<c043f778>] _raw_spin_unlock_irq+0x30/0x50
        [    9.212469] hardirqs last disabled at (160): [<c000f414>] reenable_mmu+0x30/0x88
        [    9.219867] softirqs last  enabled at (144): [<c002ae5c>] __do_softirq+0x168/0x218
        [    9.227435] softirqs last disabled at (137): [<c002b0d4>] irq_exit+0xa8/0xb4
        [    9.234481]
        [    9.234481] other info that might help us debug this:
        [    9.240995]  Possible unsafe locking scenario:
        [    9.240995]
        [    9.246898]        CPU0
        [    9.249337]        ----
        [    9.251776]   lock(&(&host->lock)->rlock);
        [    9.255878]   <Interrupt>
        [    9.258492]     lock(&(&host->lock)->rlock);
        [    9.262765]
        [    9.262765]  *** DEADLOCK ***
        [    9.262765]
        [    9.268684] no locks held by scsi_eh_1/39.
        [    9.272767]
        [    9.272767] stack backtrace:
        [    9.277117] Call Trace:
        [    9.279589] [cfff9da0] [c0008504] show_stack+0x48/0x150 (unreliable)
        [    9.285972] [cfff9de0] [c0447d5c] print_usage_bug.part.35+0x268/0x27c
        [    9.292425] [cfff9e10] [c006ace4] mark_lock+0x2ac/0x658
        [    9.297660] [cfff9e40] [c006b7e4] __lock_acquire+0x754/0x1840
        [    9.303414] [cfff9ee0] [c006cdb8] lock_acquire+0x90/0xf4
        [    9.308745] [cfff9f20] [c043ef04] _raw_spin_lock+0x34/0x4c
        [    9.314250] [cfff9f30] [c02f4168] sata_fsl_interrupt+0x50/0x250
        [    9.320187] [cfff9f70] [c0079ff0] handle_irq_event_percpu+0x90/0x254
        [    9.326547] [cfff9fc0] [c007a1fc] handle_irq_event+0x48/0x78
        [    9.332220] [cfff9fe0] [c007c95c] handle_level_irq+0x9c/0x104
        [    9.337981] [cfff9ff0] [c000d978] call_handle_irq+0x18/0x28
        [    9.343568] [cc7139f0] [c000608c] do_IRQ+0xf0/0x1a8
        [    9.348464] [cc713a20] [c000fc8c] ret_from_except+0x0/0x14
        [    9.353983] --- Exception: 501 at _raw_spin_unlock_irq+0x40/0x50
        [    9.353983]     LR = _raw_spin_unlock_irq+0x30/0x50
        [    9.364839] [cc713af0] [c043db10] wait_for_common+0xac/0x188
        [    9.370513] [cc713b30] [c02ddee4] ata_exec_internal_sg+0x2b0/0x4f0
        [    9.376699] [cc713be0] [c02de18c] ata_exec_internal+0x68/0xa8
        [    9.382454] [cc713c20] [c02de4b8] ata_dev_read_id+0x158/0x594
        [    9.388205] [cc713ca0] [c02ec244] ata_eh_recover+0xd88/0x13d0
        [    9.393962] [cc713d20] [c02f2520] sata_pmp_error_handler+0xc0/0x8ac
        [    9.400234] [cc713dd0] [c02ecdc8] ata_scsi_port_error_handler+0x464/0x5e8
        [    9.407023] [cc713e10] [c02ecfd0] ata_scsi_error+0x84/0xb8
        [    9.412528] [cc713e40] [c02c4974] scsi_error_handler+0xd8/0x47c
        [    9.418457] [cc713eb0] [c004737c] kthread+0xa8/0xac
        [    9.423355] [cc713f40] [c000f6b8] ret_from_kernel_thread+0x64/0x6c
      
      This fix was suggested by Bhushan Bharat <R65777@freescale.com>, and
      was discussed in email at:
      
        http://linuxppc.10917.n7.nabble.com/MPC8315-reboot-failure-lockdep-splat-possibly-related-tp75162.html
      
      Same patch successfully tested with 3.9.7.  linux-next compiled but
      not tested on hardware.
      
      This patch is based off linux-next tag next-20130819
      (which is commit 66a01bae29d11916c09f9f5a937cafe7d402e4a5 )
      Signed-off-by: NAnthony Foiani <anthony.foiani@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      99bbdfa6
  8. 19 8月, 2013 1 次提交
  9. 15 8月, 2013 2 次提交
  10. 14 8月, 2013 1 次提交
    • J
      drivers/ata/sata_rcar.c: simplify use of devm_ioremap_resource · 4a9b7f9f
      Julia Lawall 提交于
      Remove unneeded error handling on the result of a call to
      platform_get_resource when the value is passed to devm_ioremap_resource.
      
      Move the call to platform_get_resource adjacent to the call to
      devm_ioremap_resource to make the connection between them more clear.
      
      A simplified version of the semantic patch that makes this change is as
      follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression pdev,res,n,e,e1;
      expression ret != 0;
      identifier l;
      @@
      
      - res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        ... when != res
      - if (res == NULL) { ... \(goto l;\|return ret;\) }
        ... when != res
      + res = platform_get_resource(pdev, IORESOURCE_MEM, n);
        e = devm_ioremap_resource(e1, res);
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      4a9b7f9f
  11. 10 8月, 2013 2 次提交
  12. 09 8月, 2013 2 次提交
    • J
      ata: pata_samsung_cf: add missing __iomem annotation · 3d70a363
      Jingoo Han 提交于
      Added missing __iomem annotation and staticized local symbol
      in order to fix the following sparse warnings:
      
      drivers/ata/pata_samsung_cf.c:244:14: warning: symbol 'pata_s3c_data_xfer' was not declared. Should it be static?
      drivers/ata/pata_samsung_cf.c:423:20: warning: incorrect type in argument 1 (different address spaces)
      drivers/ata/pata_samsung_cf.c:423:20:    expected void const volatile [noderef] <asn:2>*addr
      drivers/ata/pata_samsung_cf.c:423:20:    got void *
      drivers/ata/pata_samsung_cf.c:425:9: warning: incorrect type in argument 2 (different address spaces)
      drivers/ata/pata_samsung_cf.c:425:9:    expected void volatile [noderef] <asn:2>*addr
      drivers/ata/pata_samsung_cf.c:425:9:    got void *
      drivers/ata/pata_samsung_cf.c:448:37: warning: incorrect type in argument 1 (different address spaces)
      drivers/ata/pata_samsung_cf.c:448:37:    expected void *s3c_ide_regbase
      drivers/ata/pata_samsung_cf.c:448:37:    got void [noderef] <asn:2>*ide_addr
      drivers/ata/pata_samsung_cf.c:463:37: warning: incorrect type in argument 1 (different address spaces)
      drivers/ata/pata_samsung_cf.c:463:37:    expected void *s3c_ide_regbase
      drivers/ata/pata_samsung_cf.c:463:37:    got void [noderef] <asn:2>*ide_addr
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      3d70a363
    • J
      ata: pata_arasan: Staticize local symbols · b91bb0da
      Jingoo Han 提交于
      These local symbols are used only in this file.
      Fix the following sparse warnings:
      
      drivers/ata/pata_arasan_cf.c:657:6: warning: symbol 'arasan_cf_error_handler' was not declared. Should it be static?
      drivers/ata/pata_arasan_cf.c:686:14: warning: symbol 'arasan_cf_qc_issue' was not declared. Should it be static?
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      b91bb0da
  13. 30 7月, 2013 4 次提交
  14. 29 7月, 2013 1 次提交
  15. 26 7月, 2013 1 次提交
  16. 25 7月, 2013 2 次提交
    • A
      libata: acpi: remove dead code for ata_acpi_(un)bind · 88ba5478
      Aaron Lu 提交于
      Commit 7381fe73 "libata-acpi: remove redundent code for power resource
      handling" removed ata_acpi_(un)bind but left their prototypes in libata.h,
      so remove them.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      88ba5478
    • R
      ahci_imx: add ahci sata support on imx platforms · 9e54eae2
      Richard Zhu 提交于
      imx6q contains one Synopsys AHCI SATA controller, But it can't share
      ahci_platform driver with other controllers because there are some
      misalignments of the generic AHCI controller - the bits definitions of
      the HBA registers, the Vendor Specific registers, the AHCI PHY clock
      and the AHCI signals adjustment window(GPR13 register).
      
       - CAP_SSS(bit20) of the HOST_CAP is writable, default value is '0',
         should be configured to be '1'
      
       - bit0 (only one AHCI SATA port on imx6q) of the HOST_PORTS_IMPL
         should be set to be '1'.(default 0)
      
       - One Vendor Specific register HOST_TIMER1MS(offset:0xe0) should be
         configured regarding to the frequency of AHB bus clock.
      
       - Configurations of the AHCI PHY clock, and the signal parameters of
         the GPR13
      
      Setup its own ahci sata driver, contained the imx6q specific
      initialized codes, re-use the generic ahci_platform driver, and keep
      the generic ahci_platform driver clean as much as possible.
      
      tj: patch description reformatted
      Signed-off-by: NRichard Zhu <r65037@freescale.com>
      Reviewed-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      9e54eae2
  17. 23 7月, 2013 3 次提交
  18. 16 7月, 2013 1 次提交
  19. 25 6月, 2013 3 次提交
    • S
      AHCI: use ATA_BUSY · 9bbb1b0e
      Sergei Shtylyov 提交于
      ahci_hardreset() and ahci_p5wdh_hardreset() use bare numbers for the
      BSY bit of the ATA status register, despite it's #define'd in
      <linux/ata.h>.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      9bbb1b0e
    • A
      libata-acpi: add back ACPI based hotplug functionality · 44521527
      Aaron Lu 提交于
      Commit 30dcf76a "libata: migrate ACPI code over to new bindings"
      mistakenly dropped the code to register hotplug notificaion handler
      for ATA port/devices, causing regression for people using ATA bay,
      as kernel bug #59871 shows.
      
      Fix this by adding back the hotplug notification handler registration
      code.  Since this code has to be run once and notification needs to
      be installed on every ATA port/devices handle no matter if there is
      actual device attached, we can't do this in binding time for ATA
      device ACPI handle, as the binding only occurs when a SCSI device is
      created, i.e. there is device attached.  So introduce the
      ata_acpi_hotplug_init() function to loop scan all ATA ACPI handles
      and if it is available, install the notificaion handler for it during
      ATA init time.
      
      With the ATA ACPI handle binding to SCSI device tree, it is possible
      now that when the SCSI hotplug work removes the SCSI device, the ACPI
      unbind function will find that the corresponding ACPI device has
      already been deleted by dock driver, causing a scaring message like:
      [  128.263966] scsi 4:0:0:0: Oops, 'acpi_handle' corrupt
      Fix this by waiting for SCSI hotplug task finish in our notificaion
      handler, so that the removal of ACPI device done in ACPI unbind
      function triggered by the removal of SCSI device is run earlier when
      ACPI device is still available.
      
      [rjw: Rebased]
      References: https://bugzilla.kernel.org/show_bug.cgi?id=59871Reported-bisected-and-tested-by: NDirk Griesbach <spamthis@freenet.de>
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Cc: 3.6+ <stable@vger.kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      44521527
    • S
      libata-zpodd: must use ata_tf_init() · d0887c43
      Sergei Shtylyov 提交于
      There are  some SATA controllers which have both devices 0 and 1 but this module
      just zeroes out taskfile and sets then ATA_TFLAG_DEVICE (not sure that's needed)
      which could  lead to a wrong device being selected just before issuing command.
      Thus we should  call ata_tf_init()  which sets  up the device register value
      properly, like  all other users of ata_exec_internal() do...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      d0887c43
  20. 22 6月, 2013 2 次提交
  21. 19 6月, 2013 1 次提交
    • G
      libata: cleanup SAT error translation · 78062c50
      Gwendal Grignou 提交于
      - Remove duplicate Medium Error Entry.
      
      - Fix translations to match SAT2 translation table.
      
      - Remove warning messages when translation is not found when decoding
        error or status register.
      
      - Goes through status register decoding when only ABRT bit is set in
        error register.
      
      Tested: When a disk fails, it sets
      
        Status = 0x71 [DRDY DF ERR] , Error = 0x4 [ABRT]
      
      This patch will make the sense key HARDWARE_ERROR instead.
      
      When there is a simple command syntax error:
      
        Status = 0x51 [DRDY ERR] , Error = 0x4 [ABRT]
      
      The sense key remains ABORTED_COMMAND.
      
      tj: Some updates to the description and comments.
      Signed-off-by: NGwendal Grignou <gwendal@google.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      78062c50
  22. 18 6月, 2013 1 次提交
  23. 11 6月, 2013 2 次提交
    • T
      libata: skip SRST for all SIMG [34]7x port-multipliers · 7a87718d
      Tejun Heo 提交于
      For some reason, a lot of port-multipliers have issues with softreset.
      SIMG [34]7x series port-multipliers have been quite erratic in this
      regard.  I recall that it was better with some firmware revisions and
      the current list of quirks worked fine for a while.  I think it got
      worse with later firmwares or maybe my test coverage wasn't good
      enough.  Anyways, HPA is reporting that his 3726 setup suffers SRST
      failures and then the PMP gets confused and fails to probe the last
      port.
      
      The hope was that we try to stick to the standard as much as possible
      and soonish the PMPs and their firmwares will improve in quality, so
      the quirk list was kept to minimum.  Well, it seems like that's never
      gonna happen.
      
      Let's set NO_SRST for all [34]7x PMPs so that whatever remaining
      userbase of the device suffer the least.  Maybe we should do the same
      for 57xx's but unfortunately I don't have any device left to test and
      I'm not even sure 57xx's have ever been made widely available, so
      let's leave those alone for now.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: N"H. Peter Anvin" <hpa@zytor.com>
      Cc: stable@vger.kernel.org
      7a87718d
    • D
      MIPS: OCTEON: Rename Kconfig CAVIUM_OCTEON_REFERENCE_BOARD to CAVIUM_OCTEON_SOC · 9ddebc46
      David Daney 提交于
      CAVIUM_OCTEON_SOC most place we used to use CPU_CAVIUM_OCTEON.  This
      allows us to CPU_CAVIUM_OCTEON in places where we have no OCTEON SOC.
      
      Remove CAVIUM_OCTEON_SIMULATOR as it doesn't really do anything, we can
      get the same configuration with CAVIUM_OCTEON_SOC.
      Signed-off-by: NDavid Daney <david.daney@cavium.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-ide@vger.kernel.org
      Cc: linux-edac@vger.kernel.org
      Cc: linux-i2c@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Cc: spi-devel-general@lists.sourceforge.net
      Cc: devel@driverdev.osuosl.org
      Cc: linux-usb@vger.kernel.org
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NWolfram Sang <wsa@the-dreams.de>
      Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      Patchwork: https://patchwork.linux-mips.org/patch/5295/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      9ddebc46
  24. 10 6月, 2013 1 次提交