Re: [PATCH] make sym53c8xx.c and ncr53c8xx.c call pci_enable_device

=?ISO-8859-1?Q?G=E9rard_Roudier?= (groudier@club-internet.fr)
Wed, 31 Jan 2001 20:56:09 +0100 (CET)


On Wed, 31 Jan 2001, Alan Cox wrote:

> > If the pci_enable_device() thing is to be added to the drivers, it must
> > preferently be placed after the checking against RAID attachement.
>
> You cant check the signature until the device has been enabled. Maybe you
> could poke the LSI guys and find out how windows PnP stuff handles this.

Personnaly I donnot need to know how windows handle this in order to
figure out how it should be properly handled.

In theory, the signature should be checked prior to any change in the
device configuration space. But since PCI BIOS assigning of resource
windows is complete mess-up, the O/S has to probe BAR sizes. The probing
of BAR sizes does not seem to harm. This done, given that it is possible
then to first check the signature and to leave quiet the device if it is
owned by RAID, there is no valuable reason to still tamper the device for
nothing if it is not to be attached.

> I think the proposed change is ok because if the board is enabled then the
> enabling code won't touch it.

Can you swear that the code will never change ?

Anyway, the current code at least enables response to IO and to MEM based
on existing BARs. This probably does not harm but this should be done on
behalf of the software driver and based on actually _used_ resources. On
the other hand, the complex enabling of IRQ is really something we want to
avoid in situation where it is not actually useful.

End of story, since moving pci_enable_device() in its preferred place as I
suggested is an obvious minute change.

Gérard.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/