From: Tejun Heo <htejun@gmail.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
greg@kroah.com, linux-ide@vger.kernel.org,
owner-linux-pci@atrey.karlin.mff.cuni.cz
Subject: [PATCH] ata_piix: implement piix_borken_suspend()
Date: Fri, 27 Jul 2007 14:53:28 +0900 [thread overview]
Message-ID: <46A98858.5090209@gmail.com> (raw)
In-Reply-To: <46A98607.7000401@gmail.com>
Separate out broken suspend blacklist matching into
piix_broken_suspend().
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/ata_piix.c | 60 ++++++++++++++++++++++++-------------------------
1 file changed, 30 insertions(+), 30 deletions(-)
Index: work/drivers/ata/ata_piix.c
===================================================================
--- work.orig/drivers/ata/ata_piix.c
+++ work/drivers/ata/ata_piix.c
@@ -890,37 +890,38 @@ static void ich_set_dmamode (struct ata_
}
#ifdef CONFIG_PM
-static struct dmi_system_id piix_broken_suspend_dmi_table[] = {
- {
- .ident = "TECRA M5",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"),
- },
- },
- {
- .ident = "Satellite U200",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U200"),
+static int piix_broken_suspend(void)
+{
+ static struct dmi_system_id sysids[] = {
+ {
+ .ident = "TECRA M5",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"),
+ },
},
- },
- {
- .ident = "Satellite U205",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"),
+ {
+ .ident = "Satellite U205",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite U205"),
+ },
},
- },
- {
- .ident = "Portege M500",
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
+ {
+ .ident = "Portege M500",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M500"),
+ },
},
- },
- { }
-};
+ { }
+ };
+
+ if (dmi_check_system(sysids))
+ return 1;
+
+ return 0;
+}
static int piix_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
@@ -937,8 +938,7 @@ static int piix_pci_device_suspend(struc
* cycles and power trying to do something to the sleeping
* beauty.
*/
- if (dmi_check_system(piix_broken_suspend_dmi_table) &&
- mesg.event == PM_EVENT_SUSPEND) {
+ if (piix_broken_suspend() && mesg.event == PM_EVENT_SUSPEND) {
pci_save_state(pdev);
/* mark its power state as "unknown", since we don't
next prev parent reply other threads:[~2007-07-27 5:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 6:36 [PATCH 1/2] PCI: export __pci_reenable_device() Tejun Heo
2007-07-10 6:55 ` [PATCH 2/2] ata_piix: fix suspend/resume for some TOSHIBA laptops Tejun Heo
2007-07-24 20:59 ` Jeff Garzik
2007-07-24 21:57 ` Alan Cox
2007-07-24 22:05 ` Jeff Garzik
2007-07-27 5:43 ` [PATCH] pci: rename __pci_reenable_device() to pci_reenable_device() Tejun Heo
2007-07-27 5:53 ` Tejun Heo [this message]
2007-07-27 5:55 ` [PATCH] ata_piix: add Tecra M3 to broken suspend blacklist Tejun Heo
2007-07-27 6:22 ` [PATCH] pci: rename __pci_reenable_device() to pci_reenable_device() Greg KH
2007-08-01 14:02 ` Jeff Garzik
2007-07-10 16:17 ` [PATCH 1/2] PCI: export __pci_reenable_device() Greg KH
2007-07-11 10:32 ` [PATCH 1/2] PCI: rename and " Tejun Heo
2007-07-11 10:32 ` [PATCH 2/2] ata_piix: fix suspend/resume for some TOSHIBA laptops Tejun Heo
2007-07-17 17:05 ` [PATCH 1/2] PCI: rename and export __pci_reenable_device() Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46A98858.5090209@gmail.com \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=owner-linux-pci@atrey.karlin.mff.cuni.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.