Commit Graph

19196 Commits (bb0958544f3c7c016b2a3025ab3694363e403aa1)

Author SHA1 Message Date
Linus Torvalds 659dba3480 Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Fix OMAP clock prescaler to match the comment
  i2c: Refactor a kfree in i2c-dev
  i2c: Fix return value check in i2c-dev
  i2c: Enable PEC on more i2c-i801 devices
  i2c: Discard the i2c algo del_bus wrappers
  i2c: New ARM Versatile/Realview bus driver
  i2c: fix broken ds1337 initialization
  i2c: i2c-i801 documentation update
  i2c: Use the __ATTR macro where possible
  i2c: Whitespace cleanups
  i2c: Use put_user instead of copy_to_user where possible
  i2c: New Atmel AT91 bus driver
  i2c: Add support for nested i2c bus locking
  i2c: Cleanups to the i2c-nforce2 bus driver
  i2c: Add request/release_mem_region to i2c-ibm_iic bus driver
  i2c: New Philips PNX bus driver
  i2c: Delete the broken i2c-ite bus driver
  i2c: Update the list of driver IDs
  i2c: Fix documentation typos
2006-12-12 09:57:55 -08:00
Stelian Pop dcb69dd010 hwmon: New AMS hardware monitoring driver
This driver adds support for the Apple Motion Sensor (AMS) as found in 2005
revisions of Apple PowerBooks and iBooks.  It implements both the PMU and
I2C variants.  The I2C driver and mouse emulation is based on code by
Stelian Pop, while the PMU driver has been developped by Michael Hanselmann.
HD parking support will be added later.

Various people contributed fixes to this driver, including
Aristeu Sergio Rozanski Filho and Jean Delvare.

Signed-off-by: Stelian Pop <stelian@popies.net>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Robert Love <rml@novell.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:30 +01:00
Rudolf Marek 6800c3d027 hwmon: New Winbond W83793 hardware monitoring driver
Add support for the W83793 hardware monitoring chip. This driver
was originally contributed by Yuan Mu of Winbond Electronics Corp.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:30 +01:00
Jean Delvare 7188cc66b4 hwmon: Update Rudolf Marek's e-mail address
The Silicon Hill club is not what it used to be.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:30 +01:00
Jean Delvare 75c990291d hwmon/f71805f: Fix the device address decoding
The lowest 3 bits are ignored, and the chip decodes all 8 addresses,
not only the 2 it needs.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare c7176cb515 hwmon/f71805f: Always create all fan inputs
Fans can be hotplugged, so we should create sysfs file even for fans
which are disabled at driver load time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare 51c997d80e hwmon/f71805f: Add support for the Fintek F71872F/FG chip
Add support for the Fintek F71872F/FG Super-I/O chip. It is basically the
same as the Fintek F71805F/FG as far as hardware monitoring is concerned,
with two additional internal voltages monitored (VSB and battery), and 6
VID inputs (not yet supported.)

To make things a bit more confusing, two of the voltage input pins (in4
and in8) can be used for other functions. The driver reads the pin
configuration from the Super-I/O configuration space to decide whether
it must create interface files for these inputs or not.

Many thanks to Nikolay Derkach for testing the early iterations of this
code and reporting bugs.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare ba224e2c4f hwmon: New PC87427 hardware monitoring driver
This is a new hardware monitoring driver for the National Semiconductor
PC87427 Super-I/O chip. It only supports fan speed monitoring for now,
while the chip can do much more.

Thanks to Amir Habibi at Candelis for setting up a test system, and to
Michael Kress for testing several iterations of this driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:29 +01:00
Jean Delvare 8e9afcbbde hwmon/it87: Remove the SMBus interface support
This interface was useless as the LPC ISA-like interface is always
available, is faster, and is more reliable. This cuts the driver
size by some 20%.

This change is also required to later convert the it87 driver to a
platform driver, so that we can get rid of i2c-isa in a near future.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:28 +01:00
Stephan Berberig 0f23e50aa5 hwmon/hdaps: Update the list of supported devices
Remove the strange DMI for the R52 (1846AQG)
and add a note to update to latest BIOS in the Kconfig
and source code.

Signed-off-by: Stephan Berberig <s.berberig@arcor.de>
Signed-off-by: Robert Love <rlove@rlove.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:28 +01:00
Jean Delvare 509a5e85c3 hwmon/hdaps: Move the DMI detection data to .data
Move the DMI detection data from .text to .data. We really don't want
that amount of data on the stack.

Also refactor the macros used to generate the detection data, the
vendor becomes a parameter.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Robert Love <rlove@rlove.org>
2006-12-12 18:18:28 +01:00
Jim Cromie 3d7f9a8697 hwmon/pc87360: Autodetect the VRM version
pc87360 currently hardcodes vrm = 90 (2.4 vintage).  Update it to use
newer code in hwmon-vid which reads cpuid to determine the correct vid.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:28 +01:00
Jean Delvare 315c7113b5 hwmon/f71805f: Add support for "speed mode" fan speed control
In "speed mode", the user specifies a target fan speed (in RPM) and the
chip automatically adjusts the PWM duty cycle (or DC output level) to
reach this target.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:27 +01:00
Jean Delvare e196783d54 hwmon/f71805f: Support DC fan speed control mode
In DC mode, the pwmN_freq files are not created.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:27 +01:00
Jean Delvare 6e2bc17b07 hwmon/f71805f: Let the user adjust the PWM base frequency
Different frequencies can give better results depending on the exact fan
model used.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:27 +01:00
Jean Delvare 95e353127d hwmon/f71805f: Add manual fan speed control
pwmN files are writable only in manual fan speed control mode.
In automatic fan speed control modes, they are read-only and
report the duty cycle chosen by the chip.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:26 +01:00
Jean Delvare 6b14a546a5 hwmon/f71805f: Store the fan control registers
So far we were only extracting the fan skip bit from the
fan control registers, but we'll soon need more bits so
better store the whole register values.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-12 18:18:26 +01:00
Linus Torvalds d224a93d91 Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (29 commits)
  sh: Fixup SH-2 BUG() trap handling.
  sh: Use early_param() for earlyprintk parsing.
  sh: Fix .empty_zero_page alignment for PAGE_SIZE > 4096.
  sh: Fixup .data.page_aligned.
  sh: Hook up SH7722 scif ipr interrupts.
  sh: Fixup sh_bios() trap handling.
  sh: SH-MobileR SH7722 CPU support.
  sh: Fixup dma_cache_sync() callers.
  sh: Convert remaining remap_area_pages() users to ioremap_page_range().
  sh: Fixup kernel_execve() for syscall cleanups.
  sh: Fix get_wchan().
  sh: BUG() handling through trapa vector.
  rtc: rtc-sh: alarm support.
  rtc: rtc-sh: fix rtc for out-by-one for the month.
  sh: Kill off unused SE7619 I/O ops.
  serial: sh-sci: Shut up various sci_rxd_in() gcc4 warnings.
  sh: Split out atomic ops logically.
  sh: Fix Solution Engine 7619 build.
  sh: Trivial build fixes for SH-2 support.
  sh: IPR IRQ updates for SH7619/SH7206.
  ...
