aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* ihex: add ihex2fw tool for converting HEX files into firmware imagesDavid Woodhouse2008-07-10
| | | | | | | | | | Not the straight conversion to binary which objcopy can do for us, but actually representing each record with its original {addr, length}, because some drivers need that information preserved. Fix up 'firmware_install' to be able to build $(hostprogs-y) too. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ihex: request_ihex_firmware() function to load and validate firmwareDavid Woodhouse2008-07-10
| | | | | | | Provide a helper to load the file and validate it in one call, to simplify error handling in the drivers which are going to use it. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ihex.h: binary representation of ihex recordsDavid Woodhouse2008-07-10
| | | | | | | | | | | | | | | | | | | Some devices need their firmware as a set of {address, len, data...} records in some specific order rather than a simple blob. The normal way of doing this kind of thing is 'ihex', which is a text format and not entirely suitable for use in the kernel. This provides a binary representation which is very similar, but much more compact -- and a helper routine to skip to the next record, because the alignment constraints mean that everybody will screw it up for themselves otherwise. Also a helper function which can verify that a 'struct firmware' contains a valid set of ihex records, and that following them won't run off the end of the loaded data. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* firmware: Add firmware installation to modules_install, add firmware_installDavid Woodhouse2008-07-10
| | | | | | | | | | | | | For 'make modules_install', install any firmware required by the modules which are being installed. Also add a 'make firmware_install' target which doesn't depend on the configuration, but installs _all_ available in-kernel-tree firmware into $(INSTALL_FW_PATH), which defaults to /lib/firmware. This is intended for distributors to make arch-independent (and config-independent) packages containing firmware. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* firmware: Add CONFIG_FIRMWARE_IN_KERNEL option.David Woodhouse2008-07-10
| | | | | | | | | | | | 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-10
| | | | | | | | | | | | 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-10
| | | | | | | | | | | | | | | 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-10
| | | | | | | | | 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 usage warning in the Digigram miXart soundcard driverDavid Howells2008-07-10
| | | | | | | | | | | Fix a const pointer usage warning in the Digigram miXart soundcard driver. A const pointer is being passed to copy_from_user() to load the firmware into. This is okay in this case because the function has allocated the firmware struct itself, but the const qualifier is part of the firmware struct - so the patch casts the const away. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Fix a const pointer usage warning in the Digigram pcxhr soundcard driverDavid Howells2008-07-10
| | | | | | | | | | | Fix a const pointer usage warning in the Digigram pcxhr compatible soundcard driver. A const pointer is being passed to copy_from_user() to load the firmware into. This is okay in this case because the function has allocated the firmware struct itself, but the const qualifier is part of the firmware struct - so the patch casts the const away. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Fix a const pointer error in the Conexant cx23418 MPEG encoder driverDavid Howells2008-07-10
| | | | | | | | 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-10
| | | | | | | 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>
* Fix a const pointer usage warning in the Digigram VX soundcard driverDavid Howells2008-07-10
| | | | | | | | | | | Fix a const pointer usage warning in the Digigram VX soundcard driver. A const pointer is being passed to copy_from_user() to load the firmware into. This is okay in this case because the function has allocated the firmware struct itself, but the const qualifier will be part of the firmware struct - so the patch casts the const away. 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-10
| | | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* x86 microcode: firmware data is constGreg Kroah-Hartman2008-07-10
| | | | | 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-10
| | | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ymfpci: treat firmware data as constDavid Woodhouse2008-07-10
| | | | | | | Standardise both in-kernel and loaded firmware to be stored as little-endian instead of host-endian. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* maestro3: treat firmware data as constDavid Woodhouse2008-07-10
| | | | | | | | | | | | | | | | | | The maestro3 driver is byte-swapping its firmware to be host-endian in advance, when it doesn't seem to be necessary -- we could just use le16_to_cpu() as we load it. Doing that means that we need to switch the in-tree firmware to be little-endian too. Take the least intrusive way of doing this, which is to switch the existing snd_m3_convert_from_le() function to convert _to_ little-endian instead, and use it on the in-tree firmware instead of the loaded firmware. It's a bit suboptimal but doesn't matter much right now because we're about to remove the special cases for the in-tree version anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* tuners: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* gp8psk: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cxusb: treat firmware data as constDavid Woodhouse2008-07-10
| | | | | | | | | ...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-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ttusb-dec: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* bt8xx: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cxgb3: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* irda-usb: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* atmel: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* p54: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* rt2x00: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* zd1201: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* aic94xx: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* cxacru: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ueagle-atm: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* vx: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* pcxhr: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* riptide: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* vx222: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* myri10ge: treat firmware data as constDavid Woodhouse2008-07-10
| | | | | | ... 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-10
| | | | | | | 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-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* bluetooth: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* libertas: treat firmware data as constDavid Woodhouse2008-07-10
| | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* Merge branch 'for-linus' of ↵Linus Torvalds2008-07-09
|\ | | | | | | | | | | | | 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-08
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'upstream-linus' of ↵Linus Torvalds2008-07-09
|\ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: [PATCH] ocfs2/dlm: Fixes oops in dlm_new_lockres()
| * | [PATCH] ocfs2/dlm: Fixes oops in dlm_new_lockres()Sunil Mushran2008-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch fixes a race that can result in an oops while adding a lockres to the dlm lockres tracking list. Bug introduced by mainline commit 29576f8bb54045be944ba809d4fca1ad77c94165. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
* | | powerpc: Add missing reference to coherent_dma_maskVitaly Bordug2008-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is dma_mask in of_device upon of_platform_device_create() but we don't actually set coherent_dma_mask. This may cause weird behavior of USB subsystem using of_device USB host drivers. Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds2008-07-08
|\ \ \ | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: tcrypt - Fix memory leak in test_cipher
| * | | crypto: tcrypt - Fix memory leak in test_cipherDarren Jenkins2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity CID: 2306 & 2307 RESOURCE_LEAK In the second for loop in test_cipher(), data is allocated space with kzalloc() and is only ever freed in an error case. Looking at this loop, data is written to this memory but nothing seems to read from it. So here is a patch removing the allocation, I think this is the right fix. Only compile tested. Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
* | | | kernel/printk.c: Made printk_recursion_bug_msg static.Daniel Guilak2008-07-08
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Guilak <daniel@danielguilak.com> Acked-by: Josh Triplett <josh@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>