Lines Matching refs:use_sg
4582 int use_sg, i, sg_limit, chained; in hpsa_scatter_gather() local
4587 use_sg = scsi_dma_map(cmd); in hpsa_scatter_gather()
4588 if (use_sg < 0) in hpsa_scatter_gather()
4589 return use_sg; in hpsa_scatter_gather()
4591 if (!use_sg) in hpsa_scatter_gather()
4602 chained = use_sg > h->max_cmd_sg_entries; in hpsa_scatter_gather()
4603 sg_limit = chained ? h->max_cmd_sg_entries - 1 : use_sg; in hpsa_scatter_gather()
4617 sg_limit = use_sg - sg_limit; in hpsa_scatter_gather()
4627 if (use_sg + chained > h->maxSG) in hpsa_scatter_gather()
4628 h->maxSG = use_sg + chained; in hpsa_scatter_gather()
4632 cp->Header.SGTotal = cpu_to_le16(use_sg + 1); in hpsa_scatter_gather()
4642 cp->Header.SGList = (u8) use_sg; /* no. SGs contig in this cmd */ in hpsa_scatter_gather()
4643 cp->Header.SGTotal = cpu_to_le16(use_sg); /* total sgs in cmd list */ in hpsa_scatter_gather()
4743 int use_sg, i; in hpsa_scsi_ioaccel1_queue_command() local
4773 use_sg = scsi_dma_map(cmd); in hpsa_scsi_ioaccel1_queue_command()
4774 if (use_sg < 0) { in hpsa_scsi_ioaccel1_queue_command()
4776 return use_sg; in hpsa_scsi_ioaccel1_queue_command()
4779 if (use_sg) { in hpsa_scsi_ioaccel1_queue_command()
4781 scsi_for_each_sg(cmd, sg, use_sg, i) { in hpsa_scsi_ioaccel1_queue_command()
4812 c->Header.SGList = use_sg; in hpsa_scsi_ioaccel1_queue_command()
4914 int use_sg, i; in hpsa_scsi_ioaccel2_queue_command() local
4948 use_sg = scsi_dma_map(cmd); in hpsa_scsi_ioaccel2_queue_command()
4949 if (use_sg < 0) { in hpsa_scsi_ioaccel2_queue_command()
4951 return use_sg; in hpsa_scsi_ioaccel2_queue_command()
4954 if (use_sg) { in hpsa_scsi_ioaccel2_queue_command()
4956 if (use_sg > h->ioaccel_maxsg) { in hpsa_scsi_ioaccel2_queue_command()
4968 scsi_for_each_sg(cmd, sg, use_sg, i) { in hpsa_scsi_ioaccel2_queue_command()
5023 if (use_sg > h->ioaccel_maxsg) { in hpsa_scsi_ioaccel2_queue_command()
5025 cp->sg[0].length = cpu_to_le32(use_sg * sizeof(cp->sg[0])); in hpsa_scsi_ioaccel2_queue_command()
5032 cp->sg_count = (u8) use_sg; in hpsa_scsi_ioaccel2_queue_command()