Author Topic: Possible workaround for usb/apm problem  (Read 3421 times)

bluey

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • http://
Possible workaround for usb/apm problem
« on: June 07, 2004, 01:00:40 am »
Suspend:
usb0: unregister usbnet usb-0000:00:05.2-1, Sharp Zaurus SL-5x00
Wake up:
usb 1-1: new full speed USB device using address 6
usb 1-1: device not accepting address 6, error -110
usb 1-1: new full speed USB device using address 7
usb 1-1: device not accepting address 7, error -110
usb 1-1: new full speed USB device using address 8
usb 1-1: device not accepting address 8, error -110

I was able to go around rebooting by reloading sa1100_bi:
# rmmod sa1100_bi
# modprobe sa1100_bi

Could this be a solution? Add this to wake up apm scripts? See what is the problem inside the module should be the best thing to do, no?




I added the following and works fine with me: (hide your kids, this is ugly! )

FILE: /etc/apm/suspend.d/S98sa1100_bi
#!/bin/sh
rmmod sa1100_bi

FILE: /etc/apm/resume.d/R01sa1100_bi
#!/bin/sh
modprobe sa1100_bi

RESULT:
usb 1-1: USB disconnect, address 19
usb0: unregister usbnet usb-0000:00:05.2-1, Sharp Zaurus SL-5x00
usb 1-1: new full speed USB device using address 20
usb0: register usbnet at usb-0000:00:05.2-1, Sharp Zaurus SL-5x00

Clean.

Does this help Mickey?
-------------8<-------------


root@openzaurus:~# cat /etc/apm/suspend.d/S99suspend
#!/bin/sh
# only use on 3600
. /etc/devdetect/identify.h3600
check_device
if [ \"$?\" != \"0\" ]; then
    exit;
fi
#
# This stuff was orignaly in /sbin/pm_helper before the switch to run-parts
#
if [ -w /proc/sys/pm/suspend ]; then
echo > /proc/sys/pm/suspend  <--- why isn\'t apm called with --suspend instead?
else
mesg \'Unable to find /proc/sys/pm/suspend\'
fi
SL-5500 - OZ 3.5.3
256Mb Kingston SD Card
64Mb PQI CF Card
Netgear MA701 WiFi CF Card
Mandriva GNU/Linux LE2005
Dreaming of a C model...

bluey

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • http://
Possible workaround for usb/apm problem
« Reply #1 on: June 07, 2004, 01:05:25 am »
To my understanding I did this the wrong way.

sa1100_bi script should be in scripts.d and should be linked from suspend.d and resume.d and it should take care of how it is called inside the script. That two individual files are not the way to do it!

It works like the scripts in init.d and the various rc<level>.d directories where they linked in.

SL-5500 - OZ 3.5.3
256Mb Kingston SD Card
64Mb PQI CF Card
Netgear MA701 WiFi CF Card
Mandriva GNU/Linux LE2005
Dreaming of a C model...

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
Possible workaround for usb/apm problem
« Reply #2 on: June 07, 2004, 05:53:34 am »
Interesting work. Please post this to openzaurus-devel@lists.sf.net because personally I\'m no longer interested in nursing the kernel 2.4 oddities and I\'m not sure if anyone else of the openzaurus team reads here.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

bluey

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • http://
Possible workaround for usb/apm problem
« Reply #3 on: June 07, 2004, 06:09:35 am »
Ok, I believe I\'m not yet subscribed to that list, is there a form on-line, or a subscribe body/subject is enough?
SL-5500 - OZ 3.5.3
256Mb Kingston SD Card
64Mb PQI CF Card
Netgear MA701 WiFi CF Card
Mandriva GNU/Linux LE2005
Dreaming of a C model...