Commit graph

37662 commits

Author SHA1 Message Date
John W. Linville 387e100ac2 p54usb: add USB ID for Linksys WUSB54G ver 2
Based on report from Cavan Carroll <cavancarroll@hotmail.com>:

	http://bugzilla.kernel.org/show_bug.cgi?id=9863

Cc: Cavan Carroll <cavancarroll@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 17:16:19 -05:00
Ivo Couckuyt 1a17582e64 p54usb: add USB ID for Phillips CPWUA054
Retarget of an old patch against prism54usb in linux-wireless archive:

	http://marc.info/?l=linux-wireless&m=117449935810254&w=2

Cc: Ivo Couckuyt <iv0co@yahoo.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-20 17:16:19 -05:00
Randy Dunlap 73fd8b6d31 libata: fix kernel-doc parameter warning
Fix libata kernel-doc parameter:

Warning(linux-2.6.25-rc2-git3//drivers/ata/libata-scsi.c:845): No description found for parameter 'rq'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-20 12:20:49 -05:00
Saeed Bishara f1cb0ea12f sata_mv: remove iounmap in mv_platform_remove and use devm_iomap
this will fix crash bug when doing rmmod to the driver, this is because the
port_stop function get called later and it could access the device's registers.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Acked-by: Mark Lord <mlord@pobox.com>
Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-20 12:20:46 -05:00
Tejun Heo 3326732570 libata: implement libata.force module parameter
This patch implements libata.force module parameter which can
selectively override ATA port, link and device configurations
including cable type, SATA PHY SPD limit, transfer mode and NCQ.

For example, you can say "use 1.5Gbps for all fan-out ports attached
to the second port but allow 3.0Gbps for the PMP device itself, oh,
the device attached to the third fan-out port chokes on NCQ and
shouldn't go over UDMA4" by the following.

 libata.force=2:1.5g,2.15:3.0g,2.03:noncq,udma4

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-20 12:12:28 -05:00
Saeed Bishara 0fca0d6f2c sata_mv: use hpriv->base instead of the host->iomap
this fixes crash bug as the iomap table is not valid for integrated controllers.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-20 12:09:17 -05:00
Martin Michlmayr 2e7e1214de sata_mv: Define module alias for platform device
The sata_mv driver can be loaded as a platform device, as is done by
various Orion (ARM) based devices.  The driver needs to define a module
alias for the platform driver so udev will load it automatically.
Tested with Debian on a QNAP TS-209.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-20 12:08:54 -05:00
Harvey Harrison cb616dd5bb ata: fix sparse warnings in pata_legacy.c
Use ld_qdi and ld_winbond to avoid shadowing static int
variables qdi and winbond.  The ld_ prefix refers to
legacy_data.

drivers/ata/pata_legacy.c:777:21: warning: symbol 'qdi' shadows an earlier one
drivers/ata/pata_legacy.c:128:12: originally declared here
drivers/ata/pata_legacy.c:811:21: warning: symbol 'qdi' shadows an earlier one
drivers/ata/pata_legacy.c:128:12: originally declared here
drivers/ata/pata_legacy.c:848:21: warning: symbol 'qdi' shadows an earlier one
drivers/ata/pata_legacy.c:128:12: originally declared here
drivers/ata/pata_legacy.c:882:21: warning: symbol 'qdi' shadows an earlier one
drivers/ata/pata_legacy.c:128:12: originally declared here
drivers/ata/pata_legacy.c:1040:21: warning: symbol 'winbond' shadows an earlier one
drivers/ata/pata_legacy.c:129:12: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-20 12:08:15 -05:00
Daniel Lezcano c15853f2c1 veth: fix dev refcount race
When deleting the veth driver, veth_close calls netif_carrier_off
for the two extremities of the network device. netif_carrier_off on
the peer device will fire an event and hold a reference on the peer
device. Just after, the peer is unregistered taking the rtnl_lock while
the linkwatch_event is scheduled. If __linkwatch_run_queue does not
occurs before the unregistering, unregister_netdevice will wait for
the dev refcount to reach zero holding the rtnl_lock and linkwatch_event
will wait for the rtnl_lock and hold the dev refcount.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20 00:21:47 -08:00
Matheos Worku fa907895b7 [NIU]: More BMAC alt MAC address fixes.
From: Matheos Worku <Matheos.Worku@Sun.COM>

1) niu_enable_alt_mac() needs to be adjusted so that the mask
   is computed properly for the BMAC case.

2) BMAC has 6 alt MAC addresses available, not 7.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-20 00:18:09 -08:00
Linus Torvalds 5d9c4a7de6 Merge branch 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6
* 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6:
  agp: fix missing casts that produced a warning.
  agp: add support for 662/671 to agp driver
  fix historic ioremap() abuse in AGP
  agp/sis: Suspend support for SiS AGP
  agp/sis: Clear bit 2 from aperture size byte as well
2008-02-19 18:29:57 -08:00
Linus Torvalds 3a93dc42f5 Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/sis: add pciid for SiS 662/671 chipset
  drm: add new rv380 pciid
  drm: add support for passing state into the suspend hooks.
  drm/i915: Fix hibernate save/restore of VGA attribute regs
  drm/i915 more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)
  drm/i915: restore pipeconf regs unconditionally
  drm/i915: save/restore interrupt state
  drm: convert drm from nopage to fault.
  i915: wrap chipset types requiring hw status set ioctl
  drm/radeon: add initial rs690 support to drm.
2008-02-19 17:48:51 -08:00
Pavel Machek 6133116849 ACPI: TSC breaks atkbd suspend
TSC is used even on machines when CONFIG_X86_TSC is not set (X86_TSC
means _require_ TSC), but it is not properly disabled when it is
unusable, because ACPI code understood the config switch as "may use
TSC".

This actually fixes suspend problems on my x60.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-19 20:05:06 -05:00
Dave Airlie 44a207fc66 agp: fix missing casts that produced a warning.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 10:37:08 +10:00
Chaoyu Chen 2e374748c7 agp: add support for 662/671 to agp driver
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 10:18:46 +10:00
Chaoyu Chen feac7af508 drm/sis: add pciid for SiS 662/671 chipset
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 10:12:39 +10:00
Mirko f9e9716a67 drm: add new rv380 pciid
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 10:07:57 +10:00
Dave Airlie b932ccb567 drm: add support for passing state into the suspend hooks.
fix i915 driver to use state for hibernate save avoidance.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 10:05:12 +10:00
Adrian Bunk e03f1a8422 dm-raid1.c: fix NULL dereferences
This patch fixes two NULL dereferences introduced by commit
06386bbfd2 and spotted by the Coverity
checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-19 15:52:27 -08:00
Linus Torvalds e855e5d82e 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:
  IB/mthca: Free correct MPT on error exit from mthca_fmr_alloc()
  IPoIB/cm: Fix ipoib_cm_dev_stop() cleanup when drain times out
2008-02-19 15:50:11 -08:00
Jesse Barnes da636ad6a0 drm/i915: Fix hibernate save/restore of VGA attribute regs
In hibernate, we may end up calling the VGA save regs function twice, so we need to make sure it's idempotent.  That means leaving ARX in index mode after the first save operation.  Fixes hibernate on 965.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 09:45:14 +10:00
Keith Packard 1f84e550a8 drm/i915 more registers for S3 (DSPCLK_GATE_D, CACHE_MODE_0, MI_ARB_STATE)
Failing to preserve the MI_ARB_STATE register was causing FIFO underruns on
the VGA output on my HP 2510p after resume.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 09:43:43 +10:00
Jesse Barnes c0c4261b6f drm/i915: restore pipeconf regs unconditionally
On many chipsets, the checks for DPLL enable or VGA mode will prevent the pipeconf regs from being restored, which could result in a blank display or X failing to come back after resume.  So restore them unconditionally along with actually restoring pipe B's palette correctly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 09:42:12 +10:00
Jesse Barnes 0da3ea12fc drm/i915: save/restore interrupt state
On resume, if the interrupt state isn't restored correctly, we may end
up with a flood of unexpected or ill-timed interrupts, which could cause
the kernel to disable the interrupt or vblank events to happen at the
wrong time.  So save/restore them properly.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-20 09:39:58 +10:00
Nick Piggin ca0b07d9a9 drm: convert drm from nopage to fault.
Remove redundant vma range checks.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-20 09:37:12 +10:00
Zhenyu Wang b39d50e53b i915: wrap chipset types requiring hw status set ioctl
Also applys to recent added new chipset.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-20 09:37:09 +10:00
Maciej Cencora 60f9268394 drm/radeon: add initial rs690 support to drm.
This adds support for configuring the RS690 GART.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20 09:35:42 +10:00
Roland Dreier b7f9c112a5 IB/mthca: Free correct MPT on error exit from mthca_fmr_alloc()
When mthca_fmr_alloc() returns an error, it should free the MPT at the
index key, not mr->ibmr.lkey, since the lkey has been mangled by
hw_index_to_key() and no longer is the real index.  This bug causes
corruption of the MPT table free bitmap when mthca_fmr_alloc() fails.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-19 10:42:50 -08:00
Pradeep Satyanarayana ec229e5e81 IPoIB/cm: Fix ipoib_cm_dev_stop() cleanup when drain times out
Commit efcd9971 ("IPoIB/cm: Factor out ipoib_cm_free_rx_reap_list()")
introduced a bug in ipoib_cm_dev_stop() when the receive drain times
out.  In that case, the function moves all the pending rx stuff into a
private list but then calls ipoib_cm_free_rx_reap_list(), which
handles a different list.

Fix this by moving everything to the rx_reap_list that will actually
get freed up.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=906>.

Signed-off-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-02-19 10:25:11 -08:00
FUJITA Tomonori 2b28a4721e [SCSI] ips: fix data buffer accessors conversion bug
This fixes a bug that can't handle a passthru command with more than
two sg entries.

