Skip to contentSkip to conversation

IXXAT-PCI-CAN driver hijacks my pci board

Xenomai-help Stefan Kisdaroczi 4 participants 11 messages May 5, 2009 – May 25, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

my pci board has the same pci-interface-chip as the IXXAT-PCI board. The vendor and device id's are identical, but the subsys id is different.

The documentation for my board says that it is essential to check all ID values, because vendor and device id are standard values for the pci-interface-chip.

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

The following patch fixed it for me (my own driver loads again). However, i could not check if it still detects the CAN board, as i dont have one.

Thanks
kisda

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +1 -1
@@ -73,7 +73,7 @@
 #define IXXAT_BASE_PORT_SIZE 0x0400
 
 static struct pci_device_id ixxat_pci_tbl[] = {
-	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, IXXAT_PCI_VENDOR_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},
 	{ }
 };
 MODULE_DEVICE_TABLE (pci, ixxat_pci_tbl);
#1 lore raw

It looks like this patch is still pending an ack/nak. Wolfgang, any comment on this? TIA,

Quoted 39 lines · Stefan Kisdaroczi

Hi,

my pci board has the same pci-interface-chip as the IXXAT-PCI board. The vendor and device id's are identical, but the subsys id is different.

The documentation for my board says that it is essential to check all ID values, because vendor and device id are standard values for the pci-interface-chip.

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

The following patch fixed it for me (my own driver loads again). However, i could not check if it still detects the CAN board, as i dont have one.

Thanks
kisda

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +1 -1
@@ -73,7 +73,7 @@
 #define IXXAT_BASE_PORT_SIZE 0x0400
 
 static struct pci_device_id ixxat_pci_tbl[] = {
-	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, IXXAT_PCI_VENDOR_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},
 	{ }
 };
 MODULE_DEVICE_TABLE (pci, ixxat_pci_tbl);

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Signature · 1 line
Philippe.
#2 lore raw

Hi Philippe,

Quoted 2 lines · Philippe Gerum

It looks like this patch is still pending an ack/nak. Wolfgang, any comment on this? TIA,

FIFO overrun, sorry.

Quoted 9 lines · Stefan Kisdaroczi
Quoted 8 lines

Hi,

my pci board has the same pci-interface-chip as the IXXAT-PCI board. The vendor and device id's are identical, but the subsys id is different.

The documentation for my board says that it is essential to check all ID values, because vendor and device id are standard values for the pci-interface-chip.

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

... obviously it does not probe again.

Quoted 15 lines
Quoted 15 lines

However, i could not check if it still detects the CAN board, as i dont have one.

Thanks
kisda

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +0 -0
@@ -73,7 +73,7 @@
 #define IXXAT_BASE_PORT_SIZE 0x0400
 
Quoted 6 lines

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c line 79

Quoted 6 lines
ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +1 -1
 static struct pci_device_id ixxat_pci_tbl[] = {
-	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, IXXAT_PCI_VENDOR_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},
 	{ }
 };
 MODULE_DEVICE_TABLE (pci, ixxat_pci_tbl);

I don't have a IXXAT CAN card to check if the sub-vendor id is really IXXAT_PCI_VENDOR_ID. Does

{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},

work as well? A work-around would be to disable the IXXAT-PCI driver in the kernel config.

Wolfgang.

#3 lore raw
Quoted 60 lines · Wolfgang Grandegger

Hi Philippe,

Quoted 2 lines · Philippe Gerum

It looks like this patch is still pending an ack/nak. Wolfgang, any comment on this? TIA,

FIFO overrun, sorry.

Quoted 9 lines · Stefan Kisdaroczi
Quoted 8 lines

Hi,

my pci board has the same pci-interface-chip as the IXXAT-PCI board. The vendor and device id's are identical, but the subsys id is different.

The documentation for my board says that it is essential to check all ID values, because vendor and device id are standard values for the pci-interface-chip.

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

... obviously it does not probe again.

Quoted 14 lines
Quoted 14 lines

However, i could not check if it still detects the CAN board, as i dont have one.

Thanks
kisda

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +0 -0
@@ -73,7 +73,7 @@
 #define IXXAT_BASE_PORT_SIZE 0x0400
 
