[patch 1/4] ide: Break ide_lock -- Move hwif tuning code after hwif_init

From: Ravikiran G Thirumalai
Date: Tue Sep 06 2005 - 18:38:11 EST


Following patch moves the hwif tuning code from probe_hwif to ideprobe_init
after ideprobe_init calls hwif_init so that all hwif's have associated
hwgroups. With this patch, we should always have hwgroups for hwifs during
calls the drive tune routines.


Signed-off-by: Alok N Kataria <alokk@xxxxxxxxxxxxxx>
Signed-off-by: Ravikiran Thirumalai <kiran@xxxxxxxxxxxx>

Index: linux-2.6.13/drivers/ide/ide-probe.c
===================================================================
--- linux-2.6.13.orig/drivers/ide/ide-probe.c 2005-09-06 11:22:29.000000000 -0700
+++ linux-2.6.13/drivers/ide/ide-probe.c 2005-09-06 15:12:58.000000000 -0700
@@ -852,8 +852,15 @@

if (!hwif->present) {
ide_hwif_release_regions(hwif);
- return;
}
+}
+
+static void ide_tune_drives(ide_hwif_t * hwif)
+{
+ unsigned int unit;
+
+ if (!hwif->present)
+ return;

for (unit = 0; unit < MAX_DRIVES; ++unit) {
ide_drive_t *drive = &hwif->drives[unit];
@@ -1443,9 +1450,12 @@
for (index = 0; index < MAX_HWIFS; ++index)
if (probe[index])
probe_hwif(&ide_hwifs[index]);
- for (index = 0; index < MAX_HWIFS; ++index)
- if (probe[index])
+ for (index = 0; index < MAX_HWIFS; ++index) {
+ if (probe[index]) {
hwif_init(&ide_hwifs[index]);
+ ide_tune_drives(&ide_hwifs[index]);
+ }
+ }
for (index = 0; index < MAX_HWIFS; ++index) {
if (probe[index]) {
ide_hwif_t *hwif = &ide_hwifs[index];
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/