+ pm-pci-and-ide-handle-pm_event_prethaw.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     PM: PCI and IDE handle PM_EVENT_PRETHAW

has been added to the -mm tree.  Its filename is

     pm-pci-and-ide-handle-pm_event_prethaw.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: PM: PCI and IDE handle PM_EVENT_PRETHAW
From: David Brownell <david-b@xxxxxxxxxxx>


Convert some framework code to handle the new PRETHAW message.

  - IDE just treats it like a FREEZE.

  - The pci_choose_state() thingie still doesn't use PCI_D0 when it gets a
    FREEZE (and now PRETHAW) event, which seems rather buglike but wasn't
    something to change with this patch.

Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Cc: "Rafael J. Wysocki" <rjw@xxxxxxx>
Cc: Pavel Machek <pavel@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/ide/ide.c |    6 ++++--
 drivers/pci/pci.c |    4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff -puN drivers/ide/ide.c~pm-pci-and-ide-handle-pm_event_prethaw drivers/ide/ide.c
--- 25/drivers/ide/ide.c~pm-pci-and-ide-handle-pm_event_prethaw	Tue Jun 27 14:35:49 2006
+++ 25-akpm/drivers/ide/ide.c	Tue Jun 27 14:35:49 2006
@@ -1214,7 +1214,7 @@ int system_bus_clock (void)
 
 EXPORT_SYMBOL(system_bus_clock);
 
-static int generic_ide_suspend(struct device *dev, pm_message_t state)
+static int generic_ide_suspend(struct device *dev, pm_message_t mesg)
 {
 	ide_drive_t *drive = dev->driver_data;
 	struct request rq;
@@ -1228,7 +1228,9 @@ static int generic_ide_suspend(struct de
 	rq.special = &args;
 	rq.end_io_data = &rqpm;
 	rqpm.pm_step = ide_pm_state_start_suspend;
-	rqpm.pm_state = state.event;
+	if (mesg.event == PM_EVENT_PRETHAW)
+		mesg.event = PM_EVENT_FREEZE;
+	rqpm.pm_state = mesg.event;
 
 	return ide_do_drive_cmd(drive, &rq, ide_wait);
 }
diff -puN drivers/pci/pci.c~pm-pci-and-ide-handle-pm_event_prethaw drivers/pci/pci.c
--- 25/drivers/pci/pci.c~pm-pci-and-ide-handle-pm_event_prethaw	Tue Jun 27 14:35:49 2006
+++ 25-akpm/drivers/pci/pci.c	Tue Jun 27 14:35:49 2006
@@ -423,10 +423,12 @@ pci_power_t pci_choose_state(struct pci_
 	case PM_EVENT_ON:
 		return PCI_D0;
 	case PM_EVENT_FREEZE:
+	case PM_EVENT_PRETHAW:
+		/* REVISIT both freeze and pre-thaw "should" use D0 */
 	case PM_EVENT_SUSPEND:
 		return PCI_D3hot;
 	default:
-		printk("They asked me for state %d\n", state.event);
+		printk("Unrecognized suspend event %d\n", state.event);
 		BUG();
 	}
 	return PCI_D0;
_

Patches currently in -mm which might be from david-b@xxxxxxxxxxx are

origin.patch
git-pcmcia.patch
ehci-fix-bogus-alteration-of-a-local-variable.patch
fix-broken-dubious-driver-suspend-methods.patch
pm-define-pm_event_prethaw.patch
pm-pci-and-ide-handle-pm_event_prethaw.patch
pm-video-drivers-and-pm_event_prethaw.patch
pm-usb-hcds-use-pm_event_prethaw.patch
pm-issue-pm_event_prethaw.patch
rtc-add-rtc-rs5c348-driver.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux