]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/lpfc/lpfc_scsi.c
Merge tag 'tegra-for-3.8-fixes-for-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / drivers / scsi / lpfc / lpfc_scsi.c
index 7f45ac9964a9222dff88a4de4a56cacc80ae7932..60e5a177644ce4215e84d417dc27df2e5937b1d0 100644 (file)
@@ -3227,6 +3227,21 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba,
                }
        }
 
+       switch (scsi_get_prot_op(scsi_cmnd)) {
+       case SCSI_PROT_WRITE_STRIP:
+       case SCSI_PROT_READ_STRIP:
+               lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_STRIP;
+               break;
+       case SCSI_PROT_WRITE_INSERT:
+       case SCSI_PROT_READ_INSERT:
+               lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_INSERT;
+               break;
+       case SCSI_PROT_WRITE_PASS:
+       case SCSI_PROT_READ_PASS:
+               lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF_PASS;
+               break;
+       }
+
        fcpdl = lpfc_bg_scsi_adjust_dl(phba, lpfc_cmd);
 
        fcp_cmnd->fcpDl = be32_to_cpu(fcpdl);
@@ -3236,7 +3251,6 @@ lpfc_bg_scsi_prep_dma_buf_s4(struct lpfc_hba *phba,
         * we need to set word 4 of IOCB here
         */
        iocb_cmd->un.fcpi.fcpi_parm = fcpdl;
-       lpfc_cmd->cur_iocbq.iocb_flag |= LPFC_IO_DIF;
 
        return 0;
 err:
@@ -4914,6 +4928,9 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd)
                list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
                        if (!NLP_CHK_NODE_ACT(ndlp))
                                continue;
+                       if (vport->phba->cfg_fcp2_no_tgt_reset &&
+                           (ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE))
+                               continue;
                        if (ndlp->nlp_state == NLP_STE_MAPPED_NODE &&
                            ndlp->nlp_sid == i &&
                            ndlp->rport) {