I found a patch from Greg Kroah-Hartman (a kernel dev) which, with a minor tweak, fixed my problem. Apparently without the fix persist only works when a hub is powered down during suspend - this doesn't happen on the eee when it's plugged in. The patch fixes that. My tweak was just moving a function so the compiler didn't bitch about it being implicitly declared - I presume the original patch was against some development tree, not the released 2.6.24 kernel.
You can download a copy of the patch here (right-click and save-as). Then you want to..
cd /i/build/my/kernels/here/linux-2.6.24 patch -p1 </i/downloaded/the/patch/to/here/usb-make-usb-persist-work-after-every-system-sleep.tsa.patchedit: If you get an error saying that Hunk #4 FAILED your sources probably already have that part of the patch. Assuming that hunk is the only one which failed then the other three parts have been applied. You don't need to do anything else, just ignore the error and get on with building your kernel.
edit: You need to enable USB_PERSIST when you run eg. make menuconfig. Tick "USB device persistence during system suspend" which is under Device Drivers > USB support.
Just enabling USB_PERSIST for the kernel isn't enough - you also need to enable it at runtime for the device(s) you want to persist. You do this by echoing 1 to /sys/bus/usb.../power/persist for the relevant device. That path is liable to change every boot, which is annoying, so I wrote a little script which enables/disables persist by the vendor and product IDs of the USB device, which is a little friendlier. You can find that here (right click and save-as, put it some where in your path, chmod +x). Unsurprisingly, you need to run it as root (eg. sudo it). You can get the vendor and product IDs from lsusb. For example, lsusb gives me this:
debeee:/home/tim# lsusb Bus 005 Device 019: ID 0951:1606 Kingston Technology Bus 005 Device 004: ID 1b1c:1a90 Bus 005 Device 001: ID 0000:0000 Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 001 Device 013: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) Bus 001 Device 001: ID 0000:0000The card reader is the one labelled "Kingston Technology". The vendor and product IDs are the two groups of hex digits either side of the colon. To enable persist for the card reader:
set_usb_persist.sh 0951 1606 onYou'll want to add a line like that (but with the full path to the script) to, say, /etc/rc.local to enable persist for that device on every boot.
edit: fixed link
edit2: info on failed hunk, enabling persist in kernel config
Edited by timauton, 12 May 2008 - 11:20 PM.