Re: USB expansion card for OpenBSD/hppa?

Tom Lane <[email protected]> Mon, 07 Mar 2022 17:42:47 -0500
Newsgroups gmane.os.openbsd.hppa
Message-ID <[email protected]>
Miod Vallat <[email protected]> writes:
> See "Expansion slots" in
> https://www.openpa.net/systems/hp-visualize_c200_c240_c360.html

I even have that page bookmarked, but I forgot to look there :-(

The card claims to support either 3.3V or 5V, but it doesn't work
in slot 1 but does in slot 2.  I bet it's expecting the higher
bus speed or bus width; its documentation mentions nothing about
either.

... for small values of "work", anyway.  It now shows up with
reasonable-looking entries in pcidump and dmesg.  However,
OpenBSD still doesn't see the USB drive I plugged in for
test purposes.

I get these pcidump entries that were not there before:

Domain /dev/pci0:
 0:2:0: VIA VT83C572 USB
        0x0000: Vendor ID: 1106 Product ID: 3038
        0x0004: Command: 0155 Status: 0210
        0x0008: Class: 0c Subclass: 03 Interface: 00 Revision: 62
        0x000c: BIST: 00 Header Type: 80 Latency Timer: ff Cache Line Size=
: 08
        0x0010: BAR empty (00000000)
        0x0014: BAR empty (00000000)
        0x0018: BAR empty (00000000)
        0x001c: BAR empty (00000000)
        0x0020: BAR io addr: 0x0000fe00/0x0020
        0x0024: BAR empty (00000000)
        0x0028: Cardbus CIS: 00000000
        0x002c: Subsystem Vendor ID: 1106 Product ID: 3038
        0x0030: Expansion ROM Base Address: 00000000
        0x0038: 00000000
        0x003c: Interrupt Pin: 01 Line: 02 Min Gnt: 00 Max Lat: 00
        0x0080: Capability 0x01: Power Management
                State: D0
 0:2:1: VIA VT83C572 USB
        0x0000: Vendor ID: 1106 Product ID: 3038
        0x0004: Command: 0155 Status: 0210
        0x0008: Class: 0c Subclass: 03 Interface: 00 Revision: 62
        0x000c: BIST: 00 Header Type: 80 Latency Timer: ff Cache Line Size=
: 08
        0x0010: BAR empty (00000000)
        0x0014: BAR empty (00000000)
        0x0018: BAR empty (00000000)
        0x001c: BAR empty (00000000)
        0x0020: BAR io addr: 0x0000ff00/0x0020
        0x0024: BAR empty (00000000)
        0x0028: Cardbus CIS: 00000000
        0x002c: Subsystem Vendor ID: 1106 Product ID: 3038
        0x0030: Expansion ROM Base Address: 00000000
        0x0038: 00000000
        0x003c: Interrupt Pin: 02 Line: 03 Min Gnt: 00 Max Lat: 00
        0x0080: Capability 0x01: Power Management
                State: D0
 0:2:2: VIA VT6202 USB
        0x0000: Vendor ID: 1106 Product ID: 3104
        0x0004: Command: 0156 Status: 0210
        0x0008: Class: 0c Subclass: 03 Interface: 20 Revision: 65
        0x000c: BIST: 00 Header Type: 80 Latency Timer: ff Cache Line Size=
: 08
        0x0010: BAR mem 32bit addr: 0xf1fff000/0x00000100
        0x0014: BAR empty (00000000)
        0x0018: BAR empty (00000000)
        0x001c: BAR empty (00000000)
        0x0020: BAR empty (00000000)
        0x0024: BAR empty (00000000)
        0x0028: Cardbus CIS: 00000000
        0x002c: Subsystem Vendor ID: 1106 Product ID: 3104
        0x0030: Expansion ROM Base Address: 00000000
        0x0038: 00000000
        0x003c: Interrupt Pin: 03 Line: 00 Min Gnt: 00 Max Lat: 00
        0x0080: Capability 0x01: Power Management
                State: D0

Relevant-looking dmesg entries:

pci0 at dino0
uhci0 at pci0 dev 2 function 0 "VIA VT83C572 USB" rev 0x62: dino irq 3
uhci1 at pci0 dev 2 function 1 "VIA VT83C572 USB" rev 0x62: dino irq 4
ehci0 at pci0 dev 2 function 2 "VIA VT6202 USB" rev 0x65: dino irq 1
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "VIA EHCI root hub" rev 2.00/1.0=
0 addr 1
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "VIA UHCI root hub" rev 1.00/1.0=
0 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "VIA UHCI root hub" rev 1.00/1.0=
0 addr 1
...
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
uhub0: device problem, disabling port 3
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
ehci_sync_hc: tsleep() =3D 35
uhub0: device problem, disabling port 4

(about 12 seconds between each pair of tsleep complaints)
The above is with OpenBSD 6.4, which is what I had installed.
Booting OpenBSD 7.0 off a CD, I see the same except that
the "ehci_sync_hc" complaints aren't printed --- but there's
more or less the same long delays before the "disabling port"
messages.

Interestingly, the above is with the USB drive plugged into
the card's port 3.  I moved it to port 1, and instead got
complaints about disabling ports 1 and 4.  I moved it to
port 4, and got only the complaint about port 4.  Maybe this
is more about incompatibility with the drive (it's an ancient
LaCie that I wasn't using for anything) than the card?

Anyway, many thanks for your help!

			regards, tom lane