2011/10/8 Jonathan Gray <[email protected]>

> On Sat, Oct 08, 2011 at 01:35:19PM +0300, Atanas Vladimirov wrote:
> > Hi misc,
> >
> > Recently I bought COM to PCMCIA adapter, full dmesg at end of e-mail.
> > I don't understand programming and I can't offer working patches, but I
> can
> > test patches.
> > Tell me if I can give more information, that would be useful.
> > Sorry for my english, and sorry if I send to wrong mailing list.
> >
> > Try it with the last snapshot from Oct 7 2011 and it was not configured:
> > unknown vendor 0x4348 product 0x3253 (class communications subclass
> serial,
> > rev 0x10) at cardbus0 dev 0 function 0 not configured
>
> try this, it doesn't include pcidevs information to make it easier to apply
>
> It would also be helpful if you could include the output of "pcidump -v"
>
> Index: sys/dev/cardbus/com_cardbus.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/cardbus/com_cardbus.c,v
> retrieving revision 1.40
> diff -u -p -r1.40 com_cardbus.c
> --- sys/dev/cardbus/com_cardbus.c       15 Nov 2010 23:19:34 -0000
>  1.40
> +++ sys/dev/cardbus/com_cardbus.c       8 Oct 2011 12:56:40 -0000
> @@ -125,6 +125,8 @@ static struct csdev {
>        { PCI_VENDOR_XIRCOM, PCI_PRODUCT_XIRCOM_CBEM56G,
>          CARDBUS_BASE0_REG, PCI_MAPREG_TYPE_IO },
>        { PCI_VENDOR_XIRCOM, PCI_PRODUCT_XIRCOM_MODEM56,
> +         CARDBUS_BASE0_REG, PCI_MAPREG_TYPE_IO },
> +       { 0x4348, 0x3253,
>          CARDBUS_BASE0_REG, PCI_MAPREG_TYPE_IO }
>  };
>
> Index: sys/dev/pci/pucdata.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/pucdata.c,v
> retrieving revision 1.74
> diff -u -p -r1.74 pucdata.c
> --- sys/dev/pci/pucdata.c       20 Apr 2011 04:58:29 -0000      1.74
> +++ sys/dev/pci/pucdata.c       8 Oct 2011 12:56:41 -0000
> @@ -1734,6 +1734,14 @@ const struct puc_device_description puc_
>                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
>            },
>        },
> +       {   /* "WinChipHead CH352", */
> +           {   0x4348, 0x3253, 0, 0    },
> +           {   0xffff, 0xffff,                                 0, 0    },
> +           {
> +               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
> +               { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
> +           },
> +       },
>
>        {   /* NULL, */
>
>
Thanks for your respond. I coudn't apply your patch. I tried with
# cd /usr/src
# patch -p0 < /path/to/patch
But I got errors. After that I manualy edited the two files and made the
following patch, which works great.
Then I compiled the new kernel. Full dmesg at the end of e-mail.
Now pcmcia adapter works fine. I made two tests, one at 4800 baud and other
at 115200 baud, there were no errors.

com3 at cardbus0 dev 0 function 0 unknown vendor 0x4348 product 0x3253 rev
0x10: irq 268505099: ns16550a, 16 byte fifo

# pcidump -v (when pcmcia adapter was pluged in)
..................................................
 21:0:0: TI PCI1510 CardBus
        0x0000: Vendor ID: 104c Product ID: ac56
        0x0004: Command: 0007 Status ID: 0210
        0x0008: Class: 06 Subclass: 07 Interface: 00 Revision: 00
        0x000c: BIST: 00 Header Type: 02 Latency Timer: a8 Cache Line Size:
08
        0x0010: Cardbus Control Registers Base Address: e4300000
        0x0018: Primary Bus: 21 Cardbus Bus: 22 Subordinate Bus: 24
                Cardbus Latency Timer: b0
        0x001c: Memory Base 0: fffff000
        0x0020: Memory Limit 0: 00000000
        0x0024: Memory Base 1: fffff000
        0x0028: Memory Limit 1: 00000000
        0x002c: I/O Base 0: 0000a300
        0x0030: I/O Limit 0: 0000a304
        0x0034: I/O Base 1: fffffffc
        0x0038: I/O Limit 1: 00000000
        0x003c: Interrupt Pin: 01 Line: 0b Bridge Control: 0700
        0x0040: Subsystem Vendor ID: 17aa Product ID: 2012
        0x0044: 16-bit Legacy Mode Base Address: 00000001
        0x00a0: Capability 0x01: Power Management

# pcidump -v (when pcmcia adapter was ejected)
..................................................
21:0:0: TI PCI1510 CardBus
        0x0000: Vendor ID: 104c Product ID: ac56
        0x0004: Command: 0007 Status ID: 0210
        0x0008: Class: 06 Subclass: 07 Interface: 00 Revision: 00
        0x000c: BIST: 00 Header Type: 02 Latency Timer: a8 Cache Line Size:
08
        0x0010: Cardbus Control Registers Base Address: e4300000
        0x0018: Primary Bus: 21 Cardbus Bus: 22 Subordinate Bus: 24
                Cardbus Latency Timer: b0
        0x001c: Memory Base 0: fffff000
        0x0020: Memory Limit 0: 00000000
        0x0024: Memory Base 1: fffff000
        0x0028: Memory Limit 1: 00000000
        0x002c: I/O Base 0: fffffffc
        0x0030: I/O Limit 0: 00000000
        0x0034: I/O Base 1: fffffffc
        0x0038: I/O Limit 1: 00000000
        0x003c: Interrupt Pin: 01 Line: 0b Bridge Control: 07c0
        0x0040: Subsystem Vendor ID: 17aa Product ID: 2012
        0x0044: 16-bit Legacy Mode Base Address: 00000001
        0x00a0: Capability 0x01: Power Management

Diff between the two states of `pcidump -v`
---    plug-in     Sat Oct  8 20:24:45 2011
+++ plug-out   Sat Oct  8 17:21:07 2011
@@ -383,11 +383,11 @@
        0x0020: Memory Limit 0: 00000000
        0x0024: Memory Base 1: fffff000
        0x0028: Memory Limit 1: 00000000
-       0x002c: I/O Base 0: 0000a300
-       0x0030: I/O Limit 0: 0000a304
+       0x002c: I/O Base 0: fffffffc
+       0x0030: I/O Limit 0: 00000000
        0x0034: I/O Base 1: fffffffc
        0x0038: I/O Limit 1: 00000000
-       0x003c: Interrupt Pin: 01 Line: 0b Bridge Control: 0700
+       0x003c: Interrupt Pin: 01 Line: 0b Bridge Control: 07c0
        0x0040: Subsystem Vendor ID: 17aa Product ID: 2012
        0x0044: 16-bit Legacy Mode Base Address: 00000001
        0x00a0: Capability 0x01: Power Management


Index: sys/dev/cardbus/com_cardbus.c
===================================================================
RCS file: /cvs/src/sys/dev/cardbus/com_cardbus.c,v
retrieving revision 1.40
diff -u -p -r1.40 com_cardbus.c
--- sys/dev/cardbus/com_cardbus.c 15 Nov 2010 23:19:34 -0000 1.40
+++ sys/dev/cardbus/com_cardbus.c 8 Oct 2011 14:59:40 -0000
@@ -125,6 +125,8 @@ static struct csdev {
  { PCI_VENDOR_XIRCOM, PCI_PRODUCT_XIRCOM_CBEM56G,
   CARDBUS_BASE0_REG, PCI_MAPREG_TYPE_IO },
  { PCI_VENDOR_XIRCOM, PCI_PRODUCT_XIRCOM_MODEM56,
+  CARDBUS_BASE0_REG, PCI_MAPREG_TYPE_IO },
+ { 0x4348, 0x3253,
   CARDBUS_BASE0_REG, PCI_MAPREG_TYPE_IO }
 };

Index: sys/dev/pci/pucdata.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/pucdata.c,v
retrieving revision 1.74
diff -u -p -r1.74 pucdata.c
--- sys/dev/pci/pucdata.c 20 Apr 2011 04:58:29 -0000 1.74
+++ sys/dev/pci/pucdata.c 8 Oct 2011 15:00:03 -0000
@@ -1734,6 +1734,14 @@ const struct puc_device_description puc_
  { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
     },
  },
+ {   /* "WinChipHead CH352", */
+    {   0x4348, 0x3253, 0, 0    },
+    {   0xffff, 0xffff,                                 0, 0    },
+    {
+               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+               { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
+    },
+       },

  {   /* NULL, */



#
## Dmesg
#
OpenBSD 5.0-current (GENERIC.MP) #4: Sat Oct  8 21:03:39 EEST 2011
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz ("GenuineIntel" 686-class) 2
GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM
real mem  = 2145775616 (2046MB)
avail mem = 2100588544 (2003MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/01/10, BIOS32 rev. 0 @ 0xfd6b0,
SMBIOS rev. 2.4 @ 0xe0010 (68 entries)
bios0: vendor LENOVO version "79ETE6WW (2.26 )" date 04/01/2010
bios0: LENOVO 2007Z3T
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT
SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) LURT(S3) DURT(S3) EXP0(S4) EXP1(S4)
EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz ("GenuineIntel" 686-class) 2
GHz
cpu1:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBS
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 99 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "92P1137" serial   311 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
bios0: ROM list: 0xc0000/0xfe00 0xd0000/0x1000 0xd1000/0x1000
0xdc000/0x4000! 0xe0000/0x10000!
cpu0: Enhanced SpeedStep 1995 MHz: speeds: 2000, 1667, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82945GM PCIE" rev 0x03: apic 1 int 16
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Radeon Mobility X1400" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: apic 1 int 16
drm0 at radeondrm0
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
azalia0: codecs: Analog Devices AD1981HD, 0x0000/0x0000, using Analog
Devices AD1981HD
audio0 at azalia0
ppb1 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 1 int 20
pci2 at ppb1 bus 2
em0 at pci2 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: msi,
address 00:16:41:e5:a8:2f
ppb2 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 1 int 21
pci3 at ppb2 bus 3
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi,
MoW2, address 00:19:d2:98:6d:be
ppb3 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 1 int 22
pci4 at ppb3 bus 4
ppb4 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 1 int 23
pci5 at ppb4 bus 12
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 16
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 17
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 19
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 19
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb5 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci6 at ppb5 bus 21
cbb0 at pci6 dev 0 function 0 "TI PCI1510 CardBus" rev 0x00: apic 1 int 16
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 22 device 0 cacheline 0x8, lattimer 0xb0
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM
disabled
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x02: DMA, channel
0 configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <HL-DT-ST, DVDRAM GSA-4083N, 1.08> ATAPI
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ahci0 at pci0 dev 31 function 2 "Intel 82801GBM AHCI" rev 0x02: msi, AHCI
1.1
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, HITACHI HTS54168, SB2I> SCSI3 0/direct
fixed naa.5000cca51cdb01e3
sd0: 76319MB, 512 bytes/sector, 156301488 sectors
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int
23
iic0 at ichiic0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
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
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 6.2
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
com3 at cardbus0 dev 0 function 0 unknown vendor 0x4348 product 0x3253 rev
0x10: irq 268505099: ns16550a, 16 byte fifo
uhidev0 at uhub1 port 2 configuration 1 interface 0 "Logitech USB Receiver"
rev 2.00/5.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 16 buttons, Z dir
wsmouse2 at ums0 mux 0
uhidev1 at uhub1 port 2 configuration 1 interface 1 "Logitech USB Receiver"
rev 2.00/5.00 addr 2
uhidev1: iclass 3/0, 17 report ids
uhid0 at uhidev1 reportid 3: input=4, output=0, feature=0
uhid1 at uhidev1 reportid 16: input=6, output=6, feature=0
uhid2 at uhidev1 reportid 17: input=19, output=19, feature=0
ugen0 at uhub4 port 1 "Broadcom Corp BCM2045B" rev 2.00/1.00 addr 2
ugen1 at uhub4 port 2 "STMicroelectronics Biometric Coprocessor" rev
1.00/0.01 addr 3
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (1be636b396b70cf8.a) swap on sd0b dump on sd0b

Reply via email to