diff mbox

[net-next-2.6,1/2] be2net: Add support for next generation of BladeEngine device

Message ID 20091014122358.GA11905@serverengines.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ajit Khaparde Oct. 14, 2009, 12:24 p.m. UTC
Add new PCI ids to support next generation of BladeEnigne device.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be.h |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

Comments

David Miller Oct. 14, 2009, 10:24 p.m. UTC | #1
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Wed, 14 Oct 2009 17:54:09 +0530

> Add new PCI ids to support next generation of BladeEnigne device.
> 
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Oct. 14, 2009, 11:33 p.m. UTC | #2
From: David Miller <davem@davemloft.net>
Date: Wed, 14 Oct 2009 15:24:02 -0700 (PDT)

> From: Ajit Khaparde <ajitk@serverengines.com>
> Date: Wed, 14 Oct 2009 17:54:09 +0530
> 
>> Add new PCI ids to support next generation of BladeEnigne device.
>> 
>> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
> 
> Applied.

I have to revert your changes, how did this even build for you?

In file included from drivers/net/benet/be_cmds.c:18:
drivers/net/benet/be.h:45:1: warning: "BE_DEVICE_ID1" redefined
drivers/net/benet/be.h:44:1: warning: this is the location of the previous definition
drivers/net/benet/be.h:48:1: warning: "OC_DEVICE_ID2" redefined
drivers/net/benet/be.h:47:1: warning: this is the location of the previous definition

Well, obviously, since in your patch:

 #define BE_VENDOR_ID 		0x19a2
 #define BE_DEVICE_ID1		0x211
+#define BE_DEVICE_ID1		0x221
 #define OC_DEVICE_ID1		0x700
 #define OC_DEVICE_ID2		0x701
+#define OC_DEVICE_ID2		0x710

drivers/net/benet/be.h:56: error: 'OC_DEVICE_ID3' undeclared (first use in this function)
drivers/net/benet/be.h:58: error: 'BE_DEVICE_ID2' undeclared (first use in this function)

The mistake is obvious, and you provably didn't even compile check
these changes.

How can I possibly take your patches seriously when it is clear how
incredibly careless you are being here?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ajit Khaparde Oct. 15, 2009, 3:49 a.m. UTC | #3
On 14/10/09 16:33 -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 14 Oct 2009 15:24:02 -0700 (PDT)
> 
> > From: Ajit Khaparde <ajitk@serverengines.com>
> > Date: Wed, 14 Oct 2009 17:54:09 +0530
> > 
> >> Add new PCI ids to support next generation of BladeEnigne device.
> >> 
> >> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
> > 
> > Applied.
> 
> I have to revert your changes, how did this even build for you?
> 
> In file included from drivers/net/benet/be_cmds.c:18:
> drivers/net/benet/be.h:45:1: warning: "BE_DEVICE_ID1" redefined
> drivers/net/benet/be.h:44:1: warning: this is the location of the previous definition
> drivers/net/benet/be.h:48:1: warning: "OC_DEVICE_ID2" redefined
> drivers/net/benet/be.h:47:1: warning: this is the location of the previous definition
> 
> Well, obviously, since in your patch:
> 
>  #define BE_VENDOR_ID 		0x19a2
>  #define BE_DEVICE_ID1		0x211
> +#define BE_DEVICE_ID1		0x221
>  #define OC_DEVICE_ID1		0x700
>  #define OC_DEVICE_ID2		0x701
> +#define OC_DEVICE_ID2		0x710
> 
> drivers/net/benet/be.h:56: error: 'OC_DEVICE_ID3' undeclared (first use in this function)
> drivers/net/benet/be.h:58: error: 'BE_DEVICE_ID2' undeclared (first use in this function)
> 
> The mistake is obvious, and you provably didn't even compile check
> these changes.
> 
> How can I possibly take your patches seriously when it is clear how
> incredibly careless you are being here?

Sorry Dave. My bad. Now I realize what happened.
After I compiled and tried my changes, the setup got rebooted and I picked
the files from a wrong sandbox. And these wrong files got committed to git.
I will be careful next time.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 4b61a91..151e73e 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -35,20 +35,31 @@ 
 #define DRV_VER			"2.101.205"
 #define DRV_NAME		"be2net"
 #define BE_NAME			"ServerEngines BladeEngine2 10Gbps NIC"
+#define BE3_NAME		"ServerEngines BladeEngine3 10Gbps NIC"
 #define OC_NAME			"Emulex OneConnect 10Gbps NIC"
+#define OC_NAME1		"Emulex OneConnect 10Gbps NIC (be3)"
 #define DRV_DESC		BE_NAME "Driver"
 
 #define BE_VENDOR_ID 		0x19a2
 #define BE_DEVICE_ID1		0x211
+#define BE_DEVICE_ID1		0x221
 #define OC_DEVICE_ID1		0x700
 #define OC_DEVICE_ID2		0x701
+#define OC_DEVICE_ID2		0x710
 
 static inline char *nic_name(struct pci_dev *pdev)
 {
-	if (pdev->device == OC_DEVICE_ID1 || pdev->device == OC_DEVICE_ID2)
+	switch (pdev->device) {
+	case OC_DEVICE_ID1:
+	case OC_DEVICE_ID2:
 		return OC_NAME;
-	else
+	case OC_DEVICE_ID3:
+		return OC_NAME1;
+	case BE_DEVICE_ID2:
+		return BE3_NAME;
+	default:
 		return BE_NAME;
+	}
 }
 
 /* Number of bytes of an RX frame that are copied to skb->data */