Skip to contentSkip to conversation

, [Bug 8510], and Re: Can't s2ram 22-rc2

Bug 8498 Alan Stern 4 participants 8 messages May 21, 2007 1 message not in the archive USB

lore
Share & tools
lore

Alan Stern

author
#1 lore raw
In reply to a message not in the archive
Quoted 15 lines · Greg KH
Quoted 11 lines · Alan Stern

Greg:

The patch in $SUBJECT (already in your development tree) fixes a problem with system suspend in 2.6.22-rc1, as described in

	http://bugzilla.kernel.org/show_bug.cgi?id=8498

(For people on the PM development list, it's worth pointing out that all the patch does is make a particular kernel thread freezable.)

Can you please expedite getting it sent up to Linus?

Will do, I have a number of USB bugfixes to go to Linus, just been traveling too much. Next week I'll be able to get to it...

Quoted 23 lines · Andrey Borzenkov

No. Unfortunately. Here is dmesg with patch and USB_DEBUG

swsusp: Marking nosave pages: 000000000009f000 - 0000000000100000
swsusp: Basic memory bitmaps created
Stopping tasks ... done.
Shrinking memory... done (61536 pages freed)
Freed 246144 kbytes in 1.99 seconds (123.69 MB/s)
Suspending console(s)
hub 1-0:1.0: hub_suspend
ohci_hcd 0000:00:02.0: suspend root hub
usb usb1: usb suspend
usb usb1: usb resume
usb usb1: finish resume
hub 1-0:1.0: hub_resume
ohci_hcd 0000:00:02.0: wakeup root hub
sd 0:0:0:0: [sda] Synchronizing SCSI cache
pnp: Device 00:09 disabled.
Trying to free already-free IRQ 11
ACPI: PCI interrupt for device 0000:00:06.0 disabled
ACPI: Unable to derive IRQ for device 0000:00:04.0 pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x230 [usbcore]() returns -16 suspend_device(): pci_device_suspend+0x0/0x70() returns -16 Could not suspend device 0000:00:02.0: error -16

Quoted 10 lines · Rafael J. Wysocki
Quoted 8 lines

pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x170() returns -16 suspend_device(): pci_device_suspend+0x0/0x60() returns -16 Could not suspend device 0000:00:1d.0: error -16

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)

lspci/dmesg are in this mail:
http://marc.info/?l=linux-kernel&m=117973679209855&w=2

Well, I think Alan should have a look at this too.

It turns out that the patch I originally wrote to fix this is in conflict with one of Raphael's patches (make freezeable workqueues singlethread) already added to 2.6.22-rc2. So here's an updated version for that kernel.

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

Greg, if this works then I'll send it in the proper form for a patch, and you can use it to replace

usb-make-the-autosuspend-workqueue-thread-freezable.patch

Alan Stern

