Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340563
b: refs/heads/master
c: 810b6d7
h: refs/heads/master
i:
  340561: 2a3ede8
  340559: 858ee76
v: v3
  • Loading branch information
David S. Miller committed Oct 31, 2012
1 parent 8405d04 commit b22883b
Show file tree
Hide file tree
Showing 44 changed files with 753 additions and 375 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: ac61d515f14fd205d8c917a34b27a767b4fe9e05
refs/heads/master: 810b6d7638a288216f99bd190470d67061c8bd88
21 changes: 21 additions & 0 deletions trunk/arch/x86/net/bpf_jit_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <asm/cacheflush.h>
#include <linux/netdevice.h>
#include <linux/filter.h>
#include <linux/if_vlan.h>

/*
* Conventions :
Expand Down Expand Up @@ -212,6 +213,8 @@ void bpf_jit_compile(struct sk_filter *fp)
case BPF_S_ANC_MARK:
case BPF_S_ANC_RXHASH:
case BPF_S_ANC_CPU:
case BPF_S_ANC_VLAN_TAG:
case BPF_S_ANC_VLAN_TAG_PRESENT:
case BPF_S_ANC_QUEUE:
case BPF_S_LD_W_ABS:
case BPF_S_LD_H_ABS:
Expand Down Expand Up @@ -515,6 +518,24 @@ void bpf_jit_compile(struct sk_filter *fp)
CLEAR_A();
#endif
break;
case BPF_S_ANC_VLAN_TAG:
case BPF_S_ANC_VLAN_TAG_PRESENT:
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, vlan_tci) != 2);
if (is_imm8(offsetof(struct sk_buff, vlan_tci))) {
/* movzwl off8(%rdi),%eax */
EMIT4(0x0f, 0xb7, 0x47, offsetof(struct sk_buff, vlan_tci));
} else {
EMIT3(0x0f, 0xb7, 0x87); /* movzwl off32(%rdi),%eax */
EMIT(offsetof(struct sk_buff, vlan_tci), 4);
}
BUILD_BUG_ON(VLAN_TAG_PRESENT != 0x1000);
if (filter[i].code == BPF_S_ANC_VLAN_TAG) {
EMIT3(0x80, 0xe4, 0xef); /* and $0xef,%ah */
} else {
EMIT3(0xc1, 0xe8, 0x0c); /* shr $0xc,%eax */
EMIT3(0x83, 0xe0, 0x01); /* and $0x1,%eax */
}
break;
case BPF_S_LD_W_ABS:
func = CHOOSE_LOAD_FUNC(K, sk_load_word);
common_load: seen |= SEEN_DATAREF;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ethernet/cadence/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

config NET_CADENCE
bool "Cadence devices"
depends on HAS_IOMEM
default y
---help---
If you have a network (Ethernet) card belonging to this class, say Y.
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/net/ethernet/chelsio/cxgb3/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@
#include <linux/mdio.h>
#include "version.h"

#define CH_ERR(adap, fmt, ...) dev_err(&adap->pdev->dev, fmt, ## __VA_ARGS__)
#define CH_WARN(adap, fmt, ...) dev_warn(&adap->pdev->dev, fmt, ## __VA_ARGS__)
#define CH_ALERT(adap, fmt, ...) \
dev_printk(KERN_ALERT, &adap->pdev->dev, fmt, ## __VA_ARGS__)
#define CH_ERR(adap, fmt, ...) dev_err(&adap->pdev->dev, fmt, ##__VA_ARGS__)
#define CH_WARN(adap, fmt, ...) dev_warn(&adap->pdev->dev, fmt, ##__VA_ARGS__)
#define CH_ALERT(adap, fmt, ...) dev_alert(&adap->pdev->dev, fmt, ##__VA_ARGS__)

/*
* More powerful macro that selectively prints messages based on msg_enable.
Expand Down
16 changes: 1 addition & 15 deletions trunk/drivers/net/ethernet/dlink/dl2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -1758,21 +1758,7 @@ static struct pci_driver rio_driver = {
.remove = __devexit_p(rio_remove1),
};

static int __init
rio_init (void)
{
return pci_register_driver(&rio_driver);
}

static void __exit
rio_exit (void)
{
pci_unregister_driver (&rio_driver);
}

module_init (rio_init);
module_exit (rio_exit);

module_pci_driver(rio_driver);
/*
Compile command:
Expand Down
59 changes: 56 additions & 3 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <linux/ethtool.h>
#include <linux/if.h>
#include <linux/if_vlan.h>
#include <linux/if_bridge.h>
#include <linux/prefetch.h>
#include <scsi/fc/fc_fcoe.h>

Expand Down Expand Up @@ -3272,7 +3273,6 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset ^ 1), reg_offset - 1);
IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset), (~0) << vf_shift);
IXGBE_WRITE_REG(hw, IXGBE_VFTE(reg_offset ^ 1), reg_offset - 1);
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);

/* Map PF MAC address in RAR Entry 0 to first pool following VFs */
hw->mac.ops.set_vmdq(hw, 0, VMDQ_P(0));
Expand All @@ -3295,8 +3295,6 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)

IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT, gcr_ext);

/* enable Tx loopback for VF/PF communication */
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);

/* Enable MAC Anti-Spoofing */
hw->mac.ops.set_mac_anti_spoofing(hw, (adapter->num_vfs != 0),
Expand Down Expand Up @@ -7061,6 +7059,59 @@ static int ixgbe_ndo_fdb_dump(struct sk_buff *skb,
return idx;
}

static int ixgbe_ndo_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh)
{
struct ixgbe_adapter *adapter = netdev_priv(dev);
struct nlattr *attr, *br_spec;
int rem;

if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
return -EOPNOTSUPP;

br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC);

nla_for_each_nested(attr, br_spec, rem) {
__u16 mode;
u32 reg = 0;

if (nla_type(attr) != IFLA_BRIDGE_MODE)
continue;

mode = nla_get_u16(attr);
if (mode == BRIDGE_MODE_VEPA)
reg = 0;
else if (mode == BRIDGE_MODE_VEB)
reg = IXGBE_PFDTXGSWC_VT_LBEN;
else
return -EINVAL;

IXGBE_WRITE_REG(&adapter->hw, IXGBE_PFDTXGSWC, reg);

e_info(drv, "enabling bridge mode: %s\n",
mode == BRIDGE_MODE_VEPA ? "VEPA" : "VEB");
}

return 0;
}

static int ixgbe_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
struct net_device *dev)
{
struct ixgbe_adapter *adapter = netdev_priv(dev);
u16 mode;

if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
return 0;

if (IXGBE_READ_REG(&adapter->hw, IXGBE_PFDTXGSWC) & 1)
mode = BRIDGE_MODE_VEB;
else
mode = BRIDGE_MODE_VEPA;

return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
}

static const struct net_device_ops ixgbe_netdev_ops = {
.ndo_open = ixgbe_open,
.ndo_stop = ixgbe_close,
Expand Down Expand Up @@ -7100,6 +7151,8 @@ static const struct net_device_ops ixgbe_netdev_ops = {
.ndo_fdb_add = ixgbe_ndo_fdb_add,
.ndo_fdb_del = ixgbe_ndo_fdb_del,
.ndo_fdb_dump = ixgbe_ndo_fdb_dump,
.ndo_bridge_setlink = ixgbe_ndo_bridge_setlink,
.ndo_bridge_getlink = ixgbe_ndo_bridge_getlink,
};

/**
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ void ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
}
}

/* Initialize default switching mode VEB */
IXGBE_WRITE_REG(hw, IXGBE_PFDTXGSWC, IXGBE_PFDTXGSWC_VT_LBEN);

/* If call to enable VFs succeeded then allocate memory
* for per VF control structures.
*/
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,16 @@ static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,
}
skb->protocol = eth_type_trans(skb, rx_ring->netdev);

/* Workaround hardware that can't do proper VEPA multicast
* source pruning.
*/
if ((skb->pkt_type & (PACKET_BROADCAST | PACKET_MULTICAST)) &&
!(compare_ether_addr(adapter->netdev->dev_addr,
eth_hdr(skb)->h_source))) {
dev_kfree_skb_irq(skb);
goto next_desc;
}

ixgbevf_receive_skb(q_vector, skb, staterr, rx_desc);

next_desc:
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/net/ethernet/marvell/pxa168_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ static int pxa168_eth_open(struct net_device *dev)
err = request_irq(dev->irq, pxa168_eth_int_handler,
IRQF_DISABLED, dev->name, dev);
if (err) {
dev_printk(KERN_ERR, &dev->dev, "can't assign irq\n");
dev_err(&dev->dev, "can't assign irq\n");
return -EAGAIN;
}
pep->rx_resource_err = 0;
Expand Down Expand Up @@ -1201,9 +1201,8 @@ static int pxa168_eth_change_mtu(struct net_device *dev, int mtu)
*/
pxa168_eth_stop(dev);
if (pxa168_eth_open(dev)) {
dev_printk(KERN_ERR, &dev->dev,
"fatal error on re-opening device after "
"MTU change\n");
dev_err(&dev->dev,
"fatal error on re-opening device after MTU change\n");
}

return 0;
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ netxen_nic_get_pauseparam(struct net_device *dev,
__u32 val;
int port = adapter->physical_port;

pause->autoneg = 0;

if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
return;
Expand Down Expand Up @@ -532,6 +534,11 @@ netxen_nic_set_pauseparam(struct net_device *dev,
struct netxen_adapter *adapter = netdev_priv(dev);
__u32 val;
int port = adapter->physical_port;

/* not supported */
if (pause->autoneg)
return -EINVAL;

/* read mode */
if (adapter->ahw.port_type == NETXEN_NIC_GBE) {
if ((port < 0) || (port >= NETXEN_NIU_MAX_GBE_PORTS))
Expand Down
16 changes: 1 addition & 15 deletions trunk/drivers/net/ethernet/qlogic/qla3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,6 @@ static void ql_process_mac_tx_intr(struct ql3_adapter *qdev,
{
struct ql_tx_buf_cb *tx_cb;
int i;
int retval = 0;

if (mac_rsp->flags & OB_MAC_IOCB_RSP_S) {
netdev_warn(qdev->ndev,
Expand All @@ -1935,7 +1934,6 @@ static void ql_process_mac_tx_intr(struct ql3_adapter *qdev,
"Frame too short to be legal, frame not sent\n");

qdev->ndev->stats.tx_errors++;
retval = -EIO;
goto frame_not_sent;
}

Expand All @@ -1944,7 +1942,6 @@ static void ql_process_mac_tx_intr(struct ql3_adapter *qdev,
mac_rsp->transaction_id);

qdev->ndev->stats.tx_errors++;
retval = -EIO;
goto invalid_seg_count;
}

Expand Down Expand Up @@ -3953,15 +3950,4 @@ static struct pci_driver ql3xxx_driver = {
.remove = __devexit_p(ql3xxx_remove),
};

static int __init ql3xxx_init_module(void)
{
return pci_register_driver(&ql3xxx_driver);
}

static void __exit ql3xxx_exit(void)
{
pci_unregister_driver(&ql3xxx_driver);
}

module_init(ql3xxx_init_module);
module_exit(ql3xxx_exit);
module_pci_driver(ql3xxx_driver);
13 changes: 1 addition & 12 deletions trunk/drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -7023,15 +7023,4 @@ static struct pci_driver rtl8169_pci_driver = {
.driver.pm = RTL8169_PM_OPS,
};

static int __init rtl8169_init_module(void)
{
return pci_register_driver(&rtl8169_pci_driver);
}

static void __exit rtl8169_cleanup_module(void)
{
pci_unregister_driver(&rtl8169_pci_driver);
}

module_init(rtl8169_init_module);
module_exit(rtl8169_cleanup_module);
module_pci_driver(rtl8169_pci_driver);
2 changes: 2 additions & 0 deletions trunk/drivers/net/usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ config USB_NET_SMSC75XX
config USB_NET_SMSC95XX
tristate "SMSC LAN95XX based USB 2.0 10/100 ethernet devices"
depends on USB_USBNET
select BITREVERSE
select CRC16
select CRC32
help
This option adds support for SMSC LAN95XX based USB 2.0
Expand Down
Loading

0 comments on commit b22883b

Please sign in to comment.