Commit Graph

157423 Commits (9ec04da7489d2c9ae01ea6e9b5fa313ccf3d35fb)

Author SHA1 Message Date
Neil Horman 9ec04da748 net: skb ftracer - Add actual ftrace code to kernel (v3)
skb allocation / consumption correlator

Add ftracer module to kernel to print out a list that correlates a process id,
an skb it read, and the numa nodes on wich the process was running when it was
read along with the numa node the skbuff was allocated on.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

 Makefile            |    1
 trace.h             |   19 ++++++
 trace_skb_sources.c |  154 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 174 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:43:25 -07:00
Neil Horman 5a165657be net: skb ftracer - Add config option to enable new ftracer (v3)
skb allocation / consumption corelator - Add config option

This patch adds a Kconfig option to enable the addtition of the skb source
tracer.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

 Kconfig |   10 ++++++++++
 1 file changed, 10 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:42:37 -07:00
Neil Horman e9b3cc1b37 net: skb ftracer - add tracepoint to skb_copy_datagram_iovec (v3)
skb allocation / cosumption tracer - Add consumption tracepoint

This patch adds a tracepoint to skb_copy_datagram_iovec, which is called each
time a userspace process copies a frame from a socket receive queue to a user
space buffer.  It allows us to hook in and examine each sk_buff that the system
receives on a per-socket bases, and can be use to compile a list of which skb's
were received by which processes.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

 include/trace/events/skb.h |   20 ++++++++++++++++++++
 net/core/datagram.c        |    3 +++
 2 files changed, 23 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:14 -07:00
Wan ZongShun 1e5053b763 Add support for w90p910 mac driver
I fixed up my mac driver, which relatives to previous
mac driver actually in the tree.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:13 -07:00
Phil Sutter 7010837a44 korina: add error-handling to korina_alloc_ring
This also avoids a potential buffer overflow in case the very first
receive descriptor fails to allocate, as an index of -1 would be used
afterwards. Kudos to Roel Kluin for pointing this out and providing an
initial patch.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:12 -07:00
Phil Sutter f16aea4d20 korina: fix printk formatting, add final info line
The macro DRV_NAME contains "korina", the field dev->name points to the
actual interface name. So messages were formerly prefixed with
'korinaeth2:' (on my system).

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:11 -07:00
Fischer, Anna 3982d3d28b net/bridge: Add 'hairpin' port forwarding mode
This patch adds a 'hairpin' (also called 'reflective relay') mode
port configuration to the Linux Ethernet bridge kernel module.
A bridge supporting hairpin forwarding mode can send frames back
out through the port the frame was received on.

Hairpin mode is required to support basic VEPA (Virtual
Ethernet Port Aggregator) capabilities.

You can find additional information on VEPA here:
http://tech.groups.yahoo.com/group/evb/
http://www.ieee802.org/1/files/public/docs2009/new-hudson-vepa_seminar-20090514d.pdf
http://www.internet2.edu/presentations/jt2009jul/20090719-congdon.pdf

An additional patch 'bridge-utils: Add 'hairpin' port forwarding mode'
is provided to allow configuring hairpin mode from userspace tools.

Signed-off-by: Paul Congdon <paul.congdon@hp.com>
Signed-off-by: Anna Fischer <anna.fischer@hp.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:11 -07:00
roel kluin 8dd07086a1 lmc: Read outside array bounds
If dev_alloc_skb() fails on the first iteration of the allocation loop,
then we end up writing before the start of the array.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:10 -07:00
Jens Rosenboom a6fa328665 ipv6: Log the explicit address that triggered DAD failure
If an interface has multiple addresses, the current message for DAD
failure isn't really helpful, so this patch adds the address itself to
the printk.

Signed-off-by: Jens Rosenboom <jens@mcbone.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:10 -07:00
Sarveshwar Bandi 9b0365f195 be2net:Creating/destroying queues regardless of netif_running() in suspend/resume path
Signed-off-by: sarveshwarb <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-13 16:26:09 -07:00
Eilon Greenstein c458bc50e3 bnx2x: update version to 1.52.1
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:03:02 -07:00
Eilon Greenstein ab6ad5a487 bnx2x: Whitespaces and comments
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:03:01 -07:00
Eilon Greenstein 9c63de6293 bnx2x: Removing unused definitions
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:03:00 -07:00
Eilon Greenstein 45a4864d80 bnx2x: Beautify bnx2x_dump.h
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:03:00 -07:00
Eilon Greenstein 573f203574 bnx2x: Re-factor the initialization code
Moving the code to a more logical place and beautifying it. No real change in
behavior.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:59 -07:00
Eilon Greenstein e4ed711337 bnx2x: Using PCI_DEVICE macro
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:58 -07:00
Eilon Greenstein 0fc5d0094d bnx2x: Adding explicit casting
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:58 -07:00
Eilon Greenstein 659bc5c4f2 bnx2x: Using macro for phy address
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:57 -07:00
Eilon Greenstein 1ef70b9c12 bnx2x: Re-arrange the link structures for better alignment
Change ieee_fc to u16 instead of u32 and re-arrange the link parameters
structures

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:56 -07:00
Eilon Greenstein 8924665a7d bnx2x: Missing smp_wmb for statistics state machine
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:55 -07:00
Eilon Greenstein 57937203aa bnx2x: Remove SGMII configuration when not required
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:54 -07:00
Eilon Greenstein 6f65497b56 bnx2x: Keep only one HW path active
Disable bmac access while working with emac and keep the single lane SerDes in
reset while working with 4 lanes XGXS

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:54 -07:00
Eilon Greenstein 54016b260e bnx2x: Check unzip return code
Without this check, when running out of memory, we will see PSOD's in
bnx2x_init_fill() when doing a memset().  This is because at that time,
bp->gunzip_buf is not pointing to a valid allocated space.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:53 -07:00
Eilon Greenstein 5ff7b6d4c1 bnx2x: Remove the init_dmae field from bp
Moved the dmae_command from the heap to the stack.  This will save 56
bytes per bnx2x structure.   As a side benefit, we can also reduce the
time the dmae_mutex is held.  This is because do we not need to hold
this mutex when setting up the dmae command.  The memory where is dmae
command is stored is not a shared resource and doesn not need to be
protected.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:53 -07:00
Eilon Greenstein 0d28e49a26 bnx2x: Updating regdump_len at drvinfo
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:52 -07:00
Eilon Greenstein 938cf5416d bnx2x: Move printing of version from probe to the init
Move printing of version from probe to the init function
Rather then checking if this is the first module probe call to print
the version of the driver only once, the statement is moved to the init
function of the module where init is only called once

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:51 -07:00
Eilon Greenstein 37f9ce6231 bnx2x: Combine get_pcie_width and get_pcie_speed
The functions bnx2x_get_pcie_width() and bnx2x_get_pcie_speed() were
combined into bnx2x_get_pcie_width_speed() so that there is only
1 PCI read to PCICFG_OFFSET + PCICFG_LINK_CONTROL rather then 2 reads.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:50 -07:00
Eilon Greenstein e3553b29c6 bnx2x: Stop loading if error condition detected
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:48 -07:00
Eilon Greenstein df4770de03 bnx2x: Calling pci_set_drvdata earlier
In case of error, bnx2x_init_dev calls pci_set_drvdata(pdev, NULL)

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:45 -07:00
Eilon Greenstein a18f512882 bnx2x: Configurable pause scheme
When a given ring is running out of space, the FW can send pause towards the
network. When working with multi-queues, when one queue is getting out of space
it can block all other queues. The preferred scheme is to send pause frames only
when running out of the shared internal chip buffers and if a given queue cannot
place a packet on the host, it will drop it. Since some users might want to work
in drop-less mode, allowing changing the behavior as a module parameter.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:42 -07:00
Eilon Greenstein a119a06934 bnx2x: Adding Likely directive
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:41 -07:00
Eilon Greenstein 619e7a66b5 bnx2x: Prefetch the page containing the BD descriptor
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:39 -07:00
Eilon Greenstein 6fe49bb978 bnx2x: Reporting host statistics to management FW
This is required for NCSI statistics

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:38 -07:00
Eilon Greenstein cdea52128f bnx2x: Removing old PHY FW upgrade code
This code should not have resided in the driver. Now that we have a new
interface, this logic can reside in the application that whishes to upgrade the
PHY FW

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:36 -07:00
Eilon Greenstein f57a60256d bnx2x: Supporting PHY FW upgrade
There are 3 operations that the driver needs to support to allow applications to
access the PHY FW (on top of the MDC/MDIO access). Since those are essentially
nvram access commands, adding them to the ethtool -E interface.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:32 -07:00
Eilon Greenstein 01cd452846 bnx2x: MDC/MDIO CL45 IOCTLs
As suggested by Ben Hutchings <bhutchings@solarflare.com>, using the MDC/MDIO
IOCTL

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:29 -07:00
Eilon Greenstein 239d686d49 bnx2x: Adding XAUI CL73 autoneg support
Adding CL73 support to the built in PHY in the 5771x device. Also supporting
fallbacks to CL73 if the link partner does not respond.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:27 -07:00
Eilon Greenstein bc7f0a0530 bnx2x: BCM8727 FW load
The BCM8727 is a dual port PHY. The FW must be loaded in a given order on all
designs - including those which swapped the ports (calling port number zero the
second port)

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:23 -07:00
Eilon Greenstein 97b41dad38 bnx2x: get_ext_phy_fw_version returns NULL if not applicable
To avoid confusion, if the PHY does not have a FW (and so, no FW version) make
sure that the string is NULL.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:21 -07:00
Eilon Greenstein b1607af526 bnx2x: Reading the FW version of the BCM8481 PHY
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:19 -07:00
Eilon Greenstein 2f9044603c bnx2x: BCM8481 LED4 instead of LASI
The BCM8481 does not generate LASI interrupt for 10M, 100M and 1G link, so we
are using LED4 output as the interrupt input to the 57711. This requires some
adaptation in the link interrupt routines

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:18 -07:00
Eilon Greenstein 0c59327043 bnx2x: Advertize flow control normally in MF mode
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:15 -07:00
Eilon Greenstein 2691d51d72 bnx2x: Supporting Device Control Channel
In multi-function mode, the FW can receive special management control commands
to set the Min/Max BW and the the function link state

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 23:02:12 -07:00
Eilon Greenstein a1d58179d1 bnx2x: Removing old FW files
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 22:53:55 -07:00
Eilon Greenstein ca00392cb8 bnx2x: Using the new FW
The new FW improves the packets per second rate. It required a lot of change in
the FW which implies many changes in the driver to support it. It is now also
possible for the driver to use a separate MSI-X vector for Rx and Tx - this also
add some to the complicity of this change.

All things said - after this patch, practically all performance matrixes show
improvement.
Though Vladislav Zolotarov is not signed on this patch, he did most of the job
and deserves credit for that.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 22:53:28 -07:00
Eilon Greenstein 6200f09036 bnx2x: New FW files
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 22:52:50 -07:00
françois romieu 85910a8e9f r8169: phy init for the 8102e
Synced with Realtek's 1.013.00 r8101 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 22:13:23 -07:00
françois romieu 0b9b571d24 r8169: phy init for the 8169s
Synced with Realtek's 6.011.00 r8169 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 22:13:23 -07:00
françois romieu 2e955856ff r8169: phy init for the 8169scd
Synced with Realtek's 6.011.00 r8169 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 22:13:22 -07:00
françois romieu 8c7006aa94 r8169: phy init for the 8169sce
Synced with Realtek's 6.011.00 r8169 driver.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-12 22:13:21 -07:00