Linux Kernel
3.7.1
|
#include <linux/device.h>
#include <linux/list.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <scsi/scsi.h>
Go to the source code of this file.
Data Structures | |
struct | scsi_host_template |
struct | Scsi_Host |
Macros | |
#define | SG_NONE 0 |
#define | SG_ALL SCSI_MAX_SG_SEGMENTS |
#define | MODE_UNKNOWN 0x00 |
#define | MODE_INITIATOR 0x01 |
#define | MODE_TARGET 0x02 |
#define | DISABLE_CLUSTERING 0 |
#define | ENABLE_CLUSTERING 1 |
#define | SCSI_ADAPTER_RESET 1 |
#define | SCSI_FIRMWARE_RESET 2 |
#define | SCSI_DEFAULT_MAX_SECTORS 1024 |
#define | SCSI_DEFAULT_HOST_BLOCKED 7 |
#define | DEF_SCSI_QCMD(func_name) |
#define | class_to_shost(d) container_of(d, struct Scsi_Host, shost_dev) |
#define | shost_printk(prefix, shost, fmt, a...) dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a) |
Enumerations | |
enum | { SCSI_QDEPTH_DEFAULT, SCSI_QDEPTH_QFULL, SCSI_QDEPTH_RAMP_UP } |
enum | scsi_host_state { SHOST_CREATED = 1, SHOST_RUNNING, SHOST_CANCEL, SHOST_DEL, SHOST_RECOVERY, SHOST_CANCEL_RECOVERY, SHOST_DEL_RECOVERY } |
enum | scsi_host_prot_capabilities { SHOST_DIF_TYPE1_PROTECTION = 1 << 0, SHOST_DIF_TYPE2_PROTECTION = 1 << 1, SHOST_DIF_TYPE3_PROTECTION = 1 << 2, SHOST_DIX_TYPE0_PROTECTION = 1 << 3, SHOST_DIX_TYPE1_PROTECTION = 1 << 4, SHOST_DIX_TYPE2_PROTECTION = 1 << 5, SHOST_DIX_TYPE3_PROTECTION = 1 << 6 } |
enum | scsi_host_guard_type { SHOST_DIX_GUARD_CRC = 1 << 0, SHOST_DIX_GUARD_IP = 1 << 1 } |
#define class_to_shost | ( | d | ) | container_of(d, struct Scsi_Host, shost_dev) |
Definition at line 744 of file scsi_host.h.
#define DEF_SCSI_QCMD | ( | func_name | ) |
#define DISABLE_CLUSTERING 0 |
Definition at line 43 of file scsi_host.h.
#define ENABLE_CLUSTERING 1 |
Definition at line 44 of file scsi_host.h.
#define MODE_INITIATOR 0x01 |
Definition at line 40 of file scsi_host.h.
#define MODE_TARGET 0x02 |
Definition at line 41 of file scsi_host.h.
#define MODE_UNKNOWN 0x00 |
Definition at line 39 of file scsi_host.h.
#define SCSI_ADAPTER_RESET 1 |
Definition at line 367 of file scsi_host.h.
#define SCSI_DEFAULT_HOST_BLOCKED 7 |
Definition at line 488 of file scsi_host.h.
#define SCSI_DEFAULT_MAX_SECTORS 1024 |
Definition at line 422 of file scsi_host.h.
#define SCSI_FIRMWARE_RESET 2 |
Definition at line 368 of file scsi_host.h.
#define SG_ALL SCSI_MAX_SG_SEGMENTS |
Definition at line 37 of file scsi_host.h.
#define SG_NONE 0 |
Definition at line 36 of file scsi_host.h.
#define shost_printk | ( | prefix, | |
shost, | |||
fmt, | |||
a... | |||
) | dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a) |
Definition at line 747 of file scsi_host.h.
anonymous enum |
Definition at line 46 of file scsi_host.h.
enum scsi_host_guard_type |
Definition at line 907 of file scsi_host.h.
SHOST_DIF_TYPE1_PROTECTION | |
SHOST_DIF_TYPE2_PROTECTION | |
SHOST_DIF_TYPE3_PROTECTION | |
SHOST_DIX_TYPE0_PROTECTION | |
SHOST_DIX_TYPE1_PROTECTION | |
SHOST_DIX_TYPE2_PROTECTION | |
SHOST_DIX_TYPE3_PROTECTION |
Definition at line 838 of file scsi_host.h.
enum scsi_host_state |
SHOST_CREATED | |
SHOST_RUNNING | |
SHOST_CANCEL | |
SHOST_DEL | |
SHOST_RECOVERY | |
SHOST_CANCEL_RECOVERY | |
SHOST_DEL_RECOVERY |
Definition at line 543 of file scsi_host.h.
|
read |
int __must_check scsi_add_host_with_dma | ( | struct Scsi_Host * | shost, |
struct device * | dev, | ||
struct device * | dma_dev | ||
) |
scsi_add_host_with_dma - add a scsi host with dma device : scsi host pointer to add : a struct device of type scsi class : dma device for the host
Note: You rarely need to worry about this unless you're in a virtualised host environments, so use the simpler scsi_add_host() function instead.
Return value: 0 on success / != 0 for error
Definition at line 1749 of file scsi_lib.c.
Definition at line 1651 of file scsi_lib.c.
void scsi_free_host_dev | ( | struct scsi_device * | sdev | ) |
scsi_free_host_dev - Free a scsi_device that points to the host adapter itself : Host device to be freed
Lock status: None assumed.
Returns: Nothing
Definition at line 1950 of file scsi_scan.c.
|
read |
scsi_get_host_dev - Create a scsi_device that points to the host adapter itself : Host that needs a scsi_device
Lock status: None assumed.
Returns: The scsi_device or NULL
Notes: Attach a single scsi_device to the Scsi_Host - this should be made to look like a "pseudo-device" that points to the HA itself.
Note - this device is not accessible from any high-level drivers (including generics), which is probably not optimal. We can add hooks later to attach.
Definition at line 1918 of file scsi_scan.c.
|
read |
scsi_host_alloc - register a scsi host adapter instance. : pointer to scsi host template : extra bytes to allocate for driver
Note: Allocate a new Scsi_Host and perform basic initialization. The host is not published to the scsi midlayer until scsi_add_host is called.
Return value: Pointer to a new Scsi_Host
scsi_host_lookup - get a reference to a Scsi_Host by host no : host number to locate
Return value: A pointer to located Scsi_Host or NULL.
The caller must do a scsi_host_put() to drop the reference that scsi_host_get() took. The put_device() below dropped the reference from class_find_device().
int scsi_host_set_state | ( | struct Scsi_Host * | shost, |
enum scsi_host_state | state | ||
) |
Definition at line 69 of file scsi_sysfs.c.
int scsi_queue_work | ( | struct Scsi_Host * | shost, |
struct work_struct * | work | ||
) |
|
read |
Definition at line 1550 of file scsi_scan.c.
scsi_scan_host - scan the given adapter : adapter to scan
Definition at line 1859 of file scsi_scan.c.
Definition at line 1775 of file scsi_lib.c.