Re: snd-cs4236 (possibly all isa-pnp cards or all alsa isa-pnp cards) broken in 2.6.16-rc4

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

 



Adam Belay wrote:

[ pnp_card_driver.remove() not called ]

Hopefully this email account will work better.  In any case, thanks
for bringing this bug to my attention.  I may have stumbled across it
a couple days ago, and would appreciate if you would try this patch: (there may be some fuzz)

Reject even. I've attached this patch regenerated against 2.6.16-rc4.

-       if (drv->link.driver.probe) {
-               if (drv->link.driver.probe(&dev->dev)) {

+       if (pnp_bus_type.probe(&dev->dev)) {

Yes, this works, thanks. If it's also the correct fix, I guess this should go into 2.6.16?

I by the way also tested with a driver that uses pnp_driver instead of pnp_card_driver, and that also works.

It's possible that the attach mechanism isn't working correctly
because of recent driver model changes.  If this is the case, it
would also explain the detach-not-called issues.

The bustype stuff...

Rene.

Index: local/drivers/pnp/card.c
===================================================================
--- local.orig/drivers/pnp/card.c	2006-02-11 00:34:01.000000000 +0100
+++ local/drivers/pnp/card.c	2006-02-21 14:06:21.000000000 +0100
@@ -303,13 +303,11 @@ found:
 	down_write(&dev->dev.bus->subsys.rwsem);
 	dev->card_link = clink;
 	dev->dev.driver = &drv->link.driver;
-	if (drv->link.driver.probe) {
-		if (drv->link.driver.probe(&dev->dev)) {
-			dev->dev.driver = NULL;
-			dev->card_link = NULL;
-			up_write(&dev->dev.bus->subsys.rwsem);
-			return NULL;
-		}
+	if (pnp_bus_type.probe(&dev->dev)) {
+		dev->dev.driver = NULL;
+		dev->card_link = NULL;
+		up_write(&dev->dev.bus->subsys.rwsem);
+		return NULL;
 	}
 	device_bind_driver(&dev->dev);
 	up_write(&dev->dev.bus->subsys.rwsem);

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux