Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352428
b: refs/heads/master
c: d0023f8
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Feb 13, 2013
1 parent f9f0870 commit ab08af9
Show file tree
Hide file tree
Showing 38 changed files with 690 additions and 440 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 212079df6d77c0daada96b1d906f4b7749871411
refs/heads/master: d0023f820e003857248d14f2213ac3930283f16c
2 changes: 2 additions & 0 deletions trunk/Documentation/devicetree/bindings/net/cpsw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Required properties:
Optional properties:
- ti,hwmods : Must be "cpgmac0"
- no_bd_ram : Must be 0 or 1
- dual_emac : Specifies Switch to act as Dual EMAC
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports

Note: "ti,hwmods" field is used to fetch the base address and irq
resources from TI, omap hwmod data base during device registration.
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,8 +1477,10 @@ static void do_gro(struct sge_eth_rxq *rxq, const struct pkt_gl *gl,
skb->ip_summed = CHECKSUM_UNNECESSARY;
skb_record_rx_queue(skb, rxq->rspq.idx);

if (pkt->vlan_ex)
if (pkt->vlan_ex) {
__vlan_hwaccel_put_tag(skb, be16_to_cpu(pkt->vlan));
rxq->stats.vlan_ex++;
}
ret = napi_gro_frags(&rxq->rspq.napi);

if (ret == GRO_HELD)
Expand Down
62 changes: 38 additions & 24 deletions trunk/drivers/net/ethernet/freescale/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/delay.h>
#include <linux/of_device.h>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
#include <linux/of_platform.h>

#include <linux/netdevice.h>
Expand Down Expand Up @@ -76,10 +77,6 @@ static void mpc52xx_fec_stop(struct net_device *dev);
static void mpc52xx_fec_start(struct net_device *dev);
static void mpc52xx_fec_reset(struct net_device *dev);

static u8 mpc52xx_fec_mac_addr[6];
module_param_array_named(mac, mpc52xx_fec_mac_addr, byte, NULL, 0);
MODULE_PARM_DESC(mac, "six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe");

#define MPC52xx_MESSAGES_DEFAULT ( NETIF_MSG_DRV | NETIF_MSG_PROBE | \
NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP)
static int debug = -1; /* the above default */
Expand Down Expand Up @@ -110,15 +107,6 @@ static void mpc52xx_fec_set_paddr(struct net_device *dev, u8 *mac)
out_be32(&fec->paddr2, (*(u16 *)(&mac[4]) << 16) | FEC_PADDR2_TYPE);
}

static void mpc52xx_fec_get_paddr(struct net_device *dev, u8 *mac)
{
struct mpc52xx_fec_priv *priv = netdev_priv(dev);
struct mpc52xx_fec __iomem *fec = priv->fec;

*(u32 *)(&mac[0]) = in_be32(&fec->paddr1);
*(u16 *)(&mac[4]) = in_be32(&fec->paddr2) >> 16;
}

static int mpc52xx_fec_set_mac_address(struct net_device *dev, void *addr)
{
struct sockaddr *sock = addr;
Expand Down Expand Up @@ -853,6 +841,8 @@ static int mpc52xx_fec_probe(struct platform_device *op)
struct resource mem;
const u32 *prop;
int prop_size;
struct device_node *np = op->dev.of_node;
const char *mac_addr;

phys_addr_t rx_fifo;
phys_addr_t tx_fifo;
Expand All @@ -866,7 +856,7 @@ static int mpc52xx_fec_probe(struct platform_device *op)
priv->ndev = ndev;

/* Reserve FEC control zone */
rv = of_address_to_resource(op->dev.of_node, 0, &mem);
rv = of_address_to_resource(np, 0, &mem);
if (rv) {
printk(KERN_ERR DRIVER_NAME ": "
"Error while parsing device node resource\n" );
Expand Down Expand Up @@ -919,19 +909,41 @@ static int mpc52xx_fec_probe(struct platform_device *op)

/* Get the IRQ we need one by one */
/* Control */
ndev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
ndev->irq = irq_of_parse_and_map(np, 0);

/* RX */
priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk);

/* TX */
priv->t_irq = bcom_get_task_irq(priv->tx_dmatsk);

/* MAC address init */
if (!is_zero_ether_addr(mpc52xx_fec_mac_addr))
memcpy(ndev->dev_addr, mpc52xx_fec_mac_addr, 6);
else
mpc52xx_fec_get_paddr(ndev, ndev->dev_addr);
/*
* MAC address init:
*
* First try to read MAC address from DT
*/
mac_addr = of_get_mac_address(np);
if (mac_addr) {
memcpy(ndev->dev_addr, mac_addr, ETH_ALEN);
} else {
struct mpc52xx_fec __iomem *fec = priv->fec;

/*
* If the MAC addresse is not provided via DT then read
* it back from the controller regs
*/
*(u32 *)(&ndev->dev_addr[0]) = in_be32(&fec->paddr1);
*(u16 *)(&ndev->dev_addr[4]) = in_be32(&fec->paddr2) >> 16;
}

/*
* Check if the MAC address is valid, if not get a random one
*/
if (!is_valid_ether_addr(ndev->dev_addr)) {
eth_hw_addr_random(ndev);
dev_warn(&ndev->dev, "using random MAC address %pM\n",
ndev->dev_addr);
}

priv->msg_enable = netif_msg_init(debug, MPC52xx_MESSAGES_DEFAULT);

Expand All @@ -942,20 +954,20 @@ static int mpc52xx_fec_probe(struct platform_device *op)
/* Start with safe defaults for link connection */
priv->speed = 100;
priv->duplex = DUPLEX_HALF;
priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->dev.of_node) >> 20) / 5) << 1;
priv->mdio_speed = ((mpc5xxx_get_bus_frequency(np) >> 20) / 5) << 1;

/* The current speed preconfigures the speed of the MII link */
prop = of_get_property(op->dev.of_node, "current-speed", &prop_size);
prop = of_get_property(np, "current-speed", &prop_size);
if (prop && (prop_size >= sizeof(u32) * 2)) {
priv->speed = prop[0];
priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF;
}

/* If there is a phy handle, then get the PHY node */
priv->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
priv->phy_node = of_parse_phandle(np, "phy-handle", 0);

/* the 7-wire property means don't use MII mode */
if (of_find_property(op->dev.of_node, "fsl,7-wire-mode", NULL)) {
if (of_find_property(np, "fsl,7-wire-mode", NULL)) {
priv->seven_wire_mode = 1;
dev_info(&ndev->dev, "using 7-wire PHY mode\n");
}
Expand All @@ -970,6 +982,8 @@ static int mpc52xx_fec_probe(struct platform_device *op)

/* We're done ! */
dev_set_drvdata(&op->dev, ndev);
printk(KERN_INFO "%s: %s MAC %pM\n",
ndev->name, op->dev.of_node->full_name, ndev->dev_addr);

return 0;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ static void ixgbe_set_rsc_gso_size(struct ixgbe_ring *ring,
/* set gso_size to avoid messing up TCP MSS */
skb_shinfo(skb)->gso_size = DIV_ROUND_UP((skb->len - hdr_len),
IXGBE_CB(skb)->append_cnt);
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
}

static void ixgbe_update_rsc_stats(struct ixgbe_ring *rx_ring,
Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,13 @@ qlcnic_process_lro(struct qlcnic_adapter *adapter,
th->seq = htonl(seq_number);
length = skb->len;

if (adapter->flags & QLCNIC_FW_LRO_MSS_CAP)
if (adapter->flags & QLCNIC_FW_LRO_MSS_CAP) {
skb_shinfo(skb)->gso_size = qlcnic_get_lro_sts_mss(sts_data1);
if (skb->protocol == htons(ETH_P_IPV6))
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV6;
else
skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
}

if (vid != 0xffff)
__vlan_hwaccel_put_tag(skb, vid);
Expand Down
Loading

0 comments on commit ab08af9

Please sign in to comment.