Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
SG(4)			     Kernel Interfaces Manual			   SG(4)

NAME
     sg -- Linux ioctl-compatible SCSI passthru device

SYNOPSIS
     device sg
     device scbus

DESCRIPTION
     The  sg driver provides a Linux compatible scsi passthru device.  This dri-
     ver attaches to all cam(4)  peripheral  devices.	It  is	similar  to  the
     pass(4)  device, but uses the Linux interfaces, rather than the FreeBSD CAM
     interfaces.

IOCTL
     The following subset of the Linux sg ioctl interfaces are implemented:

     SG_SET_TIMEOUT
	 u_int to Set the timeout in milliseconds.

     SG_GET_TIMEOUT
	 Get the timeout in milliseconds

     SG_GET_RESERVED_SIZE
	 u_int Returns the size of the I/O one can do this device.

     SG_GET_SCSI_ID
	 struct sg_scsi_id Returns the bus number, channel, scsi bus ID  number,
	 lun and other information about the SCSI device.

     SG_GET_SG_TABLESIZE
	 u_int Returns the table size, though hard wired to 0.

     SG_GET_VERSION_NUM
	 u_int Return the version number that is implemented.

     SG_IO
	 struct sg_io_hdr
     All other ioctl interfaces return ENODEV.

FILES
     /dev/sg*  Passthru devices.

SEE ALSO
     cam(4), pass(4)

HISTORY
     The sg driver first appeared in FreeBSD 7.0.

FreeBSD 15.1			   May 6, 2024				   SG(4)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=sg&sektion=4&manpath=FreeBSD+15.1-RELEASE+and+Ports>

home | help