Skip to contentSkip to conversation

Specialix SX cards not detected in kernels >=2.6.20

DISCUSSION Graham Murray 3 participants 4 messages Jul 9, 2007 – Jul 10, 2007 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

There were multiple changes to the char/sx.c driver in kernel 2.6.20. In kernels 2.6.19 and earlier, the SX multiport serial card works OK, but in 2.6.20 and later the driver does not seemt to detect the presence of the card.

I have enabled sx_debug=-1 and added some printk statements to try and detect why the card is not detected. These show that sx_init is entered and within that function the call to pci_register_driver returns 0. I do not see any other routines in the driver being entered either at startup (when the module is loaded, which indicates that the system recognises the PCI ID) or when running 'modprobe sx'. In particular, sx_pci_probe() is never entered.

lspci -vv for the card

10:01.0 Communication controller: Specialix Research Ltd. PCI_9050

	Subsystem: Specialix Research Ltd. Unknown device 0300
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Interrupt: pin A routed to IRQ 11
	Region 0: Memory at df2ffc00 (32-bit, non-prefetchable) [size=128]
	Region 1: I/O ports at 9c80 [size=128]
	Region 2: Memory at df200000 (32-bit, non-prefetchable) [size=512K]
	Region 3: Memory at df280000 (32-bit, non-prefetchable) [size=256K]

I have enabled CONFIG_PCI_DEBUG and see the following:-

PCI: Probing PCI hardware (bus 00)
...
PCI: Scanning bus 0000:10
PCI: Found 0000:10:01.0 [11cb/2000] 000780 00
PCI: Calling quirk c0362041 for 0000:10:01.0
...
PCI: Calling quirk c027a199 for 0000:10:01.0
PCI: Calling quirk c033cb9e for 0000:10:01.0

Where should I look for and how should I obtain further debug to determine where the problem lies?

#1 lore raw
Quoted 17 lines · Graham Murray

There were multiple changes to the char/sx.c driver in kernel 2.6.20. In kernels 2.6.19 and earlier, the SX multiport serial card works OK, but in 2.6.20 and later the driver does not seemt to detect the presence of the card.

I have enabled sx_debug=-1 and added some printk statements to try and detect why the card is not detected. These show that sx_init is entered and within that function the call to pci_register_driver returns 0. I do not see any other routines in the driver being entered either at startup (when the module is loaded, which indicates that the system recognises the PCI ID) or when running 'modprobe sx'. In particular, sx_pci_probe() is never entered.

lspci -vv for the card

10:01.0 Communication controller: Specialix Research Ltd. PCI_9050
Subsystem: Specialix Research Ltd. Unknown device 0300

[...]

Quoted 2 lines

Where should I look for and how should I obtain further debug to determine where the problem lies?

In switched ids. Could you try the patch below?

--

sx, switch subven and subid values

This is because card is not found.

---
commit fdf11b85b74221d25a3abf38a9ebf947959d0fe1
tree 289b5f58dc2774019ed3f3bedef99344be76d7bc
parent 10d4605a5a9d86c467b78f602ef43067da5d9dfe
author Jiri Slaby <[email protected]> Tue, 10 Jul 2007 09:13:22 +0200 committer Jiri Slaby <[email protected]> Tue, 10 Jul 2007 09:13:22 +0200

 drivers/char/sx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/sx.c +2 -2
index 1da92a6..85a2328 100644
@@ -2721,9 +2721,9 @@ static void __devexit sx_pci_remove(struct pci_dev *pdev)
    its because the standard requires it. So check for SUBVENDOR_ID. */
 static struct pci_device_id sx_pci_tbl[] = {
 	{ PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8,
-		.subvendor = 0x0200,.subdevice = PCI_ANY_ID },
+		.subvendor = PCI_ANY_ID, .subdevice = 0x0200 },
 	{ PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8,
-		.subvendor = 0x0300,.subdevice = PCI_ANY_ID },
+		.subvendor = PCI_ANY_ID, .subdevice = 0x0300 },
 	{ 0 }
 };
 
#2 lore raw
Quoted 1 line · Jiri Slaby

In switched ids. Could you try the patch below?

Thanks. That fixed the problem - the card works again now.

#3 lore raw
In reply to Graham Murray
Quoted 1 line · On Mon, 09 Jul 2007 15:00:17 +0100 Graham Murray <[email protected]>…

There were multiple changes to the char/sx.c driver in kernel 2.6.20.

Let's cc Jiri.

Quoted 37 lines

In
kernels 2.6.19 and earlier, the SX multiport serial card works OK, but in 2.6.20 and later the driver does not seemt to detect the presence of the card.

I have enabled sx_debug=-1 and added some printk statements to try and detect why the card is not detected. These show that sx_init is entered and within that function the call to pci_register_driver returns 0. I do not see any other routines in the driver being entered either at startup (when the module is loaded, which indicates that the system recognises the PCI ID) or when running 'modprobe sx'. In particular, sx_pci_probe() is never entered.

lspci -vv for the card

10:01.0 Communication controller: Specialix Research Ltd. PCI_9050

	Subsystem: Specialix Research Ltd. Unknown device 0300
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
	Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
	Interrupt: pin A routed to IRQ 11
	Region 0: Memory at df2ffc00 (32-bit, non-prefetchable) [size=128]
	Region 1: I/O ports at 9c80 [size=128]
	Region 2: Memory at df200000 (32-bit, non-prefetchable) [size=512K]
	Region 3: Memory at df280000 (32-bit, non-prefetchable) [size=256K]

I have enabled CONFIG_PCI_DEBUG and see the following:-

PCI: Probing PCI hardware (bus 00)
...
PCI: Scanning bus 0000:10
PCI: Found 0000:10:01.0 [11cb/2000] 000780 00
PCI: Calling quirk c0362041 for 0000:10:01.0
...
PCI: Calling quirk c027a199 for 0000:10:01.0
PCI: Calling quirk c033cb9e for 0000:10:01.0

Quoted 3 lines

Where should I look for and how should I obtain further debug to determine where the problem lies?

A git-bisect should find this fairly quickly.