GitHub/mt8127/android_kernel_alcatel_ttab.git
13 years agoipv4: Implement __ip_dev_find using new interface address hash.
David S. Miller [Fri, 18 Feb 2011 20:43:09 +0000 (12:43 -0800)]
ipv4: Implement __ip_dev_find using new interface address hash.

Much quicker than going through the FIB tables.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Add hash table of interface addresses.
David S. Miller [Fri, 18 Feb 2011 20:42:28 +0000 (12:42 -0800)]
ipv4: Add hash table of interface addresses.

This will be used to optimize __ip_dev_find() and friends.

With help from Eric Dumazet.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Always use single transmit and single receive hardware queues per device
Vasanthy Kolluri [Thu, 17 Feb 2011 13:57:19 +0000 (13:57 +0000)]
enic: Always use single transmit and single receive hardware queues per device

We believe that our earlier patch for supporting multiple hardware
receive queues per enic device requires more internal testing. At this
point, we think that it's best to disable the use of multiple receive
queues. The current patch provides an effective means for the same.

Also, we continue to disallow multiple hardware transmit queues per
device. But change the way we enforce this in order to maintain
consistency with the way receive queues are handled.

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.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>
13 years agoipv4: Use const'ify fib_result deep in the route call chains.
David S. Miller [Thu, 17 Feb 2011 05:44:24 +0000 (21:44 -0800)]
ipv4: Use const'ify fib_result deep in the route call chains.

The only troublesome bit here is __mkroute_output which wants
to override res->fi and res->type, compute those in local
variables instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Mark fib_combine_itag()'s 'res' arg as const.
David S. Miller [Thu, 17 Feb 2011 06:04:57 +0000 (22:04 -0800)]
ipv4: Mark fib_combine_itag()'s 'res' arg as const.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Avoid use of signed integers in fib_trie code.
David S. Miller [Wed, 16 Feb 2011 22:56:22 +0000 (14:56 -0800)]
ipv4: Avoid use of signed integers in fib_trie code.

GCC emits all kinds of crazy zero extensions when we go from signed
int, to unsigned short, etc. etc.

This transformation has to be legal because:

1) In tkey_extract_bits() in mask_pfx(), the values are used to
   perform shifts, on which negative values are undefined by C.

2) In fib_table_lookup() we perform comparisons with unsigned
   values, constants, and additions.  None of which should
   encounter negative values.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add initial_ref arg to dst_alloc().
David S. Miller [Wed, 16 Feb 2011 22:08:44 +0000 (14:08 -0800)]
net: Add initial_ref arg to dst_alloc().

This allows avoiding multiple writes to the initial __refcnt.

The most simplest cases of wanting an initial reference of "1"
in ipv4 and ipv6 have been converted, the rest have been left
along and kept at the existing "0".

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Consolidate ipv4 dst allocation logic.
David S. Miller [Thu, 17 Feb 2011 23:42:37 +0000 (15:42 -0800)]
ipv4: Consolidate ipv4 dst allocation logic.

This also allows us to combine all the dst->flags settings and avoid
read/modify/write sequences to this struct member.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Move rcu_read_{lock,unlock}() into ip_route_output_slow().
David S. Miller [Thu, 17 Feb 2011 23:37:09 +0000 (15:37 -0800)]
ipv4: Move rcu_read_{lock,unlock}() into ip_route_output_slow().

Simplifies tail of __ip_route_output_key().

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Simplify output route creation call sequence.
David S. Miller [Thu, 17 Feb 2011 23:29:00 +0000 (15:29 -0800)]
ipv4: Simplify output route creation call sequence.

There's a lot of redundancy and unnecessary stack frames
in the output route creation path.

1) Make __mkroute_output() return error pointers.

2) Eliminate ip_mkroute_output() entirely, made possible by #1.

3) Call __mkroute_output() directly and handling the returning error
   pointers in ip_route_output_slow().

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoloopback: convert to hw_features
Michał Mirosław [Tue, 15 Feb 2011 16:59:18 +0000 (16:59 +0000)]
loopback: convert to hw_features

This also enables TSOv6, TSO-ECN, and UFO as loopback clearly can handle them.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: introduce NETIF_F_RXCSUM
Michał Mirosław [Tue, 15 Feb 2011 16:59:18 +0000 (16:59 +0000)]
net: introduce NETIF_F_RXCSUM

Introduce NETIF_F_RXCSUM to replace device-private flags for RX checksum
offload. Integrate it with ndo_fix_features.

ethtool_op_get_rx_csum() is removed altogether as nothing in-tree uses it.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: use ndo_fix_features for ethtool_ops->set_flags
Michał Mirosław [Tue, 15 Feb 2011 16:59:18 +0000 (16:59 +0000)]
net: use ndo_fix_features for ethtool_ops->set_flags

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: ethtool: use ndo_fix_features for offload setting
Michał Mirosław [Tue, 15 Feb 2011 16:59:17 +0000 (16:59 +0000)]
net: ethtool: use ndo_fix_features for offload setting

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Introduce new feature setting ops
Michał Mirosław [Tue, 15 Feb 2011 16:59:17 +0000 (16:59 +0000)]
net: Introduce new feature setting ops

This introduces a new framework to handle device features setting.
It consists of:
  - new fields in struct net_device:
+ hw_features - features that hw/driver supports toggling
+ wanted_features - features that user wants enabled, when possible
  - new netdev_ops:
+ feat = ndo_fix_features(dev, feat) - API checking constraints for
enabling features or their combinations
+ ndo_set_features(dev) - API updating hardware state to match
changed dev->features
  - new ethtool commands:
+ ETHTOOL_GFEATURES/ETHTOOL_SFEATURES: get/set dev->wanted_features
and trigger device reconfiguration if resulting dev->features
changed
+ ETHTOOL_GSTRINGS(ETH_SS_FEATURES): get feature bits names (meaning)

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: factorize get/set_one_feature
Michał Mirosław [Tue, 15 Feb 2011 16:59:17 +0000 (16:59 +0000)]
ethtool: factorize get/set_one_feature

This allows to enable GRO even if RX csum is disabled. GRO will not
be used for packets without hardware checksum anyway.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: factorize ethtool_get_strings() and ethtool_get_sset_count()
Michał Mirosław [Tue, 15 Feb 2011 16:59:16 +0000 (16:59 +0000)]
ethtool: factorize ethtool_get_strings() and ethtool_get_sset_count()

This is needed for unified offloads patch.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: enable GSO and GRO by default
Michał Mirosław [Tue, 15 Feb 2011 16:59:16 +0000 (16:59 +0000)]
ethtool: enable GSO and GRO by default

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: move EXPORT_SYMBOL(ethtool_op_set_tx_csum) to correct place
Michał Mirosław [Tue, 15 Feb 2011 16:59:16 +0000 (16:59 +0000)]
ethtool: move EXPORT_SYMBOL(ethtool_op_set_tx_csum) to correct place

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Clean up: Remove a not needed #ifdef
Vasanthy Kolluri [Thu, 17 Feb 2011 08:53:17 +0000 (08:53 +0000)]
enic: Clean up: Remove a not needed #ifdef

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.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>
13 years agoenic: Bug fix: Reset driver count of registered unicast addresses to zero during...
Vasanthy Kolluri [Thu, 17 Feb 2011 08:53:12 +0000 (08:53 +0000)]
enic: Bug fix: Reset driver count of registered unicast addresses to zero during device reset

During a device reset, clear the counter for the no. of unicast addresses registered.
Also, rename the routines that update unicast and multicast address lists.

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.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>
13 years agobnx2x: Support for managing RX indirection table
Tom Herbert [Wed, 16 Feb 2011 10:27:02 +0000 (10:27 +0000)]
bnx2x: Support for managing RX indirection table

Support fetching and retrieving RX indirection table via ethtool.

Signed-off-by: Tom Herbert <therbert@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Tue, 15 Feb 2011 20:25:19 +0000 (12:25 -0800)]
Merge branch 'for-davem' of git://git./linux/kernel/git/bwh/sfc-next-2.6

13 years agoMerge branch 'fec' of git://git.pengutronix.de/git/ukl/linux-2.6
David S. Miller [Tue, 15 Feb 2011 20:08:24 +0000 (12:08 -0800)]
Merge branch 'fec' of git://git.pengutronix.de/git/ukl/linux-2.6

13 years agosfc: Add TX queues for high-priority traffic
Ben Hutchings [Mon, 10 Jan 2011 21:18:20 +0000 (21:18 +0000)]
sfc: Add TX queues for high-priority traffic

Implement the ndo_setup_tc() operation with 2 traffic classes.

