Commit Graph

244289 Commits

Author SHA1 Message Date
amit salecha
8b5933c380 net: ethtool support to configure number of channels
Ethtool support to configure RX, TX and other channels. combined field
in struct ethtool_channels to reflect set of channel (RX, TX or other).
Other channel can be link interrupts, SR-IOV coordination etc.

ETHTOOL_GCHANNELS will report max and current number of RX channels,
max and current number of TX channels, max and current number of other channel
or max and current number of combined channel.

Number of channel can be modify upto max number of channel through
ETHTOOL_SCHANNELS command.

Ben Hutchings:
o define 'combined' and 'other' types.  Most multiqueue drivers pair up RX and TX
  queues so that most channels combine RX and TX work.
o Please could you use a kernel-doc comment to describe the structure.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-13 11:31:04 -07:00
David S. Miller
6139e75f4a net: Missing 'inline' in vlan-disabled vlan_untag()
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 19:27:51 -07:00
David S. Miller
a7e7015888 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2011-04-12 16:16:02 -07:00
David S. Miller
24743537d3 atm: iphase: Fix set-but-not-used warnings.
The "iavcc" and "iadev" cases are obvious.

The intr_status and frmr_intr cases are reading a register to clear
the chip status.  This driver is pretty old and creaky, and uses
volatile pointer dereferences to do register I/O when it should be
using readl() and friends.  However that it outside of the scope of
these changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 16:14:21 -07:00
David S. Miller
095d3da610 9p: Kill set but unused variable in 9p_client_{read,write}() and p9_client_readdir()
Fixes the following warnings:

net/9p/client.c:1305:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]
net/9p/client.c:1370:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]
net/9p/client.c:1769:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 15:58:41 -07:00
Michał Mirosław
1aac626716 net: vlan_features comment clarification
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:54:24 -07:00
Michał Mirosław
6d95ff974a net: ioc3: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:45 -07:00
Michał Mirosław
66371c4413 net: bnx2x: convert to hw_features
Since ndo_fix_features callback is postponing features change when
bp->recovery_state != BNX2X_RECOVERY_DONE, netdev_update_features()
has to be called again when this condition changes. Previously,
ethtool_ops->set_flags callback returned -EBUSY in that case
(it's not possible in the new model).

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

v5: - don't delay set_features, as it's rtnl_locked - same as recovery process
v4: - complete bp->rx_csum -> NETIF_F_RXCSUM conversion
    - add check for failed ndo_set_features in ndo_open callback
v3: - include NETIF_F_LRO in hw_features
    - don't call netdev_update_features() if bnx2x_nic_load() failed
v2: - comment in ndo_fix_features callback
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:44 -07:00
Michał Mirosław
e5ee20e70f net: bna: convert to hw_features
Note: looks like bnad->conf_mutex is duplicating rtnl_lock.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:44 -07:00
Michał Mirosław
d1423c7ab8 net: ps3_gelic: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:43 -07:00
Michał Mirosław
f5d640371d net: sky2: convert to hw_features
Caveats:
 - driver modifies vlan_features on HW VLAN TX changes
 - broken RX checksum will be reenabled on features change

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:50:42 -07:00
Michał Mirosław
872674858f net: add RTNL_ASSERT in __netdev_update_features()
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:36:07 -07:00
Jiri Pirko
bcc6d47903 net: vlan: make non-hw-accel rx path similar to hw-accel
Now there are 2 paths for rx vlan frames. When rx-vlan-hw-accel is
enabled, skb is untagged by NIC, vlan_tci is set and the skb gets into
vlan code in __netif_receive_skb - vlan_hwaccel_do_receive.

For non-rx-vlan-hw-accel however, tagged skb goes thru whole
__netif_receive_skb, it's untagged in ptype_base hander and reinjected

This incosistency is fixed by this patch. Vlan untagging happens early in
__netif_receive_skb so the rest of code (ptype_all handlers, rx_handlers)
see the skb like it was untagged by hw.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>

v1->v2:
	remove "inline" from vlan_core.c functions
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 14:15:19 -07:00
Allan, Bruce W
143780c656 ethtool: time to blink provided in seconds not jiffies
When blinking for a duration set by the user, the value specified is in
seconds but it is used as the number of jiffies in the timeout after which
the Physical ID indicator is deactivated.  Fix by converting the timeout
to seconds.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 13:47:33 -07:00
John W. Linville
252f4bf400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/ath/ar9170/main.c
	drivers/net/wireless/ath/ar9170/phy.c
	drivers/net/wireless/zd1211rw/zd_rf_rf2959.c
2011-04-12 16:18:44 -04:00
Jon Mason
6ba1037c3d vxge: update driver version
Update vxge driver version to 2.5.3

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 11:22:34 -07:00
Jon Mason
9f9b164581 vxge: spin-lock issue
In vxge_hw_vpath_close, __vxge_hw_vp_terminate memsets the vpath which
clobbers the spin lock state, then the driver attempts to acquire the
spin lock.  Resolve this by not zeroing the lock part of vpath struct,
clean-up vpath locking in init, close, and fix locking hole in fw_api
call.

Issue found by Bob Picco <bpicco@redhat.com>

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 11:22:34 -07:00
Jon Mason
cd883a791b vxge: always enable hardware time stamp
Hardware time stamp calculation can only be enabled by the privileged
function. Enable it always by default and simply use the ethtool
interface to set a flag to indicate whether or not the respective
function driver should indicate the timestamp along with the received
packet.

Also, make certain fields in vxge_hw_device_config bit-fields to reduce
the size of the struct.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-12 11:22:33 -07:00
David S. Miller
d83d282bcb s2io: Fix warnings due to -Wunused-but-set-variable.
Most of these are cases where we are trying to read back a register
after a write to ensure completion.

Simply pre-fixing the readl() or readq() with "(void)" is sufficient
because these are volatile operations and the compiler cannot eliminate
them just because no real assignment takes place.

The case of free_rxd_blk()'s assignments to "struct buffAdd *ba" is a
real spurious assignment as this variable is completely otherwise
unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jon Mason <jdmason@kudzu.us>
2011-04-12 11:21:30 -07:00
David S. Miller
f344c25dba niu: Fix warnings due to -Wunused-but-set-variable
Most of these were legitimate, and once case was a real bug
(not propagating errors from ->xcvr_init() methods).

Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 15:49:26 -07:00
Sjur Brændeland
39b9afbb4c caif: Add BUG_ON if dev_info is missing in packet
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 15:08:48 -07:00
Sjur Brændeland
4dd820c088 caif: Don't resend if dev_queue_xmit fails.
If CAIF Link Layer returns an error, we no longer try to re-build the
CAIF packet and resend it. Instead, we simply return any transmission
errors to the socket client.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 15:08:48 -07:00
Stephen Hemminger
73d6ac633c caif: code cleanup
Cleanup of new CAIF code.
  * make local functions static
  * remove code that is never used
  * expand get_caif_conf() since wrapper is no longer needed
  * make args to comparison functions const
  * rename connect_req_to_link_param to keep exported names
    consistent

Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 15:08:47 -07:00
David S. Miller
1c01a80cfe Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/smsc911x.c
2011-04-11 13:44:25 -07:00
Ben Hutchings
c44d79950b niu: Recognise original ethtool class code for AH/ESP flow hashing
When the RX network flow classification interface was originally
defined for reporting and controlling of flow hashing, AH and ESP were
not given distinct flow class codes (apparently because the Sun
Neptune hardware treats them very similarly).

For flow steering, they must be distinguished, so new and separate
flow class codes were added for AH and ESP.  But for backward-
compatibility, flow hash operations should continue to support the
original class codes.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:28:44 -07:00
Ben Hutchings
bde3528f17 gianfar: Clean up implementation of RX network flow classification
This code was cribbed from niu, so gfar_set_hash_opts() begins by
converting the ethtool flow class code into a class code for Sun
Neptune hardware, then does the same thing again for the hardware it's
really dealing with.  It may also return -1 (-EPERM) for some
unhandled ethtool flow class codes.

Remove the useless code and definitions, and fix the error code.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:28:43 -07:00
stephen hemminger
1b3291241a qlge: use ethtool set_phys_id
This is a stab at replacing old ethtool phys_id with set_phys_id
on the Qlogic 10Gb driver. Compile tested only.

Not sure if set_led_cfg will flash continuously, or needs
to be replaced by ETHTOOL_ID_ON/ETHTOOL_ID_OFF

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:22:34 -07:00
Alexander Duyck
127fe533ae v3 ethtool: add ntuple flow specifier data to network flow classifier
This change is meant to add an ntuple data extensions to the rx network flow
classification specifiers.  The idea is to allow ntuple to be displayed via
the network flow classification interface.

The first patch had some left over stuff from the original flow extension
flags I had added.  That bit is removed in this patch.

The second had some left over comments that stated we ignored bits in the
masks when we actually match them.

This work is based on input from Ben Hutchings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:20:49 -07:00
Alexander Duyck
5d9f11cf50 ethtool: prevent null pointer dereference with NTUPLE set but no set_rx_ntuple
This change is meant to prevent a possible null pointer dereference if
NETIF_F_NTUPLE is defined but the set_rx_ntuple function pointer is not.

The main motivation behind this patch is to eventually replace the ntuple
interfaces entirely with the network flow classifier interfaces.  This
allows the device drivers to maintain the ntuple check internally while
using the network flow classifier interface for setting up and displaying
rules.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:20:49 -07:00
Sjur Brændeland
4a9f65f630 caif: performance bugfix - allow radio stack to prioritize packets.
In the CAIF Payload message the Packet Type indication must be set to
    UNCLASSIFIED in order to allow packet prioritization in the modem's
    network stack. Otherwise TCP-Ack is not prioritized in the modems
    transmit queue.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:58 -07:00
Sjur Brændeland
0c184ed903 caif: Bugfix use for_each_safe when removing list nodes.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:57 -07:00
amit salecha
c968bdf691 netxen: limit skb frags for non tso packet
Machines are getting deadlock in four node cluster environment.
All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null)
200 GB storage on a GFS2 filesystem.
This result in memory fragmentation and driver receives 18 frags for
1448 byte packets.
For non tso packet, fw drops the tx request, if it has >14 frags.

Fixing it by pulling extra frags.

Cc: stable@kernel.org
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:57 -07:00
Peter Pan(潘卫平)
77c8e2c015 bonding:fix two typos
replace relpy with reply.
replace premanent with permanent.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:56 -07:00
Peter Pan(潘卫平)
9814290ad0 net: fix tranmitted/tranmitting typo
replace tranmitted with transmitted.
replace tranmitting with transmitting.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:56 -07:00
Peter Pan(潘卫平)
26f007b85a bonding:delete unused rlb_interval_counter
Now, alb_bond_info uses rx_ntt,rlb_update_delay_counter and
rlb_update_retry_counter to decide when to call rlb_update_rx_clients().

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:55 -07:00
Peter Pan(潘卫平)
3b64756845 bonding:delete unused alb_timer
Now bonding-alb uses delayed_work instead of timer_list.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:55 -07:00
Peter Pan(潘卫平)
38dbaf0afb bonding:set save_load to 0 when initializing
It is unnecessary to set save_load to 1 here,
as the tx_hashtbl is just kzalloced.

Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 13:15:54 -07:00
Giuseppe CAVALLARO
a08070acd4 stmmac: fix Transmit Underflow error
On some old MAC chips without COE sometime the
Transmit Underflow error is issued.

The driver aborted all the transmission process
and initialized it from scratch.
This breaks the network activity as raised by Nachiketa
on a SPEAr board.

The patch is to fix this rare underflow event.
The driver will only clear the interrupt and the Tx
DMA will go out the Suspend state as soon as the
descriptor is fetched again.
The driver will continue to bump-up the DMA FIFO threshold
that, indeed, helped somebody to prevent this kind of error
in the past as well.

Reported-by: Nachiketa Prachanda <nprachanda@ncomputing.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 12:55:48 -07:00
Giuseppe CAVALLARO
f66ffe2859 stmmac: fix open funct when exit on error
This patch reviews the open function and fixes some
errors when exit with an error state.
It also moves the request_irq after core is initialized
when interrupts are properly masked.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Hacked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 12:55:47 -07:00
Giuseppe CAVALLARO
bded18c2dd stmmac: fixed dma lib build when turn-on the debug option
This patch fixes a compilation error when build the
dwmac_lib with the DEBUG option enabled.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-11 12:55:47 -07:00
David S. Miller
0e10b33a05 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2011-04-11 12:53:51 -07:00
John W. Linville
4a39e78168 iwlegacy: make iwl3945 and iwl4965 select IWLWIFI_LEGACY
Otherwise, IWLWIFI_LEGACY has to be selected independently before the
drivers are made available.

Reported-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-11 13:56:07 -04:00
Linus Torvalds
b42282e5a0 pci: fix PCI bus allocation alignment handling
In commit 13583b1659 ("PCI: refactor io size calculation code") Ram
had a thinko in the refactorization of the code: the end result used the
variable 'align' for the bus alignment, but the original code used
'min_align'.

Since then, another use of that 'align' variable got introduced by
commit c8adf9a3e8 ("PCI: pre-allocate additional resources to devices
only after successful allocation of essential resources.")

Fix both of those uses to use 'min_align' as they should.

Daniel Hellstrom <daniel@gaisler.com>
Acked-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-11 10:53:11 -07:00
Linus Torvalds
c44eaf41a5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
  net: Add support for SMSC LAN9530, LAN9730 and LAN89530
  mlx4_en: Restoring RX buffer pointer in case of failure
  mlx4: Sensing link type at device initialization
  ipv4: Fix "Set rt->rt_iif more sanely on output routes."
  MAINTAINERS: add entry for Xen network backend
  be2net: Fix suspend/resume operation
  be2net: Rename some struct members for clarity
  pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
  dsa/mv88e6131: add support for mv88e6085 switch
  ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
  be2net: Fix a potential crash during shutdown.
  bna: Fix for handling firmware heartbeat failure
  can: mcp251x: Allow pass IRQ flags through platform data.
  smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
  iwlwifi: accept EEPROM version 0x423 for iwl6000
  rt2x00: fix cancelling uninitialized work
  rtlwifi: Fix some warnings/bugs
  p54usb: IDs for two new devices
  wl12xx: fix potential buffer overflow in testmode nvs push
  zd1211rw: reset rx idle timer from tasklet
  ...
2011-04-11 07:27:24 -07:00
Steve Glendinning
88edaa4159 net: Add support for SMSC LAN9530, LAN9730 and LAN89530
This patch adds support for SMSC's LAN9530, LAN9730 and LAN89530 USB
ethernet controllers to the existing smsc95xx driver by adding
their new USB VID/PID pairs.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:59:27 -07:00
Michał Mirosław
8d7dfc2b57 net: bnx2: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:21 -07:00
Michał Mirosław
f593fe3632 net: via-velocity: convert to hw_features
Trivial conversion.

This also enables toggling TX VLAN offload and fixes TX checksumming
race with offload changes.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:21 -07:00
Michał Mirosław
e6a46416d4 net: ksz884x: convert to hw_features
This also fixes possible race when changing receive checksum state
and removes IPV6_CSUM_GEN_HACK as it's always set.

BTW, The claim about fake IPV6 checksum looks dubious. If that were true,
then there's a problem in networking core and should be fixed there and not
in random drivers.

BTW#2, there's no MAINTAINERS entry for this driver. I assume this driver
is supported by Micrel?

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:20 -07:00
Michał Mirosław
5e982f3bfd net: stmmac: convert to hw_features
This also removes TSO as it's made fully in software --- better to leave this
to networking core.

If the MAC features can be detected at probe time and not at open, then
stmmac_fix_features could be simplified by limiting hw_features. That's
also better for users as they don't see offloads being togglable but
never turned on.

Redundant fallbacks for TX csum are removed as it's already handled
by network core.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:19 -07:00
Michał Mirosław
044a890c5a net: 8139cp: convert to hw_features
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-04-10 18:55:19 -07:00