Lines Matching refs:use_sg
4183 int use_sg, i, sg_limit, chained, last_sg; in hpsa_scatter_gather() local
4188 use_sg = scsi_dma_map(cmd); in hpsa_scatter_gather()
4189 if (use_sg < 0) in hpsa_scatter_gather()
4190 return use_sg; in hpsa_scatter_gather()
4192 if (!use_sg) in hpsa_scatter_gather()
4203 chained = use_sg > h->max_cmd_sg_entries; in hpsa_scatter_gather()
4204 sg_limit = chained ? h->max_cmd_sg_entries - 1 : use_sg; in hpsa_scatter_gather()
4219 sg_limit = use_sg - sg_limit; in hpsa_scatter_gather()
4229 if (use_sg + chained > h->maxSG) in hpsa_scatter_gather()
4230 h->maxSG = use_sg + chained; in hpsa_scatter_gather()
4234 cp->Header.SGTotal = cpu_to_le16(use_sg + 1); in hpsa_scatter_gather()
4244 cp->Header.SGList = (u8) use_sg; /* no. SGs contig in this cmd */ in hpsa_scatter_gather()
4245 cp->Header.SGTotal = cpu_to_le16(use_sg); /* total sgs in cmd list */ in hpsa_scatter_gather()
4302 int use_sg, i; in hpsa_scsi_ioaccel1_queue_command() local
4326 use_sg = scsi_dma_map(cmd); in hpsa_scsi_ioaccel1_queue_command()
4327 if (use_sg < 0) { in hpsa_scsi_ioaccel1_queue_command()
4329 return use_sg; in hpsa_scsi_ioaccel1_queue_command()
4332 if (use_sg) { in hpsa_scsi_ioaccel1_queue_command()
4334 scsi_for_each_sg(cmd, sg, use_sg, i) { in hpsa_scsi_ioaccel1_queue_command()
4365 c->Header.SGList = use_sg; in hpsa_scsi_ioaccel1_queue_command()
4459 int use_sg, i; in hpsa_scsi_ioaccel2_queue_command() local
4481 use_sg = scsi_dma_map(cmd); in hpsa_scsi_ioaccel2_queue_command()
4482 if (use_sg < 0) { in hpsa_scsi_ioaccel2_queue_command()
4484 return use_sg; in hpsa_scsi_ioaccel2_queue_command()
4487 if (use_sg) { in hpsa_scsi_ioaccel2_queue_command()
4489 if (use_sg > h->ioaccel_maxsg) { in hpsa_scsi_ioaccel2_queue_command()
4501 scsi_for_each_sg(cmd, sg, use_sg, i) { in hpsa_scsi_ioaccel2_queue_command()
4551 if (use_sg > h->ioaccel_maxsg) { in hpsa_scsi_ioaccel2_queue_command()
4553 cp->sg[0].length = cpu_to_le32(use_sg * sizeof(cp->sg[0])); in hpsa_scsi_ioaccel2_queue_command()
4560 cp->sg_count = (u8) use_sg; in hpsa_scsi_ioaccel2_queue_command()