xen: Automatically find serial port on PCI/PCIe and AMT devices
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Konrad Rzeszutek Wilk 07/07/11 6:36 PM >>>
Quoted 3 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
+ bar0 =
pci_conf_read32(b, d, f,PCI_BASE_ADDRESS_0);
Quoted 8 lines
Quoted 5 lines
Why would a serial port only be allowed to be on the port specified with BAR0? E.g. if you have a serial card with multiple ports, multiple BARs could be candidates.
Also, why would the first one found be it?
Because that is usually COM1. You can still do com1=115200,8n1,magic com2=115200,8n1,0xd900,0 to have both of them available.
But the handling here is being called for com1= and com2= equally. For something not just for somebody's special purposes, the index from the calling function should minimally be passed (and the BAR to look at adjusted accordingly).
Also I wonder why the token is "magic" rather than, say, "pci".
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 11 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Konrad Rzeszutek Wilk 07/07/11 6:36 PM >>>
Quoted 8 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · Konrad Rzeszutek Wilk
+ bar0 =
pci_conf_read32(b, d, f,PCI_BASE_ADDRESS_0);Why would a serial port only be allowed to be on the port specified with BAR0? E.g. if you have a serial card with multiple ports, multiple BARs could be candidates.
Also, why would the first one found be it?
Quoted 7 lines
Quoted 2 lines
Because that is usually COM1. You can still do com1=115200,8n1,magic com2=115200,8n1,0xd900,0 to have both of them available.
But the handling here is being called for com1= and com2= equally. For something not just for somebody's special purposes, the index from the calling function should minimally be passed (and the BAR to look at adjusted accordingly).
<nods> Will prep a patch.
Quoted 2 lines
Also I wonder why the token is "magic" rather than, say, "pci".
No idea, but 'pci' sounds much better. Will prep up a patch for that.
Quoted 3 lines
Jan