Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105024
b: refs/heads/master
c: af1cbba
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 23, 2008
1 parent 810b4c9 commit 579ae19
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 6059143ae34f30bb49ec8733468315284f78e2da
refs/heads/master: af1cbba37343c827e116638b097b94f5e6c38963
11 changes: 9 additions & 2 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,10 +992,14 @@ static void ide_port_setup_devices(ide_hwif_t *hwif)
mutex_unlock(&ide_cfg_mtx);
}

static ide_hwif_t *ide_ports[MAX_HWIFS];

void ide_remove_port_from_hwgroup(ide_hwif_t *hwif)
{
ide_hwgroup_t *hwgroup = hwif->hwgroup;

ide_ports[hwif->index] = NULL;

spin_lock_irq(&ide_lock);
/*
* Remove us from the hwgroup, and free
Expand Down Expand Up @@ -1054,8 +1058,9 @@ static int init_irq (ide_hwif_t *hwif)
* Group up with any other hwifs that share our irq(s).
*/
for (index = 0; index < MAX_HWIFS; index++) {
ide_hwif_t *h = &ide_hwifs[index];
if (h->hwgroup) { /* scan only initialized hwif's */
ide_hwif_t *h = ide_ports[index];

if (h && h->hwgroup) { /* scan only initialized ports */
if (hwif->irq == h->irq) {
hwif->sharing_irq = h->sharing_irq = 1;
if (hwif->chipset != ide_pci ||
Expand Down Expand Up @@ -1109,6 +1114,8 @@ static int init_irq (ide_hwif_t *hwif)
hwgroup->timer.data = (unsigned long) hwgroup;
}

ide_ports[hwif->index] = hwif;

/*
* Allocate the irq, if not already obtained for another hwif
*/
Expand Down

0 comments on commit 579ae19

Please sign in to comment.