1. 18 Jun, 2008 13 commits
    • Stefan Richter's avatar
      ieee1394: Kconfig menu touch-up · 9499fe2b
      Stefan Richter authored
      Rename and reorder some prompts and modify some help texts.
      The result:
      
        -------------------- IEEE 1394 (FireWire) support --------------------
        *** Enable only one of the two stacks, unless you know what you are doing ***
        New FireWire stack, EXPERIMENTAL
          OHCI-1394 controllers
          Storage devices (SBP-2 protocol)
        Stable FireWire stack
          OHCI-1394 controllers
          PCILynx controller
          Storage devices (SBP-2 protocol)
            Enable replacement for physical DMA in SBP2
          IP over 1394
          raw1394 userspace interface
          video1394 userspace interface
          dv1394 userspace interface (deprecated)
          Excessive debugging output
      
      The old prompts for reference:
      
        -------------------- IEEE 1394 (FireWire) support --------------------
        IEEE 1394 (FireWire) support - alternative stack, EXPERIMENTAL
          Support for OHCI FireWire host controllers
          Support for storage devices (SBP-2 protocol driver)
        IEEE 1394 (FireWire) support
          *** Subsystem Options ***
          Excessive debugging output
          *** Controllers ***
          Texas Instruments PCILynx support
          OHCI-1394 support
          *** Protocols ***
          OHCI-1394 Video support
          SBP-2 support (Harddisks etc.)
            Enable replacement for physical DMA in SBP2
          IP over 1394
          OHCI-DV I/O support (deprecated)
          Raw IEEE1394 I/O support
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      9499fe2b
    • Stefan Richter's avatar
      firewire: Kconfig menu touch-up · a7b64b87
      Stefan Richter authored
      Emphasize the recommendation to build only one stack.
      Trim the prompts to better fit into short attention spans.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      a7b64b87
    • Stefan Richter's avatar
      firewire: deadline for PHY config transmission · ae1e5355
      Stefan Richter authored
      If the low-level driver failed to initialize a card properly without
      noticing it, fw-core was blocked indefinitely when trying to send a
      PHY config packet.  This hung up the events kernel thread, e.g. locked
      up keyboard input.
      https://bugzilla.redhat.com/show_bug.cgi?id=444694
      https://bugzilla.redhat.com/show_bug.cgi?id=446763
      
      This problem was introduced between 2.6.25 and 2.6.26-rc1 by commit
      2a0a2590 "firewire: wait until PHY
      configuration packet was transmitted (fix bus reset loop)".
      
      The solution is to wait with timeout.  I tested it with 7 different
      working controllers and 1 non-working controller.  On the working ones,
      the packet callback complete()s usually --- but not always --- before a
      timeout of 10ms.  Hence I chose a safer timeout of 100ms.
      
      On the few tests with the non-working controller ALi M5271, PHY config
      packet transmission always timed out so far.  (Fw-ohci needs to be fixed
      for this controller independently of this deadline fix.  Often the core
      doesn't even attempt to send a phy config because not even self ID
      reception works.)
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      ae1e5355
    • Stefan Richter's avatar
      firewire: fw-ohci: unify printk prefixes · 161b96e7
      Stefan Richter authored
      The messages which can be enabled by fw-ohci's debug module parameter
      are changed from KERN_DEBUG to KERN_NOTICE level and uniformly prefixed
      with "firewire_ohci: ".  This further simplifies communication with
      users when we ask them to capture debug messages.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      161b96e7
    • Stefan Richter's avatar
      firewire: fill_bus_reset_event needs lock protection · 5cb84067
      Stefan Richter authored
      Callers of fill_bus_reset_event() have to take card->lock.  Otherwise
      access to node data may oops if node removal is in progress.
      
      A lockless alternative would be
      
      -	event->local_node_id = card->local_node->node_id;
      +	tmp = fw_node_get(card->local_node);
      +	event->local_node_id = tmp->node_id;
      +	fw_node_put(tmp);
      
      and ditto with the other node pointers which fill_bus_reset_event()
      accesses.  But I went the locked route because one of the two callers
      already holds the lock.  As a bonus, we don't need the memory barrier
      anymore because device->generation and device->node_id are written in
      a card->lock protected section.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: default avatarKristian Høgsberg <krh@redhat.com>
      5cb84067
    • Stefan Richter's avatar
      firewire: fw-ohci: write selfIDBufferPtr before LinkControl.rcvSelfID · affc9c24
      Stefan Richter authored
      OHCI 1.1 clause 5.10 requires that selfIDBufferPtr is valid when a 1 is
      written into LinkControl.rcvSelfID.
      
      This driver bug has so far not been known to cause harm because most
      chips obviously accept a later selfIDBufferPtr write, at least before
      HCControl.linkEnable is written.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: default avatarJarod Wilson <jwilson@redhat.com>
      Signed-off-by: default avatarKristian Høgsberg <krh@redhat.com>
      affc9c24
    • Stefan Richter's avatar
      firewire: fw-ohci: disable PHY packet reception into AR context · e896ec43
      Stefan Richter authored
      We want the rcvPhyPkt bit in LinkControl off before we start using the
      chip.  However, the spec says that the reset value of it is undefined.
      Hence switch it explicitly off.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=244576#c48 shows that for
      example the nForce2 integrated FireWire controller seems to have it on
      by default.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: default avatarJarod Wilson <jwilson@redhat.com>
      e896ec43
    • Stefan Richter's avatar
      firewire: fw-ohci: use of uninitialized data in AR handler · ccff9629
      Stefan Richter authored
      header_length and payload_length are filled with random data if an
      unknown tcode was read from the AR buffer (i.e. if the AR buffer
      contained invalid data).
      
      We still need a better strategy to recover from this, but at least
      handle_ar_packet now doesn't return out of bound buffer addresses
      anymore.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      ccff9629
    • Stefan Richter's avatar
      firewire: don't panic on invalid AR request buffer · 0bf607c5
      Stefan Richter authored
      BUG() at this place is wrong.  (Unless if the low level driver would
      already do higher-level input validation of incoming request headers.)
      
      Invalid incoming requests or bugs in the controller which corrupt the
      AR-req buffer needlessly crashed the box because this is run in tasklet
      context.
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      0bf607c5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 952f4a0a
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: appletouch - implement reset-resume logic
        Input: i8042 - retry failed CTR writes when resuming
        Input: i8042 - add Fujitsu-Siemens Amilo Pro V2030 to nomux table
        Input: pcspkr - remove negative dependency on snd-pcsp
      
      Manually fixed up trivial conflict in drivers/usb/core/quirks.c
      952f4a0a
    • Miklos Szeredi's avatar
      fuse: fix thinko in max I/O size calucation · f948d564
      Miklos Szeredi authored
      Use max not min to enforce a lower limit on the max I/O size.
      
      This bug was introduced by "fuse: fix max i/o size calculation" (commit
      e5d9a0df).
      
      Thanks to Brian Wang for noticing.
      Reported-by: default avatarBrian Wang <ywang221@hotmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Acked-by: default avatarSzabolcs Szakacsits <szaka@ntfs-3g.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f948d564
    • Eduard - Gabriel Munteanu's avatar
      Unignore vmlinux.lds.h from Git. · cd50e892
      Eduard - Gabriel Munteanu authored
      Added !vmlinux.lds.h to .gitignore because it would otherwise be ignored.
      Signed-off-by: default avatarEduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Acked-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd50e892
    • Linus Torvalds's avatar
      x86-64: Fix "bytes left to copy" return value for copy_from_user() · 42a886af
      Linus Torvalds authored
      Most users by far do not care about the exact return value (they only
      really care about whether the copy succeeded in its entirety or not),
      but a few special core routines actually care deeply about exactly how
      many bytes were copied from user space.
      
      And the unrolled versions of the x86-64 user copy routines would
      sometimes report that it had copied more bytes than it actually had.
      
      Very few uses actually have partial copies to begin with, but to make
      this bug even harder to trigger, most x86 CPU's use the "rep string"
      instructions for normal user copies, and that version didn't have this
      issue.
      
      To make it even harder to hit, the one user of this that really cared
      about the return value (and used the uncached version of the copy that
      doesn't use the "rep string" instructions) was the generic write
      routine, which pre-populated its source, once more hiding the problem by
      avoiding the exception case that triggers the bug.
      
      In other words, very special thanks to Bron Gondwana who not only
      triggered this, but created a test-program to show it, and bisected the
      behavior down to commit 08291429 ("mm:
      fix pagecache write deadlocks") which changed the access pattern just
      enough that you can now trigger it with 'writev()' with multiple
      iovec's.
      
      That commit itself was not the cause of the bug, it just allowed all the
      stars to align just right that you could trigger the problem.
      
      [ Side note: this is just the minimal fix to make the copy routines
        (with __copy_from_user_inatomic_nocache as the particular version that
        was involved in showing this) have the right return values.
      
        We really should improve on the exceptional case further - to make the
        copy do a byte-accurate copy up to the exact page limit that causes it
        to fail.  As it is, the callers have to do extra work to handle the
        limit case gracefully. ]
      Reported-by: default avatarBron Gondwana <brong@fastmail.fm>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      
       (which didn't have this problem), and since
      most users that do the carethis was very hard to trigger, but
      42a886af
  2. 17 Jun, 2008 2 commits
  3. 16 Jun, 2008 25 commits