Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Feb 2013 02:58:50 +0000 (18:58 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Feb 2013 02:58:50 +0000 (18:58 -0800)
Pull networking update from David Miller:

 1) Checkpoint/restarted TCP sockets now can properly propagate the TCP
    timestamp offset.  From Andrey Vagin.

 2) VMWARE VM VSOCK layer, from Andy King.

 3) Much improved support for virtual functions and SR-IOV in bnx2x,
    from Ariel ELior.

 4) All protocols on ipv4 and ipv6 are now network namespace aware, and
    all the compatability checks for initial-namespace-only protocols is
    removed.  Thanks to Tom Parkin for helping deal with the last major
    holdout, L2TP.

 5) IPV6 support in netpoll and network namespace support in pktgen,
    from Cong Wang.

 6) Multiple Registration Protocol (MRP) and Multiple VLAN Registration
    Protocol (MVRP) support, from David Ward.

 7) Compute packet lengths more accurately in the packet scheduler, from
    Eric Dumazet.

 8) Use per-task page fragment allocator in skb_append_datato_frags(),
    also from Eric Dumazet.

 9) Add support for connection tracking labels in netfilter, from
    Florian Westphal.

10) Fix default multicast group joining on ipv6, and add anti-spoofing
    checks to 6to4 and 6rd.  From Hannes Frederic Sowa.

11) Make ipv4/ipv6 fragmentation memory limits more reasonable in modern
    times, rearrange inet frag datastructures for better cacheline
    locality, and move more operations outside of locking.  From Jesper
    Dangaard Brouer.

12) Instead of strict master <--> slave relationships, allow arbitrary
    scenerios with "upper device lists".  From Jiri Pirko.

13) Improve rate limiting accuracy in TBF and act_police, also from Jiri
    Pirko.

14) Add a BPF filter netfilter match target, from Willem de Bruijn.

15) Orphan and delete a bunch of pre-historic networking drivers from
    Paul Gortmaker.

16) Add TSO support for GRE tunnels, from Pravin B SHelar.  Although
    this still needs some minor bug fixing before it's %100 correct in
    all cases.

17) Handle unresolved IPSEC states like ARP, with a resolution packet
    queue.  From Steffen Klassert.

18) Remove TCP Appropriate Byte Count support (ABC), from Stephen
    Hemminger.  This was long overdue.

19) Support SO_REUSEPORT, from Tom Herbert.

20) Allow locking a socket BPF filter, so that it cannot change after a
    process drops capabilities.

21) Add VLAN filtering to bridge, from Vlad Yasevich.

22) Bring ipv6 on-par with ipv4 and do not cache neighbour entries in
    the ipv6 routes, from YOSHIFUJI Hideaki.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1538 commits)
  ipv6: fix race condition regarding dst->expires and dst->from.
  net: fix a wrong assignment in skb_split()
  ip_gre: remove an extra dst_release()
  ppp: set qdisc_tx_busylock to avoid LOCKDEP splat
  atl1c: restore buffer state
  net: fix a build failure when !CONFIG_PROC_FS
  net: ipv4: fix waring -Wunused-variable
  net: proc: fix build failed when procfs is not configured
  Revert "xen: netback: remove redundant xenvif_put"
  net: move procfs code to net/core/net-procfs.c
  qmi_wwan, cdc-ether: add ADU960S
  bonding: set sysfs device_type to 'bond'
  bonding: fix bond_release_all inconsistencies
  b44: use netdev_alloc_skb_ip_align()
  xen: netback: remove redundant xenvif_put
  net: fec: Do a sanity check on the gpio number
  ip_gre: propogate target device GSO capability to the tunnel device
  ip_gre: allow CSUM capable devices to handle packets
  bonding: Fix initialize after use for 3ad machine state spinlock
  bonding: Fix race condition between bond_enslave() and bond_3ad_update_lacp_rate()
  ...

1  2 
MAINTAINERS
drivers/net/can/sja1000/peak_pci.c
drivers/net/wimax/i2400m/netdev.c
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/mwifiex/sdio.c
kernel/softirq.c

