Jean Tourrilhes [Fri, 8 Aug 2003 17:14:30 +0000 (13:14 -0400)]
[PATCH] irda-usb probe fix
ir260_usb_probe-4.diff :
~~~~~~~~~~~~~~~~~~~~~~
<Patch from Oliver Neukum and Daniele Bellucci>
o [CORRECT] minor fix to the probe failure path of irda-usb.
Jean Tourrilhes [Fri, 8 Aug 2003 17:13:41 +0000 (13:13 -0400)]
[PATCH] Donauboe probe fix
ir260_donau_cleanup.diff :
~~~~~~~~~~~~~~~~~~~~~~~~
<Patch from Christian Gennerat>
o [CORRECT] Disable chip probing that fail too often
o [FEATURE] Cleanup STATIC
Ivan Kokshaysky [Fri, 8 Aug 2003 10:03:19 +0000 (03:03 -0700)]
[PATCH] PCI: pci_enable_device vs bridges bugs
Bug #1 (found by Jay Estabrook).
On Alpha, under certain circumstances the firmware may close the IO
window of PCI-to-PCI bridge even if there is IO behind.
This wouldn't be a problem - linux PCI setup code does set up this
window properly, but in addition the firmware clears the IO-enable
bit in the PCI_COMMAND register of the bridge.
Since we don't call pci_enable_* routines for bridges in non-hotplug
path, we end up with disabled IO. Fixed by adding pci_enable_bridges()
to pci_assign_unassigned_resources().
Architectures which don't use the latter, but do use other setup-bus
code (parisc?) also should call pci_enable_bridges() for each root bus.
Bug #2 (closely related to #1).
As it turns out, pci_enable_device() doesn't work for bridges at all,
only for regular devices (header type 0) due to 0x3f mask passed to
pci_enable_device_bars(). The mask should be (1 << PCI_NUM_RESOURCES) - 1.
Bug #3 (quite a few archs, including i386).
pcibios_enable_device() does only check first 6 resources (regardless
of the mask) to decide whether or not to enable IO and MEM.
Bridge resources start at 7.
#2 and #3 affect hotplug. I wonder, has anybody ever tried *bridged*
PCI card behind a hot-plug controller?
Ian Abbott [Fri, 8 Aug 2003 09:35:07 +0000 (02:35 -0700)]
[PATCH] USB: ftdi_sio - VID/PID for ID TECH IDT1221U USB to RS-232 adapter
This patch adds support for ID TECH's IDT1221U USB to RS-232 adapter
(intended for use and/or supplied with some of their magnetic/smart
card readers). The VID and PID were provided by Steve Briggs on
the ftdi-usb-sio-devel list.
Wiktor Wodecki [Fri, 8 Aug 2003 09:33:00 +0000 (02:33 -0700)]
[PATCH] I2C: i2c sysfs rant
On Wed, Aug 06, 2003 at 04:22:44PM -0700, Greg KH wrote:
> On Wed, Aug 06, 2003 at 09:11:45PM +0200, Wiktor Wodecki wrote:
> > Hello folks,
> >
> > I just saw that I2C provides "/sys/bus/i2c/drivers/dev\ driver" in
> > 2.6.0-test2. It would be nice if you'd consider renaming this to
> > dev_driver, to avoid un-neccessary quoting in scripts.
> >
> > Thank You :-)
>
> Patches are always gladly accepted :)
Rob Radez [Fri, 8 Aug 2003 03:26:27 +0000 (20:26 -0700)]
[PATCH] remove unnecessary stubs from watchdog drivers
This removes some function stubs from 6 watchdog drivers.
The VFS already returns -EINVAL in cases where fop->read == NULL, so
there's no need to duplicate the code 6 times. This patch removes the
stubs and is compile tested.
David Mosberger [Fri, 8 Aug 2003 03:26:18 +0000 (20:26 -0700)]
[PATCH] modify data types in efi.h
From Matt Tolentino:
Here's a small patch to change several data types from u64 to
unsigned long in efi.h. These changes enable the use of the
same data structures and function prototypes for ia32 EFI kernels.
Bjorn Helgaas [Thu, 7 Aug 2003 16:48:13 +0000 (09:48 -0700)]
[PATCH] ia64: IOSAPIC .weak symbol cleanup
The patch below removes the .weak symbol stuff from iosapic.c.
As far as I can tell, iosapic.c is compiled for every flavor except
the simulator. I tried to boot the HP_SIM kernel on ski, but it
seems to loop in find_save_locs(). This happens both with and
without this patch, so maybe I have a local problem. (I started
with a clean tree, did make
Jesse Barnes [Thu, 7 Aug 2003 16:38:44 +0000 (09:38 -0700)]
[PATCH] ia64: sn2 pci fixes (among others)
sn2 still doesn't use ACPI to describe PCI busses on the system (I'm
working on it), so we have to do it the old fashioned way. This patch
also includes a few other fixes.
Having necessary resources, I've decided to take over the maintenance of
the defxx driver for the PDQ-based family of DEC FDDI controllers (the
DEFEA for EISA and the DEFPA for PCI are the models currently handled).
I've talked to Larry, the original author and the last maintainer of the
code, and he's said he'd be happy about it. He's asked me to update his
long-outdated contact information.
Here is a patch to update the driver to the PCI version of the DMA API.
The patch includes appropriate status and contact information updates.
Andrew Morton [Thu, 7 Aug 2003 04:15:16 +0000 (21:15 -0700)]
[PATCH] initialise page->private
From: Nathan Scott <nathans@sgi.com>
XFS wants to use page->private as a bitmap of uptodate indicators for
sub-page-sized blocks (which is one of the things ->provate was intended
for).
But someone needs to initialise ->private somewhere. best to do it in the
page allocator, so the zeroness of a new page's ->private becomes a
system-wide thing.
Andrew Morton [Thu, 7 Aug 2003 04:15:08 +0000 (21:15 -0700)]
[PATCH] mtrr race fix
From: john stultz <johnstul@us.ibm.com>
I've found a race in the mtrr ipi_handler() and set_mtrr() functions.
Basically the server, set_mtrr() does the following:
1.1 initialize a flag
1.2 send ipi
1.3 waits for all cpus to check in
1.4 toggle flag
1.5 do stuff
1.6 wait for all cpus to check out
1.7 toggle flag again
1.8 return
While the clients, running ipi_handler() do the following:
2.1 check in
2.2 wait for flag
2.3 do stuff
2.4 check out
2.5 wait for flag
2.6 return
The problem is the flag is on the servers stack! So if 1.7 and 1.8
executes before 2.5 happens, the client's pointer to the flag becomes
invalid (likely overwritten) which causes the client to never see the
flag change, hanging the box.
The patch fixes that by adding a final synchronisation step in which the
controlling CPU waits for all the IPI'ed CPUs to complete.
Andrew Morton [Thu, 7 Aug 2003 04:15:00 +0000 (21:15 -0700)]
[PATCH] declare struct irq_desc
From: Martin Pool <mbp@samba.org>
ia64_mv_irq_desc returns a 'struct irq_desc', which had a forward declaration
but did not actually exist. We're currently using a silly anonymous struct
typedefed to irq_desc_t.
Andrew Morton [Thu, 7 Aug 2003 04:14:45 +0000 (21:14 -0700)]
[PATCH] itimer resolution and rounding fixes
From: george anzinger <george@mvista.com>
a) Fixes bug 858 (http://bugme.osdl.org/show_bug.cgi?id=858)
The problem was caused by round off error in calculating the correct
jiffies value in micro seconds to do the round up to jiffies. The fix
is to do the round up AFTER conversion to jiffies, rather than before.
This only affected the timeval to jiffies calculation.
b) Changed the scale values to get the highest possible precision short
of going to full 64-bit math. This is particularly useful in the
scaling of the seconds part of time. The code now computes a trial
value at compile time and adjusts the scaling if the result is less than
32 bits.
c) Adds comments to time.h to remove (I hope) ALL the confusion that
this file use to generate.
Andrew Morton [Thu, 7 Aug 2003 04:14:37 +0000 (21:14 -0700)]
[PATCH] Add do_setitimer prototype to linux/time.h
From: Peter Chubb <peterc@gelato.unsw.edu.au>
Currently, do_setitimer() is used in several files, but doesn't appear
in any header. Thus its declaration is repeated in some files, and
its use causes a warning in others (because there is no declaration
present).
This patch:
-- adds a couple of declarations to linux/times.h
-- removes the (now duplicate) declarations from other files.
Andrew Morton [Thu, 7 Aug 2003 04:14:21 +0000 (21:14 -0700)]
[PATCH] fix free_all_bootmem_core for virtual memmap
From: jbarnes@sgi.com (Jesse Barnes)
Currently, free_all_bootmem_core() assumes that the bdata for a given
node will begin where the node's memory map begins. This isn't
necessarily true on machines that use a virtual memory map (e.g. ia64
discontig machines), so we fix page to point to the first actual page of
RAM on the node, which _does_ contain the bdata struct.
Andrew Morton [Thu, 7 Aug 2003 04:13:58 +0000 (21:13 -0700)]
[PATCH] might_sleep() checks for x86 usercopy functions
From: Matt Mackall <mpm@selenic.com>
This only checks in the non-__ versions, as those are occassionally
called inside things like kmap_atomic pairs which take a spinlock in
with highmem. It's all conditional on CONFIG_DEBUG_SPINLOCK_SLEEP
(which isn't quite the right name) so there's no overhead for normal
builds.
Andrew Morton [Thu, 7 Aug 2003 04:13:43 +0000 (21:13 -0700)]
[PATCH] move_one_page() atomicity fix
move_one_page() is awkward. It grabs an atomic_kmap of the source pte
(because it needs to know if there's really a page there) and then it needs
to allocate a pte for the dest. But it cannot allocate the dest pte while
holding the src's atomic kmap.
So it performs this little dance peeking at pagetables to predict if
alloc_one_pte_map() might need to perform a pte page allocation.
When I wrote this code I made it conditional on CONFIG_HIGHPTE. But that was
bogus: even in the !CONFIG_HIGHPTE case, get_one_pte_map_nested() will run
atomic_kmap() against the pte page, which disables preemption.
Net effect: with CONFIG_HIGHMEM && !CONFIG_HIGHPTE we can end up performing a
GFP_KERNEL pte page allocation while preemption is disabled. It triggers a
might_sleep() warning and indeed is buggy.
So the patch removes the conditionality: even in the !CONFIG_HIGHPTE case we
still do the pagetable peek and drop the kmap if necessary.
(Arguably, we shouldn't be performing the atomic_kmap() at all if
!CONFIG_HIGHPTE: all it does is a pointless preemption disable).
(Arguably, kmap_atomic() should not be disabling preemption if the target
page is not highmem. But we're doing it anyway at present for consistency
(ie: debug coverage) and because the filemap.c pagecache copying functions
rely on kmap_atomic() disabling do_no_page() for all pages: see
do_no_page()'s use of in_atomic()).
Andrew Morton [Thu, 7 Aug 2003 04:13:11 +0000 (21:13 -0700)]
[PATCH] reiserfs: fix savelinks on bigendian arches
From: Oleg Drokin <green@namesys.com>
This small patch fixes a savelinks problem on bigendian platforms, where
savelinks were not working at all because of incorrect cpu->disk endianness
conversion.
Savelinks are used on reiserfs to remember "truncate" and "unlink" events
so that if crash happens in the middle of truncate/unlink, we do not endup
with lost or half truncated files.
Andrew Morton [Thu, 7 Aug 2003 04:12:39 +0000 (21:12 -0700)]
[PATCH] dm: 64 bit ioctl fixes
From: Joe Thornber <thornber@sistina.com>
Update the ioctl32 handlers for the 64-bit architectures to recognize
the new Device-Mapper version 4 ioctls. The version 1 ioctls are still
there. If/When the version 1 ioctls are removed, these same files
will need to be updated again.
I have been unable to test this patch yet, since I have not had any
luck getting 2.6.0-test2 to compile on my ppc64 box (not a dm-related
problem). But the patch is pretty trivial, so I'm pretty confident it
will work. If anyone else can test this (on mips64, sparc64, parisc,
or x86-64), let me know if you have any problems. [Kevin Corry]
Andrew Morton [Thu, 7 Aug 2003 04:12:31 +0000 (21:12 -0700)]
[PATCH] dm: decimal device num sscanf
From: Joe Thornber <thornber@sistina.com>
The 2.4 version of Device-Mapper scans for device-numbers in decimal
instead of hex (in dm_get_device()). Update 2.6 so both versions use
the same behavior. [Kevin Corry]
Gerd Knorr [Thu, 7 Aug 2003 03:19:22 +0000 (20:19 -0700)]
[PATCH] v4l: bttv driver update
* the usual pile of tv card database updates.
* various signed/unsigned fixups (fix gcc 3.3 warnings)
and releated cleanups (use ARRAY_SIZE macro, ...).
* moved some code which can be shared with the new,
upcoming cx2388x driver to a separate module.
* split the irq handler into smaller functions.
* some new features (field rate capture support for example).
* simplified i2c code a bit by removing redundant
bookkeeping of attached i2c clients.
* merged i2c changes back into my tree, there are some no-op
changes due to this.
* various other bugfixes.
* fix build failure with CONFIG_FW_LOADER enabled
Gerd Knorr [Thu, 7 Aug 2003 03:19:14 +0000 (20:19 -0700)]
[PATCH] v4l: sysfs'ify videodev
This patch drops procfs code from videodev.c and adds sysfs support
instead. It adds a new class where all v4l devices are listed. It
also provides some new helper functions for v4l drivers.
[PATCH] fix CONFIG_IDEDISK_STROKE support in ide-disk.c
Original patch from Erik Andersen <andersen@codepoet.org>:
- fix CONFIG_IDEDISK_STROKE by adding proper detection of HPA feature set
and removing IDE_STROKE_LIMIT
- remove irrelevant idedisk_supports_host_protected_area()
- make the HPA detection actually display useful information
I've reworked it a bit:
- detect HPA before calculating drive's geometry
- move HPA detection outside init_idedisk_capacity()
to idedisk_check_hpa_lba28() and idedisk_check_hpa_lba48()
- use sectors_to_MB()
- respect 80-column limit
- no need to zero drive->capacity48 and drive->select.b.lba
- don't call idedisk_read_native_max_address_ext() twice
if drive uses LBA-48 and CONFIG_IDEDISK_STROKE is defined
- remove uneccessary setup of drive->capacity48/cyl/select.b.lba
if drive uses LBA-48, maximum virtual LBA address needs to be set
and CONFIG_IDEDISK_STROKE is defined
- set drive->cyl only once if drive uses LBA-48
- don't call idedisk_read_native_max_address() if drive uses LBA-48
and don't call it twice if CONFIG_IDEDISK_STROKE is defined
- don't check for Host Protected Area if drive uses CHS addressing
(such combination is not supported by a driver)
- remove duplicated code (at the end of the function) that is never executed
From Benjamin Herrenschmidt <benh@kernel.crashing.org>.
- avoid device list corruption and scheduling at interrupt time
(more work needed on proper locking)
- make sure "hold" flag and ide_dma_queued_* ops are properly
transferred from old to new interface
Jens Axboe [Thu, 7 Aug 2003 02:58:43 +0000 (19:58 -0700)]
[PATCH] scsi_ioctl reference counting
Now that we properly track queue references, that showed a bug in
scsi_ioctl.c, where it was dropping queues that it had never properly
gotten in the first place.
Petr Vandrovec [Wed, 6 Aug 2003 21:07:09 +0000 (23:07 +0200)]
Add support for panning at vertical blanking to the matroxfb. Now mplayer output
looks much better on primary output (secondary output is always synced with vbl).
Jens Axboe [Wed, 6 Aug 2003 17:35:12 +0000 (10:35 -0700)]
[PATCH] Proper block queue reference counting
To be able to properly be able to keep references to block queues,
we make blk_init_queue() return the queue that it initialized, and
let it be independently allocated and then cleaned up on the last
reference.
I have grepped high and low, and there really shouldn't be any broken
uses of blk_init_queue() in the kernel drivers left. The added bonus
being blk_init_queue() error checking is explicit now, most of the
drivers were broken in this regard (even IDE/SCSI).
No drivers have embedded request queue structures. Drivers that don't
use blk_init_queue() but blk_queue_make_request(), should allocate the
queue with blk_alloc_queue(gfp_mask). I've converted all of them to do
that, too. They can call blk_cleanup_queue() now too, using the define
blk_put_queue() is probably cleaner though.
Andrew Morton [Wed, 6 Aug 2003 15:57:31 +0000 (08:57 -0700)]
[PATCH] remove PF_READAHEAD
The problem with PF_READAHEAD is that if someone does a non-GFP_ATOMIC memory
allocation we can enter page reclaim and then call writepage, while
PF_READAHEAD is set. The block layer then drops writes or the wrong reads on
the floor. It can cause data loss.
A fix is complex (well, intrusive). Given that the readahead code is now
skipping the entire readahead attempt if the queue is congested, the setting
of PF_READAHEAD probably is not doing anything useful anyway, so simply
remove it.
Dave Jones [Wed, 6 Aug 2003 15:57:23 +0000 (08:57 -0700)]
[PATCH] Athlon Machine Check fix
There seemed to be increase in Athlon users reporting MCEs in 2.6 that
they never saw in 2.4 and I didn't buy the "2.6 pushes hardware harder"
for a second given folks are running 2.4+preempt+O(1) etc patchkits
without problems.
So I did a mini-audit of the mcheck code.
How embarressing. Another fix that went into 2.4 that never made
it forward. Once I'm done with various Red Hat administrivia
I'll see if I can devote some time to going through the changesets
mailing list. I wonder just how many other really stupid bugs
like this got fixed and not brought forward.
Russell King [Thu, 7 Aug 2003 01:14:38 +0000 (02:14 +0100)]
[PCMCIA] Report subsystem vendor/device IDs
In order to properly track down who needs to program the IRQ MUX
register, add the subsystem vendor and device IDs to the kernel
message indicating discovery of the cardbus bridge.
Russell King [Thu, 7 Aug 2003 01:00:41 +0000 (02:00 +0100)]
[PCMCIA] Disable IRQ steering and don't change the IRQ MUX register.
The IRQ steering code operates too early at present, and actually
prevents us detecting ISA interrupts.
We should not touch the IRQ MUX register on TI bridges - only the
machine itself knows the right value for this. The kernel doesn't
have the knowledge to know what function the cardbus controllers
multi-function pins have been assigned by the hardware manufacturer.
Russell King [Thu, 7 Aug 2003 00:53:14 +0000 (01:53 +0100)]
[PCMCIA] Fix cardbus init failure paths.
Currently, yenta does not try to clean up after an error occurs while
initialising a cardbus socket. This cset ensures that we release
resources. We also claim the cardbus MMIO memory resource.