Skip to contentSkip to conversation

OXuPCI952 and baud_base questions

PATCH Matthias Reichl 2 participants 5 messages Dec 1, 2010 – Dec 2, 2010 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

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:

drivers/serial/8250_pci.c +8 -0
@@ -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
 	 */
#1 lore raw
Quoted 12 lines · Matthias Reichl

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).

Quoted 6 lines

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

#2 lore raw

Hi Greg!

Quoted 13 lines · Greg KH
Quoted 12 lines · Matthias Reichl

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).

Quoted 8 lines
Quoted 6 lines

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

#3 lore raw
Quoted 49 lines · Matthias Reichl

Hi Greg!

Quoted 13 lines · Greg KH
Quoted 12 lines · Matthias Reichl

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).

Quoted 8 lines
Quoted 6 lines

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).

Quoted 3 lines

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

#4 lore raw
Quoted 50 lines · Greg KH
Quoted 49 lines · Matthias Reichl

Hi Greg!

Quoted 13 lines · Greg KH
Quoted 12 lines · Matthias Reichl

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).

Quoted 8 lines
Quoted 6 lines

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).

Quoted 8 lines
Quoted 3 lines

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