From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Hartkopp Subject: Re: [PATCH net-next-2.6] can/sja1000: driver for PEAK PCAN PCI/PCIe cards Date: Fri, 09 Sep 2011 16:42:54 +0200 Message-ID: <4E6A25EE.3000501@hartkopp.net> References: <4E692080.9020801@grandegger.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: SocketCAN Core Mailing List , Netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-g4cQ8AsIbFbL9ATBNaCtXw@public.gmane.org, Thomas Wiedemann To: Wolfgang Grandegger Return-path: In-Reply-To: <4E692080.9020801-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org Hello Wolfgang, many thanks for providing this patch! On 09/08/11 22:07, Wolfgang Grandegger wrote: > This patch adds the "peak_pci" driver for the PCAN PCI/PCIe cards (1, 2, 3 > or 4 channels) from PEAK Systems (http://www.peak-system.com). Yes - that fits, but ... > +#define PEAK_PCI_VENDOR_ID 0x001C /* The PCI device and vendor IDs */ > +#define PEAK_PCI_DEVICE_ID 0x0001 /* for PCI / PCIe slot cards */ > +#define PEAK_PCIE_DEVICE_ID 0x0002 /* for PCIExpress cards */ > + > +static const u16 peak_pci_icr_masks[] = {0x02, 0x01, 0x40, 0x80}; > + > +static DEFINE_PCI_DEVICE_TABLE(peak_pci_tbl) = { > + {PEAK_PCI_VENDOR_ID, PEAK_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, > + {PEAK_PCI_VENDOR_ID, PEAK_PCIE_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID,}, > + {0,} > +}; The problem is the support of the PCAN ExpressCard (device ID 0x0002) here. This commit https://lists.berlios.de/pipermail/socketcan-commit/2010-June/000814.html should be reverted, as you can use the PCAN-ExpressCard (IPEH-00300[12]) only with a hardware patch, as we need some I2C initialisations to enable the CAN transceiver (and the funky status LEDs). See at: http://anonscm.debian.org/gitweb/?p=collab-maint/peak-linux-driver.git;a=blob;f=driver/src/pcan_pciec.c;h=87ce0bda41aa0a6dda8284d48237b1ef7c678e11;hb=HEAD#l36 I'll also test your driver on Monday. Tnx & best regards, Oliver