From: Johann Felix Soden <[EMAIL PROTECTED]>

If the slot is already occupied, there should be written 0xff to idx[i].
In the ongoing code and in this case there are no writings to idx[i], so
garbage stays in idx. The kernel get into a endless loop printing:

: I/O resource 0x0-0x0 not free.
Trying to free nonexistent resource <0000000000000000-0000000000000000>
Trying to free nonexistent resource <0000000000000000-0000000000000000>

This patch solves .

Signed-off-by: Johann Felix Soden <[EMAIL PROTECTED]>
CC: Sergei Shtylyov <[EMAIL PROTECTED]>
 drivers/ide/ide-generic.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 5499a77..fb9865c 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -103,7 +103,10 @@ static int __init ide_generic_init(void)
                        hwif = ide_find_port();
                        if (hwif == NULL || hwif->index != i)
+                       {
+                               idx[i] = 0xff;
+                       }
                        memset(&hw, 0, sizeof(hw));
                        ide_std_init_ports(&hw, io_addr, io_addr + 0x206);

To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to