Hi Joe, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on scsi/for-next] [also build test WARNING on next-20190306] [cannot apply to v5.0] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190312-172400 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' All warnings (new ones prefixed by >>): >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse: expected restricted __le32 [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse: got unsigned long [assigned] [usertype] end drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse: expected restricted __le32 [usertype] start_addr drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse: got unsigned long [assigned] [usertype] start drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse: expected restricted __le32 [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse: got unsigned long [assigned] [usertype] end drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse: expected restricted __le32 [usertype] start_addr drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse: got unsigned long [assigned] [usertype] start drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse: expected restricted __le32 [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse: got unsigned long [assigned] [usertype] end drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse: expected restricted __le32 [usertype] start_addr drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse: got unsigned long [assigned] [usertype] start drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse: expected restricted __le32 [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse: got unsigned long [assigned] [usertype] end >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:557:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:558:24: sparse: warning: cast to restricted __le32 >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse: warning: incorrect type in initializer (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse: expected unsigned long [usertype] addr drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse: got restricted __le32 [usertype] addr drivers/scsi/qla2xxx/qla_tmpl.c:579:31: sparse: warning: incorrect type in initializer (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:579:31: sparse: expected unsigned long [usertype] data drivers/scsi/qla2xxx/qla_tmpl.c:579:31: sparse: got restricted __le32 [usertype] data >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:637:22: sparse: warning: cast to restricted __le32 >> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer sparse warnings: (new ones prefixed by >>) drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse: warning: incorrect type in assignment (different base types) >> drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse: expected restricted __le32 [usertype] end_addr >> drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse: got unsigned long [assigned] [usertype] end drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse: warning: incorrect type in assignment (different base types) >> drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse: expected restricted __le32 [usertype] start_addr >> drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse: got unsigned long [assigned] [usertype] start drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse: expected restricted __le32 [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse: got unsigned long [assigned] [usertype] end drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse: expected restricted __le32 [usertype] start_addr drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse: got unsigned long [assigned] [usertype] start drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse: expected restricted __le32 [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse: got unsigned long [assigned] [usertype] end drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse: expected restricted __le32 [usertype] start_addr drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse: got unsigned long [assigned] [usertype] start drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse: warning: incorrect type in assignment (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse: expected restricted __le32 [usertype] end_addr drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse: got unsigned long [assigned] [usertype] end drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:557:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:558:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse: warning: incorrect type in initializer (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse: expected unsigned long [usertype] addr drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse: got restricted __le32 [usertype] addr drivers/scsi/qla2xxx/qla_tmpl.c:579:31: sparse: warning: incorrect type in initializer (different base types) drivers/scsi/qla2xxx/qla_tmpl.c:579:31: sparse: expected unsigned long [usertype] data drivers/scsi/qla2xxx/qla_tmpl.c:579:31: sparse: got restricted __le32 [usertype] data drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:637:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:784:22: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 degrades to integer drivers/scsi/qla2xxx/qla_tmpl.c:850:24: sparse: warning: cast to restricted __le32 drivers/scsi/qla2xxx/qla_tmpl.c:943:19: sparse: warning: restricted __le32 degrades to integer vim +137 drivers/scsi/qla2xxx/qla_tmpl.c f73cb695 Chad Dupuis 2014-02-26 133 64f61d99 Joe Carnuccio 2019-02-15 134 static inline struct qla27xx_fwdt_entry * 64f61d99 Joe Carnuccio 2019-02-15 135 qla27xx_next_entry(struct qla27xx_fwdt_entry *ent) 64f61d99 Joe Carnuccio 2019-02-15 136 { 64f61d99 Joe Carnuccio 2019-02-15 @137 return (void *)ent + ent->hdr.size; 64f61d99 Joe Carnuccio 2019-02-15 138 } 64f61d99 Joe Carnuccio 2019-02-15 139 64f61d99 Joe Carnuccio 2019-02-15 140 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 141 qla27xx_fwdt_entry_t0(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 142 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 143 { f73cb695 Chad Dupuis 2014-02-26 144 ql_dbg(ql_dbg_misc, vha, 0xd100, f73cb695 Chad Dupuis 2014-02-26 145 "%s: nop [%lx]\n", __func__, *len); f73cb695 Chad Dupuis 2014-02-26 146 qla27xx_skip_entry(ent, buf); f73cb695 Chad Dupuis 2014-02-26 147 64f61d99 Joe Carnuccio 2019-02-15 148 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 149 } f73cb695 Chad Dupuis 2014-02-26 150 64f61d99 Joe Carnuccio 2019-02-15 151 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 152 qla27xx_fwdt_entry_t255(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 153 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 154 { f73cb695 Chad Dupuis 2014-02-26 155 ql_dbg(ql_dbg_misc, vha, 0xd1ff, f73cb695 Chad Dupuis 2014-02-26 156 "%s: end [%lx]\n", __func__, *len); f73cb695 Chad Dupuis 2014-02-26 157 qla27xx_skip_entry(ent, buf); f73cb695 Chad Dupuis 2014-02-26 158 f73cb695 Chad Dupuis 2014-02-26 159 /* terminate */ 64f61d99 Joe Carnuccio 2019-02-15 160 return NULL; f73cb695 Chad Dupuis 2014-02-26 161 } f73cb695 Chad Dupuis 2014-02-26 162 64f61d99 Joe Carnuccio 2019-02-15 163 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 164 qla27xx_fwdt_entry_t256(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 165 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 166 { f73cb695 Chad Dupuis 2014-02-26 167 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); fb5b442c Joe Carnuccio 2019-03-11 168 ulong addr = le32_to_cpu(ent->t256.base_addr); fb5b442c Joe Carnuccio 2019-03-11 169 uint offset = ent->t256.pci_offset; fb5b442c Joe Carnuccio 2019-03-11 170 ulong count = le16_to_cpu(ent->t256.reg_count); fb5b442c Joe Carnuccio 2019-03-11 171 uint width = ent->t256.reg_width; f73cb695 Chad Dupuis 2014-02-26 172 f73cb695 Chad Dupuis 2014-02-26 173 ql_dbg(ql_dbg_misc, vha, 0xd200, f73cb695 Chad Dupuis 2014-02-26 174 "%s: rdio t1 [%lx]\n", __func__, *len); fb5b442c Joe Carnuccio 2019-03-11 175 qla27xx_read_window(reg, addr, offset, count, width, buf, len); f73cb695 Chad Dupuis 2014-02-26 176 64f61d99 Joe Carnuccio 2019-02-15 177 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 178 } f73cb695 Chad Dupuis 2014-02-26 179 64f61d99 Joe Carnuccio 2019-02-15 180 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 181 qla27xx_fwdt_entry_t257(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 182 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 183 { f73cb695 Chad Dupuis 2014-02-26 184 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); fb5b442c Joe Carnuccio 2019-03-11 185 ulong addr = le32_to_cpu(ent->t257.base_addr); fb5b442c Joe Carnuccio 2019-03-11 186 uint offset = ent->t257.pci_offset; fb5b442c Joe Carnuccio 2019-03-11 187 ulong data = le32_to_cpu(ent->t257.write_data); f73cb695 Chad Dupuis 2014-02-26 188 f73cb695 Chad Dupuis 2014-02-26 189 ql_dbg(ql_dbg_misc, vha, 0xd201, f73cb695 Chad Dupuis 2014-02-26 190 "%s: wrio t1 [%lx]\n", __func__, *len); fb5b442c Joe Carnuccio 2019-03-11 191 qla27xx_write_reg(reg, IOBASE(reg), addr, buf); fb5b442c Joe Carnuccio 2019-03-11 192 qla27xx_write_reg(reg, offset, data, buf); f73cb695 Chad Dupuis 2014-02-26 193 64f61d99 Joe Carnuccio 2019-02-15 194 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 195 } f73cb695 Chad Dupuis 2014-02-26 196 64f61d99 Joe Carnuccio 2019-02-15 197 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 198 qla27xx_fwdt_entry_t258(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 199 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 200 { f73cb695 Chad Dupuis 2014-02-26 201 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); fb5b442c Joe Carnuccio 2019-03-11 202 uint banksel = ent->t258.banksel_offset; fb5b442c Joe Carnuccio 2019-03-11 203 ulong bank = le32_to_cpu(ent->t258.bank); fb5b442c Joe Carnuccio 2019-03-11 204 ulong addr = le32_to_cpu(ent->t258.base_addr); fb5b442c Joe Carnuccio 2019-03-11 205 uint offset = ent->t258.pci_offset; fb5b442c Joe Carnuccio 2019-03-11 206 uint count = le16_to_cpu(ent->t258.reg_count); fb5b442c Joe Carnuccio 2019-03-11 207 uint width = ent->t258.reg_width; f73cb695 Chad Dupuis 2014-02-26 208 f73cb695 Chad Dupuis 2014-02-26 209 ql_dbg(ql_dbg_misc, vha, 0xd202, f73cb695 Chad Dupuis 2014-02-26 210 "%s: rdio t2 [%lx]\n", __func__, *len); fb5b442c Joe Carnuccio 2019-03-11 211 qla27xx_write_reg(reg, banksel, bank, buf); fb5b442c Joe Carnuccio 2019-03-11 212 qla27xx_read_window(reg, addr, offset, count, width, buf, len); f73cb695 Chad Dupuis 2014-02-26 213 64f61d99 Joe Carnuccio 2019-02-15 214 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 215 } f73cb695 Chad Dupuis 2014-02-26 216 64f61d99 Joe Carnuccio 2019-02-15 217 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 218 qla27xx_fwdt_entry_t259(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 219 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 220 { f73cb695 Chad Dupuis 2014-02-26 221 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); fb5b442c Joe Carnuccio 2019-03-11 222 ulong addr = le32_to_cpu(ent->t259.base_addr); fb5b442c Joe Carnuccio 2019-03-11 223 uint banksel = ent->t259.banksel_offset; fb5b442c Joe Carnuccio 2019-03-11 224 ulong bank = le32_to_cpu(ent->t259.bank); fb5b442c Joe Carnuccio 2019-03-11 225 uint offset = ent->t259.pci_offset; fb5b442c Joe Carnuccio 2019-03-11 226 ulong data = le32_to_cpu(ent->t259.write_data); f73cb695 Chad Dupuis 2014-02-26 227 f73cb695 Chad Dupuis 2014-02-26 228 ql_dbg(ql_dbg_misc, vha, 0xd203, f73cb695 Chad Dupuis 2014-02-26 229 "%s: wrio t2 [%lx]\n", __func__, *len); fb5b442c Joe Carnuccio 2019-03-11 230 qla27xx_write_reg(reg, IOBASE(reg), addr, buf); fb5b442c Joe Carnuccio 2019-03-11 231 qla27xx_write_reg(reg, banksel, bank, buf); fb5b442c Joe Carnuccio 2019-03-11 232 qla27xx_write_reg(reg, offset, data, buf); f73cb695 Chad Dupuis 2014-02-26 233 64f61d99 Joe Carnuccio 2019-02-15 234 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 235 } f73cb695 Chad Dupuis 2014-02-26 236 64f61d99 Joe Carnuccio 2019-02-15 237 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 238 qla27xx_fwdt_entry_t260(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 239 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 240 { f73cb695 Chad Dupuis 2014-02-26 241 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); fb5b442c Joe Carnuccio 2019-03-11 242 uint offset = ent->t260.pci_offset; f73cb695 Chad Dupuis 2014-02-26 243 f73cb695 Chad Dupuis 2014-02-26 244 ql_dbg(ql_dbg_misc, vha, 0xd204, f73cb695 Chad Dupuis 2014-02-26 245 "%s: rdpci [%lx]\n", __func__, *len); fb5b442c Joe Carnuccio 2019-03-11 246 qla27xx_insert32(offset, buf, len); fb5b442c Joe Carnuccio 2019-03-11 247 qla27xx_read_reg(reg, offset, buf, len); f73cb695 Chad Dupuis 2014-02-26 248 64f61d99 Joe Carnuccio 2019-02-15 249 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 250 } f73cb695 Chad Dupuis 2014-02-26 251 64f61d99 Joe Carnuccio 2019-02-15 252 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 253 qla27xx_fwdt_entry_t261(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 254 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 255 { f73cb695 Chad Dupuis 2014-02-26 256 struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha); fb5b442c Joe Carnuccio 2019-03-11 257 uint offset = ent->t261.pci_offset; fb5b442c Joe Carnuccio 2019-03-11 258 ulong data = le32_to_cpu(ent->t261.write_data); f73cb695 Chad Dupuis 2014-02-26 259 f73cb695 Chad Dupuis 2014-02-26 260 ql_dbg(ql_dbg_misc, vha, 0xd205, f73cb695 Chad Dupuis 2014-02-26 261 "%s: wrpci [%lx]\n", __func__, *len); fb5b442c Joe Carnuccio 2019-03-11 262 qla27xx_write_reg(reg, offset, data, buf); f73cb695 Chad Dupuis 2014-02-26 263 64f61d99 Joe Carnuccio 2019-02-15 264 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 265 } f73cb695 Chad Dupuis 2014-02-26 266 64f61d99 Joe Carnuccio 2019-02-15 267 static struct qla27xx_fwdt_entry * f73cb695 Chad Dupuis 2014-02-26 268 qla27xx_fwdt_entry_t262(struct scsi_qla_host *vha, f73cb695 Chad Dupuis 2014-02-26 269 struct qla27xx_fwdt_entry *ent, void *buf, ulong *len) f73cb695 Chad Dupuis 2014-02-26 270 { fb5b442c Joe Carnuccio 2019-03-11 271 uint area = ent->t262.ram_area; fb5b442c Joe Carnuccio 2019-03-11 272 ulong start = le32_to_cpu(ent->t262.start_addr); fb5b442c Joe Carnuccio 2019-03-11 273 ulong end = le32_to_cpu(ent->t262.end_addr); f73cb695 Chad Dupuis 2014-02-26 274 ulong dwords; f73cb695 Chad Dupuis 2014-02-26 275 f73cb695 Chad Dupuis 2014-02-26 276 ql_dbg(ql_dbg_misc, vha, 0xd206, f73cb695 Chad Dupuis 2014-02-26 277 "%s: rdram(%x) [%lx]\n", __func__, ent->t262.ram_area, *len); f73cb695 Chad Dupuis 2014-02-26 278 fb5b442c Joe Carnuccio 2019-03-11 279 if (area == T262_RAM_AREA_CRITICAL_RAM) { f73cb695 Chad Dupuis 2014-02-26 280 ; fb5b442c Joe Carnuccio 2019-03-11 281 } else if (area == T262_RAM_AREA_EXTERNAL_RAM) { f73cb695 Chad Dupuis 2014-02-26 282 end = vha->hw->fw_memory_size; f73cb695 Chad Dupuis 2014-02-26 283 if (buf) f73cb695 Chad Dupuis 2014-02-26 @284 ent->t262.end_addr = end; fb5b442c Joe Carnuccio 2019-03-11 285 } else if (area == T262_RAM_AREA_SHARED_RAM) { f73cb695 Chad Dupuis 2014-02-26 286 start = vha->hw->fw_shared_ram_start; f73cb695 Chad Dupuis 2014-02-26 287 end = vha->hw->fw_shared_ram_end; f73cb695 Chad Dupuis 2014-02-26 288 if (buf) { f73cb695 Chad Dupuis 2014-02-26 @289 ent->t262.start_addr = start; f73cb695 Chad Dupuis 2014-02-26 290 ent->t262.end_addr = end; f73cb695 Chad Dupuis 2014-02-26 291 } fb5b442c Joe Carnuccio 2019-03-11 292 } else if (area == T262_RAM_AREA_DDR_RAM) { ad1ef177 Joe Carnuccio 2016-07-06 293 start = vha->hw->fw_ddr_ram_start; ad1ef177 Joe Carnuccio 2016-07-06 294 end = vha->hw->fw_ddr_ram_end; ad1ef177 Joe Carnuccio 2016-07-06 295 if (buf) { ad1ef177 Joe Carnuccio 2016-07-06 296 ent->t262.start_addr = start; ad1ef177 Joe Carnuccio 2016-07-06 297 ent->t262.end_addr = end; ad1ef177 Joe Carnuccio 2016-07-06 298 } fb5b442c Joe Carnuccio 2019-03-11 299 } else if (area == T262_RAM_AREA_MISC) { 64f61d99 Joe Carnuccio 2019-02-15 300 if (buf) { 64f61d99 Joe Carnuccio 2019-02-15 301 ent->t262.start_addr = start; 64f61d99 Joe Carnuccio 2019-02-15 302 ent->t262.end_addr = end; 64f61d99 Joe Carnuccio 2019-02-15 303 } f73cb695 Chad Dupuis 2014-02-26 304 } else { f73cb695 Chad Dupuis 2014-02-26 305 ql_dbg(ql_dbg_misc, vha, 0xd022, fb5b442c Joe Carnuccio 2019-03-11 306 "%s: unknown area %x\n", __func__, area); f73cb695 Chad Dupuis 2014-02-26 307 qla27xx_skip_entry(ent, buf); f73cb695 Chad Dupuis 2014-02-26 308 goto done; f73cb695 Chad Dupuis 2014-02-26 309 } f73cb695 Chad Dupuis 2014-02-26 310 ce6c668b Joe Carnuccio 2017-05-24 311 if (end < start || start == 0 || end == 0) { f73cb695 Chad Dupuis 2014-02-26 312 ql_dbg(ql_dbg_misc, vha, 0xd023, fb5b442c Joe Carnuccio 2019-03-11 313 "%s: unusable range (start=%lx end=%lx)\n", fb5b442c Joe Carnuccio 2019-03-11 314 __func__, start, end); f73cb695 Chad Dupuis 2014-02-26 315 qla27xx_skip_entry(ent, buf); f73cb695 Chad Dupuis 2014-02-26 316 goto done; f73cb695 Chad Dupuis 2014-02-26 317 } f73cb695 Chad Dupuis 2014-02-26 318 f73cb695 Chad Dupuis 2014-02-26 319 dwords = end - start + 1; f73cb695 Chad Dupuis 2014-02-26 320 if (buf) { f73cb695 Chad Dupuis 2014-02-26 321 buf += *len; f73cb695 Chad Dupuis 2014-02-26 322 qla24xx_dump_ram(vha->hw, start, buf, dwords, &buf); f73cb695 Chad Dupuis 2014-02-26 323 } f73cb695 Chad Dupuis 2014-02-26 324 *len += dwords * sizeof(uint32_t); f73cb695 Chad Dupuis 2014-02-26 325 done: 64f61d99 Joe Carnuccio 2019-02-15 326 return qla27xx_next_entry(ent); f73cb695 Chad Dupuis 2014-02-26 327 } f73cb695 Chad Dupuis 2014-02-26 328 :::::: The code at line 137 was first introduced by commit :::::: 64f61d9944839b62dea0ab6b0cafb4fb36c1f3f4 scsi: qla2xxx: Add new FW dump template entry types :::::: TO: Joe Carnuccio <joe.carnuccio@xxxxxxxxxx> :::::: CC: Martin K. Petersen <martin.petersen@xxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip