Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29046f9b authored by Vasanthy Kolluri's avatar Vasanthy Kolluri Committed by David S. Miller
Browse files

enic: Clean ups



1) Update copyright
2) Fix hardware queue descriptor field size CQ_ENET_RQ_DESC_FCOE_SOF_BITS
3) Include rtnetlink.h instead of if_link.h
4) Selectively flush writes to interrupt mask register
5) Use pci_enable_device_mem
6) Remove unused variables and header files
7) Fix size mismatch between memory alloc and free operations of a variable
8) Check for non null arguments to vic_provinfo_alloc

Signed-off-by: default avatarScott Feldman <scofeldm@cisco.com>
Signed-off-by: default avatarVasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: default avatarRoopa Prabhu <roprabhu@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 506e1198
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
/*
 * Copyright 2008 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
 *
 * This program is free software; you may redistribute it and/or modify
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright 2008 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
 *
 * This program is free software; you may redistribute it and/or modify
@@ -82,7 +82,7 @@ struct cq_enet_rq_desc {
	((1 << CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_BITS) - 1)
#define CQ_ENET_RQ_DESC_VLAN_TCI_USER_PRIO_SHIFT    13

#define CQ_ENET_RQ_DESC_FCOE_SOF_BITS               4
#define CQ_ENET_RQ_DESC_FCOE_SOF_BITS               8
#define CQ_ENET_RQ_DESC_FCOE_SOF_MASK \
	((1 << CQ_ENET_RQ_DESC_FCOE_SOF_BITS) - 1)
#define CQ_ENET_RQ_DESC_FCOE_EOF_BITS               8
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright 2008 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
 *
 * This program is free software; you may redistribute it and/or modify
@@ -33,7 +33,7 @@
#define DRV_NAME		"enic"
#define DRV_DESCRIPTION		"Cisco VIC Ethernet NIC Driver"
#define DRV_VERSION		"1.4.1.1"
#define DRV_COPYRIGHT		"Copyright 2008-2009 Cisco Systems, Inc"
#define DRV_COPYRIGHT		"Copyright 2008-2010 Cisco Systems, Inc"

#define ENIC_BARS_MAX		6

+6 −5
Original line number Diff line number Diff line
/*
 * Copyright 2008 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
 *
 * This program is free software; you may redistribute it and/or modify
@@ -29,12 +29,12 @@
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/if_link.h>
#include <linux/ethtool.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/tcp.h>
#include <linux/rtnetlink.h>
#include <net/ip6_checksum.h>

#include "cq_enet_desc.h"
@@ -1799,8 +1799,10 @@ static int enic_stop(struct net_device *netdev)
	unsigned int i;
	int err;

	for (i = 0; i < enic->intr_count; i++)
	for (i = 0; i < enic->intr_count; i++) {
		vnic_intr_mask(&enic->intr[i]);
		(void)vnic_intr_masked(&enic->intr[i]); /* flush write */
	}

	enic_synchronize_irqs(enic);

@@ -1810,7 +1812,6 @@ static int enic_stop(struct net_device *netdev)
	napi_disable(&enic->napi);
	netif_carrier_off(netdev);
	netif_tx_disable(netdev);

	enic_dev_del_station_addr(enic);

	for (i = 0; i < enic->wq_count; i++) {
@@ -2299,7 +2300,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
	/* Setup PCI resources
	 */

	err = pci_enable_device(pdev);
	err = pci_enable_device_mem(pdev);
	if (err) {
		dev_err(dev, "Cannot enable PCI device, aborting\n");
		goto err_out_free_netdev;
+1 −1
Original line number Diff line number Diff line
/*
 * Copyright 2008 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2008-2010 Cisco Systems, Inc.  All rights reserved.
 * Copyright 2007 Nuova Systems, Inc.  All rights reserved.
 *
 * This program is free software; you may redistribute it and/or modify
Loading