Commit Graph

16 Commits (3ffb52e73b47d6ad86b645942ff49035efdbcd31)

Author SHA1 Message Date
Scott Feldman 08f382ebb8 enic: bug fix: make the set/get netlink VF_PORT support symmetrical
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-06-02 02:26:40 -07:00
Scott Feldman f8bd909183 net: Add ndo_{set|get}_vf_port support for enic dynamic vnics
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-05-17 22:50:19 -07:00
Vasanthy Kolluri 641cb85e68 enic: Clean up: Change driver description; Fix tab space; Update MAINTAINERS
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-18 21:22:49 -07:00
Vasanthy Kolluri a55a603dae enic: Bug Fix: Fix hardware descriptor reads
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>
2010-03-18 21:22:47 -07:00
Scott Feldman 7c84459911 enic: feature add: add ethtool -c/C support
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-23 21:03:41 -08:00
Scott Feldman 9959a18556 enic: minimize pkt filter updates to firmware
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-23 21:03:40 -08:00
Scott Feldman b3d18d191b enic: Bug fix: use safe queue shutdown in dev->stop
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-12-23 21:03:39 -08:00
Scott Feldman 6ba9cdc096 enic: provision for multiple Rx/Tx queues; prepare for RSS support
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-03 20:19:19 -07:00
Scott Feldman 350991e12a enic: bug fix: included MAC drops in rx_dropped netstat
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-03 20:19:18 -07:00
Scott Feldman 27e6c7d338 enic: add support for multiple BARs
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-09-03 20:19:09 -07:00
Scott Feldman bd9fb1a44a enic: record all bad FCS errs as frame errors
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-09 23:24:08 -08:00
Scott Feldman ed8af6b288 enic: bug fix: return notify intr credits
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>
2009-02-09 23:23:50 -08:00
Scott Feldman 86ca9db794 enic: enable ethtool LRO support
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-11-21 21:26:55 -08:00
Scott Feldman 4b75a442d2 enic: bug fix: don't set netdev->name too early
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-24 20:48:48 -04:00
Scott Feldman 25f0a061d9 enic: fixes for review items from Ben Hutchings
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-24 20:48:30 -04:00
Scott Feldman 01f2e4ead2 enic: add Cisco 10G Ethernet NIC driver
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-18 11:34:53 -04:00