[PATCH] Re: Driver model problems in -test5: usb this time

From: Pavel Machek
Date: Tue Sep 09 2003 - 19:25:07 EST


Hi!

> > > The latter two functions do not exist in -test5. It would helpful if you
> > > tried to reproduce with a virgin -test5. It would be courteous to state
> > > what patches you applied on top of the virgin -test5 kernel.
> >
> > Lot of them, but only "revert to -test3 swsusp" should be important
> > here.
>
> Then all bets are off. I cannot expect to reproduce the problems until you
> narrow down which patch causes the problem or verify that it appears on a
> standard kernel release.

Here's patch that should fix it. [First part of first hunk defitely
triggered twice during suspend, and made machine survive that.] Please
apply,

Pavel

--- clean/drivers/usb/core/usb.c 2003-09-09 12:45:35.000000000 +0200
+++ linux/drivers/usb/core/usb.c 2003-09-10 02:16:10.000000000 +0200
@@ -1429,9 +1429,11 @@
return 0;

intf = to_usb_interface(dev);
+ if (!dev->driver)
+ return 0;
driver = to_usb_driver(dev->driver);

- if (driver && driver->suspend)
+ if (driver->suspend)
return driver->suspend(intf, state);
return 0;
}
@@ -1446,9 +1448,11 @@
return 0;

intf = to_usb_interface(dev);
+ if (!dev->driver)
+ return 0;
driver = to_usb_driver(dev->driver);

- if (driver && driver->resume)
+ if (driver->resume)
return driver->resume(intf);
return 0;
}



--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/