Re: How to use unrecognized COM port card?
On 17/08/2011, at 6:57 AM, Yuri wrote: > On 08/16/2011 13:37, Xin LI wrote: >> And I think John's patch is right, I've added a new PCI ID for it >> though, found from the datasheet. Did you have uart(4) in your kernel >> (remove my old patch)? > > Yes, uart(4) is in kernel and puc(4) is the loaded module. I think this might > be a problem that puc(4) is a module loaded later and that's why serial > device isn't registered. I found the reference to the similar situation with > some other card that got cured when puc(4) was compiled into kernel. > (http://www.adras.com/Quadtech-DSC-100-PCI-dual-serial-port-on-8-0R-i386.t6999-79.html) > > I have yet to try building puc(4) into kernel, but the way how I have it now > is the default in GENERIC. Should uart(4) instead be removed from kernel and > made loadable too to prevent such initialization order issue? Or what would > be the right fix? Have too much stuff in kernel isn't right too. uart > probably isn't used by 99% of users. For my recent Moxa 2 port serial card addition, I had to include puc in the kernel config; it didn't work as a module. Jan. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On Tuesday, August 16, 2011 4:57:26 pm Yuri wrote: > On 08/16/2011 13:37, Xin LI wrote: > > And I think John's patch is right, I've added a new PCI ID for it > > though, found from the datasheet. Did you have uart(4) in your kernel > > (remove my old patch)? > > Yes, uart(4) is in kernel and puc(4) is the loaded module. I think this > might be a problem that puc(4) is a module loaded later and that's why > serial device isn't registered. I found the reference to the similar > situation with some other card that got cured when puc(4) was compiled > into kernel. > (http://www.adras.com/Quadtech-DSC-100-PCI-dual-serial-port-on-8-0R- i386.t6999-79.html) > > I have yet to try building puc(4) into kernel, but the way how I have it > now is the default in GENERIC. Should uart(4) instead be removed from > kernel and made loadable too to prevent such initialization order issue? > Or what would be the right fix? Have too much stuff in kernel isn't > right too. uart probably isn't used by 99% of users. Err, uart is in _lots_ of machines (just about every rack-mounted x86 server I've ever used). The real bug here is the uart driver and the way it is compiled into the kernel. It should just always include the 'puc' attachment I believe, or do so if any of the busses supported by 'puc' are compiled in. The puc attachment for uart is really tiny, and KOBJ is used in new-bus specifically so that attachments don't require the full bus driver to be present. Something like this: Index: files === --- files (revision 224879) +++ files (working copy) @@ -1842,7 +1842,7 @@ dev/uart/uart_bus_fdt.c optional uart fdt dev/uart/uart_bus_isa.coptional uart isa dev/uart/uart_bus_pccard.c optional uart pccard dev/uart/uart_bus_pci.coptional uart pci -dev/uart/uart_bus_puc.coptional uart puc +dev/uart/uart_bus_puc.coptional uart puc | uart pccard | uart pci dev/uart/uart_bus_scc.coptional uart scc dev/uart/uart_core.c optional uart dev/uart/uart_dbg.coptional uart gdb -- John Baldwin ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On Tuesday, August 16, 2011 4:59:42 pm Yuri wrote: > On 08/16/2011 13:57, John Baldwin wrote: > > Hmmm, can you get devinfo -v output? Specifically there should be two > > children of puc0 and they should have extra data specifying what type of port > > each child device is. > > > > Here is the only reference to puc0 in devinfo -v output: > > pcib8 pnpinfo vendor=0x8086 device=0x244e subvendor=0x1043 > subdevice=0x82d4 class=0x060401 at slot=30 function=0 handle=\_SB_.PCI0.P0P1 >pci8 > pcm0 pnpinfo vendor=0x1274 device=0x5000 subvendor=0x4942 > subdevice=0x4c4c class=0x040100 at slot=0 function=0 > puc0 pnpinfo vendor=0x4348 device=0x3253 subvendor=0x4348 > subdevice=0x3253 class=0x070002 at slot=1 function=0 > isab0 pnpinfo vendor=0x8086 device=0x3a16 subvendor=0x1043 > subdevice=0x82d4 class=0x060100 at slot=31 function=0 handle=\_SB_.PCI0.SBRG >isa0 > orm0 > Ugh, the dumb driver deletes ports if they don't probe which is rediculous thing for it to do. -- John Baldwin ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On 08/16/2011 13:57, John Baldwin wrote: Hmmm, can you get devinfo -v output? Specifically there should be two children of puc0 and they should have extra data specifying what type of port each child device is. Here is the only reference to puc0 in devinfo -v output: pcib8 pnpinfo vendor=0x8086 device=0x244e subvendor=0x1043 subdevice=0x82d4 class=0x060401 at slot=30 function=0 handle=\_SB_.PCI0.P0P1 pci8 pcm0 pnpinfo vendor=0x1274 device=0x5000 subvendor=0x4942 subdevice=0x4c4c class=0x040100 at slot=0 function=0 puc0 pnpinfo vendor=0x4348 device=0x3253 subvendor=0x4348 subdevice=0x3253 class=0x070002 at slot=1 function=0 isab0 pnpinfo vendor=0x8086 device=0x3a16 subvendor=0x1043 subdevice=0x82d4 class=0x060100 at slot=31 function=0 handle=\_SB_.PCI0.SBRG isa0 orm0 Yuri ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On 08/16/2011 13:37, Xin LI wrote: And I think John's patch is right, I've added a new PCI ID for it though, found from the datasheet. Did you have uart(4) in your kernel (remove my old patch)? Yes, uart(4) is in kernel and puc(4) is the loaded module. I think this might be a problem that puc(4) is a module loaded later and that's why serial device isn't registered. I found the reference to the similar situation with some other card that got cured when puc(4) was compiled into kernel. (http://www.adras.com/Quadtech-DSC-100-PCI-dual-serial-port-on-8-0R-i386.t6999-79.html) I have yet to try building puc(4) into kernel, but the way how I have it now is the default in GENERIC. Should uart(4) instead be removed from kernel and made loadable too to prevent such initialization order issue? Or what would be the right fix? Have too much stuff in kernel isn't right too. uart probably isn't used by 99% of users. Yuri ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On Tuesday, August 16, 2011 3:53:17 pm Yuri wrote: > On 08/16/2011 08:57, John Baldwin wrote: > > For multiport devices you will want to add an entry to sys/dev/puc/pucdata.c > > and use the puc driver instead of patching uart directly. Perhaps this: > > John, > > I did what you suggested: > puc0: port 0xe880-0xe887,0xe800-0xe807 > irq 17 at device 1.0 on pci8 > > But it doesn't show up as a serial device and tty. Hmmm, can you get devinfo -v output? Specifically there should be two children of puc0 and they should have extra data specifying what type of port each child device is. -- John Baldwin ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: debugging frequent kernel panics on 8.2-RELEASE
- Original Message - From: "Andriy Gapon" To: "Steven Hartland" Cc: Sent: Tuesday, August 16, 2011 9:30 PM Subject: Re: debugging frequent kernel panics on 8.2-RELEASE on 15/08/2011 17:56 Steven Hartland said the following: (kgdb) x/512a 0xff8d8f357210 [snip] Can you please also provide the following for this core? list *vm_map_growstack+93 list *lim_cur+17 list *lim_rlimit+18 Also, it would be interesting to get panic output with DDB option. Here's the info:- (kgdb) list *vm_map_growstack+93 0x80543ffd is in vm_map_growstack (/usr/src/sys/vm/vm_map.c:3305). 3300struct uidinfo *uip; 3301 3302Retry: 3303PROC_LOCK(p); 3304stacklim = lim_cur(p, RLIMIT_STACK); 3305vmemlim = lim_cur(p, RLIMIT_VMEM); 3306PROC_UNLOCK(p); 3307 3308vm_map_lock_read(map); 3309 (kgdb) list *lim_cur+17 0x80384681 is in lim_cur (/usr/src/sys/kern/kern_resource.c:1150). 1145rlim_t 1146lim_cur(struct proc *p, int which) 1147{ 1148struct rlimit rl; 1149 1150lim_rlimit(p, which, &rl); 1151return (rl.rlim_cur); 1152} 1153 1154/* (kgdb) list *lim_rlimit+18 0x80384632 is in lim_rlimit (/usr/src/sys/kern/kern_resource.c:1165). 1160{ 1161 1162PROC_LOCK_ASSERT(p, MA_OWNED); 1163KASSERT(which >= 0 && which < RLIM_NLIMITS, 1164("request for invalid resource limit")); 1165*rlp = p->p_limit->pl_rlimit[which]; 1166if (p->p_sysent->sv_fixlimit != NULL) 1167p->p_sysent->sv_fixlimit(rlp, which); 1168} 1169 I've yet to have the machine with DDB + expanded stack panic. I plan to leave it a day or so more then try a reboot to see if that triggers it. If not I'll drop the stack back down to 4 and see if that enables us to get another panic. Regards Steve This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmas...@multiplay.co.uk. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 08/16/11 12:53, Yuri wrote: > On 08/16/2011 08:57, John Baldwin wrote: >> For multiport devices you will want to add an entry to >> sys/dev/puc/pucdata.c and use the puc driver instead of patching >> uart directly. Perhaps this: > > John, > > I did what you suggested: puc0: port > 0xe880-0xe887,0xe800-0xe807 irq 17 at device 1.0 on pci8 > > But it doesn't show up as a serial device and tty. I found a datasheet: http://wch-ic.com/download/down.asp?id=116 (English) and http://winchiphead.com/download/CH352/CH352DS1.PDF (Chinese) And I think John's patch is right, I've added a new PCI ID for it though, found from the datasheet. Did you have uart(4) in your kernel (remove my old patch)? Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJOStUOAAoJEATO+BI/yjfBSw0IANPaoND+0Xa2QtueAxI8Qa42 V86MiUnaZopRb0coiWf8dQNk+nIlayVuFstC9+77zC9NEEu1O7Mp8T4n2Bx2N7WP jtsevUnLJq6lIyo0jYRTf4x84eYd1VDBduHqsWbI0B7aMArgfNtHvPV0qUD9Emrn 4yR6I3/tmO3sX3+cWcggYC4s3DIm7XidiyT/6lcWilsmy2QkQlw00HoAkoKl0V4m DBkKHkmOB2oTUYadpBOKCt6HvdI29xWYF+1zN/sE0B3XwTy+Q1pp4Uq5KiBUyJi3 tNF533Z7COh/mog/Z9cpGpLSRJpWQgI2uCY7gAHZRAMT2+7k1AqkdNPWTJPXoCk= =CcI6 -END PGP SIGNATURE- Index: sys/dev/puc/pucdata.c === --- sys/dev/puc/pucdata.c (revision 224912) +++ sys/dev/puc/pucdata.c (working copy) @@ -862,6 +862,20 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_syba }, + { + 0x4348, 0x3253, 0x4348, 0x3253, + "WinChipHead Dual Port RS-232", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 4, 0, + }, + + { + 0x4348, 0x5053, 0x4348, 0x5053, + "WinChipHead RS-232 and Printer port", + DEFAULT_RCLK, + PUC_PORT_1S1P, 0x10, 4, 0, + }, + { 0x, 0x0001, 0x, 0, "Decision Computer Inc, PCCOM 4-port serial", DEFAULT_RCLK, ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: debugging frequent kernel panics on 8.2-RELEASE
on 15/08/2011 17:56 Steven Hartland said the following: > (kgdb) x/512a 0xff8d8f357210 [snip] Can you please also provide the following for this core? list *vm_map_growstack+93 list *lim_cur+17 list *lim_rlimit+18 Also, it would be interesting to get panic output with DDB option. -- Andriy Gapon ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On 08/16/2011 08:57, John Baldwin wrote: For multiport devices you will want to add an entry to sys/dev/puc/pucdata.c and use the puc driver instead of patching uart directly. Perhaps this: John, I did what you suggested: puc0: port 0xe880-0xe887,0xe800-0xe807 irq 17 at device 1.0 on pci8 But it doesn't show up as a serial device and tty. Yuri ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Upgrade to 7.4
Hi All I just ran freebsd-update to upgrade from 7.0 to 7.4 I figured everything went ok. This is what I did. 1. freebsd-update upgrade -r 7.4-RELEASE 2. freebsd-update install 3. shutdown -r now 4. freebsd-update install 5. shutdown -r now The system came back up ok but now if I run another freebsd-update fetch, I get this error below config_IDSIgnorePaths: not found Error processing configuration file, line 26: ==> IDSIgnorePaths /usr/share/man/cat Is this an error I need to worry about? How can I correct this if so? ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On Tuesday, August 16, 2011 5:25:28 am Yuri wrote: > On 08/16/2011 00:48, Xin LI wrote: > > A wild guess... (You gotta to provide more details rather than just PCI > > IDs). > > > > My guess is that it's using these chips: > > > > http://www.winchiphead.com/product/ch365detail.htm > > http://www.winchiphead.com/product/ch353detail.htm > > > > It didn't talked about possible cards' configuration so I used BAR0, > > which could be 0x14, 0x18, etc. > > Actually, the main chip there is CH352L. Plus there are two more chips > ST75185C, one per COM port. > > Your patch made this pci device to connect to uart driver: uart2@pci0:8:1:0. > > uart2: <16550 or compatible> port 0xe880-0xe887,0xe800-0xe807 irq 17 at > device 1.0 on pci8 > uart2: [FILTER] > > Also new devices showed up: > /dev/cuau2 > /dev/cuau2.init > /dev/cuau2.lock > /dev/ttyu2 > /dev/ttyu2.init > /dev/ttyu2.lock > > cuau2 is probably the same as COM port. I don't have an easy way to > check now. > I believe adding another entry with 0x14 would add the second COM port. For multiport devices you will want to add an entry to sys/dev/puc/pucdata.c and use the puc driver instead of patching uart directly. Perhaps this: Index: pucdata.c === --- pucdata.c (revision 224898) +++ pucdata.c (working copy) @@ -862,6 +862,13 @@ const struct puc_cfg puc_pci_devices[] = { .config_function = puc_config_syba }, + { + 0x4348, 0x3253, 0x, 0, + "WinChipHead Dual Port RS-232", + DEFAULT_RCLK, + PUC_PORT_2S, 0x10, 4, 0, + }, + { 0x, 0x0001, 0x, 0, "Decision Computer Inc, PCCOM 4-port serial", DEFAULT_RCLK, -- John Baldwin ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
On 08/16/2011 00:48, Xin LI wrote: A wild guess... (You gotta to provide more details rather than just PCI IDs). My guess is that it's using these chips: http://www.winchiphead.com/product/ch365detail.htm http://www.winchiphead.com/product/ch353detail.htm It didn't talked about possible cards' configuration so I used BAR0, which could be 0x14, 0x18, etc. Actually, the main chip there is CH352L. Plus there are two more chips ST75185C, one per COM port. Your patch made this pci device to connect to uart driver: uart2@pci0:8:1:0. uart2: <16550 or compatible> port 0xe880-0xe887,0xe800-0xe807 irq 17 at device 1.0 on pci8 uart2: [FILTER] Also new devices showed up: /dev/cuau2 /dev/cuau2.init /dev/cuau2.lock /dev/ttyu2 /dev/ttyu2.init /dev/ttyu2.lock cuau2 is probably the same as COM port. I don't have an easy way to check now. I believe adding another entry with 0x14 would add the second COM port. Thank you! Yuri ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
off
___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: How to use unrecognized COM port card?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 08/15/11 23:21, Yuri wrote: > I have dual COM port pci card: none7@pci0:8:1:0: class=0x070002 > card=0x32534348 chip=0x32534348 rev=0x10 hdr=0x00 class = simple > comms subclass = UART bar [10] = type I/O Port, range 32, base > 0xe880, size 8, enabled bar [14] = type I/O Port, range 32, base > 0xe800, size 8, enabled > > Manufacturer 0x4348 isn't recognized by http://www.pcidatabase.com. > It was purchased from China through ebay. > > How to make it to work in 8.2-STABLE? A wild guess... (You gotta to provide more details rather than just PCI IDs). My guess is that it's using these chips: http://www.winchiphead.com/product/ch365detail.htm http://www.winchiphead.com/product/ch353detail.htm It didn't talked about possible cards' configuration so I used BAR0, which could be 0x14, 0x18, etc. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJOSiC9AAoJEATO+BI/yjfB5oAH/R0yt8Zx3HDVOXA5jUOXzlWl A+XCmbaau4MNhOtiyVJ8sWERE1CukgQeIE7DWze1rJ6YU7bTXKAgoRbqVJsfiAbH CEhLx+Y2T7HLow9ZojCGrqk6ydrGxheWIyf2AM7nTORZQdEUceEWGLE4GMXJghTp Y4udsGfSRqa+1O7tTOpechDi5jtG/cW+dDFeyZqVo0AjfS78D10wEqoiudloIkBd IAEyy7JGCU/R6AM+DhHHm0dIT68MkHxULOpTLy0GxxzJecWruknqd+h+V36Q3X+h brg2isOawCGLhWgzCDXVZXwJWIXA28RaRmDPeZRNv5TKUESmZEenR8lEpH7ji+s= =KUoE -END PGP SIGNATURE- Index: sys/dev/uart/uart_bus_pci.c === --- sys/dev/uart/uart_bus_pci.c (revision 224900) +++ sys/dev/uart/uart_bus_pci.c (working copy) @@ -111,6 +111,7 @@ { 0x1415, 0x950b, 0x, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, { 0x151f, 0x, 0x, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, +{ 0x4348, 0x3253, 0x, 0, "WinChipHead Dual Port RS-232", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"