Commit 7fc24199 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] add hwif->hold flag

Add hwif->hold flag for hotswap interfaces.
Initialize founded hwif in ide_register_hw().

Original patch by Benjamin Herrenschmidt.
parent 9c6c56a3
......@@ -913,6 +913,8 @@ int ide_register_hw (hw_regs_t *hw, ide_hwif_t **hwifp)
}
for (index = 0; index < MAX_HWIFS; ++index) {
hwif = &ide_hwifs[index];
if (hwif->hold)
continue;
if ((!hwif->present && !hwif->mate && !initializing) ||
(!hwif->hw.io_ports[IDE_DATA_OFFSET] && initializing))
goto found;
......@@ -924,6 +926,8 @@ int ide_register_hw (hw_regs_t *hw, ide_hwif_t **hwifp)
found:
if (hwif->present)
ide_unregister(index);
else if (!hwif->hold)
init_hwif_data(index);
if (hwif->present)
return -1;
memcpy(&hwif->hw, hw, sizeof(*hw));
......
......@@ -1001,6 +1001,7 @@ typedef struct hwif_s {
unsigned noprobe : 1; /* don't probe for this interface */
unsigned present : 1; /* this interface exists */
unsigned hold : 1; /* this interface is always present */
unsigned serialized : 1; /* serialized all channel operation */
unsigned sharing_irq: 1; /* 1 = sharing irq with another hwif */
unsigned reset : 1; /* reset after probe */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment