On 08/10/12 08:13, Stuart Henderson wrote: > On 2012/08/10 13:46, Martin Pieuchot wrote: >> >> I'm also in favor of removing quirks however I would suggest to remove >> them on a case-by-case basis until libusb have full support for >> communicating with any usb device (hopefully in this release cycle). > > Many items on that list are UPS which share a single usbhid-ups driver > in NUT and were added speculatively from NUT's vid/pid list. > > I think it would be safe to remove quirks for the devices which > are only supported by the common NUT driver. Do you think this is > reasonable? > > We have other software in the ports tree (sysutils/apcupsd, not > sysutils/apc-upsd which is different) that can drive USB-connected APC > devices so, given your comments, so I'd like to see that tested > before removing the UQ_BAD_HID for APC UPS. > > Index: usb_quirks.c > [...snip...]
apcupsd fails when running a kernel without the UQ_BAD_HID quirk entries. I also noticed 50+ new uhidev entries in the dmesg since the Aug 1 snapshot. dmesg at end. I'm reverting to the last snapshot. I patched the apcupsd package to enable DEBUG and see the following: x2:Projects/apcupsd 949>diff -wbu /etc/rc.conf.local.20120612 /etc/rc.conf.local --- /etc/rc.conf.local.20120612 Tue Jun 12 21:21:01 2012 +++ /etc/rc.conf.local Sun Aug 12 18:13:39 2012 @@ -12,3 +12,4 @@ sshd_flags="-u0" # for normal use: "" wsmoused_flags="" # for ps/2 or usb mice: "", serial: "-p /dev/cua00" pkg_scripts="samba spamassassin dbus_daemon arpwatch ladvd apcupsd" +apcupsd_flags="--kill-on-powerfail -d301" x2:Projects/apcupsd 950>sudo /etc/rc.d/apcupsd -d start doing rc_read_runfile doing rc_check apcupsd doing rc_pre doing rc_start 0.000 apcupsd: apcupsd.c:219 Options parsed. 0.001 apcupsd: apcconfig.c:799 After config scriptdir: "/etc/apcupsd" 0.001 apcupsd: apcconfig.c:800 After config pwrfailpath: "/etc/apcupsd" 0.001 apcupsd: apcconfig.c:801 After config nologinpath: "/etc" 0.001 apcupsd: apcupsd.c:242 Config file /etc/apcupsd/apcupsd.conf processed. 0.001 apcupsd: newups.c:102 write_lock at drivers.c:208 0.013 apcupsd: drivers.c:210 Looking for driver: usb 0.013 apcupsd: drivers.c:214 Driver dumb is configured. 0.013 apcupsd: drivers.c:214 Driver apcsmart is configured. 0.013 apcupsd: drivers.c:214 Driver net is configured. 0.013 apcupsd: drivers.c:214 Driver usb is configured. 0.013 apcupsd: drivers.c:217 Driver usb found and attached. 0.013 apcupsd: newups.c:108 write_unlock at drivers.c:234 0.013 apcupsd: drivers.c:236 Driver ptr=0x5357a0 0.013 apcupsd: apcupsd.c:261 Attached to driver: usb doing rc_write_runfile (ok) x2:Projects/apcupsd 951>0.018 apcupsd: newups.c:102 write_lock at bsd-usb.c:728 0.018 apcupsd: bsd-usb.c:253 Found bus /dev/usb0. 0.019 apcupsd: bsd-usb.c:253 Found bus /dev/usb1. 0.061 apcupsd: bsd-usb.c:253 Found bus /dev/usb2. 0.061 apcupsd: bsd-usb.c:253 Found bus /dev/usb3. 0.062 apcupsd: bsd-usb.c:253 Found bus /dev/usb4. 0.062 apcupsd: newups.c:108 write_unlock at bsd-usb.c:747 apcupsd FATAL ERROR in bsd-usb.c at line 755 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>. 0.063 apcupsd: apclog.c:62 apcupsd FATAL ERROR in bsd-usb.c at line 755 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http://www.apcupsd.com/support.html>. 0.063 apcupsd: newups.c:102 write_lock at bsd-usb.c:770 0.064 apcupsd: newups.c:108 write_unlock at bsd-usb.c:777 0.064 apcupsd: apclog.c:62 apcupsd error shutdown completed ### dmesg stuff ### With the Aug 1 snapshot kernel the APC UPS showed as: ugen0 at uhub1 port 1 "American Power Conversion Smart-UPS 1000 XL FW:631.3.D USB FW:1.5" rev 1.10/0.06 addr 2 OpenBSD 5.2-current (USB_UPS) #0: Sun Aug 12 16:35:33 EDT 2012 r...@x2.thrush.com:/usr/src/sys/arch/amd64/compile/USB_UPS real mem = 1072365568 (1022MB) avail mem = 1021456384 (974MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.3 @ 0xf0530 (67 entries) bios0: vendor American Megatrends Inc. version "0221" date 12/06/2005 bios0: ASUSTeK Computer Inc. A8V acpi0 at bios0: rev 2 acpi0: sleep states S0 S1 S3 S4 S5 acpi0: tables DSDT FACP APIC OEMB acpi0: wakeup devices PCI0(S4) PS2K(S4) PS2M(S4) UAR1(S4) AC97(S4) USB1(S4) USB2(S4) USB3(S4) USB4(S4) EHCI(S4) PWRB(S4) SLPB(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, 2002.86 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: apic clock running at 200MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, 2002.56 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW,LAHF,CMPLEG cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 3, 24 pins acpiprt0 at acpi0: bus 0 (PCI0) acpicpu0 at acpi0: PSS acpicpu1 at acpi0: PSS acpibtn0 at acpi0: PWRB acpibtn1 at acpi0: SLPB cpu0: Cool'n'Quiet K8 2002 MHz: speeds: 2000 1800 1000 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "VIA K8HTB Host" rev 0x00 agp at pchb0 not configured pchb1 at pci0 dev 0 function 1 "VIA K8HTB Host" rev 0x00 pchb2 at pci0 dev 0 function 2 "VIA K8HTB Host" rev 0x00 pchb3 at pci0 dev 0 function 3 "VIA K8HTB Host" rev 0x00 pchb4 at pci0 dev 0 function 4 "VIA K8HTB Host" rev 0x00 pchb5 at pci0 dev 0 function 7 "VIA K8HTB Host" rev 0x00 ppb0 at pci0 dev 1 function 0 "VIA K8HTB AGP" rev 0x00 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "ATI Radeon 9200 PRO" rev 0x01 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) radeondrm0 at vga1: apic 2 int 16 drm0 at radeondrm0 "ATI Radeon 9200 PRO Sec" rev 0x01 at pci1 dev 0 function 1 not configured skc0 at pci0 dev 10 function 0 "Marvell Yukon 88E8001/8003/8010" rev 0x13, Yukon Lite (0x9): apic 2 int 17 sk0 at skc0 port A: address 00:15:f2:44:40:ad eephy0 at sk0 phy 0: 88E1011 Gigabit PHY, rev. 5 em0 at pci0 dev 12 function 0 "Intel PRO/1000GT (82541GI)" rev 0x05: apic 2 int 17, address 00:1b:21:2e:39:c4 ami0 at pci0 dev 14 function 0 "Symbios Logic MegaRAID" rev 0x01: apic 2 int 19 ami0: LSI 523, 32b, FW 713S, BIOS vG121, 64MB RAM ami0: 1 channels, 0 FC loops, 5 logical drives scsibus0 at ami0: 40 targets sd0 at scsibus0 targ 0 lun 0: <AMI, Host drive #00, > SCSI2 0/direct fixed sd0: 4000MB, 512 bytes/sector, 8192000 sectors sd1 at scsibus0 targ 1 lun 0: <AMI, Host drive #01, > SCSI2 0/direct fixed sd1: 300000MB, 512 bytes/sector, 614400000 sectors sd2 at scsibus0 targ 2 lun 0: <AMI, Host drive #02, > SCSI2 0/direct fixed sd2: 300000MB, 512 bytes/sector, 614400000 sectors sd3 at scsibus0 targ 3 lun 0: <AMI, Host drive #03, > SCSI2 0/direct fixed sd3: 300000MB, 512 bytes/sector, 614400000 sectors sd4 at scsibus0 targ 4 lun 0: <AMI, Host drive #04, > SCSI2 0/direct fixed sd4: 49880MB, 512 bytes/sector, 102154240 sectors scsibus1 at ami0: 16 targets pciide0 at pci0 dev 15 function 0 "VIA VT6420 SATA" rev 0x80: DMA pciide0: using apic 2 int 20 for native-PCI interrupt pciide1 at pci0 dev 15 function 1 "VIA VT82C571 IDE" rev 0x06: ATA133, channel 0 configured to compatibility, channel 1 configured to compatibility wd0 at pciide1 channel 0 drive 0: <WDC WD1200JB-00CRA1> wd0: 16-sector PIO, LBA, 114473MB, 234441648 sectors atapiscsi0 at pciide1 channel 0 drive 1 scsibus2 at atapiscsi0: 2 targets cd0 at scsibus2 targ 0 lun 0: <_NEC, DVD_RW ND-3550A, 1.05> ATAPI 5/cdrom removable wd0(pciide1:0:0): using PIO mode 4, Ultra-DMA mode 2 cd0(pciide1:0:1): using PIO mode 4, Ultra-DMA mode 2 pciide1: channel 1 disabled (no drives) uhci0 at pci0 dev 16 function 0 "VIA VT83C572 USB" rev 0x81: apic 2 int 21 uhci1 at pci0 dev 16 function 1 "VIA VT83C572 USB" rev 0x81: apic 2 int 21 uhci2 at pci0 dev 16 function 2 "VIA VT83C572 USB" rev 0x81: apic 2 int 21 uhci3 at pci0 dev 16 function 3 "VIA VT83C572 USB" rev 0x81: apic 2 int 21 ehci0 at pci0 dev 16 function 4 "VIA VT6202 USB" rev 0x86: apic 2 int 21 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "VIA EHCI root hub" rev 2.00/1.00 addr 1 viapm0 at pci0 dev 17 function 0 "VIA VT8237 ISA" rev 0x00: SMI iic0 at viapm0 spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM ECC PC3200CL3.0 spdmem1 at iic0 addr 0x51: 512MB DDR SDRAM ECC PC3200CL3.0 auvia0 at pci0 dev 17 function 5 "VIA VT8233 AC97" rev 0x60: apic 2 int 22 ac97: codec id 0x414c4790 (Avance Logic ALC850 rev 0) audio0 at auvia0 pchb6 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00 pchb7 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00 pchb8 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00 kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00 usb1 at uhci0: USB revision 1.0 uhub1 at usb1 "VIA UHCI root hub" rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 "VIA UHCI root hub" rev 1.00/1.00 addr 1 usb3 at uhci2: USB revision 1.0 uhub3 at usb3 "VIA UHCI root hub" rev 1.00/1.00 addr 1 usb4 at uhci3: USB revision 1.0 uhub4 at usb4 "VIA UHCI root hub" rev 1.00/1.00 addr 1 isa0 at mainbus0 isadma0 at isa0 com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo com0: console 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 spkr0 at pcppi0 wbsio0 at isa0 port 0x2e/2: W83627THF rev 0x84 lm1 at wbsio0 port 0x290/8: W83627THF fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 mtrr: Pentium Pro MTRR support uhidev0 at uhub1 port 1 configuration 1 interface 0 "American Power Conversion Smart-UPS 1000 XL FW:631.3.D USB FW:1.5" rev 1.10/0.06 addr 2 uhidev0: iclass 3/0, 54 report ids uhid0 at uhidev0 reportid 1: input=0, output=0, feature=1 uhid1 at uhidev0 reportid 2: input=0, output=0, feature=1 uhid2 at uhidev0 reportid 3: input=0, output=0, feature=1 uhid3 at uhidev0 reportid 4: input=0, output=0, feature=1 uhid4 at uhidev0 reportid 5: input=0, output=0, feature=1 uhid5 at uhidev0 reportid 6: input=0, output=0, feature=2 uhid6 at uhidev0 reportid 7: input=2, output=0, feature=2 uhid7 at uhidev0 reportid 8: input=3, output=0, feature=3 uhid8 at uhidev0 reportid 9: input=0, output=0, feature=2 uhid9 at uhidev0 reportid 10: input=0, output=0, feature=2 uhid10 at uhidev0 reportid 11: input=0, output=0, feature=2 uhid11 at uhidev0 reportid 12: input=1, output=0, feature=1 uhid12 at uhidev0 reportid 13: input=2, output=0, feature=2 uhid13 at uhidev0 reportid 14: input=0, output=0, feature=2 uhid14 at uhidev0 reportid 15: input=0, output=0, feature=1 uhid15 at uhidev0 reportid 16: input=0, output=0, feature=2 uhid16 at uhidev0 reportid 17: input=0, output=0, feature=1 uhid17 at uhidev0 reportid 18: input=0, output=0, feature=2 uhid18 at uhidev0 reportid 19: input=0, output=0, feature=3 uhid19 at uhidev0 reportid 20: input=1, output=0, feature=1 uhid20 at uhidev0 reportid 21: input=2, output=0, feature=2 uhid21 at uhidev0 reportid 22: input=1, output=0, feature=1 uhid22 at uhidev0 reportid 23: input=1, output=0, feature=1 uhid23 at uhidev0 reportid 24: input=0, output=0, feature=2 uhid24 at uhidev0 reportid 25: input=0, output=0, feature=2 uhid25 at uhidev0 reportid 26: input=2, output=0, feature=2 uhid26 at uhidev0 reportid 27: input=1, output=0, feature=1 uhid27 at uhidev0 reportid 28: input=1, output=0, feature=1 uhid28 at uhidev0 reportid 29: input=0, output=0, feature=2 uhid29 at uhidev0 reportid 30: input=0, output=0, feature=2 uhid30 at uhidev0 reportid 31: input=0, output=0, feature=2 uhid31 at uhidev0 reportid 32: input=0, output=0, feature=2 uhid32 at uhidev0 reportid 33: input=1, output=0, feature=1 uhid33 at uhidev0 reportid 34: input=1, output=0, feature=1 uhid34 at uhidev0 reportid 35: input=2, output=0, feature=2 uhid35 at uhidev0 reportid 36: input=2, output=0, feature=2 uhid36 at uhidev0 reportid 37: input=2, output=0, feature=2 uhid37 at uhidev0 reportid 38: input=2, output=0, feature=2 uhid38 at uhidev0 reportid 39: input=0, output=0, feature=2 uhid39 at uhidev0 reportid 40: input=0, output=0, feature=2 uhid40 at uhidev0 reportid 41: input=0, output=0, feature=3 uhid41 at uhidev0 reportid 42: input=0, output=0, feature=2 uhid42 at uhidev0 reportid 43: input=0, output=0, feature=2 uhid43 at uhidev0 reportid 44: input=0, output=0, feature=2 uhid44 at uhidev0 reportid 45: input=2, output=0, feature=2 uhid45 at uhidev0 reportid 46: input=0, output=0, feature=1 uhid46 at uhidev0 reportid 47: input=0, output=0, feature=1 uhid47 at uhidev0 reportid 48: input=0, output=0, feature=1 uhid48 at uhidev0 reportid 49: input=0, output=0, feature=1 uhid49 at uhidev0 reportid 50: input=0, output=0, feature=1 uhid50 at uhidev0 reportid 51: input=2, output=0, feature=2 uhid51 at uhidev0 reportid 52: input=0, output=0, feature=1 uhid52 at uhidev0 reportid 53: input=0, output=0, feature=2 uhid53 at uhidev0 reportid 54: input=1, output=0, feature=1 vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets root on sd0a (2b277f1f84cd0dcc.a) swap on sd0b dump on sd0b ### usbdevs -v x2:Projects/apcupsd 959>usbdevs -v Controller /dev/usb0: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), VIA(0x1106), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 powered port 5 powered port 6 powered port 7 powered port 8 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), rev 1.00 port 1 addr 2: low speed, self powered, config 1, Smart-UPS 1000 XL FW:631.3.D USB FW:1.5(0x0002), American Power Conversion(0x051d), rev 0.06, iSerialNumber AS0406220006 port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), rev 1.00 port 1 powered port 2 powered Controller /dev/usb4: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), rev 1.00 port 1 powered port 2 powered