[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re 6ab1e4a932 ("serial: Seperate the PCI device ids and parameters (v1)")



On Wed, Nov 11, 2015 at 07:29:41AM -0700, Jan Beulich wrote:
> Konrad,
> 
> in that change you give bar_idx a second purpose: Originally it was
> what its name say - an index into the BARs of the device. In that
> change, however, you also use it to index into an individual BAR.
> IOW right now we can use
> - BAR0 + first_offset
> - BAR1 + uart_offset + first_offset
> - BAR2+ 2*uart_offset + first_offset
> etc, which doesn't seem to be what we want. But of course I may
> be overlooking something, assuming you tested the 2nd port of a
> 2-port Oxford card (the only one having .max_bars > 1).

Looking at the card and the machine the serial cable is attached to
COM1, and I *think* I would have tested COM2 since it was such an
unusual card. But that was years ago..

Here is what the lspci tells me:
-bash-4.1# lspci -s 01:00.0 -v
01:00.0 Serial controller: Oxford Semiconductor Ltd Device c158 (prog-if 02 
[16550])
        Subsystem: Oxford Semiconductor Ltd Device c158
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at fe000000 (32-bit, non-prefetchable) [size=16K]
        Memory at fde00000 (32-bit, non-prefetchable) [size=2M]
        Memory at fdc00000 (32-bit, non-prefetchable) [size=2M]
        Capabilities: [40] Power Management version 3
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [b0] MSI-X: Enable- Count=16 Masked-
        Capabilities: [100] Device Serial Number 00-30-e0-11-11-00-01-50
        Capabilities: [110] Power Budgeting <?>
        Kernel driver in use: serial

-bash-4.1# dmesg | grep tty
[    9.507453] ttyS0: detected caps 00000700 should be 00000500
[    9.507466] 0000:01:00.0: ttyS0 at MMIO 0xfe001000 (irq = 16, base_baud = 
4000000) is a 16C950/954
[    9.509614] ttyS1: detected caps 00000700 should be 00000500
[    9.509626] 0000:01:00.0: ttyS1 at MMIO 0xfe001200 (irq = 16, base_baud = 
4000000) is a 16C950/954
[    9.959747] tty ptyq8: hash matches


> 
> I'm asking in the context of wanting to enable a card I have in a
> new box of mine. While a single port one, it has 2-, 4-, and 8-port
> siblings, with each port using the same (IO) BAR. Just like Linux
> we'd need a flag indicating whether only BAR0 is to be used,
> giving bar_idx back the meaning it had originally, and introducing
> a more generic idx which (depending on the flag) means either.

/me nods.

> But I'd need to know which value to give the flag for that 2-port
> card. (And I'd hope you're still in possession of the card, so that
> I could later ask you to test the resulting patch there.)

Of course. Not this week - next week I can muck in the lab.
> 
> At the same time I noticed that the size check can't be quite right
> in the MMIO path: It doesn't account for {first,uart}_offset. If
> you agree, I could fix this along with the generalization of the
> current logic to cover both MMIO and IO cases.
> 
> Jan
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.