1. 26 7月, 2013 1 次提交
  2. 25 7月, 2013 1 次提交
    • 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
  3. 23 7月, 2013 3 次提交
  4. 16 7月, 2013 1 次提交
  5. 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
  6. 22 6月, 2013 2 次提交
  7. 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
  8. 18 6月, 2013 1 次提交
  9. 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
  10. 10 6月, 2013 1 次提交
  11. 07 6月, 2013 2 次提交
  12. 04 6月, 2013 4 次提交
  13. 03 6月, 2013 1 次提交
  14. 02 6月, 2013 1 次提交
    • S
      sata_rcar: fix interrupt handling · 52a2a108
      Sergei Shtylyov 提交于
      The driver's interrupt handling code is too picky in deciding whether it should
      handle an interrupt or not which causes completely unneeded spurious interrupts.
      Thus make sata_rcar_{ata|serr}_interrupt() *void*; add ATA status register read
      to sata_rcar_ata_interrupt() to clear an unexpected ATA interrupt -- it doesn't
      get cleared by writing to the SATAINTSTAT register in the interrupt mode we use.
      
      Also, in sata_rcar_ata_interrupt() we should check SATAINTSTAT register only for
      enabled interrupts and we should clear  only those interrupts  that we have read
      as active first time around, because else we have  a  race and risk clearing  an
      interrupt that  can  occur between read  and write of the  SATAINTSTAT  register
      and never registering it...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      52a2a108
  15. 29 5月, 2013 1 次提交
  16. 28 5月, 2013 3 次提交
  17. 24 5月, 2013 2 次提交
  18. 22 5月, 2013 4 次提交
    • A
      AHCI: Make distinct names for ports in /proc/interrupts · b29900e6
      Alexander Gordeev 提交于
      Currently all interrupts assigned to AHCI ports show up in
      '/proc/interrupts' as 'ahci'. This fix adds port numbers as
      suffixes and hence makes the descriptions distinct.
      Reported-by: NJan Beulich <JBeulich@suse.com>
      Signed-off-by: NAlexander Gordeev <agordeev@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      b29900e6
    • S
      sata_rcar: clear STOP bit in bmdma_start() method · df7e131f
      Sergei Shtylyov 提交于
      Iff bmdma_setup() has to stop a DMA transfer before starting a new
      one, then the STOP bit in the ATAPI_CONTROL1 register will remain set
      (it's only cleared when setting the START bit to 1) and then
      bmdma_start() method will set both START and STOP bits simultaneously
      which should abort the transfer being just started.  Avoid that by
      explicitly clearing the STOP bit in bmdma_start() method (in this case
      it will be ignored on write).
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      df7e131f
    • V
      libata: Add atapi_dmadir force flag · 966fbe19
      Vincent Pelletier 提交于
      Some device require DMADIR to be enabled, but are not detected as such
      by atapi_id_dmadir.  One such example is "Asus Serillel 2"
      SATA-host-to-PATA-device bridge: the bridge itself requires DMADIR,
      even if the bridged device does not.
      
      As atapi_dmadir module parameter can cause problems with some devices
      (as per Tejun Heo's memory), enabling it globally may not be possible
      depending on the hardware.
      
      This patch adds atapi_dmadir in the form of a "force" horkage value,
      allowing global, per-bus and per-device control.
      Signed-off-by: NVincent Pelletier <plr.vincent@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      966fbe19
    • V
      libata: make ata_exec_internal_sg honor DMADIR · e771451c
      Vincent Pelletier 提交于
      libata honors DMADIR for regular commands, but not for internal commands
      used (among other) during device initialisation.
      
      This makes SATA-host-to-PATA-device bridges based on Silicon Image SiL3611
      (such as "Abit Serillel 2") end up disabled when used with an ATAPI device
      after a few tries.
      
      Log output of the bridge being hot-plugged with an ATAPI drive:
      
        [ 9631.212901] ata1: exception Emask 0x10 SAct 0x0 SErr 0x40c0000 action 0xe frozen
        [ 9631.212913] ata1: irq_stat 0x00000040, connection status changed
        [ 9631.212923] ata1: SError: { CommWake 10B8B DevExch }
        [ 9631.212939] ata1: hard resetting link
        [ 9632.104962] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
        [ 9632.106393] ata1.00: ATAPI: PIONEER DVD-RW  DVR-115, 1.06, max UDMA/33
        [ 9632.106407] ata1.00: applying bridge limits
        [ 9632.108151] ata1.00: configured for UDMA/33
        [ 9637.105303] ata1.00: qc timeout (cmd 0xa0)
        [ 9637.105324] ata1.00: failed to clear UNIT ATTENTION (err_mask=0x5)
        [ 9637.105335] ata1: hard resetting link
        [ 9638.044599] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
        [ 9638.047878] ata1.00: configured for UDMA/33
        [ 9643.044933] ata1.00: qc timeout (cmd 0xa0)
        [ 9643.044953] ata1.00: failed to clear UNIT ATTENTION (err_mask=0x5)
        [ 9643.044963] ata1: limiting SATA link speed to 1.5 Gbps
        [ 9643.044971] ata1.00: limiting speed to UDMA/33:PIO3
        [ 9643.044979] ata1: hard resetting link
        [ 9643.984225] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
        [ 9643.987471] ata1.00: configured for UDMA/33
        [ 9648.984591] ata1.00: qc timeout (cmd 0xa0)
        [ 9648.984612] ata1.00: failed to clear UNIT ATTENTION (err_mask=0x5)
        [ 9648.984619] ata1.00: disabled
        [ 9649.000593] ata1: hard resetting link
        [ 9649.939902] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
        [ 9649.955864] ata1: EH complete
      
      With this patch, the drive enumerates correctly when libata is loaded with
      atapi_dmadir=1:
      
        [ 9891.810863] ata1: exception Emask 0x10 SAct 0x0 SErr 0x40c0000 action 0xe frozen
        [ 9891.810874] ata1: irq_stat 0x00000040, connection status changed
        [ 9891.810884] ata1: SError: { CommWake 10B8B DevExch }
        [ 9891.810900] ata1: hard resetting link
        [ 9892.762105] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
        [ 9892.763544] ata1.00: ATAPI: PIONEER DVD-RW  DVR-115, 1.06, max UDMA/33, DMADIR
        [ 9892.763558] ata1.00: applying bridge limits
        [ 9892.765393] ata1.00: configured for UDMA/33
        [ 9892.786063] ata1: EH complete
        [ 9892.792062] scsi 0:0:0:0: CD-ROM            PIONEER  DVD-RW  DVR-115  1.06 PQ: 0 ANSI: 5
        [ 9892.798455] sr2: scsi3-mmc drive: 12x/12x writer dvd-ram cd/rw xa/form2 cdda tray
        [ 9892.798837] sr 0:0:0:0: Attached scsi CD-ROM sr2
        [ 9892.799109] sr 0:0:0:0: Attached scsi generic sg6 type 5
      
      Based on a patch by Csaba Halász <csaba.halasz@gmail.com> on linux-ide:
      http://marc.info/?l=linux-ide&m=136121147832295&w=2
      
      tj: minor formatting changes.
      Signed-off-by: NVincent Pelletier <plr.vincent@gmail.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@vger.kernel.org
      e771451c
  19. 17 5月, 2013 1 次提交
  20. 15 5月, 2013 2 次提交
    • D
      libata: export ata_port port_no attribute via /sys · e628dc99
      David Milburn 提交于
      While registering host controller track port number based upon number
      of ports available on the controller, export port_no attribute through
      /sys. This patch is needed by udev for composing persistent links in
      /dev/disk/by-path.
      
      /sys/devices/pci0000:00/0000:00:1f.2/ata8/ata_port/ata8
      total 0
      lrwxrwxrwx. 1 root root    0 Mar  6 12:43 device -> ../../../ata8
      -r--r--r--. 1 root root 4096 Mar  6 12:43 idle_irq
      -r--r--r--. 1 root root 4096 Mar  6 12:43 nr_pmp_links
      -r--r--r--. 1 root root 4096 Mar  6 12:43 port_no
      drwxr-xr-x. 2 root root    0 Mar  6 12:42 power
      lrwxrwxrwx. 1 root root    0 Mar  6 12:41 subsystem -> ../../../../../../class/ata_port
      -rw-r--r--. 1 root root 4096 Mar  6 12:40 uevent
      1
      Signed-off-by: NDavid Milburn <dmilburn@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      e628dc99
    • T
      libata: update "Maintained by:" tags · 8c3d3d4b
      Tejun Heo 提交于
      Jeff moved on to a greener pasture.
      
       s/Maintained by: Jeff Garzik/Maintained by: Tejun Heo/g
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      8c3d3d4b
  21. 12 5月, 2013 1 次提交
  22. 01 5月, 2013 2 次提交
    • R
      sata_highbank: Rename proc_name to the module name · 2cc1144a
      Robert Richter 提交于
      mkinitrd looks at /sys/class/scsi_host/host$hostnum/proc_name to find
      the module name of a disk driver. Current name is "highbank-ahci" but
      the module is "sata_highbank". Rename it to match the module name.
      
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: <stable@vger.kernel.org> v3.7..
      Signed-off-by: NRobert Richter <robert.richter@calxeda.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      2cc1144a
    • L
      ACPI/libata: Restore libata.noacpi support · 19ccee76
      Lv Zheng 提交于
      This patch restores libata.noacpi support to libata-acpi.c.
      There are broken optional control methods for ATA controller devices in the
      real world.  The libata.noacpi has been used for a long time as a
      workaround to deal with issues caused by the broken ASL codes.
      1. The "noacpi" option is introduced by the following commit:
         commit 11ef697b
         Date: Thu, 28 Sep 2006 11:29:01 -0700
         Subject: libata: ACPI and _GTF support
      2. The "noacpi" option is renamed to "libata_noacpi" by the following
         commit:
         commit d7d0dad6
         Date: Wed, 28 Mar 2007 01:57:37 -0400
         Subject: [libata] Disable ACPI by default; fix namespace problems
      3. Some of its logics are changed over time - becomes relying on the
         "acpi_handle" bound to the ATA devices since this commit:
         commit fafbae87
         Date: Tue, 15 May 2007 03:28:16 +0900
         Subject: libata-acpi: implement ata_acpi_associate()
      4. The option is deleted by the following commit:
         commit 30dcf76a
         Date: Mon, 25 Jun 2012 16:13:04 +0800
         Subject: libata: migrate ACPI code over to new bindings
      But the libata.noacpi setup is still left in the kernel without codes to
      implement it.  So the deletion introduces a regression to the Linux.
      This patch disables ATA_ACPI support at runtime by stopping acpi binding
      on the ATA devices to fix this regression.
      This patch is tested by booting a SATA x86-64 kernel or a PATA x86 kernel
      with or without "libata.noacpi=1" kernel command line argument.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      19ccee76