diff options
author | James Smart <james.smart@emulex.com> | 2014-04-04 13:52:21 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-06-02 12:28:57 -0400 |
commit | f38fa0bb7c4a54dc7eff622adc6fa7cf763d834d (patch) | |
tree | d8893a833e2e532a606a767e72ebae9fc429374f /drivers/scsi/lpfc | |
parent | 0293635ef6234ae813df95d6b3b93a666c69f33d (diff) |
lpfc: Convert runtime references to old xlane cfg param to fof cfg param
Convert runtime references to old xlane cfg param to fof cfg param
Signed-off-by: James Smart <james.smart@emulex.com>
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 12 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 9 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 20 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 7 |
5 files changed, 24 insertions, 26 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 3d6a77e21540..85b2eb0c1851 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -2369,7 +2369,7 @@ lpfc_oas_tgt_store(struct device *dev, struct device_attribute *attr, | |||
2369 | uint8_t wwpn[WWN_SZ]; | 2369 | uint8_t wwpn[WWN_SZ]; |
2370 | int rc; | 2370 | int rc; |
2371 | 2371 | ||
2372 | if (!phba->cfg_EnableXLane) | 2372 | if (!phba->cfg_fof) |
2373 | return -EPERM; | 2373 | return -EPERM; |
2374 | 2374 | ||
2375 | /* count may include a LF at end of string */ | 2375 | /* count may include a LF at end of string */ |
@@ -2437,7 +2437,7 @@ lpfc_oas_vpt_store(struct device *dev, struct device_attribute *attr, | |||
2437 | uint8_t wwpn[WWN_SZ]; | 2437 | uint8_t wwpn[WWN_SZ]; |
2438 | int rc; | 2438 | int rc; |
2439 | 2439 | ||
2440 | if (!phba->cfg_EnableXLane) | 2440 | if (!phba->cfg_fof) |
2441 | return -EPERM; | 2441 | return -EPERM; |
2442 | 2442 | ||
2443 | /* count may include a LF at end of string */ | 2443 | /* count may include a LF at end of string */ |
@@ -2504,7 +2504,7 @@ lpfc_oas_lun_state_store(struct device *dev, struct device_attribute *attr, | |||
2504 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; | 2504 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; |
2505 | int val = 0; | 2505 | int val = 0; |
2506 | 2506 | ||
2507 | if (!phba->cfg_EnableXLane) | 2507 | if (!phba->cfg_fof) |
2508 | return -EPERM; | 2508 | return -EPERM; |
2509 | 2509 | ||
2510 | if (!isdigit(buf[0])) | 2510 | if (!isdigit(buf[0])) |
@@ -2570,7 +2570,7 @@ lpfc_oas_lun_state_set(struct lpfc_hba *phba, uint8_t vpt_wwpn[], | |||
2570 | 2570 | ||
2571 | int rc = 0; | 2571 | int rc = 0; |
2572 | 2572 | ||
2573 | if (!phba->cfg_EnableXLane) | 2573 | if (!phba->cfg_fof) |
2574 | return -EPERM; | 2574 | return -EPERM; |
2575 | 2575 | ||
2576 | if (oas_state) { | 2576 | if (oas_state) { |
@@ -2675,7 +2675,7 @@ lpfc_oas_lun_show(struct device *dev, struct device_attribute *attr, | |||
2675 | uint64_t oas_lun; | 2675 | uint64_t oas_lun; |
2676 | int len = 0; | 2676 | int len = 0; |
2677 | 2677 | ||
2678 | if (!phba->cfg_EnableXLane) | 2678 | if (!phba->cfg_fof) |
2679 | return -EPERM; | 2679 | return -EPERM; |
2680 | 2680 | ||
2681 | if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) | 2681 | if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) |
@@ -2721,7 +2721,7 @@ lpfc_oas_lun_store(struct device *dev, struct device_attribute *attr, | |||
2721 | uint64_t scsi_lun; | 2721 | uint64_t scsi_lun; |
2722 | ssize_t rc; | 2722 | ssize_t rc; |
2723 | 2723 | ||
2724 | if (!phba->cfg_EnableXLane) | 2724 | if (!phba->cfg_fof) |
2725 | return -EPERM; | 2725 | return -EPERM; |
2726 | 2726 | ||
2727 | if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) | 2727 | if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) |
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 828c08e9389e..38e05c9675a7 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c | |||
@@ -2314,7 +2314,7 @@ proc_cq: | |||
2314 | goto too_big; | 2314 | goto too_big; |
2315 | } | 2315 | } |
2316 | 2316 | ||
2317 | if (phba->cfg_EnableXLane) { | 2317 | if (phba->cfg_fof) { |
2318 | 2318 | ||
2319 | /* OAS CQ */ | 2319 | /* OAS CQ */ |
2320 | qp = phba->sli4_hba.oas_cq; | 2320 | qp = phba->sli4_hba.oas_cq; |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 02d8731eb365..a018649c408f 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -10938,7 +10938,7 @@ lpfc_sli4_oas_verify(struct lpfc_hba *phba) | |||
10938 | if (phba->sli4_hba.pc_sli4_params.oas_supported) { | 10938 | if (phba->sli4_hba.pc_sli4_params.oas_supported) { |
10939 | phba->cfg_fof = 1; | 10939 | phba->cfg_fof = 1; |
10940 | } else { | 10940 | } else { |
10941 | phba->cfg_EnableXLane = 0; | 10941 | phba->cfg_fof = 0; |
10942 | if (phba->device_data_mem_pool) | 10942 | if (phba->device_data_mem_pool) |
10943 | mempool_destroy(phba->device_data_mem_pool); | 10943 | mempool_destroy(phba->device_data_mem_pool); |
10944 | phba->device_data_mem_pool = NULL; | 10944 | phba->device_data_mem_pool = NULL; |
@@ -10968,7 +10968,7 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) | |||
10968 | if (rc) | 10968 | if (rc) |
10969 | return -ENOMEM; | 10969 | return -ENOMEM; |
10970 | 10970 | ||
10971 | if (phba->cfg_EnableXLane) { | 10971 | if (phba->cfg_fof) { |
10972 | 10972 | ||
10973 | rc = lpfc_cq_create(phba, phba->sli4_hba.oas_cq, | 10973 | rc = lpfc_cq_create(phba, phba->sli4_hba.oas_cq, |
10974 | phba->sli4_hba.fof_eq, LPFC_WCQ, LPFC_FCP); | 10974 | phba->sli4_hba.fof_eq, LPFC_WCQ, LPFC_FCP); |
@@ -10987,8 +10987,7 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) | |||
10987 | return 0; | 10987 | return 0; |
10988 | 10988 | ||
10989 | out_oas_wq: | 10989 | out_oas_wq: |
10990 | if (phba->cfg_EnableXLane) | 10990 | lpfc_cq_destroy(phba, phba->sli4_hba.oas_cq); |
10991 | lpfc_cq_destroy(phba, phba->sli4_hba.oas_cq); | ||
10992 | out_oas_cq: | 10991 | out_oas_cq: |
10993 | lpfc_eq_destroy(phba, phba->sli4_hba.fof_eq); | 10992 | lpfc_eq_destroy(phba, phba->sli4_hba.fof_eq); |
10994 | return rc; | 10993 | return rc; |
@@ -11022,7 +11021,7 @@ lpfc_fof_queue_create(struct lpfc_hba *phba) | |||
11022 | 11021 | ||
11023 | phba->sli4_hba.fof_eq = qdesc; | 11022 | phba->sli4_hba.fof_eq = qdesc; |
11024 | 11023 | ||
11025 | if (phba->cfg_EnableXLane) { | 11024 | if (phba->cfg_fof) { |
11026 | 11025 | ||
11027 | /* Create OAS CQ */ | 11026 | /* Create OAS CQ */ |
11028 | qdesc = lpfc_sli4_queue_alloc(phba, phba->sli4_hba.cq_esize, | 11027 | qdesc = lpfc_sli4_queue_alloc(phba, phba->sli4_hba.cq_esize, |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 576a0602b101..7d0f2951ca52 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -73,7 +73,7 @@ lpfc_rport_data_from_scsi_device(struct scsi_device *sdev) | |||
73 | { | 73 | { |
74 | struct lpfc_vport *vport = (struct lpfc_vport *)sdev->host->hostdata; | 74 | struct lpfc_vport *vport = (struct lpfc_vport *)sdev->host->hostdata; |
75 | 75 | ||
76 | if (vport->phba->cfg_EnableXLane) | 76 | if (vport->phba->cfg_fof) |
77 | return ((struct lpfc_device_data *)sdev->hostdata)->rport_data; | 77 | return ((struct lpfc_device_data *)sdev->hostdata)->rport_data; |
78 | else | 78 | else |
79 | return (struct lpfc_rport_data *)sdev->hostdata; | 79 | return (struct lpfc_rport_data *)sdev->hostdata; |
@@ -3462,7 +3462,7 @@ lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) | |||
3462 | * If the OAS driver feature is enabled and the lun is enabled for | 3462 | * If the OAS driver feature is enabled and the lun is enabled for |
3463 | * OAS, set the oas iocb related flags. | 3463 | * OAS, set the oas iocb related flags. |
3464 | */ | 3464 | */ |
3465 | if ((phba->cfg_EnableXLane) && ((struct lpfc_device_data *) | 3465 | if ((phba->cfg_fof) && ((struct lpfc_device_data *) |
3466 | scsi_cmnd->device->hostdata)->oas_enabled) | 3466 | scsi_cmnd->device->hostdata)->oas_enabled) |
3467 | lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_OAS; | 3467 | lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_OAS; |
3468 | return 0; | 3468 | return 0; |
@@ -5504,7 +5504,7 @@ lpfc_slave_alloc(struct scsi_device *sdev) | |||
5504 | if (!rport || fc_remote_port_chkready(rport)) | 5504 | if (!rport || fc_remote_port_chkready(rport)) |
5505 | return -ENXIO; | 5505 | return -ENXIO; |
5506 | 5506 | ||
5507 | if (phba->cfg_EnableXLane) { | 5507 | if (phba->cfg_fof) { |
5508 | 5508 | ||
5509 | /* | 5509 | /* |
5510 | * Check to see if the device data structure for the lun | 5510 | * Check to see if the device data structure for the lun |
@@ -5629,7 +5629,7 @@ lpfc_slave_destroy(struct scsi_device *sdev) | |||
5629 | struct lpfc_device_data *device_data = sdev->hostdata; | 5629 | struct lpfc_device_data *device_data = sdev->hostdata; |
5630 | 5630 | ||
5631 | atomic_dec(&phba->sdev_cnt); | 5631 | atomic_dec(&phba->sdev_cnt); |
5632 | if ((phba->cfg_EnableXLane) && (device_data)) { | 5632 | if ((phba->cfg_fof) && (device_data)) { |
5633 | spin_lock_irqsave(&phba->devicelock, flags); | 5633 | spin_lock_irqsave(&phba->devicelock, flags); |
5634 | device_data->available = false; | 5634 | device_data->available = false; |
5635 | if (!device_data->oas_enabled) | 5635 | if (!device_data->oas_enabled) |
@@ -5668,7 +5668,7 @@ lpfc_create_device_data(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, | |||
5668 | int memory_flags; | 5668 | int memory_flags; |
5669 | 5669 | ||
5670 | if (unlikely(!phba) || !vport_wwpn || !target_wwpn || | 5670 | if (unlikely(!phba) || !vport_wwpn || !target_wwpn || |
5671 | !(phba->cfg_EnableXLane)) | 5671 | !(phba->cfg_fof)) |
5672 | return NULL; | 5672 | return NULL; |
5673 | 5673 | ||
5674 | /* Attempt to create the device data to contain lun info */ | 5674 | /* Attempt to create the device data to contain lun info */ |
@@ -5706,7 +5706,7 @@ lpfc_delete_device_data(struct lpfc_hba *phba, | |||
5706 | { | 5706 | { |
5707 | 5707 | ||
5708 | if (unlikely(!phba) || !lun_info || | 5708 | if (unlikely(!phba) || !lun_info || |
5709 | !(phba->cfg_EnableXLane)) | 5709 | !(phba->cfg_fof)) |
5710 | return; | 5710 | return; |
5711 | 5711 | ||
5712 | if (!list_empty(&lun_info->listentry)) | 5712 | if (!list_empty(&lun_info->listentry)) |
@@ -5740,7 +5740,7 @@ __lpfc_get_device_data(struct lpfc_hba *phba, struct list_head *list, | |||
5740 | struct lpfc_device_data *lun_info; | 5740 | struct lpfc_device_data *lun_info; |
5741 | 5741 | ||
5742 | if (unlikely(!phba) || !list || !vport_wwpn || !target_wwpn || | 5742 | if (unlikely(!phba) || !list || !vport_wwpn || !target_wwpn || |
5743 | !phba->cfg_EnableXLane) | 5743 | !phba->cfg_fof) |
5744 | return NULL; | 5744 | return NULL; |
5745 | 5745 | ||
5746 | /* Check to see if the lun is already enabled for OAS. */ | 5746 | /* Check to see if the lun is already enabled for OAS. */ |
@@ -5802,7 +5802,7 @@ lpfc_find_next_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, | |||
5802 | !starting_lun || !found_vport_wwpn || | 5802 | !starting_lun || !found_vport_wwpn || |
5803 | !found_target_wwpn || !found_lun || !found_lun_status || | 5803 | !found_target_wwpn || !found_lun || !found_lun_status || |
5804 | (*starting_lun == NO_MORE_OAS_LUN) || | 5804 | (*starting_lun == NO_MORE_OAS_LUN) || |
5805 | !phba->cfg_EnableXLane) | 5805 | !phba->cfg_fof) |
5806 | return false; | 5806 | return false; |
5807 | 5807 | ||
5808 | lun = *starting_lun; | 5808 | lun = *starting_lun; |
@@ -5886,7 +5886,7 @@ lpfc_enable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, | |||
5886 | unsigned long flags; | 5886 | unsigned long flags; |
5887 | 5887 | ||
5888 | if (unlikely(!phba) || !vport_wwpn || !target_wwpn || | 5888 | if (unlikely(!phba) || !vport_wwpn || !target_wwpn || |
5889 | !phba->cfg_EnableXLane) | 5889 | !phba->cfg_fof) |
5890 | return false; | 5890 | return false; |
5891 | 5891 | ||
5892 | spin_lock_irqsave(&phba->devicelock, flags); | 5892 | spin_lock_irqsave(&phba->devicelock, flags); |
@@ -5943,7 +5943,7 @@ lpfc_disable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, | |||
5943 | unsigned long flags; | 5943 | unsigned long flags; |
5944 | 5944 | ||
5945 | if (unlikely(!phba) || !vport_wwpn || !target_wwpn || | 5945 | if (unlikely(!phba) || !vport_wwpn || !target_wwpn || |
5946 | !phba->cfg_EnableXLane) | 5946 | !phba->cfg_fof) |
5947 | return false; | 5947 | return false; |
5948 | 5948 | ||
5949 | spin_lock_irqsave(&phba->devicelock, flags); | 5949 | spin_lock_irqsave(&phba->devicelock, flags); |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index b5336a693974..8791312e5977 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -5079,7 +5079,7 @@ lpfc_sli4_arm_cqeq_intr(struct lpfc_hba *phba) | |||
5079 | } while (++fcp_eqidx < phba->cfg_fcp_io_channel); | 5079 | } while (++fcp_eqidx < phba->cfg_fcp_io_channel); |
5080 | } | 5080 | } |
5081 | 5081 | ||
5082 | if (phba->cfg_EnableXLane) | 5082 | if (phba->cfg_fof) |
5083 | lpfc_sli4_cq_release(phba->sli4_hba.oas_cq, LPFC_QUEUE_REARM); | 5083 | lpfc_sli4_cq_release(phba->sli4_hba.oas_cq, LPFC_QUEUE_REARM); |
5084 | 5084 | ||
5085 | if (phba->sli4_hba.hba_eq) { | 5085 | if (phba->sli4_hba.hba_eq) { |
@@ -8714,8 +8714,7 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, | |||
8714 | 8714 | ||
8715 | if ((piocb->iocb_flag & LPFC_IO_FCP) || | 8715 | if ((piocb->iocb_flag & LPFC_IO_FCP) || |
8716 | (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { | 8716 | (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { |
8717 | if (!phba->cfg_EnableXLane || (!(piocb->iocb_flag & | 8717 | if (!phba->cfg_fof || (!(piocb->iocb_flag & LPFC_IO_OAS))) { |
8718 | LPFC_IO_OAS))) { | ||
8719 | wq = phba->sli4_hba.fcp_wq[piocb->fcp_wqidx]; | 8718 | wq = phba->sli4_hba.fcp_wq[piocb->fcp_wqidx]; |
8720 | } else { | 8719 | } else { |
8721 | wq = phba->sli4_hba.oas_wq; | 8720 | wq = phba->sli4_hba.oas_wq; |
@@ -8810,7 +8809,7 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, | |||
8810 | 8809 | ||
8811 | if (phba->sli_rev == LPFC_SLI_REV4) { | 8810 | if (phba->sli_rev == LPFC_SLI_REV4) { |
8812 | if (piocb->iocb_flag & LPFC_IO_FCP) { | 8811 | if (piocb->iocb_flag & LPFC_IO_FCP) { |
8813 | if (!phba->cfg_EnableXLane || (!(piocb->iocb_flag & | 8812 | if (!phba->cfg_fof || (!(piocb->iocb_flag & |
8814 | LPFC_IO_OAS))) { | 8813 | LPFC_IO_OAS))) { |
8815 | if (unlikely(!phba->sli4_hba.fcp_wq)) | 8814 | if (unlikely(!phba->sli4_hba.fcp_wq)) |
8816 | return IOCB_ERROR; | 8815 | return IOCB_ERROR; |