#include <linux/ctype.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/workqueue.h>
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/slab.h>
#include <scsi/scsi.h>
#include "scsi_priv.h"
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_eh.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_spi.h>
Go to the source code of this file.
|
#define | SPI_NUM_ATTRS 14 /* increase this if you add attributes */ |
|
#define | SPI_OTHER_ATTRS |
|
#define | SPI_HOST_ATTRS 1 |
|
#define | SPI_MAX_ECHO_BUFFER_SIZE 4096 |
|
#define | DV_LOOPS 3 |
|
#define | DV_TIMEOUT (10*HZ) |
|
#define | DV_RETRIES |
|
#define | spi_dv_in_progress(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_in_progress) |
|
#define | spi_dv_mutex(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_mutex) |
|
#define | to_spi_internal(tmpl) container_of(tmpl, struct spi_internal, t) |
|
#define | SPI_STATIC_PPR 0x0c |
|
#define | spi_transport_show_simple(field, format_string) |
|
#define | spi_transport_store_simple(field, format_string) |
|
#define | spi_transport_show_function(field, format_string) |
|
#define | spi_transport_store_function(field, format_string) |
|
#define | spi_transport_store_max(field, format_string) |
|
#define | spi_transport_rd_attr(field, format_string) |
|
#define | spi_transport_simple_attr(field, format_string) |
|
#define | spi_transport_max_attr(field, format_string) |
|
#define | DV_SET(x, y) |
|
#define | TARGET_ATTRIBUTE_HELPER(name) |
|
|
| spi_transport_max_attr (offset,"%d\n") |
|
| spi_transport_max_attr (width,"%d\n") |
|
| spi_transport_max_attr (iu,"%d\n") |
|
| spi_transport_rd_attr (dt,"%d\n") |
|
| spi_transport_max_attr (qas,"%d\n") |
|
| spi_transport_rd_attr (wr_flow,"%d\n") |
|
| spi_transport_rd_attr (rd_strm,"%d\n") |
|
| spi_transport_rd_attr (rti,"%d\n") |
|
| spi_transport_rd_attr (pcomp_en,"%d\n") |
|
| spi_transport_rd_attr (hold_mcs,"%d\n") |
|
void | spi_dv_device (struct scsi_device *sdev) |
|
| EXPORT_SYMBOL (spi_dv_device) |
|
void | spi_schedule_dv_device (struct scsi_device *sdev) |
|
| EXPORT_SYMBOL (spi_schedule_dv_device) |
|
void | spi_display_xfer_agreement (struct scsi_target *starget) |
|
| EXPORT_SYMBOL (spi_display_xfer_agreement) |
|
int | spi_populate_width_msg (unsigned char *msg, int width) |
|
| EXPORT_SYMBOL_GPL (spi_populate_width_msg) |
|
int | spi_populate_sync_msg (unsigned char *msg, int period, int offset) |
|
| EXPORT_SYMBOL_GPL (spi_populate_sync_msg) |
|
int | spi_populate_ppr_msg (unsigned char *msg, int period, int offset, int width, int options) |
|
| EXPORT_SYMBOL_GPL (spi_populate_ppr_msg) |
|
int | spi_print_msg (const unsigned char *msg) |
|
| EXPORT_SYMBOL (spi_print_msg) |
|
struct scsi_transport_template * | spi_attach_transport (struct spi_function_template *ft) |
|
| EXPORT_SYMBOL (spi_attach_transport) |
|
void | spi_release_transport (struct scsi_transport_template *t) |
|
| EXPORT_SYMBOL (spi_release_transport) |
|
| MODULE_AUTHOR ("Martin Hicks") |
|
| MODULE_DESCRIPTION ("SPI Transport Attributes") |
|
| MODULE_LICENSE ("GPL") |
|
| module_init (spi_transport_init) |
|
| module_exit (spi_transport_exit) |
|
#define DV_TIMEOUT (10*HZ) |
#define SPI_MAX_ECHO_BUFFER_SIZE 4096 |
#define SPI_STATIC_PPR 0x0c |
#define spi_transport_max_attr |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
Value:
spi_transport_store_max(
field, format_string) \
spi_transport_simple_attr(max_##
field, format_string) \
show_spi_transport_##
field, \
store_spi_transport_##field);
Definition at line 376 of file scsi_transport_spi.c.
#define spi_transport_rd_attr |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
Value:
spi_transport_store_function(
field, format_string) \
show_spi_transport_##
field, \
store_spi_transport_##field);
Definition at line 362 of file scsi_transport_spi.c.
#define spi_transport_show_function |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
#define spi_transport_show_simple |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
#define spi_transport_simple_attr |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
Value:
spi_transport_store_simple(
field, format_string) \
show_spi_transport_##
field, \
store_spi_transport_##field);
Definition at line 369 of file scsi_transport_spi.c.
#define spi_transport_store_function |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
#define spi_transport_store_max |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
#define spi_transport_store_simple |
( |
|
field, |
|
|
|
format_string |
|
) |
| |
#define TARGET_ATTRIBUTE_HELPER |
( |
|
name | ) |
|
- Enumerator:
SPI_COMPARE_SUCCESS |
|
SPI_COMPARE_FAILURE |
|
SPI_COMPARE_SKIP_TEST |
|
Definition at line 624 of file scsi_transport_spi.c.
MODULE_AUTHOR |
( |
"Martin Hicks" |
| ) |
|
module_exit |
( |
spi_transport_exit |
| ) |
|
module_init |
( |
spi_transport_init |
| ) |
|
spi_display_xfer_agreement - Print the current target transfer agreement : The target for which to display the agreement
Each SPI port is required to maintain a transfer agreement for each other port on the bus. This function prints a one-line summary of the current agreement; more detailed information is available in sysfs.
Definition at line 1118 of file scsi_transport_spi.c.
spi_dv_device - Do Domain Validation on the device : scsi device to validate
Performs the domain validation on the given device in the current execution thread. Since DV operations may sleep, the current thread must have user context. Also no SCSI related locks that would deadlock I/O issued by the DV may be held.
Definition at line 1005 of file scsi_transport_spi.c.
int spi_populate_ppr_msg |
( |
unsigned char * |
msg, |
|
|
int |
period, |
|
|
int |
offset, |
|
|
int |
width, |
|
|
int |
options |
|
) |
| |
int spi_populate_sync_msg |
( |
unsigned char * |
msg, |
|
|
int |
period, |
|
|
int |
offset |
|
) |
| |
int spi_populate_width_msg |
( |
unsigned char * |
msg, |
|
|
int |
width |
|
) |
| |
spi_schedule_dv_device - schedule domain validation to occur on the device : The device to validate
Identical to spi_dv_device() above, except that the DV will be scheduled to occur in a workqueue later. All memory allocations are atomic, so may be called from any context including those holding SCSI locks.
Definition at line 1083 of file scsi_transport_spi.c.
spi_transport_max_attr |
( |
offset |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_max_attr |
( |
width |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_max_attr |
( |
iu |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_max_attr |
( |
qas |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_rd_attr |
( |
dt |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_rd_attr |
( |
wr_flow |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_rd_attr |
( |
rd_strm |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_rd_attr |
( |
rti |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_rd_attr |
( |
pcomp_en |
, |
|
|
"%d\n" |
|
|
) |
| |
spi_transport_rd_attr |
( |
hold_mcs |
, |
|
|
"%d\n" |
|
|
) |
| |