drivers/usb/core/usb.c +1 -1
Index: 2.6.22-rc2/drivers/usb/core/usb.c
===================================================================
@@ -205,7 +205,7 @@ struct device_type usb_device_type = {
 
 static int ksuspend_usb_init(void)
 {
-	ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
+	ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
 	if (!ksuspend_usb_wq)
 		return -ENOMEM;
 	return 0;
author
#2 lore raw
In reply to a message not in the archive
Quoted 15 lines · Greg KH
Quoted 11 lines · Alan Stern

Greg:

The patch in $SUBJECT (already in your development tree) fixes a problem with system suspend in 2.6.22-rc1, as described in

	http://bugzilla.kernel.org/show_bug.cgi?id=8498

(For people on the PM development list, it's worth pointing out that all the patch does is make a particular kernel thread freezable.)

Can you please expedite getting it sent up to Linus?

Will do, I have a number of USB bugfixes to go to Linus, just been traveling too much. Next week I'll be able to get to it...

Quoted 23 lines · Andrey Borzenkov

No. Unfortunately. Here is dmesg with patch and USB_DEBUG

swsusp: Marking nosave pages: 000000000009f000 - 0000000000100000
swsusp: Basic memory bitmaps created
Stopping tasks ... done.
Shrinking memory... done (61536 pages freed)
Freed 246144 kbytes in 1.99 seconds (123.69 MB/s)
Suspending console(s)
hub 1-0:1.0: hub_suspend
ohci_hcd 0000:00:02.0: suspend root hub
usb usb1: usb suspend
usb usb1: usb resume
usb usb1: finish resume
hub 1-0:1.0: hub_resume
ohci_hcd 0000:00:02.0: wakeup root hub
sd 0:0:0:0: [sda] Synchronizing SCSI cache
pnp: Device 00:09 disabled.
Trying to free already-free IRQ 11
ACPI: PCI interrupt for device 0000:00:06.0 disabled
ACPI: Unable to derive IRQ for device 0000:00:04.0 pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x230 [usbcore]() returns -16 suspend_device(): pci_device_suspend+0x0/0x70() returns -16 Could not suspend device 0000:00:02.0: error -16

Quoted 10 lines · Rafael J. Wysocki
Quoted 8 lines

pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x170() returns -16 suspend_device(): pci_device_suspend+0x0/0x60() returns -16 Could not suspend device 0000:00:1d.0: error -16

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)

lspci/dmesg are in this mail:
http://marc.info/?l=linux-kernel&m=117973679209855&w=2

Well, I think Alan should have a look at this too.

It turns out that the patch I originally wrote to fix this is in conflict with one of Raphael's patches (make freezeable workqueues singlethread) already added to 2.6.22-rc2. So here's an updated version for that kernel.

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

Greg, if this works then I'll send it in the proper form for a patch, and you can use it to replace

usb-make-the-autosuspend-workqueue-thread-freezable.patch

Alan Stern

drivers/usb/core/usb.c +1 -1
Index: 2.6.22-rc2/drivers/usb/core/usb.c
===================================================================
@@ -205,7 +205,7 @@ struct device_type usb_device_type = {
 
 static int ksuspend_usb_init(void)
 {
-	ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
+	ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
 	if (!ksuspend_usb_wq)
 		return -ENOMEM;
 	return 0;
#3 lore raw
Quoted 7 lines · Alan Stern

On Sat, 19 May 2007, Greg KH wrote:

It turns out that the patch I originally wrote to fix this is in conflict with one of Raphael's patches (make freezeable workqueues singlethread) already added to 2.6.22-rc2. So here's an updated version for that kernel.

Quoted 7 lines

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

Greg, if this works then I'll send it in the proper form for a patch, and you can use it to replace

usb-make-the-autosuspend-workqueue-thread-freezable.patch

works perfect, i.e. the machine survived 3 s2ram cycles and rebooted cleanly :-))

apply! apply!

Soeren

Quoted 17 lines

Alan Stern

Index: 2.6.22-rc2/drivers/usb/core/usb.c
===================================================================

drivers/usb/core/usb.c +1 -1
@@ -205,7 +205,7 @@ struct device_type usb_device_type = {
 
 static int ksuspend_usb_init(void)
 {
-	ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
+	ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
 	if (!ksuspend_usb_wq)
 		return -ENOMEM;
 	return 0;
Signature · 2 lines
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
#4 lore raw
In reply to Alan Stern
Quoted 7 lines · Alan Stern

On Sat, 19 May 2007, Greg KH wrote:

It turns out that the patch I originally wrote to fix this is in conflict with one of Raphael's patches (make freezeable workqueues singlethread) already added to 2.6.22-rc2. So here's an updated version for that kernel.

Quoted 7 lines

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

Greg, if this works then I'll send it in the proper form for a patch, and you can use it to replace

usb-make-the-autosuspend-workqueue-thread-freezable.patch

works perfect, i.e. the machine survived 3 s2ram cycles and rebooted cleanly :-))

apply! apply!

Soeren

Quoted 17 lines

Alan Stern

Index: 2.6.22-rc2/drivers/usb/core/usb.c
===================================================================

drivers/usb/core/usb.c +1 -1
@@ -205,7 +205,7 @@ struct device_type usb_device_type = {
 
 static int ksuspend_usb_init(void)
 {
-	ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
+	ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
 	if (!ksuspend_usb_wq)
 		return -ENOMEM;
 	return 0;
Signature · 2 lines
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
#5 lore raw
In reply to Alan Stern
Quoted 3 lines · Alan Stern

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

It does; thank you!

Quoted 21 lines

Greg, if this works then I'll send it in the proper form for a patch, and you can use it to replace

usb-make-the-autosuspend-workqueue-thread-freezable.patch

Alan Stern

Index: 2.6.22-rc2/drivers/usb/core/usb.c
===================================================================

drivers/usb/core/usb.c +1 -1
@@ -205,7 +205,7 @@ struct device_type usb_device_type = {
 
 static int ksuspend_usb_init(void)
 {
-	ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
+	ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
 	if (!ksuspend_usb_wq)
 		return -ENOMEM;
 	return 0;
#6 lore raw
In reply to Alan Stern
Quoted 3 lines · Alan Stern

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

It does; thank you!

Quoted 21 lines

Greg, if this works then I'll send it in the proper form for a patch, and you can use it to replace

usb-make-the-autosuspend-workqueue-thread-freezable.patch

Alan Stern

Index: 2.6.22-rc2/drivers/usb/core/usb.c
===================================================================

drivers/usb/core/usb.c +1 -1
@@ -205,7 +205,7 @@ struct device_type usb_device_type = {
 
 static int ksuspend_usb_init(void)
 {
-	ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
+	ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
 	if (!ksuspend_usb_wq)
 		return -ENOMEM;
 	return 0;
#7 lore raw
In reply to Alan Stern
Quoted 2 lines · Alan Stern

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

It does, I already synced the -rc1 patch that was at the bug link for myself.

Thanks

Signature · 3 lines
avuton
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
#8 lore raw
In reply to Alan Stern
Quoted 2 lines · Alan Stern

Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or later and see if it fixes your problems.

It does, I already synced the -rc1 patch that was at the bug link for myself.

Thanks

Signature · 3 lines
avuton
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.