summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* firmware: Add CONFIG_FIRMWARE_IN_KERNEL option.David Woodhouse2008-07-101-0/+25
| | | | | | | | | | | | This will control whether we build firmware into the kernel image for _every_ driver which we convert to request_firmware(), to avoid a proliferation of 'CONFIG_XXX_FIRMWARE' options for each one. Default to 'y' for now, which is the wrong thing to do but people seem to be insisting on it and refusing to even review patches until it's done. And it does preserve the existing behaviour for built-in drivers. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* firmware: Add CONFIG_EXTRA_FIRMWARE optionDavid Woodhouse2008-07-101-0/+39
| | | | | | | | | | | | This allows arbitrary firmware files to be included in the static kernel where the firmware loader can find them without requiring userspace to be alive. (Updated and CONFIG_EXTRA_FIRMWARE_DIR added with lots of help from Johannes Berg). Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
* firmware: allow firmware files to be built into kernel imageDavid Woodhouse2008-07-101-2/+31
| | | | | | | | | | | | | | | Some drivers have their own hacks to bypass the kernel's firmware loader and build their firmware into the kernel; this renders those unnecessary. Other drivers don't use the firmware loader at all, because they always want the firmware to be available. This allows them to start using the firmware loader. A third set of drivers already use the firmware loader, but can't be used without help from userspace, which sometimes requires an initrd. This allows them to work in a static kernel. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* firmware: make fw->data constDavid Woodhouse2008-07-101-1/+1
| | | | | | | | | In preparation for supporting firmware files linked into the static kernel, make fw->data const to ensure that users aren't modifying it (so that we can pass a pointer to the original in-kernel copy, rather than having to copy it). Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Fix a const pointer error in the Conexant cx23418 MPEG encoder driverDavid Howells2008-07-101-1/+1
| | | | | | | | Fix a const pointer to non-const pointer assignment error in the Conexant cx23418 MPEG encoder driver. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Fix a const assignment in moxa_load_fw()David Howells2008-07-101-2/+2
| | | | | | | Fix an assignment of a const pointer to a non-const pointer in moxa_load_fw(). Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* isight: treat firmware data as constgregkh@suse.de2008-07-101-1/+1
| | | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* dell_rbu: firmware data is constGreg Kroah-Hartman2008-07-101-1/+1
| | | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* tuners: treat firmware data as constDavid Woodhouse2008-07-102-2/+2
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* gp8psk: treat firmware data as constDavid Woodhouse2008-07-101-1/+2
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cxusb: treat firmware data as constDavid Woodhouse2008-07-101-3/+18
| | | | | | | | | ...which means allocating our own copy when we want to modify it. (stupid thinko fixed by mkrufky) Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
* dvb frontends: treat firmware data as constDavid Woodhouse2008-07-107-9/+11
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ttusb-dec: treat firmware data as constDavid Woodhouse2008-07-101-1/+1
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* bt8xx: treat firmware data as constDavid Woodhouse2008-07-101-1/+2
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cxgb3: treat firmware data as constDavid Woodhouse2008-07-102-5/+7
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* irda-usb: treat firmware data as constDavid Woodhouse2008-07-101-6/+6
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* atmel: treat firmware data as constDavid Woodhouse2008-07-101-3/+3
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* p54: treat firmware data as constDavid Woodhouse2008-07-101-2/+3
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* rt2x00: treat firmware data as constDavid Woodhouse2008-07-104-8/+8
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* zd1201: treat firmware data as constDavid Woodhouse2008-07-101-1/+1
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* aic94xx: treat firmware data as constDavid Woodhouse2008-07-103-11/+12
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cxacru: treat firmware data as constDavid Woodhouse2008-07-101-1/+1
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ueagle-atm: treat firmware data as constDavid Woodhouse2008-07-101-9/+11
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* myri10ge: treat firmware data as constDavid Woodhouse2008-07-101-2/+9
| | | | | | ... which means allocating our own buffer for reading it back. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cx25840: treat firmware data as constDavid Woodhouse2008-07-101-16/+11Star
| | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Tyler Trafford <ttrafford@gmail.com> Acked-by: Mike Isely <isely@pobox.com>
* cyclades: treat firmware data as constDavid Woodhouse2008-07-101-5/+5
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* bluetooth: treat firmware data as constDavid Woodhouse2008-07-102-2/+4
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* libertas: treat firmware data as constDavid Woodhouse2008-07-103-5/+5
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2008-07-091-0/+4
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: RDMA/cxgb3: Fix regression caused by class_device -> device conversion
| * RDMA/cxgb3: Fix regression caused by class_device -> device conversionSteve Wise2008-07-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The change to iwch_provider.c in commit f4e91eb4 ("IB: convert struct class_device to struct device") undid the fix done in commit 7f049f2f ("RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call"). It removed the calls to rtnl_lock() that serialized the iw_cxgb3 ethtool ops calls into the cxgb3 driver. This locking is needed to avoid messing up the internal state of the cxgb3 driver. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
* | Fix broken fix for fsl-diu-dbTakashi Iwai2008-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | On 2.6.26-rc9, the commit 05946bce839b4fed5442dbfab77060fb75e051f3 ("fsl_diu_fb: fix build with CONFIG_PM=y, plus fix some warnings") breaks its previous fix f969c5672b16b857e5231ad3c78f08d8ef3305aa ("fsl-diu-db: compile fix") This patch reverts the broken part. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | it8213: fix return value in it8213_init_one()Bartlomiej Zolnierkiewicz2008-07-081-2/+1Star
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | palm_bk3710: fix IDECLK period calculationSergei Shtylyov2008-07-081-20/+18Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver uses completely bogus rounding formula for calculating period from the IDECLK frequency which gives one-off period values (e.g. 11 ns with 100 MHz IDECLK) which in turn can lead to overclocked IDE transfer timings. Actually, rounding is just wrong in this case, so use a mere division for a safe result. While at it, also: - give 'ide_palm_clk' variable a more suitable name; - get rid of the useless 'ideclkp' variable; - drop the LISP stype 'p' postfix from the 'clkp' variable's name. :-) Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: mcherkashin@ru.mvista.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: add __ide_default_irq() inline helperBartlomiej Zolnierkiewicz2008-07-082-11/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | Add __ide_default_irq() inline helper and use it instead of ide_default_irq() in ide-probe.c and ns87415.c (all host drivers except IDE PCI ones always setup hwif->irq so it is enough to check only for I/O bases 0x1f0 and 0x170). This fixes post-2.6.25 regression since ide_default_irq() define could shadow ide_default_irq() inline. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2008-07-0712-27/+71
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: can: add sanity checks fs_enet: restore promiscuous and multicast settings in restart() ibm_newemac: Fixes entry of short packets ibm_newemac: Fixes kernel crashes when speed of cable connected changes pasemi_mac: Access iph->tot_len with correct endianness ehea: Access iph->tot_len with correct endianness ehea: fix race condition ehea: add MODULE_DEVICE_TABLE ehea: fix might sleep problem forcedeth: fix lockdep warning on ethtool -s Add missing skb->dev assignment in Frame Relay RX code bridge: fix use-after-free in br_cleanup_bridges() tcp: fix a size_t < 0 comparison in tcp_read_sock tcp: net/ipv4/tcp.c needs linux/scatterlist.h libertas: support USB persistence on suspend/resume (resend) iwlwifi: drop skb silently for Tx request in monitor mode iwlwifi: fix incorrect 5GHz rates reported in monitor mode
| * | fs_enet: restore promiscuous and multicast settings in restart()Laurent Pinchart2008-07-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The restart() function is called when the link state changes and resets multicast and promiscuous settings. This patch restores those settings at the end of restart(). Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | ibm_newemac: Fixes entry of short packetsSathya Narayanan2008-07-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Short packets has to be discarded by the driver. So this patch addresses the issue of discarding the short packets of size lesser then ethernet header size. Signed-off-by: Sathya Narayanan <sathyan@teamf1.com> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | ibm_newemac: Fixes kernel crashes when speed of cable connected changesSathya Narayanan2008-07-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The descriptor pointers were not initialized to NIL values, so it was poiniting to some random addresses which was completely invalid. This fix takes care of initializing the descriptor to NIL values and clearing the valid descriptors on clean ring operation. Signed-off-by: Sathya Narayanan <sathyan@teamf1.com> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | pasemi_mac: Access iph->tot_len with correct endiannessRoland Dreier2008-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iph->tot_len is stored in network byte order, so access it using ntohs(). This doesn't have any real world impact on pasemi_mac, since the device only exists as part of a big-endian system-on-chip, but fixing this gets rid of a sparse warning and avoids having a bad example in the tree. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | ehea: Access iph->tot_len with correct endiannessRoland Dreier2008-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iph->tot_len is stored in network byte order, so access it using ntohs(). This doesn't have any real world impact on ehea, since ehea only exists for big-endian platfroms (at the moment at least) but fixing this gets rid of a sparse warning and avoids having a bad example in the tree. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | ehea: fix race conditionJan-Bernd Themann2008-07-042-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ehea_stop is called the function cancel_work_sync(&port->reset_task) is used to ensure that the reset task is not running anymore. We need an additional flag to ensure that it can not be scheduled after this call again for a certain time. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | ehea: add MODULE_DEVICE_TABLEJan-Bernd Themann2008-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Required to allow distros to easily detect when ehea module needs to be loaded Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | ehea: fix might sleep problemJan-Bernd Themann2008-07-042-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A mutex has to be replaced by spinlocks as it can be called from a context which does not allow sleeping. The kzalloc flag GFP_KERNEL has to be replaced by GFP_ATOMIC for the same reason. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | forcedeth: fix lockdep warning on ethtool -sTobias Diedrich2008-07-041-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After enabling CONFIG_LOCKDEP and CONFIG_PROVE_LOCKING I get the following warning when ethtool -s is first called on one of the forcedeth ports: ================================= [ INFO: inconsistent lock state ] 2.6.26-rc4 #28 --------------------------------- inconsistent {in-hardirq-W} -> {hardirq-on-W} usage. ethtool/1985 [HC0[0]:SC0[1]:HE1:SE0] takes: (&np->lock){++..}, at: [<ffffffffa000c5fd>] nv_set_settings+0xc8/0x3de [forcedeth] {in-hardirq-W} state was registered at: [<ffffffffffffffff>] 0xffffffffffffffff irq event stamp: 3606 hardirqs last enabled at (3605): [<ffffffff8068106f>] _spin_unlock_irqrestore+0x3f/0x68 hardirqs last disabled at (3604): [<ffffffff80680d38>] _spin_lock_irqsave+0x13/0x46 softirqs last enabled at (3534): [<ffffffff80246ba5>] __do_softirq+0xbc/0xc5 softirqs last disabled at (3606): [<ffffffff80680b33>] _spin_lock_bh+0x11/0x41 other info that might help us debug this: 2 locks held by ethtool/1985: #0: (rtnl_mutex){--..}, at: [<ffffffff80596072>] rtnl_lock+0x12/0x14 #1: (_xmit_ETHER){-+..}, at: [<ffffffffa000c5e8>] nv_set_settings+0xb3/0x3de [forcedeth] stack backtrace: Pid: 1985, comm: ethtool Not tainted 2.6.26-rc4 #28 Call Trace: [<ffffffff8025f190>] print_usage_bug+0x162/0x173 [<ffffffff8025fa8b>] mark_lock+0x231/0x41f [<ffffffff802607cf>] __lock_acquire+0x4e7/0xcac [<ffffffff8025fe64>] ? trace_hardirqs_on+0xf1/0x115 [<ffffffff80272c3a>] ? disable_irq_nosync+0x6f/0x7b [<ffffffff80261375>] lock_acquire+0x55/0x6e [<ffffffffa000c5fd>] ? :forcedeth:nv_set_settings+0xc8/0x3de [<ffffffff80680b15>] _spin_lock+0x2f/0x3c [<ffffffffa000c5fd>] :forcedeth:nv_set_settings+0xc8/0x3de [<ffffffff8058f8bb>] dev_ethtool+0x186/0xea3 [<ffffffff8067f446>] ? mutex_lock_nested+0x243/0x275 [<ffffffff8025df2b>] ? debug_mutex_free_waiter+0x46/0x4a [<ffffffff8067f469>] ? mutex_lock_nested+0x266/0x275 [<ffffffff8058e1ce>] dev_ioctl+0x4eb/0x600 [<ffffffff8068106f>] ? _spin_unlock_irqrestore+0x3f/0x68 [<ffffffff80580f91>] sock_ioctl+0x1f5/0x202 [<ffffffff802a322e>] vfs_ioctl+0x2a/0x77 [<ffffffff802a34d6>] do_vfs_ioctl+0x25b/0x270 [<ffffffff806807b6>] ? trace_hardirqs_on_thunk+0x35/0x3a [<ffffffff802a352d>] sys_ioctl+0x42/0x65 [<ffffffff8021fffb>] system_call_after_swapgs+0x7b/0x80 This is caused by the following snippet in nv_set_settings: netif_carrier_off(dev); if (netif_running(dev)) { nv_disable_irq(dev); netif_tx_lock_bh(dev); spin_lock(&np->lock); /* stop engines */ nv_stop_rxtx(dev); spin_unlock(&np->lock); netif_tx_unlock_bh(dev); } Because of nv_disable_irq this is probably not really a problem though (I guess) and replacing the spin_lock with spin_lock_irqsave could keep interrupts disabled for a longer period of time because of delays in nv_stop_rx and nv_stop_tx. Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de> Cc: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | Add missing skb->dev assignment in Frame Relay RX codeKrzysztof Halasa2008-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4c13eb6657fe9ef7b4dc8f1a405c902e9e5234e0 ([ETH]: Make eth_type_trans set skb->dev like the other *_type_trans) removed skb->dev assignment from hdlc_fr.c:fr_rx(). Unfortunately it was also needed for cases other than eth_type_trans(). Adding it back. It's quite serious and may be a security risk as it causes a wrong input interface indication (the physical hdlcX instead of logical pvcX). Probably -stable class fix. Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | Merge branch 'master' of ↵David S. Miller2008-07-035-4/+15
| |\ \ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
| | * | libertas: support USB persistence on suspend/resume (resend)andrey@cozybit.com2008-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle .reset_resume() so that libertas can survive suspend/resume without reloading the firmware. Signed-off-by: Andrey Yurovsky <andrey@cozybit.com> Acked-by: Deepak Saxena <dsaxena@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * | iwlwifi: drop skb silently for Tx request in monitor modeZhu Yi2008-07-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the problem to keep mac80211 resubmitting SKBs when Tx request cannot be met in monitor mode. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * | iwlwifi: fix incorrect 5GHz rates reported in monitor modeRick Farrington2008-07-022-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the rates reported in monitor mode operation (Wireshark) for iwlwifi. Previously, packets with rates of 6M..24M would be reported incorrectly and packets with rates of 36M..54M would not passed up the stack. Signed-off-by: Rick Farrington <rickdic@hotmail.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | pxamci: fix byte aligned DMA transfersPhilipp Zabel2008-07-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pxa27x DMA controller defaults to 64-bit alignment. This caused the SCR reads to fail (and, depending on card type, error out) when card->raw_scr was not aligned on a 8-byte boundary. For performance reasons all scatter-gather addresses passed to pxamci_request should be aligned on 8-byte boundaries, but if this can't be guaranteed, byte aligned DMA transfers in the have to be enabled in the controller to get correct behaviour. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>