* can't rmmod cfi_cmdset_0002
@ 2002-05-10 8:16 Galen Seitz
2002-05-10 21:35 ` Galen Seitz
0 siblings, 1 reply; 3+ messages in thread
From: Galen Seitz @ 2002-05-10 8:16 UTC (permalink / raw)
To: linux-mtd
In the course of hacking on pci.c, I've encountered an issue with removing
the cfi_cmdset_0002 module. It seems that once I have successfully
loaded the pci module, I can't unload the cmdset module. Is it likely
that I have created this problem? How does one go about tracking
down a problem like this?
thanks,
galen
oz:~# cat /proc/version
Linux version 2.4.19-pre8 (galens@oz.seitzassoc.com) (gcc version 2.96
20000731 (Red Hat Linux 7.1 2.96-98)) #1 Thu May 9 13:48:33 PDT 2002
oz:~# /sbin/modprobe -a mtdchar mtdblock cfi_cmdset_0002 map_rom cfi_probe
oz:~# /sbin/lsmod
Module Size Used by
cfi_probe 7424 0 (unused)
gen_probe 1712 0 [cfi_probe]
map_rom 688 0 (unused)
chipreg 704 0 [cfi_probe map_rom]
cfi_cmdset_0002 15616 0 (unused)
mtdblock 4608 0 (unused)
mtdchar 4064 0 (unused)
mtdcore 2176 0 [mtdblock mtdchar]
3c59x 24928 1
rtc 6016 0 (autoclean)
oz:~# /sbin/rmmod mtdchar mtdblock cfi_cmdset_0002 map_rom cfi_probe
oz:~# /sbin/lsmod
Module Size Used by
gen_probe 1712 0
chipreg 704 0
mtdcore 2176 0
3c59x 24928 1
rtc 6016 0 (autoclean)
oz:~# /sbin/modprobe -a mtdchar mtdblock cfi_cmdset_0002 map_rom cfi_probe
oz:~# /sbin/modprobe -a pci
oz:~# /sbin/lsmod
Module Size Used by
pci 2880 0 (unused)
cfi_probe 7424 0
map_rom 688 0 (unused)
cfi_cmdset_0002 15616 2
mtdblock 4608 0 (unused)
mtdchar 4064 0 (unused)
gen_probe 1712 0 [cfi_probe]
chipreg 704 0 [pci cfi_probe map_rom]
mtdcore 2176 1 [pci mtdblock mtdchar]
3c59x 24928 1
rtc 6016 0 (autoclean)
oz:~# /sbin/rmmod pci
oz:~# /sbin/rmmod mtdchar mtdblock cfi_cmdset_0002 map_rom cfi_probe
cfi_cmdset_0002: Device or resource busy
oz:~# /sbin/lsmod
Module Size Used by
cfi_cmdset_0002 15616 1
gen_probe 1712 0
chipreg 704 0
mtdcore 2176 0
3c59x 24928 1
rtc 6016 0 (autoclean)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can't rmmod cfi_cmdset_0002
2002-05-10 8:16 can't rmmod cfi_cmdset_0002 Galen Seitz
@ 2002-05-10 21:35 ` Galen Seitz
2002-05-11 22:15 ` David Woodhouse
0 siblings, 1 reply; 3+ messages in thread
From: Galen Seitz @ 2002-05-10 21:35 UTC (permalink / raw)
To: linux-mtd
> In the course of hacking on pci.c, I've encountered an issue with
> removing the cfi_cmdset_0002 module. It seems that once I have
> successfully loaded the pci module, I can't unload the cmdset module.
> Is it likely that I have created this problem? How does one go about
> tracking down a problem like this?
I've done a little more experimenting and come up with another data point.
After installing physmap, the use count of cfi_cmdset_0002 goes from
0 to 2. When I rmmod physmap, the use count of cfi_cmdset_0002 only drops
back to 1, which prevents the module from being unloaded. Has anyone
else seen this problem? Note that the only change I made to physmap.c
was to change ioremap to ioremap_nocache. It appears from looking at
the code that a call to cfi_cmdset_0002 will result in the macro
MOD_INC_USE_COUNT being executed twice, once in cfi_cmdset_0002, and again
in cfi_amdstd_setup. cfi_cmdset_0001.c has a similar structure.
Is this intentional?
thanks,
galen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: can't rmmod cfi_cmdset_0002
2002-05-10 21:35 ` Galen Seitz
@ 2002-05-11 22:15 ` David Woodhouse
0 siblings, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2002-05-11 22:15 UTC (permalink / raw)
To: Galen Seitz; +Cc: linux-mtd
galens@seitzassoc.com said:
> It appears from looking at the code that a call to cfi_cmdset_0002
> will result in the macro MOD_INC_USE_COUNT being executed twice, once
> in cfi_cmdset_0002, and again in cfi_amdstd_setup. cfi_cmdset_0001.c
> has a similar structure. Is this intentional?
Not really, no. The modular stuff is a bit messy and wants attention.
--
dwmw2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-05-11 22:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-10 8:16 can't rmmod cfi_cmdset_0002 Galen Seitz
2002-05-10 21:35 ` Galen Seitz
2002-05-11 22:15 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox