---
name: "ata_scsi_find_dev"
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_scsi_find_dev"
---

# ata\_scsi\_find\_dev(9)

lookup ata\_device from scsi\_cmnd

## NAME

ata\_scsi\_find\_dev - lookup ata\_device from scsi\_cmnd

## SYNOPSIS

**struct ata\_device \* ata\_scsi\_find\_dev(struct ata\_port \*** *ap***, const struct scsi\_device \*** *scsidev***);**

## ARGUMENTS

*ap*

ATA port to which the device is attached

*scsidev*

SCSI device from which we derive the ATA device

## DESCRIPTION

Given various information provided in struct scsi\_cmnd, map that onto an ATA bus, and using that mapping determine which ata\_device is associated with the SCSI command to be sent.

LOCKING: spin\_lock\_irqsave(host lock)

## RETURN

Associated ATA device, or **NULL** if not found.

## AUTHOR

**Jeff Garzik**

Author.

## COPYRIGHT
