aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix modpost failures in fedora 17David Miller2012-05-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit e88aa7bbbe3046a125ea1936b16bb921cc9c6349 upstream. The symbol table on x86-64 starts to have entries that have names like: _GLOBAL__sub_I_65535_0___mod_x86cpu_device_table They are of type STT_FUNCTION and this one had a length of 18. This matched the device ID validation logic and it barfed because the length did not meet the device type's criteria. -------------------- FATAL: arch/x86/crypto/aesni-intel: sizeof(struct x86cpu_device_id)=16 is not a modulo of the size of section __mod_x86cpu_device_table=18. Fix definition of struct x86cpu_device_id in mod_devicetable.h -------------------- These are some kind of compiler tool internal stuff being emitted and not something we want to inspect in modpost's device ID table validation code. So skip the symbol if it is not of type STT_OBJECT. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* bcma: add Broadcom specific AMBA bus driverRafał Miłecki2011-05-101-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Broadcom has released cards based on a new AMBA-based bus type. From a programming point of view, this new bus type differs from AMBA and does not use AMBA common registers. It also differs enough from SSB. We decided that a new bus driver is needed to keep the code clean. In its current form, the driver detects devices present on the bus and registers them in the system. It allows registering BCMA drivers for specified bus devices and provides them basic operations. The bus driver itself includes two important bus managing drivers: ChipCommon core driver and PCI(c) core driver. They are early used to allow correct initialization. Currently code is limited to supporting buses on PCI(e) devices, however the driver is designed to be used also on other hosts. The host abstraction layer is implemented and already used for PCI(e). Support for PCI(e) hosts is working and seems to be stable (access to 80211 core was tested successfully on a few devices). We can still optimize it by using some fixed windows, but this can be done later without affecting any external code. Windows are just ranges in MMIO used for accessing cores on the bus. Cc: Greg KH <greg@kroah.com> Cc: Michael Büsch <mb@bu3sch.de> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: George Kashperko <george@znau.edu.ua> Cc: Arend van Spriel <arend@broadcom.com> Cc: linux-arm-kernel@lists.infradead.org Cc: Russell King <rmk@arm.linux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Andy Botting <andy@andybotting.com> Cc: linuxdriverproject <devel@linuxdriverproject.org> Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge commit 'v2.6.35' into kbuild/kbuildMichal Marek2010-08-041-0/+57
|\ | | | | | | | | Conflicts: arch/powerpc/Makefile
| * Merge branch 'modules' of ↵Linus Torvalds2010-05-211-0/+17
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * 'modules' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: module: drop the lock while waiting for module to complete initialization. MODULE_DEVICE_TABLE(isapnp, ...) does nothing hisax_fcpcipnp: fix broken isapnp device table. isapnp: move definitions to mod_devicetable.h so file2alias can reach them.
| | * MODULE_DEVICE_TABLE(isapnp, ...) does nothingOndrej Zary2010-05-191-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Monday 23 November 2009 04:29:53 Rusty Russell wrote: > On Mon, 23 Nov 2009 07:31:57 am Ondrej Zary wrote: > > The problem is that > > scripts/mod/file2alias.c simply ignores isapnp. > > AFAICT it always has, and noone has complained until now. Perhaps > something was still reading /lib/modules/`uname -r`/modules.isapnpmap? The patch below works fine (at least with Debian). It needs your first patch that moves the definitions to mod_devicetable.h. Verified that aliases for these modules are generated correctly: drivers/media/radio/radio-sf16fmi.c drivers/net/ne.c drivers/net/3c515.c drivers/net/smc-ultra.c drivers/pcmcia/i82365.c drivers/scsi/aha1542.c drivers/scsi/aha152x.c drivers/scsi/sym53c416.c drivers/scsi/g_NCR5380.c Tested with RTL8019AS (ne), AVA-1505AE (aha152x) and dtc436e (g_NCR5380) cards - they now work automatically. Generate pnp:d aliases for isapnp_device_tables. This allows udev to load these modules automatically. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| * | Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller2010-05-181-0/+14
| |\ \ | | |/ | | | | | | | | | | | | Conflicts: include/linux/mod_devicetable.h scripts/mod/file2alias.c
| | * m68k: amiga - Zorro bus modalias supportGeert Uytterhoeven2010-05-171-0/+14
| | | | | | | | | | | | | | | | | | Add Amiga Zorro bus modalias and uevent support Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
| * | phylib: Support phy module autoloadingDavid Woodhouse2010-04-021-0/+26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | We don't use the normal hotplug mechanism because it doesn't work. It will load the module some time after the device appears, but that's not good enough for us -- we need the driver loaded _immediately_ because otherwise the NIC driver may just abort and then the phy 'device' goes away. [bwh: s/phy/mdio/ in module alias, kerneldoc for struct mdio_device_id] Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | modpost: support objects with more than 64k sectionsDenys Vlasenko2010-08-031-3/+3
|/ | | | | | | | | | | | | | | | | This patch makes modpost able to process object files with more than 64k sections. Needed for huge kernel builds (allyesconfig, for example) with -ffunction-sections. 64k sections handling is covered, for example, by this document: "IA-64 gABI Proposal 74: Section Indexes" http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.html Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Anders Kaseorg <andersk@mit.edu> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* modpost: fix segfault in sym_is() with prefixed archesMike Frysinger2010-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The sym_is() compares a symbol in an attempt to automatically skip symbol prefixes. It does this first by searching the real symbol with the normal unprefixed symbol. But then it uses the length of the original symbol to check the end of the substring instead of the length of the symbol it is looking for. On non-prefixed arches, this is effectively the same thing, so there is no problem. On prefixed-arches, since this is exceeds by just one byte, a crash is rare and it is usually a NUL byte anyways. But every once in a blue moon, you get the right page alignment and it segfaults. For example, on the Blackfin arch, sym_is() will be called with the real symbol "___mod_usb_device_table" as "symbol" when looking for the normal symbol "__mod_usb_device_table" as "name". The substring will thus return one byte into "symbol" and store it into "match". But then "match" will be indexed with the length of "symbol" instead of "name" and so we will exceed the storage. i.e. the code ends up doing: char foo[] = "abc"; return foo[strlen(foo)+1] == '\0'; Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* USB: handle bcd incrementation in usb modalias generationNathaniel McCallum2009-12-111-2/+47
| | | | | | | | | | | This patch fixes a bug when incrementing/decrementing on a BCD formatted integer (i.e. 0x09++ should be 0x10 not 0x0A). It just adds a function for incrementing/decrementing BCD integers by converting to decimal, doing the increment/decrement and then converting back to BCD. Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add hex/bcd detection to usb modalias generationNathaniel McCallum2009-12-111-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | The current code to generate usb modaliases from usb_device_id assumes that the device's bcdDevice descriptor will actually be in BCD format. While this should be a sane assumption, some devices don't follow spec and just use plain old hex. This causes drivers for these devices to generate invalid modalias lines which will never actually match for the hardware. The following patch adds hex support for bcdDevice in file2alias.c by detecting when a driver uses a hex formatted bcdDevice_(lo|hi) and adjusts the output to hex format accordingly. Drivers for devices which have bcdDevice conforming to BCD will have no change in modalias output. Drivers for devices which don't conform (i.e. ibmcam) should now generate valid modaliases. EXAMPLE OUTPUT (ibmcam; space added to highlight change) Old: usb:v0545p800D d030[10-9] dc*dsc*dp*ic*isc*ip* New: usb:v0545p800D d030a dc*dsc*dp*ic*isc*ip* Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* spi: prefix modalias with "spi:"Anton Vorontsov2009-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | This makes it consistent with other buses (platform, i2c, vio, ...). I'm not sure why we use the prefixes, but there must be a reason. This was easy enough to do it, and I did it. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Samuel Ortiz <sameo@openedhand.com> Cc: "John W. Linville" <linville@tuxdriver.com> Acked-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* spi: add support for device table matchingAnton Vorontsov2009-09-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | With this patch spi drivers can use standard spi_driver.id_table and MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just like we do with I2C drivers. This is useful when a single driver supports several variants of devices but it is not possible to detect them in run-time (like non-JEDEC chips probing in drivers/mtd/devices/m25p80.c), and when platform_data usage is overkill. This patch also makes life a lot easier on OpenFirmware platforms, since with OF we extensively use proper device IDs in modaliases. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Jean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* virtio: enhance id_matching for virtio driversChristian Borntraeger2009-06-121-1/+1
| | | | | | | | | This patch allows a virtio driver to use VIRTIO_DEV_ANY_ID for the device id. This will be used by a test module that can be bound to any virtio device. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* platform: introduce module id table for platform devicesEric Miao2009-03-241-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Now platform_device is being widely used on SoC processors where the peripherals are attached to the system bus, which is simple enough. However, silicon IPs for these SoCs are usually shared heavily across a family of processors, even products from different companies. This makes the original simple driver name based matching insufficient, or simply not straight-forward. Introduce a module id table for platform devices, and makes it clear that a platform driver is able to support some shared IP and handle slight differences across different platforms (by 'driver_data'). Module alias is handled automatically when a MODULE_DEVICE_TABLE() is defined. To not disturb the current platform drivers too much, the matched id entry is recorded and can be retrieved by platform_get_device_id(). Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* HID: fix bus endianity in file2aliasJiri Slaby2009-02-171-0/+1
| | | | | | | | | Fix endianness of bus member of hid_device_id in modpost. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Reported-by: Nye Liu <nyet@mrv.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* PNP: fix broken pnp lowercasing for acpi module aliasesKay Sievers2009-01-201-2/+15
| | | | | | | | | Based on a patch from Brian, who identified the issue. Signed-off-by: Bryan Kadzban <bryan@kadzban.is-a-geek.net> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* modpost: add support for hidJiri Slaby2008-10-141-0/+18
| | | | | | | Generate aliases for hid device modules to support autoloading. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Automatic MODULE_ALIAS() for DMI match tables.David Woodhouse2008-10-131-0/+57
| | | | | | | | | | | | | | | | This makes modpost handle MODULE_DEVICE_TABLE(dmi, xxxx). I had to change the string pointers in the match table to char arrays, and picked a size of 79 bytes almost at random -- do we need to make it bigger than that? I was a bit concerned about the 'bloat' this introduces into the match tables, but they should all be __initdata so it shouldn't matter too much. (Actually, modpost does go through the relocations and look at most of them; it wouldn't be impossible to make it handle string pointers -- but doesn't seem to be worth the effort, since they're __initdata). Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* pnp: fix "add acpi:* modalias entries"Kay Sievers2008-08-211-5/+11
| | | | | | | | | | With 22454cb99fc39f2629ad06a7eccb3df312f8830e we added only the first entry of the device table. We need to loop over the whole device list. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* remove the v850 portAdrian Bunk2008-07-241-1/+1
| | | | | | | | | | | | | | | | | | | Trying to compile the v850 port brings many compile errors, one of them exists since at least kernel 2.6.19. There also seems to be noone willing to bring this port back into a usable state. This patch therefore removes the v850 port. If anyone ever decides to revive the v850 port the code will still be available from older kernels, and it wouldn't be impossible for the port to reenter the kernel if it would become actively maintained again. Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pnp: add acpi:* modalias entriesKay Sievers2008-07-211-8/+16
| | | | | | | | | | | | | Along with the non-modalias conformant "pnp:*" aliases, we add "acpi:*" entries to PNP drivers, to allow module autoloading by ACPI PNP device entries, which export proper modalias information, without any specific userspace modprobe mangling. Cc: Adam Belay <ambx1@neo.rr.com> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [S390] cio: Introduce modalias for css bus.Cornelia Huck2008-07-141-0/+12
| | | | | | | | | | | | Add modalias and subchannel type attributes for all subchannels. I/O subchannel specific attributes are now created in io_subchannel_probe(). modalias and subchannel type are also added to the uevent for the css bus. Also make the css modalias known. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* modpost: i2c aliases need no trailing wildcardJean Delvare2008-05-041-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all device types need a wildcard at the end of their module aliases. In particular, for i2c module aliases, the trailing wildcard is not only unneeded, it could also cause the wrong driver to be loaded. As I2C devices have no IDs, i2c module aliases are simple, arbitrary device names. For example: $ /sbin/modinfo lm90 filename: /lib/modules/2.6.25-git18/kernel/drivers/hwmon/lm90.ko author: Jean Delvare <khali@linux-fr.org> description: LM90/ADM1032 driver license: GPL vermagic: 2.6.25-git18 mod_unload depends: hwmon alias: i2c:lm90* alias: i2c:adm1032* alias: i2c:lm99* alias: i2c:lm86* alias: i2c:max6657* alias: i2c:adt7461* alias: i2c:max6680* $ This would cause trouble if one I2C chip name matches the beginning of another I2C chip name and both chips are supported by different drivers. For example, an i2c device named lm9042 would cause the lm90 driver to be loaded, while it doesn't support that device. This case has yet to be seen in practice, but still, I'd like to fix it now. The cleanest fix is to remove the trailing wildcard from i2c module aliases. Here's a patch doing this. Not all device type aliases need a trailing wildcard, in particular the i2c aliases don't. Don't add a wildcard by default in do_table(), instead let each device type handler add it if needed. I have tested types acpi, dmi, eisa, i2c, ide, ieee1394, input, pci, pcmcia, platform, pnp, scsi, serio, ssb and usb. Other types (ccw, of, vio, parisc, sdio and virtio) are untested. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* i2c: Add support for device alias namesJean Delvare2008-04-291-0/+13
| | | | | | | | | | | | | | Based on earlier work by Jon Smirl and Jochen Friedrich. This patch allows new-style i2c chip drivers to have alias names using the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this point, the old i2c driver binding scheme (driver_name/type) is still supported. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jochen Friedrich <jochen@scram.de> Cc: Jon Smirl <jonsmirl@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org>
* PNP: add all PNP card device id's as individual aliasesKay Sievers2008-04-191-13/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current PNP combined card + devices module aliase can never ever match anything, because these values are not available all at the same time to request a module. Instead of adding the combined alias, we add the device id's all as individual aliases. Device id's are exported by the PNP bus and can now properly used to request the loading of a matching module. The module snd-sbawe currently exports aliases, which can never match anything: alias: pnp:cCTLXXXXdCTL0045dCTL0022* alias: pnp:cCTLXXXXdCTL0044dCTL0023* alias: pnp:cCTLXXXXdCTL0042dCTL0022* alias: pnp:cCTLXXXXdCTL0041dCTL0021* alias: pnp:cCTLXXXXdCTL0031dCTL0021* alias: pnp:cCTL00eddCTL0041dCTL0070* alias: pnp:cCTL00e9dCTL0045dCTL0022* alias: pnp:cCTL00e4dCTL0045dCTL0022* alias: pnp:cCTL00c7dCTL0045dCTL0022* alias: pnp:cCTL00c5dCTL0045dCTL0022* alias: pnp:cCTL00c3dCTL0045dCTL0022* alias: pnp:cCTL00c1dCTL0042dCTL0022* alias: pnp:cCTL00b2dCTL0044dCTL0023* alias: pnp:cCTL009edCTL0044dCTL0023* alias: pnp:cCTL009ddCTL0042dCTL0022* alias: pnp:cCTL009fdCTL0041dCTL0021* alias: pnp:cCTL009cdCTL0041dCTL0021* alias: pnp:cCTL009adCTL0041dCTL0021* alias: pnp:cCTL0054dCTL0031dCTL0021* alias: pnp:cCTL0048dCTL0031dCTL0021* alias: pnp:cCTL0047dCTL0031dCTL0021* alias: pnp:cCTL0046dCTL0031dCTL0021* alias: pnp:cCTL0045dCTL0031dCTL0021* alias: pnp:cCTL0044dCTL0031dCTL0021* alias: pnp:cCTL0043dCTL0031dCTL0021* alias: pnp:cCTL0042dCTL0031dCTL0021* alias: pnp:cCTL0039dCTL0031dCTL0021* alias: pnp:cCTL0035dCTL0031dCTL0021* With this patch it exports only the device id's, as properly matchable aliases: alias: pnp:dCTL0070* alias: pnp:dCTL0045* alias: pnp:dCTL0023* alias: pnp:dCTL0044* alias: pnp:dCTL0022* alias: pnp:dCTL0042* alias: pnp:dCTL0041* alias: pnp:dCTL0021* alias: pnp:dCTL0031* Now, the exported value of the PNP bus can be used to autoload a matching module: $ modprobe --first-time -n -v pnp:dCTL0045 insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/core/snd-rawmidi.ko insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/core/snd-hwdep.ko insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb-common.ko insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb16-csp.ko insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sb16-dsp.ko insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/drivers/opl3/snd-opl3-lib.ko insmod /lib/modules/2.6.24-rc6-g5b825ed2-dirty/kernel/sound/isa/sb/snd-sbawe.ko $ grep CTL0045 /sys/bus/pnp/devices/*/id /sys/bus/pnp/devices/01:01.00/id:CTL0045 Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kbuild: soften modpost checks when doing cross buildsSam Ravnborg2008-03-231-0/+4
| | | | | | | | | | | | | | | | The module alias support in the kernel have a consistency check where it is checked that the size of a structure in the kernel and on the build host are the same. For cross builds this check does not make sense so detect when we do cross builds and silently skip the check in these situations. This fixes a build bug for a wireless driver when cross building for arm. Acked-by: Michael Buesch <mb@bu3sch.de> Tested-by: Gordon Farquharson <gordonfarquharson@gmail.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: stable@kernel.org
* USB: handle idVendor of 0x0000Greg Kroah-Hartman2008-02-011-1/+1
| | | | | | | | | | | | | | | | Some crazy devices in the wild have a vendor id of 0x0000. If we try to add a module alias with this id, we just can't do it due to a check in the file2alias.c file. Change the test to verify that both the vendor and product ids are 0x0000 to show a real "blank" module alias. Note, the module-init-tools package also needs to be changed to properly generate the depmod tables. Cc: Janusz <janumix@poczta.fm> Cc: stable <stable@kernel.org> Cc: Jon Masters <jcm@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Module autoprobing support for virtio drivers.Rusty Russell2007-10-231-0/+18
| | | | | | | This adds the logic to convert the virtio ids into module aliases, and includes a modalias entry in sysfs and the env var to make probing work. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2007-10-161-7/+33
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits) kbuild: introduce ccflags-y, asflags-y and ldflags-y kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP kbuild: enable use of AFLAGS and CFLAGS on commandline kbuild: enable 'make AFLAGS=...' to add additional options to AS kbuild: fix AFLAGS use in h8300 and m68knommu kbuild: check for wrong use of CFLAGS kbuild: enable 'make CFLAGS=...' to add additional options to CC kbuild: fix up CFLAGS usage kbuild: make modpost detect unterminated device id lists kbuild: call export_report from the Makefile kbuild: move Kai Germaschewski to CREDITS kconfig/menuconfig: distinguish between selected-by-another options and comments kconfig: tristate choices with mixed tristate and boolean values include/linux/Kbuild: remove duplicate entries kbuild: kill backward compatibility checks kbuild: kill EXTRA_ARFLAGS kbuild: fix documentation in makefiles.txt kbuild: call make once for all targets when O=.. is used kbuild: pass -g to assembler under CONFIG_DEBUG_INFO kbuild: update _shipped files for kconfig syntax cleanup ... Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
| * kbuild: make modpost detect unterminated device id listsKees Cook2007-10-121-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cause modpost to fail if any device id lists are incorrectly terminated, after reporting the offender. Improved reporting by akpm Signed-off-by: Kees Cook <kees@ubuntu.com> Cc: Greg KH <greg@kroah.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Ben Collins <bcollins@ubuntu.com> Cc: Michael Wu <flamingice@sourmilk.net> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* | i2c: Kill struct i2c_device_idJean Delvare2007-10-131-11/+0
|/ | | | | | | | | | I2C devices do not have any form of ID as PCI or USB devices have. No driver uses "MODULE_DEVICE_TABLE(i2c, ...)" because it doesn't make sense. So we can get rid of struct i2c_device_id and the associated support code. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Greg KH <greg@kroah.com>
* Merge branch 'master' of ↵Linus Torvalds2007-10-111-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (867 commits) [SKY2]: status polling loop (post merge) [NET]: Fix NAPI completion handling in some drivers. [TCP]: Limit processing lost_retrans loop to work-to-do cases [TCP]: Fix lost_retrans loop vs fastpath problems [TCP]: No need to re-count fackets_out/sacked_out at RTO [TCP]: Extract tcp_match_queue_to_sack from sacktag code [TCP]: Kill almost unused variable pcount from sacktag [TCP]: Fix mark_head_lost to ignore R-bit when trying to mark L [TCP]: Add bytes_acked (ABC) clearing to FRTO too [IPv6]: Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493, try2 [NETFILTER]: x_tables: add missing ip6t_modulename aliases [NETFILTER]: nf_conntrack_tcp: fix connection reopening [QETH]: fix qeth_main.c [NETLINK]: fib_frontend build fixes [IPv6]: Export userland ND options through netlink (RDNSS support) [9P]: build fix with !CONFIG_SYSCTL [NET]: Fix dev_put() and dev_hold() comments [NET]: make netlink user -> kernel interface synchronious [NET]: unify netlink kernel socket recognition [NET]: cleanup 3rd argument in netlink_sendskb ... Fix up conflicts manually in Documentation/feature-removal-schedule.txt and my new least favourite crap, the "mod_devicetable" support in the files include/linux/mod_devicetable.h and scripts/mod/file2alias.c. (The latter files seem to be explicitly _designed_ to get conflicts when different subsystems work with them - that have an absolutely horrid lack of subsystem separation!) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * [SSB]: add Sonics Silicon Backplane bus supportMichael Buesch2007-10-101-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SSB is an SoC bus used in a number of embedded devices. The most well-known of these devices is probably the Linksys WRT54G, but there are others as well. The bus is also used internally on the BCM43xx and BCM44xx devices from Broadcom. This patch also includes support for SSB ID tables in modules, so that SSB drivers can be loaded automatically. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sdio: add modalias supportPierre Ossman2007-09-231-0/+20
|/ | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* ACPI: autoload modules - Create ACPI alias interfaceThomas Renninger2007-07-231-0/+12
| | | | | | | | | | | | | | | | | | | Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias like: grep acpi /lib/modules/2.6.22-rc4-default/modules.alias alias acpi*:SNY5001:* sony_laptop alias acpi*:SNY6001:* sony_laptop for e.g. the sony_laptop module. This module matches against all ACPI devices with a HID or CID of SNY5001 or SNY6001 Export an uevent and modalias sysfs file containing the string: [MODALIAS=]acpi:PNP0C0C: additional CIDs are concatenated at the end. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Len Brown <len.brown@intel.com>
* powerpc: Fix the MODALIAS generation in modpost for of devicesSylvain Munaut2007-05-191-3/+8
| | | | | | | | | | | | | | | | Since the devices may have multiple (or none) compatible properties, the uevent generated internally by the kernel may have multiple "C..." entries. So the MODALIAS stored in the module must have wilcard before and after the compatible entry. Also, if the 'compatible' field is not used for matching, there will be no 'C' and that must handled as well. The previous code handled all those case incorrectly and it "mostly" worked ... but not always. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kbuild: remove dependency on input.h from file2aliasSam Ravnborg2007-05-021-10/+11
| | | | | | | | | | | | | Almost all definitions used by file2alias was already present in mod_devicetable.h. Added the last definition and killed the input.h usage. The errornous include was pointed out by: Jan Engelhardt <jengelh@linux01.gwdg.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Jan Engelhardt <jengelh@linux01.gwdg.de> Cc: Deepak Saxena <dsaxena@plexity.net>
* [PARISC] rename *_ANY_ID to PA_*_ANY_ID in the exported headerKyle McMartin2007-02-171-4/+4
| | | | Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PARISC] generate modalias for parisc_device_id tablesKyle McMartin2007-02-171-0/+22
| | | | Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* [PATCH] EISA bus MODALIAS attributes supportMichael Tokarev2006-09-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add modalias attribute support for the almost forgotten now EISA bus and (at least some) EISA-aware modules. The modalias entry looks like (for an 3c509 NIC): eisa:sTCM5093 and the in-module alias like: eisa:sTCM5093* The patch moves struct eisa_device_id declaration from include/linux/eisa.h to include/linux/mod_devicetable.h (so that the former now #includes the latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE declared), and adds recognision of __mod_eisa_device_table to scripts/mod/file2alias.c so that proper modules.alias will be generated. There's no support for /lib/modules/$kver/modules.eisamap, as it's not used by any existing tools, and because with in-kernel modalias mechanism those maps are obsolete anyway. The rationale for this patch is: a) to make EISA bus to act as other busses with modalias support, to unify driver loading b) to foget about EISA finally - with this patch, kernel (who still supports EISA) will be the only one who knows how to choose the necessary drivers for this bus ;) [akpm@osdl.org: fix the kbuild bit] Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Randy Dunlap <rdunlap@xenotime.net> Acked-the-net-bits-by: Jeff Garzik <jeff@garzik.org> Acked-the-tulip-bit-by: Valerie Henson <val_henson@linux.intel.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [S390] zcrypt adjunct processor bus.Martin Schwidefsky2006-09-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a bus for the adjunct processor interface. Up to 64 devices can be connect to the ap bus interface, each device with 16 domains. That makes 1024 message queues. The interface is asynchronous, the answer to a message sent to a queue needs to be received at some later point in time. Unfortunately the interface does not provide interrupts when a message reply is pending. So the ap bus needs to implement some fancy polling, each active queue is polled once per 1/HZ second or continuously if an idle cpus exsists and the poll thread is activ (see poll_thread parameter). The ap bus uses the sysfs path /sys/bus/ap and has two bus attributes, ap_domain and config_time. The ap_domain selects one of the 16 domains to be used for this system. This limits the maximum number of ap devices to 64. The config_time attribute contains the number of seconds between two ap bus scans to find new devices. The ap bus uses the modalias entries of the form "ap:tN" to autoload the ap driver for hardware type N. Currently known types are: 3 - PCICC, 4 - PCICA, 5 - PCIXCC, 6 - CEX2A and 7 - CEX2C. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
* [PATCH] PATCH: 1 line 2.6.18 bugfix: modpost-64bit-fix.patchHans de Goede2006-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a small but annoying bug in scripts/mod/file2alias.c which causes it to generate invalid aliases for input devices on 64 bit archs. This causes joydev.ko to not be automaticly loaded when inserting a joystick, resulting in a non working joystick (for the average user). In scripts/mod/file2alias.c is the following code for generating the input aliases: static void do_input(char *alias, kernel_ulong_t *arr, unsigned int min, unsigned int max) { unsigned int i; for (i = min; i < max; i++) if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG))) sprintf(alias + strlen(alias), "%X,*", i); } On 32 bits systems, this correctly generates "0,*" for the first alias, "8,*" for the second etc. However on 64 bits it generates: "0,*20,*" resp "8,*28,*" Notice how it adds 20 + first entry (hex) ! to the list of hex codes, which is 32 more then the first entry, thus is because the bit test above wraps at 32 bits instead of 64. scripts/mod/file2alias.c, line 379 reads: if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG))) That should be: if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG))) Notice the added 'L' after the 1, otherwise that is an 32 bit int instead of a 64 bit long, and when that int gets shifted >= 32 times, appearantly the number by which to shift is wrapped at 5 bits ( % 32) causing it to test a bit 32 bits too low. The patch below makes the nescesarry 1 char change :) Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* kbuild: improve error from file2aliasSam Ravnborg2006-08-011-19/+43
| | | | | | | | | | | | | | The original errormessage was just plain unreadable. Sample error message after this update (not for real - I provoked it): FATAL: drivers/net/s2io: sizeof(struct pci_device_id)=33 is not a modulo of the size of section __mod_pci_device_table=160. Fix definition of struct pci_device_id in mod_devicetable.h Before a warning was generated - this is now a fatal error. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* Input: move input_device_id to mod_devicetable.hDmitry Torokhov2006-04-261-19/+17
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2006-03-251-9/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild: (46 commits) kbuild: remove obsoleted scripts/reference_* files kbuild: fix make help & make *pkg kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h Kconfig: remove the CONFIG_CC_ALIGN_* options kbuild: add -fverbose-asm to i386 Makefile kbuild: clean-up genksyms kbuild: Lindent genksyms.c kbuild: fix genksyms build error kbuild: in makefile.txt note that Makefile is preferred name for kbuild files kbuild: replace PHONY with FORCE kbuild: Fix bug in crc symbol generating of kernel and modules kbuild: change kbuild to not rely on incorrect GNU make behavior kbuild: when warning symbols exported twice now tell user this is the problem kbuild: fix make dir/file.xx when asm symlink is missing kbuild: in the section mismatch check try harder to find symbols kbuild: fix section mismatch check for unwind on IA64 kbuild: kill false positives from section mismatch warnings for powerpc kbuild: kill trailing whitespace in modpost & friends kbuild: small update of allnoconfig description kbuild: make namespace.pl CROSS_COMPILE happy ... Trivial conflict in arch/ppc/boot/Makefile manually fixed up
| * kbuild: kill trailing whitespace in modpost & friendsSam Ravnborg2006-03-031-2/+2
| | | | | | | | Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
| * kbuild: use warn()/fatal() consistent in modpostSam Ravnborg2006-02-191-7/+6
| | | | | | | | | | | | modpost.c provides warn() and fatal() - so use them all over the place. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* | [PATCH] s390: fix match in ccw modaliasBastian Blank2006-03-061-1/+1
|/ | | | | | | | | | | Fix matching of devmodel in modaliases. It breaks automatic loading of any dasd module. Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>