aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_fw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_fw.c')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_fw.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw.c b/drivers/scsi/sym53c8xx_2/sym_fw.c
index 9916a2a22558..190770bdc194 100644
--- a/drivers/scsi/sym53c8xx_2/sym_fw.c
+++ b/drivers/scsi/sym53c8xx_2/sym_fw.c
@@ -104,8 +104,9 @@ static struct sym_fwz_ofs sym_fw2z_ofs = {
104 * Patch routine for firmware #1. 104 * Patch routine for firmware #1.
105 */ 105 */
106static void 106static void
107sym_fw1_patch(struct sym_hcb *np) 107sym_fw1_patch(struct Scsi_Host *shost)
108{ 108{
109 struct sym_hcb *np = sym_get_hcb(shost);
109 struct sym_fw1a_scr *scripta0; 110 struct sym_fw1a_scr *scripta0;
110 struct sym_fw1b_scr *scriptb0; 111 struct sym_fw1b_scr *scriptb0;
111 112
@@ -145,8 +146,11 @@ sym_fw1_patch(struct sym_hcb *np)
145 * Patch routine for firmware #2. 146 * Patch routine for firmware #2.
146 */ 147 */
147static void 148static void
148sym_fw2_patch(struct sym_hcb *np) 149sym_fw2_patch(struct Scsi_Host *shost)
149{ 150{
151 struct sym_data *sym_data = shost_priv(shost);
152 struct pci_dev *pdev = sym_data->pdev;
153 struct sym_hcb *np = sym_data->ncb;
150 struct sym_fw2a_scr *scripta0; 154 struct sym_fw2a_scr *scripta0;
151 struct sym_fw2b_scr *scriptb0; 155 struct sym_fw2b_scr *scriptb0;
152 156
@@ -167,7 +171,7 @@ sym_fw2_patch(struct sym_hcb *np)
167 * Remove useless 64 bit DMA specific SCRIPTS, 171 * Remove useless 64 bit DMA specific SCRIPTS,
168 * when this feature is not available. 172 * when this feature is not available.
169 */ 173 */
170 if (!np->use_dac) { 174 if (!use_dac(np)) {
171 scripta0->is_dmap_dirty[0] = cpu_to_scr(SCR_NO_OP); 175 scripta0->is_dmap_dirty[0] = cpu_to_scr(SCR_NO_OP);
172 scripta0->is_dmap_dirty[1] = 0; 176 scripta0->is_dmap_dirty[1] = 0;
173 scripta0->is_dmap_dirty[2] = cpu_to_scr(SCR_NO_OP); 177 scripta0->is_dmap_dirty[2] = cpu_to_scr(SCR_NO_OP);
@@ -205,14 +209,14 @@ sym_fw2_patch(struct sym_hcb *np)
205 * Remove a couple of work-arounds specific to C1010 if 209 * Remove a couple of work-arounds specific to C1010 if
206 * they are not desirable. See `sym_fw2.h' for more details. 210 * they are not desirable. See `sym_fw2.h' for more details.
207 */ 211 */
208 if (!(np->device_id == PCI_DEVICE_ID_LSI_53C1010_66 && 212 if (!(pdev->device == PCI_DEVICE_ID_LSI_53C1010_66 &&
209 np->revision_id < 0x1 && 213 pdev->revision < 0x1 &&
210 np->pciclk_khz < 60000)) { 214 np->pciclk_khz < 60000)) {
211 scripta0->datao_phase[0] = cpu_to_scr(SCR_NO_OP); 215 scripta0->datao_phase[0] = cpu_to_scr(SCR_NO_OP);
212 scripta0->datao_phase[1] = cpu_to_scr(0); 216 scripta0->datao_phase[1] = cpu_to_scr(0);
213 } 217 }
214 if (!(np->device_id == PCI_DEVICE_ID_LSI_53C1010_33 && 218 if (!(pdev->device == PCI_DEVICE_ID_LSI_53C1010_33 /* &&
215 /* np->revision_id < 0xff */ 1)) { 219 pdev->revision < 0xff */)) {
216 scripta0->sel_done[0] = cpu_to_scr(SCR_NO_OP); 220 scripta0->sel_done[0] = cpu_to_scr(SCR_NO_OP);
217 scripta0->sel_done[1] = cpu_to_scr(0); 221 scripta0->sel_done[1] = cpu_to_scr(0);
218 } 222 }