Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 May 2011 11:25:14 +0200
From:      Willy Offermans <Willy@Offermans.Rompen.nl>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Willy@offermans.rompen.nl, Marcel Moolenaar <marcel@freebsd.org>, freebsd-stable@freebsd.org, freebsd-hardware@freebsd.org, Mike Tancsa <mike@sentex.net>
Subject:   Re: modem support MT9234ZPX-PCIE-NV
Message-ID:  <20110530092514.GB4558@vpn.offrom.nl>
In-Reply-To: <201105271043.34268.jhb@freebsd.org>
References:  <20110521092037.GB3271@vpn.offrom.nl> <201105270805.56457.jhb@freebsd.org> <20110527143802.GA5352@vpn.offrom.nl> <201105271043.34268.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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

Hello John,

After inserting the magic line into uart_bus_pci.c, things start to be
really good. Minicom is now able to communicate with the device in a proper
way. Hereafter you can see some response from the modem.

<snip>
AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0                     
OK                                                   
at                                                   
OK
ati
Agere OCM V.92 MT9234ZPX-PCIE Internal Data/Fax/Voice Modem Version 1.02d

OK
at&F
OK
atdt0,0455444944
NO DIALTONE
</snip>

Of course there is no dialtone, since the telephone line is not connected
yet. I will ask the people on the remote site to connect the line as soon
as possible.

The status of HylaFAX is also as expected:

kosmos# faxstat
HylaFAX scheduler on localhost: Running
Modem cuau0 (+31455667077): Running and idle

As soon as the line is established and as soon as I have established a
proper setup with HylaFAX and performed some tests, I will report about the
results again.

I would like to thank you for your support so far. It was of great help and
without it I would certainly not have succeed. However, since it does not 
seem to be so difficult, it would be wise to put the setup into
http://www.freebsd.org/doc/handbook/serial.html. Other users would benefit
from it. 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.


-- 
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,

Willy

*************************************
 W.K. Offermans
Home:   +31 45 544 49 44
Mobile: +31 681 15 87 68
e-mail: Willy@Offermans.Rompen.nl



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110530092514.GB4558>