Russell King [Wed, 29 Sep 2004 18:57:02 +0000 (19:57 +0100)]
[MMC] Use scatter-gather lists rather than walking the BIOs
Bartlomiej Zolnierkiewicz wanted to remove the "cbio" structure
from struct request. Unfortunately, MMC was using the same
"workaround" as IDE to walk the BIO list. With this change, we
stop using "cbio" and instead use proper scatter-gather lists.
Russell King [Wed, 29 Sep 2004 16:55:38 +0000 (17:55 +0100)]
[MMC] Make MMC card initialisation more reliable.
Pierre Ossman reported a problem where his cards do not correctly
initialise with the current MMC implementation. However, if we
tell the card to go back to the idle state between probing the
supply voltage and telling the card about the chosen voltage, his
cards work - and we don't seem to upset existing cards.
Nicolas Pitre [Thu, 30 Sep 2004 00:37:04 +0000 (01:37 +0100)]
[ARM PATCH] 2111/1: restrict scope of PXA2xx register definitions
Patch from Nicolas Pitre
It's a rather bad idea to have psa-regs.h included all the time.
It's rather large and likely to create namespace clashes, as well
as slowing down the build unnecessarily.
Better include it explicitly where it is actually needed.
Nicolas Pitre [Thu, 30 Sep 2004 00:25:38 +0000 (01:25 +0100)]
[ARM PATCH] 2109/1: fix PCMCIA on Mainstone/PXA270
Patch from Nicolas Pitre
Let's move GPIO setup into the board specific hw init functions.
The PXA2xx often has many different GPIOs that can be used for
a given alternate function and the good one to use is hardware
dependent. For example, Lubbock and Mainstone are not using all
the same GPIOs for PCMCIA signals.
Dave Jiang [Thu, 30 Sep 2004 00:15:24 +0000 (01:15 +0100)]
[ARM PATCH] 2105/1: Fix compilation error for IOP and remove unnecessary legacy code
Patch from Dave Jiang
Signed-off-by: Dave Jiang (dave.jiang@gmail.com)
Remove the code that jumps to physical offset in head-xscale.S for IOPs that was fixing a legacy redboot problem. The issue no longer exists it seems and it's breaking the compilation anyways. Removed.
Dave Jiang [Thu, 30 Sep 2004 00:10:41 +0000 (01:10 +0100)]
[ARM PATCH] 2100/1: Fix compilation error due to missing typedefs (u32) for XScale IOP platforms
Patch from Dave Jiang
This fixes compile error where u32 was not recognized by iop321.h and iop331.h. Started showing up in 2.6.9-rcX that wasn't there in 2.6.8.1.
Added include of <asm/types.h> to asm/arch/hardware.h where it would propogate to both headers.
Nicolas Pitre [Thu, 30 Sep 2004 00:05:37 +0000 (01:05 +0100)]
[ARM PATCH] 2097/2: more gcc-3.4.1 warning fixes
Patch from Nicolas Pitre
At least gcc-3.4.1 complains about puts() declaration conflicting
with its own idea of it. Our puts() declaration and implementation
isn't standard anyway, so let's rename it to putstr() like on x86.
David S. Miller [Wed, 29 Sep 2004 09:09:18 +0000 (02:09 -0700)]
[TCP]: Fix inaccuracies in tso_factor settings.
1) If tcp_{sendmsg,sendpage} tacks on more data to an
existing SKB, this can make tso_factor inaccurate.
Invalidate it, which forces it to be recalculated,
by simply setting it to zero.
2) __tcp_trim_head() changes skb->len thus we need
to recalculate tso_factor
3) BUG check that tcp_retrans_try_collapse() does not
try to collapse packets with non-1 tso_factor
4) The Solaris FIN workaround in tcp_retransmit_skb()
changes packet size, need to fixup tso_factor
Signed-off-by: David S. Miller <davem@davemloft.net>
Neil Brown [Wed, 29 Sep 2004 08:13:20 +0000 (01:13 -0700)]
[PATCH] Fix disconnected dentries on NFS exports
A disconnected dentry can hold an inode active after the last link has
been removed. The file will not then be truncated and removed until
memory pressure flushes the disconnected dentry from the dcache.
This problem can be resolved by making sure that an inode never has
both a connected and a disconnected dentry.
This is already the case for directories (as they must only have one
dentry), but it is not the case for non-directories.
This addresses it by:
- changes d_alloc_anon to make sure that a new disconnected dentry is
only allocated if there is currently no (hashed) dentry for the
inode. (Previously this would noramlly be true, but a race was
possible).
- changes d_splice_alias to re-use a disconnected dentry on
non-directories as well as directories.
- splits most of d_find_alias out into a separate function to make
the above easier.
Problem originally reported by Nikita Danilov.
Acked by Al Viro ("It looks sane"), and Jakob Oestergaard reports this
fixes his problems. Further pushed by Christoph Hellwig.
The current code allocating the DART has a couple of bugs, first
it's called on all machines including the ones who have no DART
(oops), and then it tries to access the device-tree using the
"of_chosen" pointer before it was initialized.
The enclosed patch fixes these.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Looks like we never needed them, since that bug has been there forever,
I didn't get the right base for the IO cycles on the G5 host bridge
in the first place (I probably misinterpreted some OF forth code or
something like that).
Alan Cox [Wed, 29 Sep 2004 07:05:39 +0000 (00:05 -0700)]
[PATCH] tty locking cleanup and fixes
No problems reported other than Linus typo in an unbuildable driver from
the last one.
This one adds tty_ldisc_flush and also makes tty_wakeup do the queue
wake as discussed with Paul. I've then propagated these functions
through all the drivers. This means most drivers don't know about the
ldisc locking and instead call generic functions that look after it.
The result is the removal of a lot of duplicate code both for ldisc
referencing and historical code for handling tty ldisc wakeup semantics.
A nice side effect is that by adding versions of the two helpers we can
switch most of the drivers over before changing the core tty code if
preferred.
Looks like there are some bugs that won't be fixed before 2.6.9 in the
scheduling domain code wrt HOTPLUG_CPU, so I'm disabling it in sn2_defconfig
(we don't support CPU hotplug just yet anyway).
Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Harald Welte [Tue, 28 Sep 2004 07:22:31 +0000 (00:22 -0700)]
[NET]: Generic network statistics
This patch moves the following files in /proc:
/proc/net/rt_cache_stat /proc/net/stat/rt_cache
/proc/net/ip_conntrack_stat /proc/net/stat/ip_conntrack
/proc/net/arp_cache_stat /proc/net/stat/arp_cache
/proc/net/clip_arp_cache_stat /proc/net/stat/clip_arp_cache
/proc/net/dn_neigh_cache_stat /proc/net/stat/dn_neigh_cache
This allows a generic statistics tool to scan for all available statistics
by doing readdir(2) on /proc/net/stat
It also adds a special first 'template' line to rt_cache and ip_conntrack
in order to facilitate compatibility once somebody adds new fields to the
output lines.
WARNING:
This breaks existing rtstat.c and ctstat.c userspace programs
(hopefully for the last time). rtstat is non-existant or broken in
major distributions anyway, and ctstat is too new for any distros
having it picked up. Therefore, we justify this breakage.
A new unified statistics tool for routing cache, connection tracking and
neighbour cache is under development and will be included with iproute2.
Signed-off-by: Harald Welte <laforge@gnumonks.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf [Tue, 28 Sep 2004 06:59:09 +0000 (23:59 -0700)]
[PKT_SCHED]: Report qdisc parent to userspace
Report parent classid of a qdisc back to userspace. Without this there
is no way for userspace to see if the qdisc is attached to a class
other than parsing all class trees of the link and check all tcm_info
fields in the leaf classes.
Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
I got this patch from Zou Nan hai to resolve the problem that
Andrew Morton has been having booting his ia64 system. The code
is quite a bit cleaner as he has reduced the number of different
definitions of pfn_valid/page_to_pfn/pfn_to_page, and left the
only remaining ones next to each other in page.h ... so this
should be easier to maintain going forward.
There's an issue with bio_uncopy_user() in that it expects ->bv_len to
be untouched from io submission to io completion, which it wont be for
some transfer lengths on some hardware. So we end up not copying all the
data back to user space, not so good. This patch adds a bio_map_data
local structure to track the io_vec.