linux-kernel-test/drivers
Tony Olech 4b87361d49 USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
ELAN's U132 is a USB to CardBus OHCI controller adapter,
    designed specifically for CardBus 3G data cards to
    function in machines without a CardBus slot.
The "ftdi-elan" module is a USB client driver, that detects
    a supported CardBus OHCI controller plugged into the
    U132 adapter and thereafter provides the conduit for
    for access by the "u132-hcd" module.
The "u132-hcd" module is a (cut-down OHCI) host controller
    that supports a single OHCI function of the CardBus 
    card inserted into the U132 adapter.

The problem with the initial implementation is that when
the CardBus card inserted into the U132 adapter has multiple
functions (and a CardBus card can support up to 4 functions),
it was the first function that was arbitrarily choosen.

The first batch of 3G cards tested, like the Merlin Qualcomm
V620, have two functions each supporting a seperate USB OHCI
host controller, of which it was that first function that is
wired up to the 3G modem.

Then along comes the Vodafone Mobile Connect 3G/GPRS data card,
aka "Option GT 3G Quad" as printed on it's rear or "Option N.V.
GlobeTrotter Fusion Quad Lite" as read with "lspci -v". And it
has the meaningful functionality in the second CardBus function.

That presents a problem because it was the "ftdi-elan" module
alone that knows how to communicate to the embedded CardBus slot
and the "u132-hcd" module alone that knows how to access the
pcmcia configuration and CardBus accessible memory space. And
of course, the information about attached (internally hardwired)
devices is contained within USB configuration embedded somewhere
within the CardBus card.

If only the "u132-hcd" module probe() interface could return a
result code that propagated back to the instigating function
platform_device_register() then the "ftdi-elan" module could
try an alternative CardBus function.     However in spite of
the recent changes to the drivers/base/ routines that moved 
device_attach() from bus_add_device() to bus_attach_device()
both of those routines lose the "failed to attach" 0 result
code and thus the calling routine, namely device_add() is
incapable of propaging the "failed to attach" condition back
to platform_device_add() and consequently back to the caller
of platform_device_register()

Experiments show that patching bus_attach_device() to return
ENODEV fails with the kernel locking up very early during
boot. But, however, if the patch is restricted to calls from
platform_device_add() then it does seem to work.

Unfortunately, until the kernel's drivers/base is properly
modified to propagate -ENODEV back to the caller of
platform_device_register(), it is necessary to "fix" the
"ftdi-elan" module by importing knowledge from the 
"u132-hcd" module. This is the reason for the duplicated
functionality introduced in this patch.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -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 [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -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 USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card 2006-12-20 10:14:27 -08: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