Loading drivers/scsi/lpfc/lpfc_attr.c +6 −6 Original line number Diff line number Diff line Loading @@ -2369,7 +2369,7 @@ lpfc_oas_tgt_store(struct device *dev, struct device_attribute *attr, uint8_t wwpn[WWN_SZ]; int rc; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; /* count may include a LF at end of string */ Loading Loading @@ -2437,7 +2437,7 @@ lpfc_oas_vpt_store(struct device *dev, struct device_attribute *attr, uint8_t wwpn[WWN_SZ]; int rc; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; /* count may include a LF at end of string */ Loading Loading @@ -2504,7 +2504,7 @@ lpfc_oas_lun_state_store(struct device *dev, struct device_attribute *attr, struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; int val = 0; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (!isdigit(buf[0])) Loading Loading @@ -2570,7 +2570,7 @@ lpfc_oas_lun_state_set(struct lpfc_hba *phba, uint8_t vpt_wwpn[], int rc = 0; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (oas_state) { Loading Loading @@ -2675,7 +2675,7 @@ lpfc_oas_lun_show(struct device *dev, struct device_attribute *attr, uint64_t oas_lun; int len = 0; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) Loading Loading @@ -2721,7 +2721,7 @@ lpfc_oas_lun_store(struct device *dev, struct device_attribute *attr, uint64_t scsi_lun; ssize_t rc; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) Loading drivers/scsi/lpfc/lpfc_debugfs.c +1 −1 Original line number Diff line number Diff line Loading @@ -2314,7 +2314,7 @@ lpfc_idiag_queinfo_read(struct file *file, char __user *buf, size_t nbytes, goto too_big; } if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { /* OAS CQ */ qp = phba->sli4_hba.oas_cq; Loading drivers/scsi/lpfc/lpfc_init.c +4 −5 Original line number Diff line number Diff line Loading @@ -10938,7 +10938,7 @@ lpfc_sli4_oas_verify(struct lpfc_hba *phba) if (phba->sli4_hba.pc_sli4_params.oas_supported) { phba->cfg_fof = 1; } else { phba->cfg_EnableXLane = 0; phba->cfg_fof = 0; if (phba->device_data_mem_pool) mempool_destroy(phba->device_data_mem_pool); phba->device_data_mem_pool = NULL; Loading Loading @@ -10968,7 +10968,7 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) if (rc) return -ENOMEM; if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { rc = lpfc_cq_create(phba, phba->sli4_hba.oas_cq, phba->sli4_hba.fof_eq, LPFC_WCQ, LPFC_FCP); Loading @@ -10987,7 +10987,6 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) return 0; out_oas_wq: if (phba->cfg_EnableXLane) lpfc_cq_destroy(phba, phba->sli4_hba.oas_cq); out_oas_cq: lpfc_eq_destroy(phba, phba->sli4_hba.fof_eq); Loading Loading @@ -11022,7 +11021,7 @@ lpfc_fof_queue_create(struct lpfc_hba *phba) phba->sli4_hba.fof_eq = qdesc; if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { /* Create OAS CQ */ qdesc = lpfc_sli4_queue_alloc(phba, phba->sli4_hba.cq_esize, Loading drivers/scsi/lpfc/lpfc_scsi.c +10 −10 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ lpfc_rport_data_from_scsi_device(struct scsi_device *sdev) { struct lpfc_vport *vport = (struct lpfc_vport *)sdev->host->hostdata; if (vport->phba->cfg_EnableXLane) if (vport->phba->cfg_fof) return ((struct lpfc_device_data *)sdev->hostdata)->rport_data; else return (struct lpfc_rport_data *)sdev->hostdata; Loading Loading @@ -3462,7 +3462,7 @@ lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) * If the OAS driver feature is enabled and the lun is enabled for * OAS, set the oas iocb related flags. */ if ((phba->cfg_EnableXLane) && ((struct lpfc_device_data *) if ((phba->cfg_fof) && ((struct lpfc_device_data *) scsi_cmnd->device->hostdata)->oas_enabled) lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_OAS; return 0; Loading Loading @@ -5504,7 +5504,7 @@ lpfc_slave_alloc(struct scsi_device *sdev) if (!rport || fc_remote_port_chkready(rport)) return -ENXIO; if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { /* * Check to see if the device data structure for the lun Loading Loading @@ -5629,7 +5629,7 @@ lpfc_slave_destroy(struct scsi_device *sdev) struct lpfc_device_data *device_data = sdev->hostdata; atomic_dec(&phba->sdev_cnt); if ((phba->cfg_EnableXLane) && (device_data)) { if ((phba->cfg_fof) && (device_data)) { spin_lock_irqsave(&phba->devicelock, flags); device_data->available = false; if (!device_data->oas_enabled) Loading Loading @@ -5668,7 +5668,7 @@ lpfc_create_device_data(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, int memory_flags; if (unlikely(!phba) || !vport_wwpn || !target_wwpn || !(phba->cfg_EnableXLane)) !(phba->cfg_fof)) return NULL; /* Attempt to create the device data to contain lun info */ Loading Loading @@ -5706,7 +5706,7 @@ lpfc_delete_device_data(struct lpfc_hba *phba, { if (unlikely(!phba) || !lun_info || !(phba->cfg_EnableXLane)) !(phba->cfg_fof)) return; if (!list_empty(&lun_info->listentry)) Loading Loading @@ -5740,7 +5740,7 @@ __lpfc_get_device_data(struct lpfc_hba *phba, struct list_head *list, struct lpfc_device_data *lun_info; if (unlikely(!phba) || !list || !vport_wwpn || !target_wwpn || !phba->cfg_EnableXLane) !phba->cfg_fof) return NULL; /* Check to see if the lun is already enabled for OAS. */ Loading Loading @@ -5802,7 +5802,7 @@ lpfc_find_next_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, !starting_lun || !found_vport_wwpn || !found_target_wwpn || !found_lun || !found_lun_status || (*starting_lun == NO_MORE_OAS_LUN) || !phba->cfg_EnableXLane) !phba->cfg_fof) return false; lun = *starting_lun; Loading Loading @@ -5886,7 +5886,7 @@ lpfc_enable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, unsigned long flags; if (unlikely(!phba) || !vport_wwpn || !target_wwpn || !phba->cfg_EnableXLane) !phba->cfg_fof) return false; spin_lock_irqsave(&phba->devicelock, flags); Loading Loading @@ -5943,7 +5943,7 @@ lpfc_disable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, unsigned long flags; if (unlikely(!phba) || !vport_wwpn || !target_wwpn || !phba->cfg_EnableXLane) !phba->cfg_fof) return false; spin_lock_irqsave(&phba->devicelock, flags); Loading drivers/scsi/lpfc/lpfc_sli.c +3 −4 Original line number Diff line number Diff line Loading @@ -5079,7 +5079,7 @@ lpfc_sli4_arm_cqeq_intr(struct lpfc_hba *phba) } while (++fcp_eqidx < phba->cfg_fcp_io_channel); } if (phba->cfg_EnableXLane) if (phba->cfg_fof) lpfc_sli4_cq_release(phba->sli4_hba.oas_cq, LPFC_QUEUE_REARM); if (phba->sli4_hba.hba_eq) { Loading Loading @@ -8714,8 +8714,7 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, if ((piocb->iocb_flag & LPFC_IO_FCP) || (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { if (!phba->cfg_EnableXLane || (!(piocb->iocb_flag & LPFC_IO_OAS))) { if (!phba->cfg_fof || (!(piocb->iocb_flag & LPFC_IO_OAS))) { wq = phba->sli4_hba.fcp_wq[piocb->fcp_wqidx]; } else { wq = phba->sli4_hba.oas_wq; Loading Loading @@ -8810,7 +8809,7 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, if (phba->sli_rev == LPFC_SLI_REV4) { if (piocb->iocb_flag & LPFC_IO_FCP) { if (!phba->cfg_EnableXLane || (!(piocb->iocb_flag & if (!phba->cfg_fof || (!(piocb->iocb_flag & LPFC_IO_OAS))) { if (unlikely(!phba->sli4_hba.fcp_wq)) return IOCB_ERROR; Loading Loading
drivers/scsi/lpfc/lpfc_attr.c +6 −6 Original line number Diff line number Diff line Loading @@ -2369,7 +2369,7 @@ lpfc_oas_tgt_store(struct device *dev, struct device_attribute *attr, uint8_t wwpn[WWN_SZ]; int rc; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; /* count may include a LF at end of string */ Loading Loading @@ -2437,7 +2437,7 @@ lpfc_oas_vpt_store(struct device *dev, struct device_attribute *attr, uint8_t wwpn[WWN_SZ]; int rc; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; /* count may include a LF at end of string */ Loading Loading @@ -2504,7 +2504,7 @@ lpfc_oas_lun_state_store(struct device *dev, struct device_attribute *attr, struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; int val = 0; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (!isdigit(buf[0])) Loading Loading @@ -2570,7 +2570,7 @@ lpfc_oas_lun_state_set(struct lpfc_hba *phba, uint8_t vpt_wwpn[], int rc = 0; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (oas_state) { Loading Loading @@ -2675,7 +2675,7 @@ lpfc_oas_lun_show(struct device *dev, struct device_attribute *attr, uint64_t oas_lun; int len = 0; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) Loading Loading @@ -2721,7 +2721,7 @@ lpfc_oas_lun_store(struct device *dev, struct device_attribute *attr, uint64_t scsi_lun; ssize_t rc; if (!phba->cfg_EnableXLane) if (!phba->cfg_fof) return -EPERM; if (wwn_to_u64(phba->cfg_oas_vpt_wwpn) == 0) Loading
drivers/scsi/lpfc/lpfc_debugfs.c +1 −1 Original line number Diff line number Diff line Loading @@ -2314,7 +2314,7 @@ lpfc_idiag_queinfo_read(struct file *file, char __user *buf, size_t nbytes, goto too_big; } if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { /* OAS CQ */ qp = phba->sli4_hba.oas_cq; Loading
drivers/scsi/lpfc/lpfc_init.c +4 −5 Original line number Diff line number Diff line Loading @@ -10938,7 +10938,7 @@ lpfc_sli4_oas_verify(struct lpfc_hba *phba) if (phba->sli4_hba.pc_sli4_params.oas_supported) { phba->cfg_fof = 1; } else { phba->cfg_EnableXLane = 0; phba->cfg_fof = 0; if (phba->device_data_mem_pool) mempool_destroy(phba->device_data_mem_pool); phba->device_data_mem_pool = NULL; Loading Loading @@ -10968,7 +10968,7 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) if (rc) return -ENOMEM; if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { rc = lpfc_cq_create(phba, phba->sli4_hba.oas_cq, phba->sli4_hba.fof_eq, LPFC_WCQ, LPFC_FCP); Loading @@ -10987,7 +10987,6 @@ lpfc_fof_queue_setup(struct lpfc_hba *phba) return 0; out_oas_wq: if (phba->cfg_EnableXLane) lpfc_cq_destroy(phba, phba->sli4_hba.oas_cq); out_oas_cq: lpfc_eq_destroy(phba, phba->sli4_hba.fof_eq); Loading Loading @@ -11022,7 +11021,7 @@ lpfc_fof_queue_create(struct lpfc_hba *phba) phba->sli4_hba.fof_eq = qdesc; if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { /* Create OAS CQ */ qdesc = lpfc_sli4_queue_alloc(phba, phba->sli4_hba.cq_esize, Loading
drivers/scsi/lpfc/lpfc_scsi.c +10 −10 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ lpfc_rport_data_from_scsi_device(struct scsi_device *sdev) { struct lpfc_vport *vport = (struct lpfc_vport *)sdev->host->hostdata; if (vport->phba->cfg_EnableXLane) if (vport->phba->cfg_fof) return ((struct lpfc_device_data *)sdev->hostdata)->rport_data; else return (struct lpfc_rport_data *)sdev->hostdata; Loading Loading @@ -3462,7 +3462,7 @@ lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) * If the OAS driver feature is enabled and the lun is enabled for * OAS, set the oas iocb related flags. */ if ((phba->cfg_EnableXLane) && ((struct lpfc_device_data *) if ((phba->cfg_fof) && ((struct lpfc_device_data *) scsi_cmnd->device->hostdata)->oas_enabled) lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_OAS; return 0; Loading Loading @@ -5504,7 +5504,7 @@ lpfc_slave_alloc(struct scsi_device *sdev) if (!rport || fc_remote_port_chkready(rport)) return -ENXIO; if (phba->cfg_EnableXLane) { if (phba->cfg_fof) { /* * Check to see if the device data structure for the lun Loading Loading @@ -5629,7 +5629,7 @@ lpfc_slave_destroy(struct scsi_device *sdev) struct lpfc_device_data *device_data = sdev->hostdata; atomic_dec(&phba->sdev_cnt); if ((phba->cfg_EnableXLane) && (device_data)) { if ((phba->cfg_fof) && (device_data)) { spin_lock_irqsave(&phba->devicelock, flags); device_data->available = false; if (!device_data->oas_enabled) Loading Loading @@ -5668,7 +5668,7 @@ lpfc_create_device_data(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, int memory_flags; if (unlikely(!phba) || !vport_wwpn || !target_wwpn || !(phba->cfg_EnableXLane)) !(phba->cfg_fof)) return NULL; /* Attempt to create the device data to contain lun info */ Loading Loading @@ -5706,7 +5706,7 @@ lpfc_delete_device_data(struct lpfc_hba *phba, { if (unlikely(!phba) || !lun_info || !(phba->cfg_EnableXLane)) !(phba->cfg_fof)) return; if (!list_empty(&lun_info->listentry)) Loading Loading @@ -5740,7 +5740,7 @@ __lpfc_get_device_data(struct lpfc_hba *phba, struct list_head *list, struct lpfc_device_data *lun_info; if (unlikely(!phba) || !list || !vport_wwpn || !target_wwpn || !phba->cfg_EnableXLane) !phba->cfg_fof) return NULL; /* Check to see if the lun is already enabled for OAS. */ Loading Loading @@ -5802,7 +5802,7 @@ lpfc_find_next_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, !starting_lun || !found_vport_wwpn || !found_target_wwpn || !found_lun || !found_lun_status || (*starting_lun == NO_MORE_OAS_LUN) || !phba->cfg_EnableXLane) !phba->cfg_fof) return false; lun = *starting_lun; Loading Loading @@ -5886,7 +5886,7 @@ lpfc_enable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, unsigned long flags; if (unlikely(!phba) || !vport_wwpn || !target_wwpn || !phba->cfg_EnableXLane) !phba->cfg_fof) return false; spin_lock_irqsave(&phba->devicelock, flags); Loading Loading @@ -5943,7 +5943,7 @@ lpfc_disable_oas_lun(struct lpfc_hba *phba, struct lpfc_name *vport_wwpn, unsigned long flags; if (unlikely(!phba) || !vport_wwpn || !target_wwpn || !phba->cfg_EnableXLane) !phba->cfg_fof) return false; spin_lock_irqsave(&phba->devicelock, flags); Loading
drivers/scsi/lpfc/lpfc_sli.c +3 −4 Original line number Diff line number Diff line Loading @@ -5079,7 +5079,7 @@ lpfc_sli4_arm_cqeq_intr(struct lpfc_hba *phba) } while (++fcp_eqidx < phba->cfg_fcp_io_channel); } if (phba->cfg_EnableXLane) if (phba->cfg_fof) lpfc_sli4_cq_release(phba->sli4_hba.oas_cq, LPFC_QUEUE_REARM); if (phba->sli4_hba.hba_eq) { Loading Loading @@ -8714,8 +8714,7 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number, if ((piocb->iocb_flag & LPFC_IO_FCP) || (piocb->iocb_flag & LPFC_USE_FCPWQIDX)) { if (!phba->cfg_EnableXLane || (!(piocb->iocb_flag & LPFC_IO_OAS))) { if (!phba->cfg_fof || (!(piocb->iocb_flag & LPFC_IO_OAS))) { wq = phba->sli4_hba.fcp_wq[piocb->fcp_wqidx]; } else { wq = phba->sli4_hba.oas_wq; Loading Loading @@ -8810,7 +8809,7 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, uint32_t ring_number, if (phba->sli_rev == LPFC_SLI_REV4) { if (piocb->iocb_flag & LPFC_IO_FCP) { if (!phba->cfg_EnableXLane || (!(piocb->iocb_flag & if (!phba->cfg_fof || (!(piocb->iocb_flag & LPFC_IO_OAS))) { if (unlikely(!phba->sli4_hba.fcp_wq)) return IOCB_ERROR; Loading