aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2007-04-25 09:51:45 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-06 10:33:13 -0400
commit46fa311e6967b526e1fd9b0b44edda6841dcac27 (patch)
tree939fe8d2023c86b17f0f4ee9f3d627e64e2604de /drivers/scsi/lpfc/lpfc_hbadisc.c
parent07951076aefa4194e1dbf1d8c89eaff040c45155 (diff)
[SCSI] lpfc 8.1.12 : Rework offline path to solve HBA reset issues
Rework offline path to solve HBA reset issues Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 485a13fa527d..92c0c4b88953 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -185,29 +185,35 @@ lpfc_work_list_done(struct lpfc_hba * phba)
185 *(int *)(evtp->evt_arg1) = 0; 185 *(int *)(evtp->evt_arg1) = 0;
186 complete((struct completion *)(evtp->evt_arg2)); 186 complete((struct completion *)(evtp->evt_arg2));
187 break; 187 break;
188 case LPFC_EVT_OFFLINE: 188 case LPFC_EVT_OFFLINE_PREP:
189 if (phba->hba_state >= LPFC_LINK_DOWN) 189 if (phba->hba_state >= LPFC_LINK_DOWN)
190 lpfc_offline(phba); 190 lpfc_offline_prep(phba);
191 *(int *)(evtp->evt_arg1) = 0;
192 complete((struct completion *)(evtp->evt_arg2));
193 break;
194 case LPFC_EVT_OFFLINE:
195 lpfc_offline(phba);
191 lpfc_sli_brdrestart(phba); 196 lpfc_sli_brdrestart(phba);
192 *(int *)(evtp->evt_arg1) = 197 *(int *)(evtp->evt_arg1) =
193 lpfc_sli_brdready(phba,HS_FFRDY | HS_MBRDY); 198 lpfc_sli_brdready(phba, HS_FFRDY | HS_MBRDY);
199 lpfc_unblock_mgmt_io(phba);
194 complete((struct completion *)(evtp->evt_arg2)); 200 complete((struct completion *)(evtp->evt_arg2));
195 break; 201 break;
196 case LPFC_EVT_WARM_START: 202 case LPFC_EVT_WARM_START:
197 if (phba->hba_state >= LPFC_LINK_DOWN) 203 lpfc_offline(phba);
198 lpfc_offline(phba);
199 lpfc_reset_barrier(phba); 204 lpfc_reset_barrier(phba);
200 lpfc_sli_brdreset(phba); 205 lpfc_sli_brdreset(phba);
201 lpfc_hba_down_post(phba); 206 lpfc_hba_down_post(phba);
202 *(int *)(evtp->evt_arg1) = 207 *(int *)(evtp->evt_arg1) =
203 lpfc_sli_brdready(phba, HS_MBRDY); 208 lpfc_sli_brdready(phba, HS_MBRDY);
209 lpfc_unblock_mgmt_io(phba);
204 complete((struct completion *)(evtp->evt_arg2)); 210 complete((struct completion *)(evtp->evt_arg2));
205 break; 211 break;
206 case LPFC_EVT_KILL: 212 case LPFC_EVT_KILL:
207 if (phba->hba_state >= LPFC_LINK_DOWN) 213 lpfc_offline(phba);
208 lpfc_offline(phba);
209 *(int *)(evtp->evt_arg1) 214 *(int *)(evtp->evt_arg1)
210 = (phba->stopped) ? 0 : lpfc_sli_brdkill(phba); 215 = (phba->stopped) ? 0 : lpfc_sli_brdkill(phba);
216 lpfc_unblock_mgmt_io(phba);
211 complete((struct completion *)(evtp->evt_arg2)); 217 complete((struct completion *)(evtp->evt_arg2));
212 break; 218 break;
213 } 219 }