+ }
+ /*
+ * Clear drive error and, every eight attempts,
+ * (starting with the fourth)
+ * recalibrate to clear the slate.
+ */
+ upaddr->upcs1 = UP_TRE|UP_IE|UP_DCLR|UP_GO;
+ needie = 0;
+ if ((um->um_tab.b_errcnt&07) == 4) {
+ upaddr->upcs1 = UP_RECAL|UP_IE|UP_GO;
+ um->um_tab.b_active = 1;
+ sc->sc_recal = 1;
+ return;
+ }
+ }
+ /*
+ * Done retrying transfer... release
+ * resources... if we were recalibrating,
+ * then retry the transfer.
+ * Mathematical note: 28%8 != 4.
+ */
+ ubadone(um);
+ if (sc->sc_recal) {
+ sc->sc_recal = 0;
+ um->um_tab.b_active = 0; /* force retry */
+ }
+ /*
+ * If still ``active'', then don't need any more retries.
+ */
+ if (um->um_tab.b_active) {
+ /*
+ * If we were offset positioning,
+ * return to centerline.
+ */
+ if (um->um_tab.b_errcnt >= 16) {
+ upaddr->upof = UP_FMT22;
+ upaddr->upcs1 = UP_RTC|UP_GO|UP_IE;
+ while (upaddr->upds & UP_PIP)
+ DELAY(25);