Skip to content

Commit

Permalink
pdc202xx_new: fix Promise TX4 support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Dec 12, 2007
1 parent c86ae7d commit eadb6ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ide/pci/pdc202xx_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,9 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
{
struct pci_dev *dev2;

dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 2,
dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 1,
PCI_FUNC(dev->devfn)));

if (dev2 &&
dev2->vendor == dev->vendor &&
dev2->device == dev->device) {
Expand Down

0 comments on commit eadb6ec

Please sign in to comment.