lkml.org 
[lkml]   [2011]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] Add NumaChip quirk
    Date
    From: Steffen Persvold <sp@numascale.com>

    From: Steffen Persvold <sp@numascale.com>

    Add quirk for Numascale's NumaChip to prevent resource conflicts.

    v2:
    - [Daniel] rediffed and validated against 3.1-rc10

    Signed-off-by: Steffen Persvold <sp@numascale.com>
    Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
    ---
    drivers/pci/quirks.c | 14 ++++++++++++++
    include/linux/pci_ids.h | 4 ++++
    2 files changed, 18 insertions(+), 0 deletions(-)

    diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
    index 1196f61..051b793 100644
    --- a/drivers/pci/quirks.c
    +++ b/drivers/pci/quirks.c
    @@ -2679,6 +2679,20 @@ static void __devinit quirk_hotplug_bridge(struct pci_dev *dev)

    DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge);

    +/* Clear all resources on NumaChip to avoid conflicts */
    +static void __devinit numachip_resource_fixup(struct pci_dev *pdev)
    +{
    + int i;
    +
    + for (i = PCI_STD_RESOURCES; i <= PCI_ROM_RESOURCE; i++)
    + memset(&pdev->resource[i], 0, sizeof(pdev->resource[i]));
    +
    + dev_notice(&pdev->dev, "Disabled all PCI resources for NumaChip\n");
    +}
    +
    +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NUMASCALE,
    + PCI_DEVICE_ID_NUMASCALE_NUMACHIP0, numachip_resource_fixup);
    +
    /*
    * This is a quirk for the Ricoh MMC controller found as a part of
    * some mulifunction chips.
    diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
    index ae96bbe..02e0959 100644
    --- a/include/linux/pci_ids.h
    +++ b/include/linux/pci_ids.h
    @@ -2400,6 +2400,10 @@

    #define PCI_VENDOR_ID_AZWAVE 0x1a3b

    +#define PCI_VENDOR_ID_NUMASCALE 0x1b47
    +#define PCI_DEVICE_ID_NUMASCALE_NUMACHIP0 0x0601
    +#define PCI_DEVICE_ID_NUMASCALE_NUMACHIP1 0x0602
    +
    #define PCI_VENDOR_ID_TEKRAM 0x1de1
    #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29

    --
    1.7.5.4


    \
     
     \ /
      Last update: 2011-10-26 08:11    [W:2.320 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site