* USB-Storage module doesn't get removed when unplugged
@ 2003-10-20 11:31 reflex
2003-10-20 17:37 ` Greg KH
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: reflex @ 2003-10-20 11:31 UTC (permalink / raw)
To: linux-hotplug
Hello,
When I plug in a memory stick the usb-storage module is loaded.
If I unplug it, the module is NOT unloaded.
Sometimes this becomes a problem if I plug in an sbp2 device
(i.e. iPod) after unplugging the memory stick. /dev/sda is still
"in use" by usb-storage but somehow the sbp2 module doesn't
realize that and tries to assign sda to the plugged in device
(the iPod here).
This does not always happen! But I can always fix it by rmmoding
usb-storage after the memory stick unplug.
USB Modules should be unloaded after use!
Regards
--
Clemens Wacha wacha@gmx.ch ICQ:12620492
proudly running Debian/GNU Linux. See http://www.debian.org
-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise
Linux in the Boardroom; in the Front Office; & in the Server Room
http://www.enterpriselinuxforum.com
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB-Storage module doesn't get removed when unplugged
2003-10-20 11:31 USB-Storage module doesn't get removed when unplugged reflex
@ 2003-10-20 17:37 ` Greg KH
2003-10-20 22:46 ` Greg KH
2003-10-21 17:52 ` reflex
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2003-10-20 17:37 UTC (permalink / raw)
To: linux-hotplug
On Mon, Oct 20, 2003 at 01:31:56PM +0200, reflex wrote:
> Hello,
>
> When I plug in a memory stick the usb-storage module is loaded.
> If I unplug it, the module is NOT unloaded.
>
> Sometimes this becomes a problem if I plug in an sbp2 device
> (i.e. iPod) after unplugging the memory stick. /dev/sda is still
> "in use" by usb-storage but somehow the sbp2 module doesn't
> realize that and tries to assign sda to the plugged in device
> (the iPod here).
>
> This does not always happen! But I can always fix it by rmmoding
> usb-storage after the memory stick unplug.
>
> USB Modules should be unloaded after use!
No they should not.
What would happen if you unloaded the usb keyboard module after removing
only 1 of 2 USB keyboards in your system. Yeah, that would not work :)
We do not unload any modules based on hotplug events, sorry. It's
impossible to figure out if it should be done or not, so we do not do
it.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB-Storage module doesn't get removed when unplugged
2003-10-20 11:31 USB-Storage module doesn't get removed when unplugged reflex
2003-10-20 17:37 ` Greg KH
@ 2003-10-20 22:46 ` Greg KH
2003-10-21 17:52 ` reflex
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2003-10-20 22:46 UTC (permalink / raw)
To: linux-hotplug
On Mon, Oct 20, 2003 at 11:49:41PM +0200, reflex wrote:
> Greg KH schrieb:
>
> > We do not unload any modules based on hotplug events, sorry.
> > It's impossible to figure out if it should be done or not, so
> > we do not do it.
>
> You don't have to figure it out. Just try to rmmod it (if there
> are more than one module, do this in the correct order). If the
> device or whatever it is is still in use you just get an error
> which you will ignore.
>
> If you unplug the second keyboard and try to rmmod keybdev you
> get the message "devices busy" because there is still one
> keyboard left.
>
> Correct me if this is not true. Im not a linux kernel guru.
This is not true. Try it today with just 1 usb keyboard :)
Oh and on 2.6, you can always unload a network module, even if it is in
use. It will shut down the connection and unload itself quite nicely.
> I should probably find the constellation where I get trouble with
> the devices instead of just unloading the modules. This would be
> a workaround.
>
> Anyway I don't really care how it works as long as it DOES work.
Sorry, impossible to get correct. So we do not do it.
> And linux hotplug has proven me more than one time that it can
> lock itself up so you need to know the root password to make it
> work again without rebooting. hello windows....
What do you mean by this? the hotplug scripts lock up? What happens?
What version of the scripts? What kernel version?
Can you please send a better bug report that that?
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB-Storage module doesn't get removed when unplugged
2003-10-20 11:31 USB-Storage module doesn't get removed when unplugged reflex
2003-10-20 17:37 ` Greg KH
2003-10-20 22:46 ` Greg KH
@ 2003-10-21 17:52 ` reflex
2 siblings, 0 replies; 4+ messages in thread
From: reflex @ 2003-10-21 17:52 UTC (permalink / raw)
To: linux-hotplug
Greg KH schrieb:
[module unloading while device is active fails]
> This is not true. Try it today with just 1 usb keyboard :)
I don't have one ;-)
> Oh and on 2.6, you can always unload a network module, even if
> it is in use. It will shut down the connection and unload
> itself quite nicely.
cool. Did not yet test 2.6
> > And linux hotplug has proven me more than one time that it
> > can lock itself up so you need to know the root password to
> > make it work again without rebooting. hello windows....
>
> What do you mean by this? the hotplug scripts lock up? What
> happens? What version of the scripts? What kernel version?
This was not actually a bug report. It's just my general feeling
of hotplugging devices in linux. It just doesn't work as good as
in other OS's. I.e my usb joystick is not correctly attached to
the system (see other post - joydev). The hotplug scripts did
never lock up. What really got me angry was a stupid bug in the
ieee1394 driver that caused a kernel panic because i unplugged my
iPod in the wrong moment causing the whole! root partition to go
nuts. Even the journal was corrupt forcing me to reinstall the
whole system. Luckily i always have a seperate partiton for
/home so my personal data was not affected by the crash.
This is related to linux hotplugging but not directly to your
work. The last time I experienced such a behaviour was with
Windows 95. In my personal opinion Linux has lost LOTS of its
stability with the 2.4 kernel. I really hope that this will
change with the 2.6 release.
Regards
BTW: Greg: Why do I get all your mails twice?
--
Clemens Wacha wacha@gmx.ch ICQ:12620492
proudly running Debian/GNU Linux. See http://www.debian.org
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-10-21 17:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-20 11:31 USB-Storage module doesn't get removed when unplugged reflex
2003-10-20 17:37 ` Greg KH
2003-10-20 22:46 ` Greg KH
2003-10-21 17:52 ` reflex
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).