linux-2.6
19 years ago[ALSA] Fix the default id of multiple cards
Takashi Iwai [Wed, 30 Mar 2005 12:40:25 +0000 (14:40 +0200)] 
[ALSA] Fix the default id of multiple cards

EMU10K1/EMU10K2 driver
Fixed the default id string in case identical multiple cards exist.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] Use old default id strings for compatibility
Takashi Iwai [Wed, 30 Mar 2005 12:22:25 +0000 (14:22 +0200)] 
[ALSA] Use old default id strings for compatibility

EMU10K1/EMU10K2 driver
Use expliciitly the old default id strings for backward compatibility.
This will make 'alsactl restore' working again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] some docs for the new emu10k1 multichannel functionality
Lee Revell [Wed, 30 Mar 2005 12:04:34 +0000 (14:04 +0200)] 
[ALSA] some docs for the new emu10k1 multichannel functionality

Documentation
Not complete, or even spell checked, but in case I don't get a chance to
work on it again before 1.0.9, here is what i have so far.  It should go
in alsa-kernel/Documentation/emu10k1-jack.txt.

Signed-off-by: Lee Revell <rlrevell@joe-job.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] clean up card features
Lee Revell [Wed, 30 Mar 2005 11:51:18 +0000 (13:51 +0200)] 
[ALSA] clean up card features

EMU10K1/EMU10K2 driver
This patch converts the emu10k1 driver to use the card capabilities
structure for some more things.

Not extensively tested but seems to work.

Signed-off-by: Lee Revell <rlrevell@joe-job.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] Fix memory leak
Takashi Iwai [Wed, 30 Mar 2005 11:49:06 +0000 (13:49 +0200)] 
[ALSA] Fix memory leak

ALSA sequencer
Fixed memory leak by the last change of stack reduction.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] Fix the detection of resolution of ac97 controls
Takashi Iwai [Tue, 29 Mar 2005 14:33:28 +0000 (16:33 +0200)] 
[ALSA] Fix the detection of resolution of ac97 controls

AC97 Codec
Fixed the detection of bit resolution of ac97 mixer controls.
This will fix the problem with TI ac97 codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] Added identification for the Audigy ES.
James Courtier-Dutton [Sun, 27 Mar 2005 13:00:54 +0000 (15:00 +0200)] 
[ALSA] Added identification for the Audigy ES.

EMU10K1/EMU10K2 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
19 years ago[ALSA] Add's identification of the SB Live! Platinum [CT4760P]
James Courtier-Dutton [Sat, 26 Mar 2005 21:10:36 +0000 (22:10 +0100)] 
[ALSA] Add's identification of the SB Live! Platinum [CT4760P]

EMU10K1/EMU10K2 driver

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
19 years ago[ALSA] Adds Capture to P16V chip.
James Courtier-Dutton [Sat, 26 Mar 2005 18:35:29 +0000 (19:35 +0100)] 
[ALSA] Adds Capture to P16V chip.

EMU10K1/EMU10K2 driver
One can select which capture source, but one cannot yet set volumes.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
19 years ago[ALSA] fix multi-channel for model==full
ChenLi Tien [Thu, 24 Mar 2005 19:47:35 +0000 (20:47 +0100)] 
[ALSA] fix multi-channel for model==full

HDA Codec driver
The patch_cm9880.c can't play side/C/B channels from front panel jacks.
I fixed it by adding select pin.

Signed-off-by: ChenLi Tien <cltien@cmedia.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] Skip ac97 SPDIF controls
Takashi Iwai [Thu, 24 Mar 2005 16:48:30 +0000 (17:48 +0100)] 
[ALSA] Skip ac97 SPDIF controls

CA0106 driver
Skip building ac97 SPDIF controls via AC97_SCAP_NO_SPDIF.
Clean up the code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] Show currectly selected widget in proc_read for hda driver
ChenLi Tien [Thu, 24 Mar 2005 11:02:54 +0000 (12:02 +0100)] 
[ALSA] Show currectly selected widget in proc_read for hda driver

HDA generic driver
During debugging for cm9880 multi-channel playback, I added the * after
the currently selected widget, mixer widget doesn't need this but other
3 widget types need it.

Signed-off-by: ChenLi Tien <cltien@cmedia.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years ago[ALSA] kill dead code
Adrian Bunk [Thu, 24 Mar 2005 11:01:15 +0000 (12:01 +0100)] 
[ALSA] kill dead code

ALSA<-OSS emulation
The Coverity checker found this obviously dead code.

I'm not sure which of the if (plugin == NULL) is correct - this patch
removes the one that couldn't be true.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 years agoAutomatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/hch/xfs-2.6
Linus Torvalds [Fri, 27 May 2005 16:26:10 +0000 (09:26 -0700)] 
Merge ... /pub/scm/linux/kernel/git/hch/xfs-2.6

19 years ago[PATCH] Note on ACPI build fix
Alexander Nyberg [Fri, 27 May 2005 10:48:50 +0000 (12:48 +0200)] 
[PATCH] Note on ACPI build fix

