1. 27 Feb, 2014 4 commits
    • David S. Miller's avatar
      Merge branch 'kdoc' · e1fbf260
      David S. Miller authored
      Luis R. Rodriguez says:
      
      ====================
      net: start kdoc'ifying net_device
      
      While working on extending some functionality I felt restricted
      with the amount of documentation I can add. Part of this is that
      the existing style on the header files don't let me be verbose.
      This starts addressing that by using kdoc for the net_device
      flags, and as Ben noted, the priv_flags can be moved out from
      UAPI.
      
      Luis R. Rodriguez (2):
        net: kdoc struct net_device flags and priv_flags
        net: move net_device priv_flags out from UAPI
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1fbf260
    • Luis R. Rodriguez's avatar
      net: move net_device priv_flags out from UAPI · 7aa98047
      Luis R. Rodriguez authored
      These are private to userspace, and they're unstable
      anyway and can be shuffled at will (see 080e4130)
      so any userspace application relying on them is on crack.
      
      Test compiled with allyesconfig.
      
      mcgrof@drvbp1 /pub/mem/mcgrof/net-next (git::master)$ make allyesconfig
      mcgrof@drvbp1 /pub/mem/mcgrof/net-next (git::master)$ time make -j 20
      ...
        BUILD   arch/x86/boot/bzImage
      Setup is 16992 bytes (padded to 17408 bytes).
      System is 56153 kB
      CRC 721d2751
      Kernel: arch/x86/boot/bzImage is ready  (#1)
      real    19m35.744s
      user    280m37.984s
      sys     27m54.104s
      
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7aa98047
    • Luis R. Rodriguez's avatar
      net: kdoc struct net_device flags and priv_flags · 589f5816
      Luis R. Rodriguez authored
      We have documentation for these flags but they're scattered
      all over the place. #defines don't allow documentation to be
      written easily so to help to start bringing some documentation
      together use the enums kdoc practice but keep the defines to
      allow userspace to be able to #ifdef them.
      
      I've verified the same values are assigned before and after
      with a simple userspace test program [0] and checksumming the
      output.
      
      [0] http://drvbp1.linux-foundation.org/~mcgrof/kdoc/netdev_flags/
      
      mcgrof@gnat ~/tmp $ ./check-flags | sha1sum
      0ec5b6b1840aa3bb9ce464e61c564820871c92c3  -
      
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      589f5816
    • Arnd Bergmann's avatar
      atm: nicstar: remove interruptible_sleep_on_timeout · 118ce7ab
      Arnd Bergmann authored
      We are trying to finally kill off interruptible_sleep_on_timeout.
      the two uses in the nicstar driver can be trivially replaced
      with wait_event_interruptible_lock_irq_timeout, which prevents the
      wake-up race and is able to check the buffer state with scq->lock
      held.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      118ce7ab
  2. 26 Feb, 2014 31 commits
  3. 25 Feb, 2014 5 commits
    • Joe Perches's avatar
      bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros · cd2b0389
      Joe Perches authored
      BNX2X_ALLOC macros use "goto alloc_mem_err"
      so these labels appear unused in some functions.
      
      Expand these macros in-place via coccinelle and
      some typing.
      
      Update the macros to use statement expressions
      and remove the BNX2X_ALLOC macro.
      
      This adds some > 80 char lines.
      
      $ cat bnx2x_pci_alloc.cocci
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_ALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_ALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	BNX2X_PCI_FALLOC(e1, e2, e3);
      +	e1 = BNX2X_PCI_FALLOC(e2, e3); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      @@
      -	BNX2X_ALLOC(e1, e2);
      +	e1 = kzalloc(e2, GFP_KERNEL); if (!e1) goto alloc_mem_err;
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(sizeof(e1) * e2, e3)
      +	kcalloc(e2, sizeof(e1), e3)
      
      @@
      expression e1;
      expression e2;
      expression e3;
      @@
      -	kzalloc(e1 * sizeof(e2), e3)
      +	kcalloc(e1, sizeof(e2), e3)
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd2b0389
    • Florian Fainelli's avatar
      net: bcmgenet: remove unused bh_lock member · 51adfcc3
      Florian Fainelli authored
      bh_lock spinlock is unused, remove it from the private driver structure.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51adfcc3
    • Florian Fainelli's avatar
      net: bcmgenet: remove commented code in bcmgenet_xmit() · da56bbf7
      Florian Fainelli authored
      This code is commented since it is unused, left-over from the very first
      time this driver was merged.
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da56bbf7
    • Florian Fainelli's avatar
      net: bcmgenet: drop checks on priv->phydev · 80d8e96d
      Florian Fainelli authored
      Drop all the checks on priv->phydev since we will refuse probing the
      driver if we cannot attach to a PHY device. Drop all checks on
      priv->phydev. This also fixes some smatch issues reported by Dan
      Carpenter.
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80d8e96d
    • David S. Miller's avatar
      Merge branch 'gianfar' · 432c5b3a
      David S. Miller authored
      Claudiu Manoil says:
      
      ====================
      gianfar: Device reset and reconfig fixes
      
      These patches end up fixing some notable device reset & reconfig
      related problems.  One issue is on-the-fly (Rx/Tx on) programming
      of interrupt coalescing (IC) registers on the processing path,
      against HW recommendation.  This is an old issue that became visible
      after BQL introduction, as under certain conditions (low traffic)
      one TX interrupt gets lost and BQL fires Tx timeout as a result.
      Another notable issue is a race on the Tx path (xmit, clean_tx)
      during device reset (i.e. during Tx timeout watchdog firing)
      that leads to NULL access.
      Fixing the problematic on-thy-fly register writes (i.e. the IC regs)
      required the implementation of a MAC soft reset procedure.
      The race leading to NULL access was addressed by fixing the
      stop_gfar()/startup_gfar() pair (disable/enable napi a.s.o.)
      and adding the device state DOWN to sync with the TX path.
      
      v2: Refactored if() clauses from gfar_set_features(), PATCH 2.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      432c5b3a