lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Dec 2011 21:07:23 +0800
From:	Lin Ming <ming.m.lin@...el.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Jeff Garzik <jgarzik@...ox.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
	linux-ide@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [RFC][PATCH 1/4] ahci: port legacy pm interface to struct dev_pm_ops

2011/12/16 Rafael J. Wysocki <rjw@...k.pl>:
> On Thursday, December 15, 2011, Lin Ming wrote:
>> So we can add runtime pm callbacks later.
>>
>> Signed-off-by: Lin Ming <ming.m.lin@...el.com>
>> ---
>>  drivers/ata/ahci.c |   61 +++++++++++++++++++++++++++++++++++-----------------
>>  1 files changed, 41 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
>> index cf26222..c745603 100644
>> --- a/drivers/ata/ahci.c
>> +++ b/drivers/ata/ahci.c
>> @@ -84,8 +84,9 @@ static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
>>  static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
>>                               unsigned long deadline);
>>  #ifdef CONFIG_PM
>> -static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
>> -static int ahci_pci_device_resume(struct pci_dev *pdev);
>> +static int ahci_pci_device_suspend(struct device *dev);
>> +static int ahci_pci_device_hibernate(struct device *dev);
>> +static int ahci_pci_device_resume(struct device *dev);
>>  #endif
>>
>>  static struct scsi_host_template ahci_sht = {
>> @@ -400,6 +401,11 @@ static const struct pci_device_id ahci_pci_tbl[] = {
>>       { }     /* terminate list */
>>  };
>>
>> +static struct dev_pm_ops ahci_pci_pm_ops = {
>> +     .suspend                = ahci_pci_device_suspend,
>> +     .resume                 = ahci_pci_device_resume,
>> +     .poweroff               = ahci_pci_device_hibernate,
>> +};
>
> So seem to have forgotten about .restore().  Please define it at least or
> resume from hibernation will be broken.

Will add it.

>
> Also, are .freeze() and .thaw() callbacks really unnecessary?

I'm not sure for now.
Will test hibernation.

Thanks for the comments.

Lin Ming

>
> Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