Linux Kernel
3.7.1
|
Go to the source code of this file.
Macros | |
#define | SCSI_EH_CANCEL_CMD 0x0001 /* Cancel this cmd */ |
#define | SCSI_SENSE_VALID(scmd) (((scmd)->sense_buffer[0] & 0x70) == 0x70) |
#define | scsi_proc_hostdir_add(sht) do { } while (0) |
#define | scsi_proc_hostdir_rm(sht) do { } while (0) |
#define | scsi_proc_host_add(shost) do { } while (0) |
#define | scsi_proc_host_rm(shost) do { } while (0) |
#define | scsi_init_procfs() (0) |
#define | scsi_exit_procfs() do { } while (0) |
#define | scsi_init_sysctl() (0) |
#define | scsi_exit_sysctl() do { } while (0) |
#define | SCSI_DEVICE_BLOCK_MAX_TIMEOUT 600 /* units in seconds */ |
Enumerations | |
enum | { SCSI_DEVINFO_GLOBAL = 0, SCSI_DEVINFO_SPI } |
Definition at line 174 of file scsi_priv.h.
#define SCSI_EH_CANCEL_CMD 0x0001 /* Cancel this cmd */ |
Definition at line 21 of file scsi_priv.h.
#define scsi_exit_procfs | ( | void | ) | do { } while (0) |
Definition at line 109 of file scsi_priv.h.
#define scsi_exit_sysctl | ( | void | ) | do { } while (0) |
Definition at line 125 of file scsi_priv.h.
#define scsi_init_procfs | ( | void | ) | (0) |
Definition at line 108 of file scsi_priv.h.
#define scsi_init_sysctl | ( | void | ) | (0) |
Definition at line 124 of file scsi_priv.h.
#define scsi_proc_host_add | ( | shost | ) | do { } while (0) |
Definition at line 106 of file scsi_priv.h.
#define scsi_proc_host_rm | ( | shost | ) | do { } while (0) |
Definition at line 107 of file scsi_priv.h.
#define scsi_proc_hostdir_add | ( | sht | ) | do { } while (0) |
Definition at line 104 of file scsi_priv.h.
#define scsi_proc_hostdir_rm | ( | sht | ) | do { } while (0) |
Definition at line 105 of file scsi_priv.h.
#define SCSI_SENSE_VALID | ( | scmd | ) | (((scmd)->sense_buffer[0] & 0x70) == 0x70) |
Definition at line 23 of file scsi_priv.h.
anonymous enum |
Definition at line 47 of file scsi_priv.h.
void __scsi_remove_device | ( | struct scsi_device * | ) |
Definition at line 956 of file scsi_sysfs.c.
|
read |
Definition at line 1718 of file scsi_lib.c.
scsi_complete_async_scans - Wait for asynchronous scans to complete
When this function returns, any host which started scanning before this function was called will have finished its scan. Hosts which started scanning after this function was called may or may not have finished.
Definition at line 144 of file scsi_scan.c.
scsi_decide_disposition - Disposition a cmd on return from LLD. : SCSI cmd to examine.
Notes: This is only called when we are examining the status after sending out the actual data command. any commands that are queued for error recovery (e.g. test_unit_ready) do not come through here.
When this routine returns failed, it means the error handler thread is woken. In cases where the error code indicates an error that doesn't require the error handler read (i.e. we don't need to abort/reset), this function should return SUCCESS.
Definition at line 1427 of file scsi_error.c.
Definition at line 795 of file scsi_devinfo.c.
int scsi_dev_info_list_add_keyed | ( | int | compatible, |
char * | vendor, | ||
char * | model, | ||
char * | strflags, | ||
int | flags, | ||
int | key | ||
) |
scsi_dev_info_list_add_keyed - add one dev_info list entry. : if true, null terminate short strings. Otherwise space pad. : vendor string : model (product) string : integer string : if strflags NULL, use this flag value : specify list to use
Description: Create and add one dev_info entry for , , or in list specified by . If , add to the tail of the list, do not space pad, and set devinfo->compatible. The scsi_static_device_list entries are added with 1 and NULL.
Returns: 0 OK, -error on failure.
Definition at line 348 of file scsi_devinfo.c.
scsi_dev_info_list_del_keyed - remove one dev_info list entry. : vendor string : model (product) string : specify list to use
Description: Remove and destroy one dev_info entry for , in list specified by .
Returns: 0 OK, -error on failure.
Definition at line 399 of file scsi_devinfo.c.
void scsi_device_unbusy | ( | struct scsi_device * | sdev | ) |
Definition at line 318 of file scsi_lib.c.
scsi_eh_get_sense - Get device sense data. : Queue of commands to process. : Queue of processed commands.
Description: See if we need to request sense information. if so, then get it now, so we have a better idea of what to do.
Notes: This has the unfortunate side effect that if a shost adapter does not automatically request sense information, we end up shutting it down before we request it.
All drivers should request sense information internally these days, so for now all I have to say is tough noogies if you end up in here.
XXX: Long term this code should go away, but that needs an audit of all LLDDs first.
Definition at line 910 of file scsi_error.c.
void scsi_eh_ready_devs | ( | struct Scsi_Host * | shost, |
struct list_head * | work_q, | ||
struct list_head * | done_q | ||
) |
scsi_eh_ready_devs - check device ready state and recover if not. : host to be recovered. : &list_head for pending commands. : &list_head for processed commands.
Definition at line 1724 of file scsi_error.c.
scsi_eh_scmd_add - add scsi cmd to error handling. : scmd to run eh on. : optional SCSI_EH flag.
Return value: 0 on failure.
Definition at line 99 of file scsi_error.c.
Definition at line 59 of file scsi_error.c.
scsi_error_handler - SCSI error handler thread : Host for which we are running.
Notes: This is the main error handling loop. This is run as a kernel thread for every SCSI host and handles all error handling activity.
Definition at line 1823 of file scsi_error.c.
scsi_exit_devinfo - remove /proc/scsi/device_info & the scsi_dev_info_list
Definition at line 778 of file scsi_devinfo.c.
Definition at line 1830 of file scsi_lib.c.
Definition at line 1884 of file scsi_scan.c.
int scsi_get_device_flags | ( | struct scsi_device * | sdev, |
const unsigned char * | vendor, | ||
const unsigned char * | model | ||
) |
get_device_flags - get device specific flags from the dynamic device list. : &scsi_device to get flags for : vendor name : model name
Description: Search the global scsi_dev_info_list (specified by list zero) for an entry matching and , if found, return the matching flags value, else return the host or global default settings. Called during scan time.
Definition at line 535 of file scsi_devinfo.c.
int scsi_get_device_flags_keyed | ( | struct scsi_device * | sdev, |
const unsigned char * | vendor, | ||
const unsigned char * | model, | ||
int | key | ||
) |
scsi_get_device_flags_keyed - get device specific flags from the dynamic device list : &scsi_device to get flags for : vendor name : model name : list to look up
Description: Search the scsi_dev_info_list specified by for an entry matching and , if found, return the matching flags value, else return the host or global default settings. Called during scan time.
Definition at line 557 of file scsi_devinfo.c.
scsi_init_devinfo - set up the dynamic device list.
Description: Add command line entries from scsi_dev_flags, then add scsi_static_device_list entries to the scsi device info list.
Definition at line 860 of file scsi_devinfo.c.
Definition at line 1782 of file scsi_lib.c.
int scsi_internal_device_block | ( | struct scsi_device * | sdev | ) |
scsi_internal_device_block - internal function to put a device temporarily into the SDEV_BLOCK state : device to block
Block request made by scsi lld's to temporarily stop all scsi commands on the specified device. Called from interrupt or normal process context.
Returns zero if successful or error if not
Notes: This routine transitions the device to the SDEV_BLOCK state (which must be a legal transition). When the device is in this state, all commands are deferred until the scsi lld reenables the device with scsi_device_unblock or device_block_tmo fires.
Definition at line 2434 of file scsi_lib.c.
int scsi_internal_device_unblock | ( | struct scsi_device * | sdev, |
enum scsi_device_state | new_state | ||
) |
scsi_internal_device_unblock - resume a device after a block request : device to resume : state to set devices to after unblocking
Called by scsi lld's or the midlayer to restart the device queue for the previously suspended scsi device. Called from interrupt or normal process context.
Returns zero if successful or error if not.
Notes: This routine transitions the device to the SDEV_RUNNING state or to one of the offline states (which must be a legal transition) allowing the midlayer to goose the queue for this device.
Definition at line 2478 of file scsi_lib.c.
Definition at line 759 of file scsi_lib.c.
int scsi_maybe_unblock_host | ( | struct scsi_device * | sdev | ) |
Definition at line 520 of file scsi_lib.c.
scsi_noretry_cmd - determinte if command should be failed fast : SCSI cmd to examine.
Definition at line 1381 of file scsi_error.c.
Definition at line 204 of file scsi_lib.c.
Definition at line 1550 of file scsi_scan.c.
Definition at line 535 of file scsi_lib.c.
Definition at line 1683 of file scsi_scan.c.
scsi_setup_command_freelist - Setup the command freelist for a scsi host. : host to allocate the freelist for.
Description: The command freelist protects against system-wide out of memory deadlock by preallocating one SCSI command structure for each host, so the system can always write to a swap file on a device associated with that host.
Returns: Nothing.
scsi_sysfs_add_host - add scsi host to subsystem : scsi host struct to add to subsystem
Definition at line 1082 of file scsi_sysfs.c.
int scsi_sysfs_add_sdev | ( | struct scsi_device * | sdev | ) |
scsi_sysfs_add_sdev - add scsi device to sysfs : scsi_device to add
Return value: 0 on Success / non-zero on Failure
Definition at line 870 of file scsi_sysfs.c.
void scsi_sysfs_device_initialize | ( | struct scsi_device * | ) |
Definition at line 1107 of file scsi_sysfs.c.
Definition at line 426 of file scsi_sysfs.c.
int scsi_sysfs_target_initialize | ( | struct scsi_device * | ) |
Definition at line 440 of file scsi_sysfs.c.
scsi_times_out - Timeout function for normal scsi commands. : request that is timing out.
Notes: We do not need to lock this. There is the potential for a race only in that the normal completion handling might run, but if the normal completion function determines that the timer has already fired, then it mustn't do anything.
Definition at line 133 of file scsi_error.c.
struct scsi_transport_template blank_transport_template |
Definition at line 1140 of file scsi_sysfs.c.
Definition at line 416 of file scsi_sysfs.c.
struct async_domain scsi_sd_probe_domain |
struct kmem_cache* scsi_sdb_cache |
Definition at line 69 of file scsi_lib.c.
struct attribute_group* scsi_sysfs_shost_attr_groups[] |
Definition at line 321 of file scsi_sysfs.c.