aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
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.c18
-rw-r--r--drivers/net/can/sja1000/sja1000.c2
-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/usb/usbnet.c10
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c10
13 files changed, 80 insertions, 40 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 66823eded7a3..2353eca32593 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -213,7 +213,7 @@ struct be_rx_stats {
213 213
214struct be_rx_compl_info { 214struct be_rx_compl_info {
215 u32 rss_hash; 215 u32 rss_hash;
216 u16 vid; 216 u16 vlan_tag;
217 u16 pkt_size; 217 u16 pkt_size;
218 u16 rxq_idx; 218 u16 rxq_idx;
219 u16 mac_id; 219 u16 mac_id;
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 1e2d825bb94a..9dc9394fd4ca 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -132,7 +132,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter,
132 struct be_async_event_grp5_pvid_state *evt) 132 struct be_async_event_grp5_pvid_state *evt)
133{ 133{
134 if (evt->enabled) 134 if (evt->enabled)
135 adapter->pvid = evt->tag; 135 adapter->pvid = le16_to_cpu(evt->tag);
136 else 136 else
137 adapter->pvid = 0; 137 adapter->pvid = 0;
138} 138}
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 02a0443d1821..9187fb4e08f1 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1018,7 +1018,8 @@ static void be_rx_compl_process(struct be_adapter *adapter,
1018 kfree_skb(skb); 1018 kfree_skb(skb);
1019 return; 1019 return;
1020 } 1020 }
1021 vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, rxcp->vid); 1021 vlan_hwaccel_receive_skb(skb, adapter->vlan_grp,
1022 rxcp->vlan_tag);
1022 } else { 1023 } else {
1023 netif_receive_skb(skb); 1024 netif_receive_skb(skb);
1024 } 1025 }
@@ -1076,7 +1077,8 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
1076 if (likely(!rxcp->vlanf)) 1077 if (likely(!rxcp->vlanf))
1077 napi_gro_frags(&eq_obj->napi); 1078 napi_gro_frags(&eq_obj->napi);
1078 else 1079 else
1079 vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, rxcp->vid); 1080 vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp,
1081 rxcp->vlan_tag);
1080} 1082}
1081 1083
1082static void be_parse_rx_compl_v1(struct be_adapter *adapter, 1084static void be_parse_rx_compl_v1(struct be_adapter *adapter,
@@ -1102,7 +1104,8 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter,
1102 rxcp->pkt_type = 1104 rxcp->pkt_type =
1103 AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl); 1105 AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl);
1104 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, compl); 1106 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, compl);
1105 rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, compl); 1107 rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag,
1108 compl);
1106} 1109}
1107 1110
1108static void be_parse_rx_compl_v0(struct be_adapter *adapter, 1111static void be_parse_rx_compl_v0(struct be_adapter *adapter,
@@ -1128,7 +1131,8 @@ static void be_parse_rx_compl_v0(struct be_adapter *adapter,
1128 rxcp->pkt_type = 1131 rxcp->pkt_type =
1129 AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl); 1132 AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl);
1130 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, compl); 1133 rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, compl);
1131 rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, compl); 1134 rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag,
1135 compl);
1132} 1136}
1133 1137
1134static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) 1138static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
@@ -1155,9 +1159,11 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
1155 rxcp->vlanf = 0; 1159 rxcp->vlanf = 0;
1156 1160
1157 if (!lancer_chip(adapter)) 1161 if (!lancer_chip(adapter))
1158 rxcp->vid = swab16(rxcp->vid); 1162 rxcp->vlan_tag = swab16(rxcp->vlan_tag);
1159 1163
1160 if ((adapter->pvid == rxcp->vid) && !adapter->vlan_tag[rxcp->vid]) 1164 if (((adapter->pvid & VLAN_VID_MASK) ==
1165 (rxcp->vlan_tag & VLAN_VID_MASK)) &&
1166 !adapter->vlan_tag[rxcp->vlan_tag])
1161 rxcp->vlanf = 0; 1167 rxcp->vlanf = 0;
1162 1168
1163 /* As the compl has been parsed, reset it; we wont touch it again */ 1169 /* As the compl has been parsed, reset it; we wont touch it again */
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c
index a358ea9445a2..f501bba1fc6f 100644
--- a/drivers/net/can/sja1000/sja1000.c
+++ b/drivers/net/can/sja1000/sja1000.c
@@ -346,10 +346,10 @@ static void sja1000_rx(struct net_device *dev)
346 | (priv->read_reg(priv, REG_ID2) >> 5); 346 | (priv->read_reg(priv, REG_ID2) >> 5);
347 } 347 }
348 348
349 cf->can_dlc = get_can_dlc(fi & 0x0F);
349 if (fi & FI_RTR) { 350 if (fi & FI_RTR) {
350 id |= CAN_RTR_FLAG; 351 id |= CAN_RTR_FLAG;
351 } else { 352 } else {
352 cf->can_dlc = get_can_dlc(fi & 0x0F);
353 for (i = 0; i < cf->can_dlc; i++) 353 for (i = 0; i < cf->can_dlc; i++)
354 cf->data[i] = priv->read_reg(priv, dreg++); 354 cf->data[i] = priv->read_reg(priv, dreg++);
355 } 355 }
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 3e2e734fecb7..f3bbdcef338c 100644
--- a/drivers/net/ehea/ehea_ethtool.c
+++ b/drivers/net/ehea/ehea_ethtool.c
@@ -55,15 +55,20 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
55 cmd->duplex = -1; 55 cmd->duplex = -1;
56 } 56 }
57 57
58 cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full 58 if (cmd->speed == SPEED_10000) {
59 | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half 59 cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
60 | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half 60 cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
61 | SUPPORTED_Autoneg | SUPPORTED_FIBRE); 61 cmd->port = PORT_FIBRE;
62 62 } else {
63 cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg 63 cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full
64 | ADVERTISED_FIBRE); 64 | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full
65 | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg
66 | SUPPORTED_TP);
67 cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg
68 | ADVERTISED_TP);
69 cmd->port = PORT_TP;
70 }
65 71
66 cmd->port = PORT_FIBRE;
67 cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE; 72 cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE;
68 73
69 return 0; 74 return 0;
diff --git a/drivers/net/pch_gbe/pch_gbe_main.c b/drivers/net/pch_gbe/pch_gbe_main.c
index 2ef2f9cdefa6..56d049a472da 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 */
@@ -1494,12 +1497,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter,
1494 /* Write meta date of skb */ 1497 /* Write meta date of skb */
1495 skb_put(skb, length); 1498 skb_put(skb, length);
1496 skb->protocol = eth_type_trans(skb, netdev); 1499 skb->protocol = eth_type_trans(skb, netdev);
1497 if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) == 1500 if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
1498 PCH_GBE_RXD_ACC_STAT_TCPIPOK) {
1499 skb->ip_summed = CHECKSUM_UNNECESSARY;
1500 } else {
1501 skb->ip_summed = CHECKSUM_NONE; 1501 skb->ip_summed = CHECKSUM_NONE;
1502 } 1502 else
1503 skb->ip_summed = CHECKSUM_UNNECESSARY;
1504
1503 napi_gro_receive(&adapter->napi, skb); 1505 napi_gro_receive(&adapter->napi, skb);
1504 (*work_done)++; 1506 (*work_done)++;
1505 pr_debug("Receive skb->ip_summed: %d length: %d\n", 1507 pr_debug("Receive skb->ip_summed: %d length: %d\n",
@@ -2420,6 +2422,13 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gbe_pcidev_id) = {
2420 .class = (PCI_CLASS_NETWORK_ETHERNET << 8), 2422 .class = (PCI_CLASS_NETWORK_ETHERNET << 8),
2421 .class_mask = (0xFFFF00) 2423 .class_mask = (0xFFFF00)
2422 }, 2424 },
2425 {.vendor = PCI_VENDOR_ID_ROHM,
2426 .device = PCI_DEVICE_ID_ROHM_ML7223_GBE,
2427 .subvendor = PCI_ANY_ID,
2428 .subdevice = PCI_ANY_ID,
2429 .class = (PCI_CLASS_NETWORK_ETHERNET << 8),
2430 .class_mask = (0xFFFF00)
2431 },
2423 /* required last entry */ 2432 /* required last entry */
2424 {0} 2433 {0}
2425}; 2434};
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/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 009bba3d753e..9ab439d144ed 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -645,6 +645,7 @@ int usbnet_stop (struct net_device *net)
645 struct driver_info *info = dev->driver_info; 645 struct driver_info *info = dev->driver_info;
646 int retval; 646 int retval;
647 647
648 clear_bit(EVENT_DEV_OPEN, &dev->flags);
648 netif_stop_queue (net); 649 netif_stop_queue (net);
649 650
650 netif_info(dev, ifdown, dev->net, 651 netif_info(dev, ifdown, dev->net,
@@ -1524,9 +1525,12 @@ int usbnet_resume (struct usb_interface *intf)
1524 smp_mb(); 1525 smp_mb();
1525 clear_bit(EVENT_DEV_ASLEEP, &dev->flags); 1526 clear_bit(EVENT_DEV_ASLEEP, &dev->flags);
1526 spin_unlock_irq(&dev->txq.lock); 1527 spin_unlock_irq(&dev->txq.lock);
1527 if (!(dev->txq.qlen >= TX_QLEN(dev))) 1528
1528 netif_start_queue(dev->net); 1529 if (test_bit(EVENT_DEV_OPEN, &dev->flags)) {
1529 tasklet_schedule (&dev->bh); 1530 if (!(dev->txq.qlen >= TX_QLEN(dev)))
1531 netif_start_queue(dev->net);
1532 tasklet_schedule (&dev->bh);
1533 }
1530 } 1534 }
1531 return 0; 1535 return 0;
1532} 1536}
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 0d47c3a05307..c16ed961153a 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)
@@ -2733,13 +2734,14 @@ static void
2733vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) 2734vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
2734{ 2735{
2735 u32 cfg; 2736 u32 cfg;
2737 unsigned long flags;
2736 2738
2737 /* intr settings */ 2739 /* intr settings */
2738 spin_lock(&adapter->cmd_lock); 2740 spin_lock_irqsave(&adapter->cmd_lock, flags);
2739 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, 2741 VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
2740 VMXNET3_CMD_GET_CONF_INTR); 2742 VMXNET3_CMD_GET_CONF_INTR);
2741 cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); 2743 cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD);
2742 spin_unlock(&adapter->cmd_lock); 2744 spin_unlock_irqrestore(&adapter->cmd_lock, flags);
2743 adapter->intr.type = cfg & 0x3; 2745 adapter->intr.type = cfg & 0x3;
2744 adapter->intr.mask_mode = (cfg >> 2) & 0x3; 2746 adapter->intr.mask_mode = (cfg >> 2) & 0x3;
2745 2747