Help - Search - Members - Calendar
Full Version: usb_storage problem
MandrivaUsers.org > General Help > Hardware
viking777
Well I knew it was too good to last. After my euphoria at finding a solution to my ZTE modem problem I now find out the downside.

The line in the script

CODE
RUN+="/sbin/rmmod usb_storage"


is doing what you might expect, it is removing the usb_storage module completely meaning I can no longer communicate with any USB device such as my external hard drive. So I now have to choose between having a working modem or a working external drive, and if I want the latter I have to delete the udev rule and reboot - not exactly convenient.

I have tried

CODE
modprobe usb_storage


but that doesn't restore it, not sure why.

Is there anyone out there with an idea as to how I can make this a little easier to deal with? I basically need a command that will replace the usb_storage module when I want to use it without a reboot.

Of maybe you can think of another workround?
daniewicz
viking777:

If I remember correctly, you are a KDE user.

When your usb port is working, what module information do you see listed under:
Menu -> Tools -> System Tools -> KInfoCenter -> USB Devices

It might be that you need more modules to be restarted. Just starting usb_storage may not be enough.

viking777
The External hard drive is listed there daniewicz but the usb_storage module is not getting loaded so it is not recognisable as a storage device.

Here is some more info:

CODE
modprobe -v usb_storage
insmod /lib/modules/2.6.24.7-desktop-1mnb/kernel/drivers/usb/storage/usb-storage.ko.gz



CODE
lsmod|grep usb
usblp                  12480  0
usbkbd                  6368  0
usbmouse                4896  0
usbhid                 41440  2 usbkbd,usbmouse
ff_memless              5448  1 usbhid
usbserial              30440  0
usbcore               121932  11 usblp,usbkbd,usbmouse,usbhid,uvcvideo,wacom,usbserial,uhci_hcd,ohci_hcd,ehci_hcd


No sign of usb_storage so no usb devices.

Also

CODE
service -f haldaemon restart
Stopping HAL daemon:                                            [  OK  ]
Starting HAL daemon:                                            [  OK  ]


Makes no difference either.
daniewicz
If you delete the udev rule and reboot. then your USB port is working right?

After you do this, what modules are listed when running KInfoCenter? I thought there might be an additional module listed there that you were not aware of.

ianw1974
For me, if you've removed usb-storage as a module, then you'll probably either have to:

1. restart haldaemon
2. restart X

to check and test, you can modprobe the usbstorage module and then press CTRL-ALT-BACKSPACE to restart X, login to Gnome/KDE again and see if your devices mount automatically. If not, then it will mean that haldaemon needs restarting after the modprobe:

CODE
service haldaemon restart


and then you'll have to do CTRL-ALT-BACKSPACE anyway so that Gnome sees the restart of the haldaemon correctly.
viking777
QUOTE (daniewicz @ Sep 7 2008, 07:09 PM) *
If you delete the udev rule and reboot. then your USB port is working right?

After you do this, what modules are listed when running KInfoCenter? I thought there might be an additional module listed there that you were not aware of.


Yes, when I delete the rule and reboot my usb hard drive appears again as normal, however there is no discernible difference in in kinfocenter. There is most definitely a difference in lsmod though:

CODE
lsmod|grep usb
usblp                  12480  0
usbmouse                4896  0
usbkbd                  6368  0
usbhid                 41440  2 usbmouse,usbkbd
ff_memless              5448  1 usbhid
usb_storage            91620  0
scsi_mod              129836  5 sr_mod,usb_storage,sg,libata,sd_mod
usbcore               121932  11 usblp,usbmouse,uvcvideo,usbkbd,usbhid,usb_storage,wacom,uhci_hcd,ohci_hcd,ehci_h
cd


As you can see the usb_storage module is now listed and that is what makes the difference.

I have to say that I have gone back to the site where I found this udev script and read through some of the comments posted. There is a common agreement that it makes the modem work every time, but there is also a common agreement that it does so at the expense of other usb devices. The writer of the script agrees with this and says that he is trying to find a way around it, but obviously so far he has not. There was one reply from someone who claimed to have found a workround but I tried it and it certainly didn't work for me. If those individuals can't find a way to solve it, there is not much hope that I will!
daniewicz
It looks like you need to load scsi_mod as well?

modprobe usb_storage
modprobe scsi_mod
viking777
Thanks for that Ian, I have already tried that route without success. It should work I am sure, but it doesn't, I really don't know why. The only way to 'reset' udev is a full reboot and then I am back to square one.

As I replied to daniewicz I think this is a lost cause, even the writer of the script hasn't found a way around it. I think the answer lies somewhere deep inside the linux kernel, so I have no knowledge of it for sure, and I guess the people that do are a little to busy to worry about such a minority interest as ZTE modems!!

Thanks anyway.
viking777
Thanks for all these replies guys they are arriving too fast to keep up with!!

daniewicz, I tried your suggestion above and I combined it with ian's suggestion of the haldaemon restart and the Ctl/Alt/Backspace. Sorry to say that all four together do not bring back the usb_storage module.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.