PCI IRQ routing change broke PCMCIA/prism54 driver

Bjorn Helgaas bjorn.helgaas at hp.com
Mon Aug 30 13:15:19 EDT 2004


On Sunday 15 August 2004 10:06 am, Cyrille Chépélov wrote:
> I have always used the same version of the kernel (2.6.8-rc4-mm1) since 
> I started sending the report to Bjorn. But now the problem appears to be 
> gone...
> 
> The only ingredient I haven't yet exercised (since I tried to reproduce 
> the problem) is that the machine did not go into swsusp yet. It is 
> possible (I don't quite remember) that the first time I booted 
> 2.6.8-rc4-mm1, was after the previous version woke up.

I bet that's it.  I had another report of stuff being broken after a
swsusp resume, and I found a couple drivers that are missing a
pci_enable_device() in the resume path.

If you verify that the prism54 problem only happens after a resume,
can you try the following patch to see whether it fixes it?  Thanks!

===== drivers/pcmcia/yenta_socket.c 1.59 vs edited =====
--- 1.59/drivers/pcmcia/yenta_socket.c	2004-08-22 08:39:15 -06:00
+++ edited/drivers/pcmcia/yenta_socket.c	2004-08-30 10:42:41 -06:00
@@ -1036,8 +1036,15 @@
 static int yenta_dev_resume (struct pci_dev *dev)
 {
 	struct yenta_socket *socket = pci_get_drvdata(dev);
+	int err;
 
 	if (socket) {
+		err = pci_enable_device(dev);
+		if (err < 0) {
+			printk(KERN_ERR "yenta %s: couldn't enable device (%d)\n",
+				pci_name(dev), err);
+			return err;
+		}
 		pci_set_power_state(dev, 0);
 		/* FIXME: pci_restore_state needs to have a better interface */
 		pci_restore_state(dev, socket->saved_state);
===== drivers/usb/core/hcd-pci.c 1.33 vs edited =====
--- 1.33/drivers/usb/core/hcd-pci.c	2004-06-30 11:06:30 -06:00
+++ edited/drivers/usb/core/hcd-pci.c	2004-08-30 10:37:44 -06:00
@@ -354,6 +354,13 @@
 	}
 	hcd->state = USB_STATE_RESUMING;
 
+	retval = pci_enable_device (dev);
+	if (retval < 0) {
+		dev_dbg (hcd->self.controller, "pci enable fail, retval %d\n",
+			retval);
+		return retval;
+	}
+
 	if (has_pci_pm)
 		pci_set_power_state (dev, 0);
 	dev->dev.power.power_state = 0;



More information about the linux-pcmcia mailing list