lkml.org 
[lkml]   [2004]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: 2.6.3 - Badness in pci_find_subsys at drivers/pci/search.c:167
Date
On Tuesday 24 of February 2004 23:30, Greg KH wrote:
> On Tue, Feb 24, 2004 at 05:04:55PM +0100, marcel cotta wrote:
> > i came across this while playing with hdparm
> >
> > Call Trace:
> > [<c0264128>] pci_find_subsys+0xe8/0xf0
> > [<c026415f>] pci_find_device+0x2f/0x40
> > [<c02e5d89>] ide_system_bus_speed+0x69/0x90
> > [<c02e528e>] ali15x3_tune_drive+0x1e/0x250
>
> Ugh, this is due to calling system_bus_clock() from within an interrupt.
> Is there any good reason to do this? Can't we just cache the bus speed
> in the local device structure if we really have to do this from within
> an interrupt?

ide_init() always initializes system_bus_speed variable
so system_bus_clock() should never call ide_system_bus_speed()
and no driver is calling ide_system_bus_speed() directly.

Bug was that if no IDE kernel parameter was given during boot
system_bus_speed will be zeroed in init_ide_data().

This patch should fix the problem
(as a bonus -> no need to zero these variables they are static).

linux-2.6.3-bk6-root/drivers/ide/ide.c | 3 ---
1 files changed, 3 deletions(-)

diff -puN drivers/ide/ide.c~ide_bus_speed drivers/ide/ide.c
--- linux-2.6.3-bk6/drivers/ide/ide.c~ide_bus_speed 2004-02-25 00:47:39.467793088 +0100
+++ linux-2.6.3-bk6-root/drivers/ide/ide.c 2004-02-25 00:48:44.319934064 +0100
@@ -302,9 +302,6 @@ static void __init init_ide_data (void)
initializing = 1;
ide_init_default_hwifs();
initializing = 0;
-
- idebus_parameter = 0;
- system_bus_speed = 0;
}

/*
_

-
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 14:01    [W:0.033 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site