Linux ATA/IDE development
 help / color / mirror / Atom feed
* purpose of resetproc() in struct hwif_s
@ 2003-12-07  7:42 Jeremy Higdon
  2003-12-07 23:13 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Higdon @ 2003-12-07  7:42 UTC (permalink / raw)
  To: linux-ide

Hello,

I have a question about the resetproc function pointer in
the ide_hwif_t structure.

Several PCI controllers don't fill in this pointer, and thus,
the controllers will not be reset in do_reset1().

The comment in do_reset1() is a little puzzling:

        /*                                                                                  
         * Some weird controller like resetting themselves to a strange
         * state when the disks are reset this way. At least, the Winbond
         * 553 documentation says that
         */
        if (hwif->resetproc != NULL) {
                hwif->resetproc(drive);
        }

Then there's this in the definition for ide_hwif_t:

        /* routine to reset controller after a disk reset */
        void    (*resetproc)(ide_drive_t *);


I'm wondering what to do with this in the driver I'm supporting
(sgiioc4, as well as a Vitesse VSC7174 driver).  Currently, they
both just disable DMA and clear any pending interrupts for the
drive in question.

My question is, what should it be doing?  Is turning shutting off
DMA and clearing interrupts sufficient if we don't think we need
to reset the controller?  Could it be harmful?


thanks

jeremy

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: purpose of resetproc() in struct hwif_s
  2003-12-07  7:42 purpose of resetproc() in struct hwif_s Jeremy Higdon
@ 2003-12-07 23:13 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2003-12-07 23:13 UTC (permalink / raw)
  To: Jeremy Higdon; +Cc: linux-ide


> My question is, what should it be doing?  Is turning shutting off
> DMA and clearing interrupts sufficient if we don't think we need
> to reset the controller?  Could it be harmful?

I added this callback a while back because the winbond was switching
to what seems, according to the (very bad) documentation, some 8
bits only mode when sensing an ATA reset done via the control reg.
You don't _have_ to do anything special if your controller don't
play such tricks, though if you have ways of putting back the controller
to some sane idle state (in case we reset after a DMA failure), it
might be wise to do so. 

Ben.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-07 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-07  7:42 purpose of resetproc() in struct hwif_s Jeremy Higdon
2003-12-07 23:13 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox