lkml.org 
[lkml]   [2005]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 1/4] ide: Break ide_lock -- Move hwif tuning code after hwif_init
    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@calsoftinc.com>
    Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

    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@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-09-07 01:40    [W:0.030 / U:31.548 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site