aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-05-19 00:08:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-19 00:08:20 -0400
commitbb803cfbecb03a0cf8dc7e1864f18dda6631af00 (patch)
tree6c0989693bea6f50cfa5c6bb14f52ec19668def3 /drivers/net/benet
parent3878fb6fdbceecca20b15748f807340854220f06 (diff)
parent511e11e396dc596825ce04d53d7f6d579404bc01 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/scsi/fcoe/fcoe.c
Diffstat (limited to 'drivers/net/benet')
-rw-r--r--drivers/net/benet/be.h14
-rw-r--r--drivers/net/benet/be_main.c14
2 files changed, 21 insertions, 7 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index c49ddd08b2aa..b4bb06fdf307 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -35,8 +35,22 @@
35#define DRV_VER "2.0.348" 35#define DRV_VER "2.0.348"
36#define DRV_NAME "be2net" 36#define DRV_NAME "be2net"
37#define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC" 37#define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC"
38#define OC_NAME "Emulex OneConnect 10Gbps NIC"
38#define DRV_DESC BE_NAME "Driver" 39#define DRV_DESC BE_NAME "Driver"
39 40
41#define BE_VENDOR_ID 0x19a2
42#define BE_DEVICE_ID1 0x211
43#define OC_DEVICE_ID1 0x700
44#define OC_DEVICE_ID2 0x701
45
46static inline char *nic_name(struct pci_dev *pdev)
47{
48 if (pdev->device == OC_DEVICE_ID1 || pdev->device == OC_DEVICE_ID2)
49 return OC_NAME;
50 else
51 return BE_NAME;
52}
53
40/* Number of bytes of an RX frame that are copied to skb->data */ 54/* Number of bytes of an RX frame that are copied to skb->data */
41#define BE_HDR_LEN 64 55#define BE_HDR_LEN 64
42#define BE_MAX_JUMBO_FRAME_SIZE 9018 56#define BE_MAX_JUMBO_FRAME_SIZE 9018
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 8994b03d80ac..ae2f6b58ba25 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -28,10 +28,10 @@ static unsigned int rx_frag_size = 2048;
28module_param(rx_frag_size, uint, S_IRUGO); 28module_param(rx_frag_size, uint, S_IRUGO);
29MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); 29MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data.");
30 30
31#define BE_VENDOR_ID 0x19a2
32#define BE2_DEVICE_ID_1 0x0211
33static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = { 31static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = {
34 { PCI_DEVICE(BE_VENDOR_ID, BE2_DEVICE_ID_1) }, 32 { PCI_DEVICE(BE_VENDOR_ID, BE_DEVICE_ID1) },
33 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID1) },
34 { PCI_DEVICE(BE_VENDOR_ID, OC_DEVICE_ID2) },
35 { 0 } 35 { 0 }
36}; 36};
37MODULE_DEVICE_TABLE(pci, be_dev_ids); 37MODULE_DEVICE_TABLE(pci, be_dev_ids);
@@ -1837,11 +1837,11 @@ static int __devinit be_probe(struct pci_dev *pdev,
1837 1837
1838 be_msix_enable(adapter); 1838 be_msix_enable(adapter);
1839 1839
1840 status = pci_set_dma_mask(pdev, DMA_64BIT_MASK); 1840 status = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1841 if (!status) { 1841 if (!status) {
1842 netdev->features |= NETIF_F_HIGHDMA; 1842 netdev->features |= NETIF_F_HIGHDMA;
1843 } else { 1843 } else {
1844 status = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 1844 status = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
1845 if (status) { 1845 if (status) {
1846 dev_err(&pdev->dev, "Could not set PCI DMA Mask\n"); 1846 dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");
1847 goto free_netdev; 1847 goto free_netdev;
@@ -1875,7 +1875,7 @@ static int __devinit be_probe(struct pci_dev *pdev,
1875 if (status != 0) 1875 if (status != 0)
1876 goto stats_clean; 1876 goto stats_clean;
1877 1877
1878 dev_info(&pdev->dev, BE_NAME " port %d\n", adapter->port_num); 1878 dev_info(&pdev->dev, "%s port %d\n", nic_name(pdev), adapter->port_num);
1879 return 0; 1879 return 0;
1880 1880
1881stats_clean: 1881stats_clean:
@@ -1889,7 +1889,7 @@ rel_reg:
1889disable_dev: 1889disable_dev:
1890 pci_disable_device(pdev); 1890 pci_disable_device(pdev);
1891do_none: 1891do_none:
1892 dev_warn(&pdev->dev, BE_NAME " initialization failed\n"); 1892 dev_err(&pdev->dev, "%s initialization failed\n", nic_name(pdev));
1893 return status; 1893 return status;
1894} 1894}
1895 1895