lkml.org 
[lkml]   [2003]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: ide: indeed, using list_for_each_entry_safe removes endless looping / hang [Was: Re: 2.5.65-ac2 -- hda/ide trouble on ICH4]
	Hello,

On Sun, 23 Mar 2003, Dominik Brodowski wrote:

> Yes, it also works with 2.5.65-bkX.

Dominik, can you try this patch on top of 2.5.65-ac3/bk,
i can't reproduce the hang but it seems that drives without driver can get
both in ata_unused and idedefault_driver.drives and lists go nuts.
It kills ata_unused and uses idedefault_driver.drives only,
boots fine here. I'd guess you have ide-cd as module, and the two drives
handled by it couse the trouble - first joins the lists second couses the
loop.

--
have fun,
alex

===== drivers/ide/ide.c 1.52 vs edited =====
--- 1.52/drivers/ide/ide.c Sun Mar 23 02:00:50 2003
+++ edited/drivers/ide/ide.c Mon Mar 24 08:48:54 2003
@@ -469,7 +469,6 @@
return -ENXIO;
}

-static LIST_HEAD(ata_unused);
static spinlock_t drives_lock = SPIN_LOCK_UNLOCKED;
static spinlock_t drivers_lock = SPIN_LOCK_UNLOCKED;
static LIST_HEAD(drivers);
@@ -1440,9 +1439,6 @@
spin_unlock(&drivers_lock);
if(idedefault_driver.attach(drive) != 0)
panic("ide: default attach failed");
- spin_lock(&drives_lock);
- list_add_tail(&drive->list, &ata_unused);
- spin_unlock(&drives_lock);
return 1;
}

@@ -2399,7 +2395,7 @@

spin_lock(&drives_lock);
INIT_LIST_HEAD(&list);
- list_splice_init(&ata_unused, &list);
+ list_splice_init(&idedefault_driver.drives, &list);
spin_unlock(&drives_lock);

while (!list_empty(&list)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.058 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site