Skip to content
  1. Mar 07, 2017
  2. Mar 06, 2017
  3. Mar 03, 2017
    • Edward Cree's avatar
      sfc: fix IPID endianness in TSOv2 · 6d43131c
      Edward Cree authored
      
      
      The value we read from the header is in network byte order, whereas
       EFX_POPULATE_QWORD_* takes values in host byte order (which it then
       converts to little-endian, as MCDI is little-endian).
      
      Fixes: e9117e50 ("sfc: Firmware-Assisted TSO version 2")
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d43131c
    • Edward Cree's avatar
      sfc: avoid max() in array size · d0346b03
      Edward Cree authored
      
      
      It confuses sparse, which thinks the size isn't constant.  Let's achieve
       the same thing with a BUILD_BUG_ON, since we know which one should be
       bigger and don't expect them ever to change.
      
      Signed-off-by: default avatarEdward Cree <ecree@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0346b03
    • Jakub Kicinski's avatar
      nfp: correct DMA direction in XDP DMA sync · d58cebb7
      Jakub Kicinski authored
      
      
      dma_sync_single_for_*() takes the direction in which the buffer
      was mapped, not the direction of the sync.  We should sync XDP
      buffers bidirectionally.
      
      Fixes: ecd63a02 ("nfp: add XDP support in the driver")
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d58cebb7
    • Jakub Kicinski's avatar
      nfp: don't tell FW about the reserved buffer space · 9383b337
      Jakub Kicinski authored
      
      
      Since commit c0f031bc ("nfp_net: use alloc_frag() and build_skb()")
      we are allocating buffers which have to hold both the data and skb to
      be created in place by build_skb().
      
      FW should only be told about the buffer space it can DMA to, that
      is without the build_skb() headroom and tailroom.  Note: firmware
      applications should validate the buffers against both MTU and
      free list buffer size so oversized packets would not pass through
      the NIC anyway.
      
      Fixes: c0f031bc ("nfp: use alloc_frag() and build_skb()")
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9383b337
    • Hari Vyas's avatar
      net: ethernet: bgmac: mac address change bug · fa42245d
      Hari Vyas authored
      
      
      ndo_set_mac_address() passes struct sockaddr * as 2nd parameter to
      bgmac_set_mac_address() but code assumed u8 *.  This caused two bytes
      chopping and the wrong mac address was configured.
      
      Signed-off-by: default avatarHari Vyas <hariv@broadcom.com>
      Signed-off-by: default avatarJon Mason <jon.mason@broadcom.com>
      Fixes: 4e209001 ("bgmac: write mac address to hardware in ndo_set_mac_address")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa42245d
    • Jon Mason's avatar
      net: ethernet: bgmac: init sequence bug · 16206524
      Jon Mason authored
      
      
      Fix a bug in the 'bgmac' driver init sequence that blind writes for init
      sequence where it should preserve most bits other than the ones it is
      deliberately manipulating.
      
      The code now checks to see if the adapter needs to be brought out of
      reset (where as before it was doing an IDM write to bring it out of
      reset regardless of whether it was in reset or not).  Also, removed
      unnecessary usleeps (as there is already a read present to flush the
      IDM writes).
      
      Signed-off-by: default avatarZac Schroff <zschroff@broadcom.com>
      Signed-off-by: default avatarJon Mason <jon.mason@broadcom.com>
      Fixes: f6a95a24 ("net: ethernet: bgmac: Add platform device support")
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16206524
    • Paul Durrant's avatar
      xen-netback: don't vfree() queues under spinlock · a254d8f9
      Paul Durrant authored
      
      
      This leads to a BUG of the following form:
      
      [  174.512861] switch: port 2(vif3.0) entered disabled state
      [  174.522735] BUG: sleeping function called from invalid context at
      /home/build/linux-linus/mm/vmalloc.c:1441
      [  174.523451] in_atomic(): 1, irqs_disabled(): 0, pid: 28, name: xenwatch
      [  174.524131] CPU: 1 PID: 28 Comm: xenwatch Tainted: G        W
      4.10.0upstream-11073-g4977ab6-dirty #1
      [  174.524819] Hardware name: MSI MS-7680/H61M-P23 (MS-7680), BIOS V17.0
      03/14/2011
      [  174.525517] Call Trace:
      [  174.526217]  show_stack+0x23/0x60
      [  174.526899]  dump_stack+0x5b/0x88
      [  174.527562]  ___might_sleep+0xde/0x130
      [  174.528208]  __might_sleep+0x35/0xa0
      [  174.528840]  ? _raw_spin_unlock_irqrestore+0x13/0x20
      [  174.529463]  ? __wake_up+0x40/0x50
      [  174.530089]  remove_vm_area+0x20/0x90
      [  174.530724]  __vunmap+0x1d/0xc0
      [  174.531346]  ? delete_object_full+0x13/0x20
      [  174.531973]  vfree+0x40/0x80
      [  174.532594]  set_backend_state+0x18a/0xa90
      [  174.533221]  ? dwc_scan_descriptors+0x24d/0x430
      [  174.533850]  ? kfree+0x5b/0xc0
      [  174.534476]  ? xenbus_read+0x3d/0x50
      [  174.535101]  ? xenbus_read+0x3d/0x50
      [  174.535718]  ? xenbus_gather+0x31/0x90
      [  174.536332]  ? ___might_sleep+0xf6/0x130
      [  174.536945]  frontend_changed+0x6b/0xd0
      [  174.537565]  xenbus_otherend_changed+0x7d/0x80
      [  174.538185]  frontend_changed+0x12/0x20
      [  174.538803]  xenwatch_thread+0x74/0x110
      [  174.539417]  ? woken_wake_function+0x20/0x20
      [  174.540049]  kthread+0xe5/0x120
      [  174.540663]  ? xenbus_printf+0x50/0x50
      [  174.541278]  ? __kthread_init_worker+0x40/0x40
      [  174.541898]  ret_from_fork+0x21/0x2c
      [  174.548635] switch: port 2(vif3.0) entered disabled state
      
      This patch defers the vfree() until after the spinlock is released.
      
      Reported-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a254d8f9
    • Paul Durrant's avatar
      xen-netback: keep a local pointer for vif in backend_disconnect() · d67ce7da
      Paul Durrant authored
      
      
      This patch replaces use of 'be->vif' with 'vif' and hence generally
      makes the function look tidier. No semantic change.
      
      Signed-off-by: default avatarPaul Durrant <paul.durrant@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d67ce7da
    • Marc Kleine-Budde's avatar
      can: flexcan: fix typo in comment · 66ddb821
      Marc Kleine-Budde authored
      
      
      This patch fixes the typo "Disble" -> "Disable".
      
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      66ddb821
    • Marc Kleine-Budde's avatar
      can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer · 7c426313
      Marc Kleine-Budde authored
      
      
      The priv->cmd_msg_buffer is allocated in the probe function, but never
      kfree()ed. This patch converts the kzalloc() to resource-managed
      kzalloc.
      
      Cc: linux-stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      7c426313
    • Ethan Zonca's avatar
      can: gs_usb: fix coding style · 540a27ae
      Ethan Zonca authored
      
      
      This patch fixes five minor style issues, spaces are between bitwise OR
      operators.
      
      Signed-off-by: default avatarEthan Zonca <e@ethanzonca.com>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      540a27ae
    • Ethan Zonca's avatar
      can: gs_usb: Don't use stack memory for USB transfers · c919a306
      Ethan Zonca authored
      
      
      Fixes: 05ca5270 can: gs_usb: add ethtool set_phys_id callback to locate physical device
      
      The gs_usb driver is performing USB transfers using buffers allocated on
      the stack. This causes the driver to not function with vmapped stacks.
      Instead, allocate memory for the transfer buffers.
      
      Signed-off-by: default avatarEthan Zonca <e@ethanzonca.com>
      Cc: linux-stable <stable@vger.kernel.org> # >= v4.8
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      c919a306
    • Alexander Duyck's avatar
      ixgbe: Limit use of 2K buffers on architectures with 256B or larger cache lines · c74042f3
      Alexander Duyck authored
      
      
      On architectures that have a cache line size larger than 64 Bytes we start
      running into issues where the amount of headroom for the frame starts
      shrinking.
      
      The size of skb_shared_info on a system with a 64B L1 cache line size is
      320.  This increases to 384 with a 128B cache line, and 512 with a 256B
      cache line.
      
      In addition the NET_SKB_PAD value increases as well consistent with the
      cache line size.  As a result when we get to a 256B cache line as seen on
      the s390 we end up 768 bytes used by padding and shared info leaving us
      with only 1280 bytes to use for data storage.  On architectures such as
      this we should default to using 3K Rx buffers out of a 8K page instead of
      trying to do 1.5K buffers out of a 4K page.
      
      To take all of this into account I have added one small check so that we
      compare the max_frame to the amount of actual data we can store.  This was
      already occurring for igb, but I had overlooked it for ixgbe as it doesn't
      have strict limits for 82599 once we enable jumbo frames.  By adding this
      check we will automatically enable 3K Rx buffers as soon as the maximum
      frame size we can handle drops below the standard Ethernet MTU.
      
      I also went through and fixed one small typo that I found where I had left
      an IGB in a variable name due to a copy/paste error.
      
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c74042f3
    • Paolo Abeni's avatar
      ixgbe: update the rss key on h/w, when ethtool ask for it · d3aa9c9f
      Paolo Abeni authored
      
      
      Currently ixgbe_set_rxfh() updates the rss_key copy in the driver
      memory, but does not push the new value into the h/w. This commit
      add a new helper for the latter operation and call it in
      ixgbe_set_rxfh(), so that the h/w rss key value can be really
      updated via ethtool.
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      d3aa9c9f
    • Ingo Molnar's avatar
      sched/headers: Move task_struct::signal and task_struct::sighand types and... · c3edc401
      Ingo Molnar authored
      
      sched/headers: Move task_struct::signal and task_struct::sighand types and accessors into <linux/sched/signal.h>
      
      task_struct::signal and task_struct::sighand are pointers, which would normally make it
      straightforward to not define those types in sched.h.
      
      That is not so, because the types are accompanied by a myriad of APIs (macros and inline
      functions) that dereference them.
      
      Split the types and the APIs out of sched.h and move them into a new header, <linux/sched/signal.h>.
      
      With this change sched.h does not know about 'struct signal' and 'struct sighand' anymore,
      trying to put accessors into sched.h as a test fails the following way:
      
        ./include/linux/sched.h: In function ‘test_signal_types’:
        ./include/linux/sched.h:2461:18: error: dereferencing pointer to incomplete type ‘struct signal_struct’
                          ^
      
      This reduces the size and complexity of sched.h significantly.
      
      Update all headers and .c code that relied on getting the signal handling
      functionality from <linux/sched.h> to include <linux/sched/signal.h>.
      
      The list of affected files in the preparatory patch was partly generated by
      grepping for the APIs, and partly by doing coverage build testing, both
      all[yes|mod|def|no]config builds on 64-bit and 32-bit x86, and an array of
      cross-architecture builds.
      
      Nevertheless some (trivial) build breakage is still expected related to rare
      Kconfig combinations and in-flight patches to various kernel code, but most
      of it should be handled by this patch.
      
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c3edc401
  4. Mar 02, 2017
Loading