---
name: "ata_sg_init"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/ata_sg_init"
---

# ata\_sg\_init(9)

Associate command with scatter-gather table.

## NAME

ata\_sg\_init - Associate command with scatter-gather table.

## SYNOPSIS

**void ata\_sg\_init(struct ata\_queued\_cmd \*** *qc***, struct scatterlist \*** *sg***, unsigned int** *n\_elem***);**

## ARGUMENTS

*qc*

Command to be associated

*sg*

Scatter-gather table.

*n\_elem*

Number of elements in s/g table.

## DESCRIPTION

Initialize the data-related elements of queued\_cmd *qc* to point to a scatter-gather table *sg*, containing *n\_elem* elements.

LOCKING: spin\_lock\_irqsave(host lock)

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