diff --combined MAINTAINERS
index 7ffaf79d90f7f592df4c66226b927c726d0f81ed,8bbd949f8c2ed92e7175b76f066af2690eba2295..cdb8fe8b6182f25cf509cefa5817be0156b6d188
@@@ -670,16 -670,8 +670,16 @@@ F:       drivers/input/serio/ambakmi.
  F:    include/linux/amba/kmi.h
  
  ARM PRIMECELL MMCI PL180/1 DRIVER
 -S:    Orphan
 +M:    Russell King <linux@arm.linux.org.uk>
 +S:    Maintained
  F:    drivers/mmc/host/mmci.*
 +F:    include/linux/amba/mmci.h
 +
 +ARM PRIMECELL UART PL010 AND PL011 DRIVERS
 +M:    Russell King <linux@arm.linux.org.uk>
 +S:    Maintained
 +F:    drivers/tty/serial/amba-pl01*.c
 +F:    include/linux/amba/serial.h
  
  ARM PRIMECELL BUS SUPPORT
  M:    Russell King <linux@arm.linux.org.uk>
@@@ -1311,7 -1303,7 +1311,7 @@@ F:      include/linux/dmaengine.
  F:    include/linux/async_tx.h
  
  AT24 EEPROM DRIVER
 -M:    Wolfram Sang <w.sang@pengutronix.de>
 +M:    Wolfram Sang <wsa@the-dreams.de>
  L:    linux-i2c@vger.kernel.org
  S:    Maintained
  F:    drivers/misc/eeprom/at24.c
@@@ -2148,10 -2140,10 +2148,10 @@@ S:   Maintaine
  F:    tools/power/cpupower
  
  CPUSETS
 -M:    Paul Menage <paul@paulmenage.org>
 +M:    Li Zefan <lizefan@huawei.com>
  W:    http://www.bullopensource.org/cpuset/
  W:    http://oss.sgi.com/projects/cpusets/
 -S:    Supported
 +S:    Maintained
  F:    Documentation/cgroups/cpusets.txt
  F:    include/linux/cpuset.h
  F:    kernel/cpuset.c
@@@ -2982,11 -2974,6 +2982,6 @@@ S:     Maintaine
  F:    include/linux/netfilter_bridge/
  F:    net/bridge/
  
- ETHERTEAM 16I DRIVER
- M:    Mika Kuoppala <miku@iki.fi>
- S:    Maintained
- F:    drivers/net/ethernet/fujitsu/eth16i.c
  EXT2 FILE SYSTEM
  M:    Jan Kara <jack@suse.cz>
  L:    linux-ext4@vger.kernel.org
@@@ -3765,11 -3752,12 +3760,11 @@@ S:   Maintaine
  F:    drivers/i2c/i2c-stub.c
  
  I2C SUBSYSTEM
 -M:    Wolfram Sang <w.sang@pengutronix.de>
 +M:    Wolfram Sang <wsa@the-dreams.de>
  M:    "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
  L:    linux-i2c@vger.kernel.org
  W:    http://i2c.wiki.kernel.org/
 -T:    quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-i2c/
 -T:    git git://git.pengutronix.de/git/wsa/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
  S:    Maintained
  F:    Documentation/i2c/
  F:    drivers/i2c/
@@@ -4488,15 -4476,6 +4483,15 @@@ F:    arch/s390/include/asm/kvm
  F:    arch/s390/kvm/
  F:    drivers/s390/kvm/
  
 +KERNEL VIRTUAL MACHINE (KVM) FOR ARM
 +M:    Christoffer Dall <cdall@cs.columbia.edu>
 +L:    kvmarm@lists.cs.columbia.edu
 +W:    http://systems.cs.columbia.edu/projects/kvm-arm
 +S:    Maintained
 +F:    arch/arm/include/uapi/asm/kvm*
 +F:    arch/arm/include/asm/kvm*
 +F:    arch/arm/kvm/
 +
  KEXEC
  M:    Eric Biederman <ebiederm@xmission.com>
  W:    http://kernel.org/pub/linux/utils/kernel/kexec/
@@@ -5385,13 -5364,6 +5380,6 @@@ F:     include/linux/sunrpc
  F:    include/uapi/linux/nfs*
  F:    include/uapi/linux/sunrpc/
  
- NI5010 NETWORK DRIVER
- M:    Jan-Pascal van Best <janpascal@vanbest.org>
- M:    Andreas Mohr <andi@lisas.de>
- L:    netdev@vger.kernel.org
- S:    Maintained
- F:    drivers/net/ethernet/racal/ni5010.*
  NILFS2 FILESYSTEM
  M:    KONISHI Ryusuke <konishi.ryusuke@lab.ntt.co.jp>
  L:    linux-nilfs@vger.kernel.org
@@@ -5794,6 -5766,15 +5782,6 @@@ L:     linux-i2c@vger.kernel.or
  S:    Maintained
  F:    drivers/i2c/muxes/i2c-mux-pca9541.c
  
 -PCA9564/PCA9665 I2C BUS DRIVER
 -M:    Wolfram Sang <w.sang@pengutronix.de>
 -L:    linux-i2c@vger.kernel.org
 -S:    Maintained
 -F:    drivers/i2c/algos/i2c-algo-pca.c
 -F:    drivers/i2c/busses/i2c-pca-*
 -F:    include/linux/i2c-algo-pca.h
 -F:    include/linux/i2c-pca-platform.h
 -
  PCDP - PRIMARY CONSOLE AND DEBUG PORT
  M:    Khalid Aziz <khalid@gonehiking.org>
  S:    Maintained
@@@ -6605,7 -6586,7 +6593,7 @@@ F:      drivers/dma/dw_dmac_regs.
  F:    drivers/dma/dw_dmac.c
  
  TIMEKEEPING, NTP
 -M:    John Stultz <johnstul@us.ibm.com>
 +M:    John Stultz <john.stultz@linaro.org>
  M:    Thomas Gleixner <tglx@linutronix.de>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
  S:    Supported
@@@ -7185,7 -7166,6 +7173,7 @@@ F:      drivers/clk/spear
  
  SPI SUBSYSTEM
  M:    Grant Likely <grant.likely@secretlab.ca>
 +M:    Mark Brown <broonie@opensource.wolfsonmicro.com>
  L:    spi-devel-general@lists.sourceforge.net
  Q:    http://patchwork.kernel.org/project/spi-devel-general/list/
  T:    git git://git.secretlab.ca/git/linux-2.6.git
@@@ -7544,18 -7524,13 +7532,18 @@@ S:   Maintaine
  F:    drivers/media/tuners/tea5767.*
  
  TEAM DRIVER
- M:    Jiri Pirko <jpirko@redhat.com>
+ M:    Jiri Pirko <jiri@resnulli.us>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/team/
  F:    include/linux/if_team.h
  F:    include/uapi/linux/if_team.h
  
 +TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT
 +M:    Savoir-faire Linux Inc. <kernel@savoirfairelinux.com>
 +S:    Maintained
 +F:    arch/x86/platform/ts5500/
 +
  TECHNOTREND USB IR RECEIVER
  M:    Sean Young <sean@mess.org>
  L:    linux-media@vger.kernel.org
@@@ -7630,22 -7605,6 +7618,22 @@@ F:    Documentation/backlight/lp855x-drive
  F:    drivers/video/backlight/lp855x_bl.c
  F:    include/linux/platform_data/lp855x.h
  
 +TI LP8727 CHARGER DRIVER
 +M:    Milo Kim <milo.kim@ti.com>
 +S:    Maintained
 +F:    drivers/power/lp8727_charger.c
 +F:    include/linux/platform_data/lp8727.h
 +
 +TI LP8788 MFD DRIVER
 +M:    Milo Kim <milo.kim@ti.com>
 +S:    Maintained
 +F:    drivers/iio/adc/lp8788_adc.c
 +F:    drivers/leds/leds-lp8788.c
 +F:    drivers/mfd/lp8788*.c
 +F:    drivers/power/lp8788-charger.c
 +F:    drivers/regulator/lp8788-*.c
 +F:    include/linux/mfd/lp8788*.h
 +
  TI TWL4030 SERIES SOC CODEC DRIVER
  M:    Peter Ujfalusi <peter.ujfalusi@ti.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
index 600ac7226e5ca1da007561bac5e0ffd3eebe5424,44406a4839f62dd8ecb8c861692c783cd365f307..d1e7f1006ddd60b1531703d2602f9ca405e9b786
@@@ -339,7 -339,8 +339,7 @@@ static void peak_pciec_set_leds(struct 
   */
  static void peak_pciec_start_led_work(struct peak_pciec_card *card)
  {
 -      if (!delayed_work_pending(&card->led_work))
 -              schedule_delayed_work(&card->led_work, HZ);
 +      schedule_delayed_work(&card->led_work, HZ);
  }
  
  /*
@@@ -450,11 -451,8 +450,8 @@@ static int peak_pciec_probe(struct pci_
        } else {
                /* create the bit banging I2C adapter structure */
                card = kzalloc(sizeof(struct peak_pciec_card), GFP_KERNEL);
-               if (!card) {
-                       dev_err(&pdev->dev,
-                                "failed allocating memory for i2c chip\n");
+               if (!card)
                        return -ENOMEM;
-               }
  
                card->cfg_base = chan->cfg_base;
                card->reg_base = priv->reg_base;
index 530581ca019111e79ec366f0fa702ab6341fc977,cedd4d30d996dd431341bd4c2a1e947f801f2f16..48896138418f21e206782bc259e8fa0b5da9ace7
@@@ -156,7 -156,7 +156,7 @@@ void i2400m_wake_tx_work(struct work_st
        struct i2400m *i2400m = container_of(ws, struct i2400m, wake_tx_ws);
        struct net_device *net_dev = i2400m->wimax_dev.net_dev;
        struct device *dev = i2400m_dev(i2400m);
 -      struct sk_buff *skb = i2400m->wake_tx_skb;
 +      struct sk_buff *skb;
        unsigned long flags;
  
        spin_lock_irqsave(&i2400m->tx_lock, flags);
@@@ -236,26 -236,23 +236,26 @@@ void i2400m_tx_prep_header(struct sk_bu
  void i2400m_net_wake_stop(struct i2400m *i2400m)
  {
        struct device *dev = i2400m_dev(i2400m);
 +      struct sk_buff *wake_tx_skb;
 +      unsigned long flags;
  
        d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
 -      /* See i2400m_hard_start_xmit(), references are taken there
 -       * and here we release them if the work was still
 -       * pending. Note we can't differentiate work not pending vs
 -       * never scheduled, so the NULL check does that. */
 -      if (cancel_work_sync(&i2400m->wake_tx_ws) == 0
 -          && i2400m->wake_tx_skb != NULL) {
 -              unsigned long flags;
 -              struct sk_buff *wake_tx_skb;
 -              spin_lock_irqsave(&i2400m->tx_lock, flags);
 -              wake_tx_skb = i2400m->wake_tx_skb;      /* compat help */
 -              i2400m->wake_tx_skb = NULL;     /* compat help */
 -              spin_unlock_irqrestore(&i2400m->tx_lock, flags);
 +      /*
 +       * See i2400m_hard_start_xmit(), references are taken there and
 +       * here we release them if the packet was still pending.
 +       */
 +      cancel_work_sync(&i2400m->wake_tx_ws);
 +
 +      spin_lock_irqsave(&i2400m->tx_lock, flags);
 +      wake_tx_skb = i2400m->wake_tx_skb;
 +      i2400m->wake_tx_skb = NULL;
 +      spin_unlock_irqrestore(&i2400m->tx_lock, flags);
 +
 +      if (wake_tx_skb) {
                i2400m_put(i2400m);
                kfree_skb(wake_tx_skb);
        }
 +
        d_fnend(3, dev, "(i2400m %p) = void\n", i2400m);
  }
  
@@@ -291,7 -288,7 +291,7 @@@ int i2400m_net_wake_tx(struct i2400m *i
         * and if pending, release those resources. */
        result = 0;
        spin_lock_irqsave(&i2400m->tx_lock, flags);
 -      if (!work_pending(&i2400m->wake_tx_ws)) {
 +      if (!i2400m->wake_tx_skb) {
                netif_stop_queue(net_dev);
                i2400m_get(i2400m);
                i2400m->wake_tx_skb = skb_get(skb);     /* transfer ref count */
@@@ -599,12 -596,12 +599,12 @@@ static void i2400m_get_drvinfo(struct n
  {
        struct i2400m *i2400m = net_dev_to_i2400m(net_dev);
  
-       strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver) - 1);
-       strncpy(info->fw_version,
-               i2400m->fw_name ? : "", sizeof(info->fw_version) - 1);
+       strlcpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
+       strlcpy(info->fw_version, i2400m->fw_name ? : "",
+               sizeof(info->fw_version));
        if (net_dev->dev.parent)
-               strncpy(info->bus_info, dev_name(net_dev->dev.parent),
-                       sizeof(info->bus_info) - 1);
+               strlcpy(info->bus_info, dev_name(net_dev->dev.parent),
+                       sizeof(info->bus_info));
  }
  
  static const struct ethtool_ops i2400m_ethtool_ops = {
index b3ab7b7becae1c1aae93f99b6a18be26ae7c1c7c,04d5e6442bf668e5bd8ddfd9fac8b9f7b4c1e36e..cb066f62879d178ed5039f6a1ca2058c972a9149
@@@ -2181,10 -2181,9 +2181,10 @@@ static void isr_indicate_rf_kill(struc
        mod_delayed_work(system_wq, &priv->rf_kill, round_jiffies_relative(HZ));
  }
  
 -static void send_scan_event(void *data)
 +static void ipw2100_scan_event(struct work_struct *work)
  {
 -      struct ipw2100_priv *priv = data;
 +      struct ipw2100_priv *priv = container_of(work, struct ipw2100_priv,
 +                                               scan_event.work);
        union iwreq_data wrqu;
  
        wrqu.data.length = 0;
        wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL);
  }
  
 -static void ipw2100_scan_event_later(struct work_struct *work)
 -{
 -      send_scan_event(container_of(work, struct ipw2100_priv,
 -                                      scan_event_later.work));
 -}
 -
 -static void ipw2100_scan_event_now(struct work_struct *work)
 -{
 -      send_scan_event(container_of(work, struct ipw2100_priv,
 -                                      scan_event_now));
 -}
 -
  static void isr_scan_complete(struct ipw2100_priv *priv, u32 status)
  {
        IPW_DEBUG_SCAN("scan complete\n");
  
        /* Only userspace-requested scan completion events go out immediately */
        if (!priv->user_requested_scan) {
 -              if (!delayed_work_pending(&priv->scan_event_later))
 -                      schedule_delayed_work(&priv->scan_event_later,
 -                                            round_jiffies_relative(msecs_to_jiffies(4000)));
 +              schedule_delayed_work(&priv->scan_event,
 +                                    round_jiffies_relative(msecs_to_jiffies(4000)));
        } else {
                priv->user_requested_scan = 0;
 -              cancel_delayed_work(&priv->scan_event_later);
 -              schedule_work(&priv->scan_event_now);
 +              mod_delayed_work(system_wq, &priv->scan_event, 0);
        }
  }
  
@@@ -4446,7 -4459,8 +4446,7 @@@ static void ipw2100_kill_works(struct i
        cancel_delayed_work_sync(&priv->wx_event_work);
        cancel_delayed_work_sync(&priv->hang_check);
        cancel_delayed_work_sync(&priv->rf_kill);
 -      cancel_work_sync(&priv->scan_event_now);
 -      cancel_delayed_work_sync(&priv->scan_event_later);
 +      cancel_delayed_work_sync(&priv->scan_event);
  }
  
  static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
                return err;
        }
  
-       priv->tx_buffers =
-           kmalloc(TX_PENDED_QUEUE_LENGTH * sizeof(struct ipw2100_tx_packet),
-                   GFP_ATOMIC);
+       priv->tx_buffers = kmalloc_array(TX_PENDED_QUEUE_LENGTH,
+                                        sizeof(struct ipw2100_tx_packet),
+                                        GFP_ATOMIC);
        if (!priv->tx_buffers) {
-               printk(KERN_ERR DRV_NAME
-                      ": %s: alloc failed form tx buffers.\n",
-                      priv->net_dev->name);
                bd_queue_free(priv, &priv->tx_queue);
                return -ENOMEM;
        }
@@@ -6181,7 -6192,8 +6178,7 @@@ static struct net_device *ipw2100_alloc
        INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work);
        INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check);
        INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill);
 -      INIT_WORK(&priv->scan_event_now, ipw2100_scan_event_now);
 -      INIT_DELAYED_WORK(&priv->scan_event_later, ipw2100_scan_event_later);
 +      INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event);
  
        tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long))
                     ipw2100_irq_tasklet, (unsigned long)priv);
index 2c2d6db0536c315e9af127d356740150e9ce3d84,3e824b8fa83dcef94f59695110a72ffd2dfe7533..d96257b79a84a90c4f0c14ff8273f4e53dc86057
@@@ -4480,11 -4480,18 +4480,11 @@@ static void handle_scan_event(struct ip
  {
        /* Only userspace-requested scan completion events go out immediately */
        if (!priv->user_requested_scan) {
 -              if (!delayed_work_pending(&priv->scan_event))
 -                      schedule_delayed_work(&priv->scan_event,
 -                                            round_jiffies_relative(msecs_to_jiffies(4000)));
 +              schedule_delayed_work(&priv->scan_event,
 +                                    round_jiffies_relative(msecs_to_jiffies(4000)));
        } else {
 -              union iwreq_data wrqu;
 -
                priv->user_requested_scan = 0;
 -              cancel_delayed_work(&priv->scan_event);
 -
 -              wrqu.data.length = 0;
 -              wrqu.data.flags = 0;
 -              wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL);
 +              mod_delayed_work(system_wq, &priv->scan_event, 0);
        }
  }
  
@@@ -11320,7 -11327,6 +11320,6 @@@ static int ipw_up(struct ipw_priv *priv
                if (!(priv->config & CFG_CUSTOM_MAC))
                        eeprom_parse_mac(priv, priv->mac_addr);
                memcpy(priv->net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
-               memcpy(priv->net_dev->perm_addr, priv->mac_addr, ETH_ALEN);
  
                ipw_set_geo(priv);
  
index f2874c3392b4d964197b9c944b93787336e31a69,d3fb9a14580ae778fd241ecea56a5710cf93f72e..e63f646a260e33407c9d5b0a418b545327dfa7af
@@@ -332,7 -332,7 +332,7 @@@ mwifiex_write_data_sync(struct mwifiex_
                        u8 *buffer, u32 pkt_len, u32 port)
  {
        struct sdio_mmc_card *card = adapter->card;
-       int ret = -1;
+       int ret;
        u8 blk_mode =
                (port & MWIFIEX_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE;
        u32 blk_size = (blk_mode == BLOCK_MODE) ? MWIFIEX_SDIO_BLOCK_SIZE : 1;
  
        sdio_claim_host(card->func);
  
-       if (!sdio_writesb(card->func, ioport, buffer, blk_cnt * blk_size))
-               ret = 0;
+       ret = sdio_writesb(card->func, ioport, buffer, blk_cnt * blk_size);
  
        sdio_release_host(card->func);
  
@@@ -365,7 -364,7 +364,7 @@@ static int mwifiex_read_data_sync(struc
                                  u32 len, u32 port, u8 claim)
  {
        struct sdio_mmc_card *card = adapter->card;
-       int ret = -1;
+       int ret;
        u8 blk_mode = (port & MWIFIEX_SDIO_BYTE_MODE_MASK) ? BYTE_MODE
                       : BLOCK_MODE;
        u32 blk_size = (blk_mode == BLOCK_MODE) ? MWIFIEX_SDIO_BLOCK_SIZE : 1;
        if (claim)
                sdio_claim_host(card->func);
  
-       if (!sdio_readsb(card->func, buffer, ioport, blk_cnt * blk_size))
-               ret = 0;
+       ret = sdio_readsb(card->func, buffer, ioport, blk_cnt * blk_size);
  
        if (claim)
                sdio_release_host(card->func);
@@@ -718,11 -716,8 +716,8 @@@ static int mwifiex_prog_fw_w_helper(str
  
        /* Assume that the allocated buffer is 8-byte aligned */
        fwbuf = kzalloc(MWIFIEX_UPLD_SIZE, GFP_KERNEL);
-       if (!fwbuf) {
-               dev_err(adapter->dev,
-                       "unable to alloc buffer for FW. Terminating dnld\n");
+       if (!fwbuf)
                return -ENOMEM;
-       }
  
        /* Perform firmware data transfer */
        do {
@@@ -1520,7 -1515,6 +1515,6 @@@ static int mwifiex_alloc_sdio_mpa_buffe
  
        card->mpa_tx.buf = kzalloc(mpa_tx_buf_size, GFP_KERNEL);
        if (!card->mpa_tx.buf) {
-               dev_err(adapter->dev, "could not alloc buffer for MP-A TX\n");
                ret = -1;
                goto error;
        }
  
        card->mpa_rx.buf = kzalloc(mpa_rx_buf_size, GFP_KERNEL);
        if (!card->mpa_rx.buf) {
-               dev_err(adapter->dev, "could not alloc buffer for MP-A RX\n");
                ret = -1;
                goto error;
        }
@@@ -1682,10 -1675,8 +1675,8 @@@ static int mwifiex_init_sdio(struct mwi
  
        /* Allocate buffers for SDIO MP-A */
        card->mp_regs = kzalloc(MAX_MP_REGS, GFP_KERNEL);
-       if (!card->mp_regs) {
-               dev_err(adapter->dev, "failed to alloc mp_regs\n");
+       if (!card->mp_regs)
                return -ENOMEM;
-       }
  
        ret = mwifiex_alloc_sdio_mpa_buffers(adapter,
                                             SDIO_MP_TX_AGGR_DEF_BUF_SIZE,
@@@ -1752,8 -1743,6 +1743,8 @@@ mwifiex_update_mp_end_port(struct mwifi
  static struct mmc_host *reset_host;
  static void sdio_card_reset_worker(struct work_struct *work)
  {
 +      struct mmc_host *target = reset_host;
 +
        /* The actual reset operation must be run outside of driver thread.
         * This is because mmc_remove_host() will cause the device to be
         * instantly destroyed, and the driver then needs to end its thread,
         */
  
        pr_err("Resetting card...\n");
 -      mmc_remove_host(reset_host);
 +      mmc_remove_host(target);
        /* 20ms delay is based on experiment with sdhci controller */
        mdelay(20);
 -      mmc_add_host(reset_host);
 +      mmc_add_host(target);
  }
  static DECLARE_WORK(card_reset_work, sdio_card_reset_worker);
  
@@@ -1775,6 -1764,9 +1766,6 @@@ static void mwifiex_sdio_card_reset(str
  {
        struct sdio_mmc_card *card = adapter->card;
  
 -      if (work_pending(&card_reset_work))
 -              return;
 -
        reset_host = card->func->card->host;
        schedule_work(&card_reset_work);
  }
diff --combined kernel/softirq.c
index f5cc25f147a646e210384d1cb98ae4a97240b3a7,47cb991c6ba40888377d83668eb362192e995979..b4d252fd195b927afd402977b64efb3faa7ed96f
@@@ -195,21 -195,21 +195,21 @@@ void local_bh_enable_ip(unsigned long i
  EXPORT_SYMBOL(local_bh_enable_ip);
  
  /*
-  * We restart softirq processing MAX_SOFTIRQ_RESTART times,
-  * and we fall back to softirqd after that.
+  * We restart softirq processing for at most 2 ms,
+  * and if need_resched() is not set.
   *
-  * This number has been established via experimentation.
+  * These limits have been established via experimentation.
   * The two things to balance is latency against fairness -
   * we want to handle softirqs as soon as possible, but they
   * should not be able to lock up the box.
   */
- #define MAX_SOFTIRQ_RESTART 10
+ #define MAX_SOFTIRQ_TIME  msecs_to_jiffies(2)
  
  asmlinkage void __do_softirq(void)
  {
        struct softirq_action *h;
        __u32 pending;
-       int max_restart = MAX_SOFTIRQ_RESTART;
+       unsigned long end = jiffies + MAX_SOFTIRQ_TIME;
        int cpu;
        unsigned long old_flags = current->flags;
  
        current->flags &= ~PF_MEMALLOC;
  
        pending = local_softirq_pending();
 -      vtime_account_irq_enter(current);
 +      account_irq_enter_time(current);
  
        __local_bh_disable((unsigned long)__builtin_return_address(0),
                                SOFTIRQ_OFFSET);
@@@ -264,15 -264,16 +264,16 @@@ restart
        local_irq_disable();
  
        pending = local_softirq_pending();
-       if (pending && --max_restart)
-               goto restart;
+       if (pending) {
+               if (time_before(jiffies, end) && !need_resched())
+                       goto restart;
  
-       if (pending)
                wakeup_softirqd();
+       }
  
        lockdep_softirq_exit();
  
 -      vtime_account_irq_exit(current);
 +      account_irq_exit_time(current);
        __local_bh_enable(SOFTIRQ_OFFSET);
        tsk_restore_flags(current, old_flags, PF_MEMALLOC);
  }
@@@ -341,7 -342,7 +342,7 @@@ static inline void invoke_softirq(void
   */
  void irq_exit(void)
  {
 -      vtime_account_irq_exit(current);
 +      account_irq_exit_time(current);
        trace_hardirq_exit();
        sub_preempt_count(IRQ_EXIT_OFFSET);
        if (!in_interrupt() && local_softirq_pending())