Handle ready timeout during polled operation same as done in mvs(4) before.

This commit is contained in:
Alexander Motin 2011-04-18 16:00:46 +00:00
parent fa05d2156e
commit 18301f742e
2 changed files with 6 additions and 0 deletions

View File

@ -2856,4 +2856,9 @@ ahcipoll(struct cam_sim *sim)
struct ahci_channel *ch = (struct ahci_channel *)cam_sim_softc(sim);
ahci_ch_intr(ch->dev);
if (ch->resetting != 0 &&
(--ch->resetpolldiv <= 0 || !callout_pending(&ch->reset_timer))) {
ch->resetpolldiv = 1000;
ahci_reset_to(ch->dev);
}
}

View File

@ -414,6 +414,7 @@ struct ahci_channel {
int lastslot; /* Last used slot */
int taggedtarget; /* Last tagged target */
int resetting; /* Hard-reset in progress. */
int resetpolldiv; /* Hard-reset poll divider. */
int listening; /* SUD bit is cleared. */
union ccb *frozen; /* Frozen command */
struct callout pm_timer; /* Power management events */