diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_sup.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 6d6c02129a53..c538ee1b1a31 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -547,7 +547,7 @@ qla2xxx_find_flt_start(scsi_qla_host_t *vha, uint32_t *start) | |||
547 | uint16_t cnt, chksum, *wptr; | 547 | uint16_t cnt, chksum, *wptr; |
548 | struct qla_flt_location *fltl; | 548 | struct qla_flt_location *fltl; |
549 | struct qla_hw_data *ha = vha->hw; | 549 | struct qla_hw_data *ha = vha->hw; |
550 | struct req_que *req = ha->req; | 550 | struct req_que *req = ha->req_q_map[0]; |
551 | 551 | ||
552 | /* | 552 | /* |
553 | * FLT-location structure resides after the last PCI region. | 553 | * FLT-location structure resides after the last PCI region. |
@@ -624,7 +624,7 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr) | |||
624 | struct qla_flt_header *flt; | 624 | struct qla_flt_header *flt; |
625 | struct qla_flt_region *region; | 625 | struct qla_flt_region *region; |
626 | struct qla_hw_data *ha = vha->hw; | 626 | struct qla_hw_data *ha = vha->hw; |
627 | struct req_que *req = ha->req; | 627 | struct req_que *req = ha->req_q_map[0]; |
628 | 628 | ||
629 | ha->flt_region_flt = flt_addr; | 629 | ha->flt_region_flt = flt_addr; |
630 | wptr = (uint16_t *)req->ring; | 630 | wptr = (uint16_t *)req->ring; |
@@ -730,7 +730,7 @@ qla2xxx_get_fdt_info(scsi_qla_host_t *vha) | |||
730 | uint8_t man_id, flash_id; | 730 | uint8_t man_id, flash_id; |
731 | uint16_t mid, fid; | 731 | uint16_t mid, fid; |
732 | struct qla_hw_data *ha = vha->hw; | 732 | struct qla_hw_data *ha = vha->hw; |
733 | struct req_que *req = ha->req; | 733 | struct req_que *req = ha->req_q_map[0]; |
734 | 734 | ||
735 | wptr = (uint16_t *)req->ring; | 735 | wptr = (uint16_t *)req->ring; |
736 | fdt = (struct qla_fdt_layout *)req->ring; | 736 | fdt = (struct qla_fdt_layout *)req->ring; |
@@ -833,6 +833,7 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) | |||
833 | void *data; | 833 | void *data; |
834 | uint16_t *wptr; | 834 | uint16_t *wptr; |
835 | uint16_t cnt, chksum; | 835 | uint16_t cnt, chksum; |
836 | int i; | ||
836 | struct qla_npiv_header hdr; | 837 | struct qla_npiv_header hdr; |
837 | struct qla_npiv_entry *entry; | 838 | struct qla_npiv_entry *entry; |
838 | struct qla_hw_data *ha = vha->hw; | 839 | struct qla_hw_data *ha = vha->hw; |
@@ -876,7 +877,7 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) | |||
876 | 877 | ||
877 | entry = data + sizeof(struct qla_npiv_header); | 878 | entry = data + sizeof(struct qla_npiv_header); |
878 | cnt = le16_to_cpu(hdr.entries); | 879 | cnt = le16_to_cpu(hdr.entries); |
879 | for ( ; cnt; cnt--, entry++) { | 880 | for (i = 0; cnt; cnt--, entry++, i++) { |
880 | uint16_t flags; | 881 | uint16_t flags; |
881 | struct fc_vport_identifiers vid; | 882 | struct fc_vport_identifiers vid; |
882 | struct fc_vport *vport; | 883 | struct fc_vport *vport; |
@@ -894,19 +895,25 @@ qla2xxx_flash_npiv_conf(scsi_qla_host_t *vha) | |||
894 | vid.port_name = wwn_to_u64(entry->port_name); | 895 | vid.port_name = wwn_to_u64(entry->port_name); |
895 | vid.node_name = wwn_to_u64(entry->node_name); | 896 | vid.node_name = wwn_to_u64(entry->node_name); |
896 | 897 | ||
898 | memcpy(&ha->npiv_info[i], entry, sizeof(struct qla_npiv_entry)); | ||
899 | |||
897 | DEBUG2(qla_printk(KERN_DEBUG, ha, "NPIV[%02x]: wwpn=%llx " | 900 | DEBUG2(qla_printk(KERN_DEBUG, ha, "NPIV[%02x]: wwpn=%llx " |
898 | "wwnn=%llx vf_id=0x%x qos=0x%x.\n", cnt, vid.port_name, | 901 | "wwnn=%llx vf_id=0x%x Q_qos=0x%x F_qos=0x%x.\n", cnt, |
899 | vid.node_name, le16_to_cpu(entry->vf_id), | 902 | vid.port_name, vid.node_name, le16_to_cpu(entry->vf_id), |
900 | le16_to_cpu(entry->qos))); | 903 | entry->q_qos, entry->f_qos)); |
901 | 904 | ||
902 | vport = fc_vport_create(vha->host, 0, &vid); | 905 | if (i < QLA_PRECONFIG_VPORTS) { |
903 | if (!vport) | 906 | vport = fc_vport_create(vha->host, 0, &vid); |
904 | qla_printk(KERN_INFO, ha, "NPIV-Config: Failed to " | 907 | if (!vport) |
905 | "create vport [%02x]: wwpn=%llx wwnn=%llx.\n", cnt, | 908 | qla_printk(KERN_INFO, ha, |
906 | vid.port_name, vid.node_name); | 909 | "NPIV-Config: Failed to create vport [%02x]: " |
910 | "wwpn=%llx wwnn=%llx.\n", cnt, | ||
911 | vid.port_name, vid.node_name); | ||
912 | } | ||
907 | } | 913 | } |
908 | done: | 914 | done: |
909 | kfree(data); | 915 | kfree(data); |
916 | ha->npiv_info = NULL; | ||
910 | } | 917 | } |
911 | 918 | ||
912 | static void | 919 | static void |