Current Solarstorm controllers do not implement TX queue priority, but
they do allow queues to be 'paced' with an enforced delay between
packets.  Paced and unpaced queues are scheduled in round-robin within
two separate hardware bins (paced queues with a large delay may be
placed into a third bin temporarily, but we won't use that).  If there
are queues in both bins, the TX scheduler will alternate between them.

If we make high-priority queues unpaced and best-effort queues paced,
and high-priority queues are mostly empty, a single high-priority queue
can then instantly take 50% of the packet rate regardless of how many
of the best-effort queues have descriptors outstanding.

We do not actually want an enforced delay between packets on best-
effort queues, so we set the pace value to a reserved value that
actually results in a delay of 0.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Distinguish queue lookup from test for queue existence
Ben Hutchings [Mon, 7 Feb 2011 23:04:38 +0000 (23:04 +0000)]
sfc: Distinguish queue lookup from test for queue existence

efx_channel_get_{rx,tx}_queue() currently return NULL if the channel
isn't used for traffic in that direction.  In most cases this is a
bug, but some callers rely on it as an existence test.

Add existence test functions efx_channel_has_{rx_queue,tx_queues}()
and use them as appropriate.

Change efx_channel_get_{rx,tx}_queue() to assert that the requested
queue exists.

Remove now-redundant initialisation from efx_set_channels().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Move TX queue core queue mapping into tx.c
Ben Hutchings [Wed, 12 Jan 2011 18:39:40 +0000 (18:39 +0000)]
sfc: Move TX queue core queue mapping into tx.c

efx_hard_start_xmit() needs to implement a mapping which is the
inverse of tx_queue::core_txq.  Move the initialisation of
tx_queue::core_txq next to efx_hard_start_xmit() to make the
connection more obvious.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agonet: Adjust TX queue kobjects if number of queues changes during unregister
Ben Hutchings [Tue, 15 Feb 2011 19:39:21 +0000 (19:39 +0000)]
net: Adjust TX queue kobjects if number of queues changes during unregister

If the root qdisc for a net device is mqprio, and the driver's
ndo_setup_tc() operation dynamically adds and remvoes TX queues,
netif_set_real_num_tx_queues() will be called during device
unregistration to remove the extra TX queues when the qdisc is
destroyed.  Currently this causes the corresponding kobjects
to be leaked, and the device's reference count never drops to 0.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agonet/fec: enable flow control and length check on enet-mac
Uwe Kleine-König [Tue, 25 Jan 2011 21:11:25 +0000 (22:11 +0100)]
net/fec: enable flow control and length check on enet-mac

Also optimize not to reread the value written to FEC_R_CNTRL.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: postpone unsetting driver data until the hardware is stopped
Uwe Kleine-König [Tue, 25 Jan 2011 17:03:37 +0000 (18:03 +0100)]
net/fec: postpone unsetting driver data until the hardware is stopped

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: provide device for dma functions and matching sizes for map and unmap
Uwe Kleine-König [Thu, 20 Jan 2011 08:26:38 +0000 (09:26 +0100)]
net/fec: provide device for dma functions and matching sizes for map and unmap

This fixes warnings when CONFIG_DMA_API_DEBUG=y:

NULL NULL: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000004781a020] [size=64 bytes]
net eth0: DMA-API: device driver frees DMA memory with different size [device address=0x000000004781a020] [map size=2048 bytes] [unmap size=64 bytes]

Moreover pass the platform device to dma_{,un}map_single which makes
more sense because the logical network device doesn't know anything
about dma.

Passing the platform device was a suggestion by Lothar Waßmann.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: reorder functions a bit allows removing forward declarations
Uwe Kleine-König [Wed, 19 Jan 2011 19:47:04 +0000 (20:47 +0100)]
net/fec: reorder functions a bit allows removing forward declarations

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: some whitespace cleanup
Uwe Kleine-König [Wed, 19 Jan 2011 19:26:39 +0000 (20:26 +0100)]
net/fec: some whitespace cleanup

A few of these were found and reported by Lothar Waßmann.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: consistenly name struct net_device pointers "ndev"
Uwe Kleine-König [Wed, 19 Jan 2011 10:58:12 +0000 (11:58 +0100)]
net/fec: consistenly name struct net_device pointers "ndev"

A variable named "dev" usually (usually subjective) points to a struct
device.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: add phy_stop to fec_enet_close
Uwe Kleine-König [Mon, 17 Jan 2011 19:04:23 +0000 (20:04 +0100)]
net/fec: add phy_stop to fec_enet_close

This undoes the effects of phy_start in fec_enet_open.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: consolidate all i.MX options to CONFIG_ARM
Uwe Kleine-König [Mon, 17 Jan 2011 08:52:18 +0000 (09:52 +0100)]
net/fec: consolidate all i.MX options to CONFIG_ARM

Moreover stop listing all i.MX platforms featuring a FEC, and use
the platform's config symbol that selects registration of a fec device
instead.  This might make it easier to add new platforms.

Set default = y for ARMs having a fec to reduce defconfig sizes.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: put the ioremap cookie immediately into a void __iomem pointer
Uwe Kleine-König [Thu, 13 Jan 2011 21:29:05 +0000 (22:29 +0100)]
net/fec: put the ioremap cookie immediately into a void __iomem pointer

Saving it first into struct net_device->base_addr (which is an unsigned
long) is pointless and only needs to use more casts than necessary.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: no need to memzero private data
Uwe Kleine-König [Thu, 13 Jan 2011 20:56:14 +0000 (21:56 +0100)]
net/fec: no need to memzero private data

alloc_etherdev internally uses kzalloc, so the private data is already
zerod out.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: no need to check for validity of ndev in suspend and resume
Uwe Kleine-König [Thu, 13 Jan 2011 20:53:40 +0000 (21:53 +0100)]
net/fec: no need to check for validity of ndev in suspend and resume

dev_set_drvdata is called unconditionally in the probe function and so
it cannot be NULL.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: don't free an irq that failed to be requested
Uwe Kleine-König [Thu, 13 Jan 2011 20:49:05 +0000 (21:49 +0100)]
net/fec: don't free an irq that failed to be requested

Reported-by: Lothar Waßmann <LW@KARO-elektronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: release mem_region requested in probe in error path and remove
Uwe Kleine-König [Thu, 13 Jan 2011 20:44:18 +0000 (21:44 +0100)]
net/fec: release mem_region requested in probe in error path and remove

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agonet/fec: no need to cast arguments for memcpy
Uwe Kleine-König [Thu, 13 Jan 2011 20:34:31 +0000 (21:34 +0100)]
net/fec: no need to cast arguments for memcpy

memcpy takes a const void * as 2nd argument.  So the argument is
converted automatically to void * anyhow.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
13 years agoipv4: Cache learned redirect information in inetpeer.
David S. Miller [Thu, 10 Feb 2011 06:00:16 +0000 (22:00 -0800)]
ipv4: Cache learned redirect information in inetpeer.

Note that we do not generate the redirect netevent any longer,
because we don't create a new cached route.

Instead, once the new neighbour is bound to the cached route,
we emit a neigh update event instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Cache learned PMTU information in inetpeer.
David S. Miller [Thu, 10 Feb 2011 04:42:07 +0000 (20:42 -0800)]
ipv4: Cache learned PMTU information in inetpeer.

The general idea is that if we learn new PMTU information, we
bump the peer genid.

This triggers the dst_ops->check() code to validate and if
necessary propagate the new PMTU value into the metrics.

Learned PMTU information self-expires.

This means that it is not necessary to kill a cached route
entry just because the PMTU information is too old.

As a consequence:

1) When the path appears unreachable (dst_ops->link_failure
   or dst_ops->negative_advice) we unwind the PMTU state if
   it is out of date, instead of killing the cached route.

   A redirected route will still be invalidated in these
   situations.

2) rt_check_expire(), rt_worker_func(), et al. are no longer
   necessary at all.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophy/micrel: add ability to support 50MHz RMII clock on KZS8051RNL
Baruch Siach [Mon, 14 Feb 2011 02:05:33 +0000 (02:05 +0000)]
phy/micrel: add ability to support 50MHz RMII clock on KZS8051RNL

Platform code can now set the MICREL_PHY_50MHZ_CLK bit of dev_flags in a fixup
routine (registered with phy_register_fixup_for_uid()), to make the KZS8051RNL
PHY work with 50MHz RMII reference clock.

Cc: David J. Choi <david.choi@micrel.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoROSE: AX25: finding routes simplification
Bernard Pidoux [Mon, 14 Feb 2011 21:33:49 +0000 (13:33 -0800)]
ROSE: AX25: finding routes simplification

With previous patch, rose_get_neigh() routine
investigates the full list of neighbor nodes
until it finds or not an already connected node whether
it is called locally or through a level 3 transit frame.
If no routes are opened through an adjacent connected node
then a classical connect request is attempted.

Then there is no more reason for an extra loop such
as the one removed by this patch.

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoROSE: rose AX25 packet routing improvement
Bernard Pidoux [Mon, 14 Feb 2011 21:31:09 +0000 (13:31 -0800)]
ROSE: rose AX25 packet routing improvement

FPAC AX25 packet application is using Linux kernel ROSE
routing skills in order to connect or send packets to remote stations
knowing their ROSE address via a network of interconnected nodes.

Each FPAC node has a ROSE routing table that Linux ROSE module is
looking at each time a ROSE frame is relayed by the node or when
a connect request to a neighbor node is received.

A previous patch improved the system time response by looking at
already established routes each time the system was looking for a
route to relay a frame. If a neighbor node routing the destination
address was already connected, then the frame would be sent
through him. If not, a connection request would be issued.

The present patch extends the same routing capability to a connect
request asked by a user locally connected into an FPAC node.
Without this patch, a connect request was not well handled unless it
was directed to an immediate connected neighbor of the local node.

Implemented at a number of ROSE FPAC node stations, the present patch
improved dramatically FPAC ROSE routing time response and efficiency.

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: fix rcu lock imbalance in fib_select_default()
Eric Dumazet [Mon, 14 Feb 2011 19:23:04 +0000 (11:23 -0800)]
ipv4: fix rcu lock imbalance in fib_select_default()

Commit 0c838ff1ade7 (ipv4: Consolidate all default route selection
implementations.) forgot to remove one rcu_read_unlock() from
fib_select_default().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosch_mqprio: Always set num_tc to 0 in mqprio_destroy()
Ben Hutchings [Mon, 14 Feb 2011 19:02:23 +0000 (19:02 +0000)]
sch_mqprio: Always set num_tc to 0 in mqprio_destroy()

All the cleanup code in mqprio_destroy() is currently conditional on
priv->qdiscs being non-null, but that condition should only apply to
the per-queue qdisc cleanup.  We should always set the number of
traffic classes back to 0 here.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agocan: c_can: Added support for Bosch C_CAN controller
Bhupesh Sharma [Mon, 14 Feb 2011 06:51:44 +0000 (22:51 -0800)]
can: c_can: Added support for Bosch C_CAN controller

Bosch C_CAN controller is a full-CAN implementation which is compliant
to CAN protocol version 2.0 part A and B. Bosch C_CAN user manual can be
obtained from:

http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/c_can/users_manual_c_can.pdf

This patch adds the support for this controller.
The following are the design choices made while writing the controller
driver:
1. Interface Register set IF1 has be used only in the current design.
2. Out of the 32 Message objects available, 16 are kept aside for RX
   purposes and the rest for TX purposes.
3. NAPI implementation is such that both the TX and RX paths function
   in polling mode.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Advance driver version
Guo-Fu Tseng [Sun, 13 Feb 2011 19:27:18 +0000 (19:27 +0000)]
jme: Advance driver version

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Don't show UDP Checksum error if HW misjudged
Guo-Fu Tseng [Sun, 13 Feb 2011 19:27:17 +0000 (19:27 +0000)]
jme: Don't show UDP Checksum error if HW misjudged

Some JMicron Chip treat 0 as error checksum for UDP packets.
Which should be "No checksum needed".

Reported-by: Adam Swift <Adam.Swift@omnitude.net>
Confirmed-by: "Aries Lee" <arieslee@jmicron.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Refill receive unicase MAC addr after resume
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:40 +0000 (18:27 +0000)]
jme: Refill receive unicase MAC addr after resume

The value of the register which holds receive Unicast MAC Address
sometimes get messed-up after resume.
This patch refill it before enabling the hardware filter.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Safer MAC processor reset sequence
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:39 +0000 (18:27 +0000)]
jme: Safer MAC processor reset sequence

Adding control to clk_rx, and makes the control of clk_{rx|tx|tcp}
with safer sequence.
This sequence is provided by JMicron.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Fix hardware action of full-duplex
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:38 +0000 (18:27 +0000)]
jme: Fix hardware action of full-duplex

Clear Transmit Timer/Retry setting while full-duplex.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Rename phyfifo function for easier understand
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:37 +0000 (18:27 +0000)]
jme: Rename phyfifo function for easier understand

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Fix bit typo of JMC250A2 workaround
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:36 +0000 (18:27 +0000)]
jme: Fix bit typo of JMC250A2 workaround

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: PHY Power control for new chip
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:35 +0000 (18:27 +0000)]
jme: PHY Power control for new chip

After main chip rev 5, the hardware support more power saving
control registers.
Some Non-Linux drivers might turn off the phy power with new
interfaces, this patch makes it possible for Linux to turn it
on again.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Extract main and sub chip revision
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:34 +0000 (18:27 +0000)]
jme: Extract main and sub chip revision

Get the main and sub chip revision for later workaround use.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: implement [add/del]_slave ops
Jiri Pirko [Sun, 13 Feb 2011 09:33:42 +0000 (09:33 +0000)]
bridge: implement [add/del]_slave ops

add possibility to addif/delif via rtnetlink

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobond: implement [add/del]_slave ops
Jiri Pirko [Sun, 13 Feb 2011 09:33:01 +0000 (09:33 +0000)]
bond: implement [add/del]_slave ops

allow enslaving/releasing using netlink interface

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agortnetlink: implement setting of master device
Jiri Pirko [Sun, 13 Feb 2011 10:15:37 +0000 (10:15 +0000)]
rtnetlink: implement setting of master device

This patch allows userspace to enslave/release slave devices via netlink
interface using IFLA_MASTER. This introduces generic way to add/remove
underling devices.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotlan: Fix bugs introduced by the last tlan cleanup patch
Sakari Ailus [Wed, 9 Feb 2011 10:25:06 +0000 (10:25 +0000)]
tlan: Fix bugs introduced by the last tlan cleanup patch

Fix two bugs introduced by the commit
c659c38b2796578638548b77ef626d93609ec8ac ("tlan: Code cleanup:
checkpatch.pl is relatively happy now.") In that change,
TLAN_CSTAT_READY was considered as a bit mask containing a single bit
set while it was actually had two set instead.

Many thanks to Dan Carpenter for finding the mistake.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: make dev->master general
Jiri Pirko [Sat, 12 Feb 2011 06:48:36 +0000 (06:48 +0000)]
net: make dev->master general

dev->master is now tightly connected to bonding driver. This patch makes
this pointer more general and ready to be used by others.

 - netdev_set_master() - bond specifics moved to new function
   netdev_set_bond_master()
 - introduced netif_is_bond_slave() to check if device is a bonding slave

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: remove the unnecessary dance around skb_bond_should_drop
Jiri Pirko [Sat, 12 Feb 2011 00:46:06 +0000 (00:46 +0000)]
net: remove the unnecessary dance around skb_bond_should_drop

No need to check (master) twice and to drive in and out the header file.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophy: Remove unneeded depends on PHYLIB
hartleys [Fri, 11 Feb 2011 12:14:06 +0000 (12:14 +0000)]
phy: Remove unneeded depends on PHYLIB

Remove unneeded depends on PHYLIB.  The config selection is already in
an if PHYLIB / endif block.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetwork: Allow af_packet to transmit +4 bytes for VLAN packets.
Ben Greear [Fri, 11 Feb 2011 09:35:18 +0000 (09:35 +0000)]
network: Allow af_packet to transmit +4 bytes for VLAN packets.

This allows user-space to send a '1500' MTU VLAN packet on a
1500 MTU ethernet frame.  The extra 4 bytes of a VLAN header is
not usually charged against the MTU when other parts of the
network stack is transmitting vlans...

Signed-off-by: Ben Greear <greearb@candelatech.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge
David S. Miller [Sat, 12 Feb 2011 05:20:27 +0000 (21:20 -0800)]
Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge

13 years agobe2net: restrict WOL to PFs only.
Ajit Khaparde [Fri, 11 Feb 2011 13:39:30 +0000 (13:39 +0000)]
be2net: restrict WOL to PFs only.

WOL is not supported for Vrtual Functions.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: detect a UE even when a interface is down.
Ajit Khaparde [Fri, 11 Feb 2011 13:38:29 +0000 (13:38 +0000)]
be2net: detect a UE even when a interface is down.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: gracefully handle situations when UE is detected
Ajit Khaparde [Fri, 11 Feb 2011 13:38:17 +0000 (13:38 +0000)]
be2net: gracefully handle situations when UE is detected

Avoid accessing the hardware when UE is detected.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix be_suspend/resume/shutdown
Ajit Khaparde [Fri, 11 Feb 2011 13:38:03 +0000 (13:38 +0000)]
be2net: fix be_suspend/resume/shutdown

> call pci msix disable in be_suspend
> call pci msix enable in be_resume
> stop worker thread in be_suspend
> start worker thread in be_resume
> stop worker thread in be_shutdown

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: pass proper hdr_size while flashing redboot.
Ajit Khaparde [Fri, 11 Feb 2011 13:37:42 +0000 (13:37 +0000)]
be2net: pass proper hdr_size while flashing redboot.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix broken priority setting when vlan tagging is enabled.
Ajit Khaparde [Fri, 11 Feb 2011 13:37:25 +0000 (13:37 +0000)]
be2net: Fix broken priority setting when vlan tagging is enabled.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Allow VFs to call be_cmd_reset_function.
Ajit Khaparde [Fri, 11 Feb 2011 13:36:57 +0000 (13:36 +0000)]
be2net: Allow VFs to call be_cmd_reset_function.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: pass domain numbers for pmac_add/del functions
Ajit Khaparde [Fri, 11 Feb 2011 13:36:37 +0000 (13:36 +0000)]
be2net: pass domain numbers for pmac_add/del functions

be_cmd_pmac_add/del functions need to pass domain number to the firmware.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: For the VF MAC, use the OUI from current MAC address
Ajit Khaparde [Fri, 11 Feb 2011 13:36:18 +0000 (13:36 +0000)]
be2net: For the VF MAC, use the OUI from current MAC address

Currently we are always using the Emulex OUI for a VF MAC address
while generating MAC for a VF.  Use OUI from current MAC instead.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Cleanup the VF interface handles
Ajit Khaparde [Fri, 11 Feb 2011 13:35:56 +0000 (13:35 +0000)]
be2net: Cleanup the VF interface handles

The PF needs to cleanup all the interface handles that it created for the VFs.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: call be_vf_eth_addr_config() after register_netdev
Ajit Khaparde [Fri, 11 Feb 2011 13:35:41 +0000 (13:35 +0000)]
be2net: call be_vf_eth_addr_config() after register_netdev

This is to avoid the completion processing for be_vf_eth_addr_config
to consume the link status notification before netdev_register.
Otherwise this causes the PF miss its first link status update.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Initialize and cleanup sriov resources only if pci_enable_sriov has succeeded.
Ajit Khaparde [Fri, 11 Feb 2011 13:35:02 +0000 (13:35 +0000)]
be2net: Initialize and cleanup sriov resources only if pci_enable_sriov has succeeded.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Use domain id when be_cmd_if_destroy is called.
Ajit Khaparde [Fri, 11 Feb 2011 13:34:46 +0000 (13:34 +0000)]
be2net: Use domain id when be_cmd_if_destroy is called.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: endianness fix in be_cmd_set_qos().
Ajit Khaparde [Fri, 11 Feb 2011 13:33:02 +0000 (13:33 +0000)]
be2net: endianness fix in be_cmd_set_qos().

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: While configuring QOS for VF, pass proper domain id
Ajit Khaparde [Fri, 11 Feb 2011 13:32:32 +0000 (13:32 +0000)]
be2net: While configuring QOS for VF, pass proper domain id

While configuring QOS for VFs, the VF number should be translated
to domain number correctly.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sat, 12 Feb 2011 05:09:04 +0000 (21:09 -0800)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

13 years agobatman-adv: Disallow originator addressing within mesh layer
Linus Lüssing [Mon, 7 Feb 2011 00:14:40 +0000 (00:14 +0000)]
batman-adv: Disallow originator addressing within mesh layer

For a host in the mesh network, the batman layer should be transparent.
However, we had one exception, data packets within the mesh network
which have the same destination as a originator are being routed to
that node, although there is no host that node's bat0 interface and
therefore gets dropped anyway. This commit removes this exception.

Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Remove duplicate types.h inclusions
Linus Lüssing [Sun, 6 Feb 2011 23:08:37 +0000 (23:08 +0000)]
batman-adv: Remove duplicate types.h inclusions

types.h is included by main.h, which is included at the beginning of any
other c-file anyway. Therefore this commit removes those duplicate
inclussions.

Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Split combined variable declarations
Marek Lindner [Tue, 8 Feb 2011 12:43:54 +0000 (12:43 +0000)]
batman-adv: Split combined variable declarations

Multiple variable declarations in a single statements over multiple lines can
be split into multiple variable declarations without changing the actual
behavior.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agoatl1: Do not use legacy PCI power management
Rafael J. Wysocki [Thu, 10 Feb 2011 06:55:19 +0000 (06:55 +0000)]
atl1: Do not use legacy PCI power management

The atl1 driver uses the legacy PCI power management, so it has to
do some PCI-specific things in its ->suspend() and ->resume()
callbacks, which isn't necessary and should better be done by the PCI
subsystem-level power management code.

Convert atl1 to the new PCI power management framework and make it
let the PCI subsystem take care of all the PCI-specific aspects of
device handling during system power transitions.

Tested-by: Thomas Fjellstrom <thomas@fjellstrom.ca>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1c: Do not call device_init_wakeup() in atl1c_probe()
Rafael J. Wysocki [Thu, 10 Feb 2011 06:54:04 +0000 (06:54 +0000)]
atl1c: Do not call device_init_wakeup() in atl1c_probe()

The atl1c driver shouldn't call device_init_wakeup() in its probe
routine with the second argument equal to 1, because for PCI devices
the wakeup capability setting is initialized as appropriate by the
PCI subsystem.  Remove the potentially harmful call.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Avoid setting power.can_wakeup for devices that cannot wake up
Rafael J. Wysocki [Thu, 10 Feb 2011 06:53:09 +0000 (06:53 +0000)]
tg3: Avoid setting power.can_wakeup for devices that cannot wake up

The tg3 driver uses device_init_wakeup() in such a way that the
device's power.can_wakeup flag may be set even though the PCI
subsystem cleared it before, in which case the device cannot wake
up the system from sleep states.  Modify the driver to only change
the power.can_wakeup flag if the device is not capable of generating
wakeup signals.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: Adding 100MB FULL support in ethtool
Atita Shirwaikar [Wed, 5 Jan 2011 02:00:55 +0000 (02:00 +0000)]
ixgbe: Adding 100MB FULL support in ethtool

Current driver does not show 100MB support in ethtool.
Adding support for the same.

Signed-off-by: Atita Shirwaikar <atita.shirwaikar@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup ixgbe_init_mbx_params_pf namespace issue
Don Skidmore [Fri, 28 Jan 2011 02:28:36 +0000 (02:28 +0000)]
ixgbe: cleanup ixgbe_init_mbx_params_pf namespace issue

The function ixgbe_init_mbx_params_pf isn't used unless CONFIG_PCI_IOV
is defined.  This is causing namespace warnings.  So I wrapped its
definition in CONFIG_PCI_IOV too.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup namespace complaint by removing little used function
Don Skidmore [Fri, 28 Jan 2011 02:28:31 +0000 (02:28 +0000)]
ixgbe: cleanup namespace complaint by removing little used function

We had a support function that just walked a few pointers to get
from the ixgbe_hw struct to the netdev pointer.  This was causing
a namespace warning so I removed it and just reference the pointers
directly.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix namespace issue with ixgbe_dcb_txq_to_tc
Don Skidmore [Fri, 28 Jan 2011 02:28:26 +0000 (02:28 +0000)]
ixgbe: fix namespace issue with ixgbe_dcb_txq_to_tc

We didn't need the prototype and it was causing namespace complaints so
I made it static.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, use hardware independent routines
John Fastabend [Wed, 5 Jan 2011 04:48:45 +0000 (04:48 +0000)]
ixgbe: DCB, use hardware independent routines

This consolidates hardware specifics to ixgbe_dcb.c this simplifies
code that was previously branching based on hardware type.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, remove RESET bit it is no longer needed
John Fastabend [Fri, 7 Jan 2011 15:30:46 +0000 (15:30 +0000)]
ixgbe: DCB, remove RESET bit it is no longer needed

This removes the RESET bit previously used to force a device
reset when DCB bandwidth configurations were changed. This can
now be done dynamically without a reset so the bit is no longer
needed. The only remaining operations that force a device reset
are DCB enable/disable and FCoE application priority changes.
DCB enable/disable is a hardware requirement.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, do not reset on CEE pg changes
John Fastabend [Sat, 22 Jan 2011 06:07:05 +0000 (06:07 +0000)]
ixgbe: DCB, do not reset on CEE pg changes

The 82599 and 82598 devices do not require hardware resets to
configure CEE pg settings. This patch changes DCB configuration
to set the CEE pg values directly from the dcbnl ops routine.

This reduces the number of resets seen on the wire and allows
LLDP to reach a steady state faster.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, implement 802.1Qaz routines
John Fastabend [Thu, 10 Feb 2011 14:40:01 +0000 (14:40 +0000)]
ixgbe: DCB, implement 802.1Qaz routines

Implements 802.1Qaz support for ixgbe driver. Additionally,
this adds IEEE_8021QAZ_TSA_{} defines to dcbnl.h this is to
avoid having to use cryptic numeric codes for the TSA type.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, abstract out dcb_config from DCB hardware configuration
John Fastabend [Wed, 5 Jan 2011 04:47:43 +0000 (04:47 +0000)]
ixgbe: DCB, abstract out dcb_config from DCB hardware configuration

Currently the routines that configure the HW for DCB require a
ixgbe_dcb_config structure. This structure was designed to support
the CEE standard and does not match the IEEE standard well.

This patch changes the HW routines in ixgbe_dcb_8259x.{ch} to use
raw pfc and bandwidth values. This requires some parsing of the DCB
configuration but makes the HW routines independent of the data
structure that contains the DCB configuration.

The primary advantage to doing this is we can do HW setup directly
from the 802.1Qaz ops without having to arbitrarily encapsulate this
data into the CEE structure.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, remove round robin mode on 82598 devices
John Fastabend [Wed, 5 Jan 2011 04:47:38 +0000 (04:47 +0000)]
ixgbe: DCB, remove round robin mode on 82598 devices

Remove round robin configuration code for 82598 parts it
is not settable and is always false.

If we need/want this in the future we can add it back properly.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>