linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* OXuPCI952 and baud_base questions
@ 2010-12-01 16:46 Matthias Reichl
  2010-12-01 22:16 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Reichl @ 2010-12-01 16:46 UTC (permalink / raw)
  To: Linux Kernel

I've got a Lindy 51237 multi I/O card (2 16C950 URATs up to 921kbit
plus one parallel port) with a Oxford OXuPCI952 chip (PCI vendor
ID 0x1415, device ID 0x9505).

http://www.lindy-international.com/2-port-rs-232-serial-1-port-parallel-card-pci/51237.html
http://www.plxtech.com/products/uart/oxupci952

Kernel 2.6.36.1 doesn't contain any device-specific configuration,
the "guess code" detects both UARTs at BAR0 and BAR1,
but with the wrong baudrate (default of 115200 instead of
921600 needed for this card).

The card doesn't report any specific (sub-) vendor/device IDs but
the generic Oxford IDs. So adding an entry to the pci_device_id
table with a pbn_b0_bt_2_921600 config might break some prior
working setups (OXuPCI952 with baud_base=115200).

Do you have any policy how to cope with such situations?

so long,

Hias

lspic -vvvn output:

05:00.0 0700: 1415:9505 (rev 01) (prog-if 06 [16950])
	Subsystem: 1415:0000
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 20
	Region 0: I/O ports at d000 [size=8]
	Region 1: I/O ports at d100 [size=8]
	Region 2: I/O ports at d200 [size=8]
	Region 3: I/O ports at d300 [size=8]
	Region 4: I/O ports at d400 [size=32]
	Region 5: Memory at ea100000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] Power Management version 2
		Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA PME(D0+,D1-,D2+,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: serial

05:00.1 0701: 1415:9513 (rev 01) (prog-if 01 [BiDir])
	Subsystem: 1415:0000
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Interrupt: pin A routed to IRQ 20
	Region 0: I/O ports at d500 [size=8]
	Region 1: I/O ports at d600 [size=8]
	Region 2: I/O ports at d700 [size=32]
	Region 3: Memory at ea101000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] Power Management version 2
		Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA PME(D0+,D1-,D2+,D3hot+,D3cold-)
		Status: D0 PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: parport_pc
	Kernel modules: parport_pc

possible patch against 2.6.36.1:

--- linux-2.6.36.1-orig/drivers/serial/8250_pci.c	2010-10-20 22:30:22.000000000 +0200
+++ linux-2.6.36.1/drivers/serial/8250_pci.c	2010-12-01 16:52:28.000000000 +0100
@@ -995,6 +995,7 @@
 #define PCI_DEVICE_ID_TITAN_200EI	0xA016
 #define PCI_DEVICE_ID_TITAN_200EISI	0xA017
 #define PCI_DEVICE_ID_OXSEMI_16PCI958	0x9538
+#define PCI_DEVICE_ID_OXSEMI_UPCI952	0x9505
 
 /* Unknown vendors/cards - this should not be in linux/pci_ids.h */
 #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584	0x1584
@@ -3762,6 +3763,13 @@
 		0, 0, pbn_b0_bt_4_115200 },
 
 	/*
+	 * Lindy 51237 PCI Multi I/O card using OXuPCI952
+	 */
+	{	PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_UPCI952,
+		PCI_ANY_ID , PCI_ANY_ID,
+		0, 0, pbn_b0_bt_2_921600 },
+
+	/*
 	 * These entries match devices with class COMMUNICATION_SERIAL,
 	 * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL
 	 */

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OXuPCI952 and baud_base questions
  2010-12-01 16:46 OXuPCI952 and baud_base questions Matthias Reichl
@ 2010-12-01 22:16 ` Greg KH
  2010-12-01 23:52   ` Matthias Reichl
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2010-12-01 22:16 UTC (permalink / raw)
  To: Matthias Reichl, Linux Kernel

On Wed, Dec 01, 2010 at 05:46:34PM +0100, Matthias Reichl wrote:
> I've got a Lindy 51237 multi I/O card (2 16C950 URATs up to 921kbit
> plus one parallel port) with a Oxford OXuPCI952 chip (PCI vendor
> ID 0x1415, device ID 0x9505).
> 
> http://www.lindy-international.com/2-port-rs-232-serial-1-port-parallel-card-pci/51237.html
> http://www.plxtech.com/products/uart/oxupci952
> 
> Kernel 2.6.36.1 doesn't contain any device-specific configuration,
> the "guess code" detects both UARTs at BAR0 and BAR1,
> but with the wrong baudrate (default of 115200 instead of
> 921600 needed for this card).
> 
> The card doesn't report any specific (sub-) vendor/device IDs but
> the generic Oxford IDs. So adding an entry to the pci_device_id
> table with a pbn_b0_bt_2_921600 config might break some prior
> working setups (OXuPCI952 with baud_base=115200).
> 
> Do you have any policy how to cope with such situations?

Always set the baud rate to a valid one before using the tty port?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OXuPCI952 and baud_base questions
  2010-12-01 22:16 ` Greg KH
@ 2010-12-01 23:52   ` Matthias Reichl
  2010-12-01 23:57     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Matthias Reichl @ 2010-12-01 23:52 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux Kernel

Hi Greg!

On Wed, Dec 01, 2010 at 02:16:04PM -0800, Greg KH wrote:
> On Wed, Dec 01, 2010 at 05:46:34PM +0100, Matthias Reichl wrote:
> > I've got a Lindy 51237 multi I/O card (2 16C950 URATs up to 921kbit
> > plus one parallel port) with a Oxford OXuPCI952 chip (PCI vendor
> > ID 0x1415, device ID 0x9505).
> > 
> > http://www.lindy-international.com/2-port-rs-232-serial-1-port-parallel-card-pci/51237.html
> > http://www.plxtech.com/products/uart/oxupci952
> > 
> > Kernel 2.6.36.1 doesn't contain any device-specific configuration,
> > the "guess code" detects both UARTs at BAR0 and BAR1,
> > but with the wrong baudrate (default of 115200 instead of
> > 921600 needed for this card).
> > 
> > The card doesn't report any specific (sub-) vendor/device IDs but
> > the generic Oxford IDs. So adding an entry to the pci_device_id
> > table with a pbn_b0_bt_2_921600 config might break some prior
> > working setups (OXuPCI952 with baud_base=115200).
> > 
> > Do you have any policy how to cope with such situations?
> 
> Always set the baud rate to a valid one before using the tty port?

