1. 21 6月, 2010 1 次提交
    • S
      firewire: remove an unused function argument · 33e553fe
      Stefan Richter 提交于
      void (*fw_address_callback_t)(..., int speed, ...) is the speed that a
      remote node chose to transmit a request to us.  In case of split
      transactions, firewire-core will transmit the response at that speed.
      
      Upper layer drivers on the other hand (firewire-net, -sbp2, firedtv, and
      userspace drivers) cannot do anything useful with that speed datum,
      except log it for debug purposes.  But data that is merely potentially
      (not even actually) used for debug purposes does not belong into the API.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      33e553fe
  2. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  3. 02 2月, 2010 1 次提交
    • S
      firewire: net: fix panic in fwnet_write_complete · 110f82d7
      Stefan Richter 提交于
      In the transmit path of firewire-net (IPv4 over 1394), the following
      race condition may occur:
        - The networking soft IRQ inserts a datagram into the 1394 async
          request transmit DMA.
        - The 1394 async transmit completion tasklet runs to finish cleaning
          up (unlink datagram from list of pending ones, release skb and
          outbound 1394 transaction object) --- before the networking soft IRQ
          had a chance to proceed and add the datagram to the list of pending
          datagrams.
      
      This caused a panic in the 1394 async transmit completion tasklet when
      it dereferenced unitialized list heads:
      http://bugzilla.kernel.org/show_bug.cgi?id=15077
      
      The fix is to add checks in the tx soft IRQ and in the tasklet to
      determine which of these two is the last referrer to the transaction
      object.  Then handle the cleanup of the object by the last referrer
      rather than assuming that the tasklet is always the last one.
      
      There is another similar race:  Between said tasklet and fwnet_close,
      i.e. at ifdown.  However, that race is much less likely to occur in
      practice and shall be fixed in a separate update.
      Reported-by: NИлья Басин <basinilya@gmail.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      110f82d7
  4. 03 9月, 2009 1 次提交
  5. 02 9月, 2009 1 次提交
  6. 01 9月, 2009 1 次提交
  7. 17 6月, 2009 2 次提交
    • S
      firewire: net: better FIFO address range check and rcodes · 00635b8e
      Stefan Richter 提交于
      The AR req handler should not check the generation; higher level code
      is the better place to handle bus generation changes.  The target node
      ID just needs to be checked for not being the "all nodes" address; in
      this case don't handle the request and don't respond.
      
      Use Address_Error and Type_Error rcodes as appropriate.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      00635b8e
    • S
      firewire: net: fix card driver reloading · b01b4bab
      Stefan Richter 提交于
      Fix some problems from "firewire: net: allow for unordered unit
      discovery":
        - fwnet_remove was missing a list_del, causing fwnet_probe to crash if
          called after fwnet_remove, e.g. if firewire-ohci was unloaded and
          reloaded.
        - fwnet_probe should set its new_netdev flag only if it actually
          allocated a net_device.
        - Use dev_set_drvdata and dev_get_drvdata instead of deprecated direct
          access to device.driver_data.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      b01b4bab
  8. 14 6月, 2009 6 次提交
    • S
      firewire: net: adjust net_device ops · 1337f853
      Stefan Richter 提交于
      The .ndo_tx_timeout callback is currently without function; delete it.
      Give .watchdog_timeo a proper time value; lower it to 2 seconds.
      
      Decrease the .tx_queue_len from 1000 (as in Ethernet card drivers) to 10
      because we have only 64 transaction labels available, and responders
      might have further limits of their AR req contexts.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      1337f853
    • S
      firewire: net: remove unused code · 156ce867
      Stefan Richter 提交于
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      156ce867
    • S
      firewire: net: allow for unordered unit discovery · 5a124d38
      Stefan Richter 提交于
      Decouple the creation and destruction of the net_device from the order
      of discovery and removal of nodes with RFC 2734 unit directories since
      there is no reliable order.  The net_device is now created when the
      first RFC 2734 unit on a card is discovered, and destroyed when the last
      RFC 2734 unit on a card went away.  This includes all remote units as
      well as the local unit, which is therefore tracked as a peer now too.
      
      Also, locking around the list of peers is slightly extended to guard
      against peer removal.  As a side effect, fwnet_peer.pdg_lock has become
      superfluous and is deleted.
      
      Peer data (max_rec, speed, node ID, generation) are updated more
      carefully.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      5a124d38
    • S
      firewire: net: style changes · f91e3bd8
      Stefan Richter 提交于
      Change names of types, variables, functions.
      Omit debug code.
      Use get_unaligned*, put_unaligned*.
      Annotate big endian data.
      Handle errors in __init.
      Change whitespace.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      f91e3bd8
    • S
      firewire: net: add Kconfig item, rename driver · b9530fd6
      Stefan Richter 提交于
      The driver is now called firewire-net.  It might implement the transport
      of other networking protocols in the future, notably IPv6 per RFC 3146.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      b9530fd6
    • J
      firewire: add IPv4 support · c76acec6
      Jay Fenlason 提交于
      Implement IPv4 over IEEE 1394 as per RFC 2734 for the newer firewire
      stack.  This feature has only been present in the older ieee1394 stack
      via the eth1394 driver.
      
      Still to do:
        - fix ipv4_priv and ipv4_node lifetime logic
        - fix determination of speeds and max payloads
        - fix bus reset handling
        - fix unaligned memory accesses
        - fix coding style
        - further testing/ improvement of fragment reassembly
        - perhaps multicast support
      Signed-off-by: NJay Fenlason <fenlason@redhat.com>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (rebased, copyright note, changelog)
      c76acec6