From: Johann Felix Soden <johfel@gmx.de>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>,
Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
linux-ide@vger.kernel.org
Subject: [PATCH] ide-generic: Fix no initalization of idx in some case
Date: Wed, 20 Feb 2008 14:55:35 +0100 [thread overview]
Message-ID: <1203515735.26116.4.camel@localhost> (raw)
From: Johann Felix Soden <johfel@users.sourceforge.net>
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 http://article.gmane.org/gmane.linux.ide/28810 .
Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
CC: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
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;
continue;
+ }
memset(&hw, 0, sizeof(hw));
ide_std_init_ports(&hw, io_addr, io_addr + 0x206);
--
1.5.4.2
next reply other threads:[~2008-02-20 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 13:55 Johann Felix Soden [this message]
2008-02-20 14:35 ` [PATCH] ide-generic: Fix no initalization of idx in some case Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1203515735.26116.4.camel@localhost \
--to=johfel@gmx.de \
--cc=bzolnier@gmail.com \
--cc=kamalesh@linux.vnet.ibm.com \
--cc=linux-ide@vger.kernel.org \
--cc=sshtylyov@ru.mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.