LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How Can I Force Removal of a Kernel Module (ERROR: Module usb_storage is in use) (https://www.linuxquestions.org/questions/linux-software-2/how-can-i-force-removal-of-a-kernel-module-error-module-usb_storage-is-in-use-675571/)

klearview 10-10-2008 04:49 PM

How Can I Force Removal of a Kernel Module (ERROR: Module usb_storage is in use)
 
Hi guys,

I'm trying to get my mobile phone to act as a modem and yet it seems kernel only sees it as usb storage. I was advised to remove usb_storage and usbserial kernel modules and then reload usbserial with vendor/device parameters.

When I plug in the phone and try to

Code:

sudo rmmod usb_storage
I get

Quote:

ERROR: Module usb_storage is in use
I cannot use 'rmmod --force' as my kernel was not compiled with CONFIG_MODULE_FORCE_UNLOAD.

Is there a way to go about it?

Here is /var/log/messages output:

Quote:

Oct 10 22:35:31 dell-desktop kernel: [ 144.321715] usb 5-1: new full speed USB device using uhci_hcd and address 4
Oct 10 22:35:31 dell-desktop kernel: [ 144.483995] usb 5-1: configuration #1 chosen from 1 choice
Oct 10 22:35:31 dell-desktop kernel: [ 144.588841] usbcore: registered new interface driver libusual
Oct 10 22:35:31 dell-desktop kernel: [ 144.633577] Initializing USB Mass Storage driver...
Oct 10 22:35:31 dell-desktop kernel: [ 144.634977] scsi5 : SCSI emulation for USB Mass Storage devices
Oct 10 22:35:31 dell-desktop kernel: [ 144.636212] usbcore: registered new interface driver usb-storage
Oct 10 22:35:31 dell-desktop kernel: [ 144.636220] USB Mass Storage support registered.
Oct 10 22:35:36 dell-desktop kernel: [ 148.547870] scsi 5:0:0:0: CD-ROM S2 Driver CDROM 2.31 PQ: 0 ANSI: 2
Oct 10 22:35:36 dell-desktop kernel: [ 148.567679] sr1: scsi3-mmc drive: 0x/0x caddy
Oct 10 22:35:36 dell-desktop kernel: [ 148.567829] sr 5:0:0:0: Attached scsi generic sg2 type 5

syg00 10-10-2008 08:08 PM

Do the unload and reload of the module before plugging the phone (or any USB device) in ???. Best immediately after a reboot.

GlennsPref 10-10-2008 09:20 PM

Quote:

root@GamesBox:/bin# rmmod --help (11-10 12:19)
Usage: rmmod [-fhswvV] modulename ...
-f (or --force) forces a module unload, and may crash your
machine. This requires the Forced Module Removal option
when the kernel was compiled.
-h (or --help) prints this help text
-s (or --syslog) says use syslog, not stderr
-v (or --verbose) enables more messages
-V (or --version) prints the version code
-w (or --wait) begins a module removal even if it is used
and will stop new users from accessing the module (so it
should eventually fall to zero).
root@GamesBox:/bin# (11-10 12:19)
rmmod -r usb-storage or


rmmod -w usb-storage (that should not allow anyone new to use the module, and keep everything already using it happy.)

then run modprobe usbserial vendor=0x12d1 product=0x1003

Get the vendor and product id's from...

lsusb.

I used this at first, but on recent versions of the kernel the module "option" is built in and can be used for the 3g modem.

There are a few other steps, like lsusb to find the modem address,

and dmesg to monitor the start up activity.

A quick search for rmmod -r usb-storage showed 3g modem configs, and solutions.

http://pie.boards.ie/vbulletin/showt...p?t=2055260993

I use the huawei e220 and vodafone.au, without VMC (never works, dep hell)

See how you go, in the linked page are instructions to get it working, but you may not need to do all of that.

Cheers, Glenn


All times are GMT -5. The time now is 09:37 PM.