Re: [PATCH 8/8] staging: vme: make match() driver specific to improvenon-VME64x support

From: Martyn Welch
Date: Wed Aug 03 2011 - 05:16:38 EST


On 01/08/11 11:20, Manohar Vanga wrote:
> For jumper based boards (non VME64x), there is no mechanism
> for detecting the card that is plugged into a specific slot. This
> leads to issues in non-autodiscovery crates/cards when a card is
> plugged into a slot that is "claimed" by a different driver. In
> reality, there is no problem, but the driver rejects such a
> configuration due to its dependence on the concept of slots.
>
> This patch makes the concept of slots less critical and pushes the
> driver match() to individual drivers (similar to what happens in the
> ISA bus in driver/base/isa.c). This allows drivers to register the
> number of devices that they expect without any restrictions. Devices
> in this new model are now formatted as $driver_name-$bus_id.$device_id
> (as compared to the earlier vme-$bus_id.$slot_number).
>

I haven't got any hardware old enough to hand to play with how ISA devices get
bound into the device model. I was thinking that we may be able to do
vme-$bus_id.$device_id, but this would require the $device_id to be unique per
bus, which isn't an issue on buses such as PCI (or I guess USB) where such
enumeration is built into the spec. With the exception of VME64x, which I
guess we should really be treating as a special case (I guess most cards in
actual use don't follow this standard), we are much closer to the ISA bus. I
assume that $driver_name-$bus_id.$device_id is roughly in line with how ISA
would do this (IIRC, ther would only ever be one ISA bus on a board, so the
bus entry wouldn't be needed, but we clearly need this)?

Martyn

--
Martyn Welch (Principal Software Engineer) | Registered in England and
GE Intelligent Platforms | Wales (3828642) at 100
T +44(0)127322748 | Barbirolli Square, Manchester,
E martyn.welch@xxxxxx | M2 3AB VAT:GB 927559189
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/