lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 06 Feb 2015 14:11:59 +0100
From:	Paul Bolle <pebolle@...cali.nl>
To:	Georg Gast <georg@...orsch-tech.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: SJA1000: PCI based can bus card

On Fri, 2015-02-06 at 13:20 +0100, Georg Gast wrote:
> 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

The 16 bit subsystem vendor ID lives at 0x2C and is 0x10b5, and the 16
bit subsystem ID lives at 0x2E and is 0x1067, right?

> 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@...orsch-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

But here you use 0x1065 instead of either 0x10b5 or 0x1067.

>  #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,

You're checking the subsystem ID, so you should use 0x1067. Is that correct?

> +		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

Please post patches inline, next time.


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