Neil Brown [Thu, 20 Mar 2003 14:16:06 +0000 (06:16 -0800)]
[PATCH] Fix a few MD bugs
1/ set new MD_RECOVERY_INTR flag instead of old 'err = -EINTR'
when a resync thread is signaled - get rid of 'err' altogether in
md_do_sync
2/ raid1 determines if resync is needed based on recovery_cp
rather than mddev->in_sync (which now has a very different meaning)
3/ Don't update superblock when switching to writable mode. The
first write will update the superblock instead.
Amiga RTC updates from Kars de Jong <jongk@linux-m68k.org>:
- Implement mach_get_ss() on Amiga
- Use OKI recommendations for locking the A2000 clock
- Streamline clock structure declarations
Amiga frame buffer device: request the correct interrupt, so we no longer get
spurious interrupts. The old code worked only by accident.
To avoid flicker when updating the display parameters, we do not use the real
vertical blank interrupt, but instead ask the Copper to generate an interrupt
after the bitplane and sprite pointers have been set up at the beginning of
each frame.
M68k SCSI drivers: update for the changes in 2.5.60:
o Replace `->lun' by `->device->lun'
o Replace `->target' by `->device->id'
o Replace `->host' by `->device->host'
M68k NCR5380 SCSI updates for changes in SCSI and NCR5380 SCSI layers:
- Sun-3/3x (from Sam Creasey)
- Atari (ported updates from Sun-3)
- Mac (ported updates from Sun-3)
M68k: Kill warnings generated by gcc-3.2:
- Add missing <linux/string.h> include
- Move unused static data inside usage area
- Kill deprecated multi-line string literals
- Add semicolons to empty cases in switch() constructs
- Comment out unused labels
- Fix extra tokens at end of #endif directives
- a3000_release() may not be optimized away
- Kill uninitialized variable warning
M68k Apollo I/O updates for MMIO and pseudo-MMIO (ISA I/O after translation):
- Use out_8() and out_be16() instead of outb() and outw()
- Remove conflicting definitions of {in,out}[bw]()
Jens Axboe [Thu, 20 Mar 2003 14:01:46 +0000 (06:01 -0800)]
[PATCH] cdrom buffer too small
dvd_read_physical() uses a 20 char buffer to read in the dvd structure,
however the size is really 4 bytes header + 17 bytes body so layer->bca
ends up containing garbage. Kudos to the nice folks who made it a non
multiple of 4 bytes.
Dave Jones [Thu, 20 Mar 2003 13:58:12 +0000 (05:58 -0800)]
[PATCH] Several logic bugs.
Lots of patches from Norbert Kiesel that fix up several silly
| vs. || and & vs. && bugs found with
find ${1:-.} -name \*.c | xargs grep -En \
'![a-zA-Z0-9_ ]+(\|[^|]|\&[^&])|([^|]\||[^&]\&) *!'
Dave Jones [Thu, 20 Mar 2003 13:55:47 +0000 (05:55 -0800)]
[PATCH] make nbd working in 2.5.x
From Petr Vandrovec
we use nbd for our diskless systems, and it looks to me like that
it has some serious problems in 2.5.x... Can you apply this patch
and forward it to Linus?
There were:
* Missing disk's queue initialization
* Driver should use list_del_init: put_request now verifies
that req->queuelist is empty, and list_del was incompatible
with this.
* I converted nbd_end_request back to end_that_request_{first,last}
as I saw no reason why driver should do it itself... and
blk_put_request has no place under queue_lock, so apparently when
semantic changed nobody went through drivers...
Dave Jones [Thu, 20 Mar 2003 13:55:34 +0000 (05:55 -0800)]
[PATCH] Sysfs not handling show errors
Originally by Rusty Lynch, munged by me, acked
by Mochel.
Attempting to cat a sysfs file that returns an error will result in an
endless dump of garbage to the screen because the result of the specific
show operation was being saved to a size_t (unsigned) and then later
checked for a negative value.
Andrew Morton [Thu, 20 Mar 2003 13:48:33 +0000 (05:48 -0800)]
[PATCH] Fix floppy oops on forced unload
From: Angus Sawyer <angus.sawyer@dsl.pipex.com>
Prevent OOPS on removing floppy driver with "rmmod -f floppy".
floppy.c would attempt to unregister resources for nonexistent device.
Patch stops the driver attempting to register and unregister the nonexistent
device by removing the drive from the allowed drives mask (defaults to
present).
Andrew Morton [Thu, 20 Mar 2003 13:48:10 +0000 (05:48 -0800)]
[PATCH] raw driver: rewrite i_mapping only on final close
The recent fix to the raw driver wasn't quite right: it rewrites the
character-special inode's i_mapping to point back to itself on each close.
So any other currently-open handles against /dev/raw/rawN get a nasty
surprise.
Change it to only rewrite i_mapping on the final close.
Also, change it so that it only redirects its i_mapping on the initial open.
This is not necessary, but is neater.
Andrew Morton [Thu, 20 Mar 2003 13:48:03 +0000 (05:48 -0800)]
[PATCH] Fail setup_irq for unconfigured IRQs
From: Zwane Mwaikambo <zwane@holomorphy.com>
This patch makes us bail out in case we may have an interrupt which couldn't
be associated with an interrupt controller. Without this we allow
unconfigured interrupts to be assigned and then later on we get "unexpected
IRQ trap at vector xx" during the ack phase.
scenario: This can occur if we fail irq setup during setup_IO_APIC_irqs for
some reason or other and then miss getting assigned a vector. Later on we
then get assigned no_irq_type as our handler.
Andrew Morton [Thu, 20 Mar 2003 13:47:34 +0000 (05:47 -0800)]
[PATCH] fix nanosleep() granularity bumps
From: Tim Schmielau <tim@physik3.uni-rostock.de>
Fixes the problem wherein nanosleep() is sleeping for the wrong duration.
When starting out with timer_jiffies=0, the timer cascade is (unneccessarily)
triggered on the first timer interrupt, incrementing all the higher indices.
When starting with any other initial jiffies value, we miss that and end up
with all higher indices being off by one.
Andrew Morton [Thu, 20 Mar 2003 13:47:26 +0000 (05:47 -0800)]
[PATCH] NMI watchdog fix
From: William Lee Irwin III <wli@holomorphy.com>
The NMI watchdog has two different "modes": NMI_IO_APIC, which delivers NMI's
through the IO-APIC, and NMI_LOCAL_APIC, which uses the local APIC vector
table (LVT) to deliver the periodic NMI's.
Only NMI_IO_APIC requires being able to set up the PIT so it can deliver
NMI's through the IO-APIC, and so NMI_LOCAL_APIC has no dependency on the
timer being set up through the IO-APIC and is unjustifiably disabled by
check_timer() when the PIT cannot deliver interrupts through the IO-APIC.
This is important because one of the most important uses of NMI_LOCAL_APIC is
to get the NMI watchdog going when NMI_IO_APIC doesn't work.
So what this patch does to repair the situation is instead of checking to see
if the NMI watchdog is enabled at all, it instead checks whether the NMI
watchdog is being used in NMI_IO_APIC mode when a failure to set up the NMI
timer interrupt through the IO-APIC occurs.