Dave Jones [Thu, 27 Feb 2003 00:44:37 +0000 (16:44 -0800)]
[PATCH] VIA Nehemiah cache workaround.
It turns out that this bug is only on the pre-production models,
but as a few of them have 'escaped' the labs to the hands of
a few lucky developers, we still need it.
Kevin Corry [Wed, 26 Feb 2003 23:15:16 +0000 (15:15 -0800)]
[PATCH] dm: prevent possible buffer overflow in ioctl interface
Use the correct size for "name" in register_with_devfs().
During Al Viro's devfs cleanup a few versions ago, this function was
rewritten, and the "name" string added. The 32-byte size is not large
enough to prevent a possible buffer overflow in the sprintf() call,
since the hash cell can have a name up to 128 characters.
Joe Thornber [Wed, 26 Feb 2003 23:12:04 +0000 (15:12 -0800)]
[PATCH] dm: __LOW macro fix no. 2
Another fix for the __LOW macro.
When dm_table and dm_target structures are initialized, the "limits" fields
(struct io_restrictions) are initialized to zero (e.g. in dm_table_add_target()
in dm-table.c). However, zero is not a useable value in these fields. The
request queue will never let an I/O through, regardless of how small it might
be, if max_sectors is set to zero (see generic_make_request in ll_rw_blk.c).
This change to the __LOW() macro sets these fields correctly when they are
first initialized. [Kevin Corry]
Mike Anderson [Wed, 26 Feb 2003 15:41:20 +0000 (10:41 -0500)]
[PATCH] scsi_set_device_offline lock fix
Patrick pointed out that I could get into a ABBA issue with holding
list_lock while calling scsi_eh_scmd_add which takes host_lock.
A call to scsi_prep_fn already holds the queue_lock and then makes a
call to scsi_get_command which takes list_lock.
[PATCH] update nsp_cs to use scsi_add_host / scsi_remove_host
On Wed, Feb 26, 2003 at 08:20:05PM +0100, Christoph Hellwig wrote:
> This patch updates nsp_cs to use scsi_add_host / scsi_remove_host when
> compiledfor Linux 2.5 which allows to get rid of the scsi host list
> walks and is a preparation for allowing to support multiple cards of
> this type.
Sorry, I sent you the wrong paetch, here's the right one:
1) apic_write_around(APIC_ID, boot_cpu_physical_apicid) places the APIC
value in the lower 8 bits of APIC_ID, when it should be in the upper 8. As
as result, it effectively forces the APIC id to always be 0 for the boot
CPU, which is fatal on SMP AMD boxes.
Fix: don't do the write at all. The APIC_ID value should be right already.
2) phys_cpu_present_map = 1 means we always set bit 0, but later on
in setup_local_APIC() we do
if (!clustered_apic_mode &&
!test_bit(GET_APIC_ID(apic_read(APIC_ID)), &phys_cpu_present_map))
BUG();
and the bug is triggered if the APIC_ID is not zero.
Jean Tourrilhes [Tue, 25 Feb 2003 16:56:31 +0000 (11:56 -0500)]
[wireless] cleanup after recent shuffle
In kernel 2.5.63, you have moved more wireless LAN drivers
into ../drivers/net/wireless/. Unfortunately, there was a bit more to
cleanup as the result of this work.
You will need to :
o Apply the attached patch
o rm /drivers/net/pcmcia/aironet4500_cs.c
Have fun...
Jean
P.S. : You will notice that I took the liberty to organise the config
option in what I hope is a more logical order.
Jeff Garzik [Tue, 25 Feb 2003 16:52:41 +0000 (11:52 -0500)]
[netdrvr tg3] fix TX race in previous code, and another buglet
* call netif_tx_disable after netif_poll_disable, fixing TX race,
in tg3_netif_stop
* follow the ordering of the tg3_netif_stop change, and enable
poll after waking TX, in tg3_netif_start
* after doing those two steps in tg3_netif_start, check for work
using new helper function tg3_cond_int
* add helper function tg3_cond_int, which delivers an interrupt
if and only if the status block was updated (i.e. if work
is likely to be available)
Jeff Garzik [Tue, 25 Feb 2003 16:50:17 +0000 (11:50 -0500)]
[netdrvr tg3] fix NAPI deadlock
* do not hold driver spinlock during RX processing in tg3_poll
(this is the deadlock fix)
* create netif_poll_{en,dis}able to synchronize against dev->poll()
* create __netif_rx_complete to avoid a third irq-save in tg3_poll
* create tg3_netif_{start,stop} as driver-specific helper functions
which disable and enable NAPI polling and TX queueing. Note that
the TX queueing enable/disable is purely advisory, and is not
intended to prevent any races.
* remove tg3_halt call from tg3_set_power_state, as all callers
have already called tg3_halt, making it redundant. Removing this
function call also eliminates some locking complications.
* use new helper __netif_rx_complete in tg3_poll
* create tg3_reset_task, as a function that runs in process context
which resets the NIC. This is needed because tg3_netif_stop()
calls schedule() in the process of disabling dev->poll.
* schedule tg3_reset_task from tg3_tx_timeout
* schedule tg3_reset_task from tg3_timer
* wrap several tg3_halt...tg3_init_hw sequences with
tg3_netif_stop...tg3_netif_start. In addition to synchronizing
with dev->poll, this additionally fixes bugs where we were not
calling netif_wake_queue, when we should have been.
* move netif_start_queue call to very bottom of tg3_open
* add missing tg3_netif_{start,stop} to tg3_{suspend,resume},
further fixing obvious bugs.
Steven Cole [Tue, 25 Feb 2003 10:49:45 +0000 (02:49 -0800)]
[PATCH] replace its with it's where appropriate.
This patch replaces its (possessive of it) with it's (it is)
in the following cases where "it is" is meant.
its a -> it's a
its an -> it's an
its not -> it's not
except for the files
arch/cris/boot/rescue/head.S
arch/cris/kernel/kgdb.c
where the substitution is "its not" -> "it is not"
to avoid possible problems with single quotes in assembly comments.
Rusty Russell [Tue, 25 Feb 2003 10:26:27 +0000 (02:26 -0800)]
[PATCH] Modules code tidy up
Now that we search for 11 different sections by name, the if/else was
getting unwieldy. Also, handle_section just does relocs, so it's a bit
of a misnomer, and it's best simply moved into the main code.
This open-codes handle_section, which simply does relocations now.
Also adds "find_sec" and uses it to find the various sections.
Rusty Russell [Tue, 25 Feb 2003 10:26:20 +0000 (02:26 -0800)]
[PATCH] Modules race fix
Bob Miller points out that the try_module_get in use_module() can, of
course, fail. Secondly, there is a race between setting the module
live, and a simultaneous removal of it.
Greg Ungerer [Tue, 25 Feb 2003 10:26:11 +0000 (02:26 -0800)]
[PATCH] include unistd.h in m68knommu entry.S
This includes asm/unistd.h in the vector handling code for m68knommu.
It needs the local NR_syscalls define. linux/unistd.h is not assembler
clean, so it must be asm/unistd.h.
Greg Ungerer [Tue, 25 Feb 2003 10:25:35 +0000 (02:25 -0800)]
[PATCH] define struct for m68knommu/ColdFire timer registers
This creates a sturcture to mirror the m68knommu/ColdFire CPU timer
hardware. This is a much cleaner approach to accessing the timer
registers than the previous set of register address defines.
Greg Ungerer [Tue, 25 Feb 2003 10:25:16 +0000 (02:25 -0800)]
[PATCH] include unistd.h in m68knommu syscalltable.S
This includes asm/unistd.h in the system call table setup code for
m68knommu. It needs the local NR_syscalls define. linux/unistd.h is
not assembler clean, so it must be asm/unistd.h.