Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (54 commits)
  glge: remove unused #include <version.h>
  dnet: remove unused #include <version.h>
  tcp: miscounts due to tcp_fragment pcount reset
  tcp: add helper for counter tweaking due mid-wq change
  hso: fix for the 'invalid frame length' messages
  hso: fix for crash when unplugging the device
  fsl_pq_mdio: Fix compile failure
  fsl_pq_mdio: Revive UCC MDIO support
  ucc_geth: Pass proper device to DMA routines, otherwise oops happens
  i.MX31: Fixing cs89x0 network building to i.MX31ADS
  tc35815: Fix build error if NAPI enabled
  hso: add Vendor/Product ID's for new devices
  ucc_geth: Remove unused header
  gianfar: Remove unused header
  kaweth: Fix locking to be SMP-safe
  net: allow multiple dev per napi with GRO
  r8169: reset IntrStatus after chip reset
  ixgbe: Fix potential memory leak/driver panic issue while setting up Tx & Rx ring parameters
  ixgbe: fix ethtool -A|a behavior
  ixgbe: Patch to fix driver panic while freeing up tx & rx resources
  ...
  • Loading branch information
torvalds committed Apr 3, 2009
2 parents 4f032ac + 6c8ad3b commit ef8a97b
Show file tree
Hide file tree
Showing 72 changed files with 26,689 additions and 3,040 deletions.
100 changes: 100 additions & 0 deletions Documentation/networking/vxge.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
Neterion's (Formerly S2io) X3100 Series 10GbE PCIe Server Adapter Linux driver
==============================================================================

Contents
--------

1) Introduction
2) Features supported
3) Configurable driver parameters
4) Troubleshooting

1) Introduction:
----------------
This Linux driver supports all Neterion's X3100 series 10 GbE PCIe I/O
Virtualized Server adapters.
The X3100 series supports four modes of operation, configurable via
firmware -
Single function mode
Multi function mode
SRIOV mode
MRIOV mode
The functions share a 10GbE link and the pci-e bus, but hardly anything else
inside the ASIC. Features like independent hw reset, statistics, bandwidth/
priority allocation and guarantees, GRO, TSO, interrupt moderation etc are
supported independently on each function.

(See below for a complete list of features supported for both IPv4 and IPv6)

2) Features supported:
----------------------

i) Single function mode (up to 17 queues)

ii) Multi function mode (up to 17 functions)

iii) PCI-SIG's I/O Virtualization
- Single Root mode: v1.0 (up to 17 functions)
- Multi-Root mode: v1.0 (up to 17 functions)

iv) Jumbo frames
X3100 Series supports MTU up to 9600 bytes, modifiable using
ifconfig command.

v) Offloads supported: (Enabled by default)
Checksum offload (TCP/UDP/IP) on transmit and receive paths
TCP Segmentation Offload (TSO) on transmit path
Generic Receive Offload (GRO) on receive path

vi) MSI-X: (Enabled by default)
Resulting in noticeable performance improvement (up to 7% on certain
platforms).

vii) NAPI: (Enabled by default)
For better Rx interrupt moderation.

viii)RTH (Receive Traffic Hash): (Enabled by default)
Receive side steering for better scaling.

ix) Statistics
Comprehensive MAC-level and software statistics displayed using
"ethtool -S" option.

x) Multiple hardware queues: (Enabled by default)
Up to 17 hardware based transmit and receive data channels, with
multiple steering options (transmit multiqueue enabled by default).

3) Configurable driver parameters:
----------------------------------

i) max_config_dev
Specifies maximum device functions to be enabled.
Valid range: 1-8

ii) max_config_port
Specifies number of ports to be enabled.
Valid range: 1,2
Default: 1

iii)max_config_vpath
Specifies maximum VPATH(s) configured for each device function.
Valid range: 1-17

iv) vlan_tag_strip
Enables/disables vlan tag stripping from all received tagged frames that
are not replicated at the internal L2 switch.
Valid range: 0,1 (disabled, enabled respectively)
Default: 1

v) addr_learn_en
Enable learning the mac address of the guest OS interface in
virtualization environment.
Valid range: 0,1 (disabled, enabled respectively)
Default: 0

4) Troubleshooting:
-------------------

To resolve an issue with the source code or X3100 series adapter, please collect
the statistics, register dumps using ethool, relevant logs and email them to
support@neterion.com.
7 changes: 5 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3104,7 +3104,7 @@ M: shemminger@linux-foundation.org
L: netem@lists.linux-foundation.org
S: Maintained

NETERION (S2IO) Xframe 10GbE DRIVER
NETERION (S2IO) 10GbE DRIVER (xframe/vxge)
P: Ramkrishna Vepa
M: ram.vepa@neterion.com
P: Rastapur Santosh
Expand All @@ -3113,8 +3113,11 @@ P: Sivakumar Subramani
M: sivakumar.subramani@neterion.com
P: Sreenivasa Honnur
M: sreenivasa.honnur@neterion.com
P: Anil Murthy
M: anil.murthy@neterion.com
L: netdev@vger.kernel.org
W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/Linux?Anonymous
W: http://trac.neterion.com/cgi-bin/trac.cgi/wiki/X3100Linux?Anonymous
S: Supported

NETFILTER/IPTABLES/IPCHAINS
Expand Down
19 changes: 18 additions & 1 deletion drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ config ENC28J60_WRITEVERIFY

config ETHOC
tristate "OpenCores 10/100 Mbps Ethernet MAC support"
depends on NET_ETHERNET
depends on NET_ETHERNET && HAS_IOMEM
select MII
select PHYLIB
help
Expand Down Expand Up @@ -2547,6 +2547,23 @@ config S2IO
More specific information on configuring the driver is in
<file:Documentation/networking/s2io.txt>.

config VXGE
tristate "Neterion X3100 Series 10GbE PCIe Server Adapter"
depends on PCI && INET
---help---
This driver supports Neterion Inc's X3100 Series 10 GbE PCIe
I/O Virtualized Server Adapter.
More specific information on configuring the driver is in
<file:Documentation/networking/vxge.txt>.

config VXGE_DEBUG_TRACE_ALL
bool "Enabling All Debug trace statments in driver"
default n
depends on VXGE
---help---
Say Y here if you want to enabling all the debug trace statements in
driver. By default only few debug trace statements are enabled.

