RE: [patch 6/8] mptfusion: fc transport

James Bottomley
2004-12-06T15:18:29Z

On Fri, 2004-12-03 at 11:33, Moore, Eric Dean wrote:
> Why does spi_attach_transport or fc_attach_transport have to be
> done from the module_init routines? Meaning there is an assumption
> that spi and FC are separate drivers. Why can't the xxx_attach_transport be
> done
> later from the probe routines when we know which pci devices we are
> attaching?

Can we take a step back from this and look at the actual problem you're
trying to solve with the fc class?

At the moment, its only real use is to display certain device
parameters, which is a passive feature (although it now has the capacity
to control cable pull blocking, which will be an active facility).

Your requirement came from SGI, who cares about the parameters. What
I'm proposing is that you move the mptbase_pci_table out of mptbase.c
and into *two* upper modules (you could even do it into mptscsih.c and a
new mptfc.c, which would depend on mptscsih). Now you have the FC
devices registered separately, you can put all of the fc transport
display into mptfc.c. This involves moving no code other than the
actual PCI table. Linux will automatically only modprobe mptfc if the
user has a FC device PCI ID and everyone will be happy.

Why is this such a hard thing to do?

James