purpose of resetproc() in struct hwif_s
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
Quoted 4 lines
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.