scsi_probe_and_add_lun(9)

scsi_probe_and_add_lun9

Probe a lun, if a lun is found add it

Usage

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

Overview

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

Releases

5 releases since Debian 5.0 (Lenny); the text changed 4 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9

Authors

James Bottomley <[email protected]>

Author.

Rob Landley <[email protected]>

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.