]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agonetdevice: Fix typo of dev_unicast_add() comment
Wang Chen [Sat, 28 Jun 2008 02:35:16 +0000 (19:35 -0700)]
netdevice: Fix typo of dev_unicast_add() comment

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoaf_unix: fix 'poll for write'/connected DGRAM sockets
Rainer Weikusat [Sat, 28 Jun 2008 02:34:18 +0000 (19:34 -0700)]
af_unix: fix 'poll for write'/connected DGRAM sockets

For n:1 'datagram connections' (eg /dev/log), the unix_dgram_sendmsg
routine implements a form of receiver-imposed flow control by
comparing the length of the receive queue of the 'peer socket' with
the max_ack_backlog value stored in the corresponding sock structure,
either blocking the thread which caused the send-routine to be called
or returning EAGAIN. This routine is used by both SOCK_DGRAM and
SOCK_SEQPACKET sockets. The poll-implementation for these socket types
is datagram_poll from core/datagram.c. A socket is deemed to be
writeable by this routine when the memory presently consumed by
datagrams owned by it is less than the configured socket send buffer
size. This is always wrong for PF_UNIX non-stream sockets connected to
server sockets dealing with (potentially) multiple clients if the
abovementioned receive queue is currently considered to be full.
'poll' will then return, indicating that the socket is writeable, but
a subsequent write result in EAGAIN, effectively causing an (usual)
application to 'poll for writeability by repeated send request with
O_NONBLOCK set' until it has consumed its time quantum.

The change below uses a suitably modified variant of the datagram_poll
routines for both type of PF_UNIX sockets, which tests if the
recv-queue of the peer a socket is connected to is presently
considered to be 'full' as part of the 'is this socket
writeable'-checking code. The socket being polled is additionally
put onto the peer_wait wait queue associated with its peer, because the
unix_dgram_recvmsg routine does a wake up on this queue after a
datagram was received and the 'other wakeup call' is done implicitly
as part of skb destruction, meaning, a process blocked in poll
because of a full peer receive queue could otherwise sleep forever
if no datagram owned by its socket was already sitting on this queue.
Among this change is a small (inline) helper routine named
'unix_recvq_full', which consolidates the actual testing code (in three
different places) into a single location.

Signed-off-by: Rainer Weikusat <rweikusat@mssgmbh.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: fix for splice receive when used with software LRO
Octavian Purdila [Sat, 28 Jun 2008 00:27:21 +0000 (17:27 -0700)]
tcp: fix for splice receive when used with software LRO

If an skb has nr_frags set to zero but its frag_list is not empty (as
it can happen if software LRO is enabled), and a previous
tcp_read_sock has consumed the linear part of the skb, then
__skb_splice_bits:

(a) incorrectly reports an error and

(b) forgets to update the offset to account for the linear part

Any of the two problems will cause the subsequent __skb_splice_bits
call (the one that handles the frag_list skbs) to either skip data,
or, if the unadjusted offset is greater then the size of the next skb
in the frag_list, make tcp_splice_read loop forever.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: calculate tcp_mem based on low memory instead of all memory
Miquel van Smoorenburg [Sat, 28 Jun 2008 00:23:57 +0000 (17:23 -0700)]
tcp: calculate tcp_mem based on low memory instead of all memory

The tcp_mem array which contains limits on the total amount of memory
used by TCP sockets is calculated based on nr_all_pages.  On a 32 bits
x86 system, we should base this on the number of lowmem pages.

Signed-off-by: Miquel van Smoorenburg <miquels@cistron.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agohamradio: remove unused variable
Andre Haupt [Sat, 28 Jun 2008 00:22:08 +0000 (17:22 -0700)]
hamradio: remove unused variable

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoFix error paths if md_probe fails.
Neil Brown [Fri, 27 Jun 2008 22:31:17 +0000 (08:31 +1000)]
Fix error paths if md_probe fails.

md_probe can fail (e.g. alloc_disk could fail) without
returning an error (as it alway returns NULL).
So when we call mddev_find immediately afterwards, we need
to check that md_probe actually succeeded.  This means checking
that mdev->gendisk is non-NULL.

cc: <stable@kernel.org>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agoDon't acknowlege that stripe-expand is complete until it really is.
Neil Brown [Fri, 27 Jun 2008 22:31:14 +0000 (08:31 +1000)]
Don't acknowlege that stripe-expand is complete until it really is.

We shouldn't acknowledge that a stripe has been expanded (When
reshaping a raid5 by adding a device) until the moved data has
actually been written out.  However we are currently
acknowledging (by calling md_done_sync) when the POST_XOR
is complete and before the write.

So track in s.locked whether there are pending writes, and don't
call md_done_sync yet if there are.

Note: we all set R5_LOCKED on devices which are are about to
read from.  This probably isn't technically necessary, but is
usually done when writing a block, and justifies the use of
s.locked here.

This bug can lead to a crash if an array is stopped while an reshape
is in progress.

Cc: <stable@kernel.org>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agoEnsure interrupted recovery completed properly (v1 metadata plus bitmap)
Neil Brown [Fri, 27 Jun 2008 22:30:52 +0000 (08:30 +1000)]
Ensure interrupted recovery completed properly (v1 metadata plus bitmap)

If, while assembling an array, we find a device which is not fully
in-sync with the array, it is important to set the "fullsync" flags.
This is an exact analog to the setting of this flag in hot_add_disk
methods.

Currently, only v1.x metadata supports having devices in an array
which are not fully in-sync (it keep track of how in sync they are).
The 'fullsync' flag only makes a difference when a write-intent bitmap
is being used.  In this case it tells recovery to ignore the bitmap
and recovery all blocks.

This fix is already in place for raid1, but not raid5/6 or raid10.

So without this fix, a raid1 ir raid4/5/6 array with version 1.x
metadata and a write intent bitmaps, that is stopped in the middle
of a recovery, will appear to complete the recovery instantly
after it is reassembled, but the recovery will not be correct.

If you might have an array like that, issueing
   echo repair > /sys/block/mdXX/md/sync_action

will make sure recovery completes properly.

Cc: <stable@kernel.org>
Signed-off-by: Neil Brown <neilb@suse.de>
16 years agokbuild: fix a.out.h export to userspace with O= build.
David Woodhouse [Fri, 27 Jun 2008 13:39:42 +0000 (14:39 +0100)]
kbuild: fix a.out.h export to userspace with O= build.

We need to check for existence of the a.out.h header in the source tree,
not the object tree, if we want it to get the right answer with O=.

Signed-off-by: David Woodhouse <david.woodhouse@intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agofirewire: fw-sbp2: fix parsing of logical unit directories
Richard Sharpe [Wed, 25 Jun 2008 02:11:13 +0000 (19:11 -0700)]
firewire: fw-sbp2: fix parsing of logical unit directories

There is a small off-by-one bug in firewire-sbp2. This causes problems
when a device exports multiple LUN Directories. I found it when trying
to talk to a SONY DVD Jukebox.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Acked-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (op. order, changelog)
16 years agomac80211: fix an oops in several failure paths in key allocation
Emmanuel Grumbach [Thu, 26 Jun 2008 09:13:46 +0000 (12:13 +0300)]
mac80211: fix an oops in several failure paths in key allocation

This patch fixes an oops in several failure paths in key allocation. This
Oops occurs when freeing a key that has not been linked yet, so the
key->sdata is not set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoprism: islpci_eth.c endianness fix
Harvey Harrison [Wed, 25 Jun 2008 21:20:37 +0000 (14:20 -0700)]
prism: islpci_eth.c endianness fix

clock is already cpu-endian (see le32_to_cpu slightly before), so
le64_to_cpu doesn't make much sense.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix lock dependency errror
Ivo van Doorn [Wed, 25 Jun 2008 19:27:00 +0000 (21:27 +0200)]
rt2x00: Fix lock dependency errror

This fixes a circular locking dependency in the workqueue handling.
The interface work task uses the mac80211 function
ieee80211_iterate_active_interfaces() which grabs the RTNL lock.

However when the interface is brough down, this happens under the RTNL
lock as well, this causes problems because mac80211 will flush the workqueue
during the ifdown event. This causes mac80211 to wait until the driver has
completed all work which can't finish because it is waiting on the RTNL lock.

This is fixed by moving rt2x00 workqueue tasks on a different workqueue,
this workqueue can be flushed when the ieee80211_hw structure is removed
by the driver (when the driver is unloaded) which does not happen under the
RTNL lock.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Fri, 27 Jun 2008 11:26:58 +0000 (04:26 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6

16 years agoMerge branch 'core/debugobjects' into core/urgent
Ingo Molnar [Fri, 27 Jun 2008 08:36:21 +0000 (10:36 +0200)]
Merge branch 'core/debugobjects' into core/urgent

16 years agoHold RTNL while calling dev_close()
Ben Hutchings [Tue, 6 May 2008 18:41:48 +0000 (19:41 +0100)]
Hold RTNL while calling dev_close()

dev_close() must be called holding the RTNL.  Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoqla3xxx: Hold RTNL while calling dev_close()
Ben Hutchings [Tue, 6 May 2008 18:36:26 +0000 (19:36 +0100)]
qla3xxx: Hold RTNL while calling dev_close()

dev_close() must be called holding the RTNL.  Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] Fix IOMMU overflow checking in s2io.c
Andi Kleen [Wed, 18 Jun 2008 11:58:36 +0000 (13:58 +0200)]
[netdrvr] Fix IOMMU overflow checking in s2io.c

s2io has IOMMU overflow checking, but unfortunately it is wrong.

It didn't use the standard macros, which meant that it only worked
on POWER and SPARC because only those define DMA_ERROR_CODE. Convert it to
use the standard macros instead.

I also commented two more bugs in the IOMMU handling. It assumes
that 0 DMA addresses cannot happen, but that's not true in all IOMMU setups.
The information if a buffer has been already mapped needs to be stored
elsewhere.

Didn't fix those because it needs careful checking of the buffer handling
by the maintainers.

Cc: ram.vepa@neterion.com
Cc: santosh.rastapur@neterion.com
Cc: sivakumar.subramani@neterion.com
Cc: sreenivasa.honnur@neterion.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000: only enable TSO6 via ethtool when using correct hardware
Andy Gospodarek [Thu, 19 Jun 2008 21:19:02 +0000 (17:19 -0400)]
e1000: only enable TSO6 via ethtool when using correct hardware

When enabling TSO via ethool on e1000, it is possible to set
NETIF_F_TSO6 on hardware that does not support it.  Setting TSO via
ethtool now matches the settings used when the hardware is probed.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe100: Do pci_dma_sync after skb_alloc for proper operation on ixp4xx
Kevin Hao [Sat, 21 Jun 2008 10:20:35 +0000 (18:20 +0800)]
e100: Do pci_dma_sync after skb_alloc for proper operation on ixp4xx

The E100 device can't work on current kernel (2.6.26-rc6) and will cause
kernel corruption on intel ixdp4xx.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] netxen: fix netxen_pci_tbl[] breakage
Al Viro [Mon, 23 Jun 2008 01:04:50 +0000 (02:04 +0100)]
[netdrvr] netxen: fix netxen_pci_tbl[] breakage

PCI_DEVICE_CLASS sets .device and .vendor to PCI_ANY_DEV,
which overrides the effect of preceding PCI_DEVICE() and makes
all elements of netxen_pci_tbl[] identical.  Introduced in the
commit dcd56fdbaeae1008044687b973c4a3e852e8a726.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] 3c59x: remove irqs_disabled warning from local_bh_enable
Ingo Molnar [Mon, 23 Jun 2008 08:41:23 +0000 (10:41 +0200)]
[netdrvr] 3c59x: remove irqs_disabled warning from local_bh_enable

Original Author: Michael Buesch <mb@bu3sch.de>

net, vortex: fix lockup

Ingo Molnar reported:

-tip testing found that Johannes Berg's "softirq: remove irqs_disabled
warning from local_bh_enable" enhancement to lockdep triggers a new
warning on an old testbox that uses 3c59x vortex and netlogging:

----->
    calling  vortex_init+0x0/0xb0
    PCI: Found IRQ 10 for device 0000:00:0b.0
    PCI: Sharing IRQ 10 with 0000:00:0a.0
    PCI: Sharing IRQ 10 with 0000:00:0b.1
    3c59x: Donald Becker and others.
    0000:00:0b.0: 3Com PCI 3c556 Laptop Tornado at e0800400.
    PCI: Enabling bus mastering for device 0000:00:0b.0
    initcall vortex_init+0x0/0xb0 returned 0 after 47 msecs
...
    calling  init_netconsole+0x0/0x1b0
    netconsole: local port 4444
    netconsole: local IP 10.0.1.9
    netconsole: interface eth0
    netconsole: remote port 4444
    netconsole: remote IP 10.0.1.16
    netconsole: remote ethernet address 00:19:xx:xx:xx:xx
    netconsole: device eth0 not up yet, forcing it
    eth0:  setting half-duplex.
    eth0:  setting full-duplex.
------------[ cut here ]------------
    WARNING: at kernel/softirq.c:137 local_bh_enable_ip+0xd1/0xe0()
    Pid: 1, comm: swapper Not tainted 2.6.26-rc6-tip #2091
     [<c0125ecf>] warn_on_slowpath+0x4f/0x70
     [<c0126834>] ? release_console_sem+0x1b4/0x1d0
     [<c0126d00>] ? vprintk+0x2a0/0x450
     [<c012fde5>] ? __mod_timer+0xa5/0xc0
     [<c046f7fd>] ? mdio_sync+0x3d/0x50
     [<c0160ef6>] ? marker_probe_cb+0x46/0xa0
     [<c0126ed7>] ? printk+0x27/0x50
     [<c046f4c3>] ? vortex_set_duplex+0x43/0xc0
     [<c046f521>] ? vortex_set_duplex+0xa1/0xc0
     [<c0471b92>] ? vortex_timer+0xe2/0x3e0
     [<c012b361>] local_bh_enable_ip+0xd1/0xe0
     [<c08d9f9f>] _spin_unlock_bh+0x2f/0x40
     [<c0471b92>] vortex_timer+0xe2/0x3e0
     [<c014743b>] ? trace_hardirqs_on+0xb/0x10
     [<c0147358>] ? trace_hardirqs_on_caller+0x88/0x160
     [<c012f8b2>] run_timer_softirq+0x162/0x1c0
     [<c0471ab0>] ? vortex_timer+0x0/0x3e0
     [<c012b361>] local_bh_enable_ip+0xd1/0xe0
     [<c08d9f9f>] _spin_unlock_bh+0x2f/0x40
     [<c0471b92>] vortex_timer+0xe2/0x3e0
     [<c014743b>] ? trace_hardirqs_on+0xb/0x10
     [<c0147358>] ? trace_hardirqs_on_caller+0x88/0x160
     [<c012f8b2>] run_timer_softirq+0x162/0x1c0
     [<c0471ab0>] ? vortex_timer+0x0/0x3e0
     [<c0471ab0>] ? vortex_timer+0x0/0x3e0
     [<c012b60a>] __do_softirq+0x9a/0x160
     [<c012b570>] ? __do_softirq+0x0/0x160
     [<c0106775>] call_on_stack+0x15/0x30
     [<c012b4f5>] ? irq_exit+0x55/0x60
     [<c0106e85>] ? do_IRQ+0x85/0xd0
     [<c0147391>] ? trace_hardirqs_on_caller+0xc1/0x160
     [<c0104888>] ? common_interrupt+0x28/0x30
     [<c08d8ac8>] ? mutex_unlock+0x8/0x10
     [<c08d8180>] ? _cond_resched+0x10/0x30
     [<c07a3be7>] ? netpoll_setup+0x117/0x390
     [<c0cbfcfe>] ? init_netconsole+0x14e/0x1b0
     [<c013d539>] ? ktime_get+0x19/0x40
     [<c0c9bab2>] ? kernel_init+0x1b2/0x2c0
     [<c0cbfbb0>] ? init_netconsole+0x0/0x1b0
     [<c0396aa4>] ? trace_hardirqs_on_thunk+0xc/0x10
     [<c0103f12>] ? restore_nocheck_notrace+0x0/0xe
     [<c0c9b900>] ? kernel_init+0x0/0x2c0
     [<c0c9b900>] ? kernel_init+0x0/0x2c0
     [<c0104aa7>] ? kernel_thread_helper+0x7/0x10
     =======================
---[ end trace 37f9c502aff112e0 ]---
    console [netcon0] enabled
    netconsole: network logging started
    initcall init_netconsole+0x0/0x1b0 returned 0 after 2914 msecs

looking at the driver I think the bug is real and the fix actually
is trivial.

vp->lock is also taken in hardware IRQ context, so we _have_ to always
use irqsafe locking. As we run in a timer with IRQs disabled,
we can simply use spin_lock.

Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: use NULL, not zero, for pointers
Pekka Enberg [Mon, 23 Jun 2008 11:34:50 +0000 (14:34 +0300)]
ipg: use NULL, not zero, for pointers

Fixes a sparse warning in a code block that's hidden under JUMBO_FRAME #ifdef.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipg: fix jumbo frame compilation
Pekka Enberg [Mon, 23 Jun 2008 11:34:29 +0000 (14:34 +0300)]
ipg: fix jumbo frame compilation

Make jumbo frame support compile again. It was broken by the cleanup series
before the merge because the code is hidden under JUMBO_FRAME #ifdef.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agodrivers/net/r6040.c: Eliminate double sizeof
Julia Lawall [Mon, 23 Jun 2008 21:12:31 +0000 (23:12 +0200)]
drivers/net/r6040.c: Eliminate double sizeof

Taking sizeof the result of sizeof is quite strange and does not seem to be
what is wanted here.

This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E;
@@

- sizeof (
  sizeof (E)
- )
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agopcnet_cs, axnet_cs: clear bogus interrupt before request_irq
Komuro [Sat, 7 Jun 2008 12:37:56 +0000 (21:37 +0900)]
pcnet_cs, axnet_cs: clear bogus interrupt before request_irq

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: fix EEH recovery during reset on PPC
Jeff Kirsher [Wed, 25 Jun 2008 00:01:29 +0000 (17:01 -0700)]
e1000e: fix EEH recovery during reset on PPC

EEH is not recovering in a reasonable amount of time on PPC during
e1000e_down().

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: fix EEH recovery during reset on PPC
Jeff Kirsher [Wed, 25 Jun 2008 00:01:15 +0000 (17:01 -0700)]
igb: fix EEH recovery during reset on PPC

EEH is not recovering in a reasonable amount of time on PPC during
igb_down().

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoixgbe: fix EEH recovery during reset on PPC
Paul Larson [Wed, 25 Jun 2008 00:00:56 +0000 (17:00 -0700)]
ixgbe: fix EEH recovery during reset on PPC

EEh is not recovering in a resonable amount of time on PPC during
ixgbe_down().

Signed-off-by: Paul Larson <pl@us.ibm.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Fix receiver hangup on Rx FIFO overflow
Atsushi Nemoto [Thu, 26 Jun 2008 08:14:15 +0000 (17:14 +0900)]
tc35815: Fix receiver hangup on Rx FIFO overflow

On Rx FIFO overflow error, the controller consume a buffer descriptor
but currently the driver does not give it back to the controller.
This results unrecoverable 'Buffer List Exhausted' condition.  This
patch fix this problem by moving a "fbl_count--" line to proper place.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotc35815: Mark carrier-off before starting PHY
Atsushi Nemoto [Wed, 25 Jun 2008 02:41:01 +0000 (11:41 +0900)]
tc35815: Mark carrier-off before starting PHY

Call netif_carrier_off() before starting PHY device.  This is a
behavior before converting to generic PHY layer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agos2io: fix documentation about intr_type
Michal Schmidt [Thu, 26 Jun 2008 14:06:19 +0000 (16:06 +0200)]
s2io: fix documentation about intr_type

The documentation for intr_type module parameter of the s2io driver is
not consistent with the code. The comments in drivers/net/s2io.c are
OK, but Documentation/networking/s2io.txt is wrong.

Pointed out by Andrew Hecox.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoV4L/DVB (8108): Fix open/close race in saa7134
Arjan van de Ven [Sun, 22 Jun 2008 20:03:02 +0000 (17:03 -0300)]
V4L/DVB (8108): Fix open/close race in saa7134

The saa7134 driver uses a (non-atomic) variable in an attempt to
only allow one opener of the device (how it deals with sending
the fd over unix sockets I don't know).

Unfortunately, the release function first decrements this variable,
and THEN goes on to disable more of the device. This allows for
a race where another opener of the device comes in after the decrement of
the variable, configures the hardware just to then see the hardware
be disabled by the rest of the release function.

This patch makes the release function use the same lock as the open
function to protect the hardware as well as the variable (which now
at least has some locking to protect it).

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8100): V4L/vivi: fix possible memory leak in vivi_fillbuff
Marcin Slusarz [Sun, 22 Jun 2008 12:11:40 +0000 (09:11 -0300)]
V4L/DVB (8100): V4L/vivi: fix possible memory leak in vivi_fillbuff

Move allocation after first check and fix memory leak.

Noticed-by: Daniel Marjamäki <danielm77@spray.se>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8097): xc5000: check device hardware state to determine if firmware download...
Steven Toth [Sun, 22 Jun 2008 00:06:02 +0000 (21:06 -0300)]
V4L/DVB (8097): xc5000: check device hardware state to determine if firmware download is needed

This patch ensures that the xc5000 will have firmware loaded as needed if the
part is powered down or reset via gpio from the host. An example of this, in
some cases, could be after the system resumes from standby or hibernate modes.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8096): au8522: prevent false-positive lock status
Steven Toth [Sat, 21 Jun 2008 22:32:41 +0000 (19:32 -0300)]
V4L/DVB (8096): au8522: prevent false-positive lock status

This decreases scan time in Queens, New York from 28 minutes to 7 minutes,
with the exact same services found.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8092): videodev: simplify and fix standard enumeration
Hans Verkuil [Sat, 21 Jun 2008 16:23:27 +0000 (13:23 -0300)]
V4L/DVB (8092): videodev: simplify and fix standard enumeration

VIDIOC_ENUMSTD did not return all the PAL/SECAM/NTSC variants: it just returned
one single PAL/SECAM/NTSC standard without separate entries for the trickier
standards like NTSC-JP.

Changed the code so that it behaves better.

Also simplified the if/switch statements into a common standards lookup table.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed
Oliver Endriss [Fri, 20 Jun 2008 02:25:04 +0000 (23:25 -0300)]
V4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed

Fix uncorrected block counter and bit error rate to follow DVB API spec:
- Unsupported controls return -ENOSYS.
- UNC must never be set to 0.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8074): av7110: OSD transfers should not be interrupted
Oliver Endriss [Fri, 20 Jun 2008 02:10:14 +0000 (23:10 -0300)]
V4L/DVB (8074): av7110: OSD transfers should not be interrupted

OSD transfers should not be interrupted.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8073): av7110: Catch another type of ARM crash
Oliver Endriss [Fri, 20 Jun 2008 02:04:27 +0000 (23:04 -0300)]
V4L/DVB (8073): av7110: Catch another type of ARM crash

Catch another type of ARM crash.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation
Oliver Endriss [Fri, 20 Jun 2008 01:45:55 +0000 (22:45 -0300)]
V4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation

If the i2c write fails during initialisation, an oops happens
because state->frontend.dvb is still undefined. Fixed.

Thanks to Sigmund Augdal for reporting this bug,
and to Hartmut Birr for suggesting the fix.

Thanks-to: Sigmund Augdal <sigmund@snap.tv>
Thanks-to: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8069): cx18: Fix S-Video and Compsite inputs for the Yuan MPC718 and enable...
Andy Walls [Sun, 22 Jun 2008 05:00:09 +0000 (02:00 -0300)]
V4L/DVB (8069): cx18: Fix S-Video and Compsite inputs for the Yuan MPC718 and enable card entry

cx18: Fix S-Video and Compsite input settings for the Yuan MPC718 per user
reports from Yuri Warczynski <Yuri.Warczynski@gmail.com> and
Brian Hope <brian@hopefamily.info> and enable the card entry.  The tuner reset
GPIO pin is likely incorrect as the tuner firmware cannot be reloaded without a
reboot.  It is likely the audio routing is done via GPIO which is not
implemented yet, as users report audio doesn't work for some inputs.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8068): cx18: Add I2C slave reset via GPIO upon initialization
Andy Walls [Sun, 22 Jun 2008 04:27:00 +0000 (01:27 -0300)]
V4L/DVB (8068): cx18: Add I2C slave reset via GPIO upon initialization

cx18: Add I2C slave reset via GPIO upon initialization.  One user,
Michael <msd4824@yahoo.com>, has reported this allows his HVR-1600 EEPROM to
be consistently recognized when using (long,) 100 msec delays.   The delays in
this commit are nominal (10 & 40 msec) and need testing/tuning on boards with
I2C problems to find the right values.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8067): cx18: Fix firmware load for case when digital capture happens first
Andy Walls [Sun, 22 Jun 2008 03:04:21 +0000 (00:04 -0300)]
V4L/DVB (8067): cx18: Fix firmware load for case when digital capture happens first

This is a fix for the case when a digital capture from dvr0 happens first after
modprobe, before access to any cx18 v4l2 device nodes.  The initial dvb feed
start has been changed to load the firmware if not already loaded.  Also fixed a
use counter to correct dvb feed accounting if starting the transport DMA fails.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8066): cx18: Fix audio mux input definitions for HVR-1600 Line In 2 and...
Andy Walls [Fri, 20 Jun 2008 02:17:05 +0000 (23:17 -0300)]
V4L/DVB (8066): cx18: Fix audio mux input definitions for HVR-1600 Line In 2 and FM radio

Fix the cx18-cards.c structures for the HVR-1600 to reflect that audio Line In 2
and FM radio audio go to AIN3 and AIN4 of the CS5345 mux respectively.  Verified
by physical inspection of an HVR-1600MCE, by listening to FM broadcasts with the
HVR-1600MCE, and by comparing with the card definition for a PVR-150 in ivtv.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8063): cx18: Fix unintended auto configurations in cx18-av-core
Andy Walls [Sat, 14 Jun 2008 06:58:08 +0000 (03:58 -0300)]
V4L/DVB (8063): cx18: Fix unintended auto configurations in cx18-av-core

Change the cx18-av-core code so that accesses to cx23418 av core that
cause auto-configuration will be adjusted to emulate the auto-configuration
behavior of the cx25843.  This fixes the VBI displayed as video at the top of
the frame for NTSC and probably other things.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8061): cx18: only select tuner / frontend modules if !DVB_FE_CUSTOMISE
Michael Krufky [Tue, 17 Jun 2008 20:37:51 +0000 (17:37 -0300)]
V4L/DVB (8061): cx18: only select tuner / frontend modules if !DVB_FE_CUSTOMISE

The automatic Kconfig selection for tuners and frontends should be
conditional, based on !DVB_FE_CUSTOMISE.

This patch corrects the selection for VIDEO_CX18 on
MEDIA_TUNER_MXL5005S and DVB_S5H1409

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8048): saa7134: Fix entries for Avermedia A16d and Avermedia E506
Tim Farrington [Sun, 15 Jun 2008 16:33:42 +0000 (13:33 -0300)]
V4L/DVB (8048): saa7134: Fix entries for Avermedia A16d and Avermedia E506

Also, adds IR table for Avermedia A16d

Signed-off-by: Tim Farrington <timf@iinet.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8044): au8522: tuning optimizations
Michael Krufky [Fri, 13 Jun 2008 23:33:23 +0000 (20:33 -0300)]
V4L/DVB (8044): au8522: tuning optimizations

If the current modulation and frequency is already set to
the desired parameters, then don't re-tune.

Don't store current frequency until after we've tuned successfully.

Force a re-tune after resume from standby.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8043): au0828: add support for additional USB device id's
Michael Krufky [Fri, 13 Jun 2008 06:29:43 +0000 (03:29 -0300)]
V4L/DVB (8043): au0828: add support for additional USB device id's

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8042): DVB-USB UMT-010 channel scan oops
Austin Lund [Fri, 13 Jun 2008 14:02:43 +0000 (11:02 -0300)]
V4L/DVB (8042): DVB-USB UMT-010 channel scan oops

In the umt-010 driver the struct umt_properties sets the number of URBs for
transfer to 20.  But in dvb-usb.h MAX_NO_URBS_FOR_DATA_STREAM is set to 10.

Not surprisingly this causes an oops for all devices which use the umt-010
chipset when they are inserted.

fix on Kaffeine channel scan for

Initialize stream count using MAX_NO_URBS_FOR_DATA_STREAM.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8040): soc-camera: remove soc_camera_host_class class
Guennadi Liakhovetski [Fri, 13 Jun 2008 12:11:01 +0000 (09:11 -0300)]
V4L/DVB (8040): soc-camera: remove soc_camera_host_class class

Devices can either be class devices or bus devices, not both at the
same time. Soc-camera host devices usually have a platform device as
their parent. Trying to also register them with a class crashes the
kernel, when linked statically. Interestingly, it works when built
as a module. Thanks to Paulius Zaleckas for reporting.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.
Guennadi Liakhovetski [Fri, 13 Jun 2008 12:03:45 +0000 (09:03 -0300)]
V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.

platform_get_irq() returns a negative value on error, not 0.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8037): tda18271: ensure that the thermometer is off during channel configuration
Michael Krufky [Wed, 11 Jun 2008 16:52:49 +0000 (13:52 -0300)]
V4L/DVB (8037): tda18271: ensure that the thermometer is off during channel configuration

Having the thermometer on during channel configuration
could cause tuning instability.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8036): tda18271: toggle rf agc speed mode on TDA18271HD/C2 only
Michael Krufky [Mon, 9 Jun 2008 05:03:31 +0000 (02:03 -0300)]
V4L/DVB (8036): tda18271: toggle rf agc speed mode on TDA18271HD/C2 only

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8035): tda18271: dont touch EB14 if rf_cal lookup is out of range
Michael Krufky [Mon, 9 Jun 2008 01:12:37 +0000 (22:12 -0300)]
V4L/DVB (8035): tda18271: dont touch EB14 if rf_cal lookup is out of range

The TDA18271HD/C1 rf_cal map lookup is expected to go out of range outside
of the frequency window 41 MHz - 61.1 MHz.  In these cases, the internal
RF tracking filters calibration mechanism is used.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8034): tda18271: fix IF notch frequency handling
Michael Krufky [Sun, 8 Jun 2008 23:10:29 +0000 (20:10 -0300)]
V4L/DVB (8034): tda18271: fix IF notch frequency handling

The IF notch bit gets unset when we update the Main Post Div register
value, before we have a chance to write the desired IF notch setting
to the tuner.  Move the IF notch configuration to after we update MPD.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8029): Improve error message at tda1004x_attach
Mauro Carvalho Chehab [Sat, 14 Jun 2008 14:27:34 +0000 (11:27 -0300)]
V4L/DVB (8029): Improve error message at tda1004x_attach

When an error occurs at firmware loading, sometimes, tda1004x stops answering.
Instead of reporting such error, attach code were assuming that the device were
answering an invalid ID (0xff). This can be seen when enabling debug options:

tda1004x: tda1004x_read_byte: reg=0x0
tda1004x: tda1004x_read_byte: error reg=0x0, ret=-5

Now, instead of reporting an invalid ID, it will report the correct error:

tda10046: chip is not answering. Giving up.
saa7133[0]/dvb: failed to attach tda10046
saa7133[0]/dvb: frontend initialization failed

A possible improvement would be trying to reset the device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8028): Improve error messages for tda1004x attach
Mauro Carvalho Chehab [Sat, 14 Jun 2008 13:44:04 +0000 (10:44 -0300)]
V4L/DVB (8028): Improve error messages for tda1004x attach

A fresh copy of v.29 firmware, using get_firmware, is leading to an invalid
firmware:

DVB: registering new adapter (saa7133[0])
DVB: registering frontend 0 (Philips TDA10046H DVB-T)...
tda1004x: setting up plls for 48MHz sampling clock
tda1004x: found firmware revision ff -- invalid
tda1004x: trying to boot from eeprom
tda1004x: found firmware revision ff -- invalid
tda1004x: waiting for firmware upload...
tda1004x: Error during firmware upload
tda1004x: found firmware revision ff -- invalid
tda1004x: firmware upload failed

Sometimes, loading/unloading this firmware makes tda1004x to return an invalid
ID. However, there were no printk messages to help to identify what were the
cause for the error.

With this patch, it will now print:

Invalid tda1004x ID = 0xff. Can't proceed
saa7133[0]/dvb: failed to attach tda10046
saa7133[0]/dvb: frontend initialization failed

Tested with LifeView FlyDVB-T Hybrid Cardbus/MSI TV @nywhere A/D NB

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8027): saa7134: Avermedia A700: only s-video and composite input are working
Matthias Schwarzott [Fri, 13 Jun 2008 22:28:17 +0000 (19:28 -0300)]
V4L/DVB (8027): saa7134: Avermedia A700: only s-video and composite input are working

Describe exactly that only s-video and composite input are working on Avermedia
A700

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8026): Avoids an OOPS if dev struct can't be successfully recovered
Mauro Carvalho Chehab [Sat, 14 Jun 2008 12:41:18 +0000 (09:41 -0300)]
V4L/DVB (8026): Avoids an OOPS if dev struct can't be successfully recovered

On some alsa versions, it seems that snd_pcm_substream_chip(substream)
is returning a NULL pointer. This causes an OOPS, as reported by:

https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/212271
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/212960

This patch avoids the OOPS by not letting and open() succeed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8022): saa7134: fix race between opening and closing the device
Marcin Slusarz [Tue, 10 Jun 2008 18:18:16 +0000 (15:18 -0300)]
V4L/DVB (8022): saa7134: fix race between opening and closing the device

decrementing dev->empress_users should be done as last action of ts_release,
because it sleeps and write access to dev->empress_started is not protected
in any way
(additionally closing thread could mute audio after opening thread unmuted it)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8020): Fix callbacks functions of saa7134_empress
Dmitri Belimov [Tue, 10 Jun 2008 17:19:31 +0000 (14:19 -0300)]
V4L/DVB (8020): Fix callbacks functions of saa7134_empress

If I try v4l2-ctl --all -d /dev/video1 or v4l2-ctl --streamon -d /dev/video1
modules crashed:

*pde = 00000000
Modules linked in: ac battery loop saa7134_empress(F) saa6752hs(F) tuner_simple(F) tuner_types(F) tea5767(F) tda9887(F) tda8290(F) tea5761(F) tuner(F) snd_cmipci snd_pcm snd_page_alloc snd_opl3_lib saa7134(F) snd_mpu401 parport_pc parport snd_timer snd_hwdep snd_mpu401_uart floppy rtc psmouse videodev(F) v4l1_compat(F) compat_ioctl32(F) v4l2_common(F) videobuf_dma_sg(F) videobuf_core(F) snd_rawmidi snd_seq_device via_ircc pcspkr snd ir_kbd_i2c(F) irda soundcore ir_common(F) crc_ccitt tveeprom(F) i2c_viapro i2c_core button via_agp agpgart evdev ext3 jbd mbcache ide_cd_mod cdrom ide_disk 8139cp via82cxxx ide_core 8139too mii ehci_hcd uhci_hcd usbcore thermal processor fan

EIP is at __mutex_lock_slowpath+0x29/0x7b
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process v4l2-ctl (pid: 2742, ti=ced7e000 task=cf325260 task.ti=ced7e000)
       d08e5411 00000000 ced7fed4 00000000 d0975acb 40045612 cfa86ee0 ffffffcd
       cf2b7000 ced7febc c03858d6 00000019 00000292 d089e4ec cf37b2a0 d089e4a0
Call Trace:
 [<c028b52b>] mutex_lock+0xa/0xb
 [<d08e5411>] videobuf_streamon+0xf/0x9a [videobuf_core]
 [<d0975acb>] __video_do_ioctl+0x136a/0x2d68 [videodev]
 [<d088f789>] task_end_request+0x40/0x51 [ide_core]
 [<d088c4aa>] ide_intr+0x187/0x192 [ide_core]
 [<c016a551>] mntput_no_expire+0x11/0x64
 [<c0160b1c>] path_walk+0x90/0x98
 [<d0977738>] video_ioctl2+0x173/0x239 [videodev]
 [<c0140936>] filemap_fault+0x202/0x370
 [<c014930a>] __do_fault+0x2c3/0x2fe
 [<c014ab03>] handle_mm_fault+0x22a/0x49f
 [<c0162737>] vfs_ioctl+0x47/0x5d
 [<c0162992>] do_vfs_ioctl+0x245/0x258
 [<c01629e6>] sys_ioctl+0x41/0x5b
 [<c01036a6>] sysenter_past_esp+0x5f/0x85
 =======================

After this fix all of that commands works without problem:

v4l2-ctl --all -d /dev/video1

Driver Info:
Driver name   : saa7134
Card type     : Beholder BeholdTV M6 Extra
Bus info      : PCI:0000:00:0d.0
Driver version: 526
Capabilities  : 0x05000001
Video Capture
Read/Write
Streaming
Format Video Capture:
Width/Height  : 720/576
Pixel Format  : MPEG
Field         : Any
Bytes per Line: 0
Size Image    : 58656
Colorspace    : Unknown (00000000)
Video input : 0 (CCIR656)
Video Standard = 0x000000ff
PAL-B/B1/G/H/I/D/D1/K

P.S. data from /dev/video1 is not correct :(( .

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8018): Add em2860 chip ID
Devin Heitmueller [Tue, 10 Jun 2008 15:35:42 +0000 (12:35 -0300)]
V4L/DVB (8018): Add em2860 chip ID

em28xx-cards.c
em28xx-reg.h
 - Add em2860 chip ID (seen on Pointnix Intra-Oral Camera)
   http://www.pointnix.com/ENG/dental/product_02.asp

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8017): Ensure em28xx extensions only get run against devs that support them
Devin Heitmueller [Tue, 10 Jun 2008 15:34:35 +0000 (12:34 -0300)]
V4L/DVB (8017): Ensure em28xx extensions only get run against devs that support them

em28xx-audio.c
em28xx-dvb.c
 - Em28xx extensions should ensure they are being only loaded against devices
   that support them.  Deals with case where there are multiple em28xx
   devices, some of which have DVB (or ALSA) support and some do not.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8015): gl861: replace non critical msleep(0) with msleep(1) to be on the...
Antti Palosaari [Tue, 10 Jun 2008 14:41:58 +0000 (11:41 -0300)]
V4L/DVB (8015): gl861: replace non critical msleep(0) with msleep(1) to be on the safe side

- change msleep(0) to msleep(1)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8013): gl861: remove useless identify_state
Antti Palosaari [Thu, 29 May 2008 01:04:12 +0000 (22:04 -0300)]
V4L/DVB (8013): gl861: remove useless identify_state

- remove useless identify_state - device is always warm

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8012): gl861: sleep a little to avoid I2C errors
Antti Palosaari [Thu, 29 May 2008 00:55:06 +0000 (21:55 -0300)]
V4L/DVB (8012): gl861: sleep a little to avoid I2C errors

- add little sleep to avoid I2C errors arising on faster CPUs

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8011): em28xx: enable DVB for HVR-900
Devin Heitmueller [Mon, 9 Jun 2008 17:59:05 +0000 (14:59 -0300)]
V4L/DVB (8011): em28xx: enable DVB for HVR-900

em28xx-cards.c
 - DVB support is supposed to be enabled for the first generation HVR-900.
   This device was confirmed with DVB by mkrufky when we did the original work
   in April, but I guess we forgot to set the flag.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8010): em28xx: Properly register extensions for already attached devices
Devin Heitmueller [Mon, 9 Jun 2008 17:58:04 +0000 (14:58 -0300)]
V4L/DVB (8010): em28xx: Properly register extensions for already attached devices

em28xx-video.c
 - Properly handle loading of the module when multiple devices are already
   connected (such as at bootup).  Before we were only calling dvb_init()
   against the last device in the list, so while we were handling subsequent
   adds properly, if there were multiple devices present on driver load,
   everybody except the last device would not get initialized.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8008): cx18: remove duplicate audio and video input enums
Hans Verkuil [Sun, 8 Jun 2008 09:05:18 +0000 (06:05 -0300)]
V4L/DVB (8008): cx18: remove duplicate audio and video input enums

cx18-cards.h had a copy of the audio and video input enums
from cx18-av-core.h, but with different prefixes. Removed
that copy and used the ones from cx18-av-core.h.

Thanks to Andy Walls <awalls@radix.net> for the report.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8007): cx18/cx25840: the S-Video LUMA input can use all In1-In8 inputs
Hans Verkuil [Sat, 7 Jun 2008 14:18:17 +0000 (11:18 -0300)]
V4L/DVB (8007): cx18/cx25840: the S-Video LUMA input can use all In1-In8 inputs

The S-Video LUMA input was restricted to the In1-In4 inputs, but it
turns out that it can use the full range of In1-In8.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8005): Fix OOPS if frontend is null
Mauro Carvalho Chehab [Sat, 7 Jun 2008 18:54:10 +0000 (15:54 -0300)]
V4L/DVB (8005): Fix OOPS if frontend is null

Thanks to timf <timf@iinet.net.au> and Mike Galbraith <efault@gmx.de> to report
this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8004): Fix INPUT dependency at budget-ci
Mauro Carvalho Chehab [Thu, 5 Jun 2008 21:59:08 +0000 (18:59 -0300)]
V4L/DVB (8004): Fix INPUT dependency at budget-ci

As reported by Ingo Molnar:
MODPOST 346 modules
ERROR: "input_free_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_register_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_allocate_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_unregister_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_event" [drivers/media/common/ir-common.ko] undefined!

This occurs when:

CONFIG_INPUT=n
CONFIG_VIDEO_IR=m
CONFIG_DVB_BUDGET_CI=m

Thanks-to: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agox86: section/warning fixes
Daniel J Blueman [Sun, 15 Jun 2008 11:32:15 +0000 (12:32 +0100)]
x86: section/warning fixes

WARNING: arch/x86/mm/built-in.o(.text+0x3a1): Section mismatch in
reference from the function set_pte_phys() to the function
.init.text:spp_getpage()
The function set_pte_phys() references
the function __init spp_getpage().
This is often because set_pte_phys lacks a __init
annotation or the annotation of spp_getpage is wrong.

arch/x86/mm/init_64.c: In function 'early_memtest':
arch/x86/mm/init_64.c:520: warning: passing argument 2 of
'find_e820_area_size' from incompatible pointer type

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: shift bits the right way in native_read_tscp
Max Asbock [Wed, 25 Jun 2008 21:45:28 +0000 (14:45 -0700)]
x86: shift bits the right way in native_read_tscp

native_read_tscp shifts the bits in the high order value in the
wrong direction, the attached patch fixes that.

Signed-off-by: Max Asbock <masbock@linux.vnet.ibm.com>
Acked-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoMerge branches 'release', 'acpi_disabled' and 'bugzilla-10958' into release
Len Brown [Thu, 26 Jun 2008 05:56:35 +0000 (01:56 -0400)]
Merge branches 'release', 'acpi_disabled' and 'bugzilla-10958' into release

16 years agodock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.
Len Brown [Wed, 25 Jun 2008 02:57:12 +0000 (22:57 -0400)]
dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: don't walk tables if ACPI was disabled
Vegard Nossum [Fri, 20 Jun 2008 13:39:09 +0000 (15:39 +0200)]
ACPI: don't walk tables if ACPI was disabled

Ingo Molnar wrote:
> -tip auto-testing started triggering this spinlock corruption message
> yesterday:
>
> [    3.976213] calling  acpi_rtc_init+0x0/0xd3
> [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
> [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
> [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0

This is apparently because some parts of ACPI, including mutexes, are not
initialized when acpi=off is passed to the kernel.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agothermal: Create CONFIG_THERMAL_HWMON=n
Rene Herman [Tue, 24 Jun 2008 17:38:56 +0000 (19:38 +0200)]
thermal: Create CONFIG_THERMAL_HWMON=n

A bug in libsensors <= 2.10.6 is exposed
when this new hwmon I/F is enabled.
Create CONFIG_THERMAL_HWMON=n
until some time after libsensors 2.10.7 ships
so those users can run the latest kernel.

libsensors 3.x is already fixed -- those users
can use CONFIG_THERMAL_HWMON=y now.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years ago[ARM] 5117/1: pxafb: fix __devinit/exit annotations
Jaya Kumar [Sun, 22 Jun 2008 03:27:27 +0000 (04:27 +0100)]
[ARM] 5117/1: pxafb: fix __devinit/exit annotations

This patch fixes pxafb's init/exit annotations. It uses __devinit/exit for
probe functions and __init for init functions. g_options is left as
__devinitdata since it is used by both.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[SCSI] esp: tidy up target reference counting
James Bottomley [Mon, 23 Jun 2008 19:52:09 +0000 (14:52 -0500)]
[SCSI] esp: tidy up target reference counting

The esp driver currently does hand rolled reference counting of its
target.  It's much easier to do what it needs to do if it's plugged into
the mid-layer callbacks (target_alloc and target_destroy) which were
designed for this case, so do it this way and get rid of the internal
target reference count.

Acked-by: David S. Miller <davem@davemloft.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoiwlwifi: improve scanning band selection management
Ron Rindjunsky [Wed, 25 Jun 2008 08:46:31 +0000 (16:46 +0800)]
iwlwifi: improve scanning band selection management

This patch modifies the band selection management when scanning, so
bands are now scanned according to HW band support.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Fix unbalanced mutex locking
Ivo van Doorn [Fri, 20 Jun 2008 20:11:00 +0000 (22:11 +0200)]
rt2x00: Fix unbalanced mutex locking

The usb_cache_mutex was not correctly released
under all circumstances. Both rt73usb as rt2500usb
didn't release the mutex under certain conditions
when the register access failed. Obviously such
failure would lead to deadlocks.

In addition under similar circumstances when the
bbp register couldn't be read the value must be
set to 0xff to indicate that the value is wrong.
This too didn't happen under all circumstances.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43legacy: Fix possible NULL pointer dereference in DMA code
Michael Buesch [Fri, 20 Jun 2008 09:40:46 +0000 (11:40 +0200)]
b43legacy: Fix possible NULL pointer dereference in DMA code

This fixes a possible NULL pointer dereference in an error path of the
DMA allocation error checking code. This is also necessary for a future
DMA API change that is on its way into the mainline kernel that adds
an additional dev parameter to dma_mapping_error().

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Fix possible MMIO access while device is down
Michael Buesch [Sun, 15 Jun 2008 14:01:24 +0000 (16:01 +0200)]
b43: Fix possible MMIO access while device is down

This fixes a possible MMIO access while the device is still down
from a suspend cycle. MMIO accesses with the device powered down
may cause crashes on certain devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43legacy: Do not return TX_BUSY from op_tx
Michael Buesch [Sun, 15 Jun 2008 13:27:49 +0000 (15:27 +0200)]
b43legacy: Do not return TX_BUSY from op_tx

Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Do not return TX_BUSY from op_tx
Michael Buesch [Sun, 15 Jun 2008 13:17:29 +0000 (15:17 +0200)]
b43: Do not return TX_BUSY from op_tx

Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.
This will fix the resume hang.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: implement EU regulatory domain
Tony Vroon [Wed, 11 Jun 2008 20:23:56 +0000 (16:23 -0400)]
mac80211: implement EU regulatory domain

Implement missing EU regulatory domain for mac80211. Based on the
information in IEEE 802.11-2007 (specifically pages 1142, 1143 & 1148)
and ETSI 301 893 (V1.4.1).
With thanks to Johannes Berg.

Signed-off-by: Tony Vroon <tony@linx.net>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoBlackfin arch: fix up section mismatch warning
Bryan Wu [Wed, 25 Jun 2008 04:41:51 +0000 (12:41 +0800)]
Blackfin arch: fix up section mismatch warning

--
WARNING: vmlinux.o(.text+0x721a): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x7238): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x7250): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x7264): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72a2): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72bc): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72d4): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72e8): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.
--

Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: fix bug - kernel boot fails when Spinlock and rw-lock debugging enabled
Sonic Zhang [Wed, 25 Jun 2008 04:02:07 +0000 (12:02 +0800)]
Blackfin arch: fix bug - kernel boot fails when Spinlock and rw-lock debugging enabled

Initialize the lock of bad_irq_desc properly.
The content of irq_desc array is replaced by bad_irq_desc in blackfin
arch irqchip init code. So, do it properly as common irq init code.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years ago[PATCH] remove useless argument type in audit_filter_user()
Peng Haitao [Tue, 20 May 2008 01:13:02 +0000 (09:13 +0800)]
[PATCH] remove useless argument type in audit_filter_user()

The second argument "type" is not used in audit_filter_user(), so I think that type can be removed. If I'm wrong, please tell me.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] audit: fix kernel-doc parameter notation
Randy Dunlap [Mon, 19 May 2008 22:09:21 +0000 (15:09 -0700)]
[PATCH] audit: fix kernel-doc parameter notation

Fix auditfilter kernel-doc misssing parameter description:

Warning(lin2626-rc3//kernel/auditfilter.c:1551): No description found for parameter 'sessionid'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] kernel/audit.c: nlh->nlmsg_type is gotten more than once
Peng Haitao [Fri, 16 May 2008 02:15:04 +0000 (10:15 +0800)]
[PATCH] kernel/audit.c: nlh->nlmsg_type is gotten more than once

The first argument "nlh->nlmsg_type" of audit_receive_filter() should be modified to "msg_type" in audit_receive_msg().

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoLinux 2.6.26-rc8 v2.6.26-rc8
Linus Torvalds [Wed, 25 Jun 2008 01:58:20 +0000 (18:58 -0700)]
Linux 2.6.26-rc8

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 25 Jun 2008 01:12:33 +0000 (18:12 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Eliminate NULL test after alloc_bootmem in iosapic_alloc_rte()
  [IA64] Handle count==0 in sn2_ptc_proc_write()
  [IA64] Fix boot failure on ia64/sn2

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Wed, 25 Jun 2008 01:09:47 +0000 (18:09 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  [GFS2] fix gfs2 block allocation (cleaned up)
  [GFS2] BUG: unable to handle kernel paging request at ffff81002690e000

16 years agoMerge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 25 Jun 2008 01:09:06 +0000 (18:09 -0700)]
Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm

* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: Remove now unused structs from kvm_para.h
  x86: KVM guest: Use the paravirt clocksource structs and functions
  KVM: Make kvm host use the paravirt clocksource structs
  x86: Make xen use the paravirt clocksource structs and functions
  x86: Add structs and functions for paravirt clocksource
  KVM: VMX: Fix host msr corruption with preemption enabled
  KVM: ioapic: fix lost interrupt when changing a device's irq
  KVM: MMU: Fix oops on guest userspace access to guest pagetable
  KVM: MMU: large page update_pte issue with non-PAE 32-bit guests (resend)
  KVM: MMU: Fix rmap_write_protect() hugepage iteration bug
  KVM: close timer injection race window in __vcpu_run
  KVM: Fix race between timer migration and vcpu migration

16 years ago[SCSI] esp: Fix OOPS in esp_reset_cleanup().
David S. Miller [Wed, 18 Jun 2008 06:53:22 +0000 (23:53 -0700)]
[SCSI] esp: Fix OOPS in esp_reset_cleanup().

OOPS reported by Friedrich Oslage <bluebird@porno-bullen.de>

The problem here is that tp->starget is set every time a lun
is allocated for a particular target so we can catch the
sdev_target parent value.

The reset handler uses the NULL'ness of this value to determine
which targets are active.

But esp_slave_destroy() does not NULL out this value when appropriate.

So for every target that doesn't respond, the SCSI bus scan causes
a stale pointer to be left here, with ensuing crashes like you're
seeing.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agonetfilter: ip6table_mangle: don't reroute in LOCAL_IN
Patrick McHardy [Tue, 24 Jun 2008 20:30:45 +0000 (13:30 -0700)]
netfilter: ip6table_mangle: don't reroute in LOCAL_IN

Rerouting should only happen in LOCAL_OUT, in INPUT its useless
since the packet has already chosen its final destination.

Noticed by Alexey Dobriyan <adobriyan@gmail.com>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>