Skip to contentSkip to conversation

New: [REGRESSION 2.6.38-rc1+] bisected to: USB: use the no_callbacks flag for interfaces

Bug 29802 Ming Lei 1 participant 1 message Feb 24, 2011 1 message not in the archive USB

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

Ming Lei

author
#1 lore raw

Hi bettiah,

2011/2/24 <[email protected]>:

Quoted 84 lines

https://bugzilla.kernel.org/show_bug.cgi?id=29802

          Summary: [REGRESSION 2.6.38-rc1+] bisected to: USB: use the no_callbacks flag for interfaces
          Product: Power Management
          Version: 2.5
   Kernel Version: 2.6.38-rc6
         Platform: All
       OS/Version: Linux
             Tree: Mainline
           Status: NEW
         Severity: normal
         Priority: P1
        Component: Other
       AssignedTo: [email protected]
       ReportedBy: [email protected]
               CC: [email protected]
       Regression: Yes

On an embedded system, (beagleboard using Asix CONFIG_USB_NET_AX8817X statically compiled,  usb/ethernet bridge, rootfs over nfs),  :

[    6.817382] usb 1-2.4: new high speed USB device using ehci-omap and address 3
[    6.940979] usb 1-2.4: rpm_resume flags 0x0
[    6.945373] usb 1-2.4: rpm_resume returns 1
[    6.961700] usb 1-2.4: New USB device found, idVendor=0b95, idProduct=772a [    6.968963] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    6.976684] usb 1-2.4: Product: AX88772
[    6.980834] usb 1-2.4: Manufacturer: ASIX Elec. Corp.
[    6.986145] usb 1-2.4: SerialNumber: 000065
[    6.996917] usb 1-2.4: rpm_resume flags 0x4
[    7.001312] usb 1-2.4: rpm_resume returns 1
[    7.007507] usb 1-2.4: rpm_resume flags 0x4
[    7.011901] usb 1-2.4: rpm_resume returns 1
[    7.040679] mmc0: new SD card at address 9ffc
[    7.049255] mmcblk0: mmc0:9ffc SD01G 968 MiB
[    7.061950]  mmcblk0: p1 p2
[    7.259307] usb usb2: rpm_suspend flags 0x9
[    7.263732] usb usb2: rpm_suspend returns 0
[    7.268310] usb usb2: rpm_suspend flags 0xa
[    7.272735] usb usb2: rpm_suspend returns 0
[    7.945953] asix 1-2.4:1.0: eth0: register 'asix' at usb-ehci-omap.0-2.4, ASIX AX88772 USB
2.0 Ethernet, 00:00:00:00:00:65
[    7.957794] asix 1-2.4:1.0: rpm_suspend flags 0x4
[    7.962738] asix 1-2.4:1.0: rpm_suspend returns 0
[    7.967956] hub 1-2:1.0: rpm_resume flags 0x4
[    7.972534] hub 1-2:1.0: rpm_resume returns 1
[    7.977386] hub 1-2:1.0: rpm_suspend flags 0x4
[    7.982055] hub 1-2:1.0: rpm_suspend returns 0
[    8.333007] asix 1-2.4:1.0: rpm_resume flags 0x4
[    8.337890] asix 1-2.4:1.0: rpm_resume returns 0
[    8.343933] eth0: link down
[    9.368652] Sending DHCP requests .
[    9.949462] asix 1-2.4:1.0: rpm_resume flags 0x4
[    9.954498] asix 1-2.4:1.0: rpm_resume returns 1
[    9.961425] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[   12.134307] .
[   12.135864] asix 1-2.4:1.0: rpm_resume flags 0x5
[   12.140869] asix 1-2.4:1.0: rpm_resume returns 1
[   12.649963] ,
[   12.651489] asix 1-2.4:1.0: rpm_resume flags 0x5
[   12.656524] asix 1-2.4:1.0: rpm_resume returns 1
[   12.665618]  OK
[   12.667480] IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.1.102
[   12.678771] IP-Config: Complete:
[   12.682250]      device=eth0, addr=192.168.1.102, mask=255.255.255.0, gw=192.168.1.1,
[   12.690246]      host=192.168.1.102, domain=, nis-domain=(none), [   12.696533]      bootserver=0.0.0.0, rootserver=192.168.1.106, rootpath=, mtu=576
[   12.715637] asix 1-2.4:1.0: rpm_resume flags 0x5
[   12.720489] asix 1-2.4:1.0: rpm_resume returns 1
[   12.725830] asix 1-2.4:1.0: rpm_resume flags 0x5
[   12.730651] asix 1-2.4:1.0: rpm_resume returns 1
[   12.742034] asix 1-2.4:1.0: rpm_resume flags 0x5
[   12.746887] asix 1-2.4:1.0: rpm_resume returns 1
[   12.752075] asix 1-2.4:1.0: rpm_resume flags 0x5
[   12.756927] asix 1-2.4:1.0: rpm_resume returns 1

Quoted 1 line

From the debug messages above, seems all is OK, and

runtime pm does work well.

The commit 63defa73c8c1193c1273474440c30d34c2524597

USB: use the no_callbacks flag for interfaces

you bisected may cause more messages above dumped out than before.

If you want to see less runtime pm messages, please disable CONFIG_PM_DEBUG.

Or you can try the attachment patch to see if less 'rpm_resume' messages will be dumped out, but let Alan decide if it should be taken. This part in the commit was added by Alan.

thanks,

Signature · 1 line
Lei Ming
drivers/usb/core/driver.c +11 -2
index fca6172..d933f77 100644
@@ -1564,9 +1564,18 @@ EXPORT_SYMBOL_GPL(usb_autopm_get_interface);
  */
 int usb_autopm_get_interface_async(struct usb_interface *intf)
 {
-	int	status;
+	int             status = 0;
+	enum rpm_status s;
+
+	/* Don't request a resume unless the interface is already suspending
+	 * or suspended.  Doing so would force a running suspend timer to be
+	 * cancelled.
+	 */
+	pm_runtime_get_noresume(&intf->dev);
+	s = ACCESS_ONCE(intf->dev.power.runtime_status);
+	if (s == RPM_SUSPENDING || s == RPM_SUSPENDED)
+	        status = pm_request_resume(&intf->dev);
 
-	status = pm_runtime_get(&intf->dev);
 	if (status < 0 && status != -EINPROGRESS)
 		pm_runtime_put_noidle(&intf->dev);
 	else