[PATCH] IDE: Fix Power Management request race on resume
The current IDE Power Management code I wrote has a race on wakeup when
the master device got resumed, it may take a request. At this point, a
PM resume request to a slave device of the same hwgroup would clear
hwgroup->rq and cause an Oops when the master device request completes.
This patch fixes it. Due to the context in which PM resume requests are
sent, just not clearing hwgroup->rq for these is enough.
I also removed a useless debug message in the PM code that was
actually misleading (people though it indicated a problem while it
didn't, it's really useless) and fix a typo in a comment.
[PATCH] IDE: Fix request handling with ide-default & ATAPI
This fixes a bug that happens when a request gets to the IDE layer for a
drive using ide-default (that is with no subdriver attached), like a
Power Management request. In this case, the core will wait for the
device status to match drive->read_stat, but that field contains by
default a value that is not suitable for ATAPI devices. This patch
fixes it.
Russell King [Tue, 9 Sep 2003 14:26:47 +0000 (15:26 +0100)]
[SERIAL] Convert serial config deps to select statements
The dependencies for CONFIG_SERIAL_CORE / CONFIG_SERIAL_CORE_CONSOLE
were becoming very messy. This cset converts the dependencies to
use "select" statements instead.
David Howells [Tue, 9 Sep 2003 03:16:16 +0000 (20:16 -0700)]
[PATCH] RxRPC update
Here's a patch to update the RxRPC driver. Most of it is CodingStyle fixes,
but it also includes a few miscellaneous bug fixes. stdint types are also
turned into C99 forms (eg: u32 -> uint32_t).
Benh saw some bugs where the queue would end up being in an invalid
state, and this could certainly explain one of them. We must not have a
stopped queue on the plug list, and blk_plug_device() right now will
happily plug a stopped queue.
We don't need to have it plugged either, blk_start_queue() will make
sure that request_fn gets run.
Russell King [Mon, 8 Sep 2003 20:28:05 +0000 (21:28 +0100)]
[SERIAL] Make SA11x0 serial driver build.
Update the SA11x0 serial driver for the removal of system devices
from the driver model. The driver becomes a platform device driver.
The driver is now known to the driver model and resource subsytems
as "sa11x0-uart".
Without this, if elv_try_last_merge() returns nonzero, we do not
initialise *req. That results in a subsequent BUG_ON() in
__make_request() because req is NULL (or is just uninitialised).
Arnd's new-and-improved _IOx() argument checking showed two sound
drivers whose microcode load ioctl's used types with sizes that
overflow the ioctl number. Mark them _IOx_BAD() to document the fact.
This new version works with all compiler versions, and also catches the
case where somebody tries to pass in an array as an argument to the
ioctl macros. Thus we verify that only proper types are used.
I have checked now that the object code for arch/s390/kernel/compat_ioctl.o
remains identical and that the whole kernel compiles for s390 and i386,
after fixing the broken ioctl numbers.
Rusty Russell [Sun, 7 Sep 2003 13:46:30 +0000 (06:46 -0700)]
[PATCH] modprobe -q: quieter when modules missing
The kernel invokes "modprobe" on modules which might not exist:
rightfully, modprobe complains by default when this happens. So the
correct response is to invoke "modprobe -q", which is silent on such
errors (but still reports other errors such as config errors).
Also, use MODULE_NAME_LEN from module.h instead of inventing our own.
Rusty Russell [Sun, 7 Sep 2003 13:46:23 +0000 (06:46 -0700)]
[PATCH] Modules: Be stricter recognizing init&exit sesections
Someone pointed out that -ffunction-sections can cause a function called
"init<something>" to be put in the init section, and discarded. This
hurts PARISC badly. Get more fussy with identifying them.
Nothing too exciting, just some minor new features and bug fixes.
The IOMMU code should now not BUG again without CONFIG_IOMMU_DEBUG/iommu=force
- Compiles now with -funit-at-a-time
- Fix up ioctl 32bit tables following Andrew's change.
- Fix __SI_POLL siginfo_t passing to user space
- Add 32bit emulation for fadvise64_64
- Remove unneeded sys32_utimes
- Various merges with i386 (ACPI, APIC etc.)
- Port cpuid patching infrastructure from i386
- Use it to provide better copy_*_user/memcpy/memset/clear/copy_page for
C stepping K8. String instructions are faster now that unrolled loops.
- Don't try to merge unforced PCI mappings that don't exceed the device's
DMA mask.
- Discard .exit.data/.exit.text at runtime like i386
- Don't use NTI stores for clear_user
- Convert bitops.h bitmap functions to use unsigned long * pointers instead
of void *
- Fix some warnings in kernel headers.
- Fix PDA comments
Russell King [Sun, 7 Sep 2003 08:48:13 +0000 (01:48 -0700)]
[PATCH] Fixes to allow ARM to build in the standard tree
In addition to the MODULE_ALIAS_LDISC patch, the following changes to
generic code are needed to allow ARM to build in Linus' tree.
The first is to add PT_SINGLESTEP to ptrace.h so we do the right thing
when adding/removing breakpoint instructions into processes (see
arch/arm/kernel/{signal.c,ptrace.c} for usage.)
The second is needed because pmd_clear() needs to flush the pmd.
However, we can't include tlbflush.h into pgtable.h without causing
a circular dependency (tlbflush.h needs vm_area_struct and mm_struct
which are in mm.h, which needs pgtable.h.) swapfile.c seems to be the
only file affected.
here are the next fixes, sorry for the delay, but one of bugs was a really
odd one.
Note:
- here are lot of bugs left, so ISDN is not stable yet but
I think it's really time to fix it, even if it need some cycles
to get it right (normally I'm only send patches if it works 100% for
me).
- I add some additional #warnings to address places which need fixing
(I hope that some of the other ISDN developer jump in)
Matthew Wilcox [Sun, 7 Sep 2003 02:43:46 +0000 (19:43 -0700)]
[PATCH] use size_t for the broken ioctl numbers
The ioctl number-generating macros should be used like
#define XXXX _IOR(n,x,type-of-arg)
which generates an ioctl number that has the size of the argument
encoded within it. But there are a number of ioctl #defines that look
like
#define XXXX _IOR(n,x,sizeof(type-of-arg))
which is very wrong: the _IO/_IOR/_IOW/_IOWR macros will do the sizeof()
on the argtype themselves, so the end result is that we will be doing a
sizeof(sizeof(argtype)), ie a sizeof(size_t).
In other words, the argtype didn't matter at all, and ended up totally
pointless.
Clearly it's too late to change the ioctl definitions, but we can at
least stop people from copying them and making the same mistake.
Sam Ravnborg [Sat, 6 Sep 2003 23:26:51 +0000 (01:26 +0200)]
kbuild: genksyms, add explicit reference to include dir
genksyms references .h files in the genksyms directory from a
generated .c file. Explicit tell kbuild to search the genksyms
directory in the kernel src tree for .h files.
Sam Ravnborg [Sat, 6 Sep 2003 23:13:18 +0000 (01:13 +0200)]
kbuild/isdn: Defer md5sum calculation until needed
Replacing ':=' assignment with '=' assignment defers md5sum calculation until
required. The pevious implementation actually calculated the md5sum during
a make clean
Sam Ravnborg [Sat, 6 Sep 2003 23:10:51 +0000 (01:10 +0200)]
kbuild/ieee1394: Makefile update
Use full path to script in oui.c build rule.
Take advantage of kbuild checking command-line arguments,
by adding FORCE as prerequisite, and by use of targets=
I looked a bit more at the keyboard code and find a bug
and a probable bug.
(i) In case a synaptics touchpad has been detected, the comment says
"disable AUX". But we do not set the disable bit, but instead .and.
with the bit - no doubt getting zero. This must be a bug.
(ii) Directly above this is the suspicious comment "keyboard translation
seems to be always off". But every machine comes always up in
translated scancode 2. Translation is never off. But wait! by
mistake the above .and. cleared the XLATE bit.
So, I think bug (i) explains mystery (ii).
However, note that this is code reading only. I do not have the
hardware, so cannot test.
Patch to insert ioremap() error checking and missing iounmap()'s. Also
updated error handling to have only one return statement on error.
Finally, in saa7134_finidev() on line 954 there was a duplicate
saa7134_i2c_unregister().
Dmasound core fixes from Christoph Hellwig:
- Some exported symbols are declared __init - in the modular case this is
freed before the other modules can call it..
- dmasound.lock is initialized too late, do it at compile time