]> git.hungrycats.org Git - linux/log
linux
23 years ago[PATCH] Add release function to sd for scsi_disk structure
Mike Anderson [Thu, 23 Oct 2003 04:16:59 +0000 (23:16 -0500)]
[PATCH] Add release function to sd for scsi_disk structure

This patch removes the delay in calling device_del on the sdev struct
device during a surprise removal event. Reference counting functions for
sd's scsi_disk structure where also added to fix issues of unregistering
when a sd is open.

I have tested this patch using scsi_debug with differnt combinations of
adds / removes. I mounted both partitioned and un-partitioned sd disks,
remove the host, and then did a umount. The ref count debug output shows
the objects staying in place prior to the umount and cleaning up once
the umount is called.

This patch fixes an issue with a delayed call of device_del on the
sdev_gendev struct device.
- Remove the delayed call to device_del.
- Add kobject to sd scsi_disk structure.
- Add release function for scsi_disk kobject.
- Add get / put functions for scsi_disk and calls to these
  functions.

 drivers/scsi/scsi.c       |    4 --
 drivers/scsi/scsi_sysfs.c |    3 --
 drivers/scsi/sd.c         |   63 ++++++++++++++++++++++++++++++++++++++++------
 3 files changed, 57 insertions(+), 13 deletions(-)

23 years ago[PATCH] SCSI: limit mode sense usage
Patrick Mansfield [Thu, 16 Oct 2003 14:41:23 +0000 (20:11 +0530)]
[PATCH] SCSI: limit mode sense usage

Re-roll of the patch against 2.6.0-test6 to allow overriding or setting of
mode sense related flags, includes Alan Stern's as95 patch minus his
scsiglue.c changes.

Moves scsi_devinfo.h for use outside of drivers/scsi, and adds three new
devinfo flags:

BLIST_MS_SKIP_PAGE_08
BLIST_MS_SKIP_PAGE_3F
BLIST_USE_10_BYTE_MS

Adds a per host template flags, and use of it in scsiglue.c. The per host
value can be overridden by a devinfo entry, the patch does not allow
scsi_default_dev_flags to override default host values.

USB mass storage and removable media (for testing mode page 3f use) were
not tested, if you have a USB storage device that still chokes on mode
sense 3f please give this a spin.

 drivers/scsi/scsi_devinfo.c    |   15 +++++++++++----
 drivers/scsi/scsi_devinfo.h    |   17 -----------------
 drivers/scsi/scsi_priv.h       |    3 ++-
 drivers/scsi/scsi_scan.c       |   17 +++++++++++++----
 drivers/scsi/sd.c              |    9 +++++++++
 drivers/usb/storage/scsiglue.c |    8 ++++----
 include/scsi/scsi_device.h     |    2 ++
 include/scsi/scsi_devinfo.h    |   22 ++++++++++++++++++++++
 include/scsi/scsi_host.h       |    6 ++++++
 9 files changed, 69 insertions(+), 30 deletions(-)

23 years ago[PATCH] SCSI constants.c
Douglas Gilbert [Thu, 16 Oct 2003 14:24:36 +0000 (19:54 +0530)]
[PATCH] SCSI constants.c

However, drivers/scsi/constants.c does know about Report Luns??
Looks like a merging problem by Andries and me sometime back.

23 years ago[PATCH] fix oops caused when writing to the rescan attribute
Mike Christie [Thu, 16 Oct 2003 14:17:01 +0000 (19:47 +0530)]
[PATCH] fix oops caused when writing to the rescan attribute

If an upper layer driver is not loaded, and you write to a device's
rescan attribute you will get an oops. The attached patch fixes this by
testing if the device's driver variable is set before accessing it.

23 years agoMerge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5
Linus Torvalds [Tue, 14 Oct 2003 08:30:29 +0000 (01:30 -0700)]
Merge bk://kernel.bkbits.net/jgarzik/net-drivers-2.5
into home.osdl.org:/home/torvalds/v2.5/linux

23 years ago[PATCH] b44 enable interrupts after tx timeout (2.6-test version)
Pekka Pietikäinen [Tue, 14 Oct 2003 10:40:06 +0000 (06:40 -0400)]
[PATCH] b44 enable interrupts after tx timeout (2.6-test version)

Resending the patch I sent some time ago for b44.c that nukes the
2.4 compatibility cruft as well.

I'll do one for 2.4.23pre6 ASAP, hopefully being able sync the driver fully
with the one in 2.6 (free_netdev() etc.).

23 years ago[netdrvr natsemi] fix ring clean
Manfred Spraul [Tue, 14 Oct 2003 10:34:58 +0000 (06:34 -0400)]
[netdrvr natsemi] fix ring clean

Too much copy&paste in a call to pci_unmap_single.

23 years ago[netdrvr tulip] add pci id
Jeff Garzik [Tue, 14 Oct 2003 10:32:50 +0000 (06:32 -0400)]
[netdrvr tulip] add pci id

Contributed by Ken Zalewski.

23 years ago[PATCH] - atmel wireless driver
Simon Kelley [Tue, 14 Oct 2003 10:26:40 +0000 (06:26 -0400)]
[PATCH] - atmel wireless driver

1) Remove "#include <linux/version.h>" which was not needed and added
   bad extra compile dependencies.

2) Fix typo in module description.

3) Make card detection code cope with buggy SMC CIS entries.

23 years ago[netdrvr 8139too] another new PCI ID
Jeff Garzik [Tue, 14 Oct 2003 10:24:28 +0000 (06:24 -0400)]
[netdrvr 8139too] another new PCI ID

Contributed by Josh Litherland, Donald Becker, and others.

23 years ago[netdrvr 8139too] add pci id
Jeff Garzik [Tue, 14 Oct 2003 10:20:06 +0000 (06:20 -0400)]
[netdrvr 8139too] add pci id

contributed by "JaReK" and Donald Becker.

23 years ago[PATCH] hang on ZEROCOPY/TSO when hitting no-Tx-resources
Scott Feldman [Tue, 14 Oct 2003 10:15:35 +0000 (06:15 -0400)]
[PATCH] hang on ZEROCOPY/TSO when hitting no-Tx-resources

* Critical bug fix: under heavy Tx stress using ZEROCOPY or TSO, if we
  ran out of Tx descriptors, we didn't calculate for the context
  descritor used as the first of the ZEROCOPY/TSO send, nor do we clean
  up the context desriptor bits in the case where the send isn't going
  to fit, where we need to undo the mappings.  This bug was introduced
  with the 5.2.16 patch set which included a workaround for a hang
  on 82544 over PCI-X.  This workaround cause the check for no-Tx-
  rosource logic to change, and this bug slipped in.

23 years ago[PATCH] Fix warnings in defxx.c
Andi Kleen [Tue, 14 Oct 2003 10:14:10 +0000 (06:14 -0400)]
[PATCH] Fix warnings in defxx.c

Fix harmless 64bit warnings in defxx.c

23 years ago[PATCH] Fix warnings in hp100
Andi Kleen [Tue, 14 Oct 2003 10:14:02 +0000 (06:14 -0400)]
[PATCH] Fix warnings in hp100

Fix some harmless integer/pointer size mismatch warnings in hp100.c
on 64bit compiles

23 years ago[PATCH] Mark non 64bit clean network drivers
Andi Kleen [Tue, 14 Oct 2003 10:13:54 +0000 (06:13 -0400)]
[PATCH] Mark non 64bit clean network drivers

This marks some net drivers which are clearly not 64bit (judging from
the warnings) as !64BIT.

-Andi

23 years ago[hamradio bpqether] fix ancient debug line
Jeroen Vreeken [Tue, 14 Oct 2003 10:07:24 +0000 (06:07 -0400)]
[hamradio bpqether] fix ancient debug line

removes a verry old debug line from the bpqethernet driver that
only fills logs.

23 years ago[hamradio scc] fix probe function
Jeroen Vreeken [Tue, 14 Oct 2003 10:05:14 +0000 (06:05 -0400)]
[hamradio scc] fix probe function

fix for the probe function of the scc driver which now uses
an uninitialised scc struct for requesting an io region.

23 years ago[PATCH] ethtool_ops eeprom stuff
Scott Feldman [Tue, 14 Oct 2003 09:52:16 +0000 (05:52 -0400)]
[PATCH] ethtool_ops eeprom stuff

Finally got around to adding ethtool_ops to e100-3.0.x.  I found a bug
with get_eeprom() and it seems to work best if we add get_eeprom_len() to
the ops list.  Also moved check for offest + len < size into ethtool.c.

I was able to test [GS]EEPROM, PHYS_ID, GSTATS, GSTRINGS, and TEST, and
everything looks good.

Should I send same for 2.4?

23 years ago[PATCH] Fix pcnet_cs network hotplug
Russell King [Tue, 14 Oct 2003 09:40:23 +0000 (05:40 -0400)]
[PATCH] Fix pcnet_cs network hotplug

pcnet_cs registers the network device too early.  The effect of this
is that the networking hotplug scripts are unable to bring the device
up automatically.

There are two issues:
- we were registering the net device before we finished setting up
  the device (eg, reading the MAC address.)
- we were using DEV_CONFIG_PENDING to block the net device "open"
  callback, and as we know the other methods may be called prior
  to open.

My only concern with this patch is that we set info->node.dev_name
after we register the net device, so use of cardctl during the
hotplug scripts may give unexpected results.  However, I am not
aware of anyone using cardctl to read the device name in network
hotplug scripts.

Please review and merge.  Thanks.

23 years ago[netdrvr xircom_cb] fix race in statistics pointer setting
Stephen Hemminger [Tue, 14 Oct 2003 09:25:43 +0000 (05:25 -0400)]
[netdrvr xircom_cb] fix race in statistics pointer setting
by converting to use alloc_etherdev.

23 years ago[PATCH] Fix dvb_net network subsystem usage
Michael Hunold [Tue, 14 Oct 2003 03:13:51 +0000 (20:13 -0700)]
[PATCH] Fix dvb_net network subsystem usage

This restores the changes to the dvb_net code done by
<shemminger@osdl.org>, which were wiped out by my last patchset.

