On Fri, Jun 3, 2011 at 2:01 PM, Carl Karsten <carl@xxxxxxxxxxxxxxxxx> wrote: > On Wed, Jun 1, 2011 at 12:24 AM, Carl Karsten <carl@xxxxxxxxxxxxxxxxx> wrote: >> I wrote this to see when the kernel was reacting to cards being >> plugged and unplugged. >> >> SUBSYSTEM=="pci", ACTION=="add", RUN+="/usr/bin/sox -n -d synth .1 sin 700" >> SUBSYSTEM=="pci", ACTION=="remove", RUN+="/usr/bin/sox -n -d synth .1 sin 500" >> SUBSYSTEM=="firewire", ACTION=="remove", RUN+="/usr/bin/sox -n -d >> synth .1 sin 500" >> >> plugged in works fine - seems instant. >> >> unplugging seems to be around 2 seconds for the first beep and 10 >> seconds for the 2nd. the gap between 1st and 2nd can be seen: >> >> juser@pc9e:~$ udevadm monitor >> monitor will print the received events for: >> UDEV - the event which udev sends out after rule processing >> KERNEL - the kernel uevent >> >> KERNEL[1306905305.865025] add >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0 (pci) >> UDEV [1306905306.035403] add >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0 (pci) >> KERNEL[1306905306.424395] add >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/fw1 (firewire) >> UDEV [1306905306.425754] add >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/fw1 (firewire) >> >> KERNEL[1306905309.874340] remove >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/fw1 (firewire) >> UDEV [1306905309.875007] remove >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0/fw1 (firewire) >> >> KERNEL[1306905319.874299] remove >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0 (pci) >> UDEV [1306905320.055101] remove >> /devices/pci0000:00/0000:00:1c.2/0000:04:00.0 (pci) >> >> >> I don't know if this is causing a problem, but I suspect it is. >> I know I have often unplugged one card and plugged in another within >> the 10 second window. I assumed the drivers would have been unloaded >> by then. Now that I have the beeps I know how long to wait. >> > > I just noticed that the 3 times show up in syslog: > > Jun 3 13:38:34 pc9e kernel: [219981.609750] pciehp > 0000:00:1c.2:pcie04: Card not present on Slot(2) > > Jun 3 13:38:36 pc9e kernel: [219983.600274] firewire_ohci: failed to > write phy reg > > Jun 3 13:38:46 pc9e kernel: [219993.620351] firewire_ohci > 0000:04:00.0: PCI INT A disabled > Jun 3 13:38:46 pc9e kernel: [219993.620360] firewire_ohci: Removed > fw-ohci device. > > What can be done to remove or reduce the delay? > > Also, it does not have this delay with a PC card. unplugging a firewire card with a drive plugged in takes 25 seconds for everything to unload: [ 330.720976] pciehp 0000:00:1c.2:pcie04: Card not present on Slot(2) [ 332.720297] firewire_ohci: failed to write phy reg [ 345.040308] firewire_sbp2: fw2.0: sbp2_scsi_abort [ 345.040349] scsi 8:0:0:0: Device offlined - not ready after error recovery [ 345.040633] firewire_sbp2: released fw2.0, target 8:0:0 [ 355.240348] firewire_ohci 0000:04:00.0: PCI INT A disabled [ 355.240357] firewire_ohci: Removed fw-ohci device. -- Carl K -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html