Dear John and FreeBSD friends,

On Tue, May 31, 2011 at 11:01:23AM -0400, John Baldwin wrote:
> On Monday, May 30, 2011 5:25:14 am Willy Offermans wrote:
> > Hello John and FreeBSD friends,
> > 
> > On Fri, May 27, 2011 at 10:43:34AM -0400, John Baldwin wrote:
> > > On Friday, May 27, 2011 10:38:02 am Willy Offermans wrote:
> > > > Dear John and FreeBSD friends,
> > > > 
> > > > On Fri, May 27, 2011 at 08:05:56AM -0400, John Baldwin wrote:
> > > > > On Thursday, May 26, 2011 4:58:37 pm Mike Tancsa wrote:
> > > > > > On 5/26/2011 4:12 PM, John Baldwin wrote:
> > > > > > > 
> > > > > > > Hmm, can you get 'pciconf -lb' output?
> > > > > > > 
> > > > > > > Hmm, wow, I wonder how uart(4) works at all.  It tries to reuse 
> > > > > > > it's softc
> > > > > > > structure in uart_bus_attach() that was setup in 
> > > > > > > uart_bus_probe().  Since 
> > > > > it
> > > > > > > doesn't return 0 from its probe routine, that is forbidden.   I 
> > > > > > > guess it
> > > > > > > accidentally works because of the hack where we call 
> > > > > > > DEVICE_PROBE() again
> > > > > > > to make sure the device description is correct.
> > > > > > 
> > > > > > 
> > > > > > I think this is a similar card.  Had it laying about for a while and
> > > > > > popped it in.  cu -l to it, attaches, but I am not able to interact 
> > > > > > with it.
> > > > > > 
> > > > > > none3@pci0:5:0:0:       class=0x070002 card=0x20282205 
> > > > > > chip=0x015213a8
> > > > > > rev=0x02 hdr=0x00
> > > > > >     vendor     = 'Exar Corp.'
> > > > > >     device     = 'XR17C/D152 Dual PCI UART'
> > > > > >     class      = simple comms
> > > > > >     subclass   = UART
> > > > > >     bar   [10] = type Memory, range 32, base 0xe8950000, size 1024, 
> > > > > > enabled
> > > > > > 
> > > > > > 
> > > > > > NetBSD supposedly has support for this card
> > > > > 
> > > > > Oh, hmm, looks like the clock has an unusual multiplier.  Does it 
> > > > > work if you
> > > > > use 'cu -l -s 1200' to talk at 9600 for example?  (In general use 
> > > > > speed / 8
> > > > > as the speed to '-s'.)
> > > > > 
> > > > > Also, is your card a modem or a dual-port card?
> > > > > 
> > > > > -- 
> > > > > John Baldwin
> > > > 
> > > > It is a modem.
> > > > 
> > > > As suggested:
> > > > 
> > > > kosmos# cu -l /dev/cuau0 -s 1200
> > > > Stale lock on cuau0 PID=3642... overriding.
> > > > Connected
> > > > at&F
> > > > OK
> > > > atdt0045*******
> > > > NO DIALTONE
> > > 
> > > Ok, try this updated patch.  After this you should be able to use the 
> > > correct
> > > speed:
> > > 
> > > Index: uart_bus_pci.c
> > > ===================================================================
> > > --- uart_bus_pci.c        (revision 222285)
> > > +++ uart_bus_pci.c        (working copy)
> > > @@ -110,6 +110,8 @@ static struct pci_id pci_ns8250_ids[] = {
> > >  { 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 
> > > UART",
> > >   0x10, 16384000 },
> > >  { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 
> > > },
> > > +{ 0x13a8, 0x0152, 0x2205, 0x2026, "MultiTech MultiModem ZPX", 0x10,
> > > + 8 * DEFAULT_RCLK },
> > >  { 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 },
> > > 
> > > -- 
> > > John Baldwin
> > 
> > The structure you have provided in your magic line would also need
> > some explanation. The data concerns the description of the chip and the
> > card I guess and can be gained by `pciconf -lv` 
> > 
> > uart0@pci0:6:0:0: class=0x070002 card=0x20262205 chip=0x015213a8 rev=0x02 
> > hdr=0x00
> >     vendor     = 'Exar Corp.'
> >     device     = 'XR17C/D152 Dual PCI UART'
> >     class      = simple comms
> >     subclass   = UART
> > 
> > 
> > A more detailed explanation would not harm. The data 0x10 and 
> > 8 * DEFAULT_RCLK are still totally miraculous to me.
> 
> 0x10 is the resource id for the first PCI BAR (rids for PCI device resources
> use the offset in PCI config space of the associated BAR).  It would perhaps
> be more obvious if uart(4) and puc(4) used PCIR_BAR(0) rather than 0x10.
> Bumping the clock by a multiple of 8 was based on looking at the change in
> NetBSD that Mike Tancsa pointed to and that you verified by noting that
> 'cu -s 1200' connected at 9600 (9600 / 1200 == 8).
> 
> One question though, would you be able to test the patch for puc(4) that I
> sent to Mike Tancsa to see if your modem works with puc(4)?  The puc(4)
> patch is more general and if it works fine for your modem I'd rather just
> commit that.
> 
> -- 
> John Baldwin

I have applied the suggested patch.

The outcome was a new /usr/src/sys/dev/puc/pucdata.c file, which I have
enclosed.

Upon compiling the new kernel, I encountered the following error:

cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall 
-Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes 
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign 
-fformat-extensions -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq 
-D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common 
-finline-limit=8000 --param inline-unit-growth=100 --param 
large-function-growth=1000  -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse 
-mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables 
-ffreestanding -Werror /usr/src/sys/dev/puc/pucdata.c
cc1: warnings being treated as errors
/usr/src/sys/dev/puc/pucdata.c:535: warning: overflow in implicit constant
conversion
/usr/src/sys/dev/puc/pucdata.c:541: warning: overflow in implicit constant
conversion
/usr/src/sys/dev/puc/pucdata.c:547: warning: overflow in implicit constant
conversion
*** Error code 1

Stop in /usr/obj/usr/src/sys/KOSMOS.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

I guess, I was not lucky. Did I miss something?

``cc1: warnings being treated as errors'' might also be released.




-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,

Willy

*************************************
Dr. W.K. Offermans
CAT Postdoctoral Fellow
CAT Catalytic Center
Institut f�r Technische und Makromolekulare Chemie
RWTH Aachen
Worringerweg 1, Raum 38C-150
D-52074 Aachen, Germany
Phone:  +49 241 80 28592
Fax:    +49 241 80 22593
Home:   +31 45 544 49 44
Mobile: +31 681 15 87 68
e-mail: wi...@offermans.rompen.nl
e-mail: willy.offerm...@catalyticcenter.rwth-aachen.de

                                       Powered by ....

                                            (__)
                                         \\\'',)
                                           \/  \ ^
                                           .\._/_)

                                       www.FreeBSD.org
_______________________________________________
freebsd-hardware@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "freebsd-hardware-unsubscr...@freebsd.org"

Reply via email to