aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/enic/enic.h
AgeCommit message (Collapse)Author
2010-12-10enic: Move enic port profile handling code to a new 802.1Qbh provisioning ↵Roopa Prabhu
info type Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10enic: Use VF mac set by IFLA_VF_MAC in port profile provisioning dataRoopa Prabhu
This patch adds support in enic 802.1Qbh port profile provisioning code to use the mac address set by IFLA_VF_MAC. For now we handle this mac as a special case for a VM mac address sent to us by libvirt. The VM mac address is sent to the switch along with the rest of the port profile provisioning data. This patch also adds calls to register and deregister the mac address during port profile association/deassociation. Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10enic: Add ndo_set_vf_mac support for enic dynamic devicesRoopa Prabhu
This patch implements the ndo_set_vf_mac netdev operation for enic dynamic devices. It treats the mac address set by IFLA_VF_MAC as a special case to use it in the port profile provisioning data. Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-10enic: Add ndo_set_rx_mode support for enic vnicsRoopa Prabhu
Add ndo_set_rx_mode support to register unicast and multicast address filters for enic devices Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: Christian Benvenuti <benve@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-11-15enic: Fix build warningsVasanthy Kolluri
Fix data type of argument passed to pci_alloc_consistent and pci_free_consistent routines. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-21enic: Add support for multiple hardware receive queuesVasanthy Kolluri
Add support for multiple hardware receive queues. The ingress traffic is hashed into one of the receive queues based on IP or TCP or both headers. The max no. of receive queues supported is 8. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-10-01enic: Remove dead codeVasanthy Kolluri
Removed code that is unused Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-08-17enic: Add set mac addressRoopa Prabhu
This patch implements the ndo_set_mac_address netdev operation for an enic device Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25enic: Clean upsVasanthy Kolluri
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: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25enic: Feature Add: Add loopback capability to enic devicesVasanthy Kolluri
Hardware has the loopback capability to queue the packets transmitted from a device to the receive queue of the same device. enic now supports the loopback capability. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25enic: Use (netdev|dev|pr)_<level> macro helpers for loggingVasanthy Kolluri
Replace all printk routines with the (netdev|dev|pr)_<level> macros that provide verbose logs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25enic: Feature Add: Replace LRO with GROVasanthy Kolluri
enic now uses the GRO mechanism instead of LRO to pass skbs to upper layers. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-02enic: bug fix: make the set/get netlink VF_PORT support symmetricalScott Feldman
To make get/set netlink VF_PORT truly symmetrical, we need to keep track of what items are set and only return those items on get. Previously, the driver wasn't differentiating between a set of attr with a NULL string, for example, and not setting the attr at all. We only want to return the NULL string if the attr was actually set with a NULL string. Otherwise, don't return the attr. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17net: Add ndo_{set|get}_vf_port support for enic dynamic vnicsScott Feldman
Add enic ndo_{set|get}_vf_port ops to support setting/getting port-profile for enic dynamic devices. Enic dynamic devices are just like normal enic eth devices except dynamic enics require an extra configuration step to assign a port-profile identifier to the interface before the interface is useable. Once a port-profile is assigned, link comes up on the interface and is ready for I/O. The port-profile is used to configure the network port assigned to the interface. The network port configuration includes VLAN membership, QoS policies, and port security settings typical of a data center network. A dynamic enic initially has a zero-mac address. Before a port-profile is assigned, a valid non-zero unicast mac address should be assign to the dynamic enic interface. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
2010-03-18enic: Clean up: Change driver description; Fix tab space; Update MAINTAINERSVasanthy Kolluri
1) Change enic driver description to "Cisco VIC Ethernet NIC Driver" 2) Fix tab space 3) Update MAINTAINERS list Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-03-18enic: Bug Fix: Fix hardware descriptor readsVasanthy Kolluri
The last bit written to a completion descriptor by hardware is the color bit. Driver must read all other descriptor fields only after reading the color bit to avoid reading stale descriptor fields. There is a rmb() after reading the color bit to avoid any compiler/cpu reordering of the reads. The color bit is the generation bit that toggles each pass through the completion descriptor ring. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23enic: feature add: add ethtool -c/C supportScott Feldman
Only rx_usec and tx_usec options for ethtool -C are settable as those are the only settings that make sense to HW. Adds driver reporting of intr coalescing timer value in usec units rather than HW units. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23enic: minimize pkt filter updates to firmwareScott Feldman
In set_multicast(), only push pkt filter changes down to firmware if pkt filter actually changes. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-23enic: Bug fix: use safe queue shutdown in dev->stopScott Feldman
Fix dev->stop shutdown bug where driver was stopping xmit queue and then disabling intrs. Fix is to disable intrs first and then stop the xmit queue, otherwise an interrupt could cause the queue to be rewoken. Also, no need to explicitly do queue servicing because queues are cleaned and reset back to initial state at end of dev->stop. Servicing queues also had the side-effect of also rewakening the xmit queue, which is not what we want. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03enic: provision for multiple Rx/Tx queues; prepare for RSS supportScott Feldman
Provision for multiple Rx/Tx queues. Max of 8 WQs and 8 RQs. Max for completion queue is 8+8=16 and max for interrupt resources is 8+8+2. Add driver/firmware interface for setting up RSS secret key and indirection table. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03enic: bug fix: included MAC drops in rx_dropped netstatScott Feldman
Bug fix: included MAC drops in rx_dropped netstat. Also track Rx trunctations stat at the MAC Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-03enic: add support for multiple BARsScott Feldman
Nic firmware can place resources (queues, intrs, etc) on multiple BARs, so allow driver to discover/map resources beyond BAR0. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09enic: record all bad FCS errs as frame errorsScott Feldman
Report all bad FCS errs as frames errs. This includes frames with bad FCS on wire detected by MAC and frames which may be truncated due to ingress FIFO overruns. No longer print a driver msg on bad FCS err. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-09enic: bug fix: return notify intr creditsScott Feldman
Return notify intr credits after notify intr from firmware. This is especially important for legacy PCI intr mode, where not returning credits would cause PBA to remain asserted which would get us right back into the ISR. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-21enic: enable ethtool LRO supportScott Feldman
Enable ethtool support for get/set_flags so LRO can be turned on/off by fwding drivers such as the bridge driver. LRO is not compatible with fwding drivers. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-24enic: bug fix: don't set netdev->name too earlyScott Feldman
Bug fix: don't set netdev->name early before netdev registration. Setting netdev->name early with dev_alloc_name() would occasionally cause netdev registration to fail returning error that device was already registered. Since we're using netdev->name to name MSI-X vectors, we now need to move the request_irq after netdev registartion, so move it to ->open. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-24enic: fixes for review items from Ben HutchingsScott Feldman
Fixes for review items from Ben Hutchings: - use netdev->net_stats rather than private net_stats - use ethtool op .get_sset_count rather than .get_stats_count - err out if setting Tx/Rx csum or TSO using ethtool and setting is not enabled for device. - pass in jiffies + constant to round_jiffies - return err if new MTU is out-of-bounds Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-18enic: add Cisco 10G Ethernet NIC driverScott Feldman
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>