Big thanks to Tim Pepper for debugging the problem.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-19 10:49:27 -06:00
Linus Torvalds aa3f98037c Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] qdio: FCP/SCSI write I/O stagnates on LPAR
  [S390] Fix futex_atomic_cmpxchg_std inline assembly.
  [S390] dcss: Fix Unlikely(x) != y
  [S390] sclp: clean up send/receive naming scheme
  [S390] etr: fix compile error on !SMP
  [S390] qdio: fix qdio_activate timeout handling.
  [S390] Initialize per cpu lowcores on cpu hotplug.
  [S390] find bit corner case.
  [S390] dasd: fix locking in __dasd_device_process_final_queue
  [S390] Make sure enabled wait psw is loaded in default_idle.
  [S390] Let NR_CPUS default to 32/64 on s390/s390x.
  [S390] cio: Do timed recovery on workqueue.
  [S390] cio: Remember to initialize recovery_lock.
2008-02-19 08:04:23 -08:00
Linus Torvalds f6c427663a Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  libata: implement drain buffers
  libata: eliminate the home grown dma padding in favour of
  block: clear drain buffer if draining for write command
  block: implement request_queue->dma_drain_needed
  block: add request->raw_data_len
  block: update bio according to DMA alignment padding
  libata: update ATAPI overflow draining
  elevator: make elevator_get() attempt to load the appropriate module
  cfq-iosched: add hlist for browsing parallel to the radix tree
  block: make blk_rq_map_user() clear ->bio if it unmaps it
  fs/block_dev.c: remove #if 0'ed code
  make struct def_blk_aops static
  make blk_settings_init() static
  make blk_ioc_init() static
  make blk-core.c:request_cachep static again
2008-02-19 08:03:02 -08:00
Linus Torvalds 9ef38eaf42 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] HP ProLiant WatchDog driver
  [WATCHDOG] blackfin Watchdog driver: relocate all strings used in __init functions to __initdata
  [WATCHDOG] Convert mtx1 wdt to be a platform device and use generic GPIO API
  [WATCHDOG] Add support for SB1 hardware watchdog
2008-02-19 08:02:04 -08:00
Linus Torvalds b69409279c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Add regs_return_value().
  [SPARC64]: Kill pcic_present().
  [SPARC]: Kill 'prom_palette'.
  [ATYFB]: Kill 'prom_palette' sparc code.
  [SPARC64]: Kill 'prom_keyboard'.
  [SPARC]: Kill extern decl of 'panic_setup'.
  [SPARC64]: Delete 'boot_flags'.
  [SPARC64]: Kill unused function 'kernel_enter_debugger'.
  [SPARC64] arch/sparc64/kernel/unaligned.c: Use time_* macros
  [SPARC64]: Always register a PROM based early console.
  [SPARC64]: Update defconfig.
  [SPARC64]: Add -mtune=ultrasparc3 if possible.
  [SPARC64]: Remove Makefile code for ancient gcc and binutils.
  [SPARC64]: Remove DEBUG_BOOTMEM.
  [SPARC64]: Use shorter "get_zeroed_page" call.
  [SPARC]: Use shorter form of "get_zeroed_page".
  [SPARC]: video/cg14.c and video/sbuslib.c build fixes
2008-02-19 07:53:28 -08:00
Linus Torvalds 07ce198a1e Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (60 commits)
  [NIU]: Bump driver version and release date.
  [NIU]: Fix BMAC alternate MAC address indexing.
  net: fix kernel-doc warnings in header files
  [IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
  [IPV6]: dst_entry leak in ip4ip6_err. (resend)
  bluetooth: do not move child device other than rfcomm
  bluetooth: put hci dev after del conn
  [NET]: Elminate spurious print_mac() calls.
  [BLUETOOTH] hci_sysfs.c: Kill build warning.
  [NET]: Remove MAC_FMT
  net/8021q/vlan_dev.c: Use print_mac.
  [XFRM]: Fix ordering issue in xfrm_dst_hash_transfer().
  [BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros
  [IPV6]: Fix hardcoded removing of old module code
  [NETLABEL]: Move some initialization code into __init section.
  [NETLABEL]: Shrink the genl-ops registration code.
  [AX25] ax25_out: check skb for NULL in ax25_kick()
  [TCP]: Fix tcp_v4_send_synack() comment
  [IPV4]: fix alignment of IP-Config output
  Documentation: fix tcp.txt
  ...
2008-02-19 07:52:45 -08:00
Ursula Braun e5fa443ea0 [S390] qdio: FCP/SCSI write I/O stagnates on LPAR
If running on LPAR, qdio might overlook an incoming buffer in certain
scenarios. The patch makes sure that incoming buffers are detected
immediately in all situations.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:35 +01:00
Roel Kluin 39f73b2886 [S390] dcss: Fix Unlikely(x) != y
Fix Unlikely(x) != y

Cc: Gerald Schaefer <geraldsc@de.ibm.com>
Cc: Stefan Weinhuber <wein@de.ibm.com>
Cc: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:35 +01:00
Peter Oberparleiter d082d3ce32 [S390] sclp: clean up send/receive naming scheme
Make state change events adjust the correct mask by cleaning up
naming inconsistencies. Also remove chance for lockup by removing
unnecessary mask related check before reading events.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:34 +01:00
Heiko Carstens b32ecdb725 [S390] qdio: fix qdio_activate timeout handling.
Current code in qdio_activate waits for at least 5 seconds
until it returns. It may return earlier if an error occurs,
but not if everything is ok. This large timeout value
became visible with commit dfa77f611f
"qdio: set QDIO_ACTIVATE_TIMEOUT to 5s", which intended to
fix the timeout value which was zero. In turn setting an
FCP adapter online took 5 seconds.

In practice waiting for 5ms before continuing is sufficient
as pointed out by Utz Bacher and Cornelia Huck.

Cc: Utz Bacher <utz.bacher@de.ibm.com>
Cc: Jan Glauber <jan.glauber@de.ibm.com>
Cc: Ursula Braun <braunu@de.ibm.com>
Cc: Martin Peschke <mp3@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:34 +01:00
Stefan Weinhuber 03513bccad [S390] dasd: fix locking in __dasd_device_process_final_queue
After setting the status of the cqr and releasing the lock for the
block cqr queue, we call the cqr callback function, which will usually
just trigger the dasd_block_tasklet. But when the tasklet is already
running the cqr might be processed before we invoke the callback
function. In rare cases the callback pointer may already be invalid
by the time we want to call it, which will result in a panic.
Solution: Call the callback function first and then release the lock.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:33 +01:00
Cornelia Huck 4c629727ce [S390] cio: Do timed recovery on workqueue.
We can't do our recovery in softirq context, so we schedule it from
our timer function.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:32 +01:00
Cornelia Huck 486d0a0079 [S390] cio: Remember to initialize recovery_lock.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-02-19 15:29:32 +01:00
James Bottomley fa2fc7f481 libata: implement drain buffers
This just updates the libata slave configure routine to take advantage
of the block layer drain buffers.  It also adjusts the size lengths in
the atapi code to add the drain buffer to the DMA length so the driver
knows it can rely on it.

I suspect I should also be checking for AHCI as well as ATA_DEV_ATAPI,
but I couldn't see how to do that easily.

tj: * atapi_drain_needed() added such that draining is applied to only
      misc ATAPI commands.
    * q->bounce_gfp used when allocating drain buffer.
    * Now duplicate ATAPI PIO drain logic dropped.
    * ata_dev_printk() used instead of sdev_printk().

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-02-19 11:36:57 +01:00
James Bottomley dde2020754 libata: eliminate the home grown dma padding in favour of
that provided by the block layer

ATA requires that all DMA transfers begin and end on word boundaries.
Because of this, a large amount of machinery grew up in ide to adjust
scatterlists on this basis.  However, as of 2.5, the block layer has a
dma_alignment variable which ensures both the beginning and length of a
DMA transfer are aligned on the dma_alignment boundary.  Although the
block layer does adjust the beginning of the transfer to ensure this
happens, it doesn't actually adjust the length, it merely makes sure
that space is allocated for transfers beyond the declared length.  The
upshot of this is that scatterlists may be padded to any size between
the actual length and the length adjusted to the dma_alignment safely
knowing that memory is allocated in this region.

Right at the moment, SCSI takes the default dma_aligment which is on a
512 byte boundary.  Note that this aligment only applies to transfers
coming in from user space.  However, since all kernel allocations are
automatically aligned on a minimum of 32 byte boundaries, it is safe to
adjust them in this manner as well.

tj: * Adjusting sg after padding is done in block layer.  Make libata
      set queue alignment correctly for ATAPI devices and drop broken
      sg mangling from ata_sg_setup().
    * Use request->raw_data_len for ATAPI transfer chunk size.
    * Killed qc->raw_nbytes.
    * Separated out killing qc->n_iter.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-02-19 11:36:56 +01:00
Tejun Heo 6b00769fe1 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>
2008-02-19 11:36:35 +01:00
Tejun Heo 56c819df77 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>
2008-02-19 11:35:37 +01:00
David S. Miller a442585952 [NIU]: Bump driver version and release date.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 21:30:48 -08:00
Matheos Worku 3b5bcedeeb [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>
2008-02-18 21:30:03 -08:00
Arjan van dev Ven fcea424d31 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>
2008-02-19 14:46:39 +10:00
Stuart Bennett 16469a0ea0 agp/sis: Suspend support for SiS AGP
Tested on M650 chipset

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-19 14:44:40 +10:00
Stuart Bennett b7d0640f92 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>
2008-02-19 14:44:32 +10:00
Mark M. Hoffman 25e9c86d5a hwmon: normal_i2c arrays should be const
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-18 21:58:15 -05:00
Darrick J. Wong 57df46d6d9 hwmon: New driver for Analog Devices ADT7473 sensor chip
This driver reports voltage, temperature and fan sensor readings
on an ADT7473 chip.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-18 21:51:29 -05:00
Kiyoshi Ueda 14e04c3f6e 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>
2008-02-19 01:41:26 +01:00
Jan Evert van Grootheest 0e7d8d4802 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>
2008-02-19 01:41:26 +01:00
Jan Evert van Grootheest 1a1990f547 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>
2008-02-19 01:41:26 +01:00
Andrew Smith 84f7e451e9 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>
2008-02-19 01:41:26 +01:00
Bartlomiej Zolnierkiewicz d684b21f89 falconide: locking bugfix
commit 8ac4ce742c ("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>
2008-02-19 01:41:25 +01:00
Mikko Rapeli b152fcd341 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>
2008-02-19 01:41:25 +01:00
Geert Uytterhoeven 899e1bc573 ide: Add missing base addresses for falconide and macide
commit 29dd59755a ("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>
2008-02-19 01:41:24 +01:00
Linus Torvalds f702c58156 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()
2008-02-18 15:52:40 -08:00
Linus Torvalds 20ef0f1ad0 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
  ...
2008-02-18 15:49:47 -08:00
Linus Torvalds 0eddf038ad 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
2008-02-18 15:46:03 -08:00
David S. Miller 30b3cfe1f6 [ATYFB]: Kill 'prom_palette' sparc code.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-18 15:26:43 -08:00
Roland Dreier 51af33e8e4 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>
2008-02-18 10:33:59 -08:00
Thomas Mingarelli 7f4da4745c [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>
2008-02-18 17:06:21 +00:00
Mike Frysinger bb59b5578a [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>
2008-02-18 16:54:11 +00:00
Florian Fainelli 6ea8115bb6 [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>
2008-02-18 16:54:02 +00:00
Andrew Sharp 75c752e6c3 [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>
2008-02-18 16:53:47 +00:00
Mauro Carvalho Chehab 6165894fb6 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>
2008-02-18 12:18:28 -03:00
Paul Mundt ea35e3a754 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>
2008-02-18 12:18:09 -03:00
Ricardo Cerqueira baff6cdd33 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>
2008-02-18 12:18:08 -03:00
Mauro Carvalho Chehab 40ae91a758 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>
2008-02-18 12:18:06 -03:00
Robert Fitzsimons 7c018804c0 V4L/DVB (7197): bttv: Fix overlay divide error
The initial work to convert the bttv driver to V4L2 "Partial conversion
from V4L1 to V4L2" (e84619b174), 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>
2008-02-18 12:18:03 -03:00
Tony Breeds c9fe1d6ba6 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>
2008-02-18 12:18:02 -03:00
James Bottomley ff83efacf2 [SCSI] gdth: don't call pci_free_consistent under spinlock
The spinlock is held over too large a region: pscratch is a permanent
address (it's allocated at boot time and never changes).  All you need
the smp lock for is mediating the scratch in use flag, so fix this by
moving the spinlock into the case where we set the pscratch_busy flag
to false.

Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 09:02:25 -06:00
FUJITA Tomonori 279e7f5425 [SCSI] qla2xxx: fix compile warning for printk format
scsi/qla2xxx/qla_dfs.c: In function 'qla2x00_dfs_fce_show':
scsi/qla2xxx/qla_dfs.c:26: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'uint64_t'

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:17 -06:00
James Bottomley 5e2f22d39e [SCSI] aic7xx: mitigate HOST_MSG_LOOP invalid SCB ff panic
The panic occurs if we get a MSGIN or MSGOUT for an unidentified SCB
(meaning we didn't identify the outstanding command it was for).  For
MSGIN this is wrong because it could be an unsolicited negotiation
MSGIN from the target.

Still panic on unsolicited MSGOUT because this would represent a
mistake in the negotiation phases.  However, we should fix this as
well.  The specs say we should go to bus free for unexpected msgin.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:17 -06:00
FUJITA Tomonori cbccc20712 [SCSI] scsi_debug: disable clustering
scsi_debug does at several places:

for_each_sg(sdb->table.sgl, sg, sdb->table.nents, k) {
	kaddr = (unsigned char *)
		kmap_atomic(sg_page(sg), KM_USER0);

We cannot do something like that with the clustering enabled (or we
can use scsi_kmap_atomic_sg).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:16 -06:00
James Bottomley 0e935c9eba [SCSI] fas216: fix up the previous fas216 commit
Apparently the fix to [SCSI] fas216: Use scsi_eh API for REQUEST_SENSE
invocation didn't show up in the final version sent to linus.

Correct this omission.

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:16 -06:00
Alan Cox 7d1abbe824 [SCSI] megaraid: outb_p extermination
From conversations with the maintainers the _p isn't needed so kill it.
That removes the last non ISA _p user from the SCSI layer to my knowledge.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: "Yang, Bo" <Bo.Yang@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:16 -06:00
Kyle McMartin 2939deaab2 [SCSI] mpt fusion: kill warnings in mptbase.h on parisc64
Verified all the arches necessary select the CONFIG_64BIT symbol. This
also kills the warning (since it was using the 32-bit case) on parisc64
and mips64.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:16 -06:00
James Bottomley cb84e2d2ff [SCSI] aic94xx: fix REQ_TASK_ABORT and REQ_DEVICE_RESET
This driver has been failing under heavy load with

aic94xx: escb_tasklet_complete: REQ_TASK_ABORT, reason=0x6
aic94xx: escb_tasklet_complete: Can't find task (tc=4) to abort!

The second message is because the driver fails to identify the task
it's being asked to abort.  On closer inpection, there's a thinko in
the for each task loop over pending tasks in both the REQ_TASK_ABORT
and REQ_DEVICE_RESET cases where it doesn't look at the task on the
pending list but at the one on the ESCB (which is always NULL).

Fix by looking at the right task.  Also add a print for the case where
the pending SCB doesn't have a task attached.

Not sure if this will fix all the problems, but it's a definite first
step.

Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:15 -06:00
Yinghai Lu 691b4773aa [SCSI] ses: fix data corruption
one system: initrd get courrupted:

RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 2048) 134217728
crc error
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 388k freed
init_special_inode: bogus i_mode (177777)
Warning: unable to open an initial console.
init_special_inode: bogus i_mode (177777)
init_special_inode: bogus i_mode (177777)
Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

bisected to
commit 9927c68864
Author: James Bottomley <James.Bottomley@HansenPartnership.com>
Date:   Sun Feb 3 15:48:56 2008 -0600

    [SCSI] ses: add new Enclosure ULD

changes:
1. change char to unsigned char to avoid type change later.
2. preserve len for page1
3. need to move desc_ptr even the entry is not enclosure_component_device/raid.
   so keep desc_ptr on right position
4. record page7 len, and double check if desc_ptr out of boundary before touch.
5. fix typo in subenclosure checking: should use hdr_buf instead.

[jejb: style fixes]

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-02-18 08:57:15 -06:00
Roland Stoll 27d0fe1894 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>
2008-02-18 11:15:19 -03:00
Ricardo Cerqueira 968fb08912 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>
2008-02-18 11:15:19 -03:00
Adrian Pardini f0ba356c85 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>
2008-02-18 11:15:19 -03:00
Tobias Lorenz 57566ad2d8 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>
2008-02-18 11:15:18 -03:00
Tobias Lorenz 5caf51342c 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>
2008-02-18 11:15:18 -03:00
Hartmut Hackmann ea75baf4b0 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>
2008-02-18 11:15:18 -03:00
Michael Krufky 83947d307d 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>
2008-02-18 11:15:17 -03:00
Mauro Carvalho Chehab 61b080d214 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>
2008-02-18 11:15:17 -03:00
Mauro Carvalho Chehab 3687e1e67e 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>
2008-02-18 11:15:17 -03:00
Mauro Carvalho Chehab 92ea42f442 V4L/DVB (7164): em28xx-alsa: Add a missing mutex
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:16 -03:00
Mauro Carvalho Chehab 00b8730f5d 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>
2008-02-18 11:15:16 -03:00
Mauro Carvalho Chehab 0df8130fe8 V4L/DVB (7162): em28xx: Fix endian and returns the correct values
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:15 -03:00
Mauro Carvalho Chehab 0da5176f4e V4L/DVB (7161): em28xx: Fix printing debug values higher than 127
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:15 -03:00
Mauro Carvalho Chehab 1e7ad56f1f 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>
2008-02-18 11:15:14 -03:00
Mauro Carvalho Chehab 7463dda2ae 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>
2008-02-18 11:15:14 -03:00
Andrew Morton 1685a6fed2 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>
2008-02-18 11:15:13 -03:00
Brandon Philips 384b835aed 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>
2008-02-18 11:15:13 -03:00
Roel Kluin 18c0ecf16e 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>
2008-02-18 11:15:13 -03:00
Luc Saillard 427d20c4e6 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>
2008-02-18 11:15:12 -03:00
Mauro Carvalho Chehab fb62a5953e 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>
2008-02-18 11:15:12 -03:00
Mauro Carvalho Chehab 64f9477f95 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>
2008-02-18 11:15:12 -03:00
Mauro Carvalho Chehab ce3a35d3c0 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>
2008-02-18 11:15:11 -03:00
Oliver Endriss 0ed4a6ea9d 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>
2008-02-18 11:15:11 -03:00
Kim Sandberg 251130bf26 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>
2008-02-18 11:15:10 -03:00
Oliver Endriss 03aa73c587 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>
2008-02-18 11:15:10 -03:00
Tobias Lorenz 998cb0827d 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>
2008-02-18 11:15:09 -03:00
Tobias Lorenz c3f686f152 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>
2008-02-18 11:15:09 -03:00
Adrian Bunk 532fe65205 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>
2008-02-18 11:15:09 -03:00
Adrian Bunk fe2b8f50a3 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>
2008-02-18 11:15:08 -03:00
Adrian Bunk beb9e780a4 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>
2008-02-18 11:15:05 -03:00
Adrian Bunk c52c4d063e 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 b00ef4b8d8
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>
2008-02-18 11:15:04 -03:00
Adrian Bunk 805d92dfa6 V4L/DVB (7100): frontends/tda18271-common.c: fix off-by-one
This patch fixes an off-by-one error spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:02 -03:00
Matthias Schwarzott 0e8f4cc5c8 V4L/DVB (7097): saa7134-dvb: add missing dvb_attach call (for tda10046_attach)
saa7134-dvb: add missing dvb_attach around tda10046_attach

This patch adds a possibly missing dvb_attach for tda10046_attach.
This removes the hard dependency of saa7134-dvb on tda1004x module.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:00 -03:00
Mauro Carvalho Chehab e08a8c9dc7 V4L/DVB (7093): radio-sf16fmi: fix request_region()
isapnp_fmi_probe attaches device. However, if request_region() fails, the
device isn't disattached.

Reviewed-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:59 -03:00
Douglas Schilling Landgraf dd49f30ca0 V4L/DVB (7092): radio-sf16fmr2: fix request_region() validation [bugzilla 9699]
This patch changed the request_region() validation to avoid invalid return.
Thanks to Roland Kletzing <devzero@web.de> for bug report and data collection.

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:59 -03:00
Tobias Lorenz 0e3301ec23 V4L/DVB (7091): radio-si470x improvements and seldom problem fixed in tuning functions
I updated the radio-si470x driver another time. Here are the commented history entries:

- number of seek_retries changed to tune_timeout
The last versions checked for the end of frequency tuning by polling a si470x register.
Therefore polling depended on the usb utilization.
This was changed to have a constant timeout now.

- fixed problem with incomplete tune operations by own buffers
The last version used a shared buffer to assembly the USB HID reports.
It sometimes happened, that multiple functions were modifing this buffer simultanuously.
When sending such reports, the hardware returned USB stalls (-EPIPE).
Now buffers of the correct size (smaller than before) are allocated as local variables.

- optimization of variables
The size of some variables has been reduced to allow the compiler to generate more optimized code.

- improved error logging
At some important location, error checking was improved.
Especially the usb transfers to access si470x registers and the tuning functions were modified.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:59 -03:00
Jaime Velasco Juan 2de3a5a5c5 V4L/DVB (7090): V4L: stkwebcam: use v4l_compat_ioctl32
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:58 -03:00
Jaime Velasco Juan 1fdd61c022 V4L/DVB (7089): V4L: stkwebcam: Power management support
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:58 -03:00
Jaime Velasco Juan 1112fb68ae V4L/DVB (7088): V4L: stkwebcam: Add support for YUYV format
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:57 -03:00
Cyrill Gorcunov 0ed464e13e V4L/DVB (7086): driver: tcm825x - fix logical typo error
This patch does fix potential NULL pointer dereference
due to logical typo error.

The issue is pointed out by
Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>


Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
CC: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:57 -03:00
Hermann Pitton 29e4e05041 V4L/DVB (7085): saa7134: detect the LifeView FlyDVB-T Hybrid Mini PCI
Thanks to Angelo Lisco for his initial patch we missed and to
Ahmet Dogan Ugurel confirming such a device functional.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:57 -03:00
Hermann Pitton 728b92a230 V4L/DVB (7084): saa7134: add support for the Medion / Creatix CTX948 card
This adds support for analog inputs and DVB-T.
Good sensitivity for DVB-T currently needs to use analog TV first.
DVB-S support is not yet completed, but is on the way.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:56 -03:00
Hermann Pitton ad1ef131c3 V4L/DVB (7083): saa7134: enable radio and external analog audio-in on the md2819
It also enumerates now the separate composite input at first
and adds mute ability to radio and external audio-in.

Many thanks to Daftcho Tabakov for reporting the flaws and testing.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:56 -03:00
Hermann Pitton 4ba243734a V4L/DVB (7082): support for Twinhan Hybrid DTV-DVB 3056 PCI
S-Video is unconfirmed, but likely correct.
The remote is not yet investigated.

Thanks go to Sioux for providing code and asking to fix the auto
detection.

Signed-off-by: sioux <sioux_it@libero.it>
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:55 -03:00
Antoine Jacquet c0e0aff977 V4L/DVB (7081): zr364xx: add support for Creative DiVi CAM 516
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:54 -03:00
Antoine Jacquet 71c044752c V4L/DVB (7080): zr364xx: add support for Pentax Optio 50
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:54 -03:00
Akinobu Mita 46c9fc861f V4L/DVB (7076): bt878: include KERN_ facility level
printk should use KERN_* levels.

CC: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:53 -03:00
Mauro Carvalho Chehab a348d2005d V4L/DVB (7049): Remove sound/driver.h
sound/driver.h is already included by sound/core.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:53 -03:00
Mauro Carvalho Chehab 057596eea8 V4L/DVB (7133): Fix Kconfig dependencies
As pointed by Adrian Bunk, with I2C=m and VIDEO_DEV=y, videodev brokes.

This patch moves the functions that videodev needs from v4l2-common. It also
fixes some Kconfig changes.

After this patch, I2C=m / VIDEO_DEV=y will make v4l2 core statically linked
into kernel. v4l2-common will be m, and all V4L drivers will also be m.

This approach is very conservative, since it is possible to have V4L drivers
that don't need I2C or v4l2-common. The better is to map what drivers really
need v4l2-common, making them to select v4l2-common, and allowing the others to
be 'y', 'm' and 'n'.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:53 -03:00
Mauro Carvalho Chehab 1a4e30c3ea V4L/DVB (7119): Remove obsolete code from v4l2-common
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:51 -03:00
Mauro Carvalho Chehab a9254475bb V4L/DVB (7115): Fix bug #9833: regression when compiling V4L without I2C
Adrian Bunk reported:

> > Commit 8ffbc65594 causes the following
> > compile error with CONFIG_VIDEO_DEV=y/m, CONFIG_I2C=n:
> >
> > <--  snip  -->
> >
> > ...
> >   MODPOST 26 modules
> > ERROR: "i2c_attach_client" [drivers/media/video/v4l2-common.ko] undefined!
> > make[2]: *** [__modpost] Error 1
> >
> > <--  snip  -->

...

And what should happen if CONFIG_VIDEO_DEV=y, CONFIG_I2C=m?

CC: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:50 -03:00
Rudolf Marek ae770152c8 hwmon: (coretemp) Add Penryn CPU to coretemp
This patch adds support for family 0x17, which has Penryn Core. It should also
cover the 8 cores Xeons.

Can someone test please? I think it should work.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 22:08:37 -05:00
Rudolf Marek 118a887188 hwmon: (coretemp) Add TjMax detection for mobile CPUs
Following patch will finally solve the detection of Intel Mobile CPUs which
share same CPUID with Desktop/Server CPUs. We need this information to test
some bit so we know if TjMax is 100C or 85C. Intel claims this works for mobiles
only, respect that and set for desktops the TjMax to 100C. Intel provided some
table on their wiki based on my chat with them at:
http://softwarecommunity.intel.com/isn/Community/en-US/forums/30247249/ShowThread.aspx#30247249

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 21:57:28 -05:00
Riki Oktarianto cd19ba1391 hwmon: (applesmc) sensors set for MacBook2
On my mid-2007 MacBook2, reading Ts0P sensor always failed with this message:
applesmc: wait status failed: 5 != 50.

So I assume that there's no such Ts0p sensor in this model (please confirm,
anyone). If there's the case, then we need a new set of sensors defined for
MacBook2.

Signed-off-by: Riki Oktarianto <rkoktarianto@gmail.com>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 15:04:14 -05:00
Tobias Klauser 5910a9b2b1 hwmon: (thmc50) Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 12:11:50 -05:00
Sam Ravnborg ba7c1927aa hwmon: (coretemp) fix section mismatch warning
Fix following warning:
WARNING: vmlinux.o(.text+0xebfd04): Section mismatch in reference from the function coretemp_cpu_callback() to the function .cpuinit.text:coretemp_device_add()

coretemp_cpu_callback() are only used inside a
HOTPLUG_CPU block so annotate it __cpuinit.
The notifier referencing the function are annotated
__refdata to silence warning from the exit function.
The unregister function do not use the embedded pointer
but clears the variable so the annotation is OK.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 11:26:55 -05:00
Rudolf Marek 6369a2887a hwmon: (coretemp) Add maximum cooling temperature readout
Following patch will add reporting of maximum temperature, at which all fans
should spin full speed. It may be non-physical temperature on Desktop/Server CPUs.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 10:21:39 -05:00
Jean Delvare 1d5f2c16c6 hwmon: (adm1026) Properly terminate sysfs groups
The missing NULL at the end of two sysfs file groups causes a kernel
crash when calling sysfs_create_group().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 09:27:19 -05:00
Roger Lucas af865765a9 hwmon: (vt8231) Update maintainer email address
Signed-off-by: Roger Lucas <vt8231@hiddenengine.co.uk>

(modified MAINTAINERS entry also - MMH)

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 09:27:19 -05:00
Jean Delvare 2d1374cad5 hwmon: (vt8231) Add individual alarm files
The new libsensors needs these individual alarm files.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
CC: Roger Lucas <vt8231@hiddenengine.co.uk>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 09:27:18 -05:00
Jean Delvare 13ff05e9f8 hwmon: (via686a) Add individual alarm files
The new libsensors needs these individual alarm files.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 09:27:18 -05:00
Jean Delvare 1f08af7ea9 hwmon: (smsc47m1) Add individual alarm files
The new libsensors needs these individual alarm files.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 09:27:18 -05:00
Jean Delvare 71062ffcd5 hwmon: (max1619) Add individual alarm and fault files
The new libsensors needs these individual alarm and fault files.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 09:27:18 -05:00
Jean Delvare 6cb59e915d hwmon: (lm92) Add individual alarm files
The new libsensors needs these individual alarm files.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-17 09:27:18 -05:00
Holger Schurig ac2bf5bdc6 [ARM] 4828/1: fix 3 warnings in drivers/video/pxafb.c
* Silence a debug output.
* Silence three sparse warnings, one still left.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-02-17 10:42:09 +00:00
Holger Schurig d6a7b5f84b [ARM] 4827/1: fix two warnings in drivers/i2c/busses/i2c-pxa.c
This fixes two warnings:

* unused static defined function decode_ICR() when
  compiled without CONFIG_I2C_PXA_SLAVE
* a sparse warning about a void function returning
  something

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-02-17 10:42:07 +00:00