Re: [PATCH 2.6.12.3] PCI/libata INTx cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg KH wrote:
On Fri, Aug 12, 2005 at 01:10:43PM -0400, Brett Russ wrote:

Jeff Garzik wrote:

Brett Russ wrote:


Simple cleanup to eliminate X copies of the same function in libata. Moved pci_enable_intx() to pci.c, added pci_disable_intx() as well, and use them throughout libata and msi.c.

Signed-off-by: Brett Russ <[email protected]>


Though there is nothing wrong with this patch, I would prefer a single function, pci_intx(), as found in drivers/scsi/ahci.c.

Would you be willing to move that one to the PCI layer, eliminate the multiple copies of pci_enable_intx(), and replace the calls to pci_enable_intx() with calls to pci_intx() ?

Sounds like what I did, except for the naming change.  I did away with
pci_disable_intx() and changed the names.  Look ok?


Looks ok to me, care to resend it with a Signed-off-by: and a new
changelog entry so I can apply it?


+EXPORT_SYMBOL(pci_intx);


Hm, for new pci functions, I prefer to have them marked as
EXPORT_SYMBOL_GPL(), is that ok with you?

Don't apply as-is, it needs to look like the current 2.6.13-rcX two-arg version from drivers/scsi/ahci.c:

/* move to PCI layer, integrate w/ MSI stuff */
static void pci_intx(struct pci_dev *pdev, int enable)
{
        u16 pci_command, new;

        pci_read_config_word(pdev, PCI_COMMAND, &pci_command);

        if (enable)
                new = pci_command & ~PCI_COMMAND_INTX_DISABLE;
        else
                new = pci_command | PCI_COMMAND_INTX_DISABLE;

        if (new != pci_command)
                pci_write_config_word(pdev, PCI_COMMAND, pci_command);
}

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux