1. 14 Oct, 2003 2 commits
    • John Levon's avatar
      [PATCH] USB: default input core support to y · 5c8f77da
      John Levon authored
      It's quite easy to accidentally miss this option out. I think it makes
      sense to default it to yes if HID support is enabled.
      5c8f77da
    • Benjamin Herrenschmidt's avatar
      [PATCH] USB: Conflicting definitions in keyspan driver · 944fb82a
      Benjamin Herrenschmidt authored
      There's a small issue with drivers/usb/serial/keyspan_usa90msg.h
      
      The definition for MSR_RI conflicts with some PowerPC CPU definition
      (MSR is the Machine State Register on PPC and processor.h defines
      MSR_RI globally). This definition doesn't seem to be used in any .c
      in drivers/usr/serial though, so I beleive it could be easily renamed
      to something a bit less prone to conflict ;) Changing the PPC definition
      would be a lot nastier.
      944fb82a
  2. 13 Oct, 2003 8 commits
    • David Brownell's avatar
      [PATCH] USB: ohci-hcd PM fixes · 5c549937
      David Brownell authored
      This patch primarily fixes PM-related bugs in the OHCI driver.
      
      It gets rid of some flags that duplicated state between usbcore
      and the HCD.  The duplication wasn't correct, and wasn't tested
      correctly ... this fixes both issues.  So now the driver avoids
      writing to hardware when it's suspended (as required by older
      PowerBook hardware) or halted, and treats all non-running states
      the same (as required by all hardware).
      
      This includes the last generic parts of a patch sent a while back
      by Benjamin Herrenschmidt, which weren't at that time testable on a
      x86 kernel because the generic PM code was in flux (and broken).
      There may still be some PMAC-specific issues to resolve.
      
      With this patch, and a device_resume() deadlock fix, I've seen
      OHCI suspend/resume work on hardware it's not worked on since the
      PM changes started to merge into the 2.6.0-test kernels.
      5c549937
    • David Brownell's avatar
      [PATCH] USB: ehci-hcd, misc bugfixes · 752d7202
      David Brownell authored
      This fixes some bugs observed in the EHCI code:
      
        - Byte-order confusion caused the wrong address to be set
          on big-endian hardware (reported last week on PPC and
          SPARC).   That bug's been there for about a year, with
          no problem reports ... hmm.
      
        - Used the wrong bitmask to determine max packet size
          for interrupt transfers, so they were limited to 1023
          bytes (not 1024 bytes) at high speed.
      
        - Because those two problems related to the masking,
          I sanity checked it and moved more of byteswapping
          to compile time.
      
        - Removes some oopsing in the (debug) periodic schedule
          dump, seen with patches that add more interesting
          behaviors (which folk are finally trying...).
      
        - Removed some now-pointless <linux/version.h> usage
      752d7202
    • Greg Kroah-Hartman's avatar
      [PATCH] USB: fix visor driver to work with Palm OS 4+ devices · 90b2bb9e
      Greg Kroah-Hartman authored
      For some reason, they do not like the reset_config calls anymore.
      90b2bb9e
    • Manfred Spraul's avatar
      [PATCH] avoid crashes due to unaligned stacks · d310cbfc
      Manfred Spraul authored
      This fixes the stack end detection properly, and verifies that the
      stack content printing does not overflow into the next page even
      partially.
      
      This is required especially for x86 BIOSes that misalign the stack,
      together with the page access debugging that unmaps unused kernel
      pages to check for valid accesses.
      
      Architectures with special needs (eg HPPA with stacks that grow up)
      can override the kernel stack end test with __HAVE_ARCH_KSTACK_END
      if they ever enable the anal slab debugging code.
      d310cbfc
    • Andi Kleen's avatar
      [PATCH] Fixing mlockall & PROT_NONE · c3d6daa8
      Andi Kleen authored
      This is the minimal change to make "mlockall()" not complain about
      the occasional PROT_NONE area.
      
      PROT_NONE is commonly used on x86-64, and is no reason to not lock
      in the rest of the mappings into memory.
      c3d6daa8
    • Geert Uytterhoeven's avatar
      [PATCH] Sun-3 compile fix · a01b0767
      Geert Uytterhoeven authored
      Sun-3: Add missing include (needed because of __attribute_used__ in
      <linux/init.h>)
      a01b0767
    • Geert Uytterhoeven's avatar
      [PATCH] M68k export csum_partial · 09b2f193
      Geert Uytterhoeven authored
      M68k: Export missing symbol csum_partial
      09b2f193
    • David Woodhouse's avatar
      [PATCH] Kernel thread signal handling. · 7bc9020b
      David Woodhouse authored
       - add disallow_signal() to complement allow_signal(), rather than
         having different subsystems try to do it by hand.
      
       - add a version of dequeue_signal() which does the necessary locking on
         its own, again to avoid having modules have to care.
      
       - let allow_signal() to actually allow signals other than
         SIGKILL. Currently they get either converted to SIGKILL or
         silently dropped, according to whether your kernel thread
         happens to have sa_handler set for the signal in question.
      
         (Barf alert: we do this by just installing a dummy handler)
      
       - make jffs2 use the cleaned up infrastructure
      7bc9020b
  3. 12 Oct, 2003 6 commits
  4. 13 Oct, 2003 1 commit
  5. 12 Oct, 2003 3 commits
  6. 11 Oct, 2003 20 commits
    • Benjamin Herrenschmidt's avatar
      Fix repeat delays in adbhit, they didn't make the transition to · 1e050781
      Benjamin Herrenschmidt authored
      jiffies based values to ms. This fix crazy key repeat on ADB
      based PowerMacs
      1e050781
    • Benjamin Herrenschmidt's avatar
      Fix a crash on sleep in the OF platform core where we would · 5a8a95ed
      Benjamin Herrenschmidt authored
      use a NULL "driver" pointer and actually try to call it after
      casting it !
      5a8a95ed
    • Benjamin Herrenschmidt's avatar
      Fix VIA-based TB/Decrementer calibration , previously it wouldn't work · c918a566
      Benjamin Herrenschmidt authored
      properly with HZ != 100, causing tb_to_us to be wrong and gettimeofday()
      to return strangely "off" results
      c918a566
    • Benjamin Herrenschmidt's avatar
      b87d0087
    • Benjamin Herrenschmidt's avatar
      Move definition of TimeBase registers from reg_booke.h to reg.h, those · 96f124ee
      Benjamin Herrenschmidt authored
      registers exist on common CPUs and without those definitions, SMP won't
      build
      96f124ee
    • Benjamin Herrenschmidt's avatar
      Fix RAMDAC detection on some IMS TwinTurbo video cards ("Mac" cards only), · 418e54d4
      Benjamin Herrenschmidt authored
      without this, you get no display on machines with those cards
      418e54d4
    • Benjamin Herrenschmidt's avatar
      The POWER4 support merged previously was incomplete, add the missing bits · b0531fdc
      Benjamin Herrenschmidt authored
      so that the kernel boots at least on POWER4 and G5 CPUs
      b0531fdc
    • Benjamin Herrenschmidt's avatar
      bacd2782
    • Benjamin Herrenschmidt's avatar
      Export mol_trampoline and mmu_hash_lock for MOL · c49bedd7
      Benjamin Herrenschmidt authored
      (missing from a previous cset)
      c49bedd7
    • Benjamin Herrenschmidt's avatar
      coff images bootloader reserves more memory for the kernel, allow booting · ca9984e1
      Benjamin Herrenschmidt authored
      of "standard" configs on oldworld macs
      ca9984e1
    • Benjamin Herrenschmidt's avatar
      Fix call to Open Firmware "map" call, parameters were flipped causing · 4260c52e
      Benjamin Herrenschmidt authored
      the coff image to randomly fail
      4260c52e
    • David Woodhouse's avatar
      Fix jffs2 memory leak on mount error · f2bdd885
      David Woodhouse authored
      f2bdd885
    • David Woodhouse's avatar
      JFFS2 update; completed support for NAND flash. · 4a98f95f
      David Woodhouse authored
       - Implement write-buffer flushing by garbage collection instead of padding.
       - Implement selective write-buffer flushing on fsync(). 
       - Implement error recovery on write-buffer flush.
       - Fix remove_suid(). Writing to a suid file didn't previously mark the file non-suid.
       - Fix handling of full file systems, to avoid unlink() returning -ENOSPC.
       - Fix assorted memory leaks.
       - Improve garbage collection efficiency by merging fewer pages.
      4a98f95f
    • Linus Torvalds's avatar
      Merge http://linux-acpi.bkbits.net/linux-acpi-release-2.6.0 · 7c6c04c2
      Linus Torvalds authored
      into home.osdl.org:/home/torvalds/v2.5/linux
      7c6c04c2
    • Linus Torvalds's avatar
      Merge bk://kernel.bkbits.net/davem/net-2.5 · 0f0ada4d
      Linus Torvalds authored
      into home.osdl.org:/home/torvalds/v2.5/linux
      0f0ada4d
    • Linus Torvalds's avatar
      Merge bk://kernel.bkbits.net/davem/sparc-2.5 · f8f3d12d
      Linus Torvalds authored
      into home.osdl.org:/home/torvalds/v2.5/linux
      f8f3d12d
    • Venkatesh Pallipadi's avatar
      [PATCH] Bug in timer_tsc cpufreq callback · 348e9f70
      Venkatesh Pallipadi authored
      There is a bug in cpufreq call back funtion in timer_tsc routines,
      that can result in system deadlock. The issue is: grabbing the
      write_lock on xtime_lock without disabling the interrupts. So,=20
      if we happen to get a timer interrupt while we are in this code,
      system will go into a deadlock.
      
      This bug only effects the kernels that have CONFIG_CPU_FREQ enabled.
      348e9f70
    • Benjamin Herrenschmidt's avatar
      Merge kernel.crashing.org:/home/benh/kernels/linux-2.5 · 58f9116e
      Benjamin Herrenschmidt authored
      into kernel.crashing.org:/home/benh/kernels/for-linus-ppc
      58f9116e
    • Ingo Molnar's avatar
      [PATCH] SMP races in the timer code · 158fb15f
      Ingo Molnar authored
      This fixes two del_timer_sync() races that are still in the timer code. 
      
      The first race was actually triggered in a 2.4 backport of the 2.6 timer
      code.  The second race was never triggered - it is mostly theoretical on
      a standalone kernel.  (It's more likely in any virtualized or otherwise
      preemptable environment.)
      
      Both races happen when self-rearming timers are used.  One mainstream
      example is kernel/itimer.c.  The effect of the races is that
      del_timer_sync() lets a timer running instead of synchronizing with it,
      causing logic bugs (and crashes) in the affected kernel code.  One
      typical incarnation of the race is a double add_timer(). 
      
      race #1:
      
      this code in __run_timers() is running on CPU0:
      
                              list_del(&timer->entry);
                              timer->base = NULL;
      			[*]
                              set_running_timer(base, timer);
                              spin_unlock_irq(&base->lock);
      			[**]
                              fn(data);
                              spin_lock_irq(&base->lock);
      
      CPU0 gets stuck at the [*] code-point briefly - after the timer->base has
      been set to NULL, but before the base->running_timer pointer has been set
      up. This is a fundamentally volatile scenario, as there's _zero_ knowledge
      in the data structures that this timer is about to be executed!
      
      Now CPU1 comes along and calls del_timer_sync(). It will find nothing -
      neither timer->base nor base->running_timer will cause it to synchronize.  
      It will return and report that the timer has been deleted - shortly
      afterwards CPU1 continues to execute the timer fn, which will cause
      crashes.
      
      This particular race is easy to fix by reordering the timer->base
      clearing with set_running_timer(), and putting a wmb() between them, but
      there's more races:
      
      race #2
      
      The checking of del_timer_sync() for 'pending or running timer' is
      fundamentally unrobust. Eg. if CPU0 gets stuck at the [***] point below:
      
                      base = &per_cpu(tvec_bases, i);
                      if (base->running_timer == timer) {
                              while (base->running_timer == timer) {
                                      cpu_relax();
                                      preempt_check_resched();
                              }
      			[***]
                              break;
                      }
              }
              smp_rmb();
              if (timer_pending(timer))
                      goto del_again;
      
      
      then del_timer_sync() has already decided that this timer is not running
      (we just finished loop-waiting for it), but we have not done the
      timer_pending() check yet.
      
      If the timer has re-armed itself, and if the timer expires on CPU1 (this
      needs a long delay on CPU0 but that's not hard to achieve eg.  in UML or
      with kernel preemption enabled), then CPU1 could start to expire the
      timer and gets to the [**] point in __run_timers (see above), then CPU1
      gets stalled and CPU0 is unstalled, then the timer_pending() check in
      del_timer_sync() will not notice the running timer, and del_timer_sync()
      returns - while CPU1 is just about to run the timer!
      
      Fixing this second race is hard - it involves a heavy race-check
      operation that has to lock all bases, and has to re-check the
      base->running_timer value, and timer_pending condition atomically.
      
      This fix also fixes the first race, due to forcing del_timer_sync() to
      always observe the timer state atomically, so the [*] code point will
      always synchronize with del_timer_sync(). 
      
      The patch is ugly but safe, and it has fixed the crashes in the 2.4
      backport.  I tested the patch on 2.6.0-test7 with some heavy itimer use
      and it works fine.  Removing self-arming timers safely is the sole
      purpose of del_timer_sync(), so there's no way around this overhead i
      think.  I believe we should ultimately fix all major del_timer_sync()
      users to not use self-arming timers - having del_timer_sync() in the
      thread-exit path is now a considerable source of SMP overhead.  But this
      is out of the scope of current 2.6 fixes of course, and we have to
      support self-arming timers as well.
      158fb15f
    • David S. Miller's avatar
      a968a3a5