---
name: "scsi_probe_and_add_lun"
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/scsi_probe_and_add_lun"
---

# scsi\_probe\_and\_add\_lun(9)

probe a LUN, if a LUN is found add it

## NAME

scsi\_probe\_and\_add\_lun - probe a LUN, if a LUN is found add it

## SYNOPSIS

**int scsi\_probe\_and\_add\_lun(struct scsi\_target \*** *starget***, u64** *lun***, int \*** *bflagsp***, struct scsi\_device \*\*** *sdevp***, enum scsi\_scan\_mode** *rescan***, void \*** *hostdata***);**

## ARGUMENTS

*starget*

pointer to target device structure

*lun*

LUN of target device

*bflagsp*

store bflags here if not NULL

*sdevp*

probe the LUN corresponding to this scsi\_device

*rescan*

if not equal to SCSI\_SCAN\_INITIAL skip some code only needed on first scan

*hostdata*

passed to **scsi\_alloc\_sdev**

## DESCRIPTION

Call scsi\_probe\_lun, if a LUN with an attached device is found, allocate and set it up by calling scsi\_add\_lun.

## RETURN

SCSI\_SCAN\_NO\_RESPONSE: could not allocate or setup a scsi\_device SCSI\_SCAN\_TARGET\_PRESENT: target responded, but no device is attached at the LUN SCSI\_SCAN\_LUN\_PRESENT: a new scsi\_device was allocated and initialized

## AUTHORS

**James Bottomley** \<James.Bottomley@hansenpartnership.com\>

Author.

**Rob Landley** \<rob@landley.net\>

Author.

## COPYRIGHT
