All of lore.kernel.org
 help / color / mirror / Atom feed
From: Georg Gast <georg@schorsch-tech.de>
To: linux-kernel@vger.kernel.org
Subject: SJA1000: PCI based can bus card
Date: Fri, 06 Feb 2015 13:20:00 +0100	[thread overview]
Message-ID: <54D4B170.6070403@schorsch-tech.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

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

[-- Attachment #2: 0001-IXXAT-CAN-i165.patch --]
[-- Type: text/x-patch, Size: 2132 bytes --]

>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


             reply	other threads:[~2015-02-06 12:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 12:20 Georg Gast [this message]
2015-02-06 13:11 ` SJA1000: PCI based can bus card Paul Bolle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D4B170.6070403@schorsch-tech.de \
    --to=georg@schorsch-tech.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.