Dear colleagues, I'm planning to debug usb connection with my new SONY CLIE handheld, and found that this process is much complicated by the fact usb.ko module can not be unloaded 'cause some process is referencing it: marck@revamp:~/tmp> kldstat -v -i 11 Id Refs Address Size Name 11 1 0xc0cf7000 1b000 usb.ko Contains modules: Id Name 62 usb/uhub 63 uhub/uhub 64 ohci/usb 65 uhci/usb 66 pci/uhci 67 pci/ohci (usbd has been killed, surely) marck@revamp:~/tmp> dmesg | grep -i usb pci0: <Intel 82371AB/EB (PIIX4) USB controller> (vendor=0x8086, dev=0x7112) at 7.2 irq 11 uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xe000-0xe01f irq 11 at device 7.2 on pci0 usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0 usb0: USB revision 1.0 Who is referencing usb.ko? I'm on 4.8-R/4.8-STABLE. Thanks in advance, and have a nice weekend. Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------
On Sat, 12 Jul 2003, Dmitry Morozovsky wrote: DM> that this process is much complicated by the fact usb.ko module can not be DM> unloaded 'cause some process is referencing it: DM> DM> marck@revamp:~/tmp> kldstat -v -i 11 DM> Id Refs Address Size Name DM> 11 1 0xc0cf7000 1b000 usb.ko DM> Contains modules: DM> Id Name DM> 62 usb/uhub DM> 63 uhub/uhub DM> 64 ohci/usb DM> 65 uhci/usb DM> 66 pci/uhci DM> 67 pci/ohci DM> DM> (usbd has been killed, surely) I forgot to mention obvious fact that # kldunload -i 11 kldunload: can't unload file: Device not configured Any comments? Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------
On Sat, Jul 12, 2003 at 08:50:43PM +0400, Dmitry Morozovsky wrote:> Dear colleagues, > > I'm planning to debug usb connection with my new SONY CLIE handheld, and found > that this process is much complicated by the fact usb.ko module can not be > unloaded 'cause some process is referencing it: > > marck@revamp:~/tmp> kldstat -v -i 11 > Id Refs Address Size Name > 11 1 0xc0cf7000 1b000 usb.ko > Contains modules: > Id Name > 62 usb/uhub > 63 uhub/uhub > 64 ohci/usb > 65 uhci/usb > 66 pci/uhci > 67 pci/ohci > > (usbd has been killed, surely) > > marck@revamp:~/tmp> dmesg | grep -i usb > pci0: <Intel 82371AB/EB (PIIX4) USB controller> (vendor=0x8086, dev=0x7112) at 7.2 irq 11 > uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xe000-0xe01f irq 11 at device 7.2 on pci0 > usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0 > usb0: USB revision 1.0 > > Who is referencing usb.ko? > > I'm on 4.8-R/4.8-STABLE. > > Thanks in advance, and have a nice weekend.The usb module won't unload intentionally because we're not convinced that it correctly give back all allocated memory. Take a look at the unload code in the driver source for confirmation. Joe -- Josef Karthauser (joe@tao.org.uk) http://www.josef-k.net/ FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/ Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/ ================ An eclectic mix of fact and theory. ================-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20030715/305efd1e/attachment.bin