Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93634
b: refs/heads/master
c: 1664949
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Apr 26, 2008
1 parent 2babc92 commit 1d83908
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 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: d083c03f2524af699a6b85cf4d2f8090242b1b84
refs/heads/master: 1664949843e8c0782c8f2e40897285a8dfffdf27
21 changes: 19 additions & 2 deletions trunk/drivers/ide/ide-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,24 @@ static int __init ide_generic_init(void)
unsigned long io_addr = ide_default_io_base(i);
hw_regs_t hw;

idx[i] = 0xff;

if (io_addr) {
if (!request_region(io_addr, 8, DRV_NAME)) {
printk(KERN_ERR "%s: I/O resource 0x%lX-0x%lX "
"not free.\n",
DRV_NAME, io_addr, io_addr + 7);
continue;
}

if (!request_region(io_addr + 0x206, 1, DRV_NAME)) {
printk(KERN_ERR "%s: I/O resource 0x%lX "
"not free.\n",
DRV_NAME, io_addr + 0x206);
release_region(io_addr, 8);
continue;
}

/*
* Skip probing if the corresponding
* slot is already occupied.
Expand All @@ -109,10 +126,10 @@ static int __init ide_generic_init(void)
ide_std_init_ports(&hw, io_addr, io_addr + 0x206);
hw.irq = ide_default_irq(io_addr);
ide_init_port_hw(hwif, &hw);
hwif->mmio = 1;

idx[i] = i;
} else
idx[i] = 0xff;
}
}

ide_device_add_all(idx, NULL);
Expand Down

0 comments on commit 1d83908

Please sign in to comment.