2006-12-12 08:14:46 -08:00
Ingo Molnar b57bd06655 [PATCH] net, 8139too.c: fix netpoll deadlock
fix deadlock in the 8139too driver: poll handlers should never forcibly
enable local interrupts, because they might be used by netpoll/printk
from IRQ context.

  =================================
  [ INFO: inconsistent lock state ]
  2.6.19 #11
  ---------------------------------
  inconsistent {softirq-on-W} -> {in-softirq-W} usage.
  swapper/1 [HC0[0]:SC1[1]:HE1:SE0] takes:
   (&npinfo->poll_lock){-+..}, at: [<c0350a41>] net_rx_action+0x64/0x1de
  {softirq-on-W} state was registered at:
    [<c0134c86>] mark_lock+0x5b/0x39c
    [<c0135012>] mark_held_locks+0x4b/0x68
    [<c01351e9>] trace_hardirqs_on+0x115/0x139
    [<c02879e6>] rtl8139_poll+0x3d7/0x3f4
    [<c035c85d>] netpoll_poll+0x82/0x32f
    [<c035c775>] netpoll_send_skb+0xc9/0x12f
    [<c035cdcc>] netpoll_send_udp+0x253/0x25b
    [<c0288463>] write_msg+0x40/0x65
    [<c011cead>] __call_console_drivers+0x45/0x51
    [<c011cf16>] _call_console_drivers+0x5d/0x61
    [<c011d4fb>] release_console_sem+0x11f/0x1d8
    [<c011d7d7>] register_console+0x1ac/0x1b3
    [<c02883f8>] init_netconsole+0x55/0x67
    [<c010040c>] init+0x9a/0x24e
    [<c01049cf>] kernel_thread_helper+0x7/0x10
    [<ffffffff>] 0xffffffff
  irq event stamp: 819992
  hardirqs last  enabled at (819992): [<c0350a16>] net_rx_action+0x39/0x1de
  hardirqs last disabled at (819991): [<c0350b1e>] net_rx_action+0x141/0x1de
  softirqs last  enabled at (817552): [<c01214e4>] __do_softirq+0xa3/0xa8
  softirqs last disabled at (819987): [<c0106051>] do_softirq+0x5b/0xc9

  other info that might help us debug this:
  no locks held by swapper/1.

  stack backtrace:
   [<c0104d88>] dump_trace+0x63/0x1e8
   [<c0104f26>] show_trace_log_lvl+0x19/0x2e
   [<c010532d>] show_trace+0x12/0x14
   [<c0105343>] dump_stack+0x14/0x16
   [<c0134980>] print_usage_bug+0x23c/0x246
   [<c0134d33>] mark_lock+0x108/0x39c
   [<c01356a7>] __lock_acquire+0x361/0x9ed
   [<c0136018>] lock_acquire+0x56/0x72
   [<c03aff1f>] _spin_lock+0x35/0x42
   [<c0350a41>] net_rx_action+0x64/0x1de
   [<c0121493>] __do_softirq+0x52/0xa8
   [<c0106051>] do_softirq+0x5b/0xc9
   [<c0121338>] irq_exit+0x3c/0x48
   [<c0106163>] do_IRQ+0xa4/0xbd
   [<c01047c6>] common_interrupt+0x2e/0x34
   [<c011db92>] vprintk+0x2c0/0x309
   [<c011dbf6>] printk+0x1b/0x1d
   [<c01003f2>] init+0x80/0x24e
   [<c01049cf>] kernel_thread_helper+0x7/0x10
   =======================

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-12 08:10:44 -08:00
Linus Torvalds d907dd2efd Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (4954): Fix: On ia64, i2c adap->inb/adap->outb are wrongly evaluated
2006-12-12 08:01:50 -08:00
Mauro Carvalho Chehab 2a7e9a260e V4L/DVB (4954): Fix: On ia64, i2c adap->inb/adap->outb are wrongly evaluated
i2c defines two callbacks (inb/outb). On ia64, since it defines also two macros
with those names, it causes the following errors:
drivers/media/video/usbvision/usbvision-i2c.c:64:39: macro "outb" passed 4 arguments, but takes just 2
drivers/media/video/usbvision/usbvision-i2c.c: In function `try_write_address':
drivers/media/video/usbvision/usbvision-i2c.c:64: warning: assignment makes integer from pointer without a cast
drivers/media/video/usbvision/usbvision-i2c.c:89:38: macro "inb" passed 4 arguments, but takes just 1
drivers/media/video/usbvision/usbvision-i2c.c: In function `try_read_address':
drivers/media/video/usbvision/usbvision-i2c.c:89: warning: assignment makes integer from pointer without a cast
drivers/media/video/usbvision/usbvision-i2c.c:85: warning: unused variable `buf'
drivers/media/video/usbvision/usbvision-i2c.c:173:53: macro "inb" passed 4 arguments, but takes just 1
drivers/media/video/usbvision/usbvision-i2c.c: In function `usb_xfer':
drivers/media/video/usbvision/usbvision-i2c.c:173: warning: assignment makes integer from pointer without a cast
drivers/media/video/usbvision/usbvision-i2c.c:179:54: macro "outb" passed 4 arguments, but takes just 2
drivers/media/video/usbvision/usbvision-i2c.c:179: warning: assignment makes integer from pointer without a cast
thanks to Andrew Morton for pointing this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-12 07:37:09 -02:00
Boaz Harrosh 2b02a17920 [PATCH] remove blk_queue_activity_fn
While working on bidi support at struct request level
I have found that blk_queue_activity_fn is actually never used.
The only user is in ide-probe.c with this code:

	/* enable led activity for disk drives only */
	if (drive->media == ide_disk && hwif->led_act)
		blk_queue_activity_fn(q, hwif->led_act, drive);

And led_act is never initialized anywhere.
(Looking back at older kernels it was used in the PPC arch, but was removed around 2.6.18)
Unless it is all for future use off course.
(this patch is against linux-2.6-block.git as off 2006/12/4)

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-12-12 10:22:23 +01:00
Linus Torvalds 4259cb25d4 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (32 commits)
  [NETPOLL]: Fix local_bh_enable() warning.
  [IPVS]: Make ip_vs_sync.c <= 80col wide.
  [IPVS]: Use msleep_interruptable() instead of ssleep() aka msleep()
  [HAMRADIO]: Fix baycom_epp.c compile failure.
  [DCCP]: Whitespace cleanups
  [DCCP] ccid3: Fixup some type conversions related to rtts
  [DCCP] ccid3: BUG-FIX - conversion errors
  [DCCP] ccid3: Reorder packet history source file
  [DCCP] ccid3: Reorder packet history header file
  [DCCP] ccid3: Make debug output consistent
  [DCCP] ccid3: Perform history operations only after packet has been sent
  [DCCP] ccid3: TX history - remove unused field
  [DCCP] ccid3: Shift window counter computation
  [DCCP] ccid3: Sanity-check RTT samples
  [DCCP] ccid3: Initialise RTT values
  [DCCP] ccid: Deprecate ccid_hc_tx_insert_options
  [DCCP]: Warn when discarding packet due to internal errors
  [DCCP]: Only deliver to the CCID rx side in charge
  [DCCP]: Simplify TFRC calculation
  [DCCP]: Debug timeval operations
  ...
