Skip to content

Commit

Permalink
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/…
Browse files Browse the repository at this point in the history
…davem/net-3.6

Conflicts:
	drivers/net/benet/be_main.c
  • Loading branch information
davem330 committed May 11, 2011
2 parents 0074820 + 9bbc052 commit 3c709f8
Show file tree
Hide file tree
Showing 37 changed files with 401 additions and 217 deletions.
8 changes: 7 additions & 1 deletion drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,7 @@ config S6GMAC
source "drivers/net/stmmac/Kconfig"

config PCH_GBE
tristate "PCH Gigabit Ethernet"
tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GbE"
depends on PCI
select MII
---help---
Expand All @@ -2548,6 +2548,12 @@ config PCH_GBE
to Gigabit Ethernet.
This driver enables Gigabit Ethernet function.

This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
Output Hub), ML7223.
ML7223 IOH is for MP(Media Phone) use.
ML7223 is companion chip for Intel Atom E6xx series.
ML7223 is completely compatible for Intel EG20T PCH.

endif # NETDEV_1000

#
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/benet/be.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ struct be_rx_stats {

struct be_rx_compl_info {
u32 rss_hash;
u16 vid;
u16 vlan_tag;
u16 pkt_size;
u16 rxq_idx;
u16 mac_id;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter,
struct be_async_event_grp5_pvid_state *evt)
{
if (evt->enabled)
adapter->pvid = evt->tag;
adapter->pvid = le16_to_cpu(evt->tag);
else
adapter->pvid = 0;
}
Expand Down
25 changes: 14 additions & 11 deletions drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,8 @@ static void be_rx_compl_process(struct be_adapter *adapter,
kfree_skb(skb);
return;
}
vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, rxcp->vid);
vlan_hwaccel_receive_skb(skb, adapter->vlan_grp,
rxcp->vlan_tag);
} else {
netif_receive_skb(skb);
}
Expand Down Expand Up @@ -1077,7 +1078,8 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
if (likely(!rxcp->vlanf))
napi_gro_frags(&eq_obj->napi);
else
vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, rxcp->vid);
vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp,
rxcp->vlan_tag);
}

static void be_parse_rx_compl_v1(struct be_adapter *adapter,
Expand Down Expand Up @@ -1106,9 +1108,9 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter,
AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, rxcp);
if (rxcp->vlanf) {
rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm,
compl);
rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag,
compl);
compl);
rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag,
compl);
}
}

Expand Down Expand Up @@ -1138,9 +1140,9 @@ static void be_parse_rx_compl_v0(struct be_adapter *adapter,
AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, rxcp);
if (rxcp->vlanf) {
rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm,
compl);
rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag,
compl);
compl);
rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag,
compl);
}
}

Expand Down Expand Up @@ -1170,10 +1172,11 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
rxcp->vlanf = 0;

if (!lancer_chip(adapter))
rxcp->vid = swab16(rxcp->vid);
rxcp->vlan_tag = swab16(rxcp->vlan_tag);

if ((adapter->pvid == rxcp->vid) &&
!adapter->vlan_tag[rxcp->vid])
if (((adapter->pvid & VLAN_VID_MASK) ==
(rxcp->vlan_tag & VLAN_VID_MASK)) &&
!adapter->vlan_tag[rxcp->vlan_tag])
rxcp->vlanf = 0;
}

Expand Down
4 changes: 3 additions & 1 deletion drivers/net/can/slcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct *tty)
/* Done. We have linked the TTY line to a channel. */
rtnl_unlock();
tty->receive_room = 65536; /* We don't flow control */
return sl->dev->base_addr;

/* TTY layer expects 0 on success */
return 0;

err_free_chan:
sl->tty = NULL;
Expand Down
21 changes: 13 additions & 8 deletions drivers/net/ehea/ehea_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,20 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
}
ethtool_cmd_speed_set(cmd, speed);

cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full
| SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half
| SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half
| SUPPORTED_Autoneg | SUPPORTED_FIBRE);

cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg
| ADVERTISED_FIBRE);
if (cmd->speed == SPEED_10000) {
cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
cmd->port = PORT_FIBRE;
} else {
cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full
| SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full
| SUPPORTED_10baseT_Half | SUPPORTED_Autoneg
| SUPPORTED_TP);
cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg
| ADVERTISED_TP);
cmd->port = PORT_TP;
}

cmd->port = PORT_FIBRE;
cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE;

