aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/isdn/capi/kcapi.c6
-rw-r--r--drivers/isdn/hardware/mISDN/netjet.c4
-rw-r--r--drivers/net/benet/be_cmds.c2
-rw-r--r--drivers/net/bnx2.c14
-rw-r--r--drivers/net/can/mscan/mpc5xxx_can.c10
-rw-r--r--drivers/net/e1000e/netdev.c2
-rw-r--r--drivers/net/enic/enic.h7
-rw-r--r--drivers/net/enic/enic_main.c200
-rw-r--r--drivers/net/epic100.c7
-rw-r--r--drivers/net/fec.c16
-rw-r--r--drivers/net/greth.c11
-rw-r--r--drivers/net/ixgbe/ixgbe_common.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_type.h1
-rw-r--r--drivers/net/korina.c32
-rw-r--r--drivers/net/ksz884x.c3
-rw-r--r--drivers/net/ppp_generic.c2
-rw-r--r--drivers/net/r8169.c5
-rw-r--r--drivers/net/sfc/net_driver.h2
-rw-r--r--drivers/net/sfc/siena.c2
-rw-r--r--drivers/net/tehuti.c4
-rw-r--r--drivers/net/virtio_net.c8
-rw-r--r--drivers/net/wan/x25_asy.c2
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c17
24 files changed, 184 insertions, 177 deletions
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
index bde3c88b8b27..b054494df846 100644
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -1020,12 +1020,12 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
1020 if (cmd == AVMB1_ADDCARD) { 1020 if (cmd == AVMB1_ADDCARD) {
1021 if ((retval = copy_from_user(&cdef, data, 1021 if ((retval = copy_from_user(&cdef, data,
1022 sizeof(avmb1_carddef)))) 1022 sizeof(avmb1_carddef))))
1023 return retval; 1023 return -EFAULT;
1024 cdef.cardtype = AVM_CARDTYPE_B1; 1024 cdef.cardtype = AVM_CARDTYPE_B1;
1025 } else { 1025 } else {
1026 if ((retval = copy_from_user(&cdef, data, 1026 if ((retval = copy_from_user(&cdef, data,
1027 sizeof(avmb1_extcarddef)))) 1027 sizeof(avmb1_extcarddef))))
1028 return retval; 1028 return -EFAULT;
1029 } 1029 }
1030 cparams.port = cdef.port; 1030 cparams.port = cdef.port;
1031 cparams.irq = cdef.irq; 1031 cparams.irq = cdef.irq;
@@ -1218,7 +1218,7 @@ int capi20_manufacturer(unsigned int cmd, void __user *data)
1218 kcapi_carddef cdef; 1218 kcapi_carddef cdef;
1219 1219
1220 if ((retval = copy_from_user(&cdef, data, sizeof(cdef)))) 1220 if ((retval = copy_from_user(&cdef, data, sizeof(cdef))))
1221 return retval; 1221 return -EFAULT;
1222 1222
1223 cparams.port = cdef.port; 1223 cparams.port = cdef.port;
1224 cparams.irq = cdef.irq; 1224 cparams.irq = cdef.irq;
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c
index 0a3553df065f..54ae71a907f9 100644
--- a/drivers/isdn/hardware/mISDN/netjet.c
+++ b/drivers/isdn/hardware/mISDN/netjet.c
@@ -320,12 +320,12 @@ inittiger(struct tiger_hw *card)
320 return -ENOMEM; 320 return -ENOMEM;
321 } 321 }
322 for (i = 0; i < 2; i++) { 322 for (i = 0; i < 2; i++) {
323 card->bc[i].hsbuf = kmalloc(NJ_DMA_TXSIZE, GFP_KERNEL); 323 card->bc[i].hsbuf = kmalloc(NJ_DMA_TXSIZE, GFP_ATOMIC);
324 if (!card->bc[i].hsbuf) { 324 if (!card->bc[i].hsbuf) {
325 pr_info("%s: no B%d send buffer\n", card->name, i + 1); 325 pr_info("%s: no B%d send buffer\n", card->name, i + 1);
326 return -ENOMEM; 326 return -ENOMEM;
327 } 327 }
328 card->bc[i].hrbuf = kmalloc(NJ_DMA_RXSIZE, GFP_KERNEL); 328 card->bc[i].hrbuf = kmalloc(NJ_DMA_RXSIZE, GFP_ATOMIC);
329 if (!card->bc[i].hrbuf) { 329 if (!card->bc[i].hrbuf) {
330 pr_info("%s: no B%d recv buffer\n", card->name, i + 1); 330 pr_info("%s: no B%d recv buffer\n", card->name, i + 1);
331 return -ENOMEM; 331 return -ENOMEM;
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index ce437b639cf8..ee1ad9693c8f 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1592,7 +1592,7 @@ int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
1592 1592
1593 be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL, 1593 be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL,
1594 OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req)); 1594 OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req));
1595 req->hdr.timeout = 4; 1595 req->hdr.timeout = cpu_to_le32(4);
1596 1596
1597 req->pattern = cpu_to_le64(pattern); 1597 req->pattern = cpu_to_le64(pattern);
1598 req->src_port = cpu_to_le32(port_num); 1598 req->src_port = cpu_to_le32(port_num);
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 188e356c30a3..949d7a9dcf92 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -247,6 +247,7 @@ static const struct flash_spec flash_5709 = {
247MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl); 247MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl);
248 248
249static void bnx2_init_napi(struct bnx2 *bp); 249static void bnx2_init_napi(struct bnx2 *bp);
250static void bnx2_del_napi(struct bnx2 *bp);
250 251
251static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr) 252static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)
252{ 253{
@@ -6270,6 +6271,7 @@ open_err:
6270 bnx2_free_skbs(bp); 6271 bnx2_free_skbs(bp);
6271 bnx2_free_irq(bp); 6272 bnx2_free_irq(bp);
6272 bnx2_free_mem(bp); 6273 bnx2_free_mem(bp);
6274 bnx2_del_napi(bp);
6273 return rc; 6275 return rc;
6274} 6276}
6275 6277
@@ -6537,6 +6539,7 @@ bnx2_close(struct net_device *dev)
6537 bnx2_free_irq(bp); 6539 bnx2_free_irq(bp);
6538 bnx2_free_skbs(bp); 6540 bnx2_free_skbs(bp);
6539 bnx2_free_mem(bp); 6541 bnx2_free_mem(bp);
6542 bnx2_del_napi(bp);
6540 bp->link_up = 0; 6543 bp->link_up = 0;
6541 netif_carrier_off(bp->dev); 6544 netif_carrier_off(bp->dev);
6542 bnx2_set_power_state(bp, PCI_D3hot); 6545 bnx2_set_power_state(bp, PCI_D3hot);
@@ -8227,7 +8230,16 @@ bnx2_bus_string(struct bnx2 *bp, char *str)
8227 return str; 8230 return str;
8228} 8231}
8229 8232
8230static void __devinit 8233static void
8234bnx2_del_napi(struct bnx2 *bp)
8235{
8236 int i;
8237
8238 for (i = 0; i < bp->irq_nvecs; i++)
8239 netif_napi_del(&bp->bnx2_napi[i].napi);
8240}
8241
8242static void
8231bnx2_init_napi(struct bnx2 *bp) 8243bnx2_init_napi(struct bnx2 *bp)
8232{ 8244{
8233 int i; 8245 int i;
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index 8af8442c694a..af753936e835 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -73,7 +73,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
73 else 73 else
74 *mscan_clksrc = MSCAN_CLKSRC_XTAL; 74 *mscan_clksrc = MSCAN_CLKSRC_XTAL;
75 75
76 freq = mpc5xxx_get_bus_frequency(ofdev->node); 76 freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node);
77 if (!freq) 77 if (!freq)
78 return 0; 78 return 0;
79 79
@@ -152,7 +152,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
152 } 152 }
153 153
154 /* Determine the MSCAN device index from the physical address */ 154 /* Determine the MSCAN device index from the physical address */
155 pval = of_get_property(ofdev->node, "reg", &plen); 155 pval = of_get_property(ofdev->dev.of_node, "reg", &plen);
156 BUG_ON(!pval || plen < sizeof(*pval)); 156 BUG_ON(!pval || plen < sizeof(*pval));
157 clockidx = (*pval & 0x80) ? 1 : 0; 157 clockidx = (*pval & 0x80) ? 1 : 0;
158 if (*pval & 0x2000) 158 if (*pval & 0x2000)
@@ -168,11 +168,11 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
168 */ 168 */
169 if (clock_name && !strcmp(clock_name, "ip")) { 169 if (clock_name && !strcmp(clock_name, "ip")) {
170 *mscan_clksrc = MSCAN_CLKSRC_IPS; 170 *mscan_clksrc = MSCAN_CLKSRC_IPS;
171 freq = mpc5xxx_get_bus_frequency(ofdev->node); 171 freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node);
172 } else { 172 } else {
173 *mscan_clksrc = MSCAN_CLKSRC_BUS; 173 *mscan_clksrc = MSCAN_CLKSRC_BUS;
174 174
175 pval = of_get_property(ofdev->node, 175 pval = of_get_property(ofdev->dev.of_node,
176 "fsl,mscan-clock-divider", &plen); 176 "fsl,mscan-clock-divider", &plen);
177 if (pval && plen == sizeof(*pval)) 177 if (pval && plen == sizeof(*pval))
178 clockdiv = *pval; 178 clockdiv = *pval;
@@ -251,7 +251,7 @@ static int __devinit mpc5xxx_can_probe(struct of_device *ofdev,
251 const struct of_device_id *id) 251 const struct of_device_id *id)
252{ 252{
253 struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; 253 struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data;
254 struct device_node *np = ofdev->node; 254 struct device_node *np = ofdev->dev.of_node;
255 struct net_device *dev; 255 struct net_device *dev;
256 struct mscan_priv *priv; 256 struct mscan_priv *priv;
257 void __iomem *base; 257 void __iomem *base;
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 24507f3b8b17..57a7e41da69e 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2554,7 +2554,7 @@ static void e1000_init_manageability_pt(struct e1000_adapter *adapter)
2554 mdef = er32(MDEF(i)); 2554 mdef = er32(MDEF(i));
2555 2555
2556 /* Ignore filters with anything other than IPMI ports */ 2556 /* Ignore filters with anything other than IPMI ports */
2557 if (mdef & !(E1000_MDEF_PORT_623 | E1000_MDEF_PORT_664)) 2557 if (mdef & ~(E1000_MDEF_PORT_623 | E1000_MDEF_PORT_664))
2558 continue; 2558 continue;
2559 2559
2560 /* Enable this decision filter in MANC2H */ 2560 /* Enable this decision filter in MANC2H */
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 85f2a2e7030a..45e86d1e5b1b 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -74,7 +74,14 @@ struct enic_msix_entry {
74 void *devid; 74 void *devid;
75}; 75};
76 76
77#define ENIC_SET_APPLIED (1 << 0)
78#define ENIC_SET_REQUEST (1 << 1)
79#define ENIC_SET_NAME (1 << 2)
80#define ENIC_SET_INSTANCE (1 << 3)
81#define ENIC_SET_HOST (1 << 4)
82
77struct enic_port_profile { 83struct enic_port_profile {
84 u32 set;
78 u8 request; 85 u8 request;
79 char name[PORT_PROFILE_MAX]; 86 char name[PORT_PROFILE_MAX];
80 u8 instance_uuid[PORT_UUID_MAX]; 87 u8 instance_uuid[PORT_UUID_MAX];
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 6586b5c7e4b6..bc7d6b96de3d 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1029,8 +1029,7 @@ static int enic_dev_init_done(struct enic *enic, int *done, int *error)
1029 return err; 1029 return err;
1030} 1030}
1031 1031
1032static int enic_set_port_profile(struct enic *enic, u8 request, u8 *mac, 1032static int enic_set_port_profile(struct enic *enic, u8 *mac)
1033 char *name, u8 *instance_uuid, u8 *host_uuid)
1034{ 1033{
1035 struct vic_provinfo *vp; 1034 struct vic_provinfo *vp;
1036 u8 oui[3] = VIC_PROVINFO_CISCO_OUI; 1035 u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
@@ -1040,97 +1039,112 @@ static int enic_set_port_profile(struct enic *enic, u8 request, u8 *mac,
1040 "%02X%02X-%02X%02X%02X%02X%0X%02X"; 1039 "%02X%02X-%02X%02X%02X%02X%0X%02X";
1041 int err; 1040 int err;
1042 1041
1043 if (!name) 1042 err = enic_vnic_dev_deinit(enic);
1044 return -EINVAL; 1043 if (err)
1044 return err;
1045 1045
1046 if (!is_valid_ether_addr(mac)) 1046 switch (enic->pp.request) {
1047 return -EADDRNOTAVAIL;
1048 1047
1049 vp = vic_provinfo_alloc(GFP_KERNEL, oui, VIC_PROVINFO_LINUX_TYPE); 1048 case PORT_REQUEST_ASSOCIATE:
1050 if (!vp)
1051 return -ENOMEM;
1052 1049
1053 vic_provinfo_add_tlv(vp, 1050 if (!(enic->pp.set & ENIC_SET_NAME) || !strlen(enic->pp.name))
1054 VIC_LINUX_PROV_TLV_PORT_PROFILE_NAME_STR, 1051 return -EINVAL;
1055 strlen(name) + 1, name);
1056
1057 vic_provinfo_add_tlv(vp,
1058 VIC_LINUX_PROV_TLV_CLIENT_MAC_ADDR,
1059 ETH_ALEN, mac);
1060
1061 if (instance_uuid) {
1062 uuid = instance_uuid;
1063 sprintf(uuid_str, uuid_fmt,
1064 uuid[0], uuid[1], uuid[2], uuid[3],
1065 uuid[4], uuid[5], uuid[6], uuid[7],
1066 uuid[8], uuid[9], uuid[10], uuid[11],
1067 uuid[12], uuid[13], uuid[14], uuid[15]);
1068 vic_provinfo_add_tlv(vp,
1069 VIC_LINUX_PROV_TLV_CLIENT_UUID_STR,
1070 sizeof(uuid_str), uuid_str);
1071 }
1072 1052
1073 if (host_uuid) { 1053 if (!is_valid_ether_addr(mac))
1074 uuid = host_uuid; 1054 return -EADDRNOTAVAIL;
1075 sprintf(uuid_str, uuid_fmt,
1076 uuid[0], uuid[1], uuid[2], uuid[3],
1077 uuid[4], uuid[5], uuid[6], uuid[7],
1078 uuid[8], uuid[9], uuid[10], uuid[11],
1079 uuid[12], uuid[13], uuid[14], uuid[15]);
1080 vic_provinfo_add_tlv(vp,
1081 VIC_LINUX_PROV_TLV_HOST_UUID_STR,
1082 sizeof(uuid_str), uuid_str);
1083 }
1084 1055
1085 err = enic_vnic_dev_deinit(enic); 1056 vp = vic_provinfo_alloc(GFP_KERNEL, oui,
1086 if (err) 1057 VIC_PROVINFO_LINUX_TYPE);
1087 goto err_out; 1058 if (!vp)
1059 return -ENOMEM;
1088 1060
1089 memset(&enic->pp, 0, sizeof(enic->pp)); 1061 vic_provinfo_add_tlv(vp,
1062 VIC_LINUX_PROV_TLV_PORT_PROFILE_NAME_STR,
1063 strlen(enic->pp.name) + 1, enic->pp.name);
1090 1064
1091 err = enic_dev_init_prov(enic, vp); 1065 vic_provinfo_add_tlv(vp,
1092 if (err) 1066 VIC_LINUX_PROV_TLV_CLIENT_MAC_ADDR,
1093 goto err_out; 1067 ETH_ALEN, mac);
1068
1069 if (enic->pp.set & ENIC_SET_INSTANCE) {
1070 uuid = enic->pp.instance_uuid;
1071 sprintf(uuid_str, uuid_fmt,
1072 uuid[0], uuid[1], uuid[2], uuid[3],
1073 uuid[4], uuid[5], uuid[6], uuid[7],
1074 uuid[8], uuid[9], uuid[10], uuid[11],
1075 uuid[12], uuid[13], uuid[14], uuid[15]);
1076 vic_provinfo_add_tlv(vp,
1077 VIC_LINUX_PROV_TLV_CLIENT_UUID_STR,
1078 sizeof(uuid_str), uuid_str);
1079 }
1094 1080
1095 enic->pp.request = request; 1081 if (enic->pp.set & ENIC_SET_HOST) {
1096 memcpy(enic->pp.name, name, PORT_PROFILE_MAX); 1082 uuid = enic->pp.host_uuid;
1097 if (instance_uuid) 1083 sprintf(uuid_str, uuid_fmt,
1098 memcpy(enic->pp.instance_uuid, 1084 uuid[0], uuid[1], uuid[2], uuid[3],
1099 instance_uuid, PORT_UUID_MAX); 1085 uuid[4], uuid[5], uuid[6], uuid[7],
1100 if (host_uuid) 1086 uuid[8], uuid[9], uuid[10], uuid[11],
1101 memcpy(enic->pp.host_uuid, 1087 uuid[12], uuid[13], uuid[14], uuid[15]);
1102 host_uuid, PORT_UUID_MAX); 1088 vic_provinfo_add_tlv(vp,
1089 VIC_LINUX_PROV_TLV_HOST_UUID_STR,
1090 sizeof(uuid_str), uuid_str);
1091 }
1103 1092
1104err_out: 1093 err = enic_dev_init_prov(enic, vp);
1105 vic_provinfo_free(vp); 1094 vic_provinfo_free(vp);
1095 if (err)
1096 return err;
1097 break;
1106 1098
1107 return err; 1099 case PORT_REQUEST_DISASSOCIATE:
1108} 1100 break;
1109 1101
1110static int enic_unset_port_profile(struct enic *enic) 1102 default:
1111{ 1103 return -EINVAL;
1112 memset(&enic->pp, 0, sizeof(enic->pp)); 1104 }
1113 return enic_vnic_dev_deinit(enic); 1105
1106 enic->pp.set |= ENIC_SET_APPLIED;
1107 return 0;
1114} 1108}
1115 1109
1116static int enic_set_vf_port(struct net_device *netdev, int vf, 1110static int enic_set_vf_port(struct net_device *netdev, int vf,
1117 struct nlattr *port[]) 1111 struct nlattr *port[])
1118{ 1112{
1119 struct enic *enic = netdev_priv(netdev); 1113 struct enic *enic = netdev_priv(netdev);
1120 char *name = NULL; 1114
1121 u8 *instance_uuid = NULL; 1115 memset(&enic->pp, 0, sizeof(enic->pp));
1122 u8 *host_uuid = NULL; 1116
1123 u8 request = PORT_REQUEST_DISASSOCIATE; 1117 if (port[IFLA_PORT_REQUEST]) {
1118 enic->pp.set |= ENIC_SET_REQUEST;
1119 enic->pp.request = nla_get_u8(port[IFLA_PORT_REQUEST]);
1120 }
1121
1122 if (port[IFLA_PORT_PROFILE]) {
1123 enic->pp.set |= ENIC_SET_NAME;
1124 memcpy(enic->pp.name, nla_data(port[IFLA_PORT_PROFILE]),
1125 PORT_PROFILE_MAX);
1126 }
1127
1128 if (port[IFLA_PORT_INSTANCE_UUID]) {
1129 enic->pp.set |= ENIC_SET_INSTANCE;
1130 memcpy(enic->pp.instance_uuid,
1131 nla_data(port[IFLA_PORT_INSTANCE_UUID]), PORT_UUID_MAX);
1132 }
1133
1134 if (port[IFLA_PORT_HOST_UUID]) {
1135 enic->pp.set |= ENIC_SET_HOST;
1136 memcpy(enic->pp.host_uuid,
1137 nla_data(port[IFLA_PORT_HOST_UUID]), PORT_UUID_MAX);
1138 }
1124 1139
1125 /* don't support VFs, yet */ 1140 /* don't support VFs, yet */
1126 if (vf != PORT_SELF_VF) 1141 if (vf != PORT_SELF_VF)
1127 return -EOPNOTSUPP; 1142 return -EOPNOTSUPP;
1128 1143
1129 if (port[IFLA_PORT_REQUEST]) 1144 if (!(enic->pp.set & ENIC_SET_REQUEST))
1130 request = nla_get_u8(port[IFLA_PORT_REQUEST]); 1145 return -EOPNOTSUPP;
1131 1146
1132 switch (request) { 1147 if (enic->pp.request == PORT_REQUEST_ASSOCIATE) {
1133 case PORT_REQUEST_ASSOCIATE:
1134 1148
1135 /* If the interface mac addr hasn't been assigned, 1149 /* If the interface mac addr hasn't been assigned,
1136 * assign a random mac addr before setting port- 1150 * assign a random mac addr before setting port-
@@ -1139,30 +1153,9 @@ static int enic_set_vf_port(struct net_device *netdev, int vf,
1139 1153
1140 if (is_zero_ether_addr(netdev->dev_addr)) 1154 if (is_zero_ether_addr(netdev->dev_addr))
1141 random_ether_addr(netdev->dev_addr); 1155 random_ether_addr(netdev->dev_addr);
1142
1143 if (port[IFLA_PORT_PROFILE])
1144 name = nla_data(port[IFLA_PORT_PROFILE]);
1145
1146 if (port[IFLA_PORT_INSTANCE_UUID])
1147 instance_uuid =
1148 nla_data(port[IFLA_PORT_INSTANCE_UUID]);
1149
1150 if (port[IFLA_PORT_HOST_UUID])
1151 host_uuid = nla_data(port[IFLA_PORT_HOST_UUID]);
1152
1153 return enic_set_port_profile(enic, request,
1154 netdev->dev_addr, name,
1155 instance_uuid, host_uuid);
1156
1157 case PORT_REQUEST_DISASSOCIATE:
1158
1159 return enic_unset_port_profile(enic);
1160
1161 default:
1162 break;
1163 } 1156 }
1164 1157
1165 return -EOPNOTSUPP; 1158 return enic_set_port_profile(enic, netdev->dev_addr);
1166} 1159}
1167 1160
1168static int enic_get_vf_port(struct net_device *netdev, int vf, 1161static int enic_get_vf_port(struct net_device *netdev, int vf,
@@ -1172,14 +1165,12 @@ static int enic_get_vf_port(struct net_device *netdev, int vf,
1172 int err, error, done; 1165 int err, error, done;
1173 u16 response = PORT_PROFILE_RESPONSE_SUCCESS; 1166 u16 response = PORT_PROFILE_RESPONSE_SUCCESS;
1174 1167
1175 /* don't support VFs, yet */ 1168 if (!(enic->pp.set & ENIC_SET_APPLIED))
1176 if (vf != PORT_SELF_VF) 1169 return -ENODATA;
1177 return -EOPNOTSUPP;
1178 1170
1179 err = enic_dev_init_done(enic, &done, &error); 1171 err = enic_dev_init_done(enic, &done, &error);
1180
1181 if (err) 1172 if (err)
1182 return err; 1173 error = err;
1183 1174
1184 switch (error) { 1175 switch (error) {
1185 case ERR_SUCCESS: 1176 case ERR_SUCCESS:
@@ -1202,12 +1193,15 @@ static int enic_get_vf_port(struct net_device *netdev, int vf,
1202 1193
1203 NLA_PUT_U16(skb, IFLA_PORT_REQUEST, enic->pp.request); 1194 NLA_PUT_U16(skb, IFLA_PORT_REQUEST, enic->pp.request);
1204 NLA_PUT_U16(skb, IFLA_PORT_RESPONSE, response); 1195 NLA_PUT_U16(skb, IFLA_PORT_RESPONSE, response);
1205 NLA_PUT(skb, IFLA_PORT_PROFILE, PORT_PROFILE_MAX, 1196 if (enic->pp.set & ENIC_SET_NAME)
1206 enic->pp.name); 1197 NLA_PUT(skb, IFLA_PORT_PROFILE, PORT_PROFILE_MAX,
1207 NLA_PUT(skb, IFLA_PORT_INSTANCE_UUID, PORT_UUID_MAX, 1198 enic->pp.name);
1208 enic->pp.instance_uuid); 1199 if (enic->pp.set & ENIC_SET_INSTANCE)
1209 NLA_PUT(skb, IFLA_PORT_HOST_UUID, PORT_UUID_MAX, 1200 NLA_PUT(skb, IFLA_PORT_INSTANCE_UUID, PORT_UUID_MAX,
1210 enic->pp.host_uuid); 1201 enic->pp.instance_uuid);
1202 if (enic->pp.set & ENIC_SET_HOST)
1203 NLA_PUT(skb, IFLA_PORT_HOST_UUID, PORT_UUID_MAX,
1204 enic->pp.host_uuid);
1211 1205
1212 return 0; 1206 return 0;
1213 1207
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index 6838dfc9ef23..4c274657283c 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -87,6 +87,7 @@ static int rx_copybreak;
87#include <linux/bitops.h> 87#include <linux/bitops.h>
88#include <asm/io.h> 88#include <asm/io.h>
89#include <asm/uaccess.h> 89#include <asm/uaccess.h>
90#include <asm/byteorder.h>
90 91
91/* These identify the driver base version and may not be removed. */ 92/* These identify the driver base version and may not be removed. */
92static char version[] __devinitdata = 93static char version[] __devinitdata =
@@ -230,7 +231,7 @@ static const u16 media2miictl[16] = {
230 * The EPIC100 Rx and Tx buffer descriptors. Note that these 231 * The EPIC100 Rx and Tx buffer descriptors. Note that these
231 * really ARE host-endian; it's not a misannotation. We tell 232 * really ARE host-endian; it's not a misannotation. We tell
232 * the card to byteswap them internally on big-endian hosts - 233 * the card to byteswap them internally on big-endian hosts -
233 * look for #ifdef CONFIG_BIG_ENDIAN in epic_open(). 234 * look for #ifdef __BIG_ENDIAN in epic_open().
234 */ 235 */
235 236
236struct epic_tx_desc { 237struct epic_tx_desc {
@@ -690,7 +691,7 @@ static int epic_open(struct net_device *dev)
690 outl((inl(ioaddr + NVCTL) & ~0x003C) | 0x4800, ioaddr + NVCTL); 691 outl((inl(ioaddr + NVCTL) & ~0x003C) | 0x4800, ioaddr + NVCTL);
691 692
692 /* Tell the chip to byteswap descriptors on big-endian hosts */ 693 /* Tell the chip to byteswap descriptors on big-endian hosts */
693#ifdef CONFIG_BIG_ENDIAN 694#ifdef __BIG_ENDIAN
694 outl(0x4432 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL); 695 outl(0x4432 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL);
695 inl(ioaddr + GENCTL); 696 inl(ioaddr + GENCTL);
696 outl(0x0432 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL); 697 outl(0x0432 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL);
@@ -806,7 +807,7 @@ static void epic_restart(struct net_device *dev)
806 for (i = 16; i > 0; i--) 807 for (i = 16; i > 0; i--)
807 outl(0x0008, ioaddr + TEST1); 808 outl(0x0008, ioaddr + TEST1);
808 809
809#ifdef CONFIG_BIG_ENDIAN 810#ifdef __BIG_ENDIAN
810 outl(0x0432 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL); 811 outl(0x0432 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL);
811#else 812#else
812 outl(0x0412 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL); 813 outl(0x0412 | (RX_FIFO_THRESH<<8), ioaddr + GENCTL);
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index a3565adc034c..a3cae4ed6ac9 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -1369,10 +1369,9 @@ fec_suspend(struct platform_device *dev, pm_message_t state)
1369 1369
1370 if (ndev) { 1370 if (ndev) {
1371 fep = netdev_priv(ndev); 1371 fep = netdev_priv(ndev);
1372 if (netif_running(ndev)) { 1372 if (netif_running(ndev))
1373 netif_device_detach(ndev); 1373 fec_enet_close(ndev);
1374 fec_stop(ndev); 1374 clk_disable(fep->clk);
1375 }
1376 } 1375 }
1377 return 0; 1376 return 0;
1378} 1377}
@@ -1381,12 +1380,13 @@ static int
1381fec_resume(struct platform_device *dev) 1380fec_resume(struct platform_device *dev)
1382{ 1381{
1383 struct net_device *ndev = platform_get_drvdata(dev); 1382 struct net_device *ndev = platform_get_drvdata(dev);
1383 struct fec_enet_private *fep;
1384 1384
1385 if (ndev) { 1385 if (ndev) {
1386 if (netif_running(ndev)) { 1386 fep = netdev_priv(ndev);
1387 fec_enet_init(ndev, 0); 1387 clk_enable(fep->clk);
1388 netif_device_attach(ndev); 1388 if (netif_running(ndev))
1389 } 1389 fec_enet_open(ndev);
1390 } 1390 }
1391 return 0; 1391 return 0;
1392} 1392}
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index f37a4c143ddd..3a029d02c2b4 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -1607,14 +1607,13 @@ static struct of_device_id greth_of_match[] = {
1607MODULE_DEVICE_TABLE(of, greth_of_match); 1607MODULE_DEVICE_TABLE(of, greth_of_match);
1608 1608
1609static struct of_platform_driver greth_of_driver = { 1609static struct of_platform_driver greth_of_driver = {
1610 .name = "grlib-greth", 1610 .driver = {
1611 .match_table = greth_of_match, 1611 .name = "grlib-greth",
1612 .owner = THIS_MODULE,
1613 .of_match_table = greth_of_match,
1614 },
1612 .probe = greth_of_probe, 1615 .probe = greth_of_probe,
1613 .remove = __devexit_p(greth_of_remove), 1616 .remove = __devexit_p(greth_of_remove),
1614 .driver = {
1615 .owner = THIS_MODULE,
1616 .name = "grlib-greth",
1617 },
1618}; 1617};
1619 1618
1620static int __init greth_init(void) 1619static int __init greth_init(void)
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index 1159d9138f05..9595b1bfb8dd 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1188,6 +1188,7 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
1188 IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); 1188 IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
1189 } else { 1189 } else {
1190 hw_dbg(hw, "RAR index %d is out of range.\n", index); 1190 hw_dbg(hw, "RAR index %d is out of range.\n", index);
1191 return IXGBE_ERR_RAR_INDEX;
1191 } 1192 }
1192 1193
1193 return 0; 1194 return 0;
@@ -1219,6 +1220,7 @@ s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index)
1219 IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); 1220 IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high);
1220 } else { 1221 } else {
1221 hw_dbg(hw, "RAR index %d is out of range.\n", index); 1222 hw_dbg(hw, "RAR index %d is out of range.\n", index);
1223 return IXGBE_ERR_RAR_INDEX;
1222 } 1224 }
1223 1225
1224 /* clear VMDq pool/queue selection for this RAR */ 1226 /* clear VMDq pool/queue selection for this RAR */
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 04e64de4a600..6b483d352f23 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -642,7 +642,7 @@ static inline bool ixgbe_tx_xon_state(struct ixgbe_adapter *adapter,
642 u32 txoff = IXGBE_TFCS_TXOFF; 642 u32 txoff = IXGBE_TFCS_TXOFF;
643 643
644#ifdef CONFIG_IXGBE_DCB 644#ifdef CONFIG_IXGBE_DCB
645 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 645 if (adapter->dcb_cfg.pfc_mode_enable) {
646 int tc; 646 int tc;
647 int reg_idx = tx_ring->reg_idx; 647 int reg_idx = tx_ring->reg_idx;
648 int dcb_i = adapter->ring_feature[RING_F_DCB].indices; 648 int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index 2eb6e151016c..cdd1998f18c7 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -2609,6 +2609,7 @@ struct ixgbe_info {
2609#define IXGBE_ERR_EEPROM_VERSION -24 2609#define IXGBE_ERR_EEPROM_VERSION -24
2610#define IXGBE_ERR_NO_SPACE -25 2610#define IXGBE_ERR_NO_SPACE -25
2611#define IXGBE_ERR_OVERTEMP -26 2611#define IXGBE_ERR_OVERTEMP -26
2612#define IXGBE_ERR_RAR_INDEX -27
2612#define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF 2613#define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF
2613 2614
2614#endif /* _IXGBE_TYPE_H_ */ 2615#endif /* _IXGBE_TYPE_H_ */
diff --git a/drivers/net/korina.c b/drivers/net/korina.c
index 26bf1b76b997..c7a9bef4dfb0 100644
--- a/drivers/net/korina.c
+++ b/drivers/net/korina.c
@@ -135,6 +135,7 @@ struct korina_private {
135 struct napi_struct napi; 135 struct napi_struct napi;
136 struct timer_list media_check_timer; 136 struct timer_list media_check_timer;
137 struct mii_if_info mii_if; 137 struct mii_if_info mii_if;
138 struct work_struct restart_task;
138 struct net_device *dev; 139 struct net_device *dev;
139 int phy_addr; 140 int phy_addr;
140}; 141};
@@ -375,7 +376,7 @@ static int korina_rx(struct net_device *dev, int limit)
375 if (devcs & ETH_RX_LE) 376 if (devcs & ETH_RX_LE)
376 dev->stats.rx_length_errors++; 377 dev->stats.rx_length_errors++;
377 if (devcs & ETH_RX_OVR) 378 if (devcs & ETH_RX_OVR)
378 dev->stats.rx_over_errors++; 379 dev->stats.rx_fifo_errors++;
379 if (devcs & ETH_RX_CV) 380 if (devcs & ETH_RX_CV)
380 dev->stats.rx_frame_errors++; 381 dev->stats.rx_frame_errors++;
381 if (devcs & ETH_RX_CES) 382 if (devcs & ETH_RX_CES)
@@ -764,10 +765,9 @@ static int korina_alloc_ring(struct net_device *dev)
764 765
765 /* Initialize the receive descriptors */ 766 /* Initialize the receive descriptors */
766 for (i = 0; i < KORINA_NUM_RDS; i++) { 767 for (i = 0; i < KORINA_NUM_RDS; i++) {
767 skb = dev_alloc_skb(KORINA_RBSIZE + 2); 768 skb = netdev_alloc_skb_ip_align(dev, KORINA_RBSIZE);
768 if (!skb) 769 if (!skb)
769 return -ENOMEM; 770 return -ENOMEM;
770 skb_reserve(skb, 2);
771 lp->rx_skb[i] = skb; 771 lp->rx_skb[i] = skb;
772 lp->rd_ring[i].control = DMA_DESC_IOD | 772 lp->rd_ring[i].control = DMA_DESC_IOD |
773 DMA_COUNT(KORINA_RBSIZE); 773 DMA_COUNT(KORINA_RBSIZE);
@@ -890,12 +890,12 @@ static int korina_init(struct net_device *dev)
890 890
891/* 891/*
892 * Restart the RC32434 ethernet controller. 892 * Restart the RC32434 ethernet controller.
893 * FIXME: check the return status where we call it
894 */ 893 */
895static int korina_restart(struct net_device *dev) 894static void korina_restart_task(struct work_struct *work)
896{ 895{
897 struct korina_private *lp = netdev_priv(dev); 896 struct korina_private *lp = container_of(work,
898 int ret; 897 struct korina_private, restart_task);
898 struct net_device *dev = lp->dev;
899 899
900 /* 900 /*
901 * Disable interrupts 901 * Disable interrupts
@@ -916,10 +916,9 @@ static int korina_restart(struct net_device *dev)
916 916
917 napi_disable(&lp->napi); 917 napi_disable(&lp->napi);
918 918
919 ret = korina_init(dev); 919 if (korina_init(dev) < 0) {
920 if (ret < 0) {
921 printk(KERN_ERR "%s: cannot restart device\n", dev->name); 920 printk(KERN_ERR "%s: cannot restart device\n", dev->name);
922 return ret; 921 return;
923 } 922 }
924 korina_multicast_list(dev); 923 korina_multicast_list(dev);
925 924
@@ -927,8 +926,6 @@ static int korina_restart(struct net_device *dev)
927 enable_irq(lp->ovr_irq); 926 enable_irq(lp->ovr_irq);
928 enable_irq(lp->tx_irq); 927 enable_irq(lp->tx_irq);
929 enable_irq(lp->rx_irq); 928 enable_irq(lp->rx_irq);
930
931 return ret;
932} 929}
933 930
934static void korina_clear_and_restart(struct net_device *dev, u32 value) 931static void korina_clear_and_restart(struct net_device *dev, u32 value)
@@ -937,7 +934,7 @@ static void korina_clear_and_restart(struct net_device *dev, u32 value)
937 934
938 netif_stop_queue(dev); 935 netif_stop_queue(dev);
939 writel(value, &lp->eth_regs->ethintfc); 936 writel(value, &lp->eth_regs->ethintfc);
940 korina_restart(dev); 937 schedule_work(&lp->restart_task);
941} 938}
942 939
943/* Ethernet Tx Underflow interrupt */ 940/* Ethernet Tx Underflow interrupt */
@@ -962,11 +959,8 @@ static irqreturn_t korina_und_interrupt(int irq, void *dev_id)
962static void korina_tx_timeout(struct net_device *dev) 959static void korina_tx_timeout(struct net_device *dev)
963{ 960{
964 struct korina_private *lp = netdev_priv(dev); 961 struct korina_private *lp = netdev_priv(dev);
965 unsigned long flags;
966 962
967 spin_lock_irqsave(&lp->lock, flags); 963 schedule_work(&lp->restart_task);
968 korina_restart(dev);
969 spin_unlock_irqrestore(&lp->lock, flags);
970} 964}
971 965
972/* Ethernet Rx Overflow interrupt */ 966/* Ethernet Rx Overflow interrupt */
@@ -1086,6 +1080,8 @@ static int korina_close(struct net_device *dev)
1086 1080
1087 napi_disable(&lp->napi); 1081 napi_disable(&lp->napi);
1088 1082
1083 cancel_work_sync(&lp->restart_task);
1084
1089 free_irq(lp->rx_irq, dev); 1085 free_irq(lp->rx_irq, dev);
1090 free_irq(lp->tx_irq, dev); 1086 free_irq(lp->tx_irq, dev);
1091 free_irq(lp->ovr_irq, dev); 1087 free_irq(lp->ovr_irq, dev);
@@ -1198,6 +1194,8 @@ static int korina_probe(struct platform_device *pdev)
1198 } 1194 }
1199 setup_timer(&lp->media_check_timer, korina_poll_media, (unsigned long) dev); 1195 setup_timer(&lp->media_check_timer, korina_poll_media, (unsigned long) dev);
1200 1196
1197 INIT_WORK(&lp->restart_task, korina_restart_task);
1198
1201 printk(KERN_INFO "%s: " DRV_NAME "-" DRV_VERSION " " DRV_RELDATE "\n", 1199 printk(KERN_INFO "%s: " DRV_NAME "-" DRV_VERSION " " DRV_RELDATE "\n",
1202 dev->name); 1200 dev->name);
1203out: 1201out:
diff --git a/drivers/net/ksz884x.c b/drivers/net/ksz884x.c
index c80ca64277b2..7805bbf1d53a 100644
--- a/drivers/net/ksz884x.c
+++ b/drivers/net/ksz884x.c
@@ -4854,7 +4854,7 @@ static inline void copy_old_skb(struct sk_buff *old, struct sk_buff *skb)
4854 * 4854 *
4855 * Return 0 if successful; otherwise an error code indicating failure. 4855 * Return 0 if successful; otherwise an error code indicating failure.
4856 */ 4856 */
4857static int netdev_tx(struct sk_buff *skb, struct net_device *dev) 4857static netdev_tx_t netdev_tx(struct sk_buff *skb, struct net_device *dev)
4858{ 4858{
4859 struct dev_priv *priv = netdev_priv(dev); 4859 struct dev_priv *priv = netdev_priv(dev);
4860 struct dev_info *hw_priv = priv->adapter; 4860 struct dev_info *hw_priv = priv->adapter;
@@ -6863,6 +6863,7 @@ static const struct net_device_ops netdev_ops = {
6863 .ndo_tx_timeout = netdev_tx_timeout, 6863 .ndo_tx_timeout = netdev_tx_timeout,
6864 .ndo_change_mtu = netdev_change_mtu, 6864 .ndo_change_mtu = netdev_change_mtu,
6865 .ndo_set_mac_address = netdev_set_mac_address, 6865 .ndo_set_mac_address = netdev_set_mac_address,
6866 .ndo_validate_addr = eth_validate_addr,
6866 .ndo_do_ioctl = netdev_ioctl, 6867 .ndo_do_ioctl = netdev_ioctl,
6867 .ndo_set_rx_mode = netdev_set_rx_mode, 6868 .ndo_set_rx_mode = netdev_set_rx_mode,
6868#ifdef CONFIG_NET_POLL_CONTROLLER 6869#ifdef CONFIG_NET_POLL_CONTROLLER
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index e38f603a71f1..e7b4187da057 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -1416,7 +1416,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
1416 flen = len; 1416 flen = len;
1417 if (nfree > 0) { 1417 if (nfree > 0) {
1418 if (pch->speed == 0) { 1418 if (pch->speed == 0) {
1419 flen = totlen/nfree; 1419 flen = len/nfree;
1420 if (nbigger > 0) { 1420 if (nbigger > 0) {
1421 flen++; 1421 flen++;
1422 nbigger--; 1422 nbigger--;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index ca93cdf002a7..6949504589db 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -559,6 +559,11 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
559 break; 559 break;
560 udelay(25); 560 udelay(25);
561 } 561 }
562 /*
563 * Some configurations require a small delay even after the write
564 * completed indication or the next write might fail.
565 */
566 udelay(25);
562} 567}
563 568
564static int mdio_read(void __iomem *ioaddr, int reg_addr) 569static int mdio_read(void __iomem *ioaddr, int reg_addr)
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 6b2e4402ec57..ba636e086fc3 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -836,7 +836,7 @@ static inline const char *efx_dev_name(struct efx_nic *efx)
836 836
837static inline unsigned int efx_port_num(struct efx_nic *efx) 837static inline unsigned int efx_port_num(struct efx_nic *efx)
838{ 838{
839 return efx->port_num; 839 return efx->net_dev->dev_id;
840} 840}
841 841
842/** 842/**
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c
index 7ecd255a7cc0..f2b1e6180753 100644
--- a/drivers/net/sfc/siena.c
+++ b/drivers/net/sfc/siena.c
@@ -222,7 +222,7 @@ static int siena_probe_nic(struct efx_nic *efx)
222 } 222 }
223 223
224 efx_reado(efx, &reg, FR_AZ_CS_DEBUG); 224 efx_reado(efx, &reg, FR_AZ_CS_DEBUG);
225 efx->port_num = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1; 225 efx->net_dev->dev_id = EFX_OWORD_FIELD(reg, FRF_CZ_CS_PORT_NUM) - 1;
226 226
227 efx_mcdi_init(efx); 227 efx_mcdi_init(efx);
228 228
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 20ab16192325..737df6032bbc 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -646,7 +646,7 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd)
646 error = copy_from_user(data, ifr->ifr_data, sizeof(data)); 646 error = copy_from_user(data, ifr->ifr_data, sizeof(data));
647 if (error) { 647 if (error) {
648 pr_err("cant copy from user\n"); 648 pr_err("cant copy from user\n");
649 RET(error); 649 RET(-EFAULT);
650 } 650 }
651 DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]); 651 DBG("%d 0x%x 0x%x\n", data[0], data[1], data[2]);
652 } 652 }
@@ -665,7 +665,7 @@ static int bdx_ioctl_priv(struct net_device *ndev, struct ifreq *ifr, int cmd)
665 data[2]); 665 data[2]);
666 error = copy_to_user(ifr->ifr_data, data, sizeof(data)); 666 error = copy_to_user(ifr->ifr_data, data, sizeof(data));
667 if (error) 667 if (error)
668 RET(error); 668 RET(-EFAULT);
669 break; 669 break;
670 670
671 case BDX_OP_WRITE: 671 case BDX_OP_WRITE:
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 78eb3190b9b1..1edb7a61983c 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -340,7 +340,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp)
340 340
341 skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len); 341 skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len);
342 342
343 err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 2, skb); 343 err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 2, skb, gfp);
344 if (err < 0) 344 if (err < 0)
345 dev_kfree_skb(skb); 345 dev_kfree_skb(skb);
346 346
@@ -385,8 +385,8 @@ static int add_recvbuf_big(struct virtnet_info *vi, gfp_t gfp)
385 385
386 /* chain first in list head */ 386 /* chain first in list head */
387 first->private = (unsigned long)list; 387 first->private = (unsigned long)list;
388 err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2, 388 err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2,
389 first); 389 first, gfp);
390 if (err < 0) 390 if (err < 0)
391 give_pages(vi, first); 391 give_pages(vi, first);
392 392
@@ -404,7 +404,7 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi, gfp_t gfp)
404 404
405 sg_init_one(vi->rx_sg, page_address(page), PAGE_SIZE); 405 sg_init_one(vi->rx_sg, page_address(page), PAGE_SIZE);
406 406
407 err = virtqueue_add_buf(vi->rvq, vi->rx_sg, 0, 1, page); 407 err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 1, page, gfp);
408 if (err < 0) 408 if (err < 0)
409 give_pages(vi, page); 409 give_pages(vi, page);
410 410
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 166e77dfffda..e47f5a986b1c 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -37,8 +37,6 @@
37#include <net/x25device.h> 37#include <net/x25device.h>
38#include "x25_asy.h" 38#include "x25_asy.h"
39 39
40#include <net/x25device.h>
41
42static struct net_device **x25_asy_devs; 40static struct net_device **x25_asy_devs;
43static int x25_asy_maxdev = SL_NRUNIT; 41static int x25_asy_maxdev = SL_NRUNIT;
44 42
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index cc6d41dec332..2978359c4366 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -222,7 +222,6 @@ static int ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
222static int ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb, 222static int ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb,
223 struct ath5k_txq *txq); 223 struct ath5k_txq *txq);
224static int ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan); 224static int ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan);
225static int ath5k_reset_wake(struct ath5k_softc *sc);
226static int ath5k_start(struct ieee80211_hw *hw); 225static int ath5k_start(struct ieee80211_hw *hw);
227static void ath5k_stop(struct ieee80211_hw *hw); 226static void ath5k_stop(struct ieee80211_hw *hw);
228static int ath5k_add_interface(struct ieee80211_hw *hw, 227static int ath5k_add_interface(struct ieee80211_hw *hw,
@@ -2770,7 +2769,7 @@ ath5k_tasklet_reset(unsigned long data)
2770{ 2769{
2771 struct ath5k_softc *sc = (void *)data; 2770 struct ath5k_softc *sc = (void *)data;
2772 2771
2773 ath5k_reset_wake(sc); 2772 ath5k_reset(sc, sc->curchan);
2774} 2773}
2775 2774
2776/* 2775/*
@@ -2941,23 +2940,13 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan)
2941 ath5k_beacon_config(sc); 2940 ath5k_beacon_config(sc);
2942 /* intrs are enabled by ath5k_beacon_config */ 2941 /* intrs are enabled by ath5k_beacon_config */
2943 2942
2943 ieee80211_wake_queues(sc->hw);
2944
2944 return 0; 2945 return 0;
2945err: 2946err:
2946 return ret; 2947 return ret;
2947} 2948}
2948 2949
2949static int
2950ath5k_reset_wake(struct ath5k_softc *sc)
2951{
2952 int ret;
2953
2954 ret = ath5k_reset(sc, sc->curchan);
2955 if (!ret)
2956 ieee80211_wake_queues(sc->hw);
2957
2958 return ret;
2959}
2960
2961static int ath5k_start(struct ieee80211_hw *hw) 2950static int ath5k_start(struct ieee80211_hw *hw)
2962{ 2951{
2963 return ath5k_init(hw->priv); 2952 return ath5k_init(hw->priv);