Commit Graph

43587 Commits

Author SHA1 Message Date
Jussi Kivilinna 818727badc rndis_host: pass buffer length to rndis_command
Pass buffer length to rndis_command so that rndis_command can read full
response buffer from device instead of max CONTROL_BUFFER_SIZE bytes.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28 10:23:34 -04:00
Nobuhiro Iwamatsu 0caa11663c net: sh_eth: Fix compile error sh_eth
Fix compile error on sh_eth and remove base address macro.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28 10:23:33 -04:00
Andy Gospodarek b45f87681e e1000: remove e1000_clean_tx_irq call from e1000_netpoll
The call to e1000_clean_tx_irq in e1000_netpoll can race with the call
to e1000_clean_tx_irq in e1000_clean.  With a small bit of tweaking to
to netpoll_send_skb to simulate a system that was under extreme stress,
I was able to reproduce these concurrent calls.  This can result in
multiple frees to the skbs on the tx ring buffer.

Dropping this call from e1000_netpoll should be fine since we can rely
on the calls in e1000_clean to do what is needed since napi will poll
the hardware just after calling poll_controller.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28 10:23:32 -04:00
Taku Izumi 42bfd33ab7 igb: make ioport free
This patch makes igb driver ioport-free.
This corrects behavior in probe function so as not to request ioport
resources as long as they are not really needed.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28 10:23:32 -04:00
Taku Izumi 6e4f6f6b40 e1000e: make ioport free
This patch makes e1000e driver ioport-free.
This corrects behavior in probe function so as not to request ioport
resources as long as they are not really needed.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28 10:23:31 -04:00
Auke Kok d03157babe e1000: remove PCI Express device IDs
We do not want to prolong the situation much longer that e1000
and e1000e support these devices at the same time. As a result,
take out the bandage that was added for the interim period
and remove all the PCI Express device IDs from e1000.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28 10:23:30 -04:00
David S. Miller 1b63ba8a86 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	drivers/net/wireless/iwlwifi/iwl4965-base.c
2008-06-28 01:19:40 -07:00
Li Zefan a0a61a604c CONNECTOR: add a proc entry to list connectors
I got a problem when I wanted to check if the kernel supports process
event connector, and It seems there's no way to do this check.

At best I can check if the kernel supports connector or not, by looking
into /proc/net/netlink, or maybe checking the return value of bind() to
see if it's ENOENT.

So it would be useful to add /proc/net/connector to list all supported
connectors:
 # cat /proc/net/connector
 Name            ID
 connector       4294967295:4294967295
 cn_proc         1:1
 w1              3:1

Changelog:
- fix memory leak: s/seq_release/single_release
- use spin_lock_bh instead of spin_lock_irqsave

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-27 20:03:24 -07:00
Andre Haupt 4797982119 hamradio: remove unused variable
Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-27 17:22:08 -07:00
Neil Brown 9bbbca3a0e Fix error paths if md_probe fails.
md_probe can fail (e.g. alloc_disk could fail) without
returning an error (as it alway returns NULL).
So when we call mddev_find immediately afterwards, we need
to check that md_probe actually succeeded.  This means checking
that mdev->gendisk is non-NULL.

cc: <stable@kernel.org>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
2008-06-28 08:31:17 +10:00
Neil Brown efe3114318 Don't acknowlege that stripe-expand is complete until it really is.
We shouldn't acknowledge that a stripe has been expanded (When
reshaping a raid5 by adding a device) until the moved data has
actually been written out.  However we are currently
acknowledging (by calling md_done_sync) when the POST_XOR
is complete and before the write.

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

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

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

Cc: <stable@kernel.org>
Signed-off-by: Neil Brown <neilb@suse.de>
2008-06-28 08:31:14 +10:00
Neil Brown 8c2e870a62 Ensure interrupted recovery completed properly (v1 metadata plus bitmap)
If, while assembling an array, we find a device which is not fully
in-sync with the array, it is important to set the "fullsync" flags.
This is an exact analog to the setting of this flag in hot_add_disk
methods.

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

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

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

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

will make sure recovery completes properly.

Cc: <stable@kernel.org>
Signed-off-by: Neil Brown <neilb@suse.de>
2008-06-28 08:30:52 +10:00
Richard Sharpe 0e3e2eabf4 firewire: fw-sbp2: fix parsing of logical unit directories
There is a small off-by-one bug in firewire-sbp2. This causes problems
when a device exports multiple LUN Directories. I found it when trying
to talk to a SONY DVD Jukebox.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Acked-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (op. order, changelog)
2008-06-27 20:55:00 +02:00
Harvey Harrison 5f4a6fae46 prism: islpci_eth.c endianness fix
clock is already cpu-endian (see le32_to_cpu slightly before), so
le64_to_cpu doesn't make much sense.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 14:49:52 -04:00
Ivo van Doorn 980dfcb932 rt2x00: Fix lock dependency errror
This fixes a circular locking dependency in the workqueue handling.
The interface work task uses the mac80211 function
ieee80211_iterate_active_interfaces() which grabs the RTNL lock.

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

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

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 14:49:52 -04:00
John W. Linville ff28bd94e3 wireless: remove RFKILL_STATE_HARD_BLOCKED warnings
CC [M]  drivers/net/wireless/b43/rfkill.o
drivers/net/wireless/b43/rfkill.c: In function ‘b43_rfkill_soft_toggle’:
drivers/net/wireless/b43/rfkill.c:90: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch

  CC [M]  drivers/net/wireless/b43legacy/rfkill.o
drivers/net/wireless/b43legacy/rfkill.c: In function ‘b43legacy_rfkill_soft_toggle’:
drivers/net/wireless/b43legacy/rfkill.c:92: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch

  CC [M]  drivers/net/wireless/iwlwifi/iwl-rfkill.o
drivers/net/wireless/iwlwifi/iwl-rfkill.c: In function ‘iwl_rfkill_soft_rf_kill’:
drivers/net/wireless/iwlwifi/iwl-rfkill.c:56: warning: enumeration value ‘RFKILL_STATE_HARD_BLOCKED’ not handled in switch

Also handle RFKILL_STATE_{ON,OFF} -> RFKILL_STATE_{UNBLOCKED,SOFT_BLOCKED}
conversion since I'm already here...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 10:27:47 -04:00
John W. Linville d195a2ca46 ath5k: remove now unused variable declared in ath5k_tx
CC [M]  drivers/net/wireless/ath5k/base.o
drivers/net/wireless/ath5k/base.c: In function ‘ath5k_tx’:
drivers/net/wireless/ath5k/base.c:2598: warning: unused variable ‘info’

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:31:29 -04:00
Pavel Machek e292c737fc wireless: Small cleanups
Small whitespace cleanups for wireless drivers

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:20 -04:00
Randy Dunlap b973e42eb2 iwlwifi: fix build for CONFIG_INPUT=n
Fix iwlwifi so that it builds cleanly with CONFIG_INPUT=n.
Also free the input device on exit.