return 0;
Expand Down
23 changes: 16 additions & 7 deletions drivers/net/pch_gbe/pch_gbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const char pch_driver_version[] = DRV_VERSION;
#define PCH_GBE_COPYBREAK_DEFAULT 256
#define PCH_GBE_PCI_BAR 1

/* Macros for ML7223 */
#define PCI_VENDOR_ID_ROHM 0x10db
#define PCI_DEVICE_ID_ROHM_ML7223_GBE 0x8013

#define PCH_GBE_TX_WEIGHT 64
#define PCH_GBE_RX_WEIGHT 64
#define PCH_GBE_RX_BUFFER_WRITE 16
Expand All @@ -43,8 +47,7 @@ const char pch_driver_version[] = DRV_VERSION;

#define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \
PCH_GBE_CHIP_TYPE_INTERNAL | \
PCH_GBE_RGMII_MODE_RGMII | \
PCH_GBE_CRS_SEL \
PCH_GBE_RGMII_MODE_RGMII \
)

/* Ethertype field values */
Expand Down Expand Up @@ -1495,12 +1498,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter,
/* Write meta date of skb */
skb_put(skb, length);
skb->protocol = eth_type_trans(skb, netdev);
if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) ==
PCH_GBE_RXD_ACC_STAT_TCPIPOK) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
} else {
if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
skb->ip_summed = CHECKSUM_NONE;
}
else
skb->ip_summed = CHECKSUM_UNNECESSARY;

napi_gro_receive(&adapter->napi, skb);
(*work_done)++;
pr_debug("Receive skb->ip_summed: %d length: %d\n",
Expand Down Expand Up @@ -2442,6 +2444,13 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gbe_pcidev_id) = {
.class = (PCI_CLASS_NETWORK_ETHERNET << 8),
.class_mask = (0xFFFF00)
},
{.vendor = PCI_VENDOR_ID_ROHM,
.device = PCI_DEVICE_ID_ROHM_ML7223_GBE,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.class = (PCI_CLASS_NETWORK_ETHERNET << 8),
.class_mask = (0xFFFF00)
},
/* required last entry */
{0}
};
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/slip.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,9 @@ static int slip_open(struct tty_struct *tty)
/* Done. We have linked the TTY line to a channel. */
rtnl_unlock();
tty->receive_room = 65536; /* We don't flow control */
return sl->dev->base_addr;

/* TTY layer expects 0 on success */
return 0;

err_free_bufs:
sl_free_bufs(sl);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/usb/cdc_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ static const struct usb_device_id products [] = {
{
USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM,
USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
.driver_info = 0,
.driver_info = (unsigned long)&wwan_info,
},

/*
Expand Down
14 changes: 9 additions & 5 deletions drivers/net/usb/ipheth.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#define IPHETH_USBINTF_PROTO 1

#define IPHETH_BUF_SIZE 1516
#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
#define IPHETH_TX_TIMEOUT (5 * HZ)

#define IPHETH_INTFNUM 2
Expand Down Expand Up @@ -202,18 +203,21 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
return;
}

len = urb->actual_length;
buf = urb->transfer_buffer;
if (urb->actual_length <= IPHETH_IP_ALIGN) {
dev->net->stats.rx_length_errors++;
return;
}
len = urb->actual_length - IPHETH_IP_ALIGN;
buf = urb->transfer_buffer + IPHETH_IP_ALIGN;

skb = dev_alloc_skb(NET_IP_ALIGN + len);
skb = dev_alloc_skb(len);
if (!skb) {
err("%s: dev_alloc_skb: -ENOMEM", __func__);
dev->net->stats.rx_dropped++;
return;
}

skb_reserve(skb, NET_IP_ALIGN);
memcpy(skb_put(skb, len), buf + NET_IP_ALIGN, len - NET_IP_ALIGN);
memcpy(skb_put(skb, len), buf, len);
skb->dev = dev->net;
skb->protocol = eth_type_trans(skb, dev->net);

Expand Down
10 changes: 6 additions & 4 deletions drivers/net/vmxnet3/vmxnet3_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ static void
vmxnet3_process_events(struct vmxnet3_adapter *adapter)
{
int i;
unsigned long flags;
u32 events = le32_to_cpu(adapter->shared->ecr);
if (!events)
return;
Expand All @@ -190,10 +191,10 @@ vmxnet3_process_events(struct vmxnet3_adapter *adapter)

/* Check if there is an error on xmit/recv queues */
if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) {
spin_lock(&adapter->cmd_lock);
spin_lock_irqsave(&adapter->cmd_lock, flags);
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
VMXNET3_CMD_GET_QUEUE_STATUS);
spin_unlock(&adapter->cmd_lock);
spin_unlock_irqrestore(&adapter->cmd_lock, flags);

for (i = 0; i < adapter->num_tx_queues; i++)
if (adapter->tqd_start[i].status.stopped)
Expand Down Expand Up @@ -2720,13 +2721,14 @@ static void
vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
{
u32 cfg;
unsigned long flags;

/* intr settings */
spin_lock(&adapter->cmd_lock);
spin_lock_irqsave(&adapter->cmd_lock, flags);
VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
VMXNET3_CMD_GET_CONF_INTR);
cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD);
spin_unlock(&adapter->cmd_lock);
spin_unlock_irqrestore(&adapter->cmd_lock, flags);
adapter->intr.type = cfg & 0x3;
adapter->intr.mask_mode = (cfg >> 2) & 0x3;

Expand Down
17 changes: 17 additions & 0 deletions include/net/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ struct ip_vs_app {
/* IPVS in network namespace */
struct netns_ipvs {
int gen; /* Generation */
int enable; /* enable like nf_hooks do */
/*
* Hash table: for real service lookups
*/
Expand Down Expand Up @@ -1086,6 +1087,22 @@ ip_vs_control_add(struct ip_vs_conn *cp, struct ip_vs_conn *ctl_cp)
atomic_inc(&ctl_cp->n_control);
}

/*
* IPVS netns init & cleanup functions
*/
extern int __ip_vs_estimator_init(struct net *net);
extern int __ip_vs_control_init(struct net *net);
extern int __ip_vs_protocol_init(struct net *net);
extern int __ip_vs_app_init(struct net *net);
extern int __ip_vs_conn_init(struct net *net);
extern int __ip_vs_sync_init(struct net *net);
extern void __ip_vs_conn_cleanup(struct net *net);
extern void __ip_vs_app_cleanup(struct net *net);
extern void __ip_vs_protocol_cleanup(struct net *net);
extern void __ip_vs_control_cleanup(struct net *net);
extern void __ip_vs_estimator_cleanup(struct net *net);
extern void __ip_vs_sync_cleanup(struct net *net);
extern void __ip_vs_service_cleanup(struct net *net);

/*
* IPVS application functions
Expand Down
3 changes: 3 additions & 0 deletions include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ struct xfrm_state_afinfo {
int (*tmpl_sort)(struct xfrm_tmpl **dst, struct xfrm_tmpl **src, int n);
int (*state_sort)(struct xfrm_state **dst, struct xfrm_state **src, int n);
int (*output)(struct sk_buff *skb);
int (*output_finish)(struct sk_buff *skb);
int (*extract_input)(struct xfrm_state *x,
struct sk_buff *skb);
int (*extract_output)(struct xfrm_state *x,
Expand Down Expand Up @@ -1463,6 +1464,7 @@ static inline int xfrm4_rcv_spi(struct sk_buff *skb, int nexthdr, __be32 spi)
extern int xfrm4_extract_output(struct xfrm_state *x, struct sk_buff *skb);
extern int xfrm4_prepare_output(struct xfrm_state *x, struct sk_buff *skb);
extern int xfrm4_output(struct sk_buff *skb);
extern int xfrm4_output_finish(struct sk_buff *skb);
extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family);
extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family);
extern int xfrm6_extract_header(struct sk_buff *skb);
Expand All @@ -1479,6 +1481,7 @@ extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, const xfrm_address_t *sad
extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb);
extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb);
extern int xfrm6_output(struct sk_buff *skb);
extern int xfrm6_output_finish(struct sk_buff *skb);
extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
u8 **prevhdr);

Expand Down
3 changes: 3 additions & 0 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ void unregister_vlan_dev(struct net_device *dev, struct list_head *head)

grp->nr_vlans--;

if (vlan->flags & VLAN_FLAG_GVRP)
vlan_gvrp_request_leave(dev);

vlan_group_set_device(grp, vlan_id, NULL);
/* Because unregister_netdevice_queue() makes sure at least one rcu
* grace period is respected before device freeing,
Expand Down
3 changes: 0 additions & 3 deletions net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,6 @@ static int vlan_dev_stop(struct net_device *dev)
struct vlan_dev_info *vlan = vlan_dev_info(dev);
struct net_device *real_dev = vlan->real_dev;

if (vlan->flags & VLAN_FLAG_GVRP)
vlan_gvrp_request_leave(dev);

dev_mc_unsync(real_dev, dev);
dev_uc_unsync(real_dev, dev);
if (dev->flags & IFF_ALLMULTI)
Expand Down
Loading

0 comments on commit 3c709f8

Please sign in to comment.