config MYRI10GE
tristate "Myricom Myri-10G Ethernet support"
depends on PCI && INET
Expand Down
1 change: 1 addition & 0 deletions drivers/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ obj-$(CONFIG_R8169) += r8169.o
obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
obj-$(CONFIG_IBMVETH) += ibmveth.o
obj-$(CONFIG_S2IO) += s2io.o
obj-$(CONFIG_VXGE) += vxge/
obj-$(CONFIG_MYRI10GE) += myri10ge/
obj-$(CONFIG_SMC91X) += smc91x.o
obj-$(CONFIG_SMC911X) += smc911x.o
Expand Down
1 change: 0 additions & 1 deletion drivers/net/dnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/version.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
Expand Down
77 changes: 44 additions & 33 deletions drivers/net/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ static void mpc52xx_fec_free_rx_buffers(struct net_device *dev, struct bcom_task
struct sk_buff *skb;

skb = bcom_retrieve_buffer(s, NULL, (struct bcom_bd **)&bd);
dma_unmap_single(&dev->dev, bd->skb_pa, skb->len, DMA_FROM_DEVICE);
dma_unmap_single(dev->dev.parent, bd->skb_pa, skb->len,
DMA_FROM_DEVICE);
kfree_skb(skb);
}
}
Expand All @@ -150,7 +151,7 @@ static int mpc52xx_fec_alloc_rx_buffers(struct net_device *dev, struct bcom_task
bd = (struct bcom_fec_bd *)bcom_prepare_next_buffer(rxtsk);

bd->status = FEC_RX_BUFFER_SIZE;
bd->skb_pa = dma_map_single(&dev->dev, skb->data,
bd->skb_pa = dma_map_single(dev->dev.parent, skb->data,
FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);

bcom_submit_next_buffer(rxtsk, skb);
Expand Down Expand Up @@ -270,15 +271,6 @@ static void mpc52xx_fec_phy_stop(struct net_device *dev)
phy_write(priv->phydev, MII_BMCR, BMCR_PDOWN);
}

static int mpc52xx_fec_phy_mii_ioctl(struct mpc52xx_fec_priv *priv,
struct mii_ioctl_data *mii_data, int cmd)
{
if (!priv->phydev)
return -ENOTSUPP;

return phy_mii_ioctl(priv->phydev, mii_data, cmd);
}

static void mpc52xx_fec_phy_hw_init(struct mpc52xx_fec_priv *priv)
{
struct mpc52xx_fec __iomem *fec = priv->fec;
Expand Down Expand Up @@ -370,15 +362,15 @@ static int mpc52xx_fec_close(struct net_device *dev)
* invariant will hold if you make sure that the netif_*_queue()
* calls are done at the proper times.
*/
static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct mpc52xx_fec_priv *priv = netdev_priv(dev);
struct bcom_fec_bd *bd;

if (bcom_queue_full(priv->tx_dmatsk)) {
if (net_ratelimit())
dev_err(&dev->dev, "transmit queue overrun\n");
return 1;
return NETDEV_TX_BUSY;
}

spin_lock_irq(&priv->lock);
Expand All @@ -388,7 +380,8 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *d
bcom_prepare_next_buffer(priv->tx_dmatsk);

bd->status = skb->len | BCOM_FEC_TX_BD_TFD | BCOM_FEC_TX_BD_TC;
bd->skb_pa = dma_map_single(&dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
bd->skb_pa = dma_map_single(dev->dev.parent, skb->data, skb->len,
DMA_TO_DEVICE);

bcom_submit_next_buffer(priv->tx_dmatsk, skb);

Expand All @@ -398,7 +391,7 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *d

spin_unlock_irq(&priv->lock);

return 0;
return NETDEV_TX_OK;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
Expand Down Expand Up @@ -430,7 +423,8 @@ static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)
struct bcom_fec_bd *bd;
skb = bcom_retrieve_buffer(priv->tx_dmatsk, NULL,
(struct bcom_bd **)&bd);
dma_unmap_single(&dev->dev, bd->skb_pa, skb->len, DMA_TO_DEVICE);
dma_unmap_single(dev->dev.parent, bd->skb_pa, skb->len,
DMA_TO_DEVICE);

dev_kfree_skb_irq(skb);
}
Expand All @@ -455,7 +449,8 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)

rskb = bcom_retrieve_buffer(priv->rx_dmatsk, &status,
(struct bcom_bd **)&bd);
dma_unmap_single(&dev->dev, bd->skb_pa, rskb->len, DMA_FROM_DEVICE);
dma_unmap_single(dev->dev.parent, bd->skb_pa, rskb->len,
DMA_FROM_DEVICE);