drivers/built-in.o: In function `iwl_rfkill_unregister':
(.text+0xbf430): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `iwl_rfkill_init':
(.text+0xbf51c): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `iwl_rfkill_init':
(.text+0xbf5bf): undefined reference to `input_register_device'
drivers/built-in.o: In function `iwl_rfkill_init':
(.text+0xbf5e9): undefined reference to `input_free_device'
net/built-in.o: In function `rfkill_disconnect':
rfkill-input.c:(.text+0xe71e1): undefined reference to `input_close_device'
rfkill-input.c:(.text+0xe71e9): undefined reference to `input_unregister_handle'
net/built-in.o: In function `rfkill_connect':
rfkill-input.c:(.text+0xe723e): undefined reference to `input_register_handle'
rfkill-input.c:(.text+0xe724d): undefined reference to `input_open_device'
rfkill-input.c:(.text+0xe725c): undefined reference to `input_unregister_handle'
net/built-in.o: In function `rfkill_handler_init':
rfkill-input.c:(.init.text+0x36ec): undefined reference to `input_register_handler'
net/built-in.o: In function `rfkill_handler_exit':
rfkill-input.c:(.exit.text+0x112c): undefined reference to `input_unregister_handler'
make[1]: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:20 -04:00
Michael Buesch 14a7dd6f6c b43: Fix PIO skb clobber
This fixes a clobber of the skb that was introduced by the
tx_control->cb conversion patches.
This bug causes a crash when the skb destructor is invoked. That happens
on skb_orphan or skb_kfree.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:19 -04:00
Ivo van Doorn 40af48ce50 rt2x00: kill URB for all TX queues during disable_radio()
During rt2x00usb_disable_radio() all pending urb's should
be killed and not only those from the RX queue.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:18 -04:00
Bob Copeland 3a078876ca ath5k: convert LED code to use mac80211 triggers
This change cleans up the ath5k LED code and converts it to use
the standard LED device class along with the rx/tx LED triggers
provided by mac80211.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:17 -04:00
Ivo van Doorn 61243d8e79 rt2x00: Remove duplicate deinitialization
When rt2x00queue_alloc_rxskbs() fails rt2x00queue_unitialize()
will be called which will free all rxskb. So we don't need
to do this in the rt2x00queue_alloc_rxskb() function as well.

rt2x00queue_free_skb() unmaps the DMA but doesn't clear the
allocation flag. Since the code is copied from rt2x00queue_unmap_skb()
anyway (and that function does clear the flag) we might as well
use that function directly.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:17 -04:00
Michael Buesch 923fd7036f b43: Add debugfs firmware debugging knob
This adds a firmware debugging knob to debugfs.
With this knob it's possible to enable advanced runtime firmware
checks.
For now it only implements one sanity check for the mac-suspend.
In future there'll probably be more.
If CONFIG_B43_DEBUG is disabled, these checks will collapse to nothing.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:16 -04:00
Michael Buesch 9b839a7453 b43: Add simple firmware watchdog
This adds a simple firmware watchdog for the opensource firmware.
This will check every 15 seconds, if the firmware zeroed out the watchdog
register. The firmware will do this in its eventloop.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:16 -04:00
Michael Buesch f225763a7d ssb, b43, b43legacy, b44: Rewrite SSB DMA API
This is a rewrite of the DMA API for SSB devices.
This is needed, because the old (non-existing) "API" made too many bad
assumptions on the API of the host-bus (PCI).
This introduces an almost complete SSB-DMA-API that maps to the lowlevel
bus-API based on the bustype.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-27 09:09:15 -04:00
David S. Miller 7ac3b02536 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6 2008-06-27 04:26:58 -07:00
Ben Hutchings 3e3cda96d0 Hold RTNL while calling dev_close()
dev_close() must be called holding the RTNL.  Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:31:52 -04:00
Ben Hutchings c81ec80bc8 qla3xxx: Hold RTNL while calling dev_close()
dev_close() must be called holding the RTNL.  Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:31:50 -04:00
Andi Kleen 64c42f6976 [netdrvr] Fix IOMMU overflow checking in s2io.c
s2io has IOMMU overflow checking, but unfortunately it is wrong.

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

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

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

Cc: ram.vepa@neterion.com
Cc: santosh.rastapur@neterion.com
Cc: sivakumar.subramani@neterion.com
Cc: sreenivasa.honnur@neterion.com

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:31:22 -04:00
Andy Gospodarek 581abbc26a e1000: only enable TSO6 via ethtool when using correct hardware
When enabling TSO via ethool on e1000, it is possible to set
NETIF_F_TSO6 on hardware that does not support it.  Setting TSO via
ethtool now matches the settings used when the hardware is probed.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:31:08 -04:00
Kevin Hao 1923815d85 e100: Do pci_dma_sync after skb_alloc for proper operation on ixp4xx
The E100 device can't work on current kernel (2.6.26-rc6) and will cause
kernel corruption on intel ixdp4xx.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:30:59 -04:00
Al Viro 70081ac55d [netdrvr] netxen: fix netxen_pci_tbl[] breakage
PCI_DEVICE_CLASS sets .device and .vendor to PCI_ANY_DEV,
which overrides the effect of preceding PCI_DEVICE() and makes
all elements of netxen_pci_tbl[] identical.  Introduced in the
commit dcd56fdbae.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:30:46 -04:00
Ingo Molnar c5643cab7b [netdrvr] 3c59x: remove irqs_disabled warning from local_bh_enable
Original Author: Michael Buesch <mb@bu3sch.de>

net, vortex: fix lockup

Ingo Molnar reported:

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

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

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

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

Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:30:33 -04:00
Pekka Enberg e8399fed7e ipg: use NULL, not zero, for pointers
Fixes a sparse warning in a code block that's hidden under JUMBO_FRAME #ifdef.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:28:31 -04:00
Pekka Enberg ecfecfb5e3 ipg: fix jumbo frame compilation
Make jumbo frame support compile again. It was broken by the cleanup series
before the merge because the code is hidden under JUMBO_FRAME #ifdef.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:28:29 -04:00
Julia Lawall 3f6602ad56 drivers/net/r6040.c: Eliminate double sizeof
Taking sizeof the result of sizeof is quite strange and does not seem to be
what is wanted here.

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

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

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

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:28:25 -04:00
Komuro 54299ef7e9 pcnet_cs, axnet_cs: clear bogus interrupt before request_irq
Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:28:21 -04:00
Jeff Kirsher 52cc30862a e1000e: fix EEH recovery during reset on PPC
EEH is not recovering in a reasonable amount of time on PPC during
e1000e_down().

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:27:48 -04:00
Jeff Kirsher 3023682e74 igb: fix EEH recovery during reset on PPC
EEH is not recovering in a reasonable amount of time on PPC during
igb_down().

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:27:47 -04:00
Paul Larson 6f4a0e45c6 ixgbe: fix EEH recovery during reset on PPC
EEh is not recovering in a resonable amount of time on PPC during
ixgbe_down().

Signed-off-by: Paul Larson <pl@us.ibm.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:27:46 -04:00
Atsushi Nemoto ccc57aac9c tc35815: Fix receiver hangup on Rx FIFO overflow
On Rx FIFO overflow error, the controller consume a buffer descriptor
but currently the driver does not give it back to the controller.
This results unrecoverable 'Buffer List Exhausted' condition.  This
patch fix this problem by moving a "fbl_count--" line to proper place.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:27:43 -04:00
Atsushi Nemoto 59524a3744 tc35815: Mark carrier-off before starting PHY
Call netif_carrier_off() before starting PHY device.  This is a
behavior before converting to generic PHY layer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27 01:27:33 -04:00
Harvey Harrison 316af76f34 adm8211: remove unnecessary protected bit mask/check
Removes now unused fc local var and uses the new ieee80211_hdrlen
which directly uses the le16 frame control value.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:50:02 -04:00
Michael Buesch 9965183a78 b43: Remove "shm" and "ucode_regs" debugfs files
We don't need these two dump-files anymore, as we can easily do this
in userspace now.
Use b43-fwdump from the b43-tools repository to dump microcode registers.
Use "b43-fwdump -s" to dump SHM (or use -S to do a binary dump)

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:18 -04:00
Michael Buesch efa275822b b43: Add mask/set capability to debugfs MMIO interface
This adds an atomic mask/set capability to the debugfs MMIO interface.
This is needed to support mask and/or set operations from the userspace
debugging tools.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:18 -04:00
Michael Buesch 6bbc321a96 b43: Add debugfs files for random SHM access
This adds debugfs files for random SHM access.
This is needed in order to implement firmware and driver debugging
scripts in userspace.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:18 -04:00
Michael Buesch 8bd463f4f9 b43: Add debugfs files for MMIO register access
This adds debugfs files for reading and writing arbitrary
wireless core registers. This is useful for debugging.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:18 -04:00
Ivo van Doorn 8160465dc7 rt2x00: Release rt2x00 2.1.8
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:17 -04:00
Ivo van Doorn f529932ce2 rt2x00: Increase queue size
Without the preallocated DMA we can now safely increase
the queue size withotu negative impact on the memory
requirements of rt2x00.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:16 -04:00
Ivo van Doorn c1d35dfa0f rt2x00: Fix sparse warning on nested container_of()
Sparse produces warnings about nested contain_of() statements,
this means that lines like:
	interface_to_usbdev(to_usb_interface(rt2x00dev->dev));
will upset sparse.
Add a new macro to rt2x00usb.h which will convert to device
structure to the usb_device pointer in 2 steps to prevent this
sparse warning.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:16 -04:00
Ivo van Doorn d74f5ba473 rt2x00: Cleanup symbol exports
With a bit of code moving to rt2x00lib within the
TX and RX paths we can now remove a lot of EXPORT_SYMBOL_GPL()
statements. This cleans up the interface between rt2x00lib
and the drivers and has the additional benefit that rt2x00pci
and rt2x00usb are trimmed down in size as well since they
have less to do.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:16 -04:00
Gertjan van Wingerde c4da004857 rt2x00: Replace statically allocated DMA buffers with mapped skb's.
The current PCI drivers require a lot of pre-allocated DMA buffers. Reduce this
by using dynamically mapped skb's (using pci_map_single) instead of the pre-
allocated DMA buffers that are allocated at device start-up time.

At the same time move common RX path code into rt2x00lib from rt2x00pci and
rt2x00usb, as the RX paths now are now almost the same.

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:16 -04:00
Gertjan van Wingerde 30caa6e3d5 rt2x00: Centralize allocation of RX skbs.
In preparation of replacing the statically allocated DMA buffers with
dynamically mapped skbs, centralize the allocation of RX skbs to rt2x00queue.c
and let rt2x00pci already use them.

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:15 -04:00
Gertjan van Wingerde 14a3bf8921 rt2x00: Convert rt2x00 to use generic DMA-mapping API
At the same time clean up the device administration a bit, by storing a pointer
to struct device instead of a void pointer that is dependent on the type of
device. The normal PCI and USB subsystem provided macros can be used to convert
the device pointer to the right type.
This makes the rt2x00 driver a bit more type-safe.

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:15 -04:00
Gertjan van Wingerde c95edf5432 rt2x00: Properly clean up beacon skbs.
The skbs containing the beacons weren't properly cleaned up for rt2400pci, rt2500pci,
rt61pci, and rt73usb. Clean up those skbs in the manner appropriate for each driver.

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:15 -04:00
Ivo van Doorn ac1044628d rt2x00: Use ieee80211 fc handlers
With the introduction of the ieee80211 fc handlers
we can now remove the rt2x00.h versions to use the
global versions.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Reviewed-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:15 -04:00
Stephen Rothwell e800f17c6f wireless: fix fallout from device_create removal
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:14 -04:00
Harvey Harrison b99a017c01 b43legacy: use frame control helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:14 -04:00
Harvey Harrison f37d923422 b43: use frame control helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:13 -04:00
Harvey Harrison 8536582059 zd1211rw: use frame control helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:13 -04:00
Harvey Harrison 24b56e7055 ath5k: use frame control helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:13 -04:00
Adrian Bunk 94d9842403 remove the strip driver
The latest trace about usage of this driver I found was an (unanswered)
request for help by a user trying to get it working reliably five years
ago with kernel 2.4 .

And even if it was still working the use cases of this driver (requiring
both the hardware and someone providing this kind of wireless network)
have become practically nonexisting.

This patch therefore removes the strip driver.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-26 16:49:13 -04:00
Arjan van de Ven a17898737e V4L/DVB (8108): Fix open/close race in saa7134
The saa7134 driver uses a (non-atomic) variable in an attempt to
only allow one opener of the device (how it deals with sending
the fd over unix sockets I don't know).

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

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

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:59 -03:00
Marcin Slusarz 5c554e6b98 V4L/DVB (8100): V4L/vivi: fix possible memory leak in vivi_fillbuff
Move allocation after first check and fix memory leak.

Noticed-by: Daniel Marjamäki <danielm77@spray.se>

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:58 -03:00
Steven Toth e470d8177e V4L/DVB (8097): xc5000: check device hardware state to determine if firmware download is needed
This patch ensures that the xc5000 will have firmware loaded as needed if the
part is powered down or reset via gpio from the host. An example of this, in
some cases, could be after the system resumes from standby or hibernate modes.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:58 -03:00
Steven Toth 836c28584d V4L/DVB (8096): au8522: prevent false-positive lock status
This decreases scan time in Queens, New York from 28 minutes to 7 minutes,
with the exact same services found.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:58 -03:00
Hans Verkuil 7fa8e6fa15 V4L/DVB (8092): videodev: simplify and fix standard enumeration
VIDIOC_ENUMSTD did not return all the PAL/SECAM/NTSC variants: it just returned
one single PAL/SECAM/NTSC standard without separate entries for the trickier
standards like NTSC-JP.

Changed the code so that it behaves better.

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

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:57 -03:00
Oliver Endriss 7876ad75b1 V4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed
Fix uncorrected block counter and bit error rate to follow DVB API spec:
- Unsupported controls return -ENOSYS.
- UNC must never be set to 0.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:57 -03:00
Oliver Endriss 0b915e74ac V4L/DVB (8074): av7110: OSD transfers should not be interrupted
OSD transfers should not be interrupted.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:56 -03:00
Oliver Endriss edabaffc7e V4L/DVB (8073): av7110: Catch another type of ARM crash
Catch another type of ARM crash.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:55 -03:00
Oliver Endriss c9fa2b1eee V4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation
If the i2c write fails during initialisation, an oops happens
because state->frontend.dvb is still undefined. Fixed.

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

Thanks-to: Sigmund Augdal <sigmund@snap.tv>
Thanks-to: Hartmut Birr <e9hack@gmail.com>

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:55 -03:00
Andy Walls ad907fa395 V4L/DVB (8069): cx18: Fix S-Video and Compsite inputs for the Yuan MPC718 and enable card entry
cx18: Fix S-Video and Compsite input settings for the Yuan MPC718 per user
reports from Yuri Warczynski <Yuri.Warczynski@gmail.com> and
Brian Hope <brian@hopefamily.info> and enable the card entry.  The tuner reset
GPIO pin is likely incorrect as the tuner firmware cannot be reloaded without a
reboot.  It is likely the audio routing is done via GPIO which is not
implemented yet, as users report audio doesn't work for some inputs.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:55 -03:00
Andy Walls 1f09e8a25c V4L/DVB (8068): cx18: Add I2C slave reset via GPIO upon initialization
cx18: Add I2C slave reset via GPIO upon initialization.  One user,
Michael <msd4824@yahoo.com>, has reported this allows his HVR-1600 EEPROM to
be consistently recognized when using (long,) 100 msec delays.   The delays in
this commit are nominal (10 & 40 msec) and need testing/tuning on boards with
I2C problems to find the right values.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:54 -03:00
Andy Walls 08cf7b2ed1 V4L/DVB (8067): cx18: Fix firmware load for case when digital capture happens first
This is a fix for the case when a digital capture from dvr0 happens first after
modprobe, before access to any cx18 v4l2 device nodes.  The initial dvb feed
start has been changed to load the firmware if not already loaded.  Also fixed a
use counter to correct dvb feed accounting if starting the transport DMA fails.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:54 -03:00
Andy Walls 46195b555a V4L/DVB (8066): cx18: Fix audio mux input definitions for HVR-1600 Line In 2 and FM radio
Fix the cx18-cards.c structures for the HVR-1600 to reflect that audio Line In 2
and FM radio audio go to AIN3 and AIN4 of the CS5345 mux respectively.  Verified
by physical inspection of an HVR-1600MCE, by listening to FM broadcasts with the
HVR-1600MCE, and by comparing with the card definition for a PVR-150 in ivtv.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:54 -03:00
Andy Walls 527629fb7c V4L/DVB (8063): cx18: Fix unintended auto configurations in cx18-av-core
Change the cx18-av-core code so that accesses to cx23418 av core that
cause auto-configuration will be adjusted to emulate the auto-configuration
behavior of the cx25843.  This fixes the VBI displayed as video at the top of
the frame for NTSC and probably other things.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:53 -03:00
Michael Krufky beb31e6365 V4L/DVB (8061): cx18: only select tuner / frontend modules if !DVB_FE_CUSTOMISE
The automatic Kconfig selection for tuners and frontends should be
conditional, based on !DVB_FE_CUSTOMISE.

This patch corrects the selection for VIDEO_CX18 on
MEDIA_TUNER_MXL5005S and DVB_S5H1409

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:53 -03:00
Tim Farrington 6e501a3f4a V4L/DVB (8048): saa7134: Fix entries for Avermedia A16d and Avermedia E506
Also, adds IR table for Avermedia A16d

Signed-off-by: Tim Farrington <timf@iinet.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:52 -03:00
Michael Krufky 74d50724a0 V4L/DVB (8044): au8522: tuning optimizations
If the current modulation and frequency is already set to
the desired parameters, then don't re-tune.

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

Force a re-tune after resume from standby.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:52 -03:00
Michael Krufky 104fe9a2d2 V4L/DVB (8043): au0828: add support for additional USB device id's
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:52 -03:00
Austin Lund 3b94088707 V4L/DVB (8042): DVB-USB UMT-010 channel scan oops
In the umt-010 driver the struct umt_properties sets the number of URBs for
transfer to 20.  But in dvb-usb.h MAX_NO_URBS_FOR_DATA_STREAM is set to 10.

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

fix on Kaffeine channel scan for

Initialize stream count using MAX_NO_URBS_FOR_DATA_STREAM.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:51 -03:00
Guennadi Liakhovetski 3cfdc7f25b V4L/DVB (8040): soc-camera: remove soc_camera_host_class class
Devices can either be class devices or bus devices, not both at the
same time. Soc-camera host devices usually have a platform device as
their parent. Trying to also register them with a class crashes the
kernel, when linked statically. Interestingly, it works when built
as a module. Thanks to Paulius Zaleckas for reporting.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:50 -03:00
Guennadi Liakhovetski 02da465945 V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.
platform_get_irq() returns a negative value on error, not 0.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:50 -03:00
Michael Krufky 7ae1ac4c1d V4L/DVB (8037): tda18271: ensure that the thermometer is off during channel configuration
Having the thermometer on during channel configuration
could cause tuning instability.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:50 -03:00
Michael Krufky 51858d1361 V4L/DVB (8036): tda18271: toggle rf agc speed mode on TDA18271HD/C2 only
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:49 -03:00
Michael Krufky 119a7c7e34 V4L/DVB (8035): tda18271: dont touch EB14 if rf_cal lookup is out of range
The TDA18271HD/C1 rf_cal map lookup is expected to go out of range outside
of the frequency window 41 MHz - 61.1 MHz.  In these cases, the internal
RF tracking filters calibration mechanism is used.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:49 -03:00
Michael Krufky 44e645c203 V4L/DVB (8034): tda18271: fix IF notch frequency handling
The IF notch bit gets unset when we update the Main Post Div register
value, before we have a chance to write the desired IF notch setting
to the tuner.  Move the IF notch configuration to after we update MPD.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:48 -03:00
Mauro Carvalho Chehab 0e7830b50b V4L/DVB (8029): Improve error message at tda1004x_attach
When an error occurs at firmware loading, sometimes, tda1004x stops answering.
Instead of reporting such error, attach code were assuming that the device were
answering an invalid ID (0xff). This can be seen when enabling debug options:

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

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

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

A possible improvement would be trying to reset the device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:48 -03:00
Mauro Carvalho Chehab bc36ec7464 V4L/DVB (8028): Improve error messages for tda1004x attach
A fresh copy of v.29 firmware, using get_firmware, is leading to an invalid
firmware:

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

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

With this patch, it will now print:

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

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

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:48 -03:00
Matthias Schwarzott b25fed115a V4L/DVB (8027): saa7134: Avermedia A700: only s-video and composite input are working
Describe exactly that only s-video and composite input are working on Avermedia
A700

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:47 -03:00
Mauro Carvalho Chehab 83ee87a31d V4L/DVB (8026): Avoids an OOPS if dev struct can't be successfully recovered
On some alsa versions, it seems that snd_pcm_substream_chip(substream)
is returning a NULL pointer. This causes an OOPS, as reported by:

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

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

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:47 -03:00
Marcin Slusarz 913f5fc209 V4L/DVB (8022): saa7134: fix race between opening and closing the device
decrementing dev->empress_users should be done as last action of ts_release,
because it sleeps and write access to dev->empress_started is not protected
in any way
(additionally closing thread could mute audio after opening thread unmuted it)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:46 -03:00
Dmitri Belimov a14fe9605b V4L/DVB (8020): Fix callbacks functions of saa7134_empress
If I try v4l2-ctl --all -d /dev/video1 or v4l2-ctl --streamon -d /dev/video1
modules crashed:

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

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

After this fix all of that commands works without problem:

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

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


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

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:45 -03:00
Devin Heitmueller a8a1f8cc0c V4L/DVB (8018): Add em2860 chip ID
em28xx-cards.c
em28xx-reg.h
 - Add em2860 chip ID (seen on Pointnix Intra-Oral Camera)
   http://www.pointnix.com/ENG/dental/product_02.asp

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:45 -03:00
Devin Heitmueller df61918163 V4L/DVB (8017): Ensure em28xx extensions only get run against devs that support them
em28xx-audio.c
em28xx-dvb.c
 - Em28xx extensions should ensure they are being only loaded against devices
   that support them.  Deals with case where there are multiple em28xx
   devices, some of which have DVB (or ALSA) support and some do not.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:44 -03:00
Antti Palosaari 1a78db8269 V4L/DVB (8015): gl861: replace non critical msleep(0) with msleep(1) to be on the safe side
- change msleep(0) to msleep(1)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:44 -03:00
Antti Palosaari ea3a13b7a1 V4L/DVB (8013): gl861: remove useless identify_state
- remove useless identify_state - device is always warm

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:44 -03:00
Antti Palosaari f56ebe16b0 V4L/DVB (8012): gl861: sleep a little to avoid I2C errors
- add little sleep to avoid I2C errors arising on faster CPUs

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:43 -03:00
Devin Heitmueller b38cc64200 V4L/DVB (8011): em28xx: enable DVB for HVR-900
em28xx-cards.c
 - DVB support is supposed to be enabled for the first generation HVR-900.
   This device was confirmed with DVB by mkrufky when we did the original work
   in April, but I guess we forgot to set the flag.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:43 -03:00
Devin Heitmueller 0367ca1bc7 V4L/DVB (8010): em28xx: Properly register extensions for already attached devices
em28xx-video.c
 - Properly handle loading of the module when multiple devices are already
   connected (such as at bootup).  Before we were only calling dvb_init()
   against the last device in the list, so while we were handling subsequent
   adds properly, if there were multiple devices present on driver load,
   everybody except the last device would not get initialized.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:42 -03:00
Hans Verkuil d3d9b803ee V4L/DVB (8008): cx18: remove duplicate audio and video input enums
cx18-cards.h had a copy of the audio and video input enums
from cx18-av-core.h, but with different prefixes. Removed
that copy and used the ones from cx18-av-core.h.

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

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:42 -03:00
Hans Verkuil 45270a1531 V4L/DVB (8007): cx18/cx25840: the S-Video LUMA input can use all In1-In8 inputs
The S-Video LUMA input was restricted to the In1-In4 inputs, but it
turns out that it can use the full range of In1-In8.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:42 -03:00
Mauro Carvalho Chehab bf67cac131 V4L/DVB (8005): Fix OOPS if frontend is null
Thanks to timf <timf@iinet.net.au> and Mike Galbraith <efault@gmx.de> to report
this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:41 -03:00
Mauro Carvalho Chehab fde60748d2 V4L/DVB (8004): Fix INPUT dependency at budget-ci
As reported by Ingo Molnar:
MODPOST 346 modules
ERROR: "input_free_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_register_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_allocate_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_unregister_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_event" [drivers/media/common/ir-common.ko] undefined!

This occurs when:

CONFIG_INPUT=n
CONFIG_VIDEO_IR=m
CONFIG_DVB_BUDGET_CI=m

Thanks-to: Ingo Molnar <mingo@elte.hu>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:41 -03:00
Len Brown c4e6a2e64e Merge branches 'release', 'acpi_disabled' and 'bugzilla-10958' into release 2008-06-26 01:56:35 -04:00
Len Brown 816c2eda3c dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.
Signed-off-by: Len Brown <len.brown@intel.com>
2008-06-26 01:55:27 -04:00
Vegard Nossum 4389ed2ff6 ACPI: don't walk tables if ACPI was disabled
Ingo Molnar wrote:
> -tip auto-testing started triggering this spinlock corruption message
> yesterday:
>
> [    3.976213] calling  acpi_rtc_init+0x0/0xd3
> [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
> [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
> [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0

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

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-06-26 01:55:18 -04:00
Rene Herman 16d7523973 thermal: Create CONFIG_THERMAL_HWMON=n
A bug in libsensors <= 2.10.6 is exposed
when this new hwmon I/F is enabled.
Create CONFIG_THERMAL_HWMON=n
until some time after libsensors 2.10.7 ships
so those users can run the latest kernel.

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

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-06-25 19:25:42 -04:00
John W. Linville 1839cea91e Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/wireless-2.6 2008-06-25 15:17:58 -04:00
Jaya Kumar 9e6c29768f [ARM] 5117/1: pxafb: fix __devinit/exit annotations
This patch fixes pxafb's init/exit annotations. It uses __devinit/exit for
probe functions and __init for init functions. g_options is left as
__devinitdata since it is used by both.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-06-25 18:50:14 +01:00
James Bottomley ec5e69f6d3 [SCSI] esp: tidy up target reference counting
The esp driver currently does hand rolled reference counting of its
target.  It's much easier to do what it needs to do if it's plugged into
the mid-layer callbacks (target_alloc and target_destroy) which were
designed for this case, so do it this way and get rid of the internal
target reference count.

Acked-by: David S. Miller <davem@davemloft.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-25 12:36:13 -05:00
Ron Rindjunsky 66b5004d85 iwlwifi: improve scanning band selection management
This patch modifies the band selection management when scanning, so
bands are now scanned according to HW band support.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-25 10:57:03 -04:00
Ivo van Doorn 99ade2597e rt2x00: Fix unbalanced mutex locking
The usb_cache_mutex was not correctly released
under all circumstances. Both rt73usb as rt2500usb
didn't release the mutex under certain conditions
when the register access failed. Obviously such
failure would lead to deadlocks.

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

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-25 10:56:16 -04:00
Michael Buesch 2f9ec47d09 b43legacy: Fix possible NULL pointer dereference in DMA code
This fixes a possible NULL pointer dereference in an error path of the
DMA allocation error checking code. This is also necessary for a future
DMA API change that is on its way into the mainline kernel that adds
an additional dev parameter to dma_mapping_error().

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-25 10:56:16 -04:00
Michael Buesch 7b3abfc87e b43: Fix possible MMIO access while device is down
This fixes a possible MMIO access while the device is still down
from a suspend cycle. MMIO accesses with the device powered down
may cause crashes on certain devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-25 10:55:09 -04:00
Michael Buesch 664f200610 b43legacy: Do not return TX_BUSY from op_tx
Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-25 10:55:09 -04:00
Michael Buesch c9e8eae093 b43: Do not return TX_BUSY from op_tx
Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.
This will fix the resume hang.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-25 10:51:51 -04:00
Mallikarjuna R Chilakala 177db6ffd0 ixgbe: add LRO support
Support for in-kernel LRO with the ability to enable/disable via ethtool
based on comments from Ben Hutchings.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 23:06:19 -04:00
Divy Le Ray 8f85cd7fef cxgb3 - add missing adapter type for RDMA
T3C added support is now reflected to the RDMA driver.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:59:33 -04:00
Grant Grundler 78a6551814 drivers/net/tulip: update first comment in tulip files
Three basic changes to the comments at the top of each file:
1) remove stale "Maintained by" line...I prefer people look in MAINTAINERS.
2) Drop reference to stale sf.net/tulip website (I didn't see anything
   of value there)
3) Point people at bugzilla.kernel.org to submit bugs...will always
   get tracked regardless of who the maintainer is.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Acked-by-stale-maintainer: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:59:26 -04:00
Ben Dooks 6ff4ff06d2 DM9000: Remove DEFAULT_TRIGGER for request_irq() flags.
Currently all but one user (AT91SAM9261EK) of the dm9000
driver passes their IRQ flags through the resources attached
to the platform device. This means we can remove the use
of DEFAULT_TRIGGER as the blackfin machines all seem to
have their triggers set properly.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:58:36 -04:00
Ben Dooks 485ca22a10 DM9000: Re-unite menuconfig entries for DM9000 driver
The ENC28J60 driver ended up adding itself inbetween the
two DM9000 Kconfig entries, so re-unite the two together.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:58:29 -04:00
Ben Dooks 2fcf06ca67 DM9000: Add missing msleep() in EEPROM wait code.
The msleep() call in the code that checks for the
EEPROM controller's busy status was missing.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:58:17 -04:00
Ben Dooks f8dd0ecbb7 DM9000: Allow the use of the NSR register to get link status.
The DM9000's internal PHY reports a copy of the link status
in the NSR register of the chip. Reading the status when
polling for link status is faster as it eliminates the need
to sleep, but does not print as much information.

Add an platform flag to force this behaviour, and a Kconfig
option to allow it to be forced to the faster method always.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:58:07 -04:00
Ben Dooks aa1eb452e8 DM9000: Use NSR to determine link-status on internal PHY
The DM9000_NSR register contains a copy of the internal PHY's
link status which we can use to determine if the link is up
or down. This eliminates the more costly (and sleeping) PHY
read when using the DM9000's own PHY.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:57:58 -04:00
Ben Dooks f8d79e79a1 DM9000: Cleanup source code - remove forward declerations
Cleanup the source code by moving the code around to avoid
having to declare the functions before they are used.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:57:51 -04:00
Ben Dooks 59eae1fa3b DM9000: Cleanup source code
Cleanup bits of the DM9000 driver to make the code
neater and easier to read. This is includes removing
some old definitions, re-indenting areas, etc.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:57:42 -04:00
Ben Dooks 9088fa4fa2 DM9000: Cleanups after the resource changes
Remove the now extraneous checks in dm9000_release_board()
now that the two-resource case is removed. Also remove the
check on pdev->num_resources, as we check the return data
from platform_get_resource() to ensure we have not only
the right number but the right type of resources as well.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:57:28 -04:00
Ben Dooks 6d406b3c76 DM9000: Add support for DM9000A and DM9000B chips
Add support for both the DM9000A and DM9000B versions of
the DM9000 networking chip. This includes adding support
for the Link-Change IRQ which is used instead of polling
the PHY every 2 seconds.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:57:16 -04:00
Laurent Pinchart 08c3f57caa DM9000: Remove the 2 resources probe scheme.
The dm9000 driver accepts either 2 or 3 resources to describe the platform
devices. The 2 resources case abuses the ioresource mechanism by passing
ioremap()ed memory through the platform device resources. This patch removes
that case and converts boards that were using it to the 3 resources scheme.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-24 22:56:43 -04:00
David S. Miller eadc49b1a8 [SCSI] esp: Fix OOPS in esp_reset_cleanup().
OOPS reported by Friedrich Oslage <bluebird@porno-bullen.de>

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

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

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

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

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-24 15:48:56 -05:00
Linus Torvalds de08341a0e 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:
  Revert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working"
2008-06-24 11:23:35 -07:00
Jie Luo ea7b44c8e6 enable bus mastering on i915 at resume time
On 9xx chips, bus mastering needs to be enabled at resume time for much of the
chip to function.  With this patch, vblank interrupts will work as expected
on resume, along with other chip functions.   Fixes kernel bugzilla #10844.

Signed-off-by: Jie Luo <clotho67@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-24 11:17:25 -07:00
Matthew Wilcox c95e62ce89 [SCSI] ses: Fix timeout
Timeouts are measured in jiffies, not in seconds.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-06-24 12:02:27 -05:00
Wim Van Sebroeck 63842cccb2 Revert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working"
After Linus fixed the inline assembly, the CFLAGS option is not
needed anymore.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2008-06-24 13:09:26 +00:00
Eilon Greenstein e35c3269ed bnx2x: Update version
Updating to version 1.45.6

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:36:51 -07:00
Wendy Xiong 493adb1fee bnx2x: Add PCIE EEH support
Add PCI recovery functions to the driver.  The initial PCI state is
also saved so the MSI state can be restored during PCI recovery.

Signed-off-by: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:36:22 -07:00
Yitchak Gertner f3c87cddfe bnx2x: Enhanced self test
Added registers, memories, loopback, nvram, interrupt and link tests to
the self-test

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:35:51 -07:00
Eilon Greenstein 755735eb34 bnx2x: Re-factor Tx code
Add support for IPv6 TSO
Re-factor the Tx code with smaller functions to increase readability.
Add linearization code in case packet is too fragmented for the
microcode to handle.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:35:13 -07:00
Vladislav Zolotarov 7a9b25577c bnx2x: Add TPA, Broadcoms HW LRO
The TPA stands for Transparent Packet Aggregation. When enabled, the FW
aggregate in-order TCP packets according to the 4-tuple match and sends
1 big packet to the driver. This packet is stored on an SGL in which
each SGE is 1 page. The FW also implements a timeout algorithm and it
honors all TCP flag, including the push flag as a trigger to halt
aggregation.

After receiving Ben Hutchings comments, we also added ethtool support,
so now, thanks to Ben's patch, when forwarding is enabled, our
aggregation is turned off using the LRO flags.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:34:36 -07:00
Yitchak Gertner bb2a0f7ae4 bnx2x: New statistics code
To avoid race conditions with link up/down and driver up/down - the
statistics handling was re-written in a form of state machine.
Also supporting statistics for 57711

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:33:36 -07:00
Eilon Greenstein 34f80b04f3 bnx2x: Add support for BCM57711 HW
Supporting the 57711 and 57711E - refers to in the code as E1H. The
57710 is referred to as E1.

To support the new members in the family, the bnx2x structure was
divided to 3 parts: common, port and function. These changes caused some
rearrangement in the bnx2x.h file.

A set of accessories macros were added to make access to the bnx2x
structure more readable

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:33:01 -07:00
Eilon Greenstein e523287e8e bnx2x: New microcode part 3/3
The new Microcode BLOB - broken into a separate patch to make it small
enough for the mailing list

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:32:28 -07:00
Eilon Greenstein 299133cf73 bnx2x: New microcode part 2/3
The new Microcode BLOB - broken into a separate patch to make it small
enough for the mailing list

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:32:04 -07:00
Eilon Greenstein 74bc8ebcfd bnx2x: New microcode part 1/3
The new Microcode BLOB - broken into a separate patch to make it small
enough for the mailing list

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:31:40 -07:00
Eilon Greenstein 523cb50b26 bnx2x: Remove old microcode
Removing the old Microcode from the BLOB - broken into a separate
patch to make it small enough for the mailing list

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:30:11 -07:00
Eilon Greenstein ad8d394804 bnx2x: New init infrastructure
This new initialization code supports the 57711 HW. It also supports
the emulation and FPGA for the 57711 and 57710 initializations values
(very small amount of code which is very helpful in the lab - less
than 30 lines).

The initialization is done via DMAE after the DMAE block is ready -
before it is ready, some of the initialization is done via PCI
configuration transactions (referred to as indirect write).  A mutex
to protect the DMAE from being overlapped was added.  There are few
new registers which needs to be initialized by SW - the full comment
for those registers is added to the register file.  A place holder for
the 57711 (referred to as E1H) microcode was added- the microcode
itself is too big and it is split over the following 4 patches

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:29:02 -07:00
Yaniv Rosner c18487ee24 bnx2x: New link code
New Link code:
Moving all the link related code (including the calculations, the
initialization of the MAC and PHY and the external PHY's code) into
a separated file. The changes from the code that used to be part of
bnx2x.c (now called bnx2x_main.c) are:
- Using separate structures for link inputs and link outputs to clearly 
  identify what was configured and what is the outcome
- Adding code to read external PHY FW version and print it as part of 
  ethtool -i
- Adding code to upgrade external PHY FW from ethtool -E with special 
  magic number - Changing the link down indication to ERR level
- Adding a lock on all PHY access to prevent an interrupt and 
  setting changes to overlap
- Adding support for emulation and FPGA (small chunk of code that really 
  helps in the lab) - Adding support for 1G on BCM8706 PHY
- Adding clear debug print incase of fan failure (the PHY type is now 
  "failure")

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:27:52 -07:00
Yaniv Rosner ea4e040abc bnx2x: Adding bnx2x_link
This patch is int the new bnx2x_link files (C and H). The files are
still not used in this patch, only in the next one so the patch will
be small enough for the mailing list.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilong Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:27:26 -07:00
Eilon Greenstein 23bd462b6d bnx2x: Rename bnx2x.c to bnx2x_main.c
This patch is the rename of bnx2x.c to bnx2x_main.c.

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-23 20:25:46 -07:00
Linus Torvalds ee5c2ab09b Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  xen: don't drop NX bit
  xen: mask unwanted pte bits in __supported_pte_mask
  xen: Use wmb instead of rmb in xen_evtchn_do_upcall().
  x86: fix NULL pointer deref in __switch_to
2008-06-23 12:48:17 -07:00
Linus Torvalds f6837bfa65 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: Clear ICM pages before handing to FW
2008-06-23 12:45:49 -07:00
Gustavo Fernando Padovan 96a331b1d6 removed unused var real_tty on n_tty_ioctl()
I noted that the 'struct tty_struct *real_tty' is not used in this
function, so I removed the code about 'real_tty'.

Signed-off-by: Gustavo Fernando Padovan <gustavo@las.ic.unicamp.br>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-23 10:36:47 -07:00
Eli Cohen 87afd448b1 IB/mthca: Clear ICM pages before handing to FW
Current memfree FW has a bug which in some cases, assumes that ICM
pages passed to it are cleared.  This patch uses __GFP_ZERO to
allocate all ICM pages passed to the FW.  Once firmware with a fix is
released, we can make the workaround conditional on firmware version.

This fixes the bug reported by Arthur Kepner <akepner@sgi.com> here:
http://lists.openfabrics.org/pipermail/general/2008-May/050026.html

Cc: <stable@kernel.org>
Signed-off-by: Eli Cohen <eli@mellanox.co.il>

[ Rewritten to be a one-liner using __GFP_ZERO instead of vmap()ing
  ICM memory and memset()ing it to 0. - Roland ]

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-06-23 09:29:58 -07:00
Uli Luckas e5a2c9ccb3 [ARM] 5109/1: Mark rtc sa1100 driver as wakeup source before registering it
Mark rtc sa1100 driver as wakeup source before registering it.
rtc_device_register evaluates device_can_wakeup(rtc->dev.parent) and
supresses the creation of /sys/class/rtc/rtcX/wakealarm if
device_can_wakeup is not (yet) true.

Signed-off-by: Uli Luckas <u.luckas@road.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-06-22 14:32:12 +01:00
Jaya Kumar ee98476bbc [ARM] 5116/1: pxafb: cleanup and fix order of failure handling
This issue was found by Krzysztof Helt and Eric Miao.

pxafb had issues in the order with which it cleaned up if errors occurred
during a probe. This patch reorders the failure handling sequence and also
frees the cmap and clk.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-06-22 14:31:31 +01:00
Jaya Kumar f1edfc420a [ARM] 5115/1: pxafb: fix ifdef for command line option handling
This bug was found and fixed by Lothar Wassmann.

Previously, the use of ifndef CONFIG_MODULES made it such that pxafb command
line option parsing was dependent on whether the kernel was built with module
support. The ifndef should be MODULE so that parsing is dependent only on
whether the driver is built-in or not.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2008-06-22 14:31:30 +01:00
Linus Torvalds bec95aab8c Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: (lm75) sensor reading bugfix
  hwmon: (abituguru3) update driver detection
  hwmon: (w83791d) new maintainer
  hwmon: (abituguru3) Identify Abit AW8D board as such
  hwmon: Update the sysfs interface documentation
  hwmon: (adt7473) Initialize max_duty_at_overheat before use
  hwmon: (lm85) Fix function RANGE_TO_REG()
2008-06-21 12:31:32 -07:00
Linus Torvalds a19214430d 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:
  netns: Don't receive new packets in a dead network namespace.
  sctp: Make sure N * sizeof(union sctp_addr) does not overflow.
  pppoe: warning fix
  ipv6: Drop packets for loopback address from outside of the box.
  ipv6: Remove options header when setsockopt's optlen is 0
  mac80211: detect driver tx bugs
2008-06-21 08:44:08 -07:00
Stephen Hemminger 2645a3c376 pppoe: warning fix
Fix warning:
drivers/net/pppoe.c: In function 'pppoe_recvmsg':
drivers/net/pppoe.c:945: warning: comparison of distinct pointer types lacks a cast
because skb->len is unsigned int and total_len is size_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-20 21:58:02 -07:00
Linus Torvalds 06d5e334a4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  BAST: Remove old IDE driver
  pcmcia ide kingston compactflash's have a new manufacturer id
  pcmcia: add another pata/ide ID
  pcmcia: add an pata/ide ID
  ide: increase timeout in wait_drive_not_busy()
  palm_bk3710: fix resource management
2008-06-20 12:46:47 -07:00
Linus Torvalds d5545fa005 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: Kconfig menu touch-up
  firewire: Kconfig menu touch-up
  firewire: deadline for PHY config transmission
  firewire: fw-ohci: unify printk prefixes
  firewire: fill_bus_reset_event needs lock protection
  firewire: fw-ohci: write selfIDBufferPtr before LinkControl.rcvSelfID
  firewire: fw-ohci: disable PHY packet reception into AR context
  firewire: fw-ohci: use of uninitialized data in AR handler
  firewire: don't panic on invalid AR request buffer
2008-06-20 12:41:10 -07:00
Linus Torvalds 77a189c28b Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: no AC status notification
  ACPI Exception (video-1721): UNKNOWN_STATUS_CODE, Cant attach device
2008-06-20 12:39:12 -07:00
Linus Torvalds 9aef85cc58 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: (21 commits)
  drm: only trust core drm ioctls - driver ioctls are a mess.
  drm/i915: add support for Intel series 4 chipsets.
  drm/radeon: add hier-z registers for r300 and r500 chipsets
  drm/radeon: use DSTCACHE_CTLSTAT rather than RB2D_DSTCACHE_CTLSTAT
  drm/radeon: switch IGP gart to use radeon_write_agp_base()
  drm/radeon: Restore sw interrupt on resume
  drm/r500: add support for AGP based cards.
  drm/radeon: fix texture uploads with large 3d textures (bug 13980)
  drm/radeon: add initial r500 support.
  drm/radeon: init pipe setup in kernel code.
  drm/radeon: fixup radeon_do_engine_reset
  drm/radeon: fix pixcache and purge/cache flushing registers
  drm/radeon: write AGP_BASE_2 on chips that support it.
  drm/radeon: merge IGP chip setup and fixup RS400 vs RS480 support
  drm/radeon: IGP clean up register and magic numbers.
  drm/rs690: set base 2 to 0.
  drm/rs690: set all of gart base address.
  radeon: add production microcode from AMD
  drm: pcigart use proper pci map interfaces.
  drm: the sg alloc ioctl should write back the handle to userspace
  ...
2008-06-20 12:38:18 -07:00
Linus Torvalds fdfe6d3d00 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]: fixup chipset flush for new Intel G4x.
  agp: brown paper bag patch - put back the two lines it took out.
2008-06-20 12:37:55 -07:00
Linus Torvalds 55017923f6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin Serial Driver: Use timer to poll CTS PIN instead of workqueue.
  Blackfin arch: fix typo error in bf548 serial header file
2008-06-20 12:34:43 -07:00
Linus Torvalds b4eea67a12 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: sis can't do PMP
  ata_piix: add TECRA M4 to broken suspend list
  LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver
  sata_mv: warn on PIO with multiple DRQs
  sata_mv: enable async_notify for 60x1 Rev.C0 and higher
  libata: don't check whether to use DMA or not for no data commands
  ahci: jmb361 has only one port
2008-06-20 12:31:03 -07:00
Linus Torvalds 1f6ef23429 [watchdog] hpwdt: fix use of inline assembly
The inline assembly in drivers/watchdog/hpwdt.c was incredibly broken,
and included all the function prologue and epilogue stuff, even though
it was itself then inside a C function where the compiler would add its
own prologue and epilogue on top of it all.

This then just _happened_ to work if you had exactly the right compiler
version and exactly the right compiler flags, so that gcc just happened
to not create any prologue at all (the gcc-generated epilogue wouldn't
matter, since it would never be reached).

But the more proper way to fix it is to simply not do this.  Move the
inline asm to the top level, with no surrounding function at all (the
better alternative would be to remove the prologue and make it actually
use proper description of the arguments to the inline asm, but that's a
bigger change than the one I'm willing to make right now).

Tested-by: S.Çağlar Onur <caglar@pardus.org.tr>
Acked-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-20 12:25:34 -07:00
Ben Dooks ac1623625c BAST: Remove old IDE driver
Remove the old BAST IDE driver, as we are now using the platform-pata
support.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-06-20 20:53:35 +02:00
Christophe Niclaes a49c06bfe4 pcmcia ide kingston compactflash's have a new manufacturer id
Up to now, Kingston compactflash cards (ab)used the Toshiba Manufacturer's ID,
In their new CF cards, they use a new one.  Let's the ide subsystem
recognize CF cards with the new id.

Signed-off-by: Christophe Niclaes <cniclaes@develtech.com>
Acked-by: Philippe De Muyter <phdm@macqel.be>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-06-20 20:53:34 +02:00
Kristoffer Ericson a17bf22023 pcmcia: add another pata/ide ID
Addition of Transcend 1GB 45x id so that it is properly detected.

[bart: fix typo in ide-cs's ID spotted by Alan Cox]

Signed-off-by: William Peters <w1ll14@gmail.com>
Signed-off-by: Kristoffer Ericson <Kristoffer_e1@hotmail.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: linux-ide@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-06-20 20:53:34 +02:00
Matt Reimer 74e23386b7 pcmcia: add an pata/ide ID
Add an id for:

product info: "M-Systems", "CF300", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

Signed-off-by: Matt Reimer <mreimer@vpop.net>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: linux-ide@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-06-20 20:53:34 +02:00
Bartlomiej Zolnierkiewicz f54feafa6d ide: increase timeout in wait_drive_not_busy()
Some ATAPI devices take longer than the current max timeout value to
become ready (i.e. TEAC DV-W28ECW takes 6 ms) so increase the timeout
value to 10 ms.

This fixes kernel.org bugzilla bug #10887:
http://bugzilla.kernel.org/show_bug.cgi?id=10887

Reported-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-06-20 20:53:33 +02:00
Sergei Shtylyov ce42a54946 palm_bk3710: fix resource management
The driver expected a *virtual* address in the IDE platform device's memory
resource and didn't request the memory region for the register block. Fix this
taking into account the fact that DaVinci SoC devices are fixed-mapped to the
virtual memory early and we can get their virtual addresses using IO_ADDRESS()
macro, not having to call ioremap()...

While at it, also do some cosmetic changes...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-06-20 20:53:32 +02:00
Isaku Yamahata 4653938379 xen: Use wmb instead of rmb in xen_evtchn_do_upcall().
This patch is ported one from 534:77db69c38249 of linux-2.6.18-xen.hg.
Use wmb instead of rmb to enforce ordering between
evtchn_upcall_pending and evtchn_pending_sel stores
in xen_evtchn_do_upcall().

Cc: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: the arch/x86 maintainers <x86@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-06-20 14:56:30 +02:00
Suresh Siddha 54481cf88b x86: fix NULL pointer deref in __switch_to
I am able to reproduce the oops reported by Simon in __switch_to() with
lguest.

My debug showed that there is at least one lguest specific
issue (which should be present in 2.6.25 and before aswell) and it got
exposed with a kernel oops with the recent fpu dynamic allocation patches.

In addition to the previous possible scenario (with fpu_counter), in the
presence of lguest, it is possible that the cpu's TS bit it still set and the
lguest launcher task's thread_info has TS_USEDFPU still set.

This is because of the way the lguest launcher handling the guest's TS bit.
(look at lguest_set_ts() in lguest_arch_run_guest()). This can result
in a DNA fault while doing unlazy_fpu() in __switch_to(). This will
end up causing a DNA fault in the context of new process thats
getting context switched in (as opossed to handling DNA fault in the context
of lguest launcher/helper process).

This is wrong in both pre and post 2.6.25 kernels. In the recent
2.6.26-rc series, this is showing up as NULL pointer dereferences or
sleeping function called from atomic context(__switch_to()), as
we free and dynamically allocate the FPU context for the newly
created threads. Older kernels might show some FPU corruption for processes
running inside of lguest.

With the appended patch, my test system is running for more than 50 mins
now. So atleast some of your oops (hopefully all!) should get fixed.
Please give it a try. I will spend more time with this fix tomorrow.

Reported-by: Simon Holm Thøgersen <odie@cs.aau.dk>
Reported-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-06-20 13:26:18 +02:00
Len Brown 5a87f7f5e5 Merge branch 'bugzilla-9761' into release 2008-06-20 02:47:16 -04:00
Len Brown 7b09f27891 Merge branch 'bugzilla-10695' into release 2008-06-20 02:45:05 -04:00
Dave Airlie 858a3685bc drm: only trust core drm ioctls - driver ioctls are a mess.
So driver ioctls need a full auditing before we can make this change.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-20 15:42:38 +10:00
Zhenyu Wang d3adbc0c58 drm/i915: add support for Intel series 4 chipsets.
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-20 12:12:56 +10:00
Zhenyu Wang 7d15ddf79e [agp]: fixup chipset flush for new Intel G4x.
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-20 11:48:06 +10:00
Michael Chan 8427f13612 bnx2: Update driver version to 1.7.7.
And update module description.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:44:44 -07:00
Michael Chan 2739a8bb5b bnx2: Cleanup error handling in bnx2_open().
All error handling in bnx2_open() can be consolidated.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:44:10 -07:00
Michael Chan 5e9ad9e108 bnx2: Turn on multi rx rings.
Enable multiple rx rings if MSI-X vectors are available.  We enable
up to 7 rx rings.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:43:17 -07:00
Michael Chan 2dffcc3dcd bnx2: Update firmware to support multi rx rings.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:42:39 -07:00
Michael Chan f0ea2e6385 bnx2: Use one handler for all MSI-X vectors.
Use the same MSI-X handler to schedule NAPI.  Change the dev_instance
void pointer to the bnx2_napi struct instead so we can have the proper
context for each MSI-X vector.

Add a new bnx2_poll_msix() that is optimized for handling MSI-X
NAPI polling of rx/tx work only.  Remove the old bnx2_tx_poll() that
is no longer needed.  Each MSI-X vector handles 1 tx and 1 rx ring.
The first vector handles link events as well.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:41:57 -07:00
Michael Chan 43e80b89b6 bnx2: Optimize fast-path tx and rx work.
Add hw_tx_cons_ptr and hw_rx_cons_ptr to speed up the retreival of
the tx and rx consumer index, since the MSI-X and default status
blocks have different structures.

Combine status_blk and status_blk_msix into a union.  We'll only use
one type of status block for each vector.

Separate the code to detect more rx and tx work from the code to
detect link related work.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:41:08 -07:00
Michael Chan bb4f98abf5 bnx2: Put rx ring variables in a separate struct.
In preparation for multi-ring support, rx ring variables are now put
in a separate bnx2_rx_ring_info struct.  With MSI-X, we can support
multiple rx rings.

The functions to allocate/free rx memory and to initialize rx rings
are now modified to handle multiple rings.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:38:19 -07:00
Michael Chan 35e9010b22 bnx2: Put tx ring variables in a separate struct.
In preparation for multi-ring support, tx ring variables are now put
in a separate bnx2_tx_ring_info struct.  Multi tx ring will not be
enabled until it is fully supported by the stack.  Only 1 tx ring
will be used at the moment.

The functions to allocate/free tx memory and to initialize tx rings
are now modified to handle multiple rings.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-19 16:37:42 -07:00
David S. Miller 0344f1c66b Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:

	net/mac80211/tx.c
2008-06-19 16:00:04 -07:00
David Brownell bcccc3a28e hwmon: (lm75) sensor reading bugfix
LM75 sensor reading bugfix: never save error status as valid
sensor output.  This could be improved, but at least this
prevents certain rude failure modes.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-06-19 06:50:32 -04:00
Hans de Goede b3aeab0cdb hwmon: (abituguru3) update driver detection
It has been reported that the abituguru3 driver fails to load after a BIOS
update. This patch fixes this by loosening the detection routine so that it
will work after the BIOS update too. To compensate for the now very loose
detection an additional check is added on the DMI Base Board vendor string to
make sure we only load on Abit motherboards, this is the same as the check in
the abituguru (1 / 2) driver.

Signed-of-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Alistair John Strachan <alistair@devzero.co.uk>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-06-19 06:50:32 -04:00
Hans de Goede 1604e78b7d hwmon: (abituguru3) Identify Abit AW8D board as such
This patch identifies the Abit AW8D board as such, and adds support for its
aux5 fan connector

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-06-19 06:50:31 -04:00
Jean Delvare ed4ec814e4 hwmon: (adt7473) Initialize max_duty_at_overheat before use
data->max_duty_at_overheat is not updated in adt7473_update_device,
so it might be used before it is initialized (if the user reads from
sysfs file max_duty_at_crit before writing to it.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-06-19 06:50:31 -04:00
Jean Delvare d38b149794 hwmon: (lm85) Fix function RANGE_TO_REG()
Function RANGE_TO_REG() is broken. For a requested range of 2000 (2
degrees C), it will return an index value of 15, i.e. 80.0 degrees C,
instead of the expected index value of 0. All other values are handled
properly, just 2000 isn't.

The bug was introduced back in November 2004 by this patch:
http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commit;h=1c28d80f1992240373099d863e4996cdd5d646d0

While this can be fixed easily with the current code, I'd rather
rewrite the whole function in a way which is more obviously correct.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Justin Thiessen <jthiessen@penguincomputing.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-06-19 06:50:31 -04:00
Sonic Zhang f30ac0ce34 Blackfin Serial Driver: Use timer to poll CTS PIN instead of workqueue.
This allows other threads to run when the serial driver polls the CTS
PIN in a loop.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-06-19 17:46:39 +08:00
Dave Airlie 9bedbcb207 agp: brown paper bag patch - put back two lines that got lost
Commit 62c96b9d09 ("agp/intel: cleanup
some serious whitespace badness") didn't just fix whitespace.  It also
lost two lines.

Noticed by Linus. No more whitespace diffs for me.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-18 22:12:50 -07:00
Dave Airlie 0e480e5fc0 agp: brown paper bag patch - put back the two lines it took out.
no more whitespace diffs for me.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19 14:57:31 +10:00
Linus Torvalds 3506ba7b08 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/intel: cleanup some serious whitespace badness
  [AGP] intel_agp: Add support for Intel 4 series chipsets
  [AGP] intel_agp: extra stolen mem size available for IGD_GM chipset
  agp: more boolean conversions.
  drivers/char/agp - use bool
  agp: two-stage page destruction issue
  agp/via: fixup pci ids
2008-06-18 21:52:35 -07:00