1. 26 Jun, 2013 2 commits
    • Nicolas Schichan's avatar
      net: fix kernel deadlock with interface rename and netdev name retrieval. · 5dbe7c17
      Nicolas Schichan authored
      When the kernel (compiled with CONFIG_PREEMPT=n) is performing the
      rename of a network interface, it can end up waiting for a workqueue
      to complete. If userland is able to invoke a SIOCGIFNAME ioctl or a
      SO_BINDTODEVICE getsockopt in between, the kernel will deadlock due to
      the fact that read_secklock_begin() will spin forever waiting for the
      writer process (the one doing the interface rename) to update the
      devnet_rename_seq sequence.
      
      This patch fixes the problem by adding a helper (netdev_get_name())
      and using it in the code handling the SIOCGIFNAME ioctl and
      SO_BINDTODEVICE setsockopt.
      
      The netdev_get_name() helper uses raw_seqcount_begin() to avoid
      spinning forever, waiting for devnet_rename_seq->sequence to become
      even. cond_resched() is used in the contended case, before retrying
      the access to give the writer process a chance to finish.
      
      The use of raw_seqcount_begin() will incur some unneeded work in the
      reader process in the contended case, but this is better than
      deadlocking the system.
      Signed-off-by: default avatarNicolas Schichan <nschichan@freebox.fr>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5dbe7c17
    • Gavin Shan's avatar
      net/tg3: Avoid delay during MMIO access · 6d446ec3
      Gavin Shan authored
      When the EEH error is the result of a fenced host bridge, MMIO accesses
      can be very slow (milliseconds) to timeout and return all 1's,
      thus causing the driver various timeout loops to take way too long and
      trigger soft-lockup warnings (in addition to taking minutes to recover).
      
      It might be worthwhile to check if for any of these cases, ffffffff is
      a valid possible value, and if not, bail early since that means the HW
      is either gone or isolated. In the meantime, checking that the PCI channel
      is offline would be workaround of the problem.
      
      Cc: <stable@vger.kernel.org> # v3.0+
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d446ec3
  2. 25 Jun, 2013 7 commits
  3. 24 Jun, 2013 16 commits
  4. 22 Jun, 2013 1 commit
  5. 20 Jun, 2013 12 commits
  6. 19 Jun, 2013 2 commits
    • Guenter Roeck's avatar
      net: fec: Fix build for MCF5272 · d1391930
      Guenter Roeck authored
      Commits 4c09eed9 (net: fec: Enable imx6 enet checksum acceleration) and
      baa70a5c (net: fec: enable pause frame to improve rx prefomance for 1G
      network) introduced functionality into the FEC driver which is not
      supported on MCF5272. The registers used to implement this functionality
      do not exist on MCF5272. Since register defines for MCF5272 are separate
      from register defines for other chips, building images for MCF5272 fails
      as follows.
      
      fec_main.c: In function 'fec_restart':
      fec_main.c:520:8: error: 'FEC_RACC' undeclared (first use in this function)
      fec_main.c:585:3: error: 'FEC_R_FIFO_RSEM' undeclared (first use in this function)
      fec_main.c:586:3: error: 'FEC_R_FIFO_RSFL' undeclared (first use in this function)
      fec_main.c:587:3: error: 'FEC_R_FIFO_RAEM' undeclared (first use in this function)
      fec_main.c:588:3: error: 'FEC_R_FIFO_RAFL' undeclared (first use in this function)
      fec_main.c:591:3: error: 'FEC_OPD' undeclared (first use in this function)
      
      Adding the missing register defines is not an option, since the registers
      do not exist on MCF5272. Disable the added functionality for MCF5272 builds.
      
      Cc: Frank Li <Frank.Li@freescale.com>
      Cc: Jim Baxter <jim_baxter@mentor.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1391930
    • John W. Linville's avatar
      Merge branch 'master' of... · 4067c666
      John W. Linville authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
      4067c666