lkml.org 
[lkml]   [2015]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectSJA1000: PCI based can bus card
Hi,
i have the following card:

[10b5:9050] (rev 01) Subsystem: PLX Technology, Inc. IXXAT CAN i165

lspci -x -d 10b5:9050
07:05.0 Network controller: PLX Technology, Inc. PCI <-> IOBus Bridge
(rev 01)
00: b5 10 50 90 03 00 80 02 01 00 80 02 10 00 00 00
10: 00 50 40 fe 01 a4 00 00 00 00 40 fe 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 b5 10 67 10
30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00

It offers an sja1000 can bus. It is a relatively old card. The 10b5:9050
suggested that the driver plx_pci + sja1000 are offering support for it,
but i guess it gets rejected by the subsystem id, but i cant figure out
if i have done it wrong.

from the output of the pci configuration space, i guess the subsystem id
is 1067 so i authored the appended patch. My added printk doesnt get
triggered, so i assume, the pci description is still wrong.

Any hints would be appreciated...

This is exactly the card.
http://www.bol-system.com/english/ixxat/ipci165pci.htm

Best regards
Georg Gast
From 648f6abe1f055e7da26584fd5975a5e53102fe18 Mon Sep 17 00:00:00 2001
From: Georg Gast <georg@schorsch-tech.de>
Date: Fri, 6 Feb 2015 13:03:53 +0100
Subject: [PATCH] IXXAT CAN i165

---
drivers/net/can/sja1000/plx_pci.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/drivers/net/can/sja1000/plx_pci.c b/drivers/net/can/sja1000/plx_pci.c
index 8836a74..7e59478 100644
--- a/drivers/net/can/sja1000/plx_pci.c
+++ b/drivers/net/can/sja1000/plx_pci.c
@@ -45,6 +45,7 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841/cPCI-7841, "
"esd CAN-PCIe/2000, "
"Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
"IXXAT PC-I 04/PCI, "
+ "IXXAT CAN i165, "
"ELCUS CAN-200-PCI")
MODULE_LICENSE("GPL v2");

@@ -131,6 +132,7 @@ struct plx_pci_card {
#define IXXAT_PCI_VENDOR_ID 0x10b5
#define IXXAT_PCI_DEVICE_ID 0x9050
#define IXXAT_PCI_SUB_SYS_ID 0x2540
+#define IXXAT_PCI_I165_SUB_SYS_ID 0x1065

#define MARATHON_PCI_DEVICE_ID 0x2715

@@ -215,6 +217,14 @@ static struct plx_pci_card_info plx_pci_card_info_ixxat = {
/* based on PLX9050 */
};

+static struct plx_pci_card_info plx_pci_card_info_ixxat_i165 = {
+ "IXXAT CAN i165", 1,
+ PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
+ {0, 0x00, 0x00}, { {2, 0x00, 0x80}, {2, 0x200, 0x80} },
+ &plx_pci_reset_common
+ /* based on PLX9050 */
+};
+
static struct plx_pci_card_info plx_pci_card_info_marathon = {
"Marathon CAN-bus-PCI", 2,
PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
@@ -312,6 +322,13 @@ static const struct pci_device_id plx_pci_tbl[] = {
(kernel_ulong_t)&plx_pci_card_info_ixxat
},
{
+ /* IXXAT CAN i165 card */
+ IXXAT_PCI_VENDOR_ID, IXXAT_PCI_DEVICE_ID,
+ PCI_ANY_ID, IXXAT_PCI_I165_SUB_SYS_ID,
+ 0, 0,
+ (kernel_ulong_t)&plx_pci_card_info_ixxat_i165
+ },
+ {
/* Marathon CAN-bus-PCI card */
PCI_VENDOR_ID_PLX, MARATHON_PCI_DEVICE_ID,
PCI_ANY_ID, PCI_ANY_ID,
@@ -514,6 +531,7 @@ static int plx_pci_add_card(struct pci_dev *pdev,
u32 val;
void __iomem *addr;

+ printk("plx_pci: Probing ...");
ci = (struct plx_pci_card_info *)ent->driver_data;

if (pci_enable_device(pdev) < 0) {
--
2.0.5
\
 
 \ /
  Last update: 2015-02-06 13:41    [W:0.032 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site