Sorry, I meant baud_base (or base_baud in 8250_pci.c), not baudrate :-(

Since the baud_base is differing (115200 instead of 921600)
setting a baudrate of X results in an actual baudrate of X*8 for
this card.

It's no problem for me to do a "setserial ... baud_base=921600"
or pass a module/kernel parameter to circumvent the problem,
but it sure would be nicer if the kernel would have set
the baud_base correctly.

The problem I'm seeing here is that this card is using a stock
OXuPCI952, which can be equipped with any oscillator, and doesn't
report any vendor-specific PCI IDs that lets it be distinguished
from other stock OXuPCI952 cards - otherwise I've just sent
a "[PATCH] Add support for Lindy 51237" to set baud_base=921600
for this specific card.

Personally, all 16C950 (compatible) cards I've bought so far
were capable of a max. 921kbit/sec (and thus had a baud_base of 921600).
So the current default of 115200 doesn't quite match my setup.
If I only need a card capable of 115200 bit/sec I usually buy
a standard 16550 card (not a 16C950).

So, my question is: would you include a patch in the kernel
to change the default baud_base from 115200 to 921600 for
the OXuPCI952 chip (1415:9505)?

so long,

Hias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OXuPCI952 and baud_base questions
  2010-12-01 23:52   ` Matthias Reichl
@ 2010-12-01 23:57     ` Greg KH
  2010-12-02  0:25       ` Matthias Reichl
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2010-12-01 23:57 UTC (permalink / raw)
  To: Matthias Reichl, Linux Kernel

On Thu, Dec 02, 2010 at 12:52:41AM +0100, Matthias Reichl wrote:
> Hi Greg!
> 
> On Wed, Dec 01, 2010 at 02:16:04PM -0800, Greg KH wrote:
> > On Wed, Dec 01, 2010 at 05:46:34PM +0100, Matthias Reichl wrote:
> > > I've got a Lindy 51237 multi I/O card (2 16C950 URATs up to 921kbit
> > > plus one parallel port) with a Oxford OXuPCI952 chip (PCI vendor
> > > ID 0x1415, device ID 0x9505).
> > > 
> > > http://www.lindy-international.com/2-port-rs-232-serial-1-port-parallel-card-pci/51237.html
> > > http://www.plxtech.com/products/uart/oxupci952
> > > 
> > > Kernel 2.6.36.1 doesn't contain any device-specific configuration,
> > > the "guess code" detects both UARTs at BAR0 and BAR1,
> > > but with the wrong baudrate (default of 115200 instead of
> > > 921600 needed for this card).
> > > 
> > > The card doesn't report any specific (sub-) vendor/device IDs but
> > > the generic Oxford IDs. So adding an entry to the pci_device_id
> > > table with a pbn_b0_bt_2_921600 config might break some prior
> > > working setups (OXuPCI952 with baud_base=115200).
> > > 
> > > Do you have any policy how to cope with such situations?
> > 
> > Always set the baud rate to a valid one before using the tty port?
> 
> Sorry, I meant baud_base (or base_baud in 8250_pci.c), not baudrate :-(
> 
> Since the baud_base is differing (115200 instead of 921600)
> setting a baudrate of X results in an actual baudrate of X*8 for
> this card.
> 
> It's no problem for me to do a "setserial ... baud_base=921600"
> or pass a module/kernel parameter to circumvent the problem,
> but it sure would be nicer if the kernel would have set
> the baud_base correctly.
> 
> The problem I'm seeing here is that this card is using a stock
> OXuPCI952, which can be equipped with any oscillator, and doesn't
> report any vendor-specific PCI IDs that lets it be distinguished
> from other stock OXuPCI952 cards - otherwise I've just sent
> a "[PATCH] Add support for Lindy 51237" to set baud_base=921600
> for this specific card.
> 
> Personally, all 16C950 (compatible) cards I've bought so far
> were capable of a max. 921kbit/sec (and thus had a baud_base of 921600).
> So the current default of 115200 doesn't quite match my setup.
> If I only need a card capable of 115200 bit/sec I usually buy
> a standard 16550 card (not a 16C950).
> 
> So, my question is: would you include a patch in the kernel
> to change the default baud_base from 115200 to 921600 for
> the OXuPCI952 chip (1415:9505)?

As it sounds like this might break existing setups, I'd probably defer
to not taking such a patch.

sorry,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OXuPCI952 and baud_base questions
  2010-12-01 23:57     ` Greg KH
@ 2010-12-02  0:25       ` Matthias Reichl
  0 siblings, 0 replies; 5+ messages in thread
From: Matthias Reichl @ 2010-12-02  0:25 UTC (permalink / raw)
  To: Greg KH; +Cc: Linux Kernel

On Wed, Dec 01, 2010 at 03:57:22PM -0800, Greg KH wrote:
> On Thu, Dec 02, 2010 at 12:52:41AM +0100, Matthias Reichl wrote:
> > Hi Greg!
> > 
> > On Wed, Dec 01, 2010 at 02:16:04PM -0800, Greg KH wrote:
> > > On Wed, Dec 01, 2010 at 05:46:34PM +0100, Matthias Reichl wrote:
> > > > I've got a Lindy 51237 multi I/O card (2 16C950 URATs up to 921kbit
> > > > plus one parallel port) with a Oxford OXuPCI952 chip (PCI vendor
> > > > ID 0x1415, device ID 0x9505).
> > > > 
> > > > http://www.lindy-international.com/2-port-rs-232-serial-1-port-parallel-card-pci/51237.html
> > > > http://www.plxtech.com/products/uart/oxupci952
> > > > 
> > > > Kernel 2.6.36.1 doesn't contain any device-specific configuration,
> > > > the "guess code" detects both UARTs at BAR0 and BAR1,
> > > > but with the wrong baudrate (default of 115200 instead of
> > > > 921600 needed for this card).
> > > > 
> > > > The card doesn't report any specific (sub-) vendor/device IDs but
> > > > the generic Oxford IDs. So adding an entry to the pci_device_id
> > > > table with a pbn_b0_bt_2_921600 config might break some prior
> > > > working setups (OXuPCI952 with baud_base=115200).
> > > > 
> > > > Do you have any policy how to cope with such situations?
> > > 
> > > Always set the baud rate to a valid one before using the tty port?
> > 
> > Sorry, I meant baud_base (or base_baud in 8250_pci.c), not baudrate :-(
> > 
> > Since the baud_base is differing (115200 instead of 921600)
> > setting a baudrate of X results in an actual baudrate of X*8 for
> > this card.
> > 
> > It's no problem for me to do a "setserial ... baud_base=921600"
> > or pass a module/kernel parameter to circumvent the problem,
> > but it sure would be nicer if the kernel would have set
> > the baud_base correctly.
> > 
> > The problem I'm seeing here is that this card is using a stock
> > OXuPCI952, which can be equipped with any oscillator, and doesn't
> > report any vendor-specific PCI IDs that lets it be distinguished
> > from other stock OXuPCI952 cards - otherwise I've just sent
> > a "[PATCH] Add support for Lindy 51237" to set baud_base=921600
> > for this specific card.
> > 
> > Personally, all 16C950 (compatible) cards I've bought so far
> > were capable of a max. 921kbit/sec (and thus had a baud_base of 921600).
> > So the current default of 115200 doesn't quite match my setup.
> > If I only need a card capable of 115200 bit/sec I usually buy
> > a standard 16550 card (not a 16C950).
> > 
> > So, my question is: would you include a patch in the kernel
> > to change the default baud_base from 115200 to 921600 for
> > the OXuPCI952 chip (1415:9505)?
> 
> As it sounds like this might break existing setups, I'd probably defer
> to not taking such a patch.
> 
> sorry,

No problem, I'd have decided the same way.

so long & thanks for your reply,

Hias

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-02  0:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01 16:46 OXuPCI952 and baud_base questions Matthias Reichl
2010-12-01 22:16 ` Greg KH
2010-12-01 23:52   ` Matthias Reichl
2010-12-01 23:57     ` Greg KH
2010-12-02  0:25       ` Matthias Reichl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).