Dave Jones [Wed, 3 Apr 2002 03:23:23 +0000 (19:23 -0800)]
[PATCH] videodev fixups / generic usercopy helper
Originally from Gerd...
I've just noticed that a hole left in the recent changes which should
allow the usb v4l drivers to unregister with open file handles. The
drivers itself handle it just fine, but video_generic_ioctl() will barf
when called on unregistered devices. Oops.
One way to fix this is to expect drivers call the helper function and
pass a pointer for the function doing the actual work, i.e. handle it
this way:
Patch against 2.5.7-pre2 below. It updates videodev.[ch] and adapts
usbvideo.c to show how the driver changes will look like.
Note that this change makes the usercopy helper function a very generic
one, it probably could be used for other drivers to (as long as the API
has sane magic numbers based on _IO*(...) defines) as there is no
video4linux-related stuff in there any more. So we might think of
renaming it an moving it to some more central place (fs/ioctl.c maybe).
Dave Jones [Wed, 3 Apr 2002 03:22:50 +0000 (19:22 -0800)]
[PATCH] UDF write support problem in 2.5.7
From Peter Osterlund <petero2@telia.com>
I can't get UDF write support to work in kernel 2.5.7 or 2.5.7-pre2.
The problem is that linux/config.h is not included, so CONFIG_UDF_RW
is undefined and the driver is compiled without write support. This
patch fixes my problem:
Dave Jones [Wed, 3 Apr 2002 03:22:28 +0000 (19:22 -0800)]
[PATCH] Gameport patch for drivers/sound/mad16.c
From: Michael Haardt <michael@moria.de> for 2.4, munged by me.
the MAD16 driver is able to enable/disable its gameport, but it does
not register it in the input subsystem. The appended patch against
2.4.19-pre4 fixes that and also allows to enable to gameport via kernel
command line, not only when loaded as module.
Dave Jones [Wed, 3 Apr 2002 03:22:09 +0000 (19:22 -0800)]
[PATCH] Simple boot flag specification support.
Originally by Alan. It was in the 2.4-ac tree for ages, much tweaked
by myself and Thomas Hood. Its main purpose is for skipping the full
memory test and other time-wasting diagnostics on reboot.
Dave Jones [Wed, 3 Apr 2002 03:21:59 +0000 (19:21 -0800)]
[PATCH] proc race on task_struct->sig
Originally from Chris Mason <mason@suse.com>..
collect_sigign_sigcatch can race against exit_sighand. I haven't been
able to reproduce it, but I think it causes the oops reported in the
'Kernel Hangs 2.4.16 on heavy io Oracle Tivolie TSM' thread.
Dave Jones [Wed, 3 Apr 2002 03:21:15 +0000 (19:21 -0800)]
[PATCH] Detect get_block() errors in block_read_full_page()
Originally from Anton Altaparmakov..
This causes errors from get_block() in block_read_full_page() to be
detected and handled properly (by setting page error flag). Without the
patch the page (or parts of the page) will contain random data on
get_block() failing without any form of error being signalled which can
be catastrophic for filesystems using block_read_full_page() for
accessing their metadata. And for normal data it would mean the user
would see random data instead of what they expected.
Here's a very tiny bugfix for arch/i386/kernel/mpparse.c in the
2.4.19-pre2 kernel. It fixes the problem if there is an error in the
MP_processor_info() function where the mpc_apicid value is greater than
MAX_APICS, then we need to decrement the number of valid processors
before we return (the number was just incremented before the check.)
Alexander Viro [Tue, 2 Apr 2002 09:17:27 +0000 (01:17 -0800)]
[PATCH] restoring block size upon umount
get_sb_bdev() stores original block size in ->s_old_blocksize and
kill_block_super() restores it.
This kills 99% of crap with "oh, I've mounted/umounted that device and
its behaviour had changed" (remaining 1% can be dealt in pretty similar
ways; ideally I'd like to see ioctls that get/set block size dead and
gone).
Andrew Morton [Tue, 2 Apr 2002 03:44:16 +0000 (19:44 -0800)]
[PATCH] ext2_fill_super breakage
In 2.5.7 there is a thinko in the allocation and initialisation
of the fs-private superblock for ext2. It's passing the wrong type
to the sizeof operator (which of course gives the wrong size)
when allocating and clearing the memory.
Lesson for the day: this is one of the reasons why this idiom:
some_type *p;
p = malloc(sizeof(*p));
...
memset(p, 0, sizeof(*p));
is preferable to
some_type *p;
p = malloc(sizeof(some_type));
...
memset(p, 0, sizeof(some_type));
I checked the other filesystems. They're OK (but idiomatically
impure). I've added a couple of defensive memsets where
they were missing.
Martin Dalecki [Tue, 2 Apr 2002 03:41:07 +0000 (19:41 -0800)]
[PATCH] 2.5.7 IDE 28a
- Apply Pavel Macheks suspend resume double resume fix.
- Finally remove the busy field for ata_operations and replace it with
MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT.
- Fix ali15xx chipset support by removing initialization differences,
apparently caused by mislead interpretation of the specs or a mismatch
between the specification and reality.
- Guard calls to ide_set_handler with checks to see whatever the previously
installed IRQ handler already served it's purpose.
- Convert timeout checks on poll_timeout to the time_before() interface.
- Consolidate the two different IRQ handlers for multi mode PIO writes into
one. The problems remain the same but at least now we will only have to
tangle one single problem.
Martin Dalecki [Tue, 2 Apr 2002 03:41:01 +0000 (19:41 -0800)]
[PATCH] 2.5.7 IDE 27
- Make for less terse error messages in ide-tape.c.
- Replaced all timecomparisions done by hand with all the proper timer_after()
commands.
- Remove the drive niec1 mechanisms alltogether. There are several reasons for
this:
1. The code implementing it is nonintelliglible and therefore propably
broken.
2. If we have to invent somethig about sceduling drive IO, it should be done
on the BIO level.
3. We may in fact interleave with the IO sceduling on the upper layers and
the results of two overlapping signal filters overlapped with each other can
be disasterous to the overall throughput. (In fact they *are* most of the
time.)
4. It was not working if you had intermixed modes on different drives
DMA versus PIO.
5. Our goal is to have a driver which is able to share the badwidth
properly and shouldn't needing this kind of "tuning".
- Remove unused nice2 from disk struct.
- Rename channel member of ata_channel to unit and device to dev to
just prevent wrong interpretations. This prevents constructs like
channel->channel...
Martin Dalecki [Tue, 2 Apr 2002 03:39:39 +0000 (19:39 -0800)]
[PATCH] 2.5.7 IDE 26
- Mark all members of structures, which get jiffies assigned or involved in
ugly timeout calculations with the prefix PADAM_ for easy spotting. This is
Polish for "I'm falling down" or "This brings me to the knees" or slag
comment for "What a sh..". Please be assured that it doesn't sound vulgar.
Please grep for it to see immediately why this nomenclature is justified.
- Rename hwifs_s to ata_channel and eliminate ide_hwifs_t as well as the HWIF
macro. OK this step makes this patch rather big.
Martin Dalecki [Tue, 2 Apr 2002 03:37:33 +0000 (19:37 -0800)]
[PATCH] 2.5.7 IDE 25
- Replace the task_io_reg_t with the simple u8. There is no need to obfuscate
the code more then necessary.
- kill some unnecessary type definitions out from hdreg.h.
- Add proper attributes to register files in hdreg.h.
- Don't use raw arrays for tfRegister and hobRegister in ide_task_s. Use out
nice global structures describing the fields in them. This allows to kill
the following defines:
Martin Dalecki [Tue, 2 Apr 2002 03:37:22 +0000 (19:37 -0800)]
[PATCH] 2.5.7 IDE 23
- Support for additional Promise controller id's (PDC20276).
- Remove code duplication between do_rw_taskfile and do_taskfile.
This will evolve into a more reasonable ata_command() function
finally. The ata_taskfile function has far too many arguments, but
I favour this over having two different code paths for getting
actual data to the drive.