2006-12-11 18:35:17 -08:00
Linus Torvalds 13d7d84e07 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (36 commits)
  [POWERPC] Generic BUG for powerpc
  [PPC] Fix compile failure do to introduction of PHY_POLL
  [POWERPC] Only export __mtdcr/__mfdcr if CONFIG_PPC_DCR is set
  [POWERPC] Remove old dcr.S
  [POWERPC] Fix SPU coredump code for max_fdset removal
  [POWERPC] Fix irq routing on some 32-bit PowerMacs
  [POWERPC] ps3: Add vuart support
  [POWERPC] Support ibm,dynamic-reconfiguration-memory nodes
  [POWERPC] dont allow pSeries_probe to succeed without initialising MMU
  [POWERPC] micro optimise pSeries_probe
  [POWERPC] Add SPURR SPR to sysfs
  [POWERPC] Add DSCR SPR to sysfs
  [POWERPC] Fix 440SPe CPU table entry
  [POWERPC] Add support for FP emulation for the e300c2 core
  [POWERPC] of_device_register: propagate device_create_file return code
  [POWERPC] Fix mmap of PCI resource with hack for X
  [POWERPC] iSeries: head_64.o needs to depend on lparmap.s
  [POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group
  [POWERPC] Remove QE header files from lite5200.c
  [POWERPC] of_platform_make_bus_id(): make `magic' int
  ...
2006-12-11 18:24:58 -08:00
Paul Mundt 41504c3972 sh: SH-MobileR SH7722 CPU support.
This adds CPU support for the SH7722.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:09 +09:00
Jamie Lenehan 1b73e6ae45 rtc: rtc-sh: alarm support.
This adds alarm support for the RTC_ALM_SET, RTC_ALM_READ,
RTC_WKALM_SET and RTC_WKALM_RD operations to rtc-sh.

The only unusual part is the handling of the alarm interrupt. If you
clear the alarm flag (AF) while the time in the RTC still matches the
time in the alarm registers than AF is immediately re-set, and if the
alarm interrupt (AIE) is still enabled then it re-triggers. I was
originally getting around 20k+ interrupts generated during the second
when the RTC and alarm registers matches.

The solution I've used is to clear AIE when the alarm goes off and
then use the carry interrupt to re-enabled it. The carry interrupt
will check AF and re-enabled AIE if it's clear. If AF is not clear
it'll clear it and then the check will be repeated next carry
interrupt. This a bit in rtc structure that indicates that it's
waiting to have AIE re-enabled so it doesn't turn it on when it
wasn't enabled anyway.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Jamie Lenehan a16147965c rtc: rtc-sh: fix rtc for out-by-one for the month.
The RMONCNT register, which holds the month in the RTC, takes a value
between 1 and 12 while the tm_mon field in the time structures takes
a value between 0 and 11. This wasn't being taken into account in
rtc-sh resulting in the month being out by one.

eg, on my board during boot the RTC is set to:

  RTC is set to Thu Jul 01 09:00:00 1999

but "hwclock -r" immediately after logging in was showing:

  Sun Aug  1 09:01:43 1999  0.000000 seconds

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Paul Mundt 313887507f serial: sh-sci: Shut up various sci_rxd_in() gcc4 warnings.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:08 +09:00
Jamie Lenehan 31ccb081ec rtc: rtc-sh: fix for period rtc interrupts.
When testing the per second interrupt support (RTC_UIE_ON/RTC_UIE_OFF)
of the new RTC system it would die in sh_rtc_interrupt due to a null
ptr dereference. The following gets it working correctly.

Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-12-12 08:42:07 +09:00
Ralf Baechle f654c854d1 [HAMRADIO]: Fix baycom_epp.c compile failure.
Fix foobar in 15b1c0e822 and
e8cc49bb0f patch series.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-11 14:35:01 -08:00
Ralf Baechle 2653a47b89 [ATM]: Ignore generated file pca200e_ecd.bin2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-11 14:34:35 -08:00
Randy Dunlap ed40771785 [NET]: Fix WAN routers kconfig dependency.
Currently WAN router drivers can be built in-kernel while the
register/unregister_wan_device interfaces are built as modules.
This causes:

drivers/built-in.o: In function `cycx_init':
cycx_main.c:(.init.text+0x5c4b): undefined reference to `register_wan_device'
drivers/built-in.o: In function `cycx_exit':
cycx_main.c:(.exit.text+0x560): undefined reference to `unregister_wan_device'
make: *** [.tmp_vmlinux1] Error 1

The problem is caused by tristate -> bool conversion (y or m => y),
so convert WAN_ROUTER_DRIVERS to a tristate so that the correct
dependency is preserved.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-11 14:34:34 -08:00
Linus Torvalds 69de7fc037 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  AT91 MMC update for 2.6.19
  mmc: Change SDHCI iomem error to a warning
  mmc: fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC  card removal
  AT91 MMC 5 : Minor cleanups
  AT91 MMC 4 : Interrupt handler cleanup
  AT91 MMC 3 : Move global mci_clk variable
  AT91 MMC 2 : Use platform resources
  AT91 MMC 1: Pass host structure.
2006-12-11 12:26:03 -08:00
Paul Mundt 8af905b4a4 [PATCH] smc91x: Kill off excessive versatile hooks.
This looks like a result of too many auto-merges. The
CONFIG_ARCH_VERSATILE case was handled a total of 6 times.
This kills 5 of them.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

--

 drivers/net/smc91x.h |   90 ---------------------------------------------------
 1 file changed, 90 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:50 -05:00
Brice Goglin 5796df1982 [PATCH] myri10ge: update driver version to 1.1.0
Update driver version to 1.1.0.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:07 -05:00
Brice Goglin 13348beee5 [PATCH] myri10ge: fix big_bytes in case of vlan frames
Fix sizing of big_bytes in the case of vlan frames. The 4
VLAN_HLEN bytes were omitted, leading to sizing the big buffer
4 bytes smaller than it should be.  Due to how rx buffers are
carved from pages, this was harmless for the common (9000, 1500)
byte MTUs, but could lead to data corruption for some MTUs.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:06 -05:00
Brice Goglin de3c450704 [PATCH] myri10ge: Full vlan frame in small_bytes
Receive full vlan frames into smalls when running with a jumbo MTU.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:06 -05:00
Brice Goglin 52ea6fb39b [PATCH] myri10ge: drop contiguous skb routines
Drop the old routines that used the physically contigous skb now
that we use the physical pages. And rename myri10ge_page_rx_done()
to myri10ge_rx_done() as it was previously.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:06 -05:00
Brice Goglin c7dab99b08 [PATCH] myri10ge: switch to page-based skb
Switch to physical page skb, by calling the new page-based
allocation routines and using myri10ge_page_rx_done().

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:06 -05:00
Brice Goglin dd50f3361f [PATCH] myri10ge: add page-based skb routines
Add physical page skb allocation routines and page based rx_done,
to be used by upcoming patches.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:06 -05:00
Brice Goglin 6250223e05 [PATCH] myri10ge: indentation cleanups
Indentation cleanups to synchronize to our tree which is automatically
indent'ed.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:54:06 -05:00
Stephen Hemminger 7fe26a60e0 [PATCH] chelsio: working NAPI
This driver tries to enable/disable NAPI at runtime, but
does so in an unsafe manner, and the NAPI interrupt handling is
a mess. Replace it with a compile time selected NAPI implementation.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:51:07 -05:00
Haavard Skinnemoen 0f0d84e52c [PATCH] MACB: Use __raw register access
Since macb is a chip-internal device, use __raw_readl and
__raw_writel instead of readl/writel. This will perform native-endian
accesses, which is the right thing to do on both AVR32 and ARM devices.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:31:28 -05:00
Haavard Skinnemoen d836cae4f6 [PATCH] MACB: Use struct delayed_work instead of struct work_struct
The macb driver calls schedule_delayed_work() and friends, so we need
to use a struct delayed_work along with it. The conversion was
explained by David Howells on lkml Dec 5 2006:

http://lkml.org/lkml/2006/12/5/269

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:31:28 -05:00
Scott Wood 68dc44af63 [PATCH] ucc_geth: Initialize mdio_lock.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:31:28 -05:00
Scott Wood 1083cfe112 [PATCH] ucc_geth: compilation error fixes
Fix compilation failures when building the ucc_geth driver with spinlock
debugging.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-11 09:31:28 -05:00
Andrew Victor 99eeb8dfb1 AT91 MMC update for 2.6.19
The driver is usable on the newer SAM9 processors so replace all text
references to AT91RM9200 with just AT91.

The controller bug where all the words are byte-swapped is fixed on the
AT91SAM9 processors.  The byte-swapping work-around therefore only needs
to be done if cpu_is_at91rm9200().
[Original patch from Wojtek Kaniewski]

The AT91RM9200 and AT91SAM9260 processors support two MMC/SD slots - the
slot which is connected is now passed via the platform_data and the
correct slot selected in the AT91_MCI_SDCR register.

The driver should not be calling at91_set_gpio_output() since the VCC
pin should have already been configured as an output in the
processor/board setup code.  The driver should call
at91_set_gpio_value().

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 12:43:35 +01:00
Pierre Ossman a98087cf81 mmc: Change SDHCI iomem error to a warning
Some controllers report an invalid iomem size, but seem to work
correctly anyway. Change our current error to just a warning and
hope it doesn't cause too much problems.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 09:48:42 +01:00
Vitaly Wool 7b30d281b9 mmc: fix "prev->state: 2 != TASK_RUNNING??" problem on SD/MMC card removal
Currently on SD/MMC card removal the system exhibits the following message (the platform is ARM Versatile):

    prev->state: 2 != TASK_RUNNING??
    mmcqd/762[CPU#0]: BUG in __schedule at linux-2.6/kernel/sched.c:3826

(akpm: someone tried to fix this, but it's still wrong)

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 09:48:16 +01:00
Andrew Victor f3a8efa90b AT91 MMC 5 : Minor cleanups
A number of small cleanups to the AT91RM9200 MMC driver:
 - fix warnings generated by pr_debug().
 - prepend "AT91 MMC:" to printk() messages.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 09:47:21 +01:00
Andrew Victor df05a303e3 AT91 MMC 4 : Interrupt handler cleanup
This patch simplifies the AT91RM9200 MMC interrupt handler code so that
it doesn't re-read the Interrupt Status and Interrupt Mask registers
multiple times.

Also defined AT91_MCI_ERRORS instead of using the hard-coded 0xffff0000.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 09:47:12 +01:00
Andrew Victor 3dd3b039d4 AT91 MMC 3 : Move global mci_clk variable
Move the global 'mci_clk' variable into the local 'at91mci_host'
structure.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 09:47:02 +01:00
Andrew Victor 17ea0595f4 AT91 MMC 2 : Use platform resources
Use the I/O base-address and IRQ passed to the driver via the
platform_device resources instead of using hardcoded values.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 09:46:51 +01:00
Andrew Victor e0b19b8365 AT91 MMC 1: Pass host structure.
The I/O base address is now stored in the 'at91mci_host' structure.  We
therefore have to pass this structure to at91_mci_read() and
at91_mci_write().

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2006-12-11 09:46:37 +01:00
Geoff Levand 74e95d5de9 [POWERPC] ps3: Add vuart support
Adds support for the PS3 virtual UART (vuart).  The vuart provides a
bi-directional byte stream data link between logical partitions.

This is needed for the ps3 graphics driver and the ps3 power
control support to be able to communicate with the lv1 policy
module.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-11 13:49:53 +11:00
Jean Delvare d7aef138f3 i2c: Fix OMAP clock prescaler to match the comment
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2006-12-10 21:21:34 +01:00
Jean Delvare 07125ab2c2 i2c: Refactor a kfree in i2c-dev
Refactor kfree(i2c_dev) into return_i2c_dev(). This saves some
code and makes more sense, as the memory is allocated in
get_free_i2c_dev().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-10 21:21:33 +01:00
Akinobu Mita 3bacb36db0 i2c: Fix return value check in i2c-dev
device_create() returns error code as pointer on failures.
This patch checks the return value of device_create() by using IS_ERR().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:33 +01:00
Jean Delvare 250d1bd3f4 i2c: Enable PEC on more i2c-i801 devices
Enable PEC on recent Intel SMBus controllers (ICH6, ICH7, ICH8, ICH9
and ESB2.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jason Gaston <jason.d.gaston@intel.com>
2006-12-10 21:21:33 +01:00
Jean Delvare 3269711b76 i2c: Discard the i2c algo del_bus wrappers
They are all only calling i2c_del_adapter, so we may as well do
it directly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:33 +01:00
Russell King 6b65cd7428 i2c: New ARM Versatile/Realview bus driver
Add support for the I2C bus found on the ARM Versatile and Realview
platforms.  The I2C bus has a RTC and optionally some EEPROMs attached.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:32 +01:00
Dirk Eibach 763d9c046a i2c: fix broken ds1337 initialization
On a custom board with ds1337 RTC I found that upgrade from 2.6.15 to
2.6.18 broke RTC support.

The main problem are changes to ds1337_init_client().
When a ds1337 recognizes a problem (e.g. power or clock failure) bit 7
in status register is set. This has to be reset by writing 0 to status
register. But since there are only 16 byte written to the chip and the
first byte is interpreted as an address, the status register (which is
the 16th) is never written.
The other problem is, that initializing all registers to zero is not
valid for day, date and month register. Funny enough this is checked by
ds1337_detect(), which depends on this values not being zero. So then
treated by ds1337_init_client() the ds1337 is not detected anymore,
whereas the failure bit in the status register is still set.

Signed-off-by: Dirk Stieler <stieler@gdsys.de>
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:31 +01:00
Jean Delvare 7b77d065d1 i2c: Use the __ATTR macro where possible
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:31 +01:00
David Brownell 438d6c2c01 i2c: Whitespace cleanups
Remove extraneous whitespace from various i2c headers and core files,
like space-before-tab and whitespace at end of line.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:31 +01:00
Jean Delvare 2c003e8e1c i2c: Use put_user instead of copy_to_user where possible
This speeds up the I2C_FUNCS ioctl by 5 to 8% in my tests.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Laughed-at-by: Mark M. Hoffman <mhoffman@lightlink.com>
2006-12-10 21:21:30 +01:00
Andrew Victor 813e30e9ab i2c: New Atmel AT91 bus driver
Add support for the I2C (Two-wire interface) controller integrated in
the Atmel AT91RM9200 processor.  This driver should also be usable on
the Atmel AT91SAM9261 and AT91SAM9260 processors.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:30 +01:00
Jiri Kosina 6ea23039cb i2c: Add support for nested i2c bus locking
This patch adds the 'level' field into the i2c_adapter structure, which is 
used to represent the 'logical' level of nesting for the purposes of 
lockdep. This field is then used in the i2c_transfer() function, to 
acquire the per-adapter bus_lock with correct nesting level.

Signed-off-by: Jiri Kosina <jikos@jikos.cz>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:30 +01:00
Hans-Frieder Vogt ad04d5c387 i2c: Cleanups to the i2c-nforce2 bus driver
Summary of changes:

- fixes:
   o legacy I/O region size is 64 bytes, not 8 bytes
- general cleanup:
   o removed code for the unsupported I2C block data, block data,
      proc call and block proc call transfer modes
   o removed detail warnings about unsupported modes that are
     covered in a general warning (unsupported transaction...)
     anyway
   o removed necessity of a definition of struct i2c_adapter
   o moved definition of struct i2c_algorithm, making forward
     declarations of nforce2_access and nforce2_func unnecessary
- minor changes:
   o in the description mention the nForce 5xx chipsets
   o changes my e-mail address in MODULE_AUTHOR

Theses cleanups shrink the driver binary size from 4.0 kB to 2.7 kB
on i386.

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:29 +01:00
Jean-Baptiste Maneyrol 31c095b09e i2c: Add request/release_mem_region to i2c-ibm_iic bus driver
Reserving I/O memory for a driver with request_mem_region is necessary to
avoid memory access conflicts. Even if it's never going to happen, it is
cleaner and it allows to monitor I/O memory used in /proc/iomem.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@teamlog.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:29 +01:00
Vitaly Wool 41561f28e7 i2c: New Philips PNX bus driver
New I2C bus driver for Philips ARM boards (Philips IP3204 I2C IP
block). This I2C controller can be found on (at least) PNX010x,
PNX52xx and PNX4008 Philips boards.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2006-12-10 21:21:29 +01:00
Jean Delvare 51fd554b65 i2c: Delete the broken i2c-ite bus driver
The rest of the ITE8172 support was already removed from MIPS tree.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
2006-12-10 21:21:29 +01:00
Herbert Xu 3263263f70 [CRYPTO] dm-crypt: Select CRYPTO_CBC
As CBC is the default chaining method for cryptoloop, we should select
it from cryptoloop to ease the transition.  Spotted by Rene Herman.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 10:18:57 -08:00
Linus Torvalds bb7320d1d9 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (132 commits)
  V4L/DVB 4949b: Fix container_of pointer retreival
  V4L/DVB (4949a): Fix INIT_WORK
  V4L/DVB (4949): Cxusb: codingstyle cleanups
  V4L/DVB (4948): Cxusb: Convert tuner functions to use dvb_pll_attach
  V4L/DVB (4947): Cx88: trivial cleanups
  V4L/DVB (4946): Cx88: Move cx88_dvb_bus_ctrl out of the card-specific area
  V4L/DVB (4945): Cx88: consolidate cx22702_config structs
  V4L/DVB (4944): Cx88: Convert DViCO FusionHDTV Hybrid to use dvb_pll_attach
  V4L/DVB (4943): Cx88: cleanup dvb_pll_attach for lgdt3302 tuners
  V4L/DVB (4953): Usbvision minor fixes
  V4L/DVB (4951): Add version.h, since it is required for VIDIOC_QUERYCAP
  V4L/DVB (4940): Or51211: Changed SNR and signal strength calculations
  V4L/DVB (4939): Or51132: Changed SNR and signal strength reporting
  V4L/DVB (4938): Cx88: Convert lgdt3302 tuning function to use dvb_pll_attach
  V4L/DVB (4941): Remove LINUX_VERSION_CODE and fix identations
  V4L/DVB (4942): Whitespace cleanups
  V4L/DVB (4937): Usbvision cleanup and code reorganization
  V4L/DVB (4936): Make MT4049FM5 tuner to set FM Gain to Normal
  V4L/DVB (4935): Added the capability of selecting fm gain by tuner
  V4L/DVB (4934): Usbvision radio requires GainNormal at e register
  ...
2006-12-10 09:59:18 -08:00
Avi Kivity 6aa8b732ca [PATCH] kvm: userspace interface
web site: http://kvm.sourceforge.net

mailing list: kvm-devel@lists.sourceforge.net
  (http://lists.sourceforge.net/lists/listinfo/kvm-devel)

The following patchset adds a driver for Intel's hardware virtualization
extensions to the x86 architecture.  The driver adds a character device
(/dev/kvm) that exposes the virtualization capabilities to userspace.  Using
this driver, a process can run a virtual machine (a "guest") in a fully
virtualized PC containing its own virtual hard disks, network adapters, and
display.

Using this driver, one can start multiple virtual machines on a host.

Each virtual machine is a process on the host; a virtual cpu is a thread in
that process.  kill(1), nice(1), top(1) work as expected.  In effect, the
driver adds a third execution mode to the existing two: we now have kernel
mode, user mode, and guest mode.  Guest mode has its own address space mapping
guest physical memory (which is accessible to user mode by mmap()ing
/dev/kvm).  Guest mode has no access to any I/O devices; any such access is
intercepted and directed to user mode for emulation.

The driver supports i386 and x86_64 hosts and guests.  All combinations are
allowed except x86_64 guest on i386 host.  For i386 guests and hosts, both pae
and non-pae paging modes are supported.

SMP hosts and UP guests are supported.  At the moment only Intel
hardware is supported, but AMD virtualization support is being worked on.

Performance currently is non-stellar due to the naive implementation of the
mmu virtualization, which throws away most of the shadow page table entries
every context switch.  We plan to address this in two ways:

- cache shadow page tables across tlb flushes
- wait until AMD and Intel release processors with nested page tables

Currently a virtual desktop is responsive but consumes a lot of CPU.  Under
Windows I tried playing pinball and watching a few flash movies; with a recent
CPU one can hardly feel the virtualization.  Linux/X is slower, probably due
to X being in a separate process.

In addition to the driver, you need a slightly modified qemu to provide I/O
device emulation and the BIOS.

Caveats (akpm: might no longer be true):

- The Windows install currently bluescreens due to a problem with the
  virtual APIC.  We are working on a fix.  A temporary workaround is to
  use an existing image or install through qemu
- Windows 64-bit does not work.  That's also true for qemu, so it's
  probably a problem with the device model.

[bero@arklinux.org: build fix]
[simon.kagstrom@bth.se: build fix, other fixes]
[uril@qumranet.com: KVM: Expose interrupt bitmap]
[akpm@osdl.org: i386 build fix]
[mingo@elte.hu: i386 fixes]
[rdreier@cisco.com: add log levels to all printks]
[randy.dunlap@oracle.com: Fix sparse NULL and C99 struct init warnings]
[anthony@codemonkey.ws: KVM: AMD SVM: 32-bit host support]
Signed-off-by: Yaniv Kamay <yaniv@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Simon Kagstrom <simon.kagstrom@bth.se>
Cc: Bernhard Rosenkraenzer <bero@arklinux.org>
Signed-off-by: Uri Lublin <uril@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:22 -08:00
Daniel Walker f5f1a24a2c [PATCH] clocksource: small cleanup
Mostly changing alignment.  Just some general cleanup.

[akpm@osdl.org: build fix]
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:22 -08:00
NeilBrown 1757128438 [PATCH] md: assorted md and raid1 one-liners
Fix few bugs that meant that:
  - superblocks weren't alway written at exactly the right time (this
    could show up if the array was not written to - writting to the array
    causes lots of superblock updates and so hides these errors).

  - restarting device recovery after a clean shutdown (version-1 metadata
    only) didn't work as intended (or at all).

1/ Ensure superblock is updated when a new device is added.
2/ Remove an inappropriate test on MD_RECOVERY_SYNC in md_do_sync.
   The body of this if takes one of two branches depending on whether
   MD_RECOVERY_SYNC is set, so testing it in the clause of the if
   is wrong.
3/ Flag superblock for updating after a resync/recovery finishes.
4/ If we find the neeed to restart a recovery in the middle (version-1
   metadata only) make sure a full recovery (not just as guided by
   bitmaps) does get done.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:21 -08:00
NeilBrown c2b00852fb [PATCH] md: return a non-zero error to bi_end_io as appropriate in raid5
Currently raid5 depends on clearing the BIO_UPTODATE flag to signal an error
to higher levels.  While this should be sufficient, it is safer to explicitly
set the error code as well - less room for confusion.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:21 -08:00
NeilBrown b8c6b64556 [PATCH] md: remove some old ifdefed-out code from raid5.c
There are some vestiges of old code that was used for bypassing the stripe
cache on reads in raid5.c.  This was never updated after the change from
buffer_heads to bios, but was left as a reminder.

That functionality has nowe been implemented in a completely different way, so
the old code can go.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:21 -08:00
Jeff Garzik fdee8ae449 [PATCH] MD: conditionalize some code
The autorun code is only used if this module is built into the static
kernel image.  Adjust #ifdefs accordingly.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:21 -08:00
NeilBrown b875e531fc [PATCH] md: fix innocuous bug in raid6 stripe_to_pdidx
stripe_to_pdidx finds the index of the parity disk for a given stripe.  It
assumes raid5 in that it uses "disks-1" to determine the number of data disks.

This is incorrect for raid6 but fortunately the two usages cancel each other
out.  The only way that 'data_disks' affects the calculation of pd_idx in
raid5_compute_sector is when it is divided into the sector number.  But as
that sector number is calculated by multiplying in the wrong value of
'data_disks' the division produces the right value.

So it is innocuous but needs to be fixed.

Also change the calculation of raid_disks in compute_blocknr to make it
more obviously correct (it seems at first to always use disks-1 too).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:21 -08:00
Raz Ben-Jehuda(caro) 5248861511 [PATCH] md: enable bypassing cache for reads
Call the chunk_aligned_read where appropriate.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:20 -08:00
Raz Ben-Jehuda(caro) 46031f9a38 [PATCH] md: allow reads that have bypassed the cache to be retried on failure
If a bypass-the-cache read fails, we simply try again through the cache.  If
it fails again it will trigger normal recovery precedures.

update 1:

From: NeilBrown <neilb@suse.de>

1/
  chunk_aligned_read and retry_aligned_read assume that
      data_disks == raid_disks - 1
  which is not true for raid6.
  So when an aligned read request bypasses the cache, we can get the wrong data.

2/ The cloned bio is being used-after-free in raid5_align_endio
   (to test BIO_UPTODATE).

3/ We forgot to add rdev->data_offset when submitting
   a bio for aligned-read

4/ clone_bio calls blk_recount_segments and then we change bi_bdev,
   so we need to invalidate the segment counts.

5/ We don't de-reference the rdev when the read completes.
   This means we need to record the rdev to so it is still
   available in the end_io routine.  Fortunately
   bi_next in the original bio is unused at this point so
   we can stuff it in there.

6/ We leak a cloned bio if the target rdev is not usable.

From: NeilBrown <neilb@suse.de>

update 2:

1/ When aligned requests fail (read error) they need to be retried
   via the normal method (stripe cache).  As we cannot be sure that
   we can process a single read in one go (we may not be able to
   allocate all the stripes needed) we store a bio-being-retried
   and a list of bioes-that-still-need-to-be-retried.
   When find a bio that needs to be retried, we should add it to
   the list, not to single-bio...

2/ We were never incrementing 'scnt' when resubmitting failed
   aligned requests.

[akpm@osdl.org: build fix]
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:20 -08:00
Raz Ben-Jehuda(caro) f679623f50 [PATCH] md: handle bypassing the read cache (assuming nothing fails)
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:20 -08:00
Raz Ben-Jehuda(caro) 23032a0eb9 [PATCH] md: define raid5_mergeable_bvec
This will encourage read request to be on only one device, so we will often be
able to bypass the cache for read requests.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:20 -08:00
NeilBrown 0d4ca600fc [PATCH] md: tidy up device-change notification when an md array is stopped
An md array can be stopped leaving all the setting still in place, or it can
torn down and destroyed.  set_capacity and other change notifications only
happen in the latter case, but should happen in both.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:20 -08:00
Paul Mackerras a3d8998390 [PATCH] Fbdev driver for IBM GXT4500P videocards
This is an fbdev driver for the IBM GXT4500P display card found in some IBM
System P (pSeries) machines.  These cards have hardware 2D and 3D
capabilities, but the driver does not use them; it just exports a dumb
framebuffer.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: James Simmons <jsimmons@infradead.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:20 -08:00
Alan Cox ee2f344b33 [PATCH] ide-cd: Handle strange interrupt on the Intel ESB2
The ESB2 appears to emit spurious DMA interrupts when configured for native
mode and handling ATAPI devices.  Stratus were able to pin this bug down and
produce a patch.  This is a rework which applies the fixup only to the ESB2
(for now).  We can apply it to other chips later if the same problem is found.

This code has been tested and confirmed to fix the problem on the tested
systems.

Signed-off-by: Alan Cox <alan@redhat.com>
(Most of the hard work done by Stratus however)
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:57:20 -08:00
Ralf Baechle 596afa41b2 [PATCH] Don't build some broken ISDN drivers on big endian MIPS
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:42 -08:00
Sergei Shtylyov 47694bb86a [PATCH] pdc202xx_new: fix PLL/timing issues
Fix the CRC errors in the higher UltraDMA modes with the Promise PDC20268
and newer chips that always occur on non-x86 machines and when there are
more than 2 adapters on x86 machines.  Fix the overclocking issue for
PDC20269 and newer chips that occurs when an UltraDMA/133 capable drive is
connected.  Here's the summary of changes:

- add code to detect the PLL input clock detection and setup it output clock,
  remove the PowerMac hacks;

- replace the macros accessing the indexed regiters with functions, switch to
  using them where appropriate, gather the PIO/MWDMA/UDMA timings into tables;

- rewrite the speedproc() handler to set the drive's transfer mode first, and
  then override the timing registers set by hardware on UltraDMA/133 chips;

- use better criterion for determining higher UltraDMA modes, and add comment
  concerning the doubtful value of the code enabling IORDY/prefetch;

- replace the stupid 'pdcnew_new_' prefixes with mere 'pdcnew_';

- get rid of unneded spaces, parens and type casts, clean up some printk's,
  add some new lines here and there...

This work is loosely based on these former patches by Albert Lee:

[1] http://marc.theaimsgroup.com/?l=linux-ide&m=110992442032300
[2] http://marc.theaimsgroup.com/?l=linux-ide&m=110992457729382
[3] http://marc.theaimsgroup.com/?l=linux-ide&m=110992474205555
[4] http://marc.theaimsgroup.com/?l=linux-ide&m=111019224802939

Some PLL clock detection code was backported from his pata_pdc2027x driver...

This code has been successfully tested by me on PDC2026[89] chips.

I tried to keep this rework as several patches but it made no sense: [2] was
largely a modification of the non-working timing override code, [3] by itself
extended the overclocking issue to the case of non-UltraDMA/133 drives, and
finally, the cleanup patch based on [1] ended up rejected...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Albert Lee <albertcc@tw.ibm.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:41 -08:00
Alexey Dobriyan 1f29bcd739 [PATCH] sysctl: remove unused "context" param
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andi Kleen <ak@suse.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:41 -08:00
Corey Minyard 1d5636cc07 [PATCH] IPMI: misc fixes
Fix various problems pointed out by Andrew Morton and others:
  * platform_device_unregister checks for NULL, no need to check here.
  * Formatting fixes.
  * Remove big macro and convert to a function.
  * Use strcmp instead of defining a broken case-insensitive comparison,
    and make the output parameter info match the case of the input one
    (change "I/O" to "i/o").
  * Return the length instead of 0 from the hotmod parameter handler.
  * Remove some unused cruft.
  * The trydefaults parameter only has to do with scanning the "standard"
    addresses, don't check for that on ACPI.

Signed-off-by: Corey Minyard <cminyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
Randy Dunlap 0c8204b380 [PATCH] IPMI: remove zero inits
Remove all =0 and =NULL from static initializers.  They are not needed and
removing them saves space in the object files.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
Andrew Victor 7fc39f6d61 [PATCH] AT91RM9200 RTC
The new Atmel AT91SAM9261 and AT91SAM9260 processors do not have the
internal RTC peripheral.  This RTC driver is therefore
AT91RM9200-specific.

This patch renames rtc-at91.c to rtc-at91rm9200.c, and changes the name
of the configuration option.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
David Brownell a14e189350 [PATCH] RTCs don't use i2c_adapter.dev
Update more I2C drivers that live outside drivers/i2c to understand that using
adapter->dev is not The Way.  When actually referring to the adapter hardware,
adapter->class_dev.dev is the answer.  When referring to a device connected to
it, client->dev.dev is the answer.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
Scott Wood 884b4aaaa2 [PATCH] rtc: Add rtc_merge_alarm()
Add rtc_merge_alarm(), which can be used by rtc drivers to turn a partially
specified alarm expiry (i.e.  most significant fields set to -1, as with the
RTC_ALM_SET ioctl()) into a fully specified expiry.

If the most significant specified field is earlier than the current time, the
least significant unspecified field is incremented.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
Randy Dunlap 9080d0ae0f [PATCH] geode crypto is PCI device
This driver seems to be for a PCI device.

drivers/crypto/geode-aes.c:384: warning: implicit declaration of function 'pci_release_regions'
drivers/crypto/geode-aes.c:397: warning: implicit declaration of function 'pci_request_regions'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
Stephen Street 8d94cc50aa [PATCH] spi: stabilize PIO mode transfers on PXA2xx systems
Stabilize PIO mode transfers against a range of word sizes and FIFO
thresholds and fixes word size setup/override issues.

1) 16 and 32 bit DMA/PIO transfers broken due to timing differences.
2) Potential for bad transfer counts due to transfer size assumptions.
3) Setup function broken is multiple ways.
4) Per transfer bit_per_word changes break DMA setup in pump_tranfers.
5) False positive timeout are not errors.
6) Changes in pxa2xx_spi_chip not effective in calls to setup.
7) Timeout scaling wrong for PXA255 NSSP.
8) Driver leaks memory while busy during unloading.

Known issues:

SPI_CS_HIGH and SPI_LSB_FIRST settings in struct spi_device are not handled.

Testing:

This patch has been test against the "random length, random bits/word,
random data (verified on loopback) and stepped baud rate by octaves
(3.6MHz to 115kHz)" test.  It is robust in PIO mode, using any
combination of tx and rx thresholds, and also in DMA mode (which
internally computes the thresholds).

Much thanks to Ned Forrester for exhaustive reviews, fixes and testing.
The driver is substantially better for his efforts.

Signed-off-by: Stephen Street <stephen@streetfiresound.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
Alan Cox 6451956a24 [PATCH] ide: complete switch to pci_get
The reverse get function allows the final piece of the switching for the old
IDE layer

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:40 -08:00
Hugh Dickins 5fcf7bb73f [PATCH] read_zero_pagealigned() locking fix
Ramiro Voicu hits the BUG_ON(!pte_none(*pte)) in zeromap_pte_range: kernel
bugzilla 7645.  Right: read_zero_pagealigned uses down_read of mmap_sem,
but another thread's racing read of /dev/zero, or a normal fault, can
easily set that pte again, in between zap_page_range and zeromap_page_range
getting there.  It's been wrong ever since 2.4.3.

The simple fix is to use down_write instead, but that would serialize reads
of /dev/zero more than at present: perhaps some app would be badly
affected.  So instead let zeromap_page_range return the error instead of
BUG_ON, and read_zero_pagealigned break to the slower clear_user loop in
that case - there's no need to optimize for it.

Use -EEXIST for when a pte is found: BUG_ON in mmap_zero (the other user of
zeromap_page_range), though it really isn't interesting there.  And since
mmap_zero wants -EAGAIN for out-of-memory, the zeromaps better return that
than -ENOMEM.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Ramiro Voicu: <Ramiro.Voicu@cern.ch>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:39 -08:00
Don Mullis bf4735a46a [PATCH] Kconfig refactoring for better menu nesting
Refactor Kconfig content to maximize nesting of menus by menuconfig and
xconfig.

Tested by simultaneously running `make xconfig` with and without
patch, and comparing displays.

Signed-off-by: Don Mullis <dwm@meer.net>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:39 -08:00
Randy Dunlap 2d4ba4a3b9 [PATCH] ucb1400_ts depends SND_AC97_BUS
This driver is an AC97 codec according to its help text.  However, if SOUND is
disabled, the "select SND_AC97_BUS" still inserts that into the .config file:

#
# Sound
#
# CONFIG_SOUND is not set
CONFIG_SND_AC97_BUS=m

Even if the config software followed dependency chains on selects, we should
try to limit usage of "select" to library-type code that is needed (e.g., CRC
functions) instead of bus-type support.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-10 09:55:39 -08:00
Thierry MERLE 1de1bf0633 V4L/DVB 4949b: Fix container_of pointer retreival
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 14:52:18 -02:00
Mauro Carvalho Chehab 67952e8cb1 V4L/DVB (4949a): Fix INIT_WORK
INIT_WORK syntax changed on kernel 2.6.19. Fixing it on
usbvision and cx88-input.


Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Michael Krufky f35db23c1b V4L/DVB (4949): Cxusb: codingstyle cleanups
Trivial whitespace / 80-column limit cleanups

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Michael Krufky 79a54cbd73 V4L/DVB (4948): Cxusb: Convert tuner functions to use dvb_pll_attach
Converted dee1601, lgz201 and dtt8579 to use dvb_pll_attach
in dvb-usb-cxusb.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Michael Krufky 4a390558a6 V4L/DVB (4947): Cx88: trivial cleanups
- small whitespace cleanups
- 80-column whitespace cleanups
- remove unneeded brackets

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Michael Krufky 22f3f17dd7 V4L/DVB (4946): Cx88: Move cx88_dvb_bus_ctrl out of the card-specific area
This function should not be in the card-specific area of the file.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Michael Krufky ed35526027 V4L/DVB (4945): Cx88: consolidate cx22702_config structs
There are five cx22702_config structs used by cx88-dvb, only two of which
are unique. This patch removes the duplicates and sets each card to use
one of the two remaining config structs.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Michael Krufky 5786a34b43 V4L/DVB (4944): Cx88: Convert DViCO FusionHDTV Hybrid to use dvb_pll_attach
Converted DViCO FusionHDTV Hybrid to use dvb_pll_attach, removing
another static dependency of cx88-dvb on dvb-pll.
Acked-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Michael Krufky 1d4bb7d3c1 V4L/DVB (4943): Cx88: cleanup dvb_pll_attach for lgdt3302 tuners
Since we're using dvb_pll_attach now, we dont have to populate
dev->core->pll_addr or dev->core->pll_desc anymore.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Thierry MERLE c876a3468d V4L/DVB (4953): Usbvision minor fixes
- fix debug outputs
- fix returned parameters on VIDIOC_G_FMT, VIDIOC_S_FMT and 
  VIDIOC_TRY_FMT and mmap size setting

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Mauro Carvalho Chehab f30ebd4359 V4L/DVB (4951): Add version.h, since it is required for VIDIOC_QUERYCAP
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Rusty Scott 1444e5f591 V4L/DVB (4940): Or51211: Changed SNR and signal strength calculations
Removes embedded log functions and makes use of the DVB math functions to
provide SNR in dB.  The changes are modeled after recent changes made to
the LGDT330x frontends in lgdt330x.c

Signed-off-by: Rusty Scott <rustys@ieee.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Rusty Scott b2fb7f55a1 V4L/DVB (4939): Or51132: Changed SNR and signal strength reporting
Removes embedded log functions and makes use of the DVB math functions
to provide SNR in dB.  The changes are modeled after recent changes made
to the LGDT330x frontends in lgdt330x.c

Signed-off-by: Rusty Scott <rustys@ieee.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Trent Piepho 1c5ee876d6 V4L/DVB (4938): Cx88: Convert lgdt3302 tuning function to use dvb_pll_attach
There was a still a pre-dvb-pll set_params function for the lgdt3302 in
the cx88-dvb driver.  This patch removes that function and uses
dvb_pll_attach() for the cards that were using it (Dvico FusionHDTV 3
GOLD {Q,T}).  This way the set_params function from dvb-pll is used.
dvb_attach() is in turn used on dvb_pll_attach(), eliminating some static
dependencies on dvb-pll.  There are still a couple static dependencies on
dvb-pll remaining.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Mauro Carvalho Chehab a1ed551cdb V4L/DVB (4941): Remove LINUX_VERSION_CODE and fix identations
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Mauro Carvalho Chehab 7ca659e3c1 V4L/DVB (4942): Whitespace cleanups
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:53 -02:00
Thierry MERLE 483dfdb64f V4L/DVB (4937): Usbvision cleanup and code reorganization
- removal of overlay stuff
- reorganization of functions in 3 files:
    * usbvision-i2c for I2C-related stuff
    * usbvision-video for v4l2 entry points
    * usbvision-core for all peripheral controls and utilities

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:22:49 -02:00
Thierry MERLE d8159a3684 V4L/DVB (4936): Make MT4049FM5 tuner to set FM Gain to Normal
- remove any specific TDA9887_SET_CONFIG of usbvision driver
- add fm_gain_normal=1 to the MT4049FM5 tuner for radio functionality

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:53 -02:00
Mauro Carvalho Chehab 483deb0f2b V4L/DVB (4935): Added the capability of selecting fm gain by tuner
Some tuners require using cGainNormal instead of cGainLow for
high sensibility on FM reception.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:52 -02:00
Mauro Carvalho Chehab cefccc8011 V4L/DVB (4934): Usbvision radio requires GainNormal at e register
Adds an option to select GainNormal at tda9887 and make usbvision
to use it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:51 -02:00
Thierry MERLE 3086d6cb0a V4L/DVB (4933): Usbvision_v4l2: radio interface / tda9887 problem ?
- implement the v4l2 radio interface

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:51 -02:00
Thierry MERLE 957883d0b5 V4L/DVB (4932): Usbvision_v4l2: fix norm setting problems
Patch contents:
- fix i2c command broadcast (caused problems for SECAM norm setting)
- default input selection at driver open

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:50 -02:00
Mauro Carvalho Chehab ee5407c501 V4L/DVB (4931): Removed usbvision_ioctl.h, since it isn't required anymore
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:49 -02:00
Thierry MERLE 40bad67840 V4L/DVB (4930): Usbvision_v4l2 : mmap corrected to get all frames
- private ioctls UVIOCSREG/UVIOCGREG translated to the
	VIDIOC_INT_G_REGISTER/VIDIOC_INT_S_REGISTER
- lost frame bug corrected (mmap rework)
- reset scratch buffer is no buffer is queued (prevents useless scratch
	overflow management)

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:48 -02:00
Thierry MERLE 3084920b55 V4L/DVB (4929): Read() implementation + format set/get simplifications
- implement read() entry point that works with linux list.h
- rework of VIDIOC_ENUM_FMT/VIDIOC_S_FMT/VIDIOC_G_FMT
- VIDIOC_STREAMON : allows streaming whereas there is no queued buffer
(xdtv does VIDIOC_STREAMON before VIDIOC_QBUFs)

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:47 -02:00
Thierry 5f7fb877be V4L/DVB (4928): Usbvision_v4l2 robustness on disconnect
This patch corrects 2 bugs (causes kernel oops) that occur when
unplugging the peripheral whereas nobody has opened it yet :
- do not call usbvision_stop_isoc if usbvision_init_isoc has not been called
- do not call wakeup_interruptible on waitqueues that did not have been
initialized with init_waitqueue_head

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:46 -02:00
Thierry MERLE f2242ee547 V4L/DVB (4927): Enhancements on usbvision driver
Enhance the buffer management of this driver + some corrections
- linux list.h usage for buffer management
- VIDIOC_ENUMSTD/VIDIOC_G_STD/VIDIOC_S_STD simplification (use of
v4l2_video_std_construct)
- create_sysfs : remove of warnings for video_device_create_file return code
- make the driver compatible with 2.6.19 kernel version (remove
slave_send and slave_recv in usbvision-i2c, change ctrlUrb_complete
function prototype)
- deactivated v4l2_read because this code was not the priority but
working on it :)

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:45 -02:00
Dwaine Garden 18d8a4540c V4L/DVB (4926): Fix USBVision handling of VIDIOC_QUERYCTRL
There's a better (and recommended) way for handling VIDIOC_QUERYCTRL.

This patch will fix the issue where the hardware control values were
invalid and stops the SAA7115 module from complaining about invalid values.

saa7115 4-0024: invalid brightness setting 32768
saa7115 4-0024: invalid contrast setting 49152
saa7115 4-0024: invalid hue setting 32768
saa7115 4-0024: invalid saturation setting 32768

Signed-off-by: Dwaine Garden <dwainegarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:43 -02:00
Thierry MERLE cc9e595a58 V4L/DVB (4925): Corrected and separated the Kconfig for usbvision
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:42 -02:00
Thierry MERLE c8400c7007 V4L/DVB (4924): Fix some bugs on usbvision due to the merge into one module
Found the bug that prevented the driver from loading : a module
param conflict between usbvision-i2c and usbvision-core (debug
parameter).
- correct the module param "debug" conflics in usbvision-i2c.c and
usbvision-core.c
- add some debug printouts in usbvision-core.c VDIOC_QBUF/VIDIOC_DQBUF
- usbvision-core.c : add vb->field = V4L2_FIELD_NONE in VIDIOC_DQBUF

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:41 -02:00
Mauro Carvalho Chehab 6714b01263 V4L/DVB (4923): Splitted usbvision cards from usbvison.h
Having the cards description into a separated file makes
easier to maintain and follows the same standard as other
drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:41 -02:00
Mauro Carvalho Chehab 781aa1d1ab V4L/DVB (4922): Add usbvision driver
This patch adds usbvision into V4L/DVB HG tree.
Usbvision driver is a GPL driver, made by:
	Joerg Heckenbach <joerg@heckenbach-aw.de>
		and
	Dwaine Garden <DwaineGarden@rogers.com>
V4L2 migration made by:
	Thierry Merle <thierry.merle@free.fr>
Kconfig/Makefile scripts by:
	Mauro Carvalho Chehab <mchehab@infradead.org>

Signed-off-by: Joerg Heckenbach <joerg@heckenbach-aw.de>
Signed-off-by: Dwaine Garden <dwainegarden@rogers.com>
Signed-off-by: Thierry Merle <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:39 -02:00
Hartmut Birr 2a893dea0f V4L/DVB (4921): Budget-av, budget-ci: Fix MC1 register programming
Remove bogus read during MC1 programming.
A '1' bit could never be cleared using the old code.
Use MASK_xx macros.

Signed-off-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:38 -02:00
Hartmut Birr 97a2cf05c4 V4L/DVB (4919): Budget-ci: Use SAA7146_IER_ENABLE/DISABLE to enable or disable a hardware interrupt
Use SAA7146_IER_ENABLE/DISABLE to enable or disable a hardware interrupt.

Signed-off-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:38 -02:00
Hartmut Birr 740cf9e15e V4L/DVB (4918): Budget-av: Add delay for frontend power-on
Added a delay to give the frontend a little bit time for power-on.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:37 -02:00
Oliver Endriss 00c4cc6751 V4L/DVB (4916): Av7110,budget,budget-ci,budget-av: Use interrupt mode for I2C transfers
Use interrupt mode for I2C transfers.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:35 -02:00
Hartmut Birr 35e55255bb V4L/DVB (4915): Saa7146: Add timeout protection for I2C interrupt
Add a timeout to the wait for the i2c-interrupt.
The timeout prevents from endless waiting if the
interrupt gets lost.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:34 -02:00
Hans Verkuil 122b5dbea6 V4L/DVB (4913): Fix broken TUNER_LG_NTSC_TAPE radio support
The TUNER_LG_NTSC_TAPE is identical in all respects to the
TUNER_PHILIPS_FM1236_MK3. So use the params struct for the Philips tuner.
Also add this LG_NTSC_TAPE tuner to the switches where radio specific
parameters are set so it behaves like a TUNER_PHILIPS_FM1236_MK3. This
change fixes the radio support for this tuner (the wrong bandswitch byte
was used).
Thanks to Andy Walls <cwalls@radix.net> for finding this bug.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:32 -02:00
Jonathan Corbet c8f5b2f560 V4L/DVB (4909): Add s/g_parm to cafe_ccic
Add s/g_parm support allowing applications to tweak the frame rate.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:31 -02:00
Jonathan Corbet a66d233680 V4L/DVB (4908): Remove the fake RGB32 format from cafe_ccic
Remove RGB32, useful for debugging, but with no place in production.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:31 -02:00
Mauro Carvalho Chehab bf5dbed6b4 V4L/DVB (4901): Improve debug msgs to show fourcc and buffer length on video_ioctl2
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:30 -02:00
Thomas Genty 177aaaf826 V4L/DVB (4898): Saa7134: add support for remote control of Hauppauge HVR1110
This patch adds support for the remote control bundled with the
Hauppauge HVR1110

Signed-off-by: Thomas Genty <tomlohave@gmail.com>
Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:29 -02:00
Michael Krufky 4be3276a66 V4L/DVB (4896): Dvb-usb: fix vendor ID ordering
The vendor IDs in this file were all in alphabetical
order except for this one.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:28 -02:00
Michael Hunold c28089a65c V4L/DVB (4895): Accept tuners on saa7146 i2c bus only on address 0x60.
Signed-off-by: Michael Hunold <hunold@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:27 -02:00
Michael Hunold a08cc44ec1 V4L/DVB (4894): Mxb: fix to load the proper i2c modules
Change order of module requests, so that tuner module is loaded at the end,
because the tuner module probes multiple i2c addresses and might grab an i2c
address that is not a tuner but something else.

Signed-off-by: Michael Hunold <hunold@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:26 -02:00
Andrew Morton 036171e75e V4L/DVB: Dvb-budget ci fix
drivers/media/dvb/ttpci/budget-ci.c:220:6: warning: "LINUX_VERSION_CODE" is not defined
drivers/media/dvb/ttpci/budget-ci.c:220:28: warning: "KERNEL_VERSION" is not defined
drivers/media/dvb/ttpci/budget-ci.c:220:42: error: missing binary operator before token "("

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:25 -02:00
Michael Krufky 0b6389ff16 V4L/DVB (4891): Lgdt330x: fix broken whitespace
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:24 -02:00
Michael Krufky 1b5b32bf87 V4L/DVB (4890): Lgdt330x: fix signal / lock status detection bug
In some cases when using VSB, the AGC status register has been known to
falsely report "no signal" when in fact there is a carrier lock.  The
datasheet labels these status flags as QAM only, yet the lgdt330x
module is using these flags for both QAM and VSB.
This patch allows for the carrier recovery lock status register to be
tested, even if the agc signal status register falsely reports no signal.
Thanks to jcrews from #linuxtv in irc, for initially reporting this bug.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:23 -02:00
Adrian Bunk af249982dc V4L/DVB (4887): Remove the broken VIDEO_ZR36120 driver
The VIDEO_ZR36120 driver has:
- already been marked as BROKEN in 2.6.0 three years ago and
- is still marked as BROKEN.
Drivers that had been marked as BROKEN for such a long time seem to be 
unlikely to be revived in the forseeable future.
But if anyone wants to ever revive this driver, the code is still 
present in the older kernel releases.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:23 -02:00