Even after the previous fix you can still set CONFIG_ACPI_BOOT
indirectly even without CONFIG_ACPI by choosing CONFIG_PCI and
CONFIG_PCI_MMCONFIG.

That doesn't build very well either.

This makes PCI_MMCONFIG depend on ACPI, fixing that hole.

[ I guess in theory Kconfig could follow the whole chain of dependencies
  for things that get selected, but that sounds insanely complicated, so
  we'll just fix up these things by hand.  --Linus ]

Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ACPI build fix
Len Brown [Fri, 27 May 2005 08:53:27 +0000 (04:53 -0400)] 
[PATCH] ACPI build fix

Fix 2.6.12 CONFIG_ACPI=n build regression.
CONFIG_ACPI_BOOT shall be set only if CONFIG_ACPI.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Fixup VIA IRQ quirk
Alexander Nyberg [Fri, 27 May 2005 10:27:05 +0000 (12:27 +0200)] 
[PATCH] Fixup VIA IRQ quirk

quirk_via_irqpic can't be __devinit for swsuspend

Signed-off-by: Alexander Nyberg <alexn@telia.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] VIA IRQ quirk
Len Brown [Fri, 27 May 2005 08:21:50 +0000 (04:21 -0400)] 
[PATCH] VIA IRQ quirk

Delete quirk_via_bridge(), restore quirk_via_irqpic() -- but now
improved to be invoked upon device ENABLE, and now only for VIA devices
-- not all devices behind VIA bridges.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] cpuset exit NULL dereference fix
Paul Jackson [Fri, 27 May 2005 09:02:43 +0000 (02:02 -0700)] 
[PATCH] cpuset exit NULL dereference fix

There is a race in the kernel cpuset code, between the code
to handle notify_on_release, and the code to remove a cpuset.
The notify_on_release code can end up trying to access a
cpuset that has been removed.  In the most common case, this
causes a NULL pointer dereference from the routine cpuset_path.
However all manner of bad things are possible, in theory at least.

The existing code decrements the cpuset use count, and if the
count goes to zero, processes the notify_on_release request,
if appropriate.  However, once the count goes to zero, unless we
are holding the global cpuset_sem semaphore, there is nothing to
stop another task from immediately removing the cpuset entirely,
and recycling its memory.

The obvious fix would be to always hold the cpuset_sem
semaphore while decrementing the use count and dealing with
notify_on_release.  However we don't want to force a global
semaphore into the mainline task exit path, as that might create
a scaling problem.

The actual fix is almost as easy - since this is only an issue
for cpusets using notify_on_release, which the top level big
cpusets don't normally need to use, only take the cpuset_sem
for cpusets using notify_on_release.

This code has been run for hours without a hiccup, while running
a cpuset create/destroy stress test that could crash the existing
kernel in seconds.  This patch applies to the current -linus
git kernel.

Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Simon Derr <simon.derr@bull.net>
Acked-by: Dinakar Guniguntala <dino@in.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] remove non-cleanroom pwc driver compression
Alan Cox [Fri, 27 May 2005 12:40:53 +0000 (13:40 +0100)] 
[PATCH] remove non-cleanroom pwc driver compression

The original pwc author raised some questions about the reverse
engineering of the decompressor algorithms used in the pwc driver.
Having done some detailed investigation it appears those concerns that
clean room policy was not followed are reasonable.  I've also had a
friendly discussion with Philips to ask their view on this.

This removes the problem items of code which reduces the pwc
functionality in the kernel a little but leaves all the framework for
setup that will be needed for decompressors in user space (where they
eventually belong).  This change set is designed to be the minimal risk
change set given that 2.6.12 is hopefully close to hand, with a view to
merging the much updated pwc code in 2.6.13 series kernels.

Someone else can then redo the decompressors properly (clean room) in
user space.

Note that while its easy to say that it should have been caught earlier,
but the violation was really only obvious to someone who had access to
both the proprietary source and the 'GPL' source.

19 years agoide-cd: revert DMA mask test change
Linus Torvalds [Fri, 27 May 2005 14:36:17 +0000 (07:36 -0700)] 
ide-cd: revert DMA mask test change

The change to require the DMA length to be only word-aligned was not
safe.

19 years ago[XFS] remove an over-zealous WARN_ON
Christoph Hellwig [Fri, 27 May 2005 08:17:08 +0000 (01:17 -0700)] 
[XFS] remove an over-zealous WARN_ON

19 years agoMerge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Christoph Hellwig [Fri, 27 May 2005 08:16:24 +0000 (01:16 -0700)] 
Merge ... /linux/kernel/git/torvalds/linux-2.6.git

19 years ago[PATCH] i386: fix prevent_tail_call
Roland McGrath [Thu, 26 May 2005 22:21:13 +0000 (15:21 -0700)] 
[PATCH] i386: fix prevent_tail_call

We fixed this bug before, but it didn't take.  It may have been the case
that the problem was first noticed to occur in a CONFIG_REGPARM compile.
But it's not regparm functions that need not to make tail calls, it's
asmlinkage functions called with a user pt_regs frame on the stack
supplying their arguments.  prevent_tail_call probably doesn't do anything
at all in regparm functions (your argument registers are going to be
clobbered, period).  It was a braino to conditionalize that definition in
the first place.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoAutomatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 26 May 2005 20:54:33 +0000 (13:54 -0700)] 
Merge ... /pub/scm/linux/kernel/git/davem/net-2.6

19 years ago[BNX2]: New Broadcom gigabit network driver.
Michael Chan [Thu, 26 May 2005 20:03:09 +0000 (13:03 -0700)] 
[BNX2]: New Broadcom gigabit network driver.

A new driver bnx2 for Broadcom bcm5706 is available.

The patch also includes new 1000BASE-X advertisement bit definitions in
mii.h

Thanks to David Miller and Jeff Garzik for reviewing and their valuable
feedback.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TOKENRING]: net/802/tr.c: s/struct rif_cache_s/struct rif_cache/
Alexey Dobriyan [Thu, 26 May 2005 19:59:42 +0000 (12:59 -0700)] 
[TOKENRING]: net/802/tr.c: s/struct rif_cache_s/struct rif_cache/

"_s" suffix is certainly of hungarian origin.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TOKENRING]: be'ify trh_hdr, trllc, rif_cache_s
Alexey Dobriyan [Thu, 26 May 2005 19:59:05 +0000 (12:59 -0700)] 
[TOKENRING]: be'ify trh_hdr, trllc, rif_cache_s

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoFrom: Kazunori Miyazawa <kazunori@miyazawa.org>
Hideaki YOSHIFUJI [Thu, 26 May 2005 19:58:04 +0000 (12:58 -0700)] 
From: Kazunori Miyazawa <kazunori@miyazawa.org>

[XFRM] Call dst_check() with appropriate cookie

This fixes infinite loop issue with IPv6 tunnel mode.

Signed-off-by: Kazunori Miyazawa <kazunori@miyazawa.org>
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[BONDING]: bonding using arp_ip_target may stay down with active path
Jay Vosburgh [Thu, 26 May 2005 19:56:59 +0000 (12:56 -0700)] 
[BONDING]: bonding using arp_ip_target may stay down with active path

Correcting the list traversal makes the problem go away.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PKT_SCHED] netem: allow random reordering (with fix)
Stephen Hemminger [Thu, 26 May 2005 19:55:48 +0000 (12:55 -0700)] 
[PKT_SCHED] netem: allow random reordering (with fix)

Here is a fixed up version of the reorder feature of netem.
It is the same as the earlier patch plus with the bugfix from Julio merged in.
Has expected backwards compatibility behaviour.

Go ahead and merge this one, the TCP strangeness I was seeing was due
to the reordering bug, and previous version of TSO patch.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PKT_SCHED] netem: use only inner qdisc -- no private skbuff queue
Stephen Hemminger [Thu, 26 May 2005 19:55:01 +0000 (12:55 -0700)] 
[PKT_SCHED] netem: use only inner qdisc -- no private skbuff queue

Netem works better if there if packets are just queued in the inner discipline
rather than having a separate delayed queue. Change to use the dequeue/requeue
to peek like TBF does.

By doing this potential qlen problems with the old method are avoided. The problems
happened when the netem_run that moved packets from the inner discipline to the nested
discipline failed (because inner queue was full). This happened in dequeue, so the
effective qlen of the netem would be decreased (because of the drop), but there was
no way to keep the outer qdisc (caller of netem dequeue) in sync.

The problem window is still there since this patch doesn't address the issue of
requeue failing in netem_dequeue, but that shouldn't happen since the sequence dequeue/requeue
should always work.  Long term correct fix is to implement qdisc->peek in all the qdisc's
to allow for this (needed by several other qdisc's as well).

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PKT_SCHED]: netem: reinsert for duplication
Stephen Hemminger [Thu, 26 May 2005 19:53:49 +0000 (12:53 -0700)] 
[PKT_SCHED]: netem: reinsert for duplication

Handle duplication of packets in netem by re-inserting at top of qdisc tree.
This avoid problems with qlen accounting with nested qdisc. This recursion
requires no additional locking but will potentially increase stack depth.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoAutomatic merge of 'for-linus' branch from
Linus Torvalds [Thu, 26 May 2005 17:27:39 +0000 (10:27 -0700)] 
Automatic merge of 'for-linus' branch from

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

19 years agoMerge of 'misc-fixes' branch from
Linus Torvalds [Thu, 26 May 2005 17:02:30 +0000 (10:02 -0700)] 
Merge of 'misc-fixes' branch from

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

19 years ago[PATCH] timeout at boottime with NEC3500A (and possibly others) when inserted a CD...
Marcello Maggioni [Thu, 26 May 2005 13:47:35 +0000 (15:47 +0200)] 
[PATCH] timeout at boottime with NEC3500A (and possibly others) when inserted a CD in it

From: Marcello Maggioni <hayarms@gmail.com>

