Commit Graph

33312 Commits

Author SHA1 Message Date
Alan Cox 79860a9a79 [PATCH] PATCH: 2.6.18 oops on boot fix for IDE
When the IDE fix for Jmicron went in one piece went walking somewhere
(send log shows my end somehow). Without this sometimes you get an oops
on boot.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-09 15:43:27 -07:00
Greg Kroah-Hartman a465714109 Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-08-09 11:49:13 -07:00
Greg Kroah-Hartman 54f58d6c4f Merge branch 'upstream-greg' of gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2006-08-09 11:46:30 -07:00
Greg Kroah-Hartman 897e11a40b Merge branch 'upstream-greg' of gregkh@master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-08-09 11:45:59 -07:00
Dmitry Mishin 7c91767a6b [NET]: add_timer -> mod_timer() in dst_run_gc()
Patch from Dmitry Mishin <dim@openvz.org>:

Replace add_timer() by mod_timer() in dst_run_gc
in order to avoid BUG message.

       CPU1                            CPU2
dst_run_gc()  entered           dst_run_gc() entered
spin_lock(&dst_lock)                   .....
del_timer(&dst_gc_timer)         fail to get lock
       ....                         mod_timer() <--- puts 
                                                 timer back
                                                 to the list
add_timer(&dst_gc_timer) <--- BUG because timer is in list already.

Found during OpenVZ internal testing.

At first we thought that it is OpenVZ specific as we
added dst_run_gc(0) call in dst_dev_event(),
but as Alexey pointed to me it is possible to trigger
this condition in mainstream kernel.

F.e. timer has fired on CPU2, but the handler was preeempted
by an irq before dst_lock is tried.
Meanwhile, someone on CPU1 adds an entry to gc list and
starts the timer.
If CPU2 was preempted long enough, this timer can expire
simultaneously with resuming timer handler on CPU1, arriving
exactly to the situation described.

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-09 02:25:54 -07:00
Tejun Heo 22aac0896b [PATCH] libata: clear sdev->locked on door lock failure
SCSI EH locks door if sdev->locked is set.  Sometimes door lock
command fails continuously (e.g. when medium is not present) and as
libata uses EH to acquire sense data, this easily creates a loop where
a failed lock door invokes EH and EH issues lock door on completion.

This patch clears sdev->locked on door lock failure to break this
loop.  This problem has been spotted and diagnosed by Unicorn Chang
<uchang@tw.ibm.com>.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 01:16:27 -04:00
Keith Owens 85455dd342 [PATCH] Fix compile problem when sata debugging is on
Fix a sata debug print statement that still uses an old variable name.

Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 01:16:27 -04:00
Brice Goglin 013b68bf7c [PATCH] myri10ge: always re-enable dummy rdmas in myri10ge_resume
Dummy RDMA are always enabled on device startup since commit
9a71db721a (to work around buggy
PCIe chipsets which do not implement resending properly). But,
we also need to always re-enable them when resuming the device.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-08-09 00:12:47 -04:00
Jeff Garzik c71d6be54e Merge branch 'tj-upstream-fixes' of git://htj.dyndns.org/libata-tj into upstream-fixes 2006-08-08 23:59:39 -04:00
Jeff Garzik 2f96740c26 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-08-08 23:48:48 -04:00
Stephen Hemminger 7b1ba8de56 [IPX]: Another nonlinear receive fix
Need to check some more cases in IPX receive.  If the skb is purely
fragments, the IPX header needs to be extracted. The function
pskb_may_pull() may in theory invalidate all the pointers in the skb,
so references to ipx header must be refreshed.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-08 16:48:51 -07:00
David S. Miller 70f8e78e15 [RTNETLINK]: Fix IFLA_ADDRESS handling.
The ->set_mac_address handlers expect a pointer to a
sockaddr which contains the MAC address, whereas
IFLA_ADDRESS provides just the MAC address itself.

So whip up a sockaddr to wrap around the netlink
attribute for the ->set_mac_address call.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-08 16:47:37 -07:00
Greg Kroah-Hartman ad552692a4 Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb 2006-08-08 14:19:23 -07:00
Yeasah Pell 0851fb4848 V4L/DVB (4431): Add several error checks to dst
Signed-off-by: Yeasah Pell <yeasah@shwide.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:53:04 -03:00
Diego Calleja eafa98177a V4L/DVB (4430): Quickcam_messenger compilation fix
In bugzilla #6943, Maxim Britov reported:
"I can enable Logitech quickcam support in .config, but it want be compile.
I have to add into drivers/media/video/Makefile:
obj-$(CONFIG_USB_QUICKCAM_MESSENGER)    += usbvideo/"
He's right, just enable that driver as module while disabling every other
driver that gets into that directory, nothing will get compiled.
This patch fixes the Makefile.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:53:04 -03:00
Mauro Carvalho Chehab 8a016dcc83 V4L/DVB (4427): Fix V4L1 Compat for VIDIOCGPICT ioctl
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:53:04 -03:00
Hans Verkuil 43c560fa59 V4L/DVB (4419): Turn on the Low Noise Amplifier of the Samsung tuners.
Without the LNA these tuners perform very poorly (read 'unwatchable') when
the signal is weak.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:53:04 -03:00
Hans Verkuil e335fada5a V4L/DVB (4418): Fix broken msp3400 module option 'standard'
Due to a wrong statement order the 'standard' module option didn't
work for 'G' model chips.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:53:03 -03:00
Hans Verkuil 17531c168c V4L/DVB (4416): Cx25840_read4 has wrong endianness.
cx25840_read4 assembled the bytes in the wrong order.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:53:03 -03:00
Trent Piepho b02dc51591 V4L/DVB (4411): Fix minor errors in build files
In pwc Kconfig, change 'depends' to 'depends on'
In dvb-core Makefile, change '=' to ':='

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:53:03 -03:00
Mauro Carvalho Chehab 7fb6529762 V4L/DVB (4407): Driver dsbr100 is a radio device, not a video one!
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 15:52:52 -03:00
Mauro Carvalho Chehab 0dfa9abd6b V4L/DVB (4399): Fix a typo that caused some compat stuff to not work
Config option typo:
-#ifdef CONFIG_V4L1_COMPAT
+#ifdef CONFIG_VIDEO_V4L1_COMPAT

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 13:55:07 -03:00
Luc Van Oostenryck 3cdc0f263b V4L/DVB (4395): Restore compat_ioctl in pwc driver
The compat_ioctl support of the pwc driver was dropped during the last update of the driver.
I suppose it was by mistake. If yes here is the patch to restore the support.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@looxix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 13:55:05 -03:00
Mauro Carvalho Chehab 6054b68e84 V4L/DVB (4371b): Fix V4L1 dependencies at drivers under sound/oss and sound/pci
TVMixer and FM801 Tea5757 are still using V4L1 API. 

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 13:55:03 -03:00
Mauro Carvalho Chehab 5bdd6cc330 V4L/DVB (4371a): Fix V4L1 dependencies on compat_ioctl32
Compat32 should be able to handle V4L1 ioctls if the old API support were
selected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 13:55:01 -03:00
Mauro Carvalho Chehab 487206f263 V4L/DVB (4340): Videodev.h should be included also when V4L1_COMPAT is selected.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-08 13:54:12 -03:00
Michael Chan 1b2a720506 [TG3]: Fix tx race condition
Fix a subtle race condition between tg3_start_xmit() and tg3_tx()
discovered by Herbert Xu <herbert@gondor.apana.org.au>:

CPU0					CPU1
tg3_start_xmit()
	if (tx_ring_full) {
		tx_lock
					tg3_tx()
						if (!netif_queue_stopped)
		netif_stop_queue()
		if (!tx_ring_full)
						update_tx_ring 
			netif_wake_queue()
		tx_unlock
	}

Even though tx_ring is updated before the if statement in tg3_tx() in
program order, it can be re-ordered by the CPU as shown above.  This
scenario can cause the tx queue to be stopped forever if tg3_tx() has
just freed up the entire tx_ring.  The possibility of this happening
should be very rare though.

The following changes are made:

1. Add memory barrier to fix the above race condition.

2. Eliminate the private tx_lock altogether and rely solely on
netif_tx_lock.  This eliminates one spinlock in tg3_start_xmit()
when the ring is full.

3. Because of 2, use netif_tx_lock in tg3_tx() before calling
netif_wake_queue().

4. Change TX_BUFFS_AVAIL to an inline function with a memory barrier.
Herbert and David suggested using the memory barrier instead of
volatile.

5. Check for the full wake queue condition before getting
netif_tx_lock in tg3_tx().  This reduces the number of unnecessary
spinlocks when the tx ring is full in a steady-state condition.

6. Update version to 3.65.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 21:46:02 -07:00
Wei Yongjun bd37a08859 [TCP]: SNMPv2 tcpOutSegs counter error
Do not count retransmitted segments.

Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 21:04:15 -07:00
David S. Miller 69d8c28c95 [PKTGEN]: Make sure skb->{nh,h} are initialized in fill_packet_ipv6() too.
Mirror the bug fix from fill_packet_ipv4()

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 20:52:10 -07:00
Chen-Li Tien aaf580601f [PKTGEN]: Fix oops when used with balance-tlb bonding
Signed-off-by: Chen-Li Tien <cltien@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 20:49:07 -07:00
Kirill Korotaev 8d1502de27 [IPV4]: Limit rt cache size properly.
From: Kirill Korotaev <dev@sw.ru>

During OpenVZ stress testing we found that UDP traffic with random src
can generate too much excessive rt hash growing leading finally to OOM
and kernel panics.

It was found that for 4GB i686 system (having 1048576 total pages and
  225280 normal zone pages) kernel allocates the following route hash:
syslog: IP route cache hash table entries: 262144 (order: 8, 1048576
bytes) => ip_rt_max_size = 4194304 entries, i.e.  max rt size is
4194304 * 256b = 1Gb of RAM > normal_zone

Attached the patch which removes HASH_HIGHMEM flag from
alloc_large_system_hash() call.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 20:44:22 -07:00
Stephen Hemminger 8b5cc5ef40 [IPX]: Header length validation needed
This patch will linearize and check there is enough data.
It handles the pprop case as well as avoiding a whole audit of
the routing code.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 20:09:20 -07:00
Christoph Hellwig d14cc9a342 [TG3]: skb->dev assignment is done by netdev_alloc_skb
All caller of netdev_alloc_skb need to assign skb->dev shortly
afterwards.  Move it into common code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 16:11:48 -07:00
Christoph Hellwig 7b2e497a06 [NET]: Assign skb->dev in netdev_alloc_skb
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 16:09:04 -07:00
Christoph Hellwig 766ea8cce0 [NET]: Fix alloc_skb comment typo
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-08-07 15:49:53 -07:00
Greg Kroah-Hartman 20dbfad8e5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-2.6.18 2006-08-07 13:39:55 -07:00
Sam Ravnborg 9ee4e3365d kbuild: external modules shall not check config consistency
external modules needs include/linux/autoconf.h and include/config/auto.conf
but skip the integrity test of these. Even with a newer Kconfig file we
shall just proceed since external modules simply uses the kernel source and
shall not attempt to modify it.
Error out if a config fiel is missing since they are mandatory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-08-07 21:01:36 +02:00
Sam Ravnborg 58a2f7d85a kbuild: do not try to build content of initramfs
When a file supplied via CONFIG_INITRAMFS pointed to a file
for which kbuild had a rule to compile it (foo.c => foo.o)
then kbuild would compile the file before adding the
file to the initramfs.

Teach make that files included in initramfs shall not be updated by adding
an 'empty command'. (See "Using Empty Commands" in info make).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-08-07 20:58:28 +02:00
Greg Kroah-Hartman 8b384b81e2 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2006-08-07 10:26:49 -07:00
Peter Oberparleiter 65200c291c [S390] lost interrupt after chpid vary off/on cycle.
I/O on a CCW device may stall if a channel path to that device is
logicaly varied off/on. A user I/O interrupt can get misinterpreted
as interrupt for an internal path verification operation due to a
missing check and is therefore never reported to the device driver.

Correct check for pending interruptions before starting path
verification.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-08-07 17:00:33 +02:00
Cornelia Huck 4bc0c4f9e7 [S390] retry after deferred condition code.
Do a retry of read device characteristics / read configuration
data when a deferred condition code 1 is encountered in
ccw_device_wake_up().

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-08-07 17:00:30 +02:00
Heiko Carstens 25a2001a28 [S390] tape class return value handling.
Without this patch register_tape_dev() will always fail, but might
return a value that is not an error number. This will lead to accesses
to already freed memory areas...

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-08-07 17:00:28 +02:00
Greg Kroah-Hartman dbd43d0864 Merge branch 'master' of /home/greg/linux/git/torvalds-2.6/ 2006-08-06 15:44:39 -07:00
Linus Torvalds 9f737633e6 Linux v2.6.18-rc4 2006-08-06 11:20:11 -07:00
Linus Torvalds 6e1e63259b Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (24 commits)
  Input: ati_remote - use msec instead of jiffies
  Input: ati_remote - add missing input_sync()
  Input: ati_remote - relax permissions sysfs module parameters
  Input: ati_remote - make filter time a module parameter
  Input: atkbd - restore repeat rate when resuming
  Input: trackpoint - activate protocol when resuming
  Input: logips2pp - fix button mapping for MX300
  Input: keyboard - change to use kzalloc
  Input: serio/gameport - check whether driver core calls succeeded
  Input: spaceball - make 4000FLX Lefty work
  Input: keyboard - simplify emulate_raw() implementation
  Input: keyboard - remove static variable and clean up initialization
  Input: hiddev - use standard list implementation
  Input: add missing handler->start() call
  Input: HID - fix potential out-of-bound array access
  Input: fix list iteration in input_release_device()
  Input: iforce - add Trust Force Feedback Race Master support
  Input: iforce - check array bounds before accessing elements
  Input: libps2 - warn instead of oopsing when passed bad arguments
  Input: fm801-gp - fix use after free
  ...
2006-08-06 09:12:49 -07:00
Linus Torvalds a05ef8bfdc Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa:
  [ALSA] Don't reject O_RDWR at opening PCM OSS with read/write-only device
  [ALSA] snd-emu10k1: Implement support for Audigy 2 ZS [SB0353]
  [ALSA] add MAINTAINERS entry for snd-aoa
  [ALSA] aoa: platform function gpio: ignore errors from functions that don't exist
  [ALSA] make snd-powermac load even when it can't bind the device
  [ALSA] aoa: fix toonie codec
  [ALSA] aoa: feature gpio layer: fix IRQ access
  [ALSA] Conversions from kmalloc+memset to k(z|c)alloc
  [ALSA] snd-emu10k1: Fixes ALSA bug#2190
2006-08-06 09:11:57 -07:00
Linus Torvalds cb3f1e7b83 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [LAPB]: Fix windowsize check
  [TCP]: Fixes IW > 2 cases when TCP is application limited
  [PKT_SCHED] RED: Fix overflow in calculation of queue average
  [LLX]: SOCK_DGRAM interface fixes
  [PKT_SCHED]: Return ENOENT if qdisc module is unavailable
  [BRIDGE]: netlink status fix
2006-08-06 08:58:24 -07:00
David Woodhouse 3e3183bab0 [PATCH] SCX200_ACB: eliminate spurious timeout errors
While busy-waiting for completion, check the hardware after scheduling;
don't schedule and then immediately check the _timeout_.  If the yield()
took a long time (as it does on my OLPC prototype board when it's busy),
we'd report a timeout even though the hardware was now ready.

This fixes it, and also switches the yield() for a cond_resched() because
we don't actually want to be _that_ nice about it.  I see nice
tightly-packed SMBus transactions now, rather than waiting for milliseconds
between successive phases.

Actually, we shouldn't be busy-waiting here at all.  We should be using
interrupts.  That's an exercise for another day though.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Christer Weinigel <wingel@nano-system.com>
Cc: <Jordan.Crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-06 08:57:49 -07:00
Eric Sandeen 225add6196 [PATCH] udf: initialize parts of inode earlier in create
I saw an oops down this path when trying to create a new file on a UDF
filesystem which was internally marked as readonly, but mounted rw:

udf_create
        udf_new_inode
                new_inode
                        alloc_inode
                        	udf_alloc_inode
                udf_new_block
                        returns EIO due to readonlyness
                iput (on error)
                        udf_put_inode
                                udf_discard_prealloc
                                        udf_next_aext
                                                udf_current_aext
                                                        udf_get_fileshortad
                                                                OOPS

the udf_discard_prealloc() path was examining uninitialized fields of the
udf inode.

udf_discard_prealloc() already has this code to short-circuit the discard
path if no extents are preallocated:

        if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB ||
                inode->i_size == UDF_I_LENEXTENTS(inode))
        {
                return;
        }

so if we initialize UDF_I_LENEXTENTS(inode) = 0 earlier in udf_new_inode,
we won't try to free the (not) preallocated blocks, since this will match
the i_size = 0 set when the inode was initialized.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-06 08:57:49 -07:00
Thomas Gleixner ce2c6b5384 [PATCH] futex: Apply recent futex fixes to futex_compat
The recent fixups in futex.c need to be applied to futex_compat.c too.  Fixes
a hang reported by Olaf.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-06 08:57:49 -07:00