1
0
Fork 0
alistair23-linux/drivers
Russell King 7461b60afa PCI: use /sys/bus/pci/drivers/<driver>/new_id first
Unfortunately, the .../new_id feature does not work with the 8250_pci
driver.

The reason for this comes down to the way .../new_id is implemented.
When PCI tries to match a driver to a device, it checks the modules
static device ID tables _before_ checking the dynamic new_id tables.

When a driver is capable of matching by ID, and falls back to matching
by class (as 8250_pci does), this makes it absolutely impossible to
specify a board by ID, and as such the correct driver_data value to
use with it.

Let's say you have a serial board with vendor 0x1234 and device 0x5678.
It's class is set to PCI_CLASS_COMMUNICATION_SERIAL.

On boot, this card is matched to the 8250_pci driver, which tries to
probe it because it matched using the class entry.  The driver finds
that it is unable to automatically detect the correct settings to use,
so it returns -ENODEV.

You know that the information the driver needs is to match this card
using a device_data value of '7'.  So you echo 1234 5678 0 0 0 0 7
into new_id.

The kernel attempts to re-bind 8250_pci to this device.  However,
because it scans the PCI driver tables, it _again_ matches the class
entry which has the wrong device_data.  It fails.

End of story.  You can't support the card without rebuilding the
kernel (or writing a specific PCI probe module to support it.)

So, can we make new_id override the driver-internal PCI ID tables?
IOW, like this:


From: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:54:41 -08:00
..
acorn [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
acpi
amba
ata [PATCH] pata_via: Cable detect error 2006-12-16 10:46:21 -05:00
atm [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
base Driver core: Make platform_device_add_data accept a const pointer 2006-12-13 15:38:46 -08:00
block Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block 2006-12-13 09:15:34 -08:00
bluetooth
cdrom [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
char [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
clocksource [PATCH] clocksource: small cleanup 2006-12-10 09:57:22 -08:00
connector [CONNECTOR]: Replace delayed work with usual work queue. 2006-12-18 01:53:58 -08:00
cpufreq [CPUFREQ] fixes typo in cpufreq.c 2006-12-13 10:11:25 -05:00
crypto [PATCH] geode crypto is PCI device 2006-12-10 09:55:40 -08:00
dio
dma
edac
eisa
fc4 [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
firmware
hid input/hid: Supporting more keys from the HUT Consumer Page 2006-12-14 13:37:24 +01:00
hwmon hwmon: New AMS hardware monitoring driver 2006-12-12 18:18:30 +01:00
i2c Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2006-12-13 09:13:19 -08:00
ide [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
ieee1394 i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
infiniband IB/mthca: Use DEFINE_MUTEX() instead of mutex_init() 2006-12-15 20:55:28 -08:00
input [SUNKBD]: Fix sunkbd_enable(sunkbd, 0); obvious. 2006-12-17 14:06:58 -08:00
isdn [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
kvm [PATCH] KVM: Fix vmx hardware_enable() on macbooks 2006-12-13 09:05:48 -08:00
leds kconfig: Standardize "depends" -> "depends on" in Kconfig files 2006-12-12 20:04:19 +01:00
macintosh [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
mca
md [PATCH] md: Don't assume that READ==0 and WRITE==1 - use the names explicitly 2006-12-13 09:05:48 -08:00
media [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
message [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
mfd
misc
mmc AT91 MMC update for 2.6.19 2006-12-11 12:43:35 +01:00
mtd [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
net [TG3]: Update version and reldate. 2006-12-17 21:59:23 -08:00
nubus
oprofile
parisc [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
parport [PATCH] Kconfig refactoring for better menu nesting 2006-12-10 09:55:39 -08:00
pci PCI: use /sys/bus/pci/drivers/<driver>/new_id first 2006-12-20 10:54:41 -08:00
pcmcia [PATCH] Fix numerous kcalloc() calls, convert to kzalloc() 2006-12-13 09:05:52 -08:00
pnp [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
ps3 [POWERPC] ps3: Add vuart support 2006-12-11 13:49:53 +11:00
rapidio
rtc [PATCH] rtc framewok: rtc_wkalrm.enabled reporting updates 2006-12-13 09:05:52 -08:00
s390 [S390] cio: css_register_subchannel race. 2006-12-15 17:18:30 +01:00
sbus [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
scsi [PATCH] m68k trivial build fixes 2006-12-17 10:21:53 -08:00
serial [PATCH] Add support for Korenix 16C950-based PCI cards 2006-12-13 09:18:11 -08:00
sh
sn
spi [PATCH] spi: stabilize PIO mode transfers on PXA2xx systems 2006-12-10 09:55:40 -08:00
tc
telephony
usb [PATCH] Generic HID layer - build: USB_HID should select HID 2006-12-14 13:37:23 +01:00
video [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
w1 [PATCH] w1: Fix for kconfig entry typo 2006-12-13 09:05:48 -08:00
zorro
Kconfig [PATCH] kvm: userspace interface 2006-12-10 09:57:22 -08:00
Makefile [PATCH] kvm: userspace interface 2006-12-10 09:57:22 -08:00