linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* plx_pci.c patch
       [not found] <52B8878E.5090505@mcc.vniiem.ru>
@ 2013-12-23 19:10 ` Олег Мороз
  2013-12-27 15:21   ` Oliver Hartkopp
  0 siblings, 1 reply; 2+ messages in thread
From: Олег Мороз @ 2013-12-23 19:10 UTC (permalink / raw)
  To: linux-can

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


Hello. I've added the ELCUS CAN-200-PCI card support into 
sja1000_plx_pci driver. Could you please review my changes and commit it 
to the  Linux kernel repository?


[-- Attachment #2: plx_pci.c.patch --]
[-- Type: text/x-patch, Size: 2019 bytes --]

--- linux-source-3.11/drivers/net/can/sja1000/plx_pci.c.orig	2013-12-19 17:58:06.591790117 +0400
+++ linux-source-3.11/drivers/net/can/sja1000/plx_pci.c	2013-12-19 18:00:34.099862435 +0400
@@ -45,7 +45,8 @@ MODULE_SUPPORTED_DEVICE("Adlink PCI-7841
 			"esd CAN-PCI/PMC/266, "
 			"esd CAN-PCIe/2000, "
 			"Connect Tech Inc. CANpro/104-Plus Opto (CRG001), "
-			"IXXAT PC-I 04/PCI")
+			"IXXAT PC-I 04/PCI, "
+			"ELCUS CAN-200-PCI")
 MODULE_LICENSE("GPL v2");
 
 #define PLX_PCI_MAX_CHAN 2
@@ -123,6 +124,12 @@ struct plx_pci_card {
 #define ESD_PCI_SUB_SYS_ID_PCIE2000	0x0200
 #define ESD_PCI_SUB_SYS_ID_PCI104200	0x0501
 
+#define CAN200PCI_DEVICE_ID		0x9030
+#define CAN200PCI_VENDOR_ID		0x10b5
+#define CAN200PCI_SUB_DEVICE_ID		0x0301
+#define CAN200PCI_SUB_VENDOR_ID		0xe1c5
+
+
 #define IXXAT_PCI_VENDOR_ID		0x10b5
 #define IXXAT_PCI_DEVICE_ID		0x9050
 #define IXXAT_PCI_SUB_SYS_ID		0x2540
@@ -234,6 +241,14 @@ static struct plx_pci_card_info plx_pci_
 	/* based on PLX9030 */
 };
 
+static struct plx_pci_card_info plx_pci_card_info_elcus = {
+	"Eclus CAN-200-PCI", 2,
+	PLX_PCI_CAN_CLOCK, PLX_PCI_OCR, PLX_PCI_CDR,
+	{1, 0x00, 0x00}, { {2, 0x00, 0x80}, {3, 0x00, 0x80} },
+	&plx_pci_reset_common
+	/* based on PLX9030 */
+};
+
 static DEFINE_PCI_DEVICE_TABLE(plx_pci_tbl) = {
 	{
 		/* Adlink PCI-7841/cPCI-7841 */
@@ -319,6 +334,13 @@ static DEFINE_PCI_DEVICE_TABLE(plx_pci_t
 		0, 0,
 		(kernel_ulong_t)&plx_pci_card_info_cti
 	},
+	{
+		/* Elcus CAN-200-PCI */
+		CAN200PCI_VENDOR_ID, CAN200PCI_DEVICE_ID,
+		CAN200PCI_SUB_VENDOR_ID, CAN200PCI_SUB_DEVICE_ID,
+		0, 0,
+		(kernel_ulong_t)&plx_pci_card_info_elcus
+	},
 	{ 0,}
 };
 MODULE_DEVICE_TABLE(pci, plx_pci_tbl);
@@ -440,13 +462,14 @@ static void plx_pci_reset_marathon(struc
 	}
 }
 
+
+
 static void plx_pci_del_card(struct pci_dev *pdev)
 {
 	struct plx_pci_card *card = pci_get_drvdata(pdev);
 	struct net_device *dev;
 	struct sja1000_priv *priv;
 	int i = 0;
-
 	for (i = 0; i < PLX_PCI_MAX_CHAN; i++) {
 		dev = card->net_dev[i];
 		if (!dev)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: plx_pci.c patch
  2013-12-23 19:10 ` plx_pci.c patch Олег Мороз
@ 2013-12-27 15:21   ` Oliver Hartkopp
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Hartkopp @ 2013-12-27 15:21 UTC (permalink / raw)
  To: Олег Мороз
  Cc: linux-can

Hello Oleg,

thanks for your contribution!

On 23.12.2013 20:10, Олег Мороз wrote:
> 
> Hello. I've added the ELCUS CAN-200-PCI card support into sja1000_plx_pci
> driver. Could you please review my changes and commit it to the  Linux kernel
> repository?
> 

Please post patches always in-line, e.g. an example for plx_pci.c is this
commit:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/can/sja1000/plx_pci.c?id=e4bc6c06569a90512169d98a11b3eb2ec18da4ae

Which had this patch:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/patch/drivers/net/can/sja1000/plx_pci.c?id=e08534b57e79fa722e3136b79868a725a8eea0f0

And this post on the mailing list:
http://marc.info/?l=linux-netdev&m=132368716608087&w=2

Please sent your patch the same way with a proper Signed-off-by: statement
(preferably without cyrillic characters).

Please clean up your code changes before => remove the line changes below!

Best regards,
Oliver 


@@ -440,13 +462,14 @@ static void plx_pci_reset_marathon(struc
 	}
 }
 
+
+

(why did you introduce these lines?)

 static void plx_pci_del_card(struct pci_dev *pdev)
 {
 	struct plx_pci_card *card = pci_get_drvdata(pdev);
 	struct net_device *dev;
 	struct sja1000_priv *priv;
 	int i = 0;
-

(there should remain an empty line)
 
 	for (i = 0; i < PLX_PCI_MAX_CHAN; i++) {
 		dev = card->net_dev[i];
 		if (!dev)

=> please leave this code as-is. Tnx.

ps. For the entire correct process see:
https://www.kernel.org/doc/Documentation/SubmittingPatches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-27 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <52B8878E.5090505@mcc.vniiem.ru>
2013-12-23 19:10 ` plx_pci.c patch Олег Мороз
2013-12-27 15:21   ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).