aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/pdc202xx_new.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:58 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:58 -0500
commiteadb6ecf761166aa55ad44f05b7a29b10ddaba34 (patch)
tree5b6233b8b10ebf5566189b89934bbfd12168ee7c /drivers/ide/pci/pdc202xx_new.c
parentc86ae7df90a26708e9e54e3a362046873d874e6c (diff)
pdc202xx_new: fix Promise TX4 support
In case of Promise TX4 the first PCI device is located at slot 1 and the second one is at slot 2 so the offset used by pci_get_slot() should be "+1" and not "+2". Thanks goes out to Markus Dietz for bugreport and testing this patch. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/pdc202xx_new.c')
-rw-r--r--drivers/ide/pci/pdc202xx_new.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 4234efeba606..2b4f44e45a1a 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -482,8 +482,9 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
482{ 482{
483 struct pci_dev *dev2; 483 struct pci_dev *dev2;
484 484
485 dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 2, 485 dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 1,
486 PCI_FUNC(dev->devfn))); 486 PCI_FUNC(dev->devfn)));
487
487 if (dev2 && 488 if (dev2 &&
488 dev2->vendor == dev->vendor && 489 dev2->vendor == dev->vendor &&
489 dev2->device == dev->device) { 490 dev2->device == dev->device) {