/* Test for errors in received frame */
if (status & BCOM_FEC_RX_BD_ERRORS) {
Expand All @@ -464,7 +459,8 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
bcom_prepare_next_buffer(priv->rx_dmatsk);

bd->status = FEC_RX_BUFFER_SIZE;
bd->skb_pa = dma_map_single(&dev->dev, rskb->data,
bd->skb_pa = dma_map_single(dev->dev.parent,
rskb->data,
FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);

bcom_submit_next_buffer(priv->rx_dmatsk, rskb);
Expand Down Expand Up @@ -499,7 +495,7 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
bcom_prepare_next_buffer(priv->rx_dmatsk);

bd->status = FEC_RX_BUFFER_SIZE;
bd->skb_pa = dma_map_single(&dev->dev, skb->data,
bd->skb_pa = dma_map_single(dev->dev.parent, skb->data,
FEC_RX_BUFFER_SIZE, DMA_FROM_DEVICE);

bcom_submit_next_buffer(priv->rx_dmatsk, skb);
Expand Down Expand Up @@ -847,12 +843,20 @@ static void mpc52xx_fec_get_drvinfo(struct net_device *dev,
static int mpc52xx_fec_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct mpc52xx_fec_priv *priv = netdev_priv(dev);

if (!priv->phydev)
return -ENODEV;

return phy_ethtool_gset(priv->phydev, cmd);
}

static int mpc52xx_fec_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct mpc52xx_fec_priv *priv = netdev_priv(dev);

if (!priv->phydev)
return -ENODEV;

return phy_ethtool_sset(priv->phydev, cmd);
}

Expand Down Expand Up @@ -882,9 +886,28 @@ static int mpc52xx_fec_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct mpc52xx_fec_priv *priv = netdev_priv(dev);

return mpc52xx_fec_phy_mii_ioctl(priv, if_mii(rq), cmd);
if (!priv->phydev)
return -ENOTSUPP;

return phy_mii_ioctl(priv->phydev, if_mii(rq), cmd);
}

static const struct net_device_ops mpc52xx_fec_netdev_ops = {
.ndo_open = mpc52xx_fec_open,
.ndo_stop = mpc52xx_fec_close,
.ndo_start_xmit = mpc52xx_fec_start_xmit,
.ndo_set_multicast_list = mpc52xx_fec_set_multicast_list,
.ndo_set_mac_address = mpc52xx_fec_set_mac_address,
.ndo_validate_addr = eth_validate_addr,
.ndo_do_ioctl = mpc52xx_fec_ioctl,
.ndo_change_mtu = eth_change_mtu,
.ndo_tx_timeout = mpc52xx_fec_tx_timeout,
.ndo_get_stats = mpc52xx_fec_get_stats,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = mpc52xx_fec_poll_controller,
#endif
};

/* ======================================================================== */
/* OF Driver */
/* ======================================================================== */
Expand Down Expand Up @@ -929,22 +952,10 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
return -EBUSY;

/* Init ether ndev with what we have */
ndev->open = mpc52xx_fec_open;
ndev->stop = mpc52xx_fec_close;
ndev->hard_start_xmit = mpc52xx_fec_hard_start_xmit;
ndev->do_ioctl = mpc52xx_fec_ioctl;
ndev->netdev_ops = &mpc52xx_fec_netdev_ops;
ndev->ethtool_ops = &mpc52xx_fec_ethtool_ops;
ndev->get_stats = mpc52xx_fec_get_stats;
ndev->set_mac_address = mpc52xx_fec_set_mac_address;
ndev->set_multicast_list = mpc52xx_fec_set_multicast_list;
ndev->tx_timeout = mpc52xx_fec_tx_timeout;
ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT;
ndev->base_addr = mem.start;
#ifdef CONFIG_NET_POLL_CONTROLLER
ndev->poll_controller = mpc52xx_fec_poll_controller;
#endif

priv->t_irq = priv->r_irq = ndev->irq = NO_IRQ; /* IRQ are free for now */

spin_lock_init(&priv->lock);

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/fsl_pq_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ void fsl_pq_mdio_bus_name(char *name, struct device_node *np)
snprintf(name, MII_BUS_ID_SIZE, "%s@%llx", np->name,
(unsigned long long)taddr);
}
EXPORT_SYMBOL_GPL(fsl_pq_mdio_bus_name);

/* Scan the bus in reverse, looking for an empty spot */
static int fsl_pq_mdio_find_free(struct mii_bus *new_bus)
Expand Down Expand Up @@ -387,7 +388,7 @@ static int fsl_pq_mdio_probe(struct of_device *ofdev,
* The TBIPHY-only buses will find PHYs at every address,
* so we mask them all but the TBI
*/
if (!of_device_is_compatible(np, "fsl,gianfar-mdio"))
if (of_device_is_compatible(np, "fsl,gianfar-tbi"))
new_bus->phy_mask = ~(1 << tbiaddr);

err = mdiobus_register(new_bus);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/gianfar.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <linux/crc32.h>
#include <linux/workqueue.h>
#include <linux/ethtool.h>
#include <linux/fsl_devices.h>

/* The maximum number of packets to be handled in one call of gfar_poll */
#define GFAR_DEV_WEIGHT 64
Expand Down
Loading

0 comments on commit ef8a97b

Please sign in to comment.