Fixed that. Now it calls suspend and resume. It still doesn't work ;)
I believe it is not here now, we need to look elsewhere, as interrupts
stay dead also after reloading modules (see logs).
For this test:
$ lsmod
Module Size Used by
8250_cs 7428 0
ds 11136 3 8250_cs
yenta_socket 11008 1
pcmcia_core 59904 3 8250_cs,ds,yenta_socket
toshiba_acpi 5268 0
swsusp
Jul 15 17:04:58 mhfl2 kernel: Stopping tasks: klogd entered refrigerator
Jul 15 17:04:58 mhfl2 kernel: =init entered refrigerator
snip
Jul 15 17:04:59 mhfl2 kernel: =kjournald entered refrigerator
Jul 15 17:04:59 mhfl2 kernel: =|
Jul 15 17:04:59 mhfl2 kernel: Freeing memory: .......|
Jul 15 17:04:59 mhfl2 kernel: Syncing disks before copy
Jul 15 17:05:00 mhfl2 kernel: Suspending devices
Jul 15 17:05:00 mhfl2 kernel: Suspending devices
Jul 15 17:05:00 mhfl2 kernel: hda: start_power_step(step: 0)
Jul 15 17:05:00 mhfl2 kernel: hda: completing PM request, suspend
Jul 15 17:05:00 mhfl2 kernel: Suspending devices
Jul 15 17:05:00 mhfl2 kernel: Yenta: dev suspend
Jul 15 17:05:00 mhfl2 kernel: Yenta: suspend saved state ff
Jul 15 17:05:00 mhfl2 kernel: /critical section: Counting pages to copy[nosave c03e2000] (pages needed: 3426+512=3938 free: 57849)
Jul 15 17:05:00 mhfl2 kernel: Alloc pagedir
Jul 15 17:05:00 mhfl2 kernel: ....[nosave c03e2000]Enabling SEP on CPU 0
Jul 15 17:05:00 mhfl2 kernel: Freeing prev allocated pagedir
power down - resume
Jul 15 17:05:00 mhfl2 kernel: Yenta: dev resume
Jul 15 17:05:00 mhfl2 kernel: Yenta: init restored state ff
Jul 15 17:05:00 mhfl2 kernel: Trying to free nonexistent resource <000003f8-000003ff>
Jul 15 17:05:00 mhfl2 kernel: Yenta: init restored state ff
Jul 15 17:05:00 mhfl2 kernel: hda: Wakeup request inited, waiting for !BSY...
Jul 15 17:05:00 mhfl2 kernel: hda: start_power_step(step: 1000)
Jul 15 17:05:00 mhfl2 kernel: hda: completing PM request, resume
Jul 15 17:05:01 mhfl2 kernel: Devices Resumed
Jul 15 17:05:01 mhfl2 kernel: Devices Resumed
Jul 15 17:05:01 mhfl2 kernel: Yenta: dev resume
Jul 15 17:05:01 mhfl2 kernel: Fixing swap signatures... ok
Jul 15 17:05:01 mhfl2 kernel: Restarting processes...
Jul 15 17:05:01 mhfl2 kernel: Restarting tasks... done
Jul 15 17:05:01 mhfl2 kernel: init left refrigerator
Jul 15 17:05:01 mhfl2 kernel: pdflush left refrigerator
snip
Resumed: no interrupts
stop pcmcia
Jul 15 17:05:02 mhfl2 cardmgr[774]: executing: './serial stop ttyS0'
removing all pcmcia modules
Jul 15 17:05:40 mhfl2 su(pam_unix)[855]: session opened for user root by mhf(uid=500)
Jul 15 17:05:50 mhfl2 cardmgr[774]: exiting
Jul 15 17:06:28 mhfl2 kernel: unloading Kernel Card Services
start pcmcia again
Jul 15 17:06:42 mhfl2 kernel: Linux Kernel Card Services 3.1.22
Jul 15 17:06:42 mhfl2 kernel: options: [pci] [cardbus] [pm]
Jul 15 17:06:43 mhfl2 kernel: Intel PCIC probe: not found.
Jul 15 17:06:43 mhfl2 kernel: Yenta IRQ list 0000, PCI irq5
Jul 15 17:06:43 mhfl2 kernel: Socket status: ffffffff
Jul 15 17:06:43 mhfl2 kernel: Yenta: probe saved state ff
Jul 15 17:06:43 mhfl2 kernel: Yenta: init restored state ff
Jul 15 17:06:43 mhfl2 cardmgr[996]: watching 1 sockets
Jul 15 17:06:43 mhfl2 kernel: cs: IO port probe 0x0c00-0x0cff: clean.
Jul 15 17:06:43 mhfl2 kernel: cs: IO port probe 0x0800-0x08ff: clean.
Jul 15 17:06:43 mhfl2 kernel: cs: IO port probe 0x0100-0x04ff: excluding 0x1e0-0x1e7 0x3c0-0x3df 0x408-0x40f 0x480-0x48f 0x4d0-0x4d7
Jul 15 17:06:43 mhfl2 kernel: cs: IO port probe 0x0a00-0x0aff: clean.
Jul 15 17:06:43 mhfl2 cardmgr[997]: starting, version is 3.2.4
interrupts still dead, now it is something else!
reboot (need to use modem for this email ;)
Jul 15 17:07:53 mhfl2 shutdown: shutting down for system reboot
diff -uN drivers/pcmcia/yenta_socket.c.orig drivers/pcmcia/yenta_socket.c
--- drivers/pcmcia/yenta_socket.c.orig 2003-07-15 12:39:52.000000000 +0800
+++ drivers/pcmcia/yenta_socket.c 2003-07-15 17:19:11.000000000 +0800
@@ -577,7 +577,9 @@
struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
pci_set_power_state(socket->dev, 0);
- pci_restore_state(socket->dev, socket->saved_state);
+
+ pci_restore_state(socket->dev, socket->saved_state);
+ printk("Yenta: init restored state %x\n",(u8)socket->saved_state[0xf]);
yenta_config_init(socket);
yenta_clear_maps(socket);
@@ -597,6 +599,7 @@
cb_writel(socket, CB_SOCKET_MASK, 0x0);
pci_save_state(socket->dev, socket->saved_state);
+ printk("Yenta: suspend saved state %x\n",(u8)socket->saved_state[0xf]);
/*
* This does not work currently. The controller
@@ -867,8 +870,6 @@
/* Set up the bridge regions.. */
yenta_allocate_resources(socket);
- pci_save_state(dev, socket->saved_state);
-
socket->cb_irq = dev->irq;
/* Do we have special options for the device? */
@@ -897,6 +898,10 @@
/* Figure out what the dang thing can do for the PCMCIA layer... */
yenta_get_socket_capabilities(socket, isa_interrupts);
printk("Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
+ pci_save_state(dev, socket->saved_state);
+ printk("Yenta: probe saved state %x\n",(u8)socket->saved_state[0xf]);
+ //(u8)socket->saved_state[0xf] = socket->cb_irq;
+ //printk("Yenta: probe saved state irq fixed %x\n",(u8)socket->saved_state[0xf]);
/* Register it with the pcmcia layer.. */
return pcmcia_register_socket(&socket->socket);
@@ -905,12 +910,14 @@
static int yenta_dev_suspend (struct pci_dev *dev, u32 state)
{
- return pcmcia_socket_dev_suspend(&dev->dev, state, 0);
+ printk("Yenta: dev suspend\n");
+ return pcmcia_socket_dev_suspend(&dev->dev, state, SUSPEND_SAVE_STATE);
}
static int yenta_dev_resume (struct pci_dev *dev)
{
+ printk("Yenta: dev resume\n");
return pcmcia_socket_dev_resume(&dev->dev, RESUME_RESTORE_STATE);
}
-- Powered by linux-2.5.75-mm1. Compiled with gcc-2.95-3 - mature and rock solidMy current linux related activities: - 2.5 yenta_socket testing - Test development and testing of swsusp for 2.4/2.5 and ACPI S3 of 2.5 kernel - Everyday usage of 2.5 kernel
More info on 2.5 kernel: http://www.codemonkey.org.uk/post-halloween-2.5.txt More info on swsusp: http://sourceforge.net/projects/swsusp/
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/