···2030203020312031 case ETHTOOL_ID_ON:20322032 bnx2x_set_led(&bp->link_params, &bp->link_vars,20332033- LED_MODE_OPER, SPEED_1000);20332033+ LED_MODE_ON, SPEED_1000);20342034 break;2035203520362036 case ETHTOOL_ID_OFF:20372037 bnx2x_set_led(&bp->link_params, &bp->link_vars,20382038- LED_MODE_OFF, 0);20382038+ LED_MODE_FRONT_PANEL_OFF, 0);2039203920402040 break;2041204120422042 case ETHTOOL_ID_INACTIVE:20432043- if (bp->link_vars.link_up)20442044- bnx2x_set_led(&bp->link_params, &bp->link_vars,20452045- LED_MODE_OPER,20462046- bp->link_vars.line_speed);20432043+ bnx2x_set_led(&bp->link_params, &bp->link_vars,20442044+ LED_MODE_OPER,20452045+ bp->link_vars.line_speed);20472046 }2048204720492048 return 0;
+1-1
drivers/net/can/mscan/mpc5xxx_can.c
···260260261261 if (!ofdev->dev.of_match)262262 return -EINVAL;263263- data = (struct mpc5xxx_can_data *)of_dev->dev.of_match->data;263263+ data = (struct mpc5xxx_can_data *)ofdev->dev.of_match->data;264264265265 base = of_iomap(np, 0);266266 if (!base) {
···21382138 struct cmd_desc_type0 *hwdesc, *first_desc;21392139 struct pci_dev *pdev;21402140 struct ethhdr *phdr;21412141+ int delta = 0;21412142 int i, k;2142214321432144 u32 producer;···21582157 }2159215821602159 frag_count = skb_shinfo(skb)->nr_frags + 1;21602160+ /* 14 frags supported for normal packet and21612161+ * 32 frags supported for TSO packet21622162+ */21632163+ if (!skb_is_gso(skb) && frag_count > QLCNIC_MAX_FRAGS_PER_TX) {21642164+21652165+ for (i = 0; i < (frag_count - QLCNIC_MAX_FRAGS_PER_TX); i++)21662166+ delta += skb_shinfo(skb)->frags[i].size;21672167+21682168+ if (!__pskb_pull_tail(skb, delta))21692169+ goto drop_packet;21702170+21712171+ frag_count = 1 + skb_shinfo(skb)->nr_frags;21722172+ }2161217321622174 if (unlikely(qlcnic_tx_avail(tx_ring) <= TX_STOP_THRESH)) {21632175 netif_stop_queue(netdev);
+4-2
drivers/net/sfc/efx.c
···328328 * processing to finish, then directly poll (and ack ) the eventq.329329 * Finally reenable NAPI and interrupts.330330 *331331- * Since we are touching interrupts the caller should hold the suspend lock331331+ * This is for use only during a loopback self-test. It must not332332+ * deliver any packets up the stack as this can result in deadlock.332333 */333334void efx_process_channel_now(struct efx_channel *channel)334335{···337336338337 BUG_ON(channel->channel >= efx->n_channels);339338 BUG_ON(!channel->enabled);339339+ BUG_ON(!efx->loopback_selftest);340340341341 /* Disable interrupts and wait for ISRs to complete */342342 efx_nic_disable_interrupts(efx);···14381436 * restart the transmit interface early so the watchdog timer stops */14391437 efx_start_port(efx);1440143814411441- if (efx_dev_registered(efx))14391439+ if (efx_dev_registered(efx) && !efx->port_inhibited)14421440 netif_tx_wake_all_queues(efx->net_dev);1443144114441442 efx_for_each_channel(channel, efx)
···330330 * @eventq_mask: Event queue pointer mask331331 * @eventq_read_ptr: Event queue read pointer332332 * @last_eventq_read_ptr: Last event queue read pointer value.333333- * @magic_count: Event queue test event count334333 * @irq_count: Number of IRQs since last adaptive moderation decision335334 * @irq_mod_score: IRQ moderation score336335 * @rx_alloc_level: Watermark based heuristic counter for pushing descriptors···359360 unsigned int eventq_mask;360361 unsigned int eventq_read_ptr;361362 unsigned int last_eventq_read_ptr;362362- unsigned int magic_count;363363364364 unsigned int irq_count;365365 unsigned int irq_mod_score;
+15-7
drivers/net/sfc/nic.c
···8484static inline efx_qword_t *efx_event(struct efx_channel *channel,8585 unsigned int index)8686{8787- return ((efx_qword_t *) (channel->eventq.addr)) + index;8787+ return ((efx_qword_t *) (channel->eventq.addr)) +8888+ (index & channel->eventq_mask);8889}89909091/* See if an event is present···674673 efx_dword_t reg;675674 struct efx_nic *efx = channel->efx;676675677677- EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR, channel->eventq_read_ptr);676676+ EFX_POPULATE_DWORD_1(reg, FRF_AZ_EVQ_RPTR,677677+ channel->eventq_read_ptr & channel->eventq_mask);678678 efx_writed_table(efx, ®, efx->type->evq_rptr_tbl_base,679679 channel->channel);680680}···908906909907 code = EFX_QWORD_FIELD(*event, FSF_AZ_DRV_GEN_EV_MAGIC);910908 if (code == EFX_CHANNEL_MAGIC_TEST(channel))911911- ++channel->magic_count;909909+ ; /* ignore */912910 else if (code == EFX_CHANNEL_MAGIC_FILL(channel))913911 /* The queue must be empty, so we won't receive any rx914912 * events, so efx_process_channel() won't refill the···10151013 /* Clear this event by marking it all ones */10161014 EFX_SET_QWORD(*p_event);1017101510181018- /* Increment read pointer */10191019- read_ptr = (read_ptr + 1) & channel->eventq_mask;10161016+ ++read_ptr;1020101710211018 ev_code = EFX_QWORD_FIELD(event, FSF_AZ_EV_CODE);10221019···10591058 return spent;10601059}1061106010611061+/* Check whether an event is present in the eventq at the current10621062+ * read pointer. Only useful for self-test.10631063+ */10641064+bool efx_nic_event_present(struct efx_channel *channel)10651065+{10661066+ return efx_event_present(efx_event(channel, channel->eventq_read_ptr));10671067+}1062106810631069/* Allocate buffer table entries for event queue */10641070int efx_nic_probe_eventq(struct efx_channel *channel)···11711163 struct efx_tx_queue *tx_queue;11721164 struct efx_rx_queue *rx_queue;11731165 unsigned int read_ptr = channel->eventq_read_ptr;11741174- unsigned int end_ptr = (read_ptr - 1) & channel->eventq_mask;11661166+ unsigned int end_ptr = read_ptr + channel->eventq_mask - 1;1175116711761168 do {11771169 efx_qword_t *event = efx_event(channel, read_ptr);···12111203 * it's ok to throw away every non-flush event */12121204 EFX_SET_QWORD(*event);1213120512141214- read_ptr = (read_ptr + 1) & channel->eventq_mask;12061206+ ++read_ptr;12151207 } while (read_ptr != end_ptr);1216120812171209 channel->eventq_read_ptr = read_ptr;
···240240 * @net_dev: the net device to get address for241241 *242242 * Older SiS900 and friends, use EEPROM to store MAC address.243243- * MAC address is read from read_eeprom() into @net_dev->dev_addr.243243+ * MAC address is read from read_eeprom() into @net_dev->dev_addr and244244+ * @net_dev->perm_addr.244245 */245246246247static int __devinit sis900_get_mac_addr(struct pci_dev * pci_dev, struct net_device *net_dev)···262261 for (i = 0; i < 3; i++)263262 ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);264263264264+ /* Store MAC Address in perm_addr */265265+ memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);266266+265267 return 1;266268}267269···275271 *276272 * SiS630E model, use APC CMOS RAM to store MAC address.277273 * APC CMOS RAM is accessed through ISA bridge.278278- * MAC address is read into @net_dev->dev_addr.274274+ * MAC address is read into @net_dev->dev_addr and275275+ * @net_dev->perm_addr.279276 */280277281278static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev,···301296 outb(0x09 + i, 0x70);302297 ((u8 *)(net_dev->dev_addr))[i] = inb(0x71);303298 }299299+300300+ /* Store MAC Address in perm_addr */301301+ memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);302302+304303 pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40);305304 pci_dev_put(isa_bridge);306305···319310 *320311 * SiS635 model, set MAC Reload Bit to load Mac address from APC321312 * to rfdr. rfdr is accessed through rfcr. MAC address is read into322322- * @net_dev->dev_addr.313313+ * @net_dev->dev_addr and @net_dev->perm_addr.323314 */324315325316static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev,···343334 *( ((u16 *)net_dev->dev_addr) + i) = inw(ioaddr + rfdr);344335 }345336337337+ /* Store MAC Address in perm_addr */338338+ memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);339339+346340 /* enable packet filtering */347341 outl(rfcrSave | RFEN, rfcr + ioaddr);348342···365353 * EEDONE signal to refuse EEPROM access by LAN.366354 * The EEPROM map of SiS962 or SiS963 is different to SiS900.367355 * The signature field in SiS962 or SiS963 spec is meaningless.368368- * MAC address is read into @net_dev->dev_addr.356356+ * MAC address is read into @net_dev->dev_addr and @net_dev->perm_addr.369357 */370358371359static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev,···383371 /* get MAC address from EEPROM */384372 for (i = 0; i < 3; i++)385373 ((u16 *)(net_dev->dev_addr))[i] = read_eeprom(ioaddr, i+EEPROMMACAddr);374374+375375+ /* Store MAC Address in perm_addr */376376+ memcpy(net_dev->perm_addr, net_dev->dev_addr, ETH_ALEN);386377387378 outl(EEDONE, ee_addr);388379 return 1;
···7474/* RSSI to dBm */7575#define IWL39_RSSI_OFFSET 9576767777-#define IWL_DEFAULT_TX_POWER 0x0F7878-7977/*8078 * EEPROM related constants, enums, and structures.8179 */
-3
drivers/net/wireless/iwlegacy/iwl-4965-hw.h
···804804805805#define IWL4965_DEFAULT_TX_RETRY 15806806807807-/* Limit range of txpower output target to be between these values */808808-#define IWL4965_TX_POWER_TARGET_POWER_MIN (0) /* 0 dBm: 1 milliwatt */809809-810807/* EEPROM */811808#define IWL4965_FIRST_AMPDU_QUEUE 10812809
+11-6
drivers/net/wireless/iwlegacy/iwl-core.c
···160160 struct ieee80211_channel *geo_ch;161161 struct ieee80211_rate *rates;162162 int i = 0;163163+ s8 max_tx_power = 0;163164164165 if (priv->bands[IEEE80211_BAND_2GHZ].n_bitrates ||165166 priv->bands[IEEE80211_BAND_5GHZ].n_bitrates) {···236235237236 geo_ch->flags |= ch->ht40_extension_channel;238237239239- if (ch->max_power_avg > priv->tx_power_device_lmt)240240- priv->tx_power_device_lmt = ch->max_power_avg;238238+ if (ch->max_power_avg > max_tx_power)239239+ max_tx_power = ch->max_power_avg;241240 } else {242241 geo_ch->flags |= IEEE80211_CHAN_DISABLED;243242 }···249248 "restricted" : "valid",250249 geo_ch->flags);251250 }251251+252252+ priv->tx_power_device_lmt = max_tx_power;253253+ priv->tx_power_user_lmt = max_tx_power;254254+ priv->tx_power_next = max_tx_power;252255253256 if ((priv->bands[IEEE80211_BAND_5GHZ].n_channels == 0) &&254257 priv->cfg->sku & IWL_SKU_A) {···11291124 if (!priv->cfg->ops->lib->send_tx_power)11301125 return -EOPNOTSUPP;1131112611321132- if (tx_power < IWL4965_TX_POWER_TARGET_POWER_MIN) {11271127+ /* 0 dBm mean 1 milliwatt */11281128+ if (tx_power < 0) {11331129 IWL_WARN(priv,11341134- "Requested user TXPOWER %d below lower limit %d.\n",11351135- tx_power,11361136- IWL4965_TX_POWER_TARGET_POWER_MIN);11301130+ "Requested user TXPOWER %d below 1 mW.\n",11311131+ tx_power);11371132 return -EINVAL;11381133 }11391134
-7
drivers/net/wireless/iwlegacy/iwl-eeprom.c
···471471 flags & EEPROM_CHANNEL_RADAR))472472 ? "" : "not ");473473474474- /* Set the tx_power_user_lmt to the highest power475475- * supported by any channel */476476- if (eeprom_ch_info[ch].max_power_avg >477477- priv->tx_power_user_lmt)478478- priv->tx_power_user_lmt =479479- eeprom_ch_info[ch].max_power_avg;480480-481474 ch_info++;482475 }483476 }
···3140314031413141 iwl_legacy_init_scan_params(priv);3142314231433143- /* Set the tx_power_user_lmt to the lowest power level31443144- * this value will get overwritten by channel max power avg31453145- * from eeprom */31463146- priv->tx_power_user_lmt = IWL4965_TX_POWER_TARGET_POWER_MIN;31473147- priv->tx_power_next = IWL4965_TX_POWER_TARGET_POWER_MIN;31483148-31493143 ret = iwl_legacy_init_channel_map(priv);31503144 if (ret) {31513145 IWL_ERR(priv, "initializing regulatory failed: %d\n", ret);
+2-2
include/linux/usb/usbnet.h
···103103 * Indicates to usbnet, that USB driver accumulates multiple IP packets.104104 * Affects statistic (counters) and short packet handling.105105 */106106-#define FLAG_MULTI_PACKET 0x1000107107-#define FLAG_RX_ASSEMBLE 0x2000 /* rx packets may span >1 frames */106106+#define FLAG_MULTI_PACKET 0x2000107107+#define FLAG_RX_ASSEMBLE 0x4000 /* rx packets may span >1 frames */108108109109 /* init device ... can sleep, or cause probe() failure */110110 int (*bind)(struct usbnet *, struct usb_interface *);
+2-4
net/bridge/br_netfilter.c
···249249 goto drop;250250 }251251252252- /* Zero out the CB buffer if no options present */253253- if (iph->ihl == 5) {254254- memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));252252+ memset(IPCB(skb), 0, sizeof(struct inet_skb_parm));253253+ if (iph->ihl == 5)255254 return 0;256256- }257255258256 opt->optlen = iph->ihl*4 - sizeof(struct iphdr);259257 if (ip_options_compile(dev_net(dev), opt, skb))
+7-3
net/core/dev.c
···52095209 }5210521052115211 /* TSO requires that SG is present as well. */52125212- if ((features & NETIF_F_TSO) && !(features & NETIF_F_SG)) {52135213- netdev_info(dev, "Dropping NETIF_F_TSO since no SG feature.\n");52145214- features &= ~NETIF_F_TSO;52125212+ if ((features & NETIF_F_ALL_TSO) && !(features & NETIF_F_SG)) {52135213+ netdev_info(dev, "Dropping TSO features since no SG feature.\n");52145214+ features &= ~NETIF_F_ALL_TSO;52155215 }52165216+52175217+ /* TSO ECN requires that TSO is present as well. */52185218+ if ((features & NETIF_F_ALL_TSO) == NETIF_F_TSO_ECN)52195219+ features &= ~NETIF_F_TSO_ECN;5216522052175221 /* Software GSO depends on SG. */52185222 if ((features & NETIF_F_GSO) && !(features & NETIF_F_SG)) {
···354354}355355356356/* May be called with local BH enabled. */357357-static void unlink_from_pool(struct inet_peer *p, struct inet_peer_base *base)357357+static void unlink_from_pool(struct inet_peer *p, struct inet_peer_base *base,358358+ struct inet_peer __rcu **stack[PEER_MAXDEPTH])358359{359360 int do_free;360361···369368 * We use refcnt=-1 to alert lockless readers this entry is deleted.370369 */371370 if (atomic_cmpxchg(&p->refcnt, 1, -1) == 1) {372372- struct inet_peer __rcu **stack[PEER_MAXDEPTH];373371 struct inet_peer __rcu ***stackptr, ***delp;374372 if (lookup(&p->daddr, stack, base) != p)375373 BUG();···422422}423423424424/* May be called with local BH enabled. */425425-static int cleanup_once(unsigned long ttl)425425+static int cleanup_once(unsigned long ttl, struct inet_peer __rcu **stack[PEER_MAXDEPTH])426426{427427 struct inet_peer *p = NULL;428428···454454 * happen because of entry limits in route cache. */455455 return -1;456456457457- unlink_from_pool(p, peer_to_base(p));457457+ unlink_from_pool(p, peer_to_base(p), stack);458458 return 0;459459}460460···524524525525 if (base->total >= inet_peer_threshold)526526 /* Remove one less-recently-used entry. */527527- cleanup_once(0);527527+ cleanup_once(0, stack);528528529529 return p;530530}···540540{541541 unsigned long now = jiffies;542542 int ttl, total;543543+ struct inet_peer __rcu **stack[PEER_MAXDEPTH];543544544545 total = compute_total();545546 if (total >= inet_peer_threshold)···549548 ttl = inet_peer_maxttl550549 - (inet_peer_maxttl - inet_peer_minttl) / HZ *551550 total / inet_peer_threshold * HZ;552552- while (!cleanup_once(ttl)) {551551+ while (!cleanup_once(ttl, stack)) {553552 if (jiffies != now)554553 break;555554 }
+3-3
net/ipv4/ip_options.c
···329329 pp_ptr = optptr + 2;330330 goto error;331331 }332332- if (skb) {332332+ if (rt) {333333 memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4);334334 opt->is_changed = 1;335335 }···371371 goto error;372372 }373373 opt->ts = optptr - iph;374374- if (skb) {374374+ if (rt) {375375 memcpy(&optptr[optptr[2]-1], &rt->rt_spec_dst, 4);376376 timeptr = (__be32*)&optptr[optptr[2]+3];377377 }···603603 unsigned long orefdst;604604 int err;605605606606- if (!opt->srr)606606+ if (!opt->srr || !rt)607607 return 0;608608609609 if (skb->pkt_type != PACKET_HOST)