Dave Jones [Thu, 4 Sep 2003 04:02:49 +0000 (05:02 +0100)]
[CPUFREQ] Remove the voltage scaling from longhaul driver.
The 'match voltage to frequency' routine is complete crap and needs
rewriting. (It also only works for a single stepping of C3)
I'll redo it when I find the specs again.
In the meantime, it doesn't work properly, so kill it.
Dave Jones [Thu, 4 Sep 2003 03:51:33 +0000 (04:51 +0100)]
[CPUFREQ] Inform user of status of Ezra-T/Nehemiah longhaul support.
These are currently unsupported, and I get quite a lot of mails
asking about it. Hopefully this will be a little more informative
than 'unknown CPU'.
Dave Jones [Thu, 4 Sep 2003 03:23:31 +0000 (04:23 +0100)]
[CPUFREQ] Fix longhaul's mult,fsb -> MHz conversions.
this was wrong in several places by a factor of 100.
Introduce a calc_speed helper to make this harder to get wrong.
Additionally, clean up some printk's to print out useful values
like MinMult=3.5x instead of MinMult(x10)=35.
Dave Jones [Wed, 3 Sep 2003 01:57:16 +0000 (02:57 +0100)]
[CPUFREQ] Add the "performance" and "powersave" governors as modules.
Also add a config option so that the default governor [which is loaded
and enabled at boot] is started. Note that if you select "performance"
here, the CPU will be set to the highest possible frequency even if
the CPU was booted at a lower frequency. If you select "userspace",
the frequency will stay the same.
Dave Jones [Wed, 3 Sep 2003 01:50:10 +0000 (02:50 +0100)]
[CPUFREQ] Completely separate governors from policies.
Governors are for CPUfreq drivers which have a ->target callback,
Policies are for CPUfreq drivers which have a ->setpolicy callback.
Also, the "hardwired" governors "powersave" and "performance" are removed.
From Andries Brouwer <aebr@win.tue.nl>: we discard the double
release keypress, but we did it without clearing the "last byte
was E0" flag. So the next byte in the input stream would get
corrupted.
Adrian Bunk [Tue, 2 Sep 2003 02:22:52 +0000 (19:22 -0700)]
[PATCH] Mark more drivers BROKEN{,ON_SMP}
- let more drivers that don't compile depend on BROKEN
- MTD_BLKMTD is fixed, remove the dependency on BROKEN
- let all drivers that don't compile on SMP (due to cli/sti usage)
depend on a BROKEN_ON_SMP that is only defined if !SMP || BROKEN
- #include interrupt.h for dummy cli/sti/... in two files to fix the
UP compilation of these files
I marked only drivers that are broken for a long time and where I don't
know about existing fixes with BROKEN or BROKEN_ON_SMP.
[PATCH] ide: fix ide_unregister() vs. driver model
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This patch seem to have been lost, so here it is again. It fixes an Ooops
on unregistering hwifs due to the device model now having mandatory
release() functions. It also close the possible race we had on release if
the entry was in use (by or /sys typically) by using a semaphore waiting
for the release() to be called after doing an unregister.
As far as I verified this also fixes a bug when doing the
table lookup for IMM_EPP_32, that would result in "Unknown"
as IMM_EPP_32 is equal to 6 and there is the #ifdef...
ChangeSet@1.1386, 2003-09-02 00:11:07-03:00, acme@allegro.kerneljanitors.org
o scsi/*.h: remove not needed #define NULL
ChangeSet@1.1385, 2003-09-02 00:05:16-03:00, acme@allegro.kerneljanitors.org
o scsi/3w-xxx.h: use c99 style init
Rusty Russell [Mon, 1 Sep 2003 21:38:35 +0000 (14:38 -0700)]
[NET]: Use MODULE_ALIAS() in network families.
Previously, default aliases were hardwired into modutils. Now they
should be inside the modules, using MODULE_ALIAS() (they will be overridden
by any user alias).
Be a lot more careful about TS_USEDFPU and preemption
We had some races where we testecd (or set) TS_USEDFPU together
with sequences that depended on the setting (like clearing or
setting the TS flag in %cr0) and we could be preempted in between,
which screws up the FPU state, since preemption will itself change
USEDFPU and the TS flag.
This makes it a lot more explicit: the "internal" low-level FPU
functions ("__xxxx_fpu()") all require preemption to be disabled,
and the exported "real" functions will make sure that is the case.
One case - in __switch_to() - was switched to the non-preempt-safe
internal version, since the scheduler itself has already disabled
preemption.
From Tejun's posting:
>
> This patch fixes a race between del_timer_sync and recursive timers.
> Current implementation allows the value of timer->base that is used
> for timer_pending test to be fetched before finishing running_timer
> test, so it's possible for a recursive time to be pending after
> del_timer_sync. Adding smp_rmb before timer_pending removes the race.
Ben Collins [Mon, 1 Sep 2003 13:16:27 +0000 (06:16 -0700)]
[PATCH] Update IEEE1394 (r1047)
subsys : - Added hpsb_make_streampacket() helper
- Fix re-probe of bus after reset, when node's generation
changes
- Missing spinlock.h include for csr.c
general : - Fix a few warnings from size mismatches in printk's
raw1394 : - Added RAW1394_REQ_ASYNC_STREAM
- Use vmalloc/vfree for larger buffer support
ohci1394 : - Fix a few endianess bugs in ISO routines
Matthew Dharm [Mon, 1 Sep 2003 10:37:10 +0000 (03:37 -0700)]
[PATCH] sr.c should issue TEST_UNIT_READY
The linux/drivers/scsi/sr.c code will issue a MODE_SENSE[_10] command to
a device as the first command sent to the device. If the device has
just come out of reset, it will likely respond with a UNIT_ATTENTION /
NOT_READY status, which causes the MODE_SENSE to fail. In fact, the
device may have several UNIT_ATTENTION conditions queued up (power-up
reset, media change, etc.)
This results in the mode page 0x2a data not being properly read and
interpreted. As an end-effect, things like packet-writing don't work
(because the writeable bit is not set).
The solution to this is to issue one or more TEST_UNIT_READY commands to
the device to clear any pending UNIT_ATTENTION conditions. This is the
technique used by sd.c -- in fact, this code was lifted directly from
sd.c
At some point in the future, abstraction of this initial TEST_UNIT_READY
code between all high-level SCSI drivers may be apropriate. For now,
this patch makes sr.c issue TEST_UNIT_READY to clear the UNIT_ATTENTION,
thus allowing the mode page 0x2a code to work properly. Given the
approaching 2.6.0-final release, I urge that this patch be accepted.
Don't claim exclusive ownership of the device when doing
the SG_IO and SCSI_IOCTL_SEND_COMMAND ioctl's. That just
screws things up when the drive is mounted.
If somebody wants exclusive access, he should indicate that
at open time.
I've been trying to remove these, but apparently new ones crop up. Lets
just call it io scheduler, none of the ones in the kernel are using the
classic elevator algorithm.
Jeff Garzik [Mon, 1 Sep 2003 07:31:03 +0000 (03:31 -0400)]
[tokenring lanstreamer] clean up MWI / PCI_CACHE_LINE_SIZE usage
* remove PCI_CACHE_LINE_SIZE workaround, PCI core already does
this for us. (main change)
* propagate pci_set_dma_mask return value
* add 'ULL' suffix to pci_set_dma_mask arg
* propagate pci_enable_device return value
* call pci_set_mwi, check and propagate its return value
* call pci_clear_mwi and pci_disable_device on close, and probe error
* call iounmap when cleaning up
This adds support for software controlled hard drive LED activity.
This is really nice on such machines as Apple Powerbooks, where there is
no such LED in the first place and the sleep/suspend LED isn't used for
anything when the machine is running.
[IPV6]: Fix timer handling in ip6_flowlabel.c
- Use time_{before,after}() macros.
- Use mod_timer instead of del_timer/add_timer
- Properly synchronize timer resetting using ip6_fl_lock.
* The PCI layer now handles incorrect cacheline size settings,
as it should. Remove our own workarounds.
* Move pci_set_mwi up much earlier in the probe process,
and check its return value.
* Call pci_clear_mwi() in ->probe error handling
* Call pci_clear_mwi() in ->remove
Andrew Morton [Sun, 31 Aug 2003 11:36:41 +0000 (04:36 -0700)]
[PATCH] tty oops fix
Ancient bug, reported by Hiroshi Inoue <inoueh@uranus.dti.ne.jp>:
1. login to tty2 (not tty1)
2. start kon (Kanji cONsole emulator, console which support
Japanese characters)
3. exit kon
4. logout
It oopses in the debugging function check_tty_count(), walking a list_head
which has been list_del()'d. Call trace is:
#0 check_tty_count (tty=0x10d42000, routine=0xc817b00 ".paths") at include/asm/processor.h:583
#1 0x022c6c00 in do_tty_hangup (data=0x10d42000) at drivers/char/tty_io.c:426
#2 0x022c6f60 in tty_vhangup (tty=0xc817b00) at drivers/char/tty_io.c:536
#3 0x022c6fcc in disassociate_ctty (on_exit=1) at drivers/char/tty_io.c:574
#4 0x02127aee in do_exit (code=0) at kernel/exit.c:718
#5 0x02127caa in do_group_exit (exit_code=0) at kernel/exit.c:796
#6 0x02127cbc in sys_exit_group (error_code=0) at kernel/exit.c:807
The tty refcount is zero, so everything seems consistent and sensible. The
fix just uses list_del_init() on that list_head.
Heaven knows what the locking for tty->count is though. Some bizarre mixture
of BKL, tty_sem and nothing at all.
Andrew Morton [Sun, 31 Aug 2003 11:36:33 +0000 (04:36 -0700)]
[PATCH] scsi_unregister() oops fix
Some drivers such as aha1542 and aic7xxx_old will call scsi_register() and
then, if some succeeding operations fails they will call scsi_unregister(),
without an intervening scsi_set_host().
This causes an oops in scsi_put_device(), because kobj->parent is NULL.
In other words, scsi_register() immediately followed by scsi_unregister()
is guaranteed to oops.
The patch makes scsi_host_dev_release() more robust against this usage
pattern.