Problem: Some drives (NEC 3500, TDK 1616N, Mad-dog MD-16XDVD9, RICOH
MP5163DA, Memorex DVD9 drive and IO-DATA's too for sure), if a
CD/DVD is inserted into the tray when the system is booted and if
before the OS bootup the BIOS checked for the presence of a bootable
CD/DVD into the drive, during the IDE probe phase the drive may
result busy and remain so for the next 25/30 seconds . This cause the
drive to be skipped during the booting phase and not begin usable
until the next reboot (if the reboot goes well and the drive doesn't
timeout again).

Solution: Rising the timeout time from 10 seconds to 35 seconds
(during these 35 seconds every drive should wake up for sure
according to the tests I've done).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
19 years ago[PATCH] ide-scsi: kmap scatter/gather before doing PIO
Stuart Hayes [Thu, 26 May 2005 13:38:45 +0000 (15:38 +0200)] 
[PATCH] ide-scsi: kmap scatter/gather before doing PIO

From: Stuart Hayes <Stuart_Hayes@dell.com>

The system can panic with a null pointer dereference using ide-scsi if
PIO is being done on scatter gather pages that are in high memory,
because page_address() returns 0.  We are actually seeing this using a
tape drive.  This patch will kmap_atomic() the pages before performing
PIO.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
19 years ago[PATCH] convert IDE device drivers to driver-model
Bartlomiej Zolnierkiewicz [Thu, 26 May 2005 12:55:34 +0000 (14:55 +0200)] 
[PATCH] convert IDE device drivers to driver-model

* add ide_bus_match() and export ide_bus_type
* split ide_remove_driver_from_hwgroup() out of ide_unregister()
* move device cleanup from ide_unregister() to drive_release_dev()
* convert ide_driver_t->name to driver->name
* convert ide_driver_t->{attach,cleanup} to driver->{probe,remove}
* remove ide_driver_t->busy as ide_bus_type->subsys.rwsem
  protects against concurrent ->{probe,remove} calls
* make ide_{un}register_driver() void as it cannot fail now
* use driver_{un}register() directly, remove ide_{un}register_driver()
* use device_register() instead of ata_attach(), remove ata_attach()
* add proc_print_driver() and ide_drivers_show(), remove ide_drivers_op
* fix ide_replace_subdriver() and move it to ide-proc.c
* remove ide_driver_t->drives, ide_drives and drives_lock
* remove ide_driver_t->drivers, drivers and drivers_lock
* remove ide_drive_t->driver and DRIVER() macro

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
19 years ago[PATCH] libata: Fix zero sg_dma_len() on 64-bit platform
Albert Lee [Thu, 26 May 2005 07:49:42 +0000 (03:49 -0400)] 
[PATCH] libata: Fix zero sg_dma_len() on 64-bit platform

When testing ATAPI PIO data transfer on the ppc64 platform,  __atapi_pio_bytes() got zero when
sg_dma_len() is used. I checked the <asm-ppc64/scatterlish.h>, the struct scatterlist is defined as:

struct scatterlist {
struct page *page;
unsigned int offset;
unsigned int length;

/* For TCE support */
u32 dma_address;
u32 dma_length;
};

#define sg_dma_address(sg) ((sg)->dma_address)
#define sg_dma_len(sg) ((sg)->dma_length)

So, if the scatterlist is not DMA mapped, sg_dma_len() will return zero on ppc64.
The same problem should occur on the x86-64 platform.
On the i386 platform, sg_dma_len() returns sg->length, that's why the problem does not occur on an i386.

Changes:
- Use sg->length if the scatterlist is not DMA mapped (yet).

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
19 years agoAutomatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 06:17:16 +0000 (02:17 -0400)] 
Merge ... /linux/kernel/git/torvalds/linux-2.6.git branch HEAD

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch tlan
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:11:38 +0000 (22:11 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch tlan

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch sis900
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:11:28 +0000 (22:11 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch sis900

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch veth
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:11:14 +0000 (22:11 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch veth

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch qeth
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:11:06 +0000 (22:11 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch qeth

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch ns83820
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:10:53 +0000 (22:10 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch ns83820

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch natsemi
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:10:38 +0000 (22:10 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch natsemi

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch forcedeth
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:10:25 +0000 (22:10 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch forcedeth

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch airo
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:09:52 +0000 (22:09 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch airo

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch atmel
<jgarzik@pretzel.yyz.us> [Thu, 26 May 2005 02:07:51 +0000 (22:07 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch atmel

19 years agoMerge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 26 May 2005 01:01:26 +0000 (18:01 -0700)] 
Merge ... /linux/kernel/git/davem/sparc-2.6

19 years agoMerge of 'new-ids' branch from
Linus Torvalds [Thu, 26 May 2005 00:56:57 +0000 (17:56 -0700)] 
Merge of 'new-ids' branch from

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

19 years ago[PATCH] sata_promise: add PCI ID for FastTrak TX2200 2-ports
Francisco Javier [Wed, 25 May 2005 23:29:37 +0000 (19:29 -0400)] 
[PATCH] sata_promise: add PCI ID for FastTrak TX2200 2-ports

19 years ago[PATCH] sata_sil: new ID 1002:437A for ATI IXP400
NAKAMURA Kenta [Wed, 25 May 2005 23:28:38 +0000 (19:28 -0400)] 
[PATCH] sata_sil: new ID 1002:437A for ATI IXP400

19 years ago[PATCH] therm_adt746x: show correct sensor locations
Colin Leroy [Wed, 25 May 2005 19:31:35 +0000 (12:31 -0700)] 
[PATCH] therm_adt746x: show correct sensor locations

This patch shows the correct locations of the heat sensors present in iBook
and PowerBooks G4, instead of displaying them as being on CPU and GPU
(which is not always the case).

Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Make sure therm_adt746x only handles known hardware
Colin Leroy [Wed, 25 May 2005 19:31:34 +0000 (12:31 -0700)] 
[PATCH] Make sure therm_adt746x only handles known hardware

This patch limits therm_adt746x to currently existing fan controllers in
Apple laptops.  It may avoid problems with future hardware.

Signed-off-by: Colin Leroy <colin@colino.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: fix endianness of path record MTU field
Roland Dreier [Wed, 25 May 2005 19:31:31 +0000 (12:31 -0700)] 
[PATCH] IB: fix endianness of path record MTU field

Make MTU field in SA PathRecord and MCMemberRecord a u8 rather than an enum
to avoid complications with endianness.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: fix potential ib_umad leak
Roland Dreier [Wed, 25 May 2005 19:31:30 +0000 (12:31 -0700)] 
[PATCH] IB: fix potential ib_umad leak

Free all unclaimed MAD receive buffers when userspace closes our file so we
don't leak memory.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] IB: allow NULL sa_query callbacks
Roland Dreier [Wed, 25 May 2005 19:31:29 +0000 (12:31 -0700)] 
[PATCH] IB: allow NULL sa_query callbacks

Check if a client passes a NULL callback into an SA query, and if so, never
call back.  This fixes an oops if someone unloads ib_ipoib and ib_sa in
rapid succession.  ib_ipoib does an MCMember delete with a NULL callback
and 0 timeout on unload, which is usually fine since the delete completes
successfully.  However, if ib_sa is unloaded immediately afterwards, the
delete will be canceled and ib_sa will try to call the (now already
unloaded) ib_ipoib module back with the cancel completion, which triggers
the oops.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] x86_64: CONFIG_BUG=n fixes
Alexander Nyberg [Wed, 25 May 2005 19:31:28 +0000 (12:31 -0700)] 
[PATCH] x86_64: CONFIG_BUG=n fixes

Fixes some !CONFIG_BUG warnings:
include/asm/mmu_context.h: I funktion `switch_mm':
include/asm/mmu_context.h:57: varning: implicit declaration of function `out_of_line_bug'

Signed-off-by: Alexander Nyberg <alexn@telia.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ipmi build fix
Neil Horman [Wed, 25 May 2005 19:31:27 +0000 (12:31 -0700)] 
[PATCH] ipmi build fix

It looks like the recent IPMI patches had some -mm-onlyisms.

Signed-off-by: Neil Horman <nhorman@redhat.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] v4l: bttv i2c oops fix
Gerd Knorr [Wed, 25 May 2005 19:31:26 +0000 (12:31 -0700)] 
[PATCH] v4l: bttv i2c oops fix

Don't try to access the i2c bus if the register wasn't successful.

Signed-off-by: Gerd Knorr <kraxel@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMerge of /home/davem/src/GIT/linux-2.6/.git/
David S. Miller [Wed, 25 May 2005 21:58:04 +0000 (14:58 -0700)] 
Merge of /home/davem/src/GIT/linux-2.6/.git/

19 years agoMerge of 'for-linus' branch from
Linus Torvalds [Wed, 25 May 2005 21:01:50 +0000 (14:01 -0700)] 
Merge of 'for-linus' branch from

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch amd8111
<jgarzik@pretzel.yyz.us> [Wed, 25 May 2005 17:57:36 +0000 (13:57 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch amd8111

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch pcnet32
<jgarzik@pretzel.yyz.us> [Wed, 25 May 2005 17:57:25 +0000 (13:57 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch pcnet32

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch ixgb
<jgarzik@pretzel.yyz.us> [Wed, 25 May 2005 17:57:15 +0000 (13:57 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch ixgb

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch e1000
<jgarzik@pretzel.yyz.us> [Wed, 25 May 2005 17:57:03 +0000 (13:57 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch e1000

19 years agoAutomatic merge of /spare/repo/netdev-2.6 branch e100
<jgarzik@pretzel.yyz.us> [Wed, 25 May 2005 17:56:55 +0000 (13:56 -0400)] 
Merge ... /spare/repo/netdev-2.6 branch e100

19 years agoMerge of /spare/repo/netdev-2.6 branch misc-fixes
<jgarzik@pretzel.yyz.us> [Wed, 25 May 2005 17:56:22 +0000 (13:56 -0400)] 
Merge of /spare/repo/netdev-2.6 branch misc-fixes

19 years ago[PATCH] relax ide-cd dma restrictions
Jens Axboe [Wed, 25 May 2005 15:00:15 +0000 (17:00 +0200)] 
[PATCH] relax ide-cd dma restrictions

This has been sitting for a while, and is causing lots of grief for
people burning CDs.  It relaxes the dma restriction for ide-cd,
requiring only the length to be 32-byte aligned, address should be fine
at normal double word alignment.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] Speedtouch resync after lost signal.
David Woodhouse [Wed, 25 May 2005 08:49:13 +0000 (09:49 +0100)] 
[PATCH] Speedtouch resync after lost signal.

There's a bigger Speedtouch update coming your way after 2.6.12 but in
the meantime, let's at least make it automatically resync if the DSL
signal is lost.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64 iSeries: fix boot time setting
Stephen Rothwell [Wed, 25 May 2005 06:29:26 +0000 (16:29 +1000)] 
[PATCH] ppc64 iSeries: fix boot time setting

For quite a while, there has existed a hypervisor bug on legacy iSeries
which means that we do not get the boot time set in the kernel.  This
patch works around that bug.  This was most noticable when the root
partition needed to be checked at every boot as the kernel thought it
was some time in 1905 until user mode reset the time correctly.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: fix initialisation of gettimeofday calculations
Stephen Rothwell [Wed, 25 May 2005 03:41:26 +0000 (13:41 +1000)] 
[PATCH] ppc64: fix initialisation of gettimeofday calculations

On PPC64, we keep track of when we need to update jiffies (and the
variables used to calculate the time of day) based on the time base.

If the time base frequence is sufficiently high compared to the
processor clock frequency, then it is possible for the time of day
variables to be corrupted at the time of the first decrementer interrupt
we take.  This became obvious on a legacy iSeries where the time base
frequency is the same as the processor clock.

This one line patch fixes the initialisation so that the time of day
variables and the indicator we use to tell when updates are due are
better synchronised.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoLinux 2.6.12-rc5 v2.6.12-rc5
Linus Torvalds [Wed, 25 May 2005 03:31:20 +0000 (20:31 -0700)] 
Linux 2.6.12-rc5

19 years ago[PATCH] aic7xxx_osm build fix
Andrew Morton [Wed, 25 May 2005 02:31:10 +0000 (19:31 -0700)] 
[PATCH] aic7xxx_osm build fix

Fix a c99ism.

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] saa6752hs build fix
Andrew Morton [Wed, 25 May 2005 02:31:10 +0000 (19:31 -0700)] 
[PATCH] saa6752hs build fix

For older gcc's.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] try_to_unmap_cluster() passes out-of-bounds pte to pte_unmap()
William Lee Irwin III [Wed, 25 May 2005 02:31:09 +0000 (19:31 -0700)] 
[PATCH] try_to_unmap_cluster() passes out-of-bounds pte to pte_unmap()

try_to_unmap_cluster() does:
        for (pte = pte_offset_map(pmd, address);
                        address < end; pte++, address += PAGE_SIZE) {
...
}

pte_unmap(pte);

It may take a little staring to notice, but pte can actually fall off the
end of the pte page in this iteration, which makes life difficult for
kmap_atomic() and the users not expecting it to BUG().  Of course, we're
somewhat lucky in that arithmetic elsewhere in the function guarantees that
at least one iteration is made, lest this force larger rearrangements to be
made.  This issue and patch also apply to non-mm mainline and with trivial
adjustments, at least two related kernels.

Discovered during internal testing at Oracle.

Signed-off-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] sigkill priority fix
Kirill Korotaev [Wed, 25 May 2005 02:29:47 +0000 (19:29 -0700)] 
[PATCH] sigkill priority fix

If SIGKILL does not have priority, we cannot instantly kill task before it
makes some unexpected job.  It can be critical, but we were unable to
reproduce this easily until Heiko Carstens <Heiko.Carstens@de.ibm.com>
reported this problem on LKML.

Signed-Off-By: Kirill Korotaev <dev@sw.ru>
Signed-Off-By: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] voyager_smp.c static inline fix
Dominik Hackl [Wed, 25 May 2005 02:29:46 +0000 (19:29 -0700)] 
[PATCH] voyager_smp.c static inline fix

This patch fixes a compile bug by moving a static inline function to the
right place.  The body of a static inline function has to be declared
before the use of this function.

Signed-off-by: Dominik Hackl <dominik@hackl.dhs.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years agoMerge of davem@nuts.davemloft.net:/disk1/GIT/sparc-2.6/.git/
David S. Miller [Wed, 25 May 2005 01:08:07 +0000 (18:08 -0700)] 
Merge ... davem@nuts.davemloft.net:/disk1/GIT/sparc-2.6/.git/

19 years ago[PATCH] Cleanup DEFINE_WAIT
blaisorblade@yahoo.it [Tue, 24 May 2005 23:31:42 +0000 (01:31 +0200)] 
[PATCH] Cleanup DEFINE_WAIT

Use LIST_HEAD_INIT rather than doing it by hand in DEFINE_WAIT.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] tulip: add return to ULI526X clause in tulip_mdio_write
John W. Linville [Wed, 18 May 2005 17:41:33 +0000 (13:41 -0400)] 
[PATCH] tulip: add return to ULI526X clause in tulip_mdio_write

The 'if' clause for ULI526X in tulip_mdio_write allows for
spin_unlock_irqrestore to be called twice for tp->mii_lock.  I believe
this is caused by the unintentional omission of a return at the end
of that clause.  This patch adds that return.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
19 years ago[PATCH] driver core: restore event order for device_add()
Kay Sievers [Mon, 23 May 2005 22:50:26 +0000 (15:50 -0700)] 
[PATCH] driver core: restore event order for device_add()

As a result of the split of the kobject-registration and the
corresponding hotplug event, the order of events for device_add() has
changed. This restores the old order, cause it confused some userspace
applications.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[SPARC64]: Add boot option to force UltraSPARC-III P-Cache on.
David S. Miller [Mon, 23 May 2005 22:52:08 +0000 (15:52 -0700)] 
[SPARC64]: Add boot option to force UltraSPARC-III P-Cache on.

Older UltraSPARC-III chips have a P-Cache bug that makes us disable it
by default at boot time.

However, this does hurt performance substantially, particularly with
memcpy(), and the bug is _incredibly_ obscure.  I have never seen it
triggered in practice, ever.

So provide a "-P" boot option that forces the P-Cache on.  It taints
the kernel, so if it does trigger and cause some data corruption or
OOPS, we will find out in the logs that this option was on when it
happened.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years agoMerge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git/
Linus Torvalds [Mon, 23 May 2005 21:57:14 +0000 (14:57 -0700)] 
Merge ... /linux/kernel/git/davem/net-2.6.git/

19 years ago[TG3]: Update driver version.
David S. Miller [Mon, 23 May 2005 21:00:44 +0000 (14:00 -0700)] 
[TG3]: Update driver version.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Increase TEST_BUFFER_SIZE to 8K.
David S. Miller [Mon, 23 May 2005 20:59:47 +0000 (13:59 -0700)] 
[TG3]: Increase TEST_BUFFER_SIZE to 8K.

This makes the DMA bug workaround test more likely
to find the problem on some systems.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Update driver version and reldate.
David S. Miller [Mon, 23 May 2005 20:13:15 +0000 (13:13 -0700)] 
[TG3]: Update driver version and reldate.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[IPV6]: Fix xfrm tunnel oops with large packets
Herbert Xu [Mon, 23 May 2005 20:11:07 +0000 (13:11 -0700)] 
[IPV6]: Fix xfrm tunnel oops with large packets

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: netdevice.h: be'ify packet_type
Alexey Dobriyan [Mon, 23 May 2005 20:09:19 +0000 (13:09 -0700)] 
[NET]: netdevice.h: be'ify packet_type

Everybody does

struct packet_type foo_packet_type = {
.type = __constant_htons(ETH_P_FOO);
};

5 introduced warnings will be properly fixed later.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TG3]: Add 5752M device ID.
Xose Vazquez Perez [Mon, 23 May 2005 19:54:51 +0000 (12:54 -0700)] 
[TG3]: Add 5752M device ID.

Add 0x1601 as 5752M, it's a 5752 but for mobile PCs.
Stolen from Broadcom bcm5700-8.1.55 driver.

Someone forgot to add it to tg3 ;-)

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[NET]: include/linux/if_tr.h clean-up
Jon Mason [Mon, 23 May 2005 19:53:14 +0000 (12:53 -0700)] 
[NET]: include/linux/if_tr.h clean-up

I removed the ethernet definitions (which were commented out) and
cleaned up the tabs.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
19 years ago[NET]: Kill stray reference to sock->passcred.
David S. Miller [Mon, 23 May 2005 19:45:26 +0000 (12:45 -0700)] 
[NET]: Kill stray reference to sock->passcred.

That struct member was deleted, but a comment
was not updated to reflect this.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[CRYPTO]: Only reschedule if !in_atomic()
Herbert Xu [Mon, 23 May 2005 19:36:25 +0000 (12:36 -0700)] 
[CRYPTO]: Only reschedule if !in_atomic()

The netlink gfp_any() problem made me double-check the uses of in_softirq()
in crypto/*.  It seems to me that we should be checking in_atomic() instead
of in_softirq() in crypto_yield.  Otherwise people calling the crypto ops
with spin locks held or preemption disabled will get burnt, right?

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[TCP]: Fix stretch ACK performance killer when doing ucopy.
David S. Miller [Mon, 23 May 2005 19:03:06 +0000 (12:03 -0700)] 
[TCP]: Fix stretch ACK performance killer when doing ucopy.

When we are doing ucopy, we try to defer the ACK generation to
cleanup_rbuf().  This works most of the time very well, but if the
ucopy prequeue is large, this ACKing behavior kills performance.

With TSO, it is possible to fill the prequeue so large that by the
time the ACK is sent and gets back to the sender, most of the window
has emptied of data and performance suffers significantly.

This behavior does help in some cases, so we should think about
re-enabling this trick in the future, using some kind of limit in
order to avoid the bug case.

Signed-off-by: David S. Miller <davem@davemloft.net>
19 years ago[PATCH] ppc64: Fix g5 hw timebase sync
Benjamin Herrenschmidt [Mon, 23 May 2005 06:54:14 +0000 (16:54 +1000)] 
[PATCH] ppc64: Fix g5 hw timebase sync

The hardware sync of the timebase on SMP G5s uses a black magic
incantation to the i2c clock chip that was inspired from what Darwin
does.

However, this was an earlier version of Darwin that was ...  buggy !
heh.  This causes the latest models to break though when starting SMP,
so it's worth fixing.

Here's a new version of the incantation based on careful transcription
of the said incantations as found in the latest version of apple's
temple.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc32: Fix an off-by-one error in ipic_init
Kumar Gala [Mon, 23 May 2005 17:29:56 +0000 (12:29 -0500)] 
[PATCH] ppc32: Fix an off-by-one error in ipic_init

There is an off-by-one error in the IPIC code that configures the
external interrupts (Edge or Level Sensitive).

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] ppc64: Fix booting on latest G5 models
Benjamin Herrenschmidt [Mon, 23 May 2005 00:03:52 +0000 (10:03 +1000)] 
[PATCH] ppc64: Fix booting on latest G5 models

The latest speedbumped Apple G5 models have a "bug" in the Open Firmware
device tree that lacks the proper interrupt routing information for the
northbridge i2c controller.  Apple's driver silently falls back into a
sub-optimal "polled" mode (heh, maybe they didn't even notice the bug
because of that :), our driver didn't properly check and crashes :(

This patch fixes our driver to not crash, and adds code to the
prom_init() OF trampoline code that detects the "bug" and adds the
missing information back for this chipset revision.  This fixes booting
and thermal control on these models.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] fix for __generic_file_aio_read() to return 0 on EOF
Suparna Bhattacharya [Sat, 21 May 2005 23:33:36 +0000 (16:33 -0700)] 
[PATCH] fix for __generic_file_aio_read() to return 0 on EOF

I came across the following problem while running ltp-aiodio testcases from
ltp-full-20050405 on linux-2.6.12-rc3-mm3.  I tried running the tests with
EXT3 as well as JFS filesystems.

One or two fsx-linux testcases were hung after some time.  These testcases
were hanging at wait_for_all_aios().

Debugging shows that there were some iocbs which were not getting completed
eventhough the last retry for those returned -EIOCBQUEUED.  Also all such
pending iocbs represented READ operation.

Further debugging revealed that all such iocbs hit EOF in the DIO layer.
To be more precise, the "pos" from which they were trying to read was
greater than the "size" of the file.  So the generic_file_direct_IO
returned 0.

This happens rarely as there is already a check in
__generic_file_aio_read(), for whether "pos" < "size" before calling direct
IO routine.

>size = i_size_read(inode);
>if (pos < size) {
>   retval = generic_file_direct_IO(READ, iocb,
>                               iov, pos, nr_segs);

But for READ, we are taking the inode->i_sem only in the DIO layer.  So it
is possible that some other process can change the size of the file before
we take the i_sem.  In such a case ( when "pos" > "size"), the
__generic_file_aio_read() would return -EIOCBQUEUED even though there were
no I/O requests submitted by the DIO layer.  This would cause the AIO layer
to expect aio_complete() for THE iocb, which doesnot happen.  And thus the
test hangs forever, waiting for an I/O completion, where there are no
requests submitted at all.

The following patch makes __generic_file_aio_read() return 0 (instead of
returning -EIOCBQUEUED), on getting 0 from generic_file_direct_IO(), so
that the AIO layer does the aio_complete().

Testing:

I have tested the patch on a SMP machine(with 2 Pentium 4 (HT)) running
linux-2.6.12-rc3-mm3.  I ran the ltp-aiodio testcases and none of the
fsx-linux tests hung.  Also the aio-stress tests ran without any problem.

Signed-off-by: Suzuki K P <suzuki@in.ibm.com>
Signed-off-by: Suparna Bhattacharya <suparna@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19 years ago[PATCH] reiserfs: max_key fix
Vladimir Saveliev [Sat, 21 May 2005 23:33:34 +0000 (16:33 -0700)] 
[PATCH] reiserfs: max_key fix

This patch fixes a bug introduced by Al Viro's patch: [patch 136/174]
reiserfs endianness: clone struct reiserfs_key

The problem is MAX_KEY and MAX_IN_CORE_KEY defined in this patch do not
look equal from reiserfs comp_key's point of view.  This caused reiserfs'
sanity check to complain.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>