1. 21 2月, 2013 2 次提交
  2. 26 1月, 2013 6 次提交
  3. 22 1月, 2013 6 次提交
    • A
      libata: do not suspend port if normal ODD is attached · 7e15e9be
      Aaron Lu 提交于
      For ODDs, the upper layer will poll for media change every few
      seconds, which will make it enter and leave suspend state very
      often. And as each suspend will also cause a hard/soft reset,
      the gain of runtime suspend is very little while the ODD may
      malfunction after constantly being reset. So the idle callback
      here will not proceed to suspend if a non-ZPODD capable ODD is
      attached to the port.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      7e15e9be
    • A
      libata: expose pm qos flags for ata device · a59b9aae
      Aaron Lu 提交于
      Expose pm qos flags to user space so that user has a chance to disable
      ZPODD feature, if he/she has a broken platform or devices or simply does
      not like this feature.
      
      This flag is exposed to user space only for ZPODD devices.
      
      Due to this flag, it is possible the ODD is ZP ready but we didn't power
      it off. So the zp_ready flag will need to be cleared whenever we found
      the ODD is not in ZP ready state. Previously, once zp_ready is set, the
      ODD will always be powered off and the flag will be cleared in
      post_poweron. But this is no longer the case now.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      a59b9aae
    • A
      libata: handle power transition of ODD · 21334205
      Aaron Lu 提交于
      When ata port is runtime suspended, it will check if the ODD attched to
      it is a zero power(ZP) capable ODD and if the ZP capable ODD is in zero
      power ready state. And if this is not the case, the highest acpi state
      will be limited to ACPI_STATE_D3_HOT to avoid powering off the ODD. And
      if the ODD can be powered off, runtime wake capability needs to be
      enabled and powered_off flag will be set to let resume code knows that
      the ODD was in powered off state.
      
      And on resume, before it is powered on, if it was powered off during
      suspend, runtime wake capability needs to be disabled. After it is
      recovered, the ODD is considered functional, post power on processing
      like eject tray if the ODD is drawer type is done, and several ZPODD
      related fields will also be reset.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      21334205
    • A
      libata: check zero power ready status for ZPODD · 3dc67440
      Aaron Lu 提交于
      Per the Mount Fuji spec, the ODD is considered zero power ready when:
        - For slot type ODD, no media inside;
        - For tray type ODD, no media inside and tray closed.
      
      The information can be retrieved by either the returned information of
      command GET_EVENT_STATUS_NOTIFICATION(the command is used to poll for
      media event) or sense code.
      
      The information provided by the media status byte is not accurate, it
      is possible that after a new disc is just inserted, the status byte
      still returns media not present. So this information can not be used as
      the deciding factor, we use sense code to decide if zpready status is
      true.
      
      When we first sensed the ODD in the zero power ready state, the
      zp_sampled will be set and timestamp will be recoreded. And after ODD
      stayed in this state for some pre-defined period, the ODD is considered
      as power off ready and the zp_ready flag will be set. The zp_ready flag
      serves as the deciding factor other code will use to see if power off is
      OK for the ODD.
      
      The Mount Fuji spec suggests a delay should be used here, to avoid the
      case user ejects the ODD and then instantly inserts a new one again, so
      that we can avoid a power transition. And some ODDs may be slow to place
      its head to the home position after disc is ejected, so a delay here is
      generally a good idea. And the delay time can be changed via the module
      param zpodd_poweroff_delay.
      
      The zero power ready status check is performed in the ata port's runtime
      suspend code path, when port is not frozen yet, as we need to issue some
      IOs to the ODD.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      3dc67440
    • A
      libata: move acpi notification code to zpodd · f064a20d
      Aaron Lu 提交于
      Since the ata acpi notification code introduced in commit
      3bd46600 is solely for ZPODD, and we
      now have a dedicated place for it, move these code there.
      
      And the ata_acpi_add_pm_notifier code is changed a little bit in that it
      is now invoked when scsi device is not bound with ACPI yet, so the way
      to get the acpi handle is different with the previous version. And the
      ata_acpi_add/remove_pm_notifier is also simplified a little bit in that
      it doesn't check if the acpi_device for the handle exists or not as the
      odd_can_poweroff function already checked that.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      f064a20d
    • A
      libata: identify and init ZPODD devices · afe75951
      Aaron Lu 提交于
      The ODD can be enabled for ZPODD if the following three conditions are
      satisfied:
      1 The ODD supports device attention;
      2 The platform can runtime power off the ODD through ACPI;
      3 The ODD is either slot type or drawer type.
      For such ODDs, zpodd_init is called and a new structure is allocated for
      it to store ZPODD related stuffs.
      
      And the zpodd_dev_enabled function is used to test if ZPODD is currently
      enabled for this ODD.
      
      A new config CONFIG_SATA_ZPODD is added to selectively build ZPODD code.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      afe75951
  4. 15 1月, 2013 5 次提交
    • D
      libata: export host controller number thru /sys · 1757d902
      David Milburn 提交于
      As low-level drivers register their host controller(s), keep track
      of the number of controllers and export thru /sys in a <host.port>
      format so that udev can better match up port numbers with a
      specific controller.
      
      # pwd
      /sys/devices/pci0000:00
      # find . -name 'ata*' -print
      
      (2nd controller with port multiplier attached)
      
      ./0000:00:1e.0/0000:05:01.0/ata2.7
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7/dev7.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.0/dev7.0.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.0/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.1/dev7.1.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.1/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.2/dev7.2.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.2/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.3/dev7.3.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.3/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.4/dev7.4.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.4/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.5/dev7.5.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.5/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.6/dev7.6.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.6/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.7/dev7.7.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.7/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.8/dev7.8.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.8/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.9/dev7.9.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.9/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/ata_port
      ./0000:00:1e.0/0000:05:01.0/ata2.7/ata_port/ata2.7
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.10/dev7.10.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.10/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.11/dev7.11.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.11/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.12/dev7.12.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.12/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.13/dev7.13.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.13/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.14/dev7.14.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.7/link7.14/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.8
      ./0000:00:1e.0/0000:05:01.0/ata2.8/link8/dev8.0/ata_device
      ./0000:00:1e.0/0000:05:01.0/ata2.8/link8/ata_link
      ./0000:00:1e.0/0000:05:01.0/ata2.8/ata_port
      ./0000:00:1e.0/0000:05:01.0/ata2.8/ata_port/ata2.8
      
      (1st controller)
      
      ./0000:00:1f.2/ata1.1
      ./0000:00:1f.2/ata1.1/link1/dev1.0/ata_device
      ./0000:00:1f.2/ata1.1/link1/ata_link
      ./0000:00:1f.2/ata1.1/ata_port
      ./0000:00:1f.2/ata1.1/ata_port/ata1.1
      ./0000:00:1f.2/ata1.2
      ./0000:00:1f.2/ata1.2/link2/dev2.0/ata_device
      ./0000:00:1f.2/ata1.2/link2/ata_link
      ./0000:00:1f.2/ata1.2/ata_port
      ./0000:00:1f.2/ata1.2/ata_port/ata1.2
      ./0000:00:1f.2/ata1.3
      ./0000:00:1f.2/ata1.3/link3/dev3.0/ata_device
      ./0000:00:1f.2/ata1.3/link3/ata_link
      ./0000:00:1f.2/ata1.3/ata_port
      ./0000:00:1f.2/ata1.3/ata_port/ata1.3
      ./0000:00:1f.2/ata1.4
      ./0000:00:1f.2/ata1.4/link4/dev4.0/ata_device
      ./0000:00:1f.2/ata1.4/link4/ata_link
      ./0000:00:1f.2/ata1.4/ata_port
      ./0000:00:1f.2/ata1.4/ata_port/ata1.4
      ./0000:00:1f.2/ata1.5
      ./0000:00:1f.2/ata1.5/link5/dev5.0/ata_device
      ./0000:00:1f.2/ata1.5/link5/ata_link
      ./0000:00:1f.2/ata1.5/ata_port
      ./0000:00:1f.2/ata1.5/ata_port/ata1.5
      ./0000:00:1f.2/ata1.6
      ./0000:00:1f.2/ata1.6/link6/dev6.0/ata_device
      ./0000:00:1f.2/ata1.6/link6/ata_link
      ./0000:00:1f.2/ata1.6/ata_port
      ./0000:00:1f.2/ata1.6/ata_port/ata1.6
      Signed-off-by: NDavid Milburn <dmilburn@redhat.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1757d902
    • J
      pata_samsung_cf: Use devm_clk_get() · 25effc36
      Jingoo Han 提交于
      Use devm_clk_get() rather than clk_get() to make cleanup paths
      more simple.
      Signed-off-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      25effc36
    • S
      [libata] replace sata_settings with devslp_timing · 803739d2
      Shane Huang 提交于
      NCQ capability was used to check availability of SATA Settings page
      from Identify Device Data Log, which contains DevSlp timing variables.
      It does not work on some HDDs and leads to error messages.
      
      IDENTIFY word 78 bit 5(Hardware Feature Control) can't work either
      because it is only the sufficient condition of Identify Device data
      log, not the necessary condition.
      
      This patch replaced ata_device->sata_settings with ->devslp_timing
      to only save DevSlp timing variables(8 bytes), instead of the whole
      SATA Settings page(512 bytes).
      
      Addresses https://bugzilla.kernel.org/show_bug.cgi?id=51881Reported-by: NBorislav Petkov <bp@alien8.de>
      Signed-off-by: NShane Huang <shane.huang@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      803739d2
    • H
      [libata] ahci: Add support for Enmotus Bobcat device. · 7f9c9f8e
      Hugh Daschbach 提交于
      Silicon does not support standard AHCI BAR assignment.  Add
      vendor/device exception to force BAR 2.
      Signed-off-by: NHugh Daschbach <hugh.daschbach@enmotus.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      7f9c9f8e
    • B
      [libata] ahci: Fix lack of command retry after a success error handler. · 1eaca39a
      Bian Yu 提交于
      It should be a mistake introduced by commit 8d899e70.
      
      qc->flags can't be set AC_ERR_*
      Signed-off-by: NBian Yu <bianyu@kedacom.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1eaca39a
  5. 04 1月, 2013 1 次提交
    • G
      Drivers: ata: remove __dev* attributes. · 0ec24914
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0ec24914
  6. 14 12月, 2012 10 次提交
  7. 04 12月, 2012 4 次提交
  8. 03 12月, 2012 6 次提交