]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoblock: implement request_queue->dma_drain_needed
Tejun Heo [Tue, 19 Feb 2008 10:36:53 +0000 (11:36 +0100)]
block: implement request_queue->dma_drain_needed

Draining shouldn't be done for commands where overflow may indicate
data integrity issues.  Add dma_drain_needed callback to
request_queue.  Drain buffer is appened iff this function returns
non-zero.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: add request->raw_data_len
Tejun Heo [Tue, 19 Feb 2008 10:36:35 +0000 (11:36 +0100)]
block: add request->raw_data_len

With padding and draining moved into it, block layer now may extend
requests as directed by queue parameters, so now a request has two
sizes - the original request size and the extended size which matches
the size of area pointed to by bios and later by sgs.  The latter size
is what lower layers are primarily interested in when allocating,
filling up DMA tables and setting up the controller.

Both padding and draining extend the data area to accomodate
controller characteristics.  As any controller which speaks SCSI can
handle underflows, feeding larger data area is safe.

So, this patch makes the primary data length field, request->data_len,
indicate the size of full data area and add a separate length field,
request->raw_data_len, for the unmodified request size.  The latter is
used to report to higher layer (userland) and where the original
request size should be fed to the controller or device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: update bio according to DMA alignment padding
Tejun Heo [Tue, 19 Feb 2008 10:35:38 +0000 (11:35 +0100)]
block: update bio according to DMA alignment padding

DMA start address and transfer size alignment for PC requests are
achieved using bio_copy_user() instead of bio_map_user().  This works
because bio_copy_user() always uses full pages and block DMA alignment
isn't allowed to go over PAGE_SIZE.

However, the implementation didn't update the last bio of the request
to make this padding visible to lower layers.  This patch makes
blk_rq_map_user() extend the last bio such that it includes the
padding area and the size of area pointed to by the request is
properly aligned.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agolibata: update ATAPI overflow draining
Tejun Heo [Tue, 19 Feb 2008 10:35:37 +0000 (11:35 +0100)]
libata: update ATAPI overflow draining

For misc ATAPI commands which transfer variable length data to the
host, overflow can occur due to application or hardware bug.  Such
overflows can be ignored safely as long as overflow data is properly
drained.  libata HSM implementation has this implemented in
__atapi_pio_bytes() and recently updated for 2.6.24-rc but it requires
further improvements.  Improve drain logic such that...

* Report overflow errors using ehi desc mechanism instead of printing
  directly.

* Properly calculate the number of bytes to be drained considering
  actual number of consumed bytes for partial draining.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agogenirq: do not leave interupts enabled on free_irq
Thomas Gleixner [Mon, 18 Feb 2008 17:25:17 +0000 (18:25 +0100)]
genirq: do not leave interupts enabled on free_irq

The default_disable() function was changed in commit:

 76d2160147f43f982dfe881404cfde9fd0a9da21
 genirq: do not mask interrupts by default

It removed the mask function in favour of the default delayed
interrupt disabling. Unfortunately this also broke the shutdown in
free_irq() when the last handler is removed from the interrupt for
those architectures which rely on the default implementations. Now we
can end up with a enabled interrupt line after the last handler was
removed, which can result in spurious interrupts.

Fix this by adding a default_shutdown function, which is only
installed, when the irqchip implementation does provide neither a
shutdown nor a disable function.

[@stable: affected versions: .21 - .24 ]

Pointed-out-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
Tested-by: Michael Hennerich <Michael.Hennerich@analog.com>
16 years agogenirq: spurious.c: use time_* macros
S.Caglar Onur [Thu, 14 Feb 2008 15:36:51 +0000 (17:36 +0200)]
genirq: spurious.c: use time_* macros

The functions time_before, time_before_eq, time_after, and
time_after_eq are more robust for comparing jiffies against other
values.

So following patch implements usage of the time_after() macro, defined
at linux/jiffies.h, which deals with wrapping correctly

Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoelevator: make elevator_get() attempt to load the appropriate module
Jens Axboe [Tue, 19 Feb 2008 09:20:37 +0000 (10:20 +0100)]
elevator: make elevator_get() attempt to load the appropriate module

Currently we fail if someone requests a valid io scheduler, but it's
modular and not currently loaded. That can happen from a driver init
asking for a different scheduler, or online switching through sysfs
as requested by a user.

This patch makes elevator_get() request_module() to attempt to load
the appropriate module, instead of requiring that done manually.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agocfq-iosched: add hlist for browsing parallel to the radix tree
Jens Axboe [Tue, 19 Feb 2008 09:02:29 +0000 (10:02 +0100)]
cfq-iosched: add hlist for browsing parallel to the radix tree

It's cumbersome to browse a radix tree from start to finish, especially
since we modify keys when a process exits. So add a hlist for the single
purpose of browsing over all known cfq_io_contexts, used for exit,
io prio change, etc.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=9948

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: make blk_rq_map_user() clear ->bio if it unmaps it
Jens Axboe [Mon, 18 Feb 2008 12:51:56 +0000 (13:51 +0100)]
block: make blk_rq_map_user() clear ->bio if it unmaps it

That way the interface is symmetric, and calling blk_rq_unmap_user()
on the request wont oops.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agofs/block_dev.c: remove #if 0'ed code
Adrian Bunk [Mon, 18 Feb 2008 12:48:32 +0000 (13:48 +0100)]
fs/block_dev.c: remove #if 0'ed code

Commit b2e895dbd80c420bfc0937c3729b4afe073b3848 #if 0'ed this code stating:

<--  snip  -->

    [PATCH] revert blockdev direct io back to 2.6.19 version

    Andrew Vasquez is reporting as-iosched oopses and a 65% throughput
    slowdown due to the recent special-casing of direct-io against
    blockdevs.  We don't know why either of these things are occurring.

    The patch minimally reverts us back to the 2.6.19 code for a 2.6.20
    release.

<--  snip  -->

It has since been dead code, and unless someone wants to revive it now
it's time to remove it.

This patch also makes bio_release_pages() static again and removes the
ki_bio_count member from struct kiocb, reverting changes that had been
done for this dead code.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake struct def_blk_aops static
Adrian Bunk [Mon, 18 Feb 2008 12:48:31 +0000 (13:48 +0100)]
make struct def_blk_aops static

This patch makes the needlessly global struct def_blk_aops static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake blk_settings_init() static
Adrian Bunk [Mon, 18 Feb 2008 12:45:55 +0000 (13:45 +0100)]
make blk_settings_init() static

blk_settings_init() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake blk_ioc_init() static
Adrian Bunk [Mon, 18 Feb 2008 12:45:53 +0000 (13:45 +0100)]
make blk_ioc_init() static

blk_ioc_init() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake blk-core.c:request_cachep static again
Adrian Bunk [Mon, 18 Feb 2008 12:45:51 +0000 (13:45 +0100)]
make blk-core.c:request_cachep static again

request_cachep needlessly became global.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years ago[SPARC64]: Add regs_return_value().
David S. Miller [Tue, 19 Feb 2008 08:31:22 +0000 (00:31 -0800)]
[SPARC64]: Add regs_return_value().

Needed for kretprobes.

Noticed by Ananth N Mavinakayanahalli.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NIU]: Bump driver version and release date.
David S. Miller [Tue, 19 Feb 2008 05:30:48 +0000 (21:30 -0800)]
[NIU]: Bump driver version and release date.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NIU]: Fix BMAC alternate MAC address indexing.
Matheos Worku [Tue, 19 Feb 2008 05:30:03 +0000 (21:30 -0800)]
[NIU]: Fix BMAC alternate MAC address indexing.

BMAC port alternate MAC address index needs to start at 1. Index 0 is
used for the main MAC address.

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: fix kernel-doc warnings in header files
Randy Dunlap [Tue, 19 Feb 2008 04:52:13 +0000 (20:52 -0800)]
net: fix kernel-doc warnings in header files

Add missing structure kernel-doc descriptions to sock.h & skbuff.h
to fix kernel-doc warnings.

(I think that Stephen H. sent a similar patch, but I can't find it.
I just want to kill the warnings, with either patch.)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
Pavel Emelyanov [Tue, 19 Feb 2008 04:50:42 +0000 (20:50 -0800)]
[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: dst_entry leak in ip4ip6_err. (resend)
Denis V. Lunev [Tue, 19 Feb 2008 04:49:36 +0000 (20:49 -0800)]
[IPV6]: dst_entry leak in ip4ip6_err. (resend)

The result of the ip_route_output is not assigned to skb. This means that
- it is leaked
- possible OOPS below dereferrencing skb->dst
- no ICMP message for this case

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agofix historic ioremap() abuse in AGP
Arjan van dev Ven [Wed, 6 Feb 2008 04:16:00 +0000 (05:16 +0100)]
fix historic ioremap() abuse in AGP

Several AGP drivers right now use ioremap_nocache() on kernel ram in order
to turn a page of regular memory uncached.

There are two problems with this:

    1) This is a total nightmare for the ioremap() implementation to keep
       various mappings of the same page coherent.

    2) It's a total nightmare for the AGP code since it adds a ton of
       complexity in terms of keeping track of 2 different pointers to
       the same thing, in terms of error handling etc etc.

This patch fixes this by making the AGP drivers use the new
set_memory_XX APIs instead.

Note: amd-k7-agp.c is built on Alpha too, and generic.c is built
on ia64 as well, which do not yet have the set_memory_*() APIs,
so for them some we have a few ugly #ifdefs - hopefully they'll
be fixed soon.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dave Airlie <airlied@linux.ie>
16 years agobluetooth: do not move child device other than rfcomm
Dave Young [Tue, 19 Feb 2008 04:45:41 +0000 (20:45 -0800)]
bluetooth: do not move child device other than rfcomm

hci conn child devices other than rfcomm tty should not be moved here.
This is my lost, thanks for Barnaby's reporting and testing.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoagp/sis: Suspend support for SiS AGP
Stuart Bennett [Tue, 8 Jan 2008 13:14:07 +0000 (13:14 +0000)]
agp/sis: Suspend support for SiS AGP

Tested on M650 chipset

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agoagp/sis: Clear bit 2 from aperture size byte as well
Stuart Bennett [Tue, 8 Jan 2008 13:13:28 +0000 (13:13 +0000)]
agp/sis: Clear bit 2 from aperture size byte as well

SiS M650 has aperture size byte 0x44

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agobluetooth: put hci dev after del conn
Dave Young [Tue, 19 Feb 2008 04:44:01 +0000 (20:44 -0800)]
bluetooth: put hci dev after del conn

Move hci_dev_put to del_conn to avoid hci dev going away before hci conn.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Tue, 19 Feb 2008 02:46:56 +0000 (18:46 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide-cd: fix missing residual count setting in DMA mode
  ht6560b: force prefetch for some devices
  ht6560b can only do up to PIO mode 4
  linux/hdsmart.h: fix goofups (take 2)
  via82cxxx: add new PCI id for cx700
  falconide: locking bugfix
  MAINTAINERS: update ide-cd maintainer's email address
  ide/libata: ST310211A has buggy HPA too
  ide: Add missing base addresses for falconide and macide

16 years agoAudit: use == not = in if statements
Eric Paris [Mon, 18 Feb 2008 23:23:16 +0000 (18:23 -0500)]
Audit: use == not = in if statements

Clearly this was supposed to be an == not an = in the if statement.
This patch also causes us to stop processing execve args once we have
failed rather than continuing to loop on failure over and over and over.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[NET]: Elminate spurious print_mac() calls.
David S. Miller [Tue, 19 Feb 2008 00:50:22 +0000 (16:50 -0800)]
[NET]: Elminate spurious print_mac() calls.

Patrick McHardy notes that print_mac() can get invoked
even if the result it unused (f.e. as an argument to
pr_debug() when DEBUG is not defined).

Mark this function as "__pure" to eliminate this problem.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoide-cd: fix missing residual count setting in DMA mode
Kiyoshi Ueda [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ide-cd: fix missing residual count setting in DMA mode

This patch fixes the missing residual count setting in DMA mode,
which was introduced during the conversion to blk-end-request.
The residual count could be used by the request submitter.
So if it isn't set correctly, some upper layers does not work.
(e.g. wodim for CD burning.)

The bug is in only DMA mode.
In PIO mode, we are setting the residual count correctly,
so no need to fix.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Reported-by: Andreas Schwab <schwab@suse.de>
Tested-by: Andreas Schwab <schwab@suse.de>
Tested-by: Laura Garcia <nevola@gmail.com>
Tested-by: Borislav Petkov <petkovbb@googlemail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoht6560b: force prefetch for some devices
Jan Evert van Grootheest [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ht6560b: force prefetch for some devices

Prefetch needs to be set for some ide devices to work when connected to
a ht6560b interface. This was not always done properly, causing a system
with a HD and CD on the primary interface to not work properly. Or, in
effect, hang hard.

This patch forces prefetch on devices before checking whether it
is necessary to change the settings in the interface

This patch should also be applied to 2.4. I don't currently have a
2.4 tree around.

(also change my email address)

Signed-off-by: Jan Evert van Grootheest <janevert@caiway.nl>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoht6560b can only do up to PIO mode 4
Jan Evert van Grootheest [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ht6560b can only do up to PIO mode 4

According to the datasheet, ht6560b only supports up to PIO mode 4.

[bart: manually ported it over 2.6.25-rc2]

Signed-off-by: Jan Evert van Grootheest <janevert@caiway.nl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agolinux/hdsmart.h: fix goofups (take 2)
Bartlomiej Zolnierkiewicz [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
linux/hdsmart.h: fix goofups (take 2)

Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
("<linux/hdsmart.h> is not used by kernel code").

Also update include/linux/Kbuild to reflect the fact that hdsmart.h
uses __KERNEL__ ifdefs now.

Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agovia82cxxx: add new PCI id for cx700
Andrew Smith [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
via82cxxx: add new PCI id for cx700

[bart: manually ported it over via82cxxx changes]

From: Andrew Smith <asmith@tranquility.fsbusiness.co.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agofalconide: locking bugfix
Bartlomiej Zolnierkiewicz [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
falconide: locking bugfix

commit 8ac4ce742c66100931b6f2d7a36b0df08bc721fe ("ide: fix host drivers
depending on ide_generic to probe for interfaces (take 2)") moved probing
to falconide but forgot to take care of Atari specific locking - fix it.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoMAINTAINERS: update ide-cd maintainer's email address
Borislav Petkov [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
MAINTAINERS: update ide-cd maintainer's email address

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide/libata: ST310211A has buggy HPA too
Mikko Rapeli [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
ide/libata: ST310211A has buggy HPA too

Signed-off-by: Mikko Rapeli <mikko.rapeli@teleca.com>
Tested-by: Bart Champagne <bart@as35701.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: Add missing base addresses for falconide and macide
Geert Uytterhoeven [Tue, 19 Feb 2008 00:41:24 +0000 (01:41 +0100)]
ide: Add missing base addresses for falconide and macide

commit 29dd59755a849cc6475faa6a75f3b804e23a6fc2 ("ide: remove ide_setup_ports")
forgot to take into account the base addresses for the CONTROL registers for
falconide and macide, as pointed out by Michael Schmitz.

Falconide was tested on Aranym.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years ago[SPARC64]: Kill pcic_present().
David S. Miller [Tue, 19 Feb 2008 00:40:10 +0000 (16:40 -0800)]
[SPARC64]: Kill pcic_present().

And also it's helper function pci_is_controller().  Both
are unused.

I can't remove the equivalent from sparc32 yet as some
ancient bus probing code still uses that platform's version.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Mon, 18 Feb 2008 23:52:40 +0000 (15:52 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/nes: Fix possible array overrun
  RDMA/nes: Fix VLAN support
  RDMA/nes: Fix MAC interrupt erroneously masked on ifdown
  IB: Fix return value in ib_device_register_sysfs()

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Mon, 18 Feb 2008 23:51:40 +0000 (15:51 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: fix lguest build failure
  x86: reenable support for system without on node0
  x86: CPA: avoid double checking of alias ranges
  x86: CPA no alias checking for _NX
  x86: zap invalid and unused pmds in early boot
  x86: CPA, fix alias checks

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Mon, 18 Feb 2008 23:49:47 +0000 (15:49 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (59 commits)
  V4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum
  V4L/DVB (7205): tuner-xc2028 depends on FW_LOADER
  V4L/DVB (7201): cx88-mpeg: Fix race condition in variable access
  V4L/DVB (7200): Fix FM firmware loading
  V4L/DVB (7198): V4L, include ioctl.h in videodev headers
  V4L/DVB (7197): bttv: Fix overlay divide error
  V4L/DVB (7195): xc5000: fix build error when built as module
  V4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices
  V4L/DVB (7193): tveeprom: Add proper tuner mapping for hauppauge eeprom id 133
  V4L/DVB (7192): Adds support for Genius TVGo A11MCE
  V4L/DVB (7189): autosuspend support
  V4L/DVB (7188): radio-si470x version 1.0.6
  V4L/DVB (7186): tda10086: make the 22kHz tone for DISEQC a config option
  V4L/DVB (7183): radio-si470x: fix build warning
  V4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is set
  V4L/DVB (7179): Allow more than one em28xx board
  V4L/DVB (7164): em28xx-alsa: Add a missing mutex
  V4L/DVB (7163): em28xx: makes audio settings more stable
  V4L/DVB (7162): em28xx: Fix endian and returns the correct values
  V4L/DVB (7161): em28xx: Fix printing debug values higher than 127
  ...

16 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Mon, 18 Feb 2008 23:46:21 +0000 (15:46 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] Added quota targets and removed dmapi directory
  [XFS] Fix up xfs out-of-tree builds. (a.k.a. external modules)
  [XFS] Remove Makefile wrappers in XFS

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Mon, 18 Feb 2008 23:46:03 +0000 (15:46 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] null: Add missing Kconfig dependency on BLKCIPHER
  [CRYPTO] tcrypt: Add missing Kconfig dependency on BLKCIPHER
  [HIFN]: Fix invalid config ifdefs for RNG support

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
Linus Torvalds [Mon, 18 Feb 2008 23:45:48 +0000 (15:45 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  timer_list: print relative expiry time signed

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Mon, 18 Feb 2008 23:41:05 +0000 (15:41 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: explain why DEBUG_SECTION_MISMATCH is UNDEFINED
  kbuild: fix building vmlinux.o
  kbuild: allow -fstack-protector to take effect
  kconfig: fix select in combination with default

16 years ago[SPARC]: Kill 'prom_palette'.
David S. Miller [Mon, 18 Feb 2008 23:28:16 +0000 (15:28 -0800)]
[SPARC]: Kill 'prom_palette'.

The idea of this thing is we could save/restore the firmware's
palette when breaking in and out of the firmware prompt.

Only one driver implemented this (atyfb) and it's value is
questionable.  If you're just debugging you don't really
care that the characters end up being purple or whatever.

And we can provide better debugging and firmware command
facilities with minimal in-kernel console I/O drivers.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATYFB]: Kill 'prom_palette' sparc code.
David S. Miller [Mon, 18 Feb 2008 23:26:43 +0000 (15:26 -0800)]
[ATYFB]: Kill 'prom_palette' sparc code.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Kill 'prom_keyboard'.
David S. Miller [Mon, 18 Feb 2008 23:21:30 +0000 (15:21 -0800)]
[SPARC64]: Kill 'prom_keyboard'.

Nothing ever sets it, so it just takes up space.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC]: Kill extern decl of 'panic_setup'.
David S. Miller [Mon, 18 Feb 2008 23:17:58 +0000 (15:17 -0800)]
[SPARC]: Kill extern decl of 'panic_setup'.

This was made static in kernel/panic.c a long time ago.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Delete 'boot_flags'.
David S. Miller [Mon, 18 Feb 2008 23:16:20 +0000 (15:16 -0800)]
[SPARC64]: Delete 'boot_flags'.

It is write-only, nothing tests it's value.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Kill unused function 'kernel_enter_debugger'.
David S. Miller [Mon, 18 Feb 2008 23:13:48 +0000 (15:13 -0800)]
[SPARC64]: Kill unused function 'kernel_enter_debugger'.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agox86: fix lguest build failure
Rusty Russell [Sun, 3 Feb 2008 20:11:10 +0000 (07:11 +1100)]
x86: fix lguest build failure

drivers/lguest/x86/switcher_32.S:(.text+0x3815f8):
undefined reference to `LGUEST_PAGES_regs_trapnum'

This problem was caused by asm-offsets.c only having the offsets when
lguest *guest* support was set, not lguest host (host support used to
imply guest support, so now they're separate these bugs come out).

Lguest guest support and host support are separate config options:
they used to be tied together. Sort out which parts of asm-offsets are
needed for Guest and Host.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: reenable support for system without on node0
Yinghai Lu [Sun, 17 Feb 2008 10:02:21 +0000 (02:02 -0800)]
x86: reenable support for system without on node0

One system doesn't have RAM for node0 installed.

SRAT: PXM 0 -> APIC 0 -> Node 0
SRAT: PXM 0 -> APIC 1 -> Node 0
SRAT: PXM 1 -> APIC 2 -> Node 1
SRAT: PXM 1 -> APIC 3 -> Node 1
SRAT: Node 1 PXM 1 0-a0000
SRAT: Node 1 PXM 1 0-dd000000
SRAT: Node 1 PXM 1 0-123000000
ACPI: SLIT: nodes = 2
 10 13
 13 10
mapped APIC to ffffffffff5fb000 (        fee00000)
Bootmem setup node 1 0000000000000000-0000000123000000
  NODE_DATA [000000000000e000 - 0000000000014fff]
  bootmap [0000000000015000 -  00000000000395ff] pages 25
Could not find start_pfn for node 0
Pid: 0, comm: swapper Not tainted 2.6.24-smp-g5a514e21-dirty #14

Call Trace:
 [<ffffffff80bab498>] free_area_init_node+0x22/0x381
 [<ffffffff8045ffc5>] generic_swap+0x0/0x17
 [<ffffffff80bab0cc>] find_zone_movable_pfns_for_nodes+0x54/0x271
 [<ffffffff80baba5f>] free_area_init_nodes+0x239/0x287
 [<ffffffff80ba6311>] paging_init+0x46/0x4c
 [<ffffffff80b9dda5>] setup_arch+0x3c3/0x44e
 [<ffffffff80b978be>] start_kernel+0x6f/0x2c7
 [<ffffffff80b971cc>] _sinittext+0x1cc/0x1d3

This happens because node 0 is not online, but the node state in
mm/page_alloc.c has node 0 set.

        nodemask_t node_states[NR_NODE_STATES] __read_mostly = {
                [N_POSSIBLE] = NODE_MASK_ALL,
                [N_ONLINE] = { { [0] = 1UL } },

So we need to clear node_online_map before initializing the memory.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: CPA: avoid double checking of alias ranges
Thomas Gleixner [Fri, 15 Feb 2008 21:17:57 +0000 (22:17 +0100)]
x86: CPA: avoid double checking of alias ranges

When the CPA code is called with an virtual address in the range of
the direct mapping or the high alias then we do not need to run
through the alias check for this range.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: CPA no alias checking for _NX
Thomas Gleixner [Fri, 15 Feb 2008 20:49:46 +0000 (21:49 +0100)]
x86: CPA no alias checking for _NX

NX settings are not required to be consistent across alias mappings.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: zap invalid and unused pmds in early boot
Thomas Gleixner [Fri, 15 Feb 2008 16:29:12 +0000 (17:29 +0100)]
x86: zap invalid and unused pmds in early boot

The early boot code maps KERNEL_TEXT_SIZE (currently 40MB) starting
from __START_KERNEL_map. The kernel itself only needs _text to _end
mapped in the high alias. On relocatible kernels the ASM setup code
adjusts the compile time created high mappings to the relocation. This
creates invalid pmd entries for negative offsets:

0xffffffff80000000 -> pmd entry: ffffffffff2001e3
It points outside of the physical address space and is marked present.

This starts at the virtual address __START_KERNEL_map and goes up to
the point where the first valid physical address (0x0) is mapped.

Zap the mappings before _text and after _end right away in early
boot. This removes also the invalid entries.

Furthermore it simplifies the range check for high aliases.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: CPA, fix alias checks
Thomas Gleixner [Mon, 18 Feb 2008 19:54:14 +0000 (20:54 +0100)]
x86: CPA, fix alias checks

c_p_a() did not discover all aliases correctly. (such as when called
on vmalloc()-ed areas or ioremap()-ed areas)

Push the alias checks to the lower, physical level and consistently
discover all aliases that might exist: the low direct mappings and
the high linear kernel-text mappings (on 64-bit).

Thanks to Andi Kleen for pointing out that this was buggy.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoRDMA/nes: Fix possible array overrun
Roland Dreier [Mon, 18 Feb 2008 18:33:59 +0000 (10:33 -0800)]
RDMA/nes: Fix possible array overrun

In nes_create_qp(), the test

if (nesqp->mmap_sq_db_index > NES_MAX_USER_WQ_REGIONS) {

is used to error out if the db_index is too large; however, if the
test doesn't trigger, then the index is used as

nes_ucontext->mmap_nesqp[nesqp->mmap_sq_db_index] = nesqp;

and mmap_nesqp is declared as

struct nes_qp      *mmap_nesqp[NES_MAX_USER_WQ_REGIONS];

which leads to an array overrun if the index is exactly equal to
NES_MAX_USER_WQ_REGIONS.  Fix this by bailing out if the index is
greater than or equal to NES_MAX_USER_WQ_REGIONS.

This was spotted by the Coverity checker (CID 2162).

Acked-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years ago[WATCHDOG] HP ProLiant WatchDog driver
Thomas Mingarelli [Tue, 4 Dec 2007 17:41:54 +0000 (17:41 +0000)]
[WATCHDOG] HP ProLiant WatchDog driver

Hp is providing a Hardware WatchDog Timer driver that will only work with the
specific HW Timer located in the HP ProLiant iLO 2 ASIC. The iLO 2 HW Timer
will generate a Non-maskable Interrupt (NMI) 9 seconds before physically
resetting the server, by removing power, so that the event can be logged to
the HP Integrated Management Log (IML), a Non-Volatile Random Access Memory
(NVRAM). The logging of the event is performed using the HP ProLiant ROM via
an Industry Standard access known as a BIOS Service Directory Entry.

Signed-off-by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
16 years ago[WATCHDOG] blackfin Watchdog driver: relocate all strings used in __init functions...
Mike Frysinger [Wed, 30 Jan 2008 09:38:21 +0000 (17:38 +0800)]
[WATCHDOG] blackfin Watchdog driver: relocate all strings used in __init functions to __initdata

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
16 years ago[WATCHDOG] Convert mtx1 wdt to be a platform device and use generic GPIO API
Florian Fainelli [Mon, 7 Jan 2008 18:08:49 +0000 (19:08 +0100)]
[WATCHDOG] Convert mtx1 wdt to be a platform device and use generic GPIO API

This patch converts the MTX-1 to be a platform device, use the available
generic GPIO API for the MTX-1 board and register the miscdev alias.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
16 years ago[WATCHDOG] Add support for SB1 hardware watchdog
Andrew Sharp [Fri, 14 Dec 2007 00:16:42 +0000 (16:16 -0800)]
[WATCHDOG] Add support for SB1 hardware watchdog

Support watchdog timers built into SiByte MIPS SoCs.

Signed-off-by: Andy Sharp <andy.sharp@onstor.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
16 years agoV4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum
Mauro Carvalho Chehab [Fri, 15 Feb 2008 21:41:06 +0000 (18:41 -0300)]
V4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum

Thanks to Martin Michlmayr <tbm@cyrius.com> for reporting this issue:

The zoran driver fails to compile on the ARM Orion platform with:

In file included from drivers/media/video/zoran_procfs.c:50:
drivers/media/video/zoran.h:232: error: expected identifier before numeric
constant

The reason is that drivers/media/video/zoran.h defines an enum with
GPIO_MAX in it, but Orion contains a #define GPIO_MAX 32 in
include/asm-arm/arch-orion/orion.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7205): tuner-xc2028 depends on FW_LOADER
Paul Mundt [Thu, 14 Feb 2008 10:24:22 +0000 (07:24 -0300)]
V4L/DVB (7205): tuner-xc2028 depends on FW_LOADER

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7201): cx88-mpeg: Fix race condition in variable access
Ricardo Cerqueira [Thu, 14 Feb 2008 01:41:15 +0000 (22:41 -0300)]
V4L/DVB (7201): cx88-mpeg: Fix race condition in variable access

There was a possible race condition in the increment/decrement of
the active device references counter.
Thanks to Trent Piepho (xyzzy@speakeasy.org) for bringing it up.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7200): Fix FM firmware loading
Mauro Carvalho Chehab [Thu, 14 Feb 2008 04:52:48 +0000 (01:52 -0300)]
V4L/DVB (7200): Fix FM firmware loading

There's no need to load SCode table for FM.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7198): V4L, include ioctl.h in videodev headers
Jiri Slaby [Wed, 13 Feb 2008 23:04:49 +0000 (20:04 -0300)]
V4L/DVB (7198): V4L, include ioctl.h in videodev headers

Fix compilation of user processes which includes videodev*.h but
not includes linux/ioctl.h:

v4l2ext_helper.c: In function 'process_ioctl':
v4l2ext_helper.c:183: warning: implicit declaration of function '_IOWR'
v4l2ext_helper.c:183: error: expected expression before 'struct'
v4l2ext_helper.c:183: error: case label does not reduce to an integer constant

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7197): bttv: Fix overlay divide error
Robert Fitzsimons [Wed, 13 Feb 2008 19:38:11 +0000 (16:38 -0300)]
V4L/DVB (7197): bttv: Fix overlay divide error

The initial work to convert the bttv driver to V4L2 "Partial conversion
from V4L1 to V4L2" (e84619b17440ccca4e4db7583d126c4189b987e5), missed
the line which set the appropriate overlay crop structure in the newly
allocated bttv_buffer.  This then causes a divide error in the
bttv_calc_geo function.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7195): xc5000: fix build error when built as module
Tony Breeds [Tue, 12 Feb 2008 05:54:33 +0000 (02:54 -0300)]
V4L/DVB (7195): xc5000: fix build error when built as module

drivers/built-in.o: In function `set_type':
tuner-core.c:(.text+0x8879d): undefined reference to `xc5000_attach'

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices
Roland Stoll [Mon, 11 Feb 2008 16:00:34 +0000 (13:00 -0300)]
V4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices

It currently isn't possible to open the frontend device of cx88-mpeg devices
(DVB or Blackbird) multiple times concurrently. (for instance, to attach a
signal monitoring tool while reading a stream, or to send a frequency change
ioctl) This patch fixes that condition.

Signed-off-by: Roland Stoll <roland@xindex.de>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7193): tveeprom: Add proper tuner mapping for hauppauge eeprom id 133
Ricardo Cerqueira [Wed, 16 Jan 2008 22:56:55 +0000 (19:56 -0300)]
V4L/DVB (7193): tveeprom: Add proper tuner mapping for hauppauge eeprom id 133

Do away with the need to set tuner=63 on cx88xx with recent HVR-1300 boards

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7192): Adds support for Genius TVGo A11MCE
Adrian Pardini [Mon, 11 Feb 2008 15:40:53 +0000 (12:40 -0300)]
V4L/DVB (7192): Adds support for Genius TVGo A11MCE

Signed-off-by: Adrian Pardini <pardo.bsso@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7189): autosuspend support
Tobias Lorenz [Sat, 9 Feb 2008 19:08:24 +0000 (16:08 -0300)]
V4L/DVB (7189): autosuspend support

Together with Oliver Neukum from Novell, USB autosuspend support was added.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7188): radio-si470x version 1.0.6
Tobias Lorenz [Tue, 5 Feb 2008 01:26:08 +0000 (22:26 -0300)]
V4L/DVB (7188): radio-si470x version 1.0.6

This patch combines all the finished discussions and its resulting patches from
the mailing list.

The version 1.0.6 is mainly influenced by Oliver Neukum. He found a lot of
small issues, that are fixed with this patch now. For me the most interesting
thing is, that it's now safer to use it on other architectures.

The history for version 1.0.6 is:
- fixed coverity checker warnings in *_usb_driver_disconnect
- probe()/open() race by correct ordering in probe()
- DMA coherency rules by separate allocation of all buffers
- use of endianness macros
- abuse of spinlock, replaced by mutex
- racy handling of timer in disconnect, replaced by delayed_work
- racy interruptible_sleep_on(), replaced with wait_event_interruptible()
- handle signals in read()

The driver is tested with all Debian/testing radio programs and rdsd. The patch
is tested against checkpatch.pl v1.12.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7186): tda10086: make the 22kHz tone for DISEQC a config option
Hartmut Hackmann [Sun, 10 Feb 2008 02:54:24 +0000 (23:54 -0300)]
V4L/DVB (7186): tda10086: make the 22kHz tone for DISEQC a config option

Some cards need the diseqc signal modulated, while some just need
the envelope to control the LNB supply.

This fixes Bug 9887

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7183): radio-si470x: fix build warning
Michael Krufky [Sun, 10 Feb 2008 23:13:25 +0000 (20:13 -0300)]
V4L/DVB (7183): radio-si470x: fix build warning

fix the following build warning:

radio-si470x.c: In function 'si470x_get_rds_registers':
radio-si470x.c:562: warning: format '%ld' expects type 'long int',
    but argument 3 has type 'unsigned int'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is set
Mauro Carvalho Chehab [Fri, 8 Feb 2008 19:07:04 +0000 (16:07 -0300)]
V4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is set

Thanks to Alan Stern <stern@rowland.harvard.edu> for pointing this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7179): Allow more than one em28xx board
Mauro Carvalho Chehab [Fri, 8 Feb 2008 18:44:25 +0000 (15:44 -0300)]
V4L/DVB (7179): Allow more than one em28xx board

em28xx driver is capable of handling more than one usb device. However, isoc
transfers require a large amount of data to be transfered.

Before this patch, just one em28xx board were enough to allocate more than 50%
URBs:

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
B:  Alloc=480/800 us (60%), #Int=  0, #Iso=  2
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

So, only one board could use an USB host at the same time. After the patch, it
is possible to use more than one em28xx at the same time, on the same usb host,
if the image size is slower or equal to 345600, since those images will
require about 30% of the URBs:

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
B:  Alloc=232/800 us (29%), #Int=  0, #Iso=  2
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

So, in thesis, after the patch, it would be possible to use up to 3 boards by
each usb host, if the devices are generating small images.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7164): em28xx-alsa: Add a missing mutex
Mauro Carvalho Chehab [Wed, 6 Feb 2008 21:52:15 +0000 (18:52 -0300)]
V4L/DVB (7164): em28xx-alsa: Add a missing mutex

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7163): em28xx: makes audio settings more stable
Mauro Carvalho Chehab [Wed, 6 Feb 2008 21:34:13 +0000 (18:34 -0300)]
V4L/DVB (7163): em28xx: makes audio settings more stable

Improves audio configurations on em28xx:
        - mutes audio before changing amux;
        - adds a delay after setting audio src;
        - waits up to 50ms for ac97 busy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7162): em28xx: Fix endian and returns the correct values
Mauro Carvalho Chehab [Wed, 6 Feb 2008 18:56:16 +0000 (15:56 -0300)]
V4L/DVB (7162): em28xx: Fix endian and returns the correct values

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7161): em28xx: Fix printing debug values higher than 127
Mauro Carvalho Chehab [Wed, 6 Feb 2008 18:55:19 +0000 (15:55 -0300)]
V4L/DVB (7161): em28xx: Fix printing debug values higher than 127

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7160): em28xx: Allow register dump/setting for debug
Mauro Carvalho Chehab [Wed, 6 Feb 2008 12:00:41 +0000 (09:00 -0300)]
V4L/DVB (7160): em28xx: Allow register dump/setting for debug

Adds vidioc_[g|s]_register handlers. This allows getting/setting register
from em28xx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7158): Fix em28xx audio initialization
Mauro Carvalho Chehab [Wed, 6 Feb 2008 01:29:26 +0000 (22:29 -0300)]
V4L/DVB (7158): Fix em28xx audio initialization

AC97 register initialization seem to always be needed. This patch fixes audio
for Prolink/Pixelview USB2 board.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7156): em28xx/em28xx-core.c: fix use of potentially uninitialized variable
Andrew Morton [Tue, 5 Feb 2008 10:37:21 +0000 (07:37 -0300)]
V4L/DVB (7156): em28xx/em28xx-core.c: fix use of potentially uninitialized variable

drivers/media/video/em28xx/em28xx-core.c: In function 'em28xx_set_audio_source':
drivers/media/video/em28xx/em28xx-core.c:276: warning: 'no_ac97' may be used uninitialized in this function

This looks like a genuine bug to me.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7150): [v4l] convert videbuf_vmalloc_memory to videobuf_vmalloc_memory
Brandon Philips [Mon, 4 Feb 2008 23:52:21 +0000 (20:52 -0300)]
V4L/DVB (7150): [v4l] convert videbuf_vmalloc_memory to videobuf_vmalloc_memory

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7139): add parentheses
Roel Kluin [Sat, 2 Feb 2008 23:20:58 +0000 (20:20 -0300)]
V4L/DVB (7139): add parentheses

'!' has a higher priority than '&': bitanding has no effect.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7132): Add USB ID for a newer variant of Hauppauge WinTV-HVR 900
Luc Saillard [Wed, 30 Jan 2008 20:23:00 +0000 (17:23 -0300)]
V4L/DVB (7132): Add USB ID for a newer variant of Hauppauge WinTV-HVR 900

Device description:
WinTV-HVR-900
M/R: 65018/B3C0 ##4207

Signed-off-by: Luc Saillard <luc@saillard.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7122): saa7134-empress: Remove back lock
Mauro Carvalho Chehab [Thu, 31 Jan 2008 16:59:29 +0000 (13:59 -0300)]
V4L/DVB (7122): saa7134-empress: Remove back lock

videobuf functions at close() method already locks videobuf. It makes no sense
to keep the locking at empress close() method.

There is also a lock at open() method. I'm not sure if it is safe to remove the
locking there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7121): Renames videobuf lock to vb_lock
Mauro Carvalho Chehab [Thu, 31 Jan 2008 16:57:53 +0000 (13:57 -0300)]
V4L/DVB (7121): Renames videobuf lock to vb_lock

This helps to identify where vb_lock is being used, and find missusages of the
locks.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7120): videobuf lock is already initialized at videobuf-core.c
Mauro Carvalho Chehab [Thu, 31 Jan 2008 16:40:04 +0000 (13:40 -0300)]
V4L/DVB (7120): videobuf lock is already initialized at videobuf-core.c

Removes the duplicated mutex_init code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7118): dvb-ttpci: Improved display of still pictures
Oliver Endriss [Wed, 30 Jan 2008 04:07:20 +0000 (01:07 -0300)]
V4L/DVB (7118): dvb-ttpci: Improved display of still pictures

Improved display of still pictures (VIDEO_STILLPICTURE ioctl).
Ensure that both fields are displayed for progressive frames.

Thanks to Reinhard Nissl and Klaus Schmidinger for finding out
that the FREEZE command does this.

Thanks-to: Reinhard Nissl <rnissl@gmx.de>
Thanks-to: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7117): budget-av: Add support for Satelco EasyWatch PCI DVB-T
Kim Sandberg [Wed, 30 Jan 2008 03:42:01 +0000 (00:42 -0300)]
V4L/DVB (7117): budget-av: Add support for Satelco EasyWatch PCI DVB-T

Add support for Satelco EasyWatch PCI DVB-T, sub-id 0x1894:0x003a.

Signed-off-by: Kim Sandberg <ksan@saunalahti.fi>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7116): budget-av: Add support for KNC TV Station Plus X4
Oliver Endriss [Wed, 30 Jan 2008 02:56:51 +0000 (23:56 -0300)]
V4L/DVB (7116): budget-av: Add support for KNC TV Station Plus X4

Add support for KNC TV Station Plus X4, sub-system id 0x1894:0x0015.
Based on a patch submitted by Johannes Deisenhofer.

Thanks-to: Johannes Deisenhofer <jo.deisenhofer@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7110): Trivial printf warning fix (radio-si470)
Tobias Lorenz [Tue, 29 Jan 2008 01:49:14 +0000 (22:49 -0300)]
V4L/DVB (7110): Trivial printf warning fix (radio-si470)

Thanks to  Darren Salt <linux@youmustbejoking.demon.co.uk> for pointing this
issue.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7108): radio-si470x.c: check-after-use
Tobias Lorenz [Tue, 29 Jan 2008 01:43:13 +0000 (22:43 -0300)]
V4L/DVB (7108): radio-si470x.c: check-after-use

Adrian used the coverity checker against radio-si470x and found this:

> The Coverity checker spotted the following check-after-use in
> drivers/media/radio/radio-si470x.c:
>
> <--  snip  -->
> static void si470x_usb_driver_disconnect(struct usb_interface *intf)
> {
>         struct si470x_device *radio = usb_get_intfdata(intf);
>
>         del_timer_sync(&radio->timer);    <------------------
>         flush_scheduled_work();
>
>         usb_set_intfdata(intf, NULL);
>         if (radio) {                      <------------------
>                 video_unregister_device(radio->videodev);
>                 kfree(radio->buffer);
>                 kfree(radio);
>         }
> }
> <--  snip  -->
>
> Either "radio" can be NULL and this case has to be properly handled or
> the NULL check is not required.

These two lines should indeed better be inside the if statement.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7106): em28xx/: make 2 functions static
Adrian Bunk [Tue, 29 Jan 2008 01:10:48 +0000 (22:10 -0300)]
V4L/DVB (7106): em28xx/: make 2 functions static

This patch makes the following needlessly global functions static:
- em28xx-core.c:em28xx_write_reg_bits()
- em28xx-video.c:em28xx_vdev_init()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7104): stk-sensor.c: make 2 functions static
Adrian Bunk [Tue, 29 Jan 2008 01:10:58 +0000 (22:10 -0300)]
V4L/DVB (7104): stk-sensor.c: make 2 functions static

This patch makes the following needlessly global functions static:
- stk_sensor_outb()
- stk_sensor_inb()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7103): make stk_camera_cleanup() static
Adrian Bunk [Tue, 29 Jan 2008 01:11:01 +0000 (22:11 -0300)]
V4L/DVB (7103): make stk_camera_cleanup() static

stk_camera_cleanup() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7102): make tuner-core.c:tuner_list static
Adrian Bunk [Tue, 29 Jan 2008 01:11:15 +0000 (22:11 -0300)]
V4L/DVB (7102): make tuner-core.c:tuner_list static

tuner_list can become static - and it's anyway a way too generic name
for a global variable - see commit b00ef4b8d8c29bfb5f6f92ee60bc04b604f36ef2
for a completely different global variable of the same name I just made
static...

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>