1152
1153 host = aac->scsi_host_ptr;
1154 scsi_block_requests(host);
1155 aac_adapter_disable_int(aac);
1156 if (aac->thread->pid != current->pid) {
1157 spin_unlock_irq(host->host_lock);
1158 kthread_stop(aac->thread);
1159 jafo = 1;
1160 }
1161
1162
1163
1164
1165
1166 retval = aac_adapter_restart(aac, forced ? 0 : aac_adapter_check_health(aac));
1167
1168 if (retval)
1169 goto out;
1170
1171
1172
1173
1174 for (retval = 1, index = 0; index < (aac->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB); index++) {
1175 struct fib *fib = &aac->fibs[index];
1176 if (!(fib->hw_fib_va->header.XferState & cpu_to_le32(NoResponseExpected | Async)) &&
1177 (fib->hw_fib_va->header.XferState & cpu_to_le32(ResponseExpected))) {
1178 unsigned long flagv;
1179 spin_lock_irqsave(&fib->event_lock, flagv);
1180 up(&fib->event_wait);
1181 spin_unlock_irqrestore(&fib->event_lock, flagv);
1182 schedule();
1183 retval = 0;
1184 }
1185 }
1186
1187 if (retval == 0)
1188 ssleep(2);
1189 index = aac->cardtype;
1190
1191
1192