23 years agoMake x86 do_div() macro evaluate its "base" argument only once.
Linus Torvalds [Tue, 14 Oct 2003 03:11:37 +0000 (20:11 -0700)]
Make x86 do_div() macro evaluate its "base" argument only once.

23 years agoAvoid unnecessary floating point calculations in amd8111e net driver
Linus Torvalds [Tue, 14 Oct 2003 01:35:30 +0000 (18:35 -0700)]
Avoid unnecessary floating point calculations in amd8111e net driver

23 years agoAvoid unnecessary floating point usage in av7110 DVB driver
Linus Torvalds [Tue, 14 Oct 2003 01:34:24 +0000 (18:34 -0700)]
Avoid unnecessary floating point usage in av7110 DVB driver

23 years agoMark timer as running in the timer base _before_ we clear the pending
Linus Torvalds [Mon, 13 Oct 2003 14:50:54 +0000 (07:50 -0700)]
Mark timer as running in the timer base _before_ we clear the pending
flag (and order it on SMP), so that del_timer_sync() always sees the
timer either pending or running if it is active.

23 years agoRevert recent SMP timer changes - they cause deadlocks
Linus Torvalds [Mon, 13 Oct 2003 09:30:26 +0000 (02:30 -0700)]
Revert recent SMP timer changes - they cause deadlocks

Cset exclude: mingo@elte.hu[torvalds]|ChangeSet|20031012025453|05000

23 years agoMerge davem@nuts.ninka.net:/disk1/davem/BK/net-2.5
David S. Miller [Mon, 13 Oct 2003 07:03:56 +0000 (00:03 -0700)]
Merge davem@nuts.ninka.net:/disk1/davem/BK/net-2.5
into kernel.bkbits.net:/home/davem/net-2.5

23 years ago[NET]: Resolve device probe difference.
Stephen Hemminger [Mon, 13 Oct 2003 05:49:00 +0000 (22:49 -0700)]
[NET]: Resolve device probe difference.

23 years ago[EBTABLES]: Add ebt_among match.
Bart De Schuymer [Mon, 13 Oct 2003 05:47:57 +0000 (22:47 -0700)]
[EBTABLES]: Add ebt_among match.

23 years ago[NET]: Fix sealevel regression.
Stephen Hemminger [Mon, 13 Oct 2003 05:39:24 +0000 (22:39 -0700)]
[NET]: Fix sealevel regression.

My earlier change broke the if_ptr assumption used by SPPP drivers.
This makes sealevel driver do if_ptr like it used to.

23 years ago[NET]: Fix syncppp wan device regression.
Stephen Hemminger [Mon, 13 Oct 2003 05:38:13 +0000 (22:38 -0700)]
[NET]: Fix syncppp wan device regression.

In 2.6.0-test6, I put in a patch which fixed sealevel driver, but broke
all the other wan devices because it got rid of one level of indirection.

This puts back the indirection, and hopefully prevents others from
misreading it the same way. The SPPP drivers expect that
netdev->priv points to device local structure whose first element
is a pointer to the ppp device.

23 years ago[IPVS]: Fix to set the statistics of dest zero when bound to a new service
Wensong Zhang [Mon, 13 Oct 2003 05:36:12 +0000 (22:36 -0700)]
[IPVS]: Fix to set the statistics of dest zero when bound to a new service

23 years ago[IPVS]: Fix IPVS sync state check.
Wensong Zhang [Mon, 13 Oct 2003 05:28:21 +0000 (22:28 -0700)]
[IPVS]: Fix IPVS sync state check.

Patch from Horms <horms@vergenet.net>

Since both the primay and the backup sync daemon can be started in a box
at a time, we must just check if the MASTER bit is set in the sync state.

23 years ago[IPIP]: Decapsulate after checking policy.
Herbert Xu [Mon, 13 Oct 2003 05:21:36 +0000 (22:21 -0700)]
[IPIP]: Decapsulate after checking policy.

23 years ago[PATCH] avoid crashes due to unaligned stacks
Manfred Spraul [Mon, 13 Oct 2003 04:43:13 +0000 (21:43 -0700)]
[PATCH] avoid crashes due to unaligned stacks

This fixes the stack end detection properly, and verifies that the
stack content printing does not overflow into the next page even
partially.

This is required especially for x86 BIOSes that misalign the stack,
together with the page access debugging that unmaps unused kernel
pages to check for valid accesses.

Architectures with special needs (eg HPPA with stacks that grow up)
can override the kernel stack end test with __HAVE_ARCH_KSTACK_END
if they ever enable the anal slab debugging code.

23 years ago[PATCH] Fixing mlockall & PROT_NONE
Andi Kleen [Mon, 13 Oct 2003 04:24:49 +0000 (21:24 -0700)]
[PATCH] Fixing mlockall & PROT_NONE

This is the minimal change to make "mlockall()" not complain about
the occasional PROT_NONE area.

PROT_NONE is commonly used on x86-64, and is no reason to not lock
in the rest of the mappings into memory.

23 years ago[PATCH] Sun-3 compile fix
Geert Uytterhoeven [Mon, 13 Oct 2003 03:05:57 +0000 (20:05 -0700)]
[PATCH] Sun-3 compile fix

Sun-3: Add missing include (needed because of __attribute_used__ in
<linux/init.h>)

23 years ago[PATCH] M68k export csum_partial
Geert Uytterhoeven [Mon, 13 Oct 2003 03:05:32 +0000 (20:05 -0700)]
[PATCH] M68k export csum_partial

M68k: Export missing symbol csum_partial

23 years ago[PATCH] Kernel thread signal handling.
David Woodhouse [Mon, 13 Oct 2003 02:35:05 +0000 (19:35 -0700)]
[PATCH] Kernel thread signal handling.

 - add disallow_signal() to complement allow_signal(), rather than
   having different subsystems try to do it by hand.

 - add a version of dequeue_signal() which does the necessary locking on
   its own, again to avoid having modules have to care.

 - let allow_signal() to actually allow signals other than
   SIGKILL. Currently they get either converted to SIGKILL or
   silently dropped, according to whether your kernel thread
   happens to have sa_handler set for the signal in question.

   (Barf alert: we do this by just installing a dummy handler)

 - make jffs2 use the cleaned up infrastructure

23 years ago[PATCH] Fix software suspend compilation on x86-64
Andi Kleen [Sun, 12 Oct 2003 15:30:02 +0000 (08:30 -0700)]
[PATCH] Fix software suspend compilation on x86-64

From Pavel Machek. Make software suspend compile again on x86-64

23 years agoClear IRQ_INPROGRESS as part of "enable_irq()".
Linus Torvalds [Sun, 12 Oct 2003 12:09:55 +0000 (05:09 -0700)]
Clear IRQ_INPROGRESS as part of "enable_irq()".

It can have gotten set by a stray interrupt if there were
no handlers while the IRQ was disabled, and we shouldn't
confuse other parts (ie this is another safety-net for the
issues that Al Viro brought up about disable_irq() deadlocks
when no handlers exist).

23 years ago[PATCH] problems with USB memory pen
Matthew Dharm [Sun, 12 Oct 2003 12:00:39 +0000 (05:00 -0700)]
[PATCH] problems with USB memory pen

This fixes a bug which was introduced when the code was switched to use
atomic_read()s.

The bug prevents hot-unplugging of SCSI (or emulated SCSI) devices from
working.

From Patrick Mansfield.

23 years agoMake kernel stack dumps handle unaligned kernel stacks more gracefully.
Linus Torvalds [Sun, 12 Oct 2003 11:44:23 +0000 (04:44 -0700)]
Make kernel stack dumps handle unaligned kernel stacks more gracefully.

They can happen on x86 as a result of interrupts in BIOS calls.

Noted by Manfred Spraul.

23 years agoMerge http://lia64.bkbits.net/to-linus-2.5
Linus Torvalds [Sun, 12 Oct 2003 11:21:01 +0000 (04:21 -0700)]
Merge http://lia64.bkbits.net/to-linus-2.5
into home.osdl.org:/home/torvalds/v2.5/linux

23 years agoMerge bk://ppc.bkbits.net/for-linus-ppc
Linus Torvalds [Sun, 12 Oct 2003 11:19:03 +0000 (04:19 -0700)]
Merge bk://ppc.bkbits.net/for-linus-ppc
into home.osdl.org:/home/torvalds/v2.5/linux

23 years agoMerge samba.org:/stuff/paulus/kernel/linux-2.5
Paul Mackerras [Mon, 13 Oct 2003 06:39:18 +0000 (16:39 +1000)]
Merge samba.org:/stuff/paulus/kernel/linux-2.5
into samba.org:/stuff/paulus/kernel/for-linus-ppc

23 years agoMerge master.kernel.org:/home/dwmw2/BK/jffs2-forlinus-2.5
Linus Torvalds [Sun, 12 Oct 2003 11:17:46 +0000 (04:17 -0700)]
Merge master.kernel.org:/home/dwmw2/BK/jffs2-forlinus-2.5
into home.osdl.org:/home/torvalds/v2.5/linux

23 years agoMerge bk://bk.arm.linux.org.uk/linux-2.6-rmk
Linus Torvalds [Sun, 12 Oct 2003 11:07:02 +0000 (04:07 -0700)]
Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
into home.osdl.org:/home/torvalds/v2.5/linux

23 years ago[ARM] Add missing csum_partial export.
Russell King [Sun, 12 Oct 2003 11:19:31 +0000 (12:19 +0100)]
[ARM] Add missing csum_partial export.

23 years agoFix repeat delays in adbhit, they didn't make the transition to
Benjamin Herrenschmidt [Sat, 11 Oct 2003 18:28:40 +0000 (20:28 +0200)]
Fix repeat delays in adbhit, they didn't make the transition to
jiffies based values to ms. This fix crazy key repeat on ADB
based PowerMacs

23 years agoFix a crash on sleep in the OF platform core where we would
Benjamin Herrenschmidt [Sat, 11 Oct 2003 18:17:44 +0000 (20:17 +0200)]
Fix a crash on sleep in the OF platform core where we would
use a NULL "driver" pointer and actually try to call it after
casting it !

23 years agoFix VIA-based TB/Decrementer calibration , previously it wouldn't work
Benjamin Herrenschmidt [Sat, 11 Oct 2003 18:15:35 +0000 (20:15 +0200)]
Fix VIA-based TB/Decrementer calibration , previously it wouldn't work
properly with HZ != 100, causing tb_to_us to be wrong and gettimeofday()
to return strangely "off" results

23 years agoFix timebase hardware sync on SMP PowerMacs (both oldworld dual 604s and
Benjamin Herrenschmidt [Sat, 11 Oct 2003 18:14:01 +0000 (20:14 +0200)]
Fix timebase hardware sync on SMP PowerMacs (both oldworld dual 604s and
core99 dual G4s).

23 years agoMove definition of TimeBase registers from reg_booke.h to reg.h, those
Benjamin Herrenschmidt [Sat, 11 Oct 2003 18:12:28 +0000 (20:12 +0200)]
Move definition of TimeBase registers from reg_booke.h to reg.h, those
registers exist on common CPUs and without those definitions, SMP won't
build

23 years agoFix RAMDAC detection on some IMS TwinTurbo video cards ("Mac" cards only),
Benjamin Herrenschmidt [Sat, 11 Oct 2003 18:01:43 +0000 (20:01 +0200)]
Fix RAMDAC detection on some IMS TwinTurbo video cards ("Mac" cards only),
without this, you get no display on machines with those cards

23 years agoThe POWER4 support merged previously was incomplete, add the missing bits
Benjamin Herrenschmidt [Sat, 11 Oct 2003 17:58:36 +0000 (19:58 +0200)]
The POWER4 support merged previously was incomplete, add the missing bits
so that the kernel boots at least on POWER4 and G5 CPUs

23 years agoExport init_mm, some modules need that
Benjamin Herrenschmidt [Sat, 11 Oct 2003 17:54:42 +0000 (19:54 +0200)]
Export init_mm, some modules need that

23 years agoExport mol_trampoline and mmu_hash_lock for MOL
Benjamin Herrenschmidt [Sat, 11 Oct 2003 17:53:56 +0000 (19:53 +0200)]
Export mol_trampoline and mmu_hash_lock for MOL
(missing from a previous cset)

23 years agocoff images bootloader reserves more memory for the kernel, allow booting
Benjamin Herrenschmidt [Sat, 11 Oct 2003 17:51:14 +0000 (19:51 +0200)]
coff images bootloader reserves more memory for the kernel, allow booting
of "standard" configs on oldworld macs

23 years agoFix call to Open Firmware "map" call, parameters were flipped causing
Benjamin Herrenschmidt [Sat, 11 Oct 2003 17:49:45 +0000 (19:49 +0200)]
Fix call to Open Firmware "map" call, parameters were flipped causing
the coff image to randomly fail

23 years agoFix jffs2 memory leak on mount error
David Woodhouse [Sat, 11 Oct 2003 16:58:36 +0000 (17:58 +0100)]
Fix jffs2 memory leak on mount error

23 years agoJFFS2 update; completed support for NAND flash.
David Woodhouse [Sat, 11 Oct 2003 16:51:34 +0000 (17:51 +0100)]
JFFS2 update; completed support for NAND flash.

 - Implement write-buffer flushing by garbage collection instead of padding.
 - Implement selective write-buffer flushing on fsync().
 - Implement error recovery on write-buffer flush.
 - Fix remove_suid(). Writing to a suid file didn't previously mark the file non-suid.
 - Fix handling of full file systems, to avoid unlink() returning -ENOSPC.
 - Fix assorted memory leaks.
 - Improve garbage collection efficiency by merging fewer pages.

23 years agoMerge http://linux-acpi.bkbits.net/linux-acpi-release-2.6.0
Linus Torvalds [Sat, 11 Oct 2003 13:40:27 +0000 (06:40 -0700)]
Merge http://linux-acpi.bkbits.net/linux-acpi-release-2.6.0
into home.osdl.org:/home/torvalds/v2.5/linux

23 years agoMerge bk://kernel.bkbits.net/davem/net-2.5
Linus Torvalds [Sat, 11 Oct 2003 13:38:11 +0000 (06:38 -0700)]
Merge bk://kernel.bkbits.net/davem/net-2.5
into home.osdl.org:/home/torvalds/v2.5/linux

23 years agoMerge bk://kernel.bkbits.net/davem/sparc-2.5
Linus Torvalds [Sat, 11 Oct 2003 13:36:16 +0000 (06:36 -0700)]
Merge bk://kernel.bkbits.net/davem/sparc-2.5
into home.osdl.org:/home/torvalds/v2.5/linux

23 years ago[PATCH] Bug in timer_tsc cpufreq callback
Venkatesh Pallipadi [Sat, 11 Oct 2003 12:58:58 +0000 (05:58 -0700)]
[PATCH] Bug in timer_tsc cpufreq callback

There is a bug in cpufreq call back funtion in timer_tsc routines,
that can result in system deadlock. The issue is: grabbing the
write_lock on xtime_lock without disabling the interrupts. So,=20
if we happen to get a timer interrupt while we are in this code,
system will go into a deadlock.

This bug only effects the kernels that have CONFIG_CPU_FREQ enabled.

23 years agoMerge kernel.crashing.org:/home/benh/kernels/linux-2.5
Benjamin Herrenschmidt [Sat, 11 Oct 2003 12:57:12 +0000 (14:57 +0200)]
Merge kernel.crashing.org:/home/benh/kernels/linux-2.5
into kernel.crashing.org:/home/benh/kernels/for-linus-ppc

23 years ago[PATCH] SMP races in the timer code
Ingo Molnar [Sat, 11 Oct 2003 12:54:53 +0000 (05:54 -0700)]
[PATCH] SMP races in the timer code

This fixes two del_timer_sync() races that are still in the timer code.

The first race was actually triggered in a 2.4 backport of the 2.6 timer
code.  The second race was never triggered - it is mostly theoretical on
a standalone kernel.  (It's more likely in any virtualized or otherwise
preemptable environment.)

Both races happen when self-rearming timers are used.  One mainstream
example is kernel/itimer.c.  The effect of the races is that
del_timer_sync() lets a timer running instead of synchronizing with it,
causing logic bugs (and crashes) in the affected kernel code.  One
typical incarnation of the race is a double add_timer().

race #1:

this code in __run_timers() is running on CPU0:

                        list_del(&timer->entry);
                        timer->base = NULL;
[*]
                        set_running_timer(base, timer);
                        spin_unlock_irq(&base->lock);
[**]
                        fn(data);
                        spin_lock_irq(&base->lock);

CPU0 gets stuck at the [*] code-point briefly - after the timer->base has
been set to NULL, but before the base->running_timer pointer has been set
up. This is a fundamentally volatile scenario, as there's _zero_ knowledge
in the data structures that this timer is about to be executed!

Now CPU1 comes along and calls del_timer_sync(). It will find nothing -
neither timer->base nor base->running_timer will cause it to synchronize.
It will return and report that the timer has been deleted - shortly
afterwards CPU1 continues to execute the timer fn, which will cause
crashes.

This particular race is easy to fix by reordering the timer->base
clearing with set_running_timer(), and putting a wmb() between them, but
there's more races:

race #2

The checking of del_timer_sync() for 'pending or running timer' is
fundamentally unrobust. Eg. if CPU0 gets stuck at the [***] point below:

                base = &per_cpu(tvec_bases, i);
                if (base->running_timer == timer) {
                        while (base->running_timer == timer) {
                                cpu_relax();
                                preempt_check_resched();
                        }
[***]
                        break;
                }
        }
        smp_rmb();
        if (timer_pending(timer))
                goto del_again;

