---
name: "scsi_device_set_state"
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_device_set_state"
---

# scsi\_device\_set\_state(9)

Take the given device through the device state model.

## NAME

scsi\_device\_set\_state - Take the given device through the device state model.

## SYNOPSIS

**int scsi\_device\_set\_state(struct scsi\_device \*** *sdev***, enum scsi\_device\_state** *state***);**

## ARGUMENTS

*sdev*

scsi device to change the state of.

*state*

state to change to.

## DESCRIPTION

Returns zero if unsuccessful or an error if the requested transition is illegal.

## AUTHORS

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

Author.

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

Author.

## COPYRIGHT