Quoted 6 lines

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c line 79

Quoted 6 lines
ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +1 -1
 static struct pci_device_id ixxat_pci_tbl[] = {
-	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, IXXAT_PCI_VENDOR_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},
 	{ }
 };
 MODULE_DEVICE_TABLE (pci, ixxat_pci_tbl);

I don't have a IXXAT CAN card to check if the sub-vendor id is really IXXAT_PCI_VENDOR_ID. Does

Quoted 3 lines

{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},

work as well? A work-around would be to disable the IXXAT-PCI driver in the kernel config.

I just found a lspci output for an IXXAT card and Stefan's patch should
work fine. Are you going to apply it or should I take care?

Thanks,

Wolfgang.

#4 lore raw
Quoted 61 lines · Wolfgang Grandegger
Quoted 60 lines · Wolfgang Grandegger

Hi Philippe,

Quoted 2 lines · Philippe Gerum

It looks like this patch is still pending an ack/nak. Wolfgang, any comment on this? TIA,

FIFO overrun, sorry.

Quoted 9 lines · Stefan Kisdaroczi
Quoted 8 lines

Hi,

my pci board has the same pci-interface-chip as the IXXAT-PCI board. The vendor and device id's are identical, but the subsys id is different.

The documentation for my board says that it is essential to check all ID values, because vendor and device id are standard values for the pci-interface-chip.

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

... obviously it does not probe again.

Quoted 14 lines
Quoted 14 lines

However, i could not check if it still detects the CAN board, as i dont have one.

Thanks
kisda

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +0 -0
@@ -73,7 +73,7 @@
 #define IXXAT_BASE_PORT_SIZE 0x0400
 
Quoted 6 lines

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c line 79

Quoted 6 lines
ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +1 -1
 static struct pci_device_id ixxat_pci_tbl[] = {
-	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, IXXAT_PCI_VENDOR_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},
 	{ }
 };
 MODULE_DEVICE_TABLE (pci, ixxat_pci_tbl);

I don't have a IXXAT CAN card to check if the sub-vendor id is really IXXAT_PCI_VENDOR_ID. Does

Quoted 7 lines
Quoted 3 lines

{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},

work as well? A work-around would be to disable the IXXAT-PCI driver in the kernel config.

I just found a lspci output for an IXXAT card and Stefan's patch should
work fine. Are you going to apply it or should I take care?

It's in my queue already, so I can commit directly. Thanks,

Quoted 3 lines

Thanks,

Wolfgang.

Signature · 1 line
Philippe.
#5 lore raw

Hi Philipe,

Quoted 57 lines · Philippe Gerum
Quoted 56 lines · Wolfgang Grandegger
Quoted 55 lines · Wolfgang Grandegger

Hi Philippe,

Quoted 2 lines · Philippe Gerum

It looks like this patch is still pending an ack/nak. Wolfgang, any comment on this? TIA,

FIFO overrun, sorry.

Quoted 9 lines · Stefan Kisdaroczi
Quoted 8 lines

Hi,

my pci board has the same pci-interface-chip as the IXXAT-PCI board. The vendor and device id's are identical, but the subsys id is different.

The documentation for my board says that it is essential to check all ID values, because vendor and device id are standard values for the pci-interface-chip.

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

... obviously it does not probe again.

Quoted 13 lines
Quoted 13 lines

However, i could not check if it still detects the CAN board, as i dont have one.

Thanks
kisda

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +0 -0
@@ -73,7 +73,7 @@
 #define IXXAT_BASE_PORT_SIZE 0x0400
 
Quoted 6 lines

ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c line 79

Quoted 6 lines
ksrc/drivers/can/sja1000/rtcan_ixxat_pci.c +1 -1
 static struct pci_device_id ixxat_pci_tbl[] = {
-	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, IXXAT_PCI_VENDOR_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},
 	{ }
 };
 MODULE_DEVICE_TABLE (pci, ixxat_pci_tbl);

I don't have a IXXAT CAN card to check if the sub-vendor id is really IXXAT_PCI_VENDOR_ID. Does

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

{IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID, PCI_ANY_ID, IXXAT_PCI_SUB_SYS_ID, 0, 0, 0},

work as well? A work-around would be to disable the IXXAT-PCI driver in the kernel config.

I just found a lspci output for an IXXAT card and Stefan's patch should
work fine. Are you going to apply it or should I take care?

It's in my queue already, so I can commit directly. Thanks,

Two patches for the IXXAT-PCI and MSCAN will follow. Sorry for delay.

Wolfgang.

#6 lore raw
In reply to Wolfgang Grandegger

Hi Wolfgang,

Quoted 11 lines · Wolfgang Grandegger

[...]

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

Quoted 8 lines
    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

... obviously it does not probe again.

it probes again, but pci_request_regions() failed in my driver.

In the -ENODEV case, the function pci_release_regions() is not called in the ixxat driver, so access is blocked for other drivers.

Stefan

#7 lore raw
Quoted 18 lines · Stefan Kisdaroczi

Hi Wolfgang,

Quoted 15 lines · Wolfgang Grandegger

[...]

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 7 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

... obviously it does not probe again.

it probes again, but pci_request_regions() failed in my driver.

In the -ENODEV case, the function pci_release_regions() is not called in the ixxat driver, so access is blocked for other drivers.

That's a bug. Will fix.

Thanks,

Wolfgang.

#8 lore raw

Hi Wolfgang,

Quoted 23 lines · Wolfgang Grandegger
Quoted 22 lines · Stefan Kisdaroczi

Hi Wolfgang,

Quoted 19 lines · Wolfgang Grandegger

[...]

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

... obviously it does not probe again.

it probes again, but pci_request_regions() failed in my driver.

In the -ENODEV case, the function pci_release_regions() is not called in the ixxat driver, so access is blocked for other drivers.

That's a bug. Will fix.

please see:

https://mail.gna.org/public/xenomai-core/2009-03/msg00055.html

I sent a patch for exactly this issue on March 10.

Signature · 1 line
Sebastian
#9 lore raw
Quoted 29 lines · Sebastian Smolorz

Hi Wolfgang,

Quoted 26 lines · Wolfgang Grandegger
Quoted 25 lines · Stefan Kisdaroczi

Hi Wolfgang,

Quoted 11 lines · Wolfgang Grandegger

[...]

Quoted 6 lines
Quoted 6 lines

dmesg output, there is no IXXAT-PCI-CAN board installed:

Quoted 5 lines

RT-Socket-CAN 0.90.2 - (C) 2006 RT-Socket-CAN Development Team RTCAN SJA1000 driver initialized
PCI: setting IRQ 12 as level-triggered
IXXAT-PCI-CAN 0000:00:11.0: found PCI INT A -> IRQ 12
IXXAT-PCI-CAN: Initializing device 10b5:9050:2503

OK, it finding a variant of the PLX9050, but it will not use the device because of the following lines after the above printout:

Quoted 7 lines
    if (sub_sys_id != IXXAT_PCI_SUB_SYS_ID)
             return -ENODEV;

But ...

Quoted 1 line
Quoted 1 line

The following patch fixed it for me (my own driver loads again).

... obviously it does not probe again.

it probes again, but pci_request_regions() failed in my driver.

In the -ENODEV case, the function pci_release_regions() is not called in the ixxat driver, so access is blocked for other drivers.

Quoted 7 lines
Quoted 1 line

That's a bug. Will fix.

please see:

https://mail.gna.org/public/xenomai-core/2009-03/msg00055.html

I sent a patch for exactly this issue on March 10.

Obviously I missed that one as well, sorry. Will send a proper patch later today or tomorrow. Sebastian, does that mean that you have an IXXAT PCI card available for testing?

Wolfgang.

#10 lore raw
Quoted 3 lines · Wolfgang Grandegger

Obviously I missed that one as well, sorry. Will send a proper patch later today or tomorrow. Sebastian, does that mean that you have an IXXAT PCI card available for testing?

No, unfortunately not. But I was playing with the source code for that card while trying to get an ESD card to work with Xenomai. BTW that reminds me of sending a patch for that card to the ML ... maybe next week.

Signature · 1 line
Sebastian