then del_timer_sync() has already decided that this timer is not running
(we just finished loop-waiting for it), but we have not done the
timer_pending() check yet.

If the timer has re-armed itself, and if the timer expires on CPU1 (this
needs a long delay on CPU0 but that's not hard to achieve eg.  in UML or
with kernel preemption enabled), then CPU1 could start to expire the
timer and gets to the [**] point in __run_timers (see above), then CPU1
gets stalled and CPU0 is unstalled, then the timer_pending() check in
del_timer_sync() will not notice the running timer, and del_timer_sync()
returns - while CPU1 is just about to run the timer!

Fixing this second race is hard - it involves a heavy race-check
operation that has to lock all bases, and has to re-check the
base->running_timer value, and timer_pending condition atomically.

This fix also fixes the first race, due to forcing del_timer_sync() to
always observe the timer state atomically, so the [*] code point will
always synchronize with del_timer_sync().

The patch is ugly but safe, and it has fixed the crashes in the 2.4
backport.  I tested the patch on 2.6.0-test7 with some heavy itimer use
and it works fine.  Removing self-arming timers safely is the sole
purpose of del_timer_sync(), so there's no way around this overhead i
think.  I believe we should ultimately fix all major del_timer_sync()
users to not use self-arming timers - having del_timer_sync() in the
thread-exit path is now a considerable source of SMP overhead.  But this
is out of the scope of current 2.6 fixes of course, and we have to
support self-arming timers as well.

23 years ago[ATM]: Kill PROC_FS ifdef around includes.
David S. Miller [Sat, 11 Oct 2003 05:42:58 +0000 (22:42 -0700)]
[ATM]: Kill PROC_FS ifdef around includes.

23 years ago[IPX]: ipx_proc.c needs linux/init.h even when PROC_FS is not enabled.
Noah J. Misch [Sat, 11 Oct 2003 05:18:00 +0000 (22:18 -0700)]
[IPX]: ipx_proc.c needs linux/init.h even when PROC_FS is not enabled.

23 years ago[NET]: Fix register_netdev() return value check in synclink_cs.c
Stephen Hemminger [Sat, 11 Oct 2003 05:16:11 +0000 (22:16 -0700)]
[NET]: Fix register_netdev() return value check in synclink_cs.c

23 years ago[WAN]: Fix register_netdev() return value check in hostess_sv11.c
Stephen Hemminger [Sat, 11 Oct 2003 05:15:37 +0000 (22:15 -0700)]
[WAN]: Fix register_netdev() return value check in hostess_sv11.c

23 years ago[IPV4]: ip_copy_metadata must copy the nfcache field.
Julian Anastasov [Sat, 11 Oct 2003 04:59:57 +0000 (21:59 -0700)]
[IPV4]: ip_copy_metadata must copy the nfcache field.

