diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_sup.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 32583bbb487f..cf2a6bc444d2 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -38,7 +38,7 @@ void | |||
38 | qla2x00_lock_nvram_access(scsi_qla_host_t *ha) | 38 | qla2x00_lock_nvram_access(scsi_qla_host_t *ha) |
39 | { | 39 | { |
40 | uint16_t data; | 40 | uint16_t data; |
41 | device_reg_t __iomem *reg = ha->iobase; | 41 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
42 | 42 | ||
43 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) { | 43 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) { |
44 | data = RD_REG_WORD(®->nvram); | 44 | data = RD_REG_WORD(®->nvram); |
@@ -70,7 +70,7 @@ qla2x00_lock_nvram_access(scsi_qla_host_t *ha) | |||
70 | void | 70 | void |
71 | qla2x00_unlock_nvram_access(scsi_qla_host_t *ha) | 71 | qla2x00_unlock_nvram_access(scsi_qla_host_t *ha) |
72 | { | 72 | { |
73 | device_reg_t __iomem *reg = ha->iobase; | 73 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
74 | 74 | ||
75 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) { | 75 | if (!IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA2300(ha)) { |
76 | WRT_REG_WORD(®->u.isp2300.host_semaphore, 0); | 76 | WRT_REG_WORD(®->u.isp2300.host_semaphore, 0); |
@@ -85,11 +85,9 @@ qla2x00_unlock_nvram_access(scsi_qla_host_t *ha) | |||
85 | void | 85 | void |
86 | qla2x00_release_nvram_protection(scsi_qla_host_t *ha) | 86 | qla2x00_release_nvram_protection(scsi_qla_host_t *ha) |
87 | { | 87 | { |
88 | device_reg_t __iomem *reg; | 88 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
89 | uint32_t word; | 89 | uint32_t word; |
90 | 90 | ||
91 | reg = ha->iobase; | ||
92 | |||
93 | /* Release NVRAM write protection. */ | 91 | /* Release NVRAM write protection. */ |
94 | if (IS_QLA2322(ha) || IS_QLA6322(ha)) { | 92 | if (IS_QLA2322(ha) || IS_QLA6322(ha)) { |
95 | /* Write enable. */ | 93 | /* Write enable. */ |
@@ -161,7 +159,7 @@ qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint32_t addr, uint16_t data) | |||
161 | int count; | 159 | int count; |
162 | uint16_t word; | 160 | uint16_t word; |
163 | uint32_t nv_cmd; | 161 | uint32_t nv_cmd; |
164 | device_reg_t __iomem *reg = ha->iobase; | 162 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
165 | 163 | ||
166 | qla2x00_nv_write(ha, NVR_DATA_OUT); | 164 | qla2x00_nv_write(ha, NVR_DATA_OUT); |
167 | qla2x00_nv_write(ha, 0); | 165 | qla2x00_nv_write(ha, 0); |
@@ -223,7 +221,7 @@ static uint16_t | |||
223 | qla2x00_nvram_request(scsi_qla_host_t *ha, uint32_t nv_cmd) | 221 | qla2x00_nvram_request(scsi_qla_host_t *ha, uint32_t nv_cmd) |
224 | { | 222 | { |
225 | uint8_t cnt; | 223 | uint8_t cnt; |
226 | device_reg_t __iomem *reg = ha->iobase; | 224 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
227 | uint16_t data = 0; | 225 | uint16_t data = 0; |
228 | uint16_t reg_data; | 226 | uint16_t reg_data; |
229 | 227 | ||
@@ -265,7 +263,7 @@ qla2x00_nvram_request(scsi_qla_host_t *ha, uint32_t nv_cmd) | |||
265 | static void | 263 | static void |
266 | qla2x00_nv_deselect(scsi_qla_host_t *ha) | 264 | qla2x00_nv_deselect(scsi_qla_host_t *ha) |
267 | { | 265 | { |
268 | device_reg_t __iomem *reg = ha->iobase; | 266 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
269 | 267 | ||
270 | WRT_REG_WORD(®->nvram, NVR_DESELECT); | 268 | WRT_REG_WORD(®->nvram, NVR_DESELECT); |
271 | RD_REG_WORD(®->nvram); /* PCI Posting. */ | 269 | RD_REG_WORD(®->nvram); /* PCI Posting. */ |
@@ -280,7 +278,7 @@ qla2x00_nv_deselect(scsi_qla_host_t *ha) | |||
280 | static void | 278 | static void |
281 | qla2x00_nv_write(scsi_qla_host_t *ha, uint16_t data) | 279 | qla2x00_nv_write(scsi_qla_host_t *ha, uint16_t data) |
282 | { | 280 | { |
283 | device_reg_t __iomem *reg = ha->iobase; | 281 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
284 | 282 | ||
285 | WRT_REG_WORD(®->nvram, data | NVR_SELECT | NVR_WRT_ENABLE); | 283 | WRT_REG_WORD(®->nvram, data | NVR_SELECT | NVR_WRT_ENABLE); |
286 | RD_REG_WORD(®->nvram); /* PCI Posting. */ | 284 | RD_REG_WORD(®->nvram); /* PCI Posting. */ |