Re: IDE problem [PATCH]

From: Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Date: Thu May 18 2000 - 05:47:32 EST


> > > Explain some more please.
> >
> > At the moment I see minimum three ways of fixing this:
> > - memset(&hw, 0, sizeof(hw_regs_t)) in hwinf initialization
> > ... as I (maybe unfortunately) suggested
>
> ide.c "static void init_hwif_data (unsigned int index)"
>
> /* bulk initialize hwif & drive info with zeros */
> memset(hwif, 0, sizeof(ide_hwif_t));
> memset(&hw, 0, sizeof(hw_regs_t));

This initialization and data set a bit below are overwritten later in
ide_init_default_hwifs(). I even thought about #ifdefing it out by

  #ifdef CONFIG_BLK_DEV_IDEPCI

to avoid duplicated initialization of the same data, but I'm not sure
whether it breaks or not other architectures (especially: m68k, ppc, mips
and mips64; arm is broken anyway).

> > - io_ports[IDE_IRQ_OFFSET] = 0 in ide_init_hwif_ports() for architectures
> > (i386,alpha,etc.) which do not use it.
>
> OKAY
>
> > - #if defined(CONFIG_AMIGA) || defined(CONFIG_MAC)
> > around io_ports[IDE_IRQ_OFFSET] checking/registering/unregistering
> > (when calling ide_*_region()).
>
> GOOD

Both together are not necessary. However, they shouldn't hurt.

 Andrzej

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:15 EST