Scott Feldman [Thu, 11 Sep 2003 11:11:32 +0000 (07:11 -0400)]
[e1000] Add PHY master/slave #define override
* Add PHY master/slave #define override to address link issues
with 82541/7 (rev2) against some low-end switches. Forcing
master will improve the time-to-link against these switches.
Scott Feldman [Thu, 11 Sep 2003 11:10:40 +0000 (07:10 -0400)]
[e1000] 82544 PCI-X hang fix + TSO updates
* Bug fix: 82544 hang with PCI-X: if outgoing Tx buffers terminate
within evenly-aligned dwords, and the device is sharing the bus
segment with another PCI-X device, 82544 can hang the bus on a
split-completion transaction. Fix is to split buffer into two
buffers with the first one not terminating within evenly-aligned
dword address, and the second one being 4-bytes, which goes as a
non-split-conpletion PCI-X transaction.
* 8254x controllers that support TSO do an internal calculation to
make sure there is enough FIFO space to handle the overhead
of each TSO segment before DMA'ing TSO data from host memory. The
internal calculation is dependent on the mss of the TSO (defines
the number of segments), but the reserved space is a constant, so
we need to adjust the maximum size of each buffer queued to the
hardware to hold the equation and not overrun the FIFO. This is
per TSO because the mss can change from one send to the next.
Scott Feldman [Thu, 11 Sep 2003 11:10:33 +0000 (07:10 -0400)]
[e1000] new 82541/5/6/7 hardware support
* Added 82545 (rev3), 82546 (rev3), and 82541/7 (rev2) support
- new device IDs
- internal SERDES support for 82545/6 (rev3)
- don't apply MMRBC workaround for 82545/6 (rev3)
- don't use IO mapping for reset for 82545/6 (rev3)
Nick Piggin [Thu, 11 Sep 2003 00:06:46 +0000 (17:06 -0700)]
[PATCH] Badness in as_completed_request warning
Thish fixes Suparna's fsx and aio-stress and Dave Olien's concurrent
mke2fs problems.
It moves the hash adding into as_add_request. This fixes a small bug
where a request could be added to the merge hash after being put on the
dispatch list.
It also moves responsibility for handling rbtree aliases (requests with
the same start sector) out of as_add_arq_rb and into its caller. This
cleans up a layering problem which was causing the state machine to go
silly. Now instead of forcing the alias out onto the dispatch list, we
chain the new request behind it, and they get sorted out at dispatch
time.
A colleague reported that the keyboard of his brandnew laptop
is dead under 2.6 while 2.4 works.
Now I once wrote
In order to avoid interference between scancode sequences
or mouse packets and the reponses given to commands,
the keyboard or mouse should always be disabled before
giving a command that requires a response, and probably
enabled afterwards. Some keyboards or mice do the disable
automatically in this situation, but still require an
explicit enable afterwards.
This is what happens on this laptop. The routine atkbd_probe()
probes for a keyboard, and after detecting it, enables it.
But immediately afterwards the routine atkbd_set_3() reads
the current scancode set and sets the desired set, and as a
side effect of these commands, the keyboard gets disabled again.
Thus, the keyboard enable must be moved after all command sending
has been done.
Now that I patch this area anyway: we are almost always in
scancode set 2 but send the ATKBD_CMD_SETALL_MB command
that only works in scancode set 3. At best this is useless.
At worst it confuses the keyboard. So, I put this command
in a separate routine and call that only when we really
are in scancode set 3.
Anton Blanchard [Wed, 10 Sep 2003 02:39:55 +0000 (19:39 -0700)]
[PATCH] Fix initramfs permissions on directories and special files
Set correct permissions on initramfs directories and special files. We dont
want to obey the umask here, so do the same thing we do on normal files -
call sys_chmod.
Rusty Russell [Wed, 10 Sep 2003 02:39:38 +0000 (19:39 -0700)]
[PATCH] Remove modules.txt
Thanks to Stephen Hemminger for pointing out how obsolete modules.txt is.
modules.txt contains mainly ancient information which is replicated
in the kconfig help message, README, makefile.txt or the modprobe manual
page. The only part which is not covered elsewhere is the "building
external modules" which is still being debated (and belongs under the
kbuild docs). kmod.txt reference removed from index, too.
Matthew Wilcox [Wed, 10 Sep 2003 02:28:40 +0000 (19:28 -0700)]
[PATCH] Fill in ELF OSABI in ELF headers
This fills in the ELF EI_OSABI field. This doesn't matter for most
architectures, but PA-RISC uses the Linux flavour of the ABI (since HPUX
uses the None flavour).
Andrew Morton [Tue, 9 Sep 2003 17:21:30 +0000 (10:21 -0700)]
[PATCH] Reduce random driver lock contention
From: Matt Mackall <mpm@selenic.com>
The new locking in the random driver is consuming 60% of CPU resources in
Anton's monster power5 boxes.
Basically, when the primary pool is 7/8th full, we shut off the firehose
and go into a trickle mode to keep the pool fresh. Saves CPU for everyone
and should make the contention drop off the charts too (though the trickle
factor might need adjusting again for Origin-class machines).
Andrew Morton [Tue, 9 Sep 2003 17:21:22 +0000 (10:21 -0700)]
[PATCH] fix Summit srat.h includes
From: Dave Hansen <haveblue@us.ibm.com>
I was compiling for my plain 'ol PC, and was getting unresolved symbols
for get_memcfg_from_srat() and get_zholes_size(). The CONFIG_NUMA
definition right now allows it to be turned on for plain old X86_PC.
Does anyone know why this is?
In any case, the summit code incorrectly assumes in at least 2 places
that NUMA && !NUMAQ means summit. Someone was evidently trying to cover
the generic subarch case, but that's already taken care of by the lovely
config system and CONFIG_ACPI_SRAT. This patch fixes those assumptions
and adds a nice little warning for people that try to #include srat.h
without having srat support turned on.
Andrew Morton [Tue, 9 Sep 2003 17:21:14 +0000 (10:21 -0700)]
[PATCH] mwave locking fixes
From: Manfred Spraul <manfred@colorfullife.com>
The mwave driver uses a user space daemon for some modem operations. The
user space daemon calls ioctl(,IOCTL_MW_GET_IPC), and the driver returns
after an interrupt arrived. The actual wait used
interruptible_sleep_on(), which can lead to lost wakeups. A local
spinlock on the stack is used to close that race, but this is broken on
SMP, perhaps even with preempt.
The attached patch fixes that by switching to the normal
add_wait_queue/test_if_race_occured/schedule/remove_wait_queue sequence.
Andrew Morton [Tue, 9 Sep 2003 17:21:06 +0000 (10:21 -0700)]
[PATCH] ext3: remove debug code
ext3 has fancy test harness code which allows you to simulate crashes (for
testing recovery). It will make the underlying disk start ignoring writes a
specified number of seconds after the mount.
It's inoperative without an additional offline patch anyway, and it's doing
hacky things which scared Al. So kill it; I'll maintain it in the separate
ext3 debug patch.
Andrew Morton [Tue, 9 Sep 2003 17:20:58 +0000 (10:20 -0700)]
[PATCH] tidy up lib/inflate.c error messages
From: Andre McCurdy <armcc2000@yahoo.com>
There is some inconsistency within lib/inflate.c and its users about
whether the error message text or the error() function should provide
the '\n'.
This patch tries to make everyone consistent - by removing the
newline from all message texts, and adding one to the only error()
function which did not provide it (in init/do_mounts_rd.c).
The remap_file_pages system call with MAP_NONBLOCK flag does not
install file-ptes when the required pages are not found in the
page cache. Modify the populate functions to install file-ptes
if the mapping is non-linear and the required pages are not found
in the page cache.
Patch is for test4-mm6. Compiles and boots. Patch tested using the
programs at:
Andrew Morton [Tue, 9 Sep 2003 17:20:16 +0000 (10:20 -0700)]
[PATCH] d_delete-d_lookup race fix
From: Maneesh Soni <maneesh@in.ibm.com>
d_delete() calls dentry_iput() after releasing the per dentry lock. This
can race with __d_lookup and lead to situation where we can make dentry
negative with ref count > 1. The following patch makes dentry_iput() to
hold per dentry lock till d_inode is NULL and dentry has been removed from
d_alias list.
Andrew Morton [Tue, 9 Sep 2003 17:19:37 +0000 (10:19 -0700)]
[PATCH] make selinux enable param config option, enabled by
From: James Morris <jmorris@redhat.com>
This patch against current bk makes the recently added SELinux boot
parameter feature a configurable option, and enables SELinux by default
when selected. These changes were made following feedback including
discussion on the SELinux list.
The rationale for the changes is to allow SELinux to be be configured and
enabled unconditionally. If the boot parameter option is selected, then
SELinux is now enabled unless selinux=0 is specified at the kernel command
line.
Andrew Morton [Tue, 9 Sep 2003 17:19:28 +0000 (10:19 -0700)]
[PATCH] Fix imm.c again
From: Adrian Bunk <bunk@fs.tum.de>
Earlier patch wasn't correct especially in the !CONFIG_SCSI_IZIP_EPP16
case, reading all uses of this array (IMM_MODE_STRING is used to print the
corresponding string in printks).
If I'm not misunderstanding it, CONFIG_SCSI_IZIP_EPP16 means "use 16bit
even when 32bit is requested".
Andrew Morton [Tue, 9 Sep 2003 17:19:11 +0000 (10:19 -0700)]
[PATCH] Move ikconfig to /proc/config.gz
From: "Randy.Dunlap" <randy.dunlap@verizon.net>
The SuSE kernels place their ikconfig info at /proc/config.gz: in a
different place, and compressed. We thought it was a good idea to do it
that way in 2.6 as well.
- gzip the /proc config file, put it in /proc/config.gz;
- Based on a SuSE patch by Oliver Xymoron <oxymoron@waste.org>, which was
derived from a patch by Nicholas Leon <nicholas@binary9.net>
- change /proc/ikconfig/built_with to /proc/config_build_info;
DESC
ikconfig cleanup
EDESC
From: Stephen Hemminger <shemminger@osdl.org>
Simplify and cleanup the code:
- use single interface to seq_file where possible
- don't need to do as much of the /proc interface, only read
- use copy_to_user to avoid char at a time copy
- remove unneccesary globals
- use const char[] rather than const char * where possible.
Didn't change the version since interface doesn't change.
Andrew Morton [Tue, 9 Sep 2003 17:19:03 +0000 (10:19 -0700)]
[PATCH] compiler warning fixes for DAC960 on alpha
From: Dave Olien <dmo@osdl.org>
This patch is forwarded from Jay Estabrook at HP. I've compiled the
patch on ia32 and ia64 machines and it's good. I also recreated
the patch so it would apply to mm5 without fuzzy offsets.
Here's Jay's summary of the patch:
Here's a very small set of patches against 2.6.0-test4 that help the
DAC960 driver compile cleaner (gets rid of warnings on Alpha) and help
it to work on some old OEM'ed DAC960 cards that were sold in our older
Alphas.
The warnings are all concerned with "conversions to different size
without cast", as pointers and longs are same size (8-bytes) but ints
are 4-bytes, on Alpha. I don't believe the change to (long) from (int)
will affect any 32-bit architectures, but those using LP64 like Alpha,
ie SPARC64 and prolly IA64, will have the warnings go away.
The change to make the oldest acceptable firmware version 2.70 instead
of 2.73 is made spcific to Alpha, since it is only those cards that
DEC OEM'ed from Mylex that would have such (as explained a bit better
in the patch itself).
Andrew Morton [Tue, 9 Sep 2003 17:18:56 +0000 (10:18 -0700)]
[PATCH] dac960 devfs_name initialisation fix
From: Andrey Borzenkov <arvidjaar@mail.ru>
DAC960.c does it incorrectly (at least in 2.6.0-test4). It will create
_directory_ /dev/rd/cNdM making it impossible to create compat block device
entry with the same name.
The right thing it to create separate directory for each controller/target as
in attached trivial patch (untested due to lack of hardware). You will need
devfsd support for this but then you will need it for cciss or cpqarray as
well and possibly for others. Which returns us to the problem of devfsd
maintenance ...
Andrew Morton [Tue, 9 Sep 2003 17:18:38 +0000 (10:18 -0700)]
[PATCH] Initialise devfs_name in various block drivers
From: Andrey Borzenkov <arvidjaar@mail.ru>
Various block drivers are currently devfs-unaware. Andrey's patch attempts
to give them reasonable representations in devfs.
"The attached patch suggests some possible names for non-floppy devices
based on reading driver source. I have to ask if these make sense. At
least for cciss Mandrake devfsd patch expects different names but it
seems to be mistake (it assumes single controller always)
"For floppy it is not as simple. Floppy cannot use genhd and must
create names manually; but I do not know what names are appropriate or
expected.
"For acsi the target/lun name may have problem of creating compat names
(if any) by devfsd.
"Please note that none of them created any devfs name under 2.4 as well.
So it is not a regression ..."
Dave Jones [Tue, 9 Sep 2003 22:44:43 +0000 (23:44 +0100)]
[CPUFREQ] add cpufreq_update_policy()
Add a new cpufreq_update_policy call:
Certain cpufreq policy notifers have different needs at different times.
Thus it needs to be possible to re-evaluate an already set cpufreq policy.
Note that the cpufreq policy should only be set by one person: the user.
Not any other in-kernel code [with one exception, of course: during
booting].
1. Microsoft Windows XP Document.
we can get the SMI interface values from ax=E980/int15 BIOS call.
2. Intel SpeedStep Applet Document.(from HP.com)
http://h18007.www1.hp.com/support/files/evonotebook/us/download/10631.html
" Adds code to request transition ownership when processing
the system critical resume message. When a critical hibernate occurs,
the Applet does not receive any system level notification. The change forces
the Applet to re-acquire transition ownership upon resume from a critical hibernate. "
This is informative. This saied that something 'ownership' call is needed on SMI
interface first.
3. Grover, Andrew's int 15h patch posted to cpufreq ml
Message-ID: <F760B14C9561B941B89469F59BA3A847E96E28@orsmsx401.jf.intel.com>
code which call BIOS to get SMI values. I included it.
4. Malik Martin's rev engineering results.
call is made with BX, CX, EDI register values.
and need signature 'ISG' when call.
find function values. bx=1(get) and bx=2(set)
5. Marc Lehmann's 'speedstep' utility,
sample of assembler code to call SMI.
6. My work.
find function to return max/min freq which system supportd. (bx=4)
more values are gotten, but I cannot understand...
find 'ownership' function value(bx=0, which is other than 1 2 4..).
ToDo(in pregress)
support governor "auto" and using smi_event call, imprement auto freqchange
feature.
test on 440BX/ZX platform.
Memo
module parameters are override result of an int 15h/eax=E890h call.
these parameter value are gotten from Windows XP registory."
Also includes some bugfixes, updates and workarounds from me.
NB: A lot of BIOS out there are buggy. You might want to try this driver
also with Intel's default values -- smi_cmd = 0x82 and smi_port = 0xb2
cpumask_up.h is broken. It tries to access the "mask" member although
that cpumask_t is an ulong on UP. This breaks archs which uses cpumask
functions even on UP such as s390.
Use different var-names if they are non-static,
configure 4BRI like BRI cards, fixed new /proc entries,
inline declarations for common helper functions.