23 years agoMerge nuts.ninka.net:/disk1/davem/BK/sparcwork-2.5
David S. Miller [Sat, 11 Oct 2003 04:51:25 +0000 (21:51 -0700)]
Merge nuts.ninka.net:/disk1/davem/BK/sparcwork-2.5
into nuts.ninka.net:/disk1/davem/BK/sparc-2.5

23 years agoMerge bk://ppc@ppc.bkbits.net/for-linus-ppc
Benjamin Herrenschmidt [Fri, 10 Oct 2003 22:54:41 +0000 (00:54 +0200)]
Merge bk://ppc@ppc.bkbits.net/for-linus-ppc
into kernel.crashing.org:/home/benh/kernels/for-linus-ppc

23 years ago[PATCH] ia64: nable SN2 in generic builds
Jesse Barnes [Fri, 10 Oct 2003 11:35:59 +0000 (04:35 -0700)]
[PATCH] ia64: nable SN2 in generic builds

Now that it works, we can enable sn2 in generic builds.  This should not
only allow generic kernels to work on sn2, but also fix the build
problems people have been seeing with the qla1280 driver.  I tested a
generic kernel built with this patch on zx1 and it worked.

23 years ago[PATCH] ia64: fix register numbers in MCA save/restore
Tony Luck [Fri, 10 Oct 2003 09:53:34 +0000 (02:53 -0700)]
[PATCH] ia64: fix register numbers in MCA save/restore

This corrects the save/restore code in mca_asm.S
which was written long ago, before the assembler understood
mnemonic names for 'cr' and 'ar' registers (in fact it
appears to have been written pre-silicon, some of the
control register numbers don't match with what actually
got built).  There were other goofs too (like using
0, 1, 2, etc. for region register subscripts).

23 years agoMerge bk://kernel.bkbits.net/gregkh/linux/usb-2.6
Linus Torvalds [Fri, 10 Oct 2003 09:25:31 +0000 (02:25 -0700)]
Merge bk://kernel.bkbits.net/gregkh/linux/usb-2.6
into home.osdl.org:/home/torvalds/v2.5/linux

23 years agoMerge bk://kernel.bkbits.net/gregkh/linux/i2c-2.6
Linus Torvalds [Fri, 10 Oct 2003 09:21:15 +0000 (02:21 -0700)]
Merge bk://kernel.bkbits.net/gregkh/linux/i2c-2.6
into home.osdl.org:/home/torvalds/v2.5/linux

23 years ago[PATCH] ia64: fix NUMA boot
Jesse Barnes [Fri, 10 Oct 2003 09:19:38 +0000 (02:19 -0700)]
[PATCH] ia64: fix NUMA boot

Now that the ACPI table parsing stuff has been fixed we can move
find_memory() back where it belongs--after the SRAT table has been
parsed.

23 years agoia64: Patch by Jesse Barnes:
David Mosberger [Fri, 10 Oct 2003 09:17:14 +0000 (02:17 -0700)]
ia64: Patch by Jesse Barnes:

This patch fixes the combination of CONFIG_DISCONTIGMEM and
CONFIG_VIRTUAL_MEM_MAP so that generic kernels will work on all ia64
platforms, including sn2, and also makes sn2 specific kernels work
(which I think is a first).

I've cleaned this patch up heavily based on feedback from yourself,
Christoph and others.  I've tested sn2, zx1, and dig (thanks Xavier!)
specific configurations, as well as a generic configuration that allows
the same binary to boot on zx1, dig, and sn2.

23 years ago[PATCH] ia64: 2nd step to fix GENERIC builds: split contig and discontig paging_init...
Jesse Barnes [Fri, 10 Oct 2003 09:14:31 +0000 (02:14 -0700)]
[PATCH] ia64: 2nd step to fix GENERIC builds: split contig and discontig paging_init functions

23 years agoMerge intel.com:/home/lenb/bk/linux-2.6.0
Len Brown [Fri, 10 Oct 2003 09:03:12 +0000 (05:03 -0400)]
Merge intel.com:/home/lenb/bk/linux-2.6.0
into intel.com:/home/lenb/bk/linux-acpi-test-2.6.0

23 years agoMerge kroah.com:/home/greg/linux/BK/bleed-2.5
Greg Kroah-Hartman [Fri, 10 Oct 2003 08:53:03 +0000 (01:53 -0700)]
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/usb-2.6

23 years agoMerge bk://bk.arm.linux.org.uk/linux-2.6-rmk
Linus Torvalds [Fri, 10 Oct 2003 08:51:45 +0000 (01:51 -0700)]
Merge bk://bk.arm.linux.org.uk/linux-2.6-rmk
into home.osdl.org:/home/torvalds/v2.5/linux

23 years ago[ARM] Add missing exports for Integrator logic module drivers.
Russell King [Sat, 11 Oct 2003 00:06:33 +0000 (01:06 +0100)]
[ARM] Add missing exports for Integrator logic module drivers.

This adds a couple of missing symbol exports for
lm_driver_register and lm_driver_unregister.

23 years ago[ARM] Remove no_action function from CLPS7500 code.
Russell King [Fri, 10 Oct 2003 23:59:29 +0000 (00:59 +0100)]
[ARM] Remove no_action function from CLPS7500 code.

