Re: software unplug and plug USB

Previous thread: software unplug and plug USB by Miguel on Friday, September 28, 2007 - 6:56 am. (1 message)

Next thread: Out of memory management in embedded systems by Daniel Spång on Friday, September 28, 2007 - 8:55 am. (13 messages)
To: Miguel <mc354@...>
Cc: LKML <linux-kernel@...>
Date: Friday, September 28, 2007 - 8:17 am

If the modem doesn't have any other power sources than USB, just
removing the modem's and USB modules, and the modprobing them again
should help.

Just take care if you have it connected to the PC with a USB keyboard ;)

--
Tomasz Chmielewski
http://blog.wpkg.org

-

To: Tomasz Chmielewski <mangoo@...>
Cc: LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 3:36 am

actually, I have a USB keyboard, could that be the problem? why?

removing and adding modules doesn't solve my problem... The USB has
several functions: modem and usb mass storage and only the storage one

any thoughts?

-

To: Miguel <mc354@...>
Cc: LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 3:39 am

Because when you remove USB modules, USB devices, including USB

What modules exactly do you unload/load again, in what order, using
which commands?

--
Tomasz Chmielewski
http://blog.wpkg.org
-

To: Tomasz Chmielewski <mangoo@...>
Cc: LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 4:18 am

I also have a mobile phone connected, a gps and a keyboard, i do the
following:

ecar@ecar:~$ lsmod | grep usb
usbserial 29928 1 pl2303
usbtouchscreen 8708 0
usbcore 130304 7
libusual,pl2303,usbserial,usbtouchscreen,ehci_hcd,uhci_hcd
ecar@ecar:~$ rmmod pl2303
ERROR: Removing 'pl2303': Operation not permitted
ecar@ecar:~$ sudo rmmod pl2303
ecar@ecar:~$ sudo rmmod usbserial
ecar@ecar:~$ modprobe usbserial
FATAL: Error inserting usbserial
(/lib/modules/2.6.17-11-386/kernel/drivers/usb/serial/usbserial.ko):
Operation not permitted
(reverse-i-search)`mod': cd backup_modules/
(reverse-i-search)`modpro': sudo modprobe ehci_hcd
ecar@ecar:~$ sudo modprobe usbserial vendor=0x12d1 product=0x1003
ecar@ecar:~$ lsmod | grep usb
usbserial 29928 0
usbtouchscreen 8708 0
usbcore 130304 6
usbserial,libusual,usbtouchscreen,ehci_hcd,uhci_hcd

but only when I unplug and plug manually, the modem starts up ...
Because of that i wanted to unplug/plug via scripting (software way)

-

To: Miguel <mc354@...>
Cc: LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 6:04 am

Only then It's not enough. You also have to remove ehci_hcd / uhci_hcd
/ ohci_hcd.the device will be powered off (unless the method described

cd backup_modules/? Where do you keep your modules?

--
Tomasz Chmielewski
http://blog.wpkg.org
-

To: Tomasz Chmielewski <mangoo@...>
Cc: LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 6:46 am

if I remove ehci_hcd / uhci_hcd / ohci_hcd , some other devices like
touchscreen, GPS and keyboard could stop working.

backup_modules doesn't matter here, is my personal backup. I have tried
also to recompile some modules because some times my modem huaweis is
recognized like usb mass storage.

I will try a how to guide to do what oliver commented

"You can use the bind & unbind attributes in sysfs"

where can i find information about that?

kindest regards

-

To: Miguel <mc354@...>
Cc: Tomasz Chmielewski <mangoo@...>, LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 7:13 am

To: Miguel <mc354@...>
Cc: Tomasz Chmielewski <mangoo@...>, LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 5:58 am

You can use the bind & unbind attributes in sysfs.

Regards
Oliver

-

To: Miguel <mc354@...>
Cc: Tomasz Chmielewski <mangoo@...>, LKML <linux-kernel@...>
Date: Monday, October 1, 2007 - 4:30 am

You might try this (bottom of the page):
http://lkml.org/lkml/2007/5/28/193

regards,
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
-

Previous thread: software unplug and plug USB by Miguel on Friday, September 28, 2007 - 6:56 am. (1 message)

Next thread: Out of memory management in embedded systems by Daniel Spång on Friday, September 28, 2007 - 8:55 am. (13 messages)