aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-11 14:26:15 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-11 14:26:58 -0400
commit3c709f8fb43e07a0403bba4a8ca7ba00ab874994 (patch)
tree9efc1e2bf6930851f0224f525b6cde0f5297fa61 /drivers/net
parent0074820978004cc484b132d7a9ce0df414660d9d (diff)
parent9bbc052d5e63512b0ce4e201ea97e12fba9fda82 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-3.6
Conflicts: drivers/net/benet/be_main.c
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/Kconfig8
-rw-r--r--drivers/net/benet/be.h2
-rw-r--r--drivers/net/benet/be_cmds.c2
-rw-r--r--drivers/net/benet/be_main.c25
-rw-r--r--drivers/net/can/slcan.c4
-rw-r--r--drivers/net/ehea/ehea_ethtool.c21
-rw-r--r--drivers/net/pch_gbe/pch_gbe_main.c23
-rw-r--r--drivers/net/slip.c4
-rw-r--r--drivers/net/usb/cdc_ether.c2
-rw-r--r--drivers/net/usb/ipheth.c14
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c10
11 files changed, 74 insertions, 41 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index dc280bc8eba2..6c884ef1b069 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2536,7 +2536,7 @@ config S6GMAC
2536source "drivers/net/stmmac/Kconfig" 2536source "drivers/net/stmmac/Kconfig"
2537 2537
2538config PCH_GBE 2538config PCH_GBE
2539 tristate "PCH Gigabit Ethernet" 2539 tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GbE"
2540 depends on PCI 2540 depends on PCI
2541 select MII 2541 select MII
2542 ---help--- 2542 ---help---
@@ -2548,6 +2548,12 @@ config PCH_GBE
2548 to Gigabit Ethernet. 2548 to Gigabit Ethernet.
2549 This driver enables Gigabit Ethernet function. 2549 This driver enables Gigabit Ethernet function.
2550 2550
2551 This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
2552 Output Hub), ML7223.
2553 ML7223 IOH is for MP(Media Phone) use.
2554 ML7223 is companion chip for Intel Atom E6xx series.
2555 ML7223 is completely compatible for Intel EG20T PCH.
2556
2551endif # NETDEV_1000 2557endif # NETDEV_1000
2552 2558
2553# 2559#
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index a0b4743d7224..41bbc32123f8 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -212,7 +212,7 @@ struct be_rx_stats {
212 212
213struct be_rx_compl_info { 213struct be_rx_compl_info {
214 u32 rss_hash; 214 u32 rss_hash;
215 u16 vid; 215 u16 vlan_tag;
216 u16 pkt_size; 216 u16 pkt_size;
217 u16 rxq_idx; 217 u16 rxq_idx;
218 u16 mac_id; 218 u16 mac_id;
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 0fc06d363806..5fedc27c8839 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -133,7 +133,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter,
133 struct be_async_event_grp5_pvid_state *evt) 133 struct be_async_event_grp5_pvid_state *evt)
134{ 134{
135 if (evt->enabled) 135 if (evt->enabled)
136 adapter->pvid = evt->tag; 136 adapter->pvid = le16_to_cpu(evt->tag);
137 else 137 else
138 adapter->pvid = 0; 138 adapter->pvid = 0;
139} 139}
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 7b19931acba1..3fb4a1f465e1 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1017,7 +1017,8 @@ static void be_rx_compl_process(struct be_adapter *adapter,
1017 kfree_skb(skb); 1017 kfree_skb(skb);
1018 return; 1018 return;
1019 } 1019 }
1020 vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, rxcp->vid); 1020 vlan_hwaccel_receive_skb(skb, adapter->vlan_grp,
1021 rxcp->vlan_tag);
1021 } else { 1022 } else {
1022 netif_receive_skb(skb); 1023 netif_receive_skb(skb);
1023 } 1024 }
@@ -1077,7 +1078,8 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
1077 if (likely(!rxcp->vlanf)) 1078 if (likely(!rxcp->vlanf))
1078 napi_gro_frags(&eq_obj->napi); 1079 napi_gro_frags(&eq_obj->napi);
1079 else 1080 else
1080 vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, rxcp->vid); 1081 vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp,
1082 rxcp->vlan_tag);
1081} 1083}
1082 1084
1083static void be_parse_rx_compl_v1(struct be_adapter *adapter, 1085static void be_parse_rx_compl_v1(struct be_adapter *adapter,
@@ -1106,9 +1108,9 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter,
1106 AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, rxcp); 1108 AMAP_GET_BITS(struct amap_eth_rx_compl_v1, rsshash, rxcp);
1107 if (rxcp->vlanf) { 1109 if (rxcp->vlanf) {
1108 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, 1110 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm,
1109 compl); 1111 compl);
1110 rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, 1112 rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag,
1111 compl); 1113 compl);
1112 } 1114 }
1113} 1115}
1114 1116
@@ -1138,9 +1140,9 @@ static void be_parse_rx_compl_v0(struct be_adapter *adapter,
1138 AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, rxcp); 1140 AMAP_GET_BITS(struct amap_eth_rx_compl_v0, rsshash, rxcp);
1139 if (rxcp->vlanf) { 1141 if (rxcp->vlanf) {
1140 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, 1142 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm,
1141 compl); 1143 compl);
1142 rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, 1144 rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag,
1143 compl); 1145 compl);
1144 } 1146 }
1145} 1147}
1146 1148
@@ -1170,10 +1172,11 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
1170 rxcp->vlanf = 0; 1172 rxcp->vlanf = 0;
1171 1173
1172 if (!lancer_chip(adapter)) 1174 if (!lancer_chip(adapter))
1173 rxcp->vid = swab16(rxcp->vid); 1175 rxcp->vlan_tag = swab16(rxcp->vlan_tag);
1174 1176
1175 if ((adapter->pvid == rxcp->vid) && 1177 if (((adapter->pvid & VLAN_VID_MASK) ==
1176 !adapter->vlan_tag[rxcp->vid]) 1178 (rxcp->vlan_tag & VLAN_VID_MASK)) &&
1179 !adapter->vlan_tag[rxcp->vlan_tag])
1177 rxcp->vlanf = 0; 1180 rxcp->vlanf = 0;
1178 } 1181 }
1179 1182
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index b423965a78d1..1b49df6b2470 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct *tty)
583 /* Done. We have linked the TTY line to a channel. */ 583 /* Done. We have linked the TTY line to a channel. */
584 rtnl_unlock(); 584 rtnl_unlock();
585 tty->receive_room = 65536; /* We don't flow control */ 585 tty->receive_room = 65536; /* We don't flow control */
586 return sl->dev->base_addr; 586
587 /* TTY layer expects 0 on success */
588 return 0;
587 589
588err_free_chan: 590err_free_chan:
589 sl->tty = NULL; 591 sl->tty = NULL;
diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
index 1df5f40c646d..7f642aef5e82 100644
--- a/drivers/net/ehea/ehea_ethtool.c
+++ b/drivers/net/ehea/ehea_ethtool.c
@@ -68,15 +68,20 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
68 } 68 }
69 ethtool_cmd_speed_set(cmd, speed); 69 ethtool_cmd_speed_set(cmd, speed);
70 70
71 cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full 71 if (cmd->speed == SPEED_10000) {
72 | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half 72 cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
73 | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half 73 cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
74 | SUPPORTED_Autoneg | SUPPORTED_FIBRE); 74 cmd->port = PORT_FIBRE;
75 75 } else {
76 cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg 76 cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full
77 | ADVERTISED_FIBRE); 77 | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full
78 | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg
79 | SUPPORTED_TP);
80 cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg
81 | ADVERTISED_TP);
82 cmd->port = PORT_TP;
83 }
78 84
79 cmd->port = PORT_FIBRE;
80 cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE; 85 cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE;
81 86
82 return 0; 87 return 0;
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index f3e4b0adae93..c2476fd96573 100644
--- a/drivers/net/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/pch_gbe/pch_gbe_main.c
@@ -34,6 +34,10 @@ const char pch_driver_version[] = DRV_VERSION;
34#define PCH_GBE_COPYBREAK_DEFAULT 256 34#define PCH_GBE_COPYBREAK_DEFAULT 256
35#define PCH_GBE_PCI_BAR 1 35#define PCH_GBE_PCI_BAR 1
36 36
37/* Macros for ML7223 */
38#define PCI_VENDOR_ID_ROHM 0x10db
39#define PCI_DEVICE_ID_ROHM_ML7223_GBE 0x8013
40
37#define PCH_GBE_TX_WEIGHT 64 41#define PCH_GBE_TX_WEIGHT 64
38#define PCH_GBE_RX_WEIGHT 64 42#define PCH_GBE_RX_WEIGHT 64
39#define PCH_GBE_RX_BUFFER_WRITE 16 43#define PCH_GBE_RX_BUFFER_WRITE 16
@@ -43,8 +47,7 @@ const char pch_driver_version[] = DRV_VERSION;
43 47
44#define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \ 48#define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \
45 PCH_GBE_CHIP_TYPE_INTERNAL | \ 49 PCH_GBE_CHIP_TYPE_INTERNAL | \
46 PCH_GBE_RGMII_MODE_RGMII | \ 50 PCH_GBE_RGMII_MODE_RGMII \
47 PCH_GBE_CRS_SEL \
48 ) 51 )
49 52
50/* Ethertype field values */ 53/* Ethertype field values */
@@ -1495,12 +1498,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter,
1495 /* Write meta date of skb */ 1498 /* Write meta date of skb */
1496 skb_put(skb, length); 1499 skb_put(skb, length);
1497 skb->protocol = eth_type_trans(skb, netdev); 1500 skb->protocol = eth_type_trans(skb, netdev);
1498 if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) == 1501 if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
1499 PCH_GBE_RXD_ACC_STAT_TCPIPOK) {
1500 skb->ip_summed = CHECKSUM_UNNECESSARY;
1501 } else {
1502 skb->ip_summed = CHECKSUM_NONE; 1502 skb->ip_summed = CHECKSUM_NONE;
1503 } 1503 else
1504 skb->ip_summed = CHECKSUM_UNNECESSARY;
1505
1504 napi_gro_receive(&adapter->napi, skb); 1506 napi_gro_receive(&adapter->napi, skb);
1505 (*work_done)++; 1507 (*work_done)++;
1506 pr_debug("Receive skb->ip_summed: %d length: %d\n", 1508 pr_debug("Receive skb->ip_summed: %d length: %d\n",
@@ -2442,6 +2444,13 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gbe_pcidev_id) = {
2442 .class = (PCI_CLASS_NETWORK_ETHERNET << 8), 2444 .class = (PCI_CLASS_NETWORK_ETHERNET << 8),
2443 .class_mask = (0xFFFF00) 2445 .class_mask = (0xFFFF00)
2444 }, 2446 },
2447 {.vendor = PCI_VENDOR_ID_ROHM,
2448 .device = PCI_DEVICE_ID_ROHM_ML7223_GBE,
2449 .subvendor = PCI_ANY_ID,
2450 .subdevice = PCI_ANY_ID,
2451 .class = (PCI_CLASS_NETWORK_ETHERNET << 8),
2452 .class_mask = (0xFFFF00)
2453 },
2445 /* required last entry */ 2454 /* required last entry */
2446 {0} 2455 {0}
2447}; 2456};
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 86cbb9ea2f26..8ec1a9a0bb9a 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -853,7 +853,9 @@ static int slip_open(struct tty_struct *tty)
853 /* Done. We have linked the TTY line to a channel. */ 853 /* Done. We have linked the TTY line to a channel. */
854 rtnl_unlock(); 854 rtnl_unlock();
855 tty->receive_room = 65536; /* We don't flow control */ 855 tty->receive_room = 65536; /* We don't flow control */
856 return sl->dev->base_addr; 856
857 /* TTY layer expects 0 on success */
858 return 0;
857 859
858err_free_bufs: 860err_free_bufs:
859 sl_free_bufs(sl); 861 sl_free_bufs(sl);
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index a301479ecc60..c924ea2bce07 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -567,7 +567,7 @@ static const struct usb_device_id products [] = {
567{ 567{
568 USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM, 568 USB_DEVICE_AND_INTERFACE_INFO(0x1004, 0x61aa, USB_CLASS_COMM,
569 USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE), 569 USB_CDC_SUBCLASS_ETHERNET, USB_CDC_PROTO_NONE),
570 .driver_info = 0, 570 .driver_info = (unsigned long)&wwan_info,
571}, 571},
572 572
573/* 573/*
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index 7d42f9a2c068..81126ff85e05 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -65,6 +65,7 @@
65#define IPHETH_USBINTF_PROTO 1 65#define IPHETH_USBINTF_PROTO 1
66 66
67#define IPHETH_BUF_SIZE 1516 67#define IPHETH_BUF_SIZE 1516
68#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
68#define IPHETH_TX_TIMEOUT (5 * HZ) 69#define IPHETH_TX_TIMEOUT (5 * HZ)
69 70
70#define IPHETH_INTFNUM 2 71#define IPHETH_INTFNUM 2
@@ -202,18 +203,21 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
202 return; 203 return;
203 } 204 }
204 205
205 len = urb->actual_length; 206 if (urb->actual_length <= IPHETH_IP_ALIGN) {
206 buf = urb->transfer_buffer; 207 dev->net->stats.rx_length_errors++;
208 return;
209 }
210 len = urb->actual_length - IPHETH_IP_ALIGN;
211 buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
207 212
208 skb = dev_alloc_skb(NET_IP_ALIGN + len); 213 skb = dev_alloc_skb(len);
209 if (!skb) { 214 if (!skb) {
210 err("%s: dev_alloc_skb: -ENOMEM", __func__); 215 err("%s: dev_alloc_skb: -ENOMEM", __func__);
211 dev->net->stats.rx_dropped++; 216 dev->net->stats.rx_dropped++;
212 return; 217 return;
213 } 218 }
214 219
215 skb_reserve(skb, NET_IP_ALIGN); 220 memcpy(skb_put(skb, len), buf, len);
216 memcpy(skb_put(skb, len), buf + NET_IP_ALIGN, len - NET_IP_ALIGN);
217 skb->dev = dev->net; 221 skb->dev = dev->net;
218 skb->protocol = eth_type_trans(skb, dev->net); 222 skb->protocol = eth_type_trans(skb, dev->net);
219 223
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 7a494f79c88f..c0da23096160 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -178,6 +178,7 @@ static void
178vmxnet3_process_events(struct vmxnet3_adapter *adapter) 178vmxnet3_process_events(struct vmxnet3_adapter *adapter)
179{ 179{
180 int i; 180 int i;
181 unsigned long flags;
181 u32 events = le32_to_cpu(adapter->shared->ecr); 182 u32 events = le32_to_cpu(adapter->shared->ecr);
182 if (!events) 183 if (!events)
183 return; 184 return;
@@ -190,10 +191,10 @@ vmxnet3_process_events(struct vmxnet3_adapter *adapter)
190 191
191 /* Check if there is an error on xmit/recv queues */ 192 /* Check if there is an error on xmit/recv queues */
192 if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) { 193 if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) {
193 spin_lock(&adapter->cmd_lock); 194 spin_lock_irqsave(&adapter->cmd_lock, flags);
194 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, 195 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
195 VMXNET3_CMD_GET_QUEUE_STATUS); 196 VMXNET3_CMD_GET_QUEUE_STATUS);
196 spin_unlock(&adapter->cmd_lock); 197 spin_unlock_irqrestore(&adapter->cmd_lock, flags);
197 198
198 for (i = 0; i < adapter->num_tx_queues; i++) 199 for (i = 0; i < adapter->num_tx_queues; i++)
199 if (adapter->tqd_start[i].status.stopped) 200 if (adapter->tqd_start[i].status.stopped)
@@ -2720,13 +2721,14 @@ static void
2720vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) 2721vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
2721{ 2722{
2722 u32 cfg; 2723 u32 cfg;
2724 unsigned long flags;
2723 2725
2724 /* intr settings */ 2726 /* intr settings */
2725 spin_lock(&adapter->cmd_lock); 2727 spin_lock_irqsave(&adapter->cmd_lock, flags);
2726 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, 2728 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
2727 VMXNET3_CMD_GET_CONF_INTR); 2729 VMXNET3_CMD_GET_CONF_INTR);
2728 cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); 2730 cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD);
2729 spin_unlock(&adapter->cmd_lock); 2731 spin_unlock_irqrestore(&adapter->cmd_lock, flags);
2730 adapter->intr.type = cfg & 0x3; 2732 adapter->intr.type = cfg & 0x3;
2731 adapter->intr.mask_mode = (cfg >> 2) & 0x3; 2733 adapter->intr.mask_mode = (cfg >> 2) & 0x3;
2732 2734