no_action is implemented by generic code; no need for machine class
code to implement it as well.

23 years agoMerge kroah.com:/home/greg/linux/BK/bleed-2.5
Greg Kroah-Hartman [Fri, 10 Oct 2003 08:35:49 +0000 (01:35 -0700)]
Merge kroah.com:/home/greg/linux/BK/bleed-2.5
into kroah.com:/home/greg/linux/BK/i2c-2.6

23 years agoMerge bk://linux-dj.bkbits.net/cpufreq
Linus Torvalds [Fri, 10 Oct 2003 08:04:04 +0000 (01:04 -0700)]
Merge bk://linux-dj.bkbits.net/cpufreq
into home.osdl.org:/home/torvalds/v2.5/linux

23 years agoMerge wopr.codemonkey.org.uk:/mnt/nfs/sepia/bar/src/kernel/2.6/trees/bk-linus
Dave Jones [Fri, 10 Oct 2003 23:31:17 +0000 (00:31 +0100)]
Merge wopr.codemonkey.org.uk:/mnt/nfs/sepia/bar/src/kernel/2.6/trees/bk-linus
into wopr.codemonkey.org.uk:/mnt/nfs/sepia/bar/src/kernel/2.6/trees/cpufreq

23 years ago[CPUFREQ] Kill longhaul warnings
Dave Jones [Fri, 10 Oct 2003 23:24:13 +0000 (00:24 +0100)]
[CPUFREQ] Kill longhaul warnings
(Blah about unused variables).
This code still won't be used, as its still not tested/debugged properly
on a Nehemiah.

23 years ago[CPUFREQ] Fix longhauls speed calculations.
Dave Jones [Fri, 10 Oct 2003 21:57:10 +0000 (22:57 +0100)]
[CPUFREQ] Fix longhauls speed calculations.
We got half multipliers horribly wrong, which made us think we could
clock the CPU much higher than we actually could.

23 years ago[CPUFREQ] refix EBLCR FSB only works on Samuel1.
Dave Jones [Fri, 10 Oct 2003 21:45:31 +0000 (22:45 +0100)]
[CPUFREQ] refix EBLCR FSB only works on Samuel1.
Now that longhaul=1 matches more than 1 CPU, this broke.

23 years ago[CPUFREQ] Make VIA longhaul work on Samuel2 & Ezra again.
Dave Jones [Fri, 10 Oct 2003 21:02:19 +0000 (22:02 +0100)]
[CPUFREQ] Make VIA longhaul work on Samuel2 & Ezra again.
These CPUs are actually only longhaul v1 compliant.
This was catastrophic, as the MSRs moved between v1 and v2.
There was also massive confusion in the documentation regarding Ezra.
It's not another variant, so 'v2' never existed.
Renamed v3 (Powersaver) to v2 as a result of this.

23 years ago[PATCH] I2C: fix i2c-dev class release function bug.
Greg Kroah-Hartman [Fri, 10 Oct 2003 07:59:18 +0000 (00:59 -0700)]
[PATCH] I2C: fix i2c-dev class release function bug.

There was no release function, that was the bug :)
It caused bad messages to show up in the syslog whenever a i2c driver was removed, and could
easily oops.

23 years ago[PATCH] I2C: i2c-sis630 driver fixes
Alexander Malysh [Fri, 10 Oct 2003 07:11:04 +0000 (00:11 -0700)]
[PATCH] I2C: i2c-sis630 driver fixes

attached you can find a patch that should fix i2c-sis630 driver for
2.6.0-X kernel. With i2c-sis630 from stock 2.6.0-X we have oops and
driver was not correct registered against i2c-core.

Changes:
1) fixed a oops while modprobing
2) added check for buffer overflow for i2c block data read transaction
3) added 'force' modprobe parameter. It's allow more easily
   testing for not yet supported SiS chips.

23 years ago[PATCH] ia64: fix misnamed syscalls
Andreas Schwab [Fri, 10 Oct 2003 07:00:18 +0000 (00:00 -0700)]
[PATCH] ia64: fix misnamed syscalls

This fixes a misnomer of some syscalls in 2.6.0-test[567].  Glibc wants
them without the sys_ infix.

23 years ago[PATCH] ia64: fix SN2 interrupt allocation
Jesse Barnes [Fri, 10 Oct 2003 06:59:13 +0000 (23:59 -0700)]
[PATCH] ia64: fix SN2 interrupt allocation

Patch from Christoph.  Fixes interrupt allocation code for sn2.

23 years ago[PATCH] ia64: Fix unaligned faults in IA-32 putstat64
Arun Sharma [Fri, 10 Oct 2003 06:57:41 +0000 (23:57 -0700)]
[PATCH] ia64: Fix unaligned faults in IA-32 putstat64

This seems to be introduced by recent changes in 2.6.0-test series.

23 years agoMerge bk://kernel.bkbits.net/davem/sparc-2.5
Linus Torvalds [Fri, 10 Oct 2003 00:32:18 +0000 (17:32 -0700)]
Merge bk://kernel.bkbits.net/davem/sparc-2.5
into home.osdl.org:/home/torvalds/v2.5/linux