diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-11-28 11:41:15 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 20:14:08 -0500 |
commit | 1de933f35b17622f977eff1630eb1f2c92e9450c (patch) | |
tree | 6524603eee767c6be140e1647b6fed0a44f15267 /drivers/scsi/lpfc/lpfc_init.c | |
parent | 0a21ef1e603096a8f57fcd7fa0b8b53e7147d3b9 (diff) |
[SCSI] lpfc 8.1.1: Miscellaneous Cleanups
Miscellaneous Cleanups:
- Remove ProgType READ_REV mailbox command value check in lpfc_config_port_prep.
- Convert simple printk to an lpfc_printf_log in queuecommand.
- Modify lpfc_abort_handler message 0749 to display more accurate text and data.
- Minor style cleanup: fix 3 long lines in lpfc_hw.h
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_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 07498118359d..3eebe663a2e5 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -126,34 +126,26 @@ lpfc_config_port_prep(struct lpfc_hba * phba) | |||
126 | return -ERESTART; | 126 | return -ERESTART; |
127 | } | 127 | } |
128 | 128 | ||
129 | /* The HBA's current state is provided by the ProgType and rr fields. | 129 | /* |
130 | * Read and check the value of these fields before continuing to config | 130 | * The value of rr must be 1 since the driver set the cv field to 1. |
131 | * this port. | 131 | * This setting requires the FW to set all revision fields. |
132 | */ | 132 | */ |
133 | if (mb->un.varRdRev.rr == 0 || mb->un.varRdRev.un.b.ProgType != 2) { | 133 | if (mb->un.varRdRev.rr == 0) { |
134 | /* Old firmware */ | ||
135 | vp->rev.rBit = 0; | 134 | vp->rev.rBit = 0; |
136 | lpfc_printf_log(phba, | 135 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
137 | KERN_ERR, | 136 | "%d:0440 Adapter failed to init, READ_REV has " |
138 | LOG_INIT, | 137 | "missing revision information.\n", |
139 | "%d:0440 Adapter failed to init, mbxCmd x%x " | 138 | phba->brd_no); |
140 | "READ_REV detected outdated firmware" | ||
141 | "Data: x%x\n", | ||
142 | phba->brd_no, | ||
143 | mb->mbxCommand, 0); | ||
144 | mempool_free(pmb, phba->mbox_mem_pool); | 139 | mempool_free(pmb, phba->mbox_mem_pool); |
145 | return -ERESTART; | 140 | return -ERESTART; |
146 | } else { | ||
147 | vp->rev.rBit = 1; | ||
148 | vp->rev.sli1FwRev = mb->un.varRdRev.sli1FwRev; | ||
149 | memcpy(vp->rev.sli1FwName, | ||
150 | (char*)mb->un.varRdRev.sli1FwName, 16); | ||
151 | vp->rev.sli2FwRev = mb->un.varRdRev.sli2FwRev; | ||
152 | memcpy(vp->rev.sli2FwName, | ||
153 | (char *)mb->un.varRdRev.sli2FwName, 16); | ||
154 | } | 141 | } |
155 | 142 | ||
156 | /* Save information as VPD data */ | 143 | /* Save information as VPD data */ |
144 | vp->rev.rBit = 1; | ||
145 | vp->rev.sli1FwRev = mb->un.varRdRev.sli1FwRev; | ||
146 | memcpy(vp->rev.sli1FwName, (char*) mb->un.varRdRev.sli1FwName, 16); | ||
147 | vp->rev.sli2FwRev = mb->un.varRdRev.sli2FwRev; | ||
148 | memcpy(vp->rev.sli2FwName, (char *) mb->un.varRdRev.sli2FwName, 16); | ||
157 | vp->rev.biuRev = mb->un.varRdRev.biuRev; | 149 | vp->rev.biuRev = mb->un.varRdRev.biuRev; |
158 | vp->rev.smRev = mb->un.varRdRev.smRev; | 150 | vp->rev.smRev = mb->un.varRdRev.smRev; |
159 | vp->rev.smFwRev = mb->un.varRdRev.un.smFwRev; | 151 | vp->rev.smFwRev = mb->un.varRdRev.un.smFwRev; |