Lines Matching refs:sc

89 lpfc_prot_group_type(struct lpfc_hba *phba, struct scsi_cmnd *sc);
948 * @sc: The SCSI command to examine
956 lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc,
964 uint32_t op = scsi_get_prot_op(sc);
974 sgpe = scsi_prot_sglist(sc);
975 lba = scsi_prot_ref_tag(sc);
979 blksize = scsi_prot_interval(sc);
980 numblks = (scsi_bufflen(sc) + blksize - 1) / blksize;
996 rdata = lpfc_rport_data_from_scsi_device(sc->device);
1019 lpfc_cmd = (struct lpfc_io_buf *)sc->host_scribble;
1355 * @sc: The SCSI command to examine
1363 lpfc_sc_to_bg_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1368 if (sc->prot_flags & SCSI_PROT_IP_CHECKSUM) {
1369 switch (scsi_get_prot_op(sc)) {
1392 scsi_get_prot_op(sc));
1398 switch (scsi_get_prot_op(sc)) {
1421 scsi_get_prot_op(sc));
1435 * @sc: The SCSI command to examine
1443 lpfc_bg_err_opcodes(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1447 if (sc->prot_flags & SCSI_PROT_IP_CHECKSUM) {
1448 switch (scsi_get_prot_op(sc)) {
1473 switch (scsi_get_prot_op(sc)) {
1505 * @sc: pointer to scsi command we're working on
1534 lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1542 int datadir = sc->sc_data_direction;
1550 status = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop);
1555 reftag = scsi_prot_ref_tag(sc);
1558 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
1561 lpfc_bg_err_opcodes(phba, sc, &txop, &rxop);
1592 if (sc->prot_flags & SCSI_PROT_GUARD_CHECK)
1597 if (sc->prot_flags & SCSI_PROT_REF_CHECK)
1616 scsi_for_each_sg(sc, sgde, datasegcnt, i) {
1637 * @sc: pointer to scsi command we're working on
1674 lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1689 int datadir = sc->sc_data_direction;
1700 sgpe = scsi_prot_sglist(sc);
1701 sgde = scsi_sglist(sc);
1710 status = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop);
1715 blksize = scsi_prot_interval(sc);
1716 reftag = scsi_prot_ref_tag(sc);
1719 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
1722 lpfc_bg_err_opcodes(phba, sc, &txop, &rxop);
1754 if (sc->prot_flags & SCSI_PROT_GUARD_CHECK)
1759 if (sc->prot_flags & SCSI_PROT_REF_CHECK)
1891 * @sc: pointer to scsi command we're working on
1919 lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
1939 status = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop);
1944 reftag = scsi_prot_ref_tag(sc);
1947 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
1950 lpfc_bg_err_opcodes(phba, sc, &txop, &rxop);
1969 if (sc->sc_data_direction == DMA_FROM_DEVICE) {
1970 if (sc->prot_flags & SCSI_PROT_GUARD_CHECK)
1975 if (sc->prot_flags & SCSI_PROT_REF_CHECK)
1997 sgde = scsi_sglist(sc);
2064 * @sc: pointer to scsi command we're working on
2100 lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
2127 sgpe = scsi_prot_sglist(sc);
2128 sgde = scsi_sglist(sc);
2137 status = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop);
2142 blksize = scsi_prot_interval(sc);
2143 reftag = scsi_prot_ref_tag(sc);
2146 rc = lpfc_bg_err_inject(phba, sc, &reftag, NULL, 1);
2149 lpfc_bg_err_opcodes(phba, sc, &txop, &rxop);
2198 if (sc->prot_flags & SCSI_PROT_GUARD_CHECK) {
2216 if (sc->prot_flags & SCSI_PROT_REF_CHECK)
2401 * @sc: pointer to scsi command we're working on
2410 lpfc_prot_group_type(struct lpfc_hba *phba, struct scsi_cmnd *sc)
2413 unsigned char op = scsi_get_prot_op(sc);
2450 struct scsi_cmnd *sc = lpfc_cmd->pCmd;
2453 fcpdl = scsi_bufflen(sc);
2456 if (sc->sc_data_direction == DMA_FROM_DEVICE) {
2458 if (scsi_get_prot_op(sc) == SCSI_PROT_READ_INSERT)
2463 if (scsi_get_prot_op(sc) == SCSI_PROT_WRITE_STRIP)
2472 fcpdl += (fcpdl / scsi_prot_interval(sc)) * 8;