modprobe not able to remove driver.

I’m using openSUSE 11.3 and i access internet through usb-stick.

Before inserting my usb-stick, i generally remove the usb-storage module driver by this command:

modprobe -r usb-storage

But after this command, i get an output saying that usb-storage is built in and cannot be removed.

Can anybody help me how to remove that module. It works well under ubuntu and Mandriva.

Thanks in advance.

On 10/21/2010 12:06 PM, psibi2000 wrote:
>
> I’m using openSUSE 11.3 and i access internet through usb-stick.
>
> Before inserting my usb-stick, i generally remove the usb-storage
> module driver by this command:
>
> modprobe -r usb-storage
>
> But after this command, i get an output saying that usb-storage is
> built in and cannot be removed.
>
> Can anybody help me how to remove that module. It works well under
> ubuntu and Mandriva.

Why do you need to remove usb-storage? I have a number of wireless USB devices,
and none of them have any problems with USB-storage.

Most drivers can be built either as a module or built into the kernel. As the
message states, the standard openSUSE kernel has it built in. As a result, it
cannot be removed. To remove it, you will need to get the kernel source, modify
the configuration to change usb-storage into a module, build a new kernel, and
boot that kernel. As that involves a fair amount of work, we should first be
certain you need to do it.

I need to remove usb-storage because my usb-stick is getting detected as a storage device.

usb_modeswitch package doesn’t seem to switch my usb-stick to a modem device. If i use the usb_modeswitch package, it temporarily switches it to a ttyUSB0 device but soon it gets disconnected, And this switching continues like a endless loop.

In other distribution like ubuntu or mandriva, i don’t even install usb_modeswitch package. I just remove the usb-storage driver and register my usb-stick with this command:

modprobe usbserial vendor=0x201e product=0x1008

And this makes my usb-stick get detected as a modem. But since in openSUSE even if i register my usb-stick device with usbserial driver, i’m not able to get it detected as a modem because i’m not able to remove the usb-storage driver.

It might be worth contacting the usb_modeswitch developers if you need support with your hardware:

Draisberghof - Software - USB_ModeSwitch

Instead of disabling the usb-storage driver, try ‘eject /dev/sr1’ (or similar). You can use ‘dmesg |tail’ to find the applicable device node. I remember that I used to have a huawei device (back with openSUSE 10.2/11), which behaved the way most of these devices do (as a storage device until disabled). I added a custom udev rule to invoke ‘eject /dev/sr1’, removing the usbseral driver, and reloading with ‘modprobe usbserial vendor=0x**** product=0x****’ as outlined manually here:

Qualcomm CDMA usb modem

FWIW, I’ll include this old thread too:

http://forums.opensuse.org/english/get-help-here/network-internet/419466-huawei-ec1260.html

I know there are several similar appraoches available. (I must admit I haven’t had to play with mobile broadband devices for a while now). It might take a bit of googling…

The driver is not responsible for the classification of the stick. Rather check hal and udev.

Just guessing … Maybe you can copy /lib/udev/rules.d/40-usb_modeswitch.rules to /etc/udev/rules.d and add the following line in this file:

# your modem description
ATTRS{idVendor}=="201e", ATTRS{idProduct}=="1008", RUN+="usb_modeswitch '%b/%k'"

I’m able to remove that driver in other distributions like Ubuntu 10.04 and Mandriva 2010 and use my usb-stick properly in it.

I tried this method and then observed the dmesg output. What i can get is that it gets connected temporarily as a ttyUSB0 device and then gets disconnected. This then continues like an infinite loop.

Well i followed those steps but i’m encountering the same problem. I’m getting temporarily attached and then disconnected. And then this continues like an endless loop.

I was able to make it work under openSUSE 11.2 as it was able to remove the usb-storage driver.

OK, then unloading the driver is a sensible workaround. However, the solution should be done udev.

Can you please post the dmesg output from the above attempt?