tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [patch] PCI memory & i/o enables
On Fri, 8 Apr 2011, David Young wrote:
> Here is a patch that changes the way that the PCI subsystem and drivers
> use PCI_FLAGS_IO_ENABLED and PCI_FLAGS_MEM_ENABLED. I went ahead and
> renamed the flags in order to poison old-fashioned uses. Now they're
> called PCI_FLAGS_IO_OKAY and PCI_FLAGS_MEM_OKAY.
>
> For simplicity's sake, I'll just write of PCI_FLAGS_IO_ENABLED, below,
> but the same discussion applies to PCI_FLAGS_MEM_ENABLED.
>
> Traditionally, if PCI_FLAGS_IO_ENABLED is set in the
> pci_attach_args.pa_flags, it tells a PCI device driver, "the bridges
> upstream forward PCI I/O transactions to this device, *and* I/O
> transactions are enabled in the device's PCI CSR." Some drivers,
> finding that neither PCI_FLAGS_IO_ENABLED nor the corresponding PCI CSR
> bit is set set both pa_flags and the CSR themselves. Those drivers
> assume that the upstream bridges are forwarding I/O transactions, which
> may or may not be true. They have to assume, though, because the
> information in pa_flags is not specific.
>
> My patch makes the PCI_FLAGS_IO_OKAY condition more specific: it tells a
> PCI device driver, "the bridges upstream forward PCI I/O transactions to
> this device". If the flag isn't set, the driver has no business setting
> it. Also, if the flag isn't set, there's not much use in the driver
> setting the corresponding bit in the PCI CSR.
It looks like you're renaming constants. What is the functional change
here other than renaming things? What happens to drivers that use the old
*IO_ENABLED flags? What are you trying to accomplish here?
Eduardo
Home |
Main Index |
Thread Index |
Old Index