Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43771
b: refs/heads/master
c: b148900
h: refs/heads/master
i:
  43769: 50c1a2c
  43767: b761b81
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Dec 8, 2006
1 parent 7b99184 commit 238d7c5
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b49a257850fb8ad91f4c76bb712e9213141a34a
refs/heads/master: b1489009963b8c5132f2ffe23483e811d9ae5607
16 changes: 8 additions & 8 deletions trunk/drivers/ide/pci/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,11 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
{
unsigned long flags;
u8 tmpbyte;
struct pci_dev *north = pci_find_slot(0, PCI_DEVFN(0,0));
struct pci_dev *north = pci_get_slot(dev->bus, PCI_DEVFN(0,0));

pci_read_config_byte(dev, PCI_REVISION_ID, &m5229_revision);

isa_dev = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);

#if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS)
if (!ali_proc) {
Expand All @@ -613,8 +613,7 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
* clear bit 7
*/
pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F);
local_irq_restore(flags);
return 0;
goto out;
}

/*
Expand All @@ -637,10 +636,8 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
* box without a device at 0:0.0. The ALi bridge will be at
* 0:0.0 so if we didn't find one we know what is cooking.
*/
if (north && north->vendor != PCI_VENDOR_ID_AL) {
local_irq_restore(flags);
return 0;
}
if (north && north->vendor != PCI_VENDOR_ID_AL)
goto out;

if (m5229_revision < 0xC5 && isa_dev)
{
Expand All @@ -661,6 +658,9 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
}
}
out:
pci_dev_put(north);
pci_dev_put(isa_dev);
local_irq_restore(flags);
return 0;
}
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/ide/pci/pdc202xx_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,21 +362,24 @@ static int __devinit init_setup_pdc20270(struct pci_dev *dev,
ide_pci_device_t *d)
{
struct pci_dev *findev = NULL;
int ret;

if ((dev->bus->self &&
dev->bus->self->vendor == PCI_VENDOR_ID_DEC) &&
(dev->bus->self->device == PCI_DEVICE_ID_DEC_21150)) {
if (PCI_SLOT(dev->devfn) & 2)
return -ENODEV;
d->extra = 0;
while ((findev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) {
while ((findev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, findev)) != NULL) {
if ((findev->vendor == dev->vendor) &&
(findev->device == dev->device) &&
(PCI_SLOT(findev->devfn) & 2)) {
if (findev->irq != dev->irq) {
findev->irq = dev->irq;
}
return ide_setup_pci_devices(dev, findev, d);
ret = ide_setup_pci_devices(dev, findev, d);
pci_dev_put(findev);
return ret;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/ide/pci/sis5513.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,10 @@ static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const c

if (trueid == 0x5517) { /* SiS 961/961B */

lpc_bridge = pci_find_slot(0x00, 0x10); /* Bus 0, Dev 2, Fn 0 */
lpc_bridge = pci_get_slot(dev->bus, 0x10); /* Bus 0, Dev 2, Fn 0 */
pci_read_config_byte(lpc_bridge, PCI_REVISION_ID, &sbrev);
pci_read_config_byte(dev, 0x49, &prefctl);
pci_dev_put(lpc_bridge);

if (sbrev == 0x10 && (prefctl & 0x80)) {
printk(KERN_INFO "SIS5513: SiS 961B MuTIOL IDE UDMA133 controller\n");
Expand Down
4 changes: 3 additions & 1 deletion trunk/include/asm-i386/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,22 @@ static __inline__ int ide_default_irq(unsigned long base)

static __inline__ unsigned long ide_default_io_base(int index)
{
struct pci_dev *pdev;
/*
* If PCI is present then it is not safe to poke around
* the other legacy IDE ports. Only 0x1f0 and 0x170 are
* defined compatibility mode ports for PCI. A user can
* override this using ide= but we must default safe.
*/
if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) {
if ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL)) == NULL) {
switch(index) {
case 2: return 0x1e8;
case 3: return 0x168;
case 4: return 0x1e0;
case 5: return 0x160;
}
}
pci_dev_put(pdev);
switch (index) {
case 0: return 0x1f0;
case 1: return 0x170;
Expand Down

0 comments on commit 238d7c5

Please sign in to comment.