1. 15 5月, 2013 3 次提交
  2. 14 5月, 2013 14 次提交
    • A
      rbd: re-submit flattened write request (part 2) · 638f5abe
      Alex Elder 提交于
      Add code to rbd_img_obj_exists_callback() to detect when a clone's
      parent image has disappeared, and re-submit the original write
      request in that case.
      
      Kill off some redundant assertions.
      
      This completes the resolution for:
          http://tracker.ceph.com/issues/3763Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      638f5abe
    • A
      rbd: re-submit write request for flattened clone · bbea1c1a
      Alex Elder 提交于
      Add code to rbd_img_parent_read_full_callback() to detect when a
      clone's parent image has disappeared, and re-submit the original
      write request in that case.  (See the previous commit for more
      reasoning about why this is appropriate.)
      
      Rename some variables in rbd_img_obj_parent_read_full_callback()
      to match the convention used in the previous patch.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      bbea1c1a
    • A
      rbd: re-submit read request for flattened clone · 02c74fba
      Alex Elder 提交于
      If a clone image gets flattened while a parent read request is
      underway, the original rbd object request needs to be resubmitted.
      
      The reason is that by the time we get the response to the parent
      read request, the data read from the parent may be out of date.
      In other words, we could see this sequence of events:
      
          rbd client                      parent image/osd
          ----------                      ----------------
          original object ENOENT;
              issue parent read
                                          respond to parent read
                                          child image flattened
          original image header refresh
                   <--- original object written independently here
          parent read response received
      
      Add code to rbd_img_parent_read_callback() to detect when a clone's
      parent image has disappeared (as evidenced by its parent overlap
      becoming 0), and re-submit the original read request in that case.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      02c74fba
    • A
      rbd: detect when clone image is flattened · 392a9dad
      Alex Elder 提交于
      A format 2 clone image can be the subject of a "flatten" operation,
      during which all of its data gets "copied up" from its parent image,
      leaving the image fully populated.  Once this is complete, the
      clone's association with the parent is abolished.
      
      Since this can occur when a clone is mapped, we need to detect when
      it has occurred and handle it accordingly.  We know an image has
      been flattened when we know it at one time had a parent, but we have
      learned (via a "get_parent" object class method call) it no longer
      has one.
      
      There might be in-flight requests at the point we learn an image has
      been flattened, so we can't simply clean up parent data structures
      right away.  Instead, we'll drop the initial parent reference when
      the parent has disappeared (rather than when the image gets
      destroyed), which will allow the last in-flight reference to clean
      things up when it's complete.
      
      We leverage the fact that a zero parent overlap renders an image
      effectively unlayered.  We set the overlap to 0 at the point we
      detect the clone image has flattened, which allows the unlayered
      behavior to take effect immediately, while keeping other parent
      structures in place until in-flight requests to complete.
      
      This and the next few patches resolve:
          http://tracker.ceph.com/issues/3763Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      392a9dad
    • A
      rbd: reference count parent requests · a2acd00e
      Alex Elder 提交于
      Keep a reference count for uses of the parent information for an rbd
      device.
      
      An initial reference is set in rbd_img_request_create() if the
      target image has a parent (with non-zero overlap).  Each image
      request for an image with a non-zero parent overlap gets another
      reference when it's created, and that reference is dropped when the
      request is destroyed.
      
      The initial reference is dropped when the image gets torn down.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      a2acd00e
    • A
      rbd: define parent image request routines · e93f3152
      Alex Elder 提交于
      Define rbd_parent_request_create() and rbd_parent_request_destroy()
      to handle the creation of parent image requests submitted for
      layered image objects.  For simplicity, let rbd_img_request_put()
      handle dropping the reference to any image request (parent or not),
      and call whichever destructor is appropriate on the last put.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      e93f3152
    • A
      rbd: define rbd_dev_unparent() · fb65d228
      Alex Elder 提交于
      Define rbd_dev_unparent() to encapsulate cleaning up parent data
      structures from a layered rbd image.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      fb65d228
    • A
      rbd: don't release write request until necessary · 8785b1d4
      Alex Elder 提交于
      Previously when a layered write was going to involve a copyup
      request, the original osd request was released before submitting the
      parent full-object read.  The osd request for the copyup would then
      be allocated in rbd_img_obj_parent_read_full_callback().
      
      Shortly we will be handling the event of mapped layered images
      getting flattened, and when that occurs we need to resubmit the
      original request.  We therefore don't want to release the osd
      request until we really konw we're going to replace it--in the
      callback function.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      8785b1d4
    • A
      rbd: get parent info on refresh · 642a2537
      Alex Elder 提交于
      Get parent info for format 2 images on every refresh (rather than
      just during the initial probe).  This will be needed to detect the
      disappearance of the parent image in the event a mapped image
      becomes unlayered (i.e., flattened).  Avoid leaking the previous
      parent spec on the second and subsequent times this information is
      requested by dropping the previous one (if any) before updating it.
      (Also, extract the pool id into a local variable before assigning
      it into the parent spec.)
      
      Switch to using a non-zero parent overlap value rather than the
      existence of a parent (a non-null parent_spec pointer) to determine
      whether to mark a request layered.  It will soon be possible for
      a layered image to become unlayered while a request is in flight.
      
      This means that the layered flag for an image request indicates that
      there was a non-zero parent overlap at the time the image request
      was created.  The parent overlap can change thereafter, which may
      lead to special handling at request submission or completion time.
      
      This and the next several patches are related to:
          http://tracker.ceph.com/issues/3763
      
      NOTE:
      If an error occurs while refreshing the parent info (i.e.,
      requesting it after initial probe), the old parent info will
      persist.  This is not really correct, and is a scenario that needs
      to be addressed.  For now we'll assert that the failure mode is
      unlikely, but the issue has been documented in tracker issue 5040.
      Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      642a2537
    • W
      bna: add missing iounmap() on error in bnad_init() · ba21fc69
      Wei Yongjun 提交于
      Add the missing iounmap() before return from bnad_init()
      in the error handling case.
      Introduced by commit 01b54b14
      (bna: tx rx cleanup fix).
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba21fc69
    • T
      qlge: fix dma map leak when the last chunk is not allocated · ef380794
      Thadeu Lima de Souza Cascardo 提交于
      qlge allocates chunks from a page that it maps and unmaps that page when
      the last chunk is released. When the driver is unloaded or the card is
      removed, all chunks are released and the page is unmapped for the last
      chunk.
      
      However, when the last chunk of a page is not allocated and the device
      is removed, that page is not unmapped. In fact, its last reference is
      not put and there's also a page leak. This bug prevents a device from
      being properly hotplugged.
      
      When the DMA API debug option is enabled, the following messages show
      the pending DMA allocation after we remove the driver.
      
      This patch fixes the bug by unmapping and putting the page from the ring
      if its last chunk has not been allocated.
      
      pci 0005:98:00.0: DMA-API: device driver has pending DMA allocations while released from device [count=1]
      One of leaked entries details: [device address=0x0000000060a80000] [size=65536 bytes] [mapped with DMA_FROM_DEVICE] [mapped as page]
      ------------[ cut here ]------------
      WARNING: at lib/dma-debug.c:746
      Modules linked in: qlge(-) rpadlpar_io rpaphp pci_hotplug fuse [last unloaded: qlge]
      NIP: c0000000003fc3ec LR: c0000000003fc3e8 CTR: c00000000054de60
      REGS: c0000003ee9c74e0 TRAP: 0700   Tainted: G           O  (3.7.2)
      MSR: 8000000000029032 <SF,EE,ME,IR,DR,RI>  CR: 28002424  XER: 00000001
      SOFTE: 1
      CFAR: c0000000007a39c8
      TASK = c0000003ee8d5c90[8406] 'rmmod' THREAD: c0000003ee9c4000 CPU: 31
      GPR00: c0000000003fc3e8 c0000003ee9c7760 c000000000c789f8 00000000000000ee
      GPR04: 0000000000000000 00000000000000ef 0000000000004000 0000000000010000
      GPR08: 00000000000000be c000000000b22088 c000000000c4c218 00000000007c0000
      GPR12: 0000000028002422 c00000000ff26c80 0000000000000000 000001001b0f1b40
      GPR16: 00000000100cb9d8 0000000010093088 c000000000cdf910 0000000000000001
      GPR20: 0000000000000000 c000000000dbfc00 0000000000000000 c000000000dbfb80
      GPR24: c0000003fafc9d80 0000000000000001 000000000001ff80 c0000003f38f7888
      GPR28: c000000000ddfc00 0000000000000400 c000000000bd7790 c000000000ddfb80
      NIP [c0000000003fc3ec] .dma_debug_device_change+0x22c/0x2b0
      LR [c0000000003fc3e8] .dma_debug_device_change+0x228/0x2b0
      Call Trace:
      [c0000003ee9c7760] [c0000000003fc3e8] .dma_debug_device_change+0x228/0x2b0 (unreliable)
      [c0000003ee9c7840] [c00000000079a098] .notifier_call_chain+0x78/0xf0
      [c0000003ee9c78e0] [c0000000000acc20] .__blocking_notifier_call_chain+0x70/0xb0
      [c0000003ee9c7990] [c0000000004a9580] .__device_release_driver+0x100/0x140
      [c0000003ee9c7a20] [c0000000004a9708] .driver_detach+0x148/0x150
      [c0000003ee9c7ac0] [c0000000004a8144] .bus_remove_driver+0xc4/0x150
      [c0000003ee9c7b60] [c0000000004aa58c] .driver_unregister+0x8c/0xe0
      [c0000003ee9c7bf0] [c0000000004090b4] .pci_unregister_driver+0x34/0xf0
      [c0000003ee9c7ca0] [d000000002231194] .qlge_exit+0x1c/0x34 [qlge]
      [c0000003ee9c7d20] [c0000000000e36d8] .SyS_delete_module+0x1e8/0x290
      [c0000003ee9c7e30] [c0000000000098d4] syscall_exit+0x0/0x94
      Instruction dump:
      7f26cb78 e818003a e87e81a0 e8f80028 e9180030 796b1f24 78001f24 7d6a5a14
      7d2a002a e94b0020 483a7595 60000000 <0fe00000> 2fb80000 40de0048 80120050
      ---[ end trace 4294f9abdb01031d ]---
      Mapped at:
       [<d000000002222f54>] .ql_update_lbq+0x384/0x580 [qlge]
       [<d000000002227bd0>] .ql_clean_inbound_rx_ring+0x300/0xc60 [qlge]
       [<d0000000022288cc>] .ql_napi_poll_msix+0x39c/0x5a0 [qlge]
       [<c0000000006b3c50>] .net_rx_action+0x170/0x300
       [<c000000000081840>] .__do_softirq+0x170/0x300
      Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Acked-by: NJitendra Kalsaria <Jitendra.kalsaria@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef380794
    • A
      rbd: ignore zero-overlap parent · 70cf49cf
      Alex Elder 提交于
      An rbd clone image that has an overlap with its parent of 0 is
      effectively not a layered image at all.  Detect this case and treat
      such an image as non-layered.  Issue a warning to be sure the user
      knows what's going on.
      
      This resolves:
          http://tracker.ceph.com/issues/5028Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      70cf49cf
    • A
      rbd: support reading parent page data for writes · b91f09f1
      Alex Elder 提交于
      Currently, rbd_img_obj_parent_read_full() assumes the incoming
      object request contains bio data.  But if a layered image is part of
      a multi-layer stack of images it will result in read requests of
      page data to parent images.
      
      This is handling the same kind of issue as was resolved by this
      commit:
          5b2ab72d  rbd: support reading parent page data
      
      This resolves:
          http://tracker.ceph.com/issues/5027Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      b91f09f1
    • A
      rbd: fix parent request size assumption · ebda6408
      Alex Elder 提交于
      The code that reads object data from the parent for a copyup on
      write request currently assumes that the size of that request is the
      size of a "full" object from the original target image.
      
      That is not necessarily the case.  The parent overlap could reduce
      the request size below that.  To fix that assumption we need to
      record the number of pages in the copyup_pages array, for both an
      image request and an object request.  Rename a local variable in
      rbd_img_obj_parent_read_full_callback() to reflect we're recording
      the length of the parent read request, not the size of the target
      object.
      
      This resolves:
          http://tracker.ceph.com/issues/5038Signed-off-by: NAlex Elder <elder@inktank.com>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      ebda6408
  3. 13 5月, 2013 6 次提交
  4. 12 5月, 2013 17 次提交
    • A
      virtio_net: use default napi weight by default · d34710e3
      Amerigo Wang 提交于
      Since commit 82dc3c63 ("net: introduce NAPI_POLL_WEIGHT")
      we warn drivers when they use napi weight higher than NAPI_POLL_WEIGHT,
      but virtio_net still uses 128 by default. This patch makes its default
      value to NAPI_POLL_WEIGHT.
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d34710e3
    • P
      emac: Fix EMAC soft reset on 460EX/GT · 23fbb5a8
      Petri Gynther 提交于
      Fix EMAC soft reset on 460EX/GT to select the right PHY clock source
      before and after the soft reset.
      
      EMAC with PHY should use the clock from PHY during soft reset.
      EMAC without PHY should use the internal clock during soft reset.
      
      PPC460EX/GT Embedded Processor Advanced User's Manual
      section 28.10.1 Mode Register 0 (EMACx_MR0) states:
      Note: The PHY must provide a TX Clk in order to perform a soft reset
      of the EMAC. If none is present, select the internal clock
      (SDR0_ETH_CFG[EMACx_PHY_CLK] = 1).
      After a soft reset, select the external clock.
      
      Without the fix, 460EX/GT-based boards with RGMII PHYs attached to
      EMACs experience EMAC interrupt storm and system watchdog reset when
      issuing "ifconfig eth0 down" + "ifconfig eth0 up" a few times.
      The system enters endless loop of serving emac_irq() with EMACx_ISR
      register stuck at value 0x10000000 (Rx parity error).
      
      With the fix, the above issue is no longer observed.
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23fbb5a8
    • S
      3c59x: fix PCI resource management · 4b264a16
      Sergei Shtylyov 提交于
      The driver wrongly claimed I/O ports at an address returned by pci_iomap() --
      even if it was passed an MMIO address.  Fix this by claiming/releasing all PCI
      resources in the PCI driver's probe()/remove() methods instead and get rid of
      'must_free_region' flag weirdness (why would Cardbus claim anything for us?).
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b264a16
    • G
      caif: CAIF_VIRTIO should depend on HAS_DMA · 79e0c19e
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `cfv_destroy_genpool':
      drivers/net/caif/caif_virtio.c:364: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `cfv_create_genpool':
      drivers/net/caif/caif_virtio.c:397: undefined reference to `dma_alloc_coherent'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79e0c19e
    • G
      net/ethernet: MACB should depend on HAS_DMA · 822bc329
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `macb_free_consistent':
      drivers/net/ethernet/cadence/macb.c:878: undefined reference to `dma_free_coherent'
      drivers/net/ethernet/cadence/macb.c:883: undefined reference to `dma_free_coherent'
      drivers/net/ethernet/cadence/macb.c:888: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `macb_alloc_consistent':
      drivers/net/ethernet/cadence/macb.c:905: undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `macb_tx_interrupt':
      drivers/net/ethernet/cadence/macb.c:515: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `macb_tx_error_task':
      drivers/net/ethernet/cadence/macb.c:457: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `macb_start_xmit':
      drivers/net/ethernet/cadence/macb.c:838: undefined reference to `dma_map_single'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      822bc329
    • G
      net/ethernet: ARM_AT91_ETHER should depend on HAS_DMA · d914ae80
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `at91ether_start':
      drivers/net/ethernet/cadence/at91_ether.c:49: undefined reference to `dma_alloc_coherent'
      drivers/net/ethernet/cadence/at91_ether.c:60: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `at91ether_interrupt':
      drivers/net/ethernet/cadence/at91_ether.c:250: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `at91ether_start_xmit':
      drivers/net/ethernet/cadence/at91_ether.c:169: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `at91ether_close':
      drivers/net/ethernet/cadence/at91_ether.c:145: undefined reference to `dma_free_coherent'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d914ae80
    • G
      net/wireless: ATH9K should depend on HAS_DMA · 4837ef42
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `ath9k_beacon_generate':
      drivers/net/wireless/ath/ath9k/beacon.c:146: undefined reference to `dma_unmap_single'
      drivers/net/wireless/ath/ath9k/beacon.c:174: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/beacon.c:176: undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `ath9k_beacon_remove_slot':
      drivers/net/wireless/ath/ath9k/beacon.c:252: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_descdma_setup':
      drivers/net/wireless/ath/ath9k/init.c:382: undefined reference to `dmam_alloc_coherent'
      drivers/built-in.o: In function `ath_edma_get_buffers':
      drivers/net/wireless/ath/ath9k/recv.c:616: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_get_next_rx_buf':
      drivers/net/wireless/ath/ath9k/recv.c:740: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_rx_edma_cleanup':
      drivers/net/wireless/ath/ath9k/recv.c:176: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_rx_cleanup':
      drivers/net/wireless/ath/ath9k/recv.c:340: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_rx_edma_buf_link':
      drivers/net/wireless/ath/ath9k/recv.c:122: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_rx_tasklet':
      drivers/net/wireless/ath/ath9k/recv.c:1275: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/recv.c:1277: undefined reference to `dma_mapping_error'
      drivers/net/wireless/ath/ath9k/recv.c:1283: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_rx_edma_init':
      drivers/net/wireless/ath/ath9k/recv.c:226: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/recv.c:229: undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `ath_rx_init':
      drivers/net/wireless/ath/ath9k/recv.c:303: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/recv.c:306: undefined reference to `dma_mapping_error'
      drivers/built-in.o: In function `ath_tx_complete_buf':
      drivers/net/wireless/ath/ath9k/xmit.c:2088: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `ath_txstatus_setup':
      drivers/net/wireless/ath/ath9k/xmit.c:2344: undefined reference to `dmam_alloc_coherent'
      drivers/built-in.o: In function `ath_tx_set_retry':
      drivers/net/wireless/ath/ath9k/xmit.c:307: undefined reference to `dma_sync_single_for_cpu'
      drivers/built-in.o: In function `ath_tx_setup_buffer':
      drivers/net/wireless/ath/ath9k/xmit.c:1887: undefined reference to `dma_map_single'
      drivers/net/wireless/ath/ath9k/xmit.c:1889: undefined reference to `dma_mapping_error'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
      Cc: John W. Linville <linville@tuxdriver.com>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4837ef42
    • G
      net/ethernet: STMMAC_ETH should depend on HAS_DMA · fd1eb9e6
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `dma_free_tx_skbufs':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1141: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `dma_free_rx_skbufs':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1120: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `free_dma_desc_resources':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1159: undefined reference to `dma_free_coherent'
      drivers/built-in.o: In function `stmmac_init_rx_buffers':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:980: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `init_dma_desc_rings':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1015: undefined reference to `dma_alloc_coherent'
      drivers/built-in.o: In function `stmmac_tx_clean':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1250: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `stmmac_rx':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2044: undefined reference to `dma_unmap_single'
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2082: undefined reference to `dma_unmap_single'
      drivers/built-in.o: In function `stmmac_rx_refill':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1967: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `stmmac_xmit':
      drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1845: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `skb_frag_dma_map':
      include/linux/skbuff.h:2184: undefined reference to `dma_map_page'
      drivers/built-in.o: In function `stmmac_jumbo_frm':
      drivers/net/ethernet/stmicro/stmmac/ring_mode.c:40: undefined reference to `dma_map_single'
      drivers/built-in.o: In function `stmmac_jumbo_frm':
      drivers/net/ethernet/stmicro/stmmac/chain_mode.c:48: undefined reference to `dma_map_single'
      drivers/net/ethernet/stmicro/stmmac/chain_mode.c:55: undefined reference to `dma_map_single'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd1eb9e6
    • G
      net/ethernet: NET_CALXEDA_XGMAC should depend on HAS_DMA · 3b76b3c3
      Geert Uytterhoeven 提交于
      If NO_DMA=y:
      
      drivers/built-in.o: In function `xgmac_xmit':
      drivers/net/ethernet/calxeda/xgmac.c:1102: undefined reference to `dma_mapping_error'
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b76b3c3
    • N
      iscsi-target: Fix typos in RDMAEXTENSIONS macro usage · af40bb0b
      Nicholas Bellinger 提交于
      This patch fixes a handful of typos in 'RDMAEXTENTIONS' -> 'RDMAEXTENSIONS'
      macro usage.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      af40bb0b
    • J
      macvlan: fix passthru mode race between dev removal and rx path · 233c7df0
      Jiri Pirko 提交于
      Currently, if macvlan in passthru mode is created and data are rxed and
      you remove this device, following panic happens:
      
      NULL pointer dereference at 0000000000000198
      IP: [<ffffffffa0196058>] macvlan_handle_frame+0x153/0x1f7 [macvlan]
      
      I'm using following script to trigger this:
      <script>
      while [ 1 ]
      do
      	ip link add link e1 name macvtap0 type macvtap mode passthru
      	ip link set e1 up
      	ip link set macvtap0 up
      	IFINDEX=`ip link |grep macvtap0 | cut -f 1 -d ':'`
      	cat /dev/tap$IFINDEX  >/dev/null &
      	ip link del dev macvtap0
      done
      </script>
      
      I run this script while "ping -f" is running on another machine to send
      packets to e1 rx.
      
      Reason of the panic is that list_first_entry() is blindly called in
      macvlan_handle_frame() even if the list was empty. vlan is set to
      incorrect pointer which leads to the crash.
      
      I'm fixing this by protecting port->vlans list by rcu and by preventing
      from getting incorrect pointer in case the list is empty.
      
      Introduced by: commit eb06acdc "macvlan: Introduce 'passthru' mode to takeover the underlying device"
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      233c7df0
    • N
      target/rd: Add ramdisk bit for NULLIO operation · 52c07423
      Nicholas Bellinger 提交于
      This patch adds a rd_nullio parameter that allows RAMDISK_MCP backends
      to function in NULLIO mode, where all se_cmd I/O is immediately completed
      in rd_execute_rw() without actually performing the SGL memory copy.
      
      This is useful for performance testing when the ramdisk SGL memory copy
      begins to eat lots of cycles during heavy small block workloads, so allow
      this bit to be enabled when necessary on a per rd_dev basis.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      52c07423
    • R
      net/mlx4: Strengthen VLAN tags/priorities enforcement in VST mode · 7677fc96
      Rony Efraim 提交于
      Make sure that the following steps are taken:
      
      - drop packets sent by the VF with vlan tag
      - block packets with vlan tag which are steered to the VF
      - drop/block tagged packets when the policy is priority-tagged
      - make sure VLAN stripping for received packets is set
      - make sure force UP bit for the VF QP is set
      
      Use enum values for all the above instead of numerical bit offsets.
      Signed-off-by: NRony Efraim <ronye@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7677fc96
    • O
      net/mlx4_core: Add missing report on VST and spoof-checking dev caps · 4e8cf5b8
      Or Gerlitz 提交于
      Commits e6b6a231 "net/mlx4: Add VF MAC spoof checking support" and
      3f7fb021 "net/mlx4: Add set VF default vlan ID and priority support"
      missed reporting in the device capabilities dump when these features
      are actually supported. Also two too noisy debug messages which produce
      message on every QP opened by a VF, were left in the code, fix that.
      Signed-off-by: NRony Efraim <ronye@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4e8cf5b8
    • S
      net: fec: enable hardware checksum only on imx6q-fec · 48496255
      Shawn Guo 提交于
      Commit 4c09eed9 (net: fec: Enable imx6 enet checksum acceleration.)
      enables hardware checksum acceleration unconditionally for all fec
      variants.  This is inappropriate, because some variants like imx5 have
      no such support on hardware.  Consequently, fec is broken on these
      platforms.  Fix it by enabling hardware checksum only on imx6q-fec type
      of controllers.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Reviewed-by: NJim Baxter <jim_baxter@mentor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48496255
    • R
      qlcnic: Fix validation of link event command. · cbccb18f
      Rajesh Borundia 提交于
      o VF driver that has enabled asynchronous link events
        may not set BIT_8 in the request, if it does not require
        link state in the response.
      Signed-off-by: NPratik Pujar <pratik.pujar@qlogic.com>
      Signed-off-by: NRajesh Borundia <rajesh.borundia@qlogic.com>
      Signed-off-by: NShahed Shaikh <shahed.shaikh@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbccb18f
    • R
      qlcnic: Fix mailbox response handling. · 9106e5db
      Rajesh Borundia 提交于
      o Fix mailbox response poll time to maximum 5 seconds which
        includes mailbox response time as well as time required for
        processing AEN if any.
      o Driver need to read firmware control mailbox register instead
        of host control mailbox register.
      Signed-off-by: NJitendra Kalsaria <jitendra.kalsaria@qlogic.com>
      Signed-off-by: NRajesh Borundia <rajesh.borundia@qlogic.com>
      Signed-off-by: NShahed Shaikh <shahed.shaikh@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9106e5db