From 0c873f98e2da5e0c1527de1464789698d34f3acb Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 6 Oct 2007 14:44:12 -0400 Subject: [PATCH] --- yaml --- r: 68529 b: refs/heads/master c: 06ed24e5773346eb13579a4ae9599502bc78e4f7 h: refs/heads/master i: 68527: 4a41e5c3962862aaada341f2286f8c80001a012d v: v3 --- [refs] | 2 +- trunk/drivers/mtd/nand/cafe_nand.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 35ae3fa2b648..245054f1b169 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 39fd179a7bfca026a269724a1f4ee5eb3f10419a +refs/heads/master: 06ed24e5773346eb13579a4ae9599502bc78e4f7 diff --git a/trunk/drivers/mtd/nand/cafe_nand.c b/trunk/drivers/mtd/nand/cafe_nand.c index cff969d05d4a..0b3f840b6cbe 100644 --- a/trunk/drivers/mtd/nand/cafe_nand.c +++ b/trunk/drivers/mtd/nand/cafe_nand.c @@ -623,6 +623,11 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev, uint32_t ctrl; int err = 0; + /* Very old versions shared the same PCI ident for all three + functions on the chip. Verify the class too... */ + if ((pdev->class >> 8) != PCI_CLASS_MEMORY_FLASH) + return -ENODEV; + err = pci_enable_device(pdev); if (err) return err; @@ -816,7 +821,8 @@ static void __devexit cafe_nand_remove(struct pci_dev *pdev) } static struct pci_device_id cafe_nand_tbl[] = { - { 0x11ab, 0x4100, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_MEMORY_FLASH << 8, 0xFFFF0 } + { 0x11ab, 0x4100, PCI_ANY_ID, PCI_ANY_ID }, + { } }; MODULE_DEVICE_TABLE(pci, cafe_nand_tbl);