 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] ahci with pm support
 This patch adds the power management support to ahci driver.
And it is necessary for S3.
It is back-ported from linux kernel mainline tree.
More precisely, the patch is the diff between the commit
c1332875cbe0c148c7f200d4f9b36b64e34d9872 and tag v2.8.18.
The authorship of the overall changes go to:
=============
commit c1332875cbe0c148c7f200d4f9b36b64e34d9872
Author: Tejun Heo <htejun@xxxxxxxxx>
Date:   Wed Jul 26 15:59:26 2006 +0900
    [PATCH] ahci: implement Power Management support
    Implement power management support.
    Original implementation is from Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
    Signed-off-by: Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
commit d91542c11f3981768367815cf087ad36e792ea4a
Author: Tejun Heo <htejun@xxxxxxxxx>
Date:   Wed Jul 26 15:59:26 2006 +0900
    [PATCH] ahci: separate out ahci_reset_controller() and 
ahci_init_controller()
    Separate out ahci_reset_controller() and ahci_init_controller() from
    ata_host_init().  These will be used by PM callbacks.  This patch
    doesn't introduce any behavior change.
    Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
    Signed-off-by: Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
commit 0be0aa98985dfec42502c0d0af2a1baff9bdb19f
Author: Tejun Heo <htejun@xxxxxxxxx>
Date:   Wed Jul 26 15:59:26 2006 +0900
    [PATCH] libata: improve driver initialization and deinitialization
    Implement ahci_[de]init_port() and use it during initialization and
    de-initialization.  ahci_[de]init_port() are supersets of what used to
    be done during driver [de-]initialization.  This patch makes the
    following behavior changes.
    * Per-port IRQ mask is cleared on driver load as done in other
      drivers.  The mask will be configured properly during probe.
    * During init_one(), HOST_IRQ_STAT is cleared after masking port IRQs
      such that there is no race window.
    * CMD_SPIN_UP is cleared during init_one() instead of being set.  It
      is set in port_start().  This is more consistent with overall
      structure of initialization.  Note that CMD_SPIN_UP simply controls
      PHY activation.
    * Slumber and staggered spin-up are handled properly.
    * All init/deinit operations are done in step-by-step manner as
      described in the spec instead of issued as single merged command.
    Original implementation is from Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
    Signed-off-by: Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
commit 9f5920567bfabbd1be26112a31c44652b6587394
Author: Tejun Heo <htejun@xxxxxxxxx>
Date:   Wed Jul 26 15:59:26 2006 +0900
    [PATCH] ahci: simplify ahci_start_engine()
    Simplify ahci_start_engine() by killing prerequisite condition checks.
    Rationales are..
    * No user checks error return from ahci_start_engine()
    * Code flow guarantees the prerequisite conditions unless the
      controller is malfunctioning.  In such cases, the driver had chances
      to learn about the problem _before_ calling this function.
    * Closely related to the above two, driver calls into this function
      even when prerequisites fail hoping for the best.
    Basically, ahci_start_engine() should only do the operation itself.
    It isn't the right place to check for prerequisites.
    Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
    Signed-off-by: Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
commit d8fcd116d203dfe2f6c272d0cd67724b172f1bc2
Author: Tejun Heo <htejun@xxxxxxxxx>
Date:   Wed Jul 26 15:59:25 2006 +0900
    [PATCH] ahci: cosmetic changes to ahci_start/stop_engine()
    * fascist-format comments according to comment style used in libata
      core layer.
    * if() -> if ()
    Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
    Signed-off-by: Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
commit 254950cd56fee220c9d548f3e57211b95976ba64
Author: Tejun Heo <htejun@xxxxxxxxx>
Date:   Wed Jul 26 15:59:25 2006 +0900
    [PATCH] ahci: relocate several internal functions
    * move ahci_port_start/stop() below EH functions.  This makes ahci
      more consistent with other drivers and makes prototypes for
      ahci_start/stop_engine() unnecessary.
    * swap positions between ahci_start_engine() and ahci_stop_engine()
      for readability.
    Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
    Signed-off-by: Zhao, Forrest <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
commit 5457f2194ad198a0aba4190ec99a6a81846fdca5
Author: zhao, forrest <forrest.zhao@xxxxxxxxx>
Date:   Thu Jul 13 13:38:32 2006 +0800
    [PATCH] The redefinition of ahci_start_engine() and ahci_stop_engine()
    - Make ahci_start_engine() and ahci_stop_engine() more consistent with
      AHCI spec 1.1
    - Change their input parameter from ap to port_mmio
    - Update the existing users of ahci_start_engine() and ahci_stop_engine()
    Signed-off-by: Forrest Zhao <forrest.zhao@xxxxxxxxx>
    Signed-off-by: Hannes Reinecke <hare@xxxxxxx>
    Signed-off-by: Jens Axboe <axboe@xxxxxxx>
    Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
=============
Some of the commits above may not be directly related to the ahci pm problem,
but they lay the basic ground for the final commit.
Signed-off-by: Guanqun Lu <guanqun.lu@xxxxxxxxx>
--
Guanqun
Attachment:
sata-pm.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel 
 
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |