1. 30 10月, 2016 1 次提交
    • S
      firewire: net: really fix maximum possible MTU · 357f4aae
      Stefan Richter 提交于
      The maximum unicast datagram size /without/ link fragmentation is
      4096 - 4 = 4092 (max IEEE 1394 async payload size at >= S800 bus speed,
      minus unfragmented encapssulation header).  Max broadcast datagram size
      without fragmentation is 8 bytes less than that (due to GASP header).
      
      The maximum datagram size /with/ link fragmentation is 0xfff = 4095
      for unicast and broadcast.  This is because the RFC 2734 fragment
      encapsulation header field for datagram size is only 12 bits wide.
      
      Fixes: 5d48f00d('firewire: net: fix maximum possible MTU')
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      357f4aae
  2. 27 10月, 2016 2 次提交
    • S
      firewire: net: set initial MTU = 1500 unconditionally, fix IPv6 on some CardBus cards · 89ab88b0
      Stefan Richter 提交于
      firewire-net, like the older eth1394 driver, reduced the initial MTU to
      less than 1500 octets if the local link layer controller's asynchronous
      packet reception limit was lower.
      
      This is bogus, since this reception limit does not have anything to do
      with the transmission limit.  Neither did this reduction affect the TX
      path positively, nor could it prevent link fragmentation at the RX path.
      
      Many FireWire CardBus cards have a max_rec of 9, causing an initial MTU
      of 1024 - 16 = 1008.  RFC 2734 and RFC 3146 allow a minimum max_rec = 8,
      which would result in an initial MTU of 512 - 16 = 496.  On such cards,
      IPv6 could only be employed if the MTU was manually increased to 1280 or
      more, i.e. IPv6 would not work without intervention from userland.
      
      We now always initialize the MTU to 1500, which is the default according
      to RFC 2734 and RFC 3146.
      
      On a VIA VT6316 based CardBus card which was affected by this, changing
      the MTU from 1008 to 1500 also increases TX bandwidth by 6 %.
      RX remains unaffected.
      
      CC: netdev@vger.kernel.org
      CC: linux1394-devel@lists.sourceforge.net
      CC: Jarod Wilson <jarod@redhat.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89ab88b0
    • S
      firewire: net: fix maximum possible MTU · 5d48f00d
      Stefan Richter 提交于
      Commit b3e3893e ("net: use core MTU range checking in misc drivers")
      mistakenly introduced an upper limit for firewire-net's MTU based on the
      local link layer controller's reception capability.  Revert this.  Neither
      RFC 2734 nor our implementation impose any particular upper limit.
      
      Actually, to be on the safe side and to make the code explicit, set
      ETH_MAX_MTU = 65535 as upper limit now.
      
      (I replaced sizeof(struct rfc2734_header) by the equivalent
      RFC2374_FRAG_HDR_SIZE in order to avoid distracting long/int conversions.)
      
      Fixes: b3e3893e('net: use core MTU range checking in misc drivers')
      CC: netdev@vger.kernel.org
      CC: linux1394-devel@lists.sourceforge.net
      CC: Jarod Wilson <jarod@redhat.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Acked-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5d48f00d
  3. 21 10月, 2016 1 次提交
    • J
      net: use core MTU range checking in misc drivers · b3e3893e
      Jarod Wilson 提交于
      firewire-net:
      - set min/max_mtu
      - remove fwnet_change_mtu
      
      nes:
      - set max_mtu
      - clean up nes_netdev_change_mtu
      
      xpnet:
      - set min/max_mtu
      - remove xpnet_dev_change_mtu
      
      hippi:
      - set min/max_mtu
      - remove hippi_change_mtu
      
      batman-adv:
      - set max_mtu
      - remove batadv_interface_change_mtu
      - initialization is a little async, not 100% certain that max_mtu is set
        in the optimal place, don't have hardware to test with
      
      rionet:
      - set min/max_mtu
      - remove rionet_change_mtu
      
      slip:
      - set min/max_mtu
      - streamline sl_change_mtu
      
      um/net_kern:
      - remove pointless ndo_change_mtu
      
      hsi/clients/ssi_protocol:
      - use core MTU range checking
      - remove now redundant ssip_pn_set_mtu
      
      ipoib:
      - set a default max MTU value
      - Note: ipoib's actual max MTU can vary, depending on if the device is in
        connected mode or not, so we'll just set the max_mtu value to the max
        possible, and let the ndo_change_mtu function continue to validate any new
        MTU change requests with checks for CM or not. Note that ipoib has no
        min_mtu set, and thus, the network core's mtu > 0 check is the only lower
        bounds here.
      
      mptlan:
      - use net core MTU range checking
      - remove now redundant mpt_lan_change_mtu
      
      fddi:
      - min_mtu = 21, max_mtu = 4470
      - remove now redundant fddi_change_mtu (including export)
      
      fjes:
      - min_mtu = 8192, max_mtu = 65536
      - The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to
        get past the core net MTU range checks so fjes_change_mtu can validate a
        new MTU against what it supports (see fjes_support_mtu in fjes_hw.c)
      
      hsr:
      - min_mtu = 0 (calls ether_setup, max_mtu is 1500)
      
      f_phonet:
      - min_mtu = 6, max_mtu = 65541
      
      u_ether:
      - min_mtu = 14, max_mtu = 15412
      
      phonet/pep-gprs:
      - min_mtu = 576, max_mtu = 65530
      - remove redundant gprs_set_mtu
      
      CC: netdev@vger.kernel.org
      CC: linux-rdma@vger.kernel.org
      CC: Stefan Richter <stefanr@s5r6.in-berlin.de>
      CC: Faisal Latif <faisal.latif@intel.com>
      CC: linux-rdma@vger.kernel.org
      CC: Cliff Whickman <cpw@sgi.com>
      CC: Robin Holt <robinmholt@gmail.com>
      CC: Jes Sorensen <jes@trained-monkey.org>
      CC: Marek Lindner <mareklindner@neomailbox.ch>
      CC: Simon Wunderlich <sw@simonwunderlich.de>
      CC: Antonio Quartulli <a@unstable.cc>
      CC: Sathya Prakash <sathya.prakash@broadcom.com>
      CC: Chaitra P B <chaitra.basappa@broadcom.com>
      CC: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
      CC: MPT-FusionLinux.pdl@broadcom.com
      CC: Sebastian Reichel <sre@kernel.org>
      CC: Felipe Balbi <balbi@kernel.org>
      CC: Arvid Brodin <arvid.brodin@alten.se>
      CC: Remi Denis-Courmont <courmisch@gmail.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3e3893e
  4. 05 5月, 2016 1 次提交
  5. 23 3月, 2016 1 次提交
  6. 22 3月, 2016 1 次提交
  7. 07 11月, 2015 1 次提交
    • M
      mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep... · d0164adc
      Mel Gorman 提交于
      mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd
      
      __GFP_WAIT has been used to identify atomic context in callers that hold
      spinlocks or are in interrupts.  They are expected to be high priority and
      have access one of two watermarks lower than "min" which can be referred
      to as the "atomic reserve".  __GFP_HIGH users get access to the first
      lower watermark and can be called the "high priority reserve".
      
      Over time, callers had a requirement to not block when fallback options
      were available.  Some have abused __GFP_WAIT leading to a situation where
      an optimisitic allocation with a fallback option can access atomic
      reserves.
      
      This patch uses __GFP_ATOMIC to identify callers that are truely atomic,
      cannot sleep and have no alternative.  High priority users continue to use
      __GFP_HIGH.  __GFP_DIRECT_RECLAIM identifies callers that can sleep and
      are willing to enter direct reclaim.  __GFP_KSWAPD_RECLAIM to identify
      callers that want to wake kswapd for background reclaim.  __GFP_WAIT is
      redefined as a caller that is willing to enter direct reclaim and wake
      kswapd for background reclaim.
      
      This patch then converts a number of sites
      
      o __GFP_ATOMIC is used by callers that are high priority and have memory
        pools for those requests. GFP_ATOMIC uses this flag.
      
      o Callers that have a limited mempool to guarantee forward progress clear
        __GFP_DIRECT_RECLAIM but keep __GFP_KSWAPD_RECLAIM. bio allocations fall
        into this category where kswapd will still be woken but atomic reserves
        are not used as there is a one-entry mempool to guarantee progress.
      
      o Callers that are checking if they are non-blocking should use the
        helper gfpflags_allow_blocking() where possible. This is because
        checking for __GFP_WAIT as was done historically now can trigger false
        positives. Some exceptions like dm-crypt.c exist where the code intent
        is clearer if __GFP_DIRECT_RECLAIM is used instead of the helper due to
        flag manipulations.
      
      o Callers that built their own GFP flags instead of starting with GFP_KERNEL
        and friends now also need to specify __GFP_KSWAPD_RECLAIM.
      
      The first key hazard to watch out for is callers that removed __GFP_WAIT
      and was depending on access to atomic reserves for inconspicuous reasons.
      In some cases it may be appropriate for them to use __GFP_HIGH.
      
      The second key hazard is callers that assembled their own combination of
      GFP flags instead of starting with something like GFP_KERNEL.  They may
      now wish to specify __GFP_KSWAPD_RECLAIM.  It's almost certainly harmless
      if it's missed in most cases as other activity will wake kswapd.
      Signed-off-by: NMel Gorman <mgorman@techsingularity.net>
      Acked-by: NVlastimil Babka <vbabka@suse.cz>
      Acked-by: NMichal Hocko <mhocko@suse.com>
      Acked-by: NJohannes Weiner <hannes@cmpxchg.org>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Vitaly Wool <vitalywool@gmail.com>
      Cc: Rik van Riel <riel@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d0164adc
  8. 05 11月, 2015 3 次提交
    • S
      firewire: ohci: propagate return code from soft_reset to probe and resume · a354cf00
      Stefan Richter 提交于
      software_reset() may fail
        - due to unresponsive chip with -EBUSY (-16), or
        - due to ejected or unseated card with -ENODEV (-19).
      Let the PCI probe and resume routines log the actual error code instead
      of hardwired -EBUSY.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      a354cf00
    • A
      firewire: nosy: Replace timeval with timespec64 · 2ae4b6b2
      Amitoj Kaur Chawla 提交于
      32 bit systems using 'struct timeval' will break in the year 2038, so
      we replace the code appropriately. However, this driver is not broken
      in 2038 since we are using only the microseconds portion of the
      current time.
      
      This patch replaces timeval with timespec64.
      Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com>
      Reviewed-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      2ae4b6b2
    • S
      firewire: ohci: fix JMicron JMB38x IT context discovery · 100ceb66
      Stefan Richter 提交于
      Reported by Clifford and Craig for JMicron OHCI-1394 + SDHCI combo
      controllers:  Often or even most of the time, the controller is
      initialized with the message "added OHCI v1.10 device as card 0, 4 IR +
      0 IT contexts, quirks 0x10".  With 0 isochronous transmit DMA contexts
      (IT contexts), applications like audio output are impossible.
      
      However, OHCI-1394 demands that at least 4 IT contexts are implemented
      by the link layer controller, and indeed JMicron JMB38x do implement
      four of them.  Only their IsoXmitIntMask register is unreliable at early
      access.
      
      With my own JMB381 single function controller I found:
        - I can reproduce the problem with a lower probability than Craig's.
        - If I put a loop around the section which clears and reads
          IsoXmitIntMask, then either the first or the second attempt will
          return the correct initial mask of 0x0000000f.  I never encountered
          a case of needing more than a second attempt.
        - Consequently, if I put a dummy reg_read(...IsoXmitIntMaskSet)
          before the first write, the subsequent read will return the correct
          result.
        - If I merely ignore a wrong read result and force the known real
          result, later isochronous transmit DMA usage works just fine.
      
      So let's just fix this chip bug up by the latter method.  Tested with
      JMB381 on kernel 3.13 and 4.3.
      
      Since OHCI-1394 generally requires 4 IT contexts at a minium, this
      workaround is simply applied whenever the initial read of IsoXmitIntMask
      returns 0, regardless whether it's a JMicron chip or not.  I never heard
      of this issue together with any other chip though.
      
      I am not 100% sure that this fix works on the OHCI-1394 part of JMB380
      and JMB388 combo controllers exactly the same as on the JMB381 single-
      function controller, but so far I haven't had a chance to let an owner
      of a combo chip run a patched kernel.
      
      Strangely enough, IsoRecvIntMask is always reported correctly, even
      though it is probed right before IsoXmitIntMask.
      
      Reported-by: Clifford Dunn
      Reported-by: NCraig Moore <craig.moore@qenos.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      100ceb66
  9. 01 6月, 2015 1 次提交
  10. 03 3月, 2015 1 次提交
  11. 03 2月, 2015 1 次提交
  12. 31 1月, 2015 1 次提交
    • S
      firewire: sbp2: remove redundant check for bidi command · 1f95f8c9
      Stefan Richter 提交于
      [Bart van Asche:]  SCSI core never sets cmd->sc_data_direction to
      DMA_BIDIRECTIONAL; scsi_bidi_cmnd(cmd) should be used instead to
      test for a bidirectional command.
      
      [Christoph Hellwig:]  Bidirectional commands won't ever be queued
      anyway, unless a LLD or transport driver sets QUEUE_FLAG_BIDI.
      
      So, simply remove the respective queuecommand check in the SBP-2
      transport driver.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      1f95f8c9
  13. 22 1月, 2015 1 次提交
  14. 11 12月, 2014 4 次提交
    • S
      firewire: sbp2: replace card lock by target lock · d737d7da
      Stefan Richter 提交于
      firewire-core uses fw_card.lock to protect topology data and transaction
      data.  firewire-sbp2 uses fw_card.lock for entirely unrelated purposes.
      
      Introduce a sbp2_target.lock to firewire-sbp2 and replace all
      fw_card.lock uses in the driver.  fw_card.lock is now entirely private
      to firewire-core.  This has no immediate advantage apart from making it
      clear in the code that firewire-sbp2 does not interact with the core
      via the core lock.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      d737d7da
    • S
      firewire: sbp2: replace some spin_lock_irqsave by spin_lock_irq · 8e045a31
      Stefan Richter 提交于
      Users of card->lock        Calling context
      ------------------------------------------------------------------------
      sbp2_status_write          AR-req handler, tasklet
      complete_transaction       AR-resp or AT-req handler, tasklet
      sbp2_send_orb              among else scsi host .queuecommand, which may
                                 be called in some sort of atomic context
      sbp2_cancel_orbs           sbp2_send_management_orb/
                                     sbp2_{login,reconnect,remove},
                                     worklet or process
                                 sbp2_scsi_abort, scsi eh thread
      sbp2_allow_block           sbp2_login, worklet
      sbp2_conditionally_block   among else complete_command_orb, tasklet
      sbp2_conditionally_unblock sbp2_{login,reconnect}, worklet
      sbp2_unblock               sbp2_{login,remove}, worklet or process
      
      Drop the IRQ flags saving from sbp2_cancel_orbs,
      sbp2_conditionally_unblock, and sbp2_unblock.
      It was already omitted in sbp2_allow_block.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      8e045a31
    • S
      firewire: sbp2: protect a reference counter properly · 0765cbd3
      Stefan Richter 提交于
      The assertion in the comment in sbp2_allow_block() is no longer true.
      Or maybe it never was true.  At least now, the sole caller of
      sbp2_allow_block(), sbp2_login, can run concurrently to one of
      sbp2_unblock()'s callers, sbp2_remove.
      
      sbp2_login is performed by sbp2_logical_unit.work.
      sbp2_remove is performed by fw_device.work.
      sbp2_remove cancels sbp2_logical_unit.work, but only after it called
      sbp2_unblock.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      0765cbd3
    • S
      firewire: core: document fw_csr_string's truncation of long strings · 0238507b
      Stefan Richter 提交于
      fw_csr_string() truncates and terminates target strings like strlcpy()
      does.  Unlike strlcpy(), it returns the target strlen, not the source
      strlen, hence users of fw_csr_string() are unable to detect truncation.
      
      Point this behavior out in the kerneldoc comment.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      0238507b
  15. 19 11月, 2014 1 次提交
  16. 14 11月, 2014 1 次提交
    • S
      firewire: cdev: prevent kernel stack leaking into ioctl arguments · eaca2d8e
      Stefan Richter 提交于
      Found by the UC-KLEE tool:  A user could supply less input to
      firewire-cdev ioctls than write- or write/read-type ioctl handlers
      expect.  The handlers used data from uninitialized kernel stack then.
      
      This could partially leak back to the user if the kernel subsequently
      generated fw_cdev_event_'s (to be read from the firewire-cdev fd)
      which notably would contain the _u64 closure field which many of the
      ioctl argument structures contain.
      
      The fact that the handlers would act on random garbage input is a
      lesser issue since all handlers must check their input anyway.
      
      The fix simply always null-initializes the entire ioctl argument buffer
      regardless of the actual length of expected user input.  That is, a
      runtime overhead of memset(..., 40) is added to each firewirew-cdev
      ioctl() call.  [Comment from Clemens Ladisch:  This part of the stack is
      most likely to be already in the cache.]
      
      Remarks:
        - There was never any leak from kernel stack to the ioctl output
          buffer itself.  IOW, it was not possible to read kernel stack by a
          read-type or write/read-type ioctl alone; the leak could at most
          happen in combination with read()ing subsequent event data.
        - The actual expected minimum user input of each ioctl from
          include/uapi/linux/firewire-cdev.h is, in bytes:
          [0x00] = 32, [0x05] =  4, [0x0a] = 16, [0x0f] = 20, [0x14] = 16,
          [0x01] = 36, [0x06] = 20, [0x0b] =  4, [0x10] = 20, [0x15] = 20,
          [0x02] = 20, [0x07] =  4, [0x0c] =  0, [0x11] =  0, [0x16] =  8,
          [0x03] =  4, [0x08] = 24, [0x0d] = 20, [0x12] = 36, [0x17] = 12,
          [0x04] = 20, [0x09] = 24, [0x0e] =  4, [0x13] = 40, [0x18] =  4.
      Reported-by: NDavid Ramos <daramos@stanford.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      eaca2d8e
  17. 24 7月, 2014 1 次提交
    • S
      firewire: ohci: disable MSI for VIA VT6315 again · d584a662
      Stefan Richter 提交于
      Revert half of commit d151f985:  If isochronous I/O is attempted with
      packets larget than 1 kByte, VIA VT6315 rev 01 immediately stops to generate
      any interrupts if MSI are used.  Fix this by going back to legacy interrupts.
      [Thread "Isochronous streaming with VT6315 OHCI",
      http://marc.info/?t=139049641500003]
      
      With smaller packets, the loss of IRQs happens too but only very rarely ---
      rarely eneough that it was not yet possible for me to determine whether
      QUIRK_NO_MSI is an actual fix for this rare variation of this chip bug.
      
      I am keeping QUIRK_CYCLE_TIMER off of VT6315 rev >= 1 because this has been
      verified by myself with certainty.  On the other hand, I am also keeping
      QUIRK_CYCLE_TIMER on for VT6315 rev 0 because I don't know at this time
      whether this revision accesses Cycle Timer non-atomically like most of the
      other VIA OHCIs are known to do.
      Reported-by: NRémy Bruno <remy-fw@remy.trinnov.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      d584a662
  18. 16 7月, 2014 1 次提交
    • T
      net: set name_assign_type in alloc_netdev() · c835a677
      Tom Gundersen 提交于
      Extend alloc_netdev{,_mq{,s}}() to take name_assign_type as argument, and convert
      all users to pass NET_NAME_UNKNOWN.
      
      Coccinelle patch:
      
      @@
      expression sizeof_priv, name, setup, txqs, rxqs, count;
      @@
      
      (
      -alloc_netdev_mqs(sizeof_priv, name, setup, txqs, rxqs)
      +alloc_netdev_mqs(sizeof_priv, name, NET_NAME_UNKNOWN, setup, txqs, rxqs)
      |
      -alloc_netdev_mq(sizeof_priv, name, setup, count)
      +alloc_netdev_mq(sizeof_priv, name, NET_NAME_UNKNOWN, setup, count)
      |
      -alloc_netdev(sizeof_priv, name, setup)
      +alloc_netdev(sizeof_priv, name, NET_NAME_UNKNOWN, setup)
      )
      
      v9: move comments here from the wrong commit
      Signed-off-by: NTom Gundersen <teg@jklm.no>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c835a677
  19. 14 7月, 2014 1 次提交
    • G
      firewire: IEEE 1394 (FireWire) support should depend on HAS_DMA · 655fc39b
      Geert Uytterhoeven 提交于
      Commit b3d681a4 ("firewire: Use
      COMPILE_TEST for build testing") added COMPILE_TEST as an alternative
      dependency for the purpose of build testing the firewire core.
      However, this bypasses all other implicit dependencies assumed by PCI,
      like HAS_DMA.
      
      If NO_DMA=y:
      
          drivers/built-in.o: In function `fw_iso_buffer_destroy':
          (.text+0x36a096): undefined reference to `dma_unmap_page'
          drivers/built-in.o: In function `fw_iso_buffer_map_dma':
          (.text+0x36a164): undefined reference to `dma_map_page'
          drivers/built-in.o: In function `fw_iso_buffer_map_dma':
          (.text+0x36a172): undefined reference to `dma_mapping_error'
          drivers/built-in.o: In function `sbp2_send_management_orb':
          sbp2.c:(.text+0x36c6b4): undefined reference to `dma_map_single'
          sbp2.c:(.text+0x36c6c8): undefined reference to `dma_mapping_error'
          sbp2.c:(.text+0x36c772): undefined reference to `dma_map_single'
          sbp2.c:(.text+0x36c786): undefined reference to `dma_mapping_error'
          sbp2.c:(.text+0x36c854): undefined reference to `dma_unmap_single'
          sbp2.c:(.text+0x36c872): undefined reference to `dma_unmap_single'
          drivers/built-in.o: In function `sbp2_map_scatterlist':
          sbp2.c:(.text+0x36ccbc): undefined reference to `scsi_dma_map'
          sbp2.c:(.text+0x36cd36): undefined reference to `dma_map_single'
          sbp2.c:(.text+0x36cd4e): undefined reference to `dma_mapping_error'
          sbp2.c:(.text+0x36cd84): undefined reference to `scsi_dma_unmap'
          drivers/built-in.o: In function `sbp2_unmap_scatterlist':
          sbp2.c:(.text+0x36cda6): undefined reference to `scsi_dma_unmap'
          sbp2.c:(.text+0x36cdc6): undefined reference to `dma_unmap_single'
          drivers/built-in.o: In function `complete_command_orb':
          sbp2.c:(.text+0x36d6ac): undefined reference to `dma_unmap_single'
          drivers/built-in.o: In function `sbp2_scsi_queuecommand':
          sbp2.c:(.text+0x36d8e0): undefined reference to `dma_map_single'
          sbp2.c:(.text+0x36d8f6): undefined reference to `dma_mapping_error'
      
      Add an explicit dependency on HAS_DMA to fix this.
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: NJean Delvare <jdelvare@suse.de>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      655fc39b
  20. 12 6月, 2014 1 次提交
  21. 30 5月, 2014 1 次提交
  22. 29 5月, 2014 1 次提交
  23. 26 5月, 2014 1 次提交
    • T
      ALSA: firewire/bebob: Add a workaround for M-Audio special Firewire series · 9b1ee0b2
      Takashi Sakamoto 提交于
      In post commit, a quirk of this firmware about transactions is reported.
      This commit apply a workaround for this quirk.
      
      They often fail transactions due to gap_count mismatch. This state is changed
      by generating bus reset.
      
      The fw_schedule_bus_reset() is an exported symbol in firewire-core. But there
      are no header for public. This commit moves its prototype from
      drivers/firewire/core.h to include/linux/firewire.h.
      
      This mismatch still affects bus management before generating this bus reset.
      It still takes a time to call driver's probe() because transactions are still
      often failed.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      9b1ee0b2
  24. 17 5月, 2014 1 次提交
  25. 12 5月, 2014 1 次提交
  26. 18 4月, 2014 1 次提交
  27. 07 3月, 2014 2 次提交
    • T
      firewire: don't use PREPARE_DELAYED_WORK · 70044d71
      Tejun Heo 提交于
      PREPARE_[DELAYED_]WORK() are being phased out.  They have few users
      and a nasty surprise in terms of reentrancy guarantee as workqueue
      considers work items to be different if they don't have the same work
      function.
      
      firewire core-device and sbp2 have been been multiplexing work items
      with multiple work functions.  Introduce fw_device_workfn() and
      sbp2_lu_workfn() which invoke fw_device->workfn and
      sbp2_logical_unit->workfn respectively and always use the two
      functions as the work functions and update the users to set the
      ->workfn fields instead of overriding work functions using
      PREPARE_DELAYED_WORK().
      
      This fixes a variety of possible regressions since a2c1c57b
      "workqueue: consider work function when searching for busy work items"
      due to which fw_workqueue lost its required non-reentrancy property.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: linux1394-devel@lists.sourceforge.net
      Cc: stable@vger.kernel.org # v3.9+
      Cc: stable@vger.kernel.org # v3.8.2+
      Cc: stable@vger.kernel.org # v3.4.60+
      Cc: stable@vger.kernel.org # v3.2.40+
      70044d71
    • S
      firewire: ohci: fix probe failure with Agere/LSI controllers · 0ca49345
      Stefan Richter 提交于
      Since commit bd972688
      "firewire: ohci: Fix 'failed to read phy reg' on FW643 rev8",
      there is a high chance that firewire-ohci fails to initialize LSI née
      Agere controllers.
      https://bugzilla.kernel.org/show_bug.cgi?id=65151
      
      Peter Hurley points out the reason:  IEEE 1394a:2000 clause 5A.1 (or
      IEEE 1394:2008 clause 17.2.1) say:  "The PHY shall insure that no more
      than 10 ms elapse from the reassertion of LPS until the interface is
      reset.  The link shall not assert LReq until the reset is complete."
      In other words, the link needs to give the PHY at least 10 ms to get
      the interface operational.
      
      With just the msleep(1) in bd972688, the first read_phy_reg()
      during ohci_enable() may happen before the phy-link interface reset was
      finished, and fail.  Due to the high variability of msleep(n) with small
      n, this failure was not fully reproducible, and not apparent at all with
      low CONFIG_HZ setting.
      
      On the other hand, Peter can no longer reproduce the issue with FW643
      rev8.  The read phy reg failures that happened back then may have had an
      unrelated cause.  So, just revert bd972688, except for the valid
      comment on TSB82AA2 cards.
      
      Reported-by: Mikhail Gavrilov
      Reported-by: NJay Fenlason <fenlason@redhat.com>
      Reported-by: NClemens Ladisch <clemens@ladisch.de>
      Reported-by: NPeter Hurley <peter@hurleysoftware.com>
      Cc: stable@vger.kernel.org # v3.10+
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      0ca49345
  28. 28 2月, 2014 1 次提交
  29. 20 1月, 2014 1 次提交
    • S
      firewire: Enable remote DMA above 4 GB · fcd46b34
      Stefan Richter 提交于
      This makes all of a machine's memory accessible to remote debugging via
      FireWire, using the physical response unit (i.e. RDMA) of OHCI-1394 link
      layer controllers.
      
      This requires actual support by the controller.  The only ones currently
      known to support it are Agere/LSI FW643.  Most if not all other OHCI-1394
      controllers do not implement the optional Physical Upper Bound register.
      With them, RDMA will continue to be limited to the lowermost 4 GB.
      
      firewire-ohci's startup message in the kernel log is augmented to tell
      whether the controller does expose more than 4 GB to RDMA.
      
      While OHCI-1394 allows for a maximum Physical Upper Bound of
      0xffff'0000'0000 (near 256 TB), this implementation sets it to
      0x8000'0000'0000 (128 TB) in order to avoid interference with applications
      that require interrupt-served asynchronous request reception at
      respectively low addresses.
      
      Note, this change does not switch remote DMA on.  It only increases the
      range of remote access to all memory (instead of just 4 GB) whenever
      remote DMA was switched on by other means.  The latter is achieved by
      setting firewire-ohci's remote_dma parameter, or if the physical DMA
      filter is opened through firewire-sbp2.
      
      Derived from patch "firewire: Enable physical DMA above 4GB" by
      Peter Hurley <peter@hurleysoftware.com> from March 27, 2013.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      fcd46b34
  30. 13 1月, 2014 1 次提交
  31. 15 12月, 2013 1 次提交
  32. 29 11月, 2013 1 次提交
    • M
      [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers · 54b2b50c
      Martin K. Petersen 提交于
      Some host adapters do not pass commands through to the target disk
      directly. Instead they provide an emulated target which may or may not
      accurately report its capabilities. In some cases the physical device
      characteristics are reported even when the host adapter is processing
      commands on the device's behalf. This can lead to adapter firmware hangs
      or excessive I/O errors.
      
      This patch disables WRITE SAME for devices connected to host adapters
      that provide an emulated target. Driver writers can disable WRITE SAME
      by setting the no_write_same flag in the host adapter template.
      
      [jejb: fix up rejections due to eh_deadline patch]
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      54b2b50c
  33. 15 11月, 2013 1 次提交