diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 33a3c13fd89..ee9d4015243 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -244,12 +244,6 @@ qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj, | |||
244 | if (ha->optrom_state != QLA_SWAITING) | 244 | if (ha->optrom_state != QLA_SWAITING) |
245 | break; | 245 | break; |
246 | 246 | ||
247 | if (start & 0xfff) { | ||
248 | qla_printk(KERN_WARNING, ha, | ||
249 | "Invalid start region 0x%x/0x%x.\n", start, size); | ||
250 | return -EINVAL; | ||
251 | } | ||
252 | |||
253 | ha->optrom_region_start = start; | 247 | ha->optrom_region_start = start; |
254 | ha->optrom_region_size = start + size > ha->optrom_size ? | 248 | ha->optrom_region_size = start + size > ha->optrom_size ? |
255 | ha->optrom_size - start : size; | 249 | ha->optrom_size - start : size; |
@@ -303,8 +297,7 @@ qla2x00_sysfs_write_optrom_ctl(struct kobject *kobj, | |||
303 | else if (start == (ha->flt_region_boot * 4) || | 297 | else if (start == (ha->flt_region_boot * 4) || |
304 | start == (ha->flt_region_fw * 4)) | 298 | start == (ha->flt_region_fw * 4)) |
305 | valid = 1; | 299 | valid = 1; |
306 | else if ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && | 300 | else if (IS_QLA25XX(ha) || IS_QLA81XX(ha)) |
307 | start == (ha->flt_region_vpd_nvram * 4)) | ||
308 | valid = 1; | 301 | valid = 1; |
309 | if (!valid) { | 302 | if (!valid) { |
310 | qla_printk(KERN_WARNING, ha, | 303 | qla_printk(KERN_WARNING, ha, |
@@ -1265,13 +1258,6 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) | |||
1265 | test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) | 1258 | test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) |
1266 | msleep(1000); | 1259 | msleep(1000); |
1267 | 1260 | ||
1268 | if (ha->mqenable) { | ||
1269 | if (qla25xx_delete_queues(vha, 0) != QLA_SUCCESS) | ||
1270 | qla_printk(KERN_WARNING, ha, | ||
1271 | "Queue delete failed.\n"); | ||
1272 | vha->req_ques[0] = ha->req_q_map[0]->id; | ||
1273 | } | ||
1274 | |||
1275 | qla24xx_disable_vp(vha); | 1261 | qla24xx_disable_vp(vha); |
1276 | 1262 | ||
1277 | fc_remove_host(vha->host); | 1263 | fc_remove_host(vha->host); |
@@ -1293,6 +1279,12 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) | |||
1293 | vha->host_no, vha->vp_idx, vha)); | 1279 | vha->host_no, vha->vp_idx, vha)); |
1294 | } | 1280 | } |
1295 | 1281 | ||
1282 | if (ha->mqenable) { | ||
1283 | if (qla25xx_delete_queues(vha, 0) != QLA_SUCCESS) | ||
1284 | qla_printk(KERN_WARNING, ha, | ||
1285 | "Queue delete failed.\n"); | ||
1286 | } | ||
1287 | |||
1296 | scsi_host_put(vha->host); | 1288 | scsi_host_put(vha->host); |
1297 | qla_printk(KERN_INFO, ha, "vport %d deleted\n", id); | 1289 | qla_printk(KERN_INFO, ha, "vport %d deleted\n", id); |
1298 | return 0; | 1290 | return 0; |