dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

289081 Commits

Author SHA1 Message Date
Igor Maravic 036dafa28d r8169: add byte queue limit support.
Nothing fancy:
- sent bytes count is notified in the start_xmit path right before
  updating the owner bit in the hardware Tx descriptor (E. Dumazet)
- avoid useless tp->dev dereferencing in start_xmit (E. Dumazet)

Use of netdev_reset_queue is favored over proper accounting in
rtl8169_tx_clear_range since the latter would need more work for the
same result (nb: said accounting degenerates to nothing in xmit_frags).

Signed-off-by: Igor Maravic <igorm@etf.rs>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
2012-03-06 00:24:26 +01:00
Junchang Wang 8027aa245b r8169: add 64bit statistics.
Switch to use ndo_get_stats64 to get 64bit statistics.
Two sync entries are used (one for Rx and one for Tx).

Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-03-06 00:23:51 +01:00
Eric Dumazet 18f973af3e mlx4_en: remove sparse errors
Fix new sparse errors introduced in commit 6221217199 (mlx4_en: dont
change mac_header on xmit)

Reported-by: Or Gerlitz <or.gerlitz@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-05 16:42:45 -05:00
David S. Miller 7c1e51a34a Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2012-03-05 16:39:02 -05:00
Eric Dumazet 77a1abf54f net: export netdev_stats_to_stats64
Some drivers use internal netdev stats member to store part of their
stats, yet advertize ndo_get_stats64() to implement some 64bit fields.

Allow them to use netdev_stats_to_stats64() helper to make the copy of
netdev stats before they compute their 64bit counters.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-05 15:38:32 -05:00
John W. Linville 051d3b5043 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-03-05 15:05:54 -05:00
David S. Miller ffcb97388b Merge branch 'master' of git://gitorious.org/linux-can/linux-can-next 2012-03-04 21:59:39 -05:00
Shreyas Bhatewara 4c1dc80a74 vmxnet3: Fix log messages and corrects some typos
Fix log messages and corrects some typos

Change logging of failure to enable MSI/MSI-X to display device's PCI
address instead of eth%d. Rectify a typo.

Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Reviewed-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 21:37:51 -05:00
Matt Carlson 0b47150671 tg3: Recode PCI MRRS adjustment as a PCI quirk
This patch recodes the MRRS cap for 5719 A0 devices as a PCI quirk.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:54:01 -05:00
Paul Gortmaker e19a82c18f ucc_geth: separate out rx/tx ring alloc and free operations
Factor out the the existing allocation and free operations
so that they can be used individually.

This is to improve code readability, and also to prepare for
possible future changes like better error recovery and more
dynamic configuration (e.g on-the-fly resizing of the rings).

This change represents a straight up relocation of the existing
code into separate routines without changing any of the contained
code itself.  Local variables are relocated as necessary.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:54:01 -05:00
Paul Mackerras 4b32da2bcf ppp: Replace uses of <linux/if_ppp.h> with <linux/ppp-ioctl.h>
Since all that include/linux/if_ppp.h does is #include <linux/ppp-ioctl.h>,
this replaces the occurrences of #include <linux/if_ppp.h> with
#include <linux/ppp-ioctl.h>.

It also corrects an error in Documentation/networking/l2tp.txt, where
it referenced include/linux/if_ppp.h as the source of some definitions
that are actually now defined in include/linux/if_pppol2tp.h.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:41:38 -05:00
Paul Mackerras bf7daebb9f ppp: Move ioctl definitions from if_ppp.h to new ppp-ioctl.h
This moves the definitions of the ioctls, constants and structures
relating to the ppp_generic interface to userspace out from if_ppp.h
to a new file, ppp-ioctl.h.  The new file has my copyright since I
designed and implemented the ppp_generic interface in the late 1990s.
None of the contents of this file comes from the original if_ppp.h
published by Carnegie Mellon University.

Of the remainder of if_ppp.h, only the PPP_MTU definition was being
used, and this replaces the uses of it with PPP_MRU (which is identical).
Therefore, this replaces the entire file with the single line

#include <linux/ppp-ioctl.h>

which clearly doesn't contain any CMU code.  Thus I have removed the
CMU copyright notice with its problematic advertising clause, and in
fact since it's only one trivial line I have not added any other
copyright notice.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:41:38 -05:00
Paul Mackerras 784db3f062 ppp: Change copyright notices from ANU to me
This changes the copyright notices on the PPP code that I developed
in the late 1990s from being copyright The Australian National
University to copyright Paul Mackerras.  I can do this as I have an
acknowledgement in writing from the Head of the Computer Science
Department at ANU (where I worked then) that ANU does not claim any
intellectual property in this code.

While I'm at it, change the copyright notice from BSD-style to
GNU GPL like the rest of the kernel.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:41:38 -05:00
Michael Chan 2fae5e3670 tg3: Fix poor tx performance on 57766 after MTU change
GRC reset causes the read DMA engine to go into a mode that breaks up
requests into 256 bytes.  A PHY reset is required to bring it back to
the normal mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:39:31 -05:00
Michael Chan 6541b806b5 tg3: Add memory barriers to sync BD data
for weak memory model architectures to ensure that the chip will DMA
valid BD data.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:39:31 -05:00
Michael Chan c441b45676 tg3: Fix jumbo loopback test on 5719
Loopback on 9K packet fails because the chip has a DMA limit of 4K.  The
loopback test logic uses a single BD for simplicity.  Fix it by reducing
the jumbo packet size to the DMA limit.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Reviewed-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-04 20:39:31 -05:00
David S. Miller 2556cd8603 mdio.h: Include linux/types.h
Fixes:

/home/davem/src/GIT/net-next/usr/include/linux/mdio.h:271: found __[us]{8,16,32,64} type without #include <linux/types.h>

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-03 15:04:45 -05:00
David S. Miller 8f9c208fc4 Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next 2012-03-03 14:57:11 -05:00
Stephane Grosjean d8a199355f can: usb: PEAK-System Technik PCAN-USB Pro specific part
This patch adds the specific part which handles the PCAN-USB Pro adapter
from PEAK-System Technik (http://www.peak-system.com). The PCAN-USB Pro
adapter is a dual-channel USB 2.0 adapter compliant with CAN specifications

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-03-03 17:40:58 +01:00
Stephane Grosjean 46be265d33 can: usb: PEAK-System Technik PCAN-USB specific part
This patch adds the specific part which handles the PCAN-USB adapter from
PEAK-System Technik (http://www.peak-system.com). The PCAN-USB adapter is
a sja1000 based, mono-channel USB 1.1 adapter compliant with CAN
specifications 2.0A (11-bit ID) and 2.0B (29-bit ID).

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-03-03 17:40:55 +01:00
Stephane Grosjean bb4785551f can: usb: PEAK-System Technik USB adapters driver core
This patch adds the core of the peak_usb driver which handles PEAK-System
Technik PCAN USB adapters. It defines the parts which are common to the
PCAN-USB adapters: can network interfaces management, network-to/from-usb
data path interface, timestamps management...

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-03-03 17:40:51 +01:00
Stephane Grosjean 2b61972b74 can: sja1000: add support for PEAK-System PCMCIA card
This patch adds support to the PCAN-PC Card PCMCIA card from
PEAK-System Technik (www.peak-system.com). This card is a CAN interface
for the PC Card slot. It is available as a single or dual-channel version.

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-03-03 17:40:46 +01:00
Stephane Grosjean e6d9c80b7c can: peak_pci: add support of some new PEAK-System PCI cards
This patch adds the support of some new PEAK-System PCI cards in the CAN
network sub-system. These are:

PCAN-PCIeC (PCI-ExpressCard)
PCAN-mminiPCI (mini-PCI)
PCAN-PCI (PCI next-gen)

This patch also adds the control of the blinking leds of the PCAN-PCIeC.

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-03-03 17:40:39 +01:00
Danny Kukawka 224223aaf9 can: cc770: linux/can/dev.h included twice
drivers/net/can/cc770/cc770.c included 'linux/can/dev.h' twice,
remove the duplicate.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-03-03 17:40:32 +01:00
Samuel Jero f541fb7e20 dccp: fix bug in sequence number validation during connection setup
This fixes a bug in the sequence number validation during the initial handshake.

The code did not treat the initial sequence numbers ISS and ISR as read-only and
did not keep state for GSR and GSS as required by the specification. This causes
problems with retransmissions during the initial handshake, causing the
budding connection to be reset.

This patch now treats ISS/ISR as read-only and tracks GSS/GSR as required.

Signed-off-by: Samuel Jero <sj323707@ohio.edu>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
2012-03-03 09:02:52 -07:00
Gerrit Renker 793734b587 dccp ccid-3: replace incorrect BUG_ON
This replaces an unjustified BUG_ON(), which could get triggered under normal
conditions: X_calc can be 0 when p > 0. X would in this case be set to the
minimum, s/t_mbi. Its replacement avoids t_ipi = 0 (unbounded sending rate).

Thanks to Jordi, Victor and Xavier who reported this.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.uk>
2012-03-03 09:02:36 -07:00
John Fastabend 2b88f2de30 net: dcb: getnumtcs()/setnumtcs() should return an int
{g|s}etnumtcs() today returns a u8 that is only used by the DCB code
to verify no error occurred. Today the driver implementations return
negative error codes which end up being non-zero so the logic works
out but triggers some sparse warnings.

To fix the sparse warnings convert the return value to an int.

CC: Eilon Greenstein <eilong@broadcom.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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>
2012-03-02 18:16:49 -08:00
John Fastabend 89d27a3c0a ixgbe: dcb: check setup_tc return codes
dcb netlink code calls setup_tc to init hardware traffic classes
to use for DCB. At some call sites the return values are not
checked for errors and in one case may return -EINVAL back to
the net/dcbnl.c caller which is expecting a u8.

This fixes some smatch hits and although failures are never
seen in practive its best to check return codes.

Reported-by: Dan Carenter <dan.carpenter@oracle.com>
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>
2012-03-02 18:11:24 -08:00
Ben Greear 6f66342c1e e100: Show short v/s long rx length errors in ethtool stats.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-02 18:09:27 -08:00
Ben Greear d24d65eda9 e100: Fix rx-over-length statistics.
The old code would += the total errors every time
stats were gathered.  Instead, keep a count of short-pkt
and long-pkt counters and then simply add them together
for the rx-over-length stat.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-03-02 18:07:52 -08:00
David S. Miller b4017c5368 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/ethernet/broadcom/tg3.c

Conflicts in the statistics regression bug fix from 'net',
but happily Matt Carlson originally posted the fix against
'net-next' so I used that to resolve this.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-01 17:57:40 -05:00
Dan Carpenter 413708bbaf enic: fix an endian bug in enic_probe()
"num_vfs" is a u32 but we only use the high 16 bits and the low 16bits
are left as zero.  That isn't a problem for little endian systems but it
will break on big endian ones.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-01 17:23:42 -05:00
Dan Carpenter 73f98eab9b pch_gbe: memory corruption calling pch_gbe_validate_option()
pch_gbe_validate_option() modifies 32 bits of memory but we pass
&hw->phy.autoneg_advertised which only has 16 bits and &hw->mac.fc
which only has 8 bits.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-01 17:23:42 -05:00
Roland Dreier 97767a87f3 be2net: Remove unused OFFSET_IN_PAGE() macro
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-01 17:21:49 -05:00
Ben Hutchings 9c4df53bc3 ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmd
Add comments for ethtool_cmd::phy_address and
ethtool_cmd::mdio_support, and definitions of the flags currently
used in mdio_support.

In the mdio library, assert that its own flags continue to match those
in the ethtool interface.

In the mii library, use the ethtool flag definition and stop
including <linux/mdio.h>.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-01 16:41:26 -05:00
Ben Hutchings 9c717758c9 mdio: Export mdio.h to userland
The ID packing definitions are needed by userland and the register
definitions may also be useful there.

Do not export mdio_phy_id_{is_c45,prtad,devad}() as the use of bool is
problematic and it's not that useful to export only a subset of these.

Do not export MDIO_SUPPORTS_{C22,C45} directly; these flags are only
exposed to userland through struct ethtool_cmd so they should be
defined alongside that with appropriate names.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-01 16:41:22 -05:00
David S. Miller 1e804aecd7 Merge branch 'master' of git://1984.lsi.us.es/net 2012-03-01 15:40:36 -05:00
Greg Rose 48752f6513 rtnetlink: Fix VF IFLA policy
Add VF spoof check to IFLA policy.  The original patch I submitted to
add the spoof checking feature to rtnl failed to add the proper policy
rule that identifies the data type and len.  This patch corrects that
oversight.  No bugs have been reported against this but it may cause
some problem for the netlink message parsing that uses the policy
table.

CC: stable@vger.kernel.org
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:24:00 -08:00
Alexander Duyck 24ddd96780 ixgbe: Fix comments that are out of date or formatted incorrectly
This patch corrects several comments that are either incorrect or formatted
incorrectly for multiline comments.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:22:29 -08:00
Don Skidmore c466d7a733 ixgbe: fix spelling errors
Correct spelling error caught with codespell.py.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:21:07 -08:00
Alexander Duyck 9e0c5648d9 ixgbe: Minor formatting and comment corrections for ixgbe_xmit_frame_ring
This patch is meant to address several minor issues in
ixgbe_xmit_frame_ring.  Specifically it adds a comment explaining the TXSW
flag, and correctly wraps a line over 80 characters.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:19:08 -08:00
Bruce Allan bb9c5ee15b e1000e: use msleep instead of mdelay
The e1000_link_stall_workaround_lv() function is always called in non-
atomic context so it should use msleep instead of mdelay.  Also, remove
unnecessary #include <linux/delay.h>.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:14:19 -08:00
Bruce Allan 3d3a167656 e1000e: cleanup whitespace and indentation
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:12:45 -08:00
Bruce Allan 06c24b915c e1000e: cleanup incorrect filename in comment
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:11:47 -08:00
Ben Greear 0bf61e66a0 e100: Support RXALL feature flag.
This allows the NIC to receive packets with bad FCS
and other errors.  Good for sniffing packets on flakey
networks.

v4:  Only flax rx-over-length errors if pkt is beyond
   maximum expected packet size, not just beyond the MTU.
   This matches the existing logic for this counter.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 23:00:45 -08:00
Ben Greear 75f58a5376 e100: Support sending custom Ethernet CRC
This can aid with testing the RX logic for bad
CRCs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 22:59:53 -08:00
Ben Greear 719cdac54e e100: Support RXFCS feature flag.
This allows e100 to be configured to append the
Ethernet FCS to the skb.

Useful for sniffing networks.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29 22:36:56 -08:00
David S. Miller 06b8db9cac Merge branch 'tipc_net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2012-02-29 23:52:12 -05:00
John W. Linville c288ec614e carl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly"
That commit intended for 3.4 renamed IEEE80211_TX_CTL_POLL_RESPONSE as
IEEE80211_TX_CTL_NO_PS_BUFFER.  Meanwhile, "carl9170: fix frame delivery
if sta is in powersave mode" added a reference to
IEEE80211_TX_CTL_POLL_RESPONSE in the fixes stream for 3.3.  This simple
patch fixes that merge boo-boo.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 15:08:33 -05:00
John W. Linville 8701ff0a88 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-02-29 14:53:21 -05:00