[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creative Ways to Use hotplugd for Detaching USB Drives



I've been trying to find a way to get hotplugd(8) to umount a USB keychain
drive that gets automatically mounted when plugged into a USB port.
Unfortunately with both MSDOS and UFS filesystems, I get a "hang" when
popping out the keychain before umount'ing it.

Does anyone have creative ways to deal with this? I'm not sure it's going to
be possible to deal with this with hotplugd, but if there's any ideas please
share them.

My dmesg is...

OpenBSD 3.6 (GENERIC) #59: Fri Sep 17 12:32:57 MDT 2004
    deraadt_(_at_)_i386_(_dot_)_openbsd_(_dot_)_org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) III Mobile CPU 1133MHz ("GenuineIntel" 686-class) 1.14 GHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 133144576 (130024K)
avail mem = 114868224 (112176K)
using 1650 buffers containing 6758400 bytes (6600K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(5d) BIOS, date 02/05/02, BIOS32 rev. 0 @ 0xfd7e0
apm0 at bios0: Power Management spec V1.2
apm0: battery life expectancy 100%
apm0: AC on, battery charge high
pcibios0 at bios0: rev 2.1 @ 0xfd770/0x890
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdeb0/256 (14 entries)
pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc0000/0xe000 0xce000/0x1000 0xcf000/0x1000 0xdc000/0x4000! 0xe0000/0x10000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82830MP CPU-I/O-1" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel 82830MP CPU-AGP" rev 0x02
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "S3 SuperSavage" rev 0x05
wsdisplay0 at vga1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
uhci0 at pci0 dev 29 function 0 "Intel 82801CA/CAM USB" rev 0x01: irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 "Intel 82801CA/CAM USB" rev 0x01: irq 11
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2 "Intel 82801CA/CAM USB" rev 0x01: irq 11
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ppb1 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x41
pci2 at ppb1 bus 2
cbb0 at pci2 dev 0 function 0 "Texas Instruments PCI1420 CardBus" rev 0x00: irq 11
cbb1 at pci2 dev 0 function 1 "Texas Instruments PCI1420 CardBus" rev 0x00: irq 11
"AT&T/Lucent LTMODEM" rev 0x01 at pci2 dev 2 function 0 not configured
fxp0 at pci2 dev 8 function 0 "Intel PRO/100 VE" rev 0x41: irq 11, address 00:d0:59:33:3b:52
inphy0 at fxp0 phy 1: i82562ET 10/100 media interface, rev. 0
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 3 device 0 cacheline 0x8, lattimer 0xb0
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 4 device 0 cacheline 0x8, lattimer 0xb0
pcmcia1 at cardslot1
ichpcib0 at pci0 dev 31 function 0 "Intel 82801CAM LPC" rev 0x01: SpeedStep
pciide0 at pci0 dev 31 function 1 "Intel 82801CAM IDE" rev 0x01: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <IC25T048ATDA05-0>
wd0: 16-sector PIO, LBA, 45780MB, 93759120 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <HITACHI, DVD-ROM GD-S200, 0034> SCSI0 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
"Intel 82801CA/CAM SMBus" rev 0x01 at pci0 dev 31 function 3 not configured
auich0 at pci0 dev 31 function 5 "Intel 82801CA/CAM AC97" rev 0x01: irq 11, ICH3 AC97
ac97: codec id 0x43525936 (Cirrus Logic CS4299 rev 6)
ac97: codec features headphone, 20 bit DAC, 18 bit ADC, Crystal Semi 3D
audio0 at auich0
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
sysbeep0 at pcppi0
lpt2 at isa0 port 0x3bc/4: polled
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
biomask efed netmask efed ttymask ffef
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dkcsum: wd0 matched BIOS disk 80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
umass0 at uhub1 port 2 configuration 1 interface 0
umass0: USB Flash Disk, rev 1.10/1.10, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0: <64MB, HardDrive, 1.88> SCSI2 0/direct removable
sd0: 62MB, 62 cyl, 64 head, 32 sec, 512 bytes/sec, 128000 sec total



Visit your host, monkey.org