diff options
author | Jamie Wellnitz <Jamie.Wellnitz@emulex.com> | 2006-02-28 19:25:27 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-02-28 20:00:36 -0500 |
commit | 41415862a23f422b80eccc92cf885935139e2415 (patch) | |
tree | e3a9537653e472f15405778c4dcc678a56304848 /drivers/scsi/lpfc/lpfc_hbadisc.c | |
parent | d9d959c41f013439508e0fa1d31f5644d8d626ef (diff) |
[SCSI] lpfc 8.1.2: Add ERROR and WARM_START modes for diagnostic purposes.
Add ERROR and WARM_START modes for diagnostic purposes.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@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.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 5c396171ebe8..55454923029d 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************* | 1 | /******************************************************************* |
2 | * This file is part of the Emulex Linux Device Driver for * | 2 | * This file is part of the Emulex Linux Device Driver for * |
3 | * Fibre Channel Host Bus Adapters. * | 3 | * Fibre Channel Host Bus Adapters. * |
4 | * Copyright (C) 2004-2005 Emulex. All rights reserved. * | 4 | * Copyright (C) 2004-2006 Emulex. All rights reserved. * |
5 | * EMULEX and SLI are trademarks of Emulex. * | 5 | * EMULEX and SLI are trademarks of Emulex. * |
6 | * www.emulex.com * | 6 | * www.emulex.com * |
7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * | 7 | * Portions Copyright (C) 2004-2005 Christoph Hellwig * |
@@ -120,11 +120,33 @@ lpfc_work_list_done(struct lpfc_hba * phba) | |||
120 | free_evt = 0; | 120 | free_evt = 0; |
121 | break; | 121 | break; |
122 | case LPFC_EVT_ONLINE: | 122 | case LPFC_EVT_ONLINE: |
123 | *(int *)(evtp->evt_arg1) = lpfc_online(phba); | 123 | if (phba->hba_state < LPFC_LINK_DOWN) |
124 | *(int *)(evtp->evt_arg1) = lpfc_online(phba); | ||
125 | else | ||
126 | *(int *)(evtp->evt_arg1) = 0; | ||
124 | complete((struct completion *)(evtp->evt_arg2)); | 127 | complete((struct completion *)(evtp->evt_arg2)); |
125 | break; | 128 | break; |
126 | case LPFC_EVT_OFFLINE: | 129 | case LPFC_EVT_OFFLINE: |
127 | *(int *)(evtp->evt_arg1) = lpfc_offline(phba); | 130 | if (phba->hba_state >= LPFC_LINK_DOWN) |
131 | lpfc_offline(phba); | ||
132 | lpfc_sli_brdrestart(phba); | ||
133 | *(int *)(evtp->evt_arg1) = | ||
134 | lpfc_sli_brdready(phba,HS_FFRDY | HS_MBRDY); | ||
135 | complete((struct completion *)(evtp->evt_arg2)); | ||
136 | break; | ||
137 | case LPFC_EVT_WARM_START: | ||
138 | if (phba->hba_state >= LPFC_LINK_DOWN) | ||
139 | lpfc_offline(phba); | ||
140 | lpfc_sli_brdreset(phba); | ||
141 | lpfc_hba_down_post(phba); | ||
142 | *(int *)(evtp->evt_arg1) = | ||
143 | lpfc_sli_brdready(phba, HS_MBRDY); | ||
144 | complete((struct completion *)(evtp->evt_arg2)); | ||
145 | break; | ||
146 | case LPFC_EVT_KILL: | ||
147 | if (phba->hba_state >= LPFC_LINK_DOWN) | ||
148 | lpfc_offline(phba); | ||
149 | *(int *)(evtp->evt_arg1) = lpfc_sli_brdkill(phba); | ||
128 | complete((struct completion *)(evtp->evt_arg2)); | 150 | complete((struct completion *)(evtp->evt_arg2)); |
129 | break; | 151 | break; |
130 | } | 152 | } |
@@ -287,6 +309,10 @@ lpfc_linkdown(struct lpfc_hba * phba) | |||
287 | LPFC_MBOXQ_t *mb; | 309 | LPFC_MBOXQ_t *mb; |
288 | int rc, i; | 310 | int rc, i; |
289 | 311 | ||
312 | if (phba->hba_state == LPFC_LINK_DOWN) { | ||
313 | return 0; | ||
314 | } | ||
315 | |||
290 | psli = &phba->sli; | 316 | psli = &phba->sli; |
291 | 317 | ||
292 | /* sysfs or selective reset may call this routine to clean up */ | 318 | /* sysfs or selective reset may call this routine to clean up */ |