Linux Kernel
3.7.1
|
#include <linux/transport_class.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <scsi/sas.h>
Go to the source code of this file.
Data Structures | |
struct | sas_identify |
struct | sas_phy |
struct | sas_rphy |
struct | sas_end_device |
struct | sas_expander_device |
struct | sas_port |
struct | sas_phy_linkrates |
struct | sas_function_template |
Macros | |
#define | dev_to_phy(d) container_of((d), struct sas_phy, dev) |
#define | transport_class_to_phy(dev) dev_to_phy((dev)->parent) |
#define | phy_to_shost(phy) dev_to_shost((phy)->dev.parent) |
#define | dev_to_rphy(d) container_of((d), struct sas_rphy, dev) |
#define | transport_class_to_rphy(dev) dev_to_rphy((dev)->parent) |
#define | rphy_to_shost(rphy) dev_to_shost((rphy)->dev.parent) |
#define | target_to_rphy(targ) dev_to_rphy((targ)->dev.parent) |
#define | rphy_to_end_device(r) container_of((r), struct sas_end_device, rphy) |
#define | SAS_EXPANDER_VENDOR_ID_LEN 8 |
#define | SAS_EXPANDER_PRODUCT_ID_LEN 16 |
#define | SAS_EXPANDER_PRODUCT_REV_LEN 4 |
#define | SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN 8 |
#define | rphy_to_expander_device(r) container_of((r), struct sas_expander_device, rphy) |
#define | dev_to_sas_port(d) container_of((d), struct sas_port, dev) |
#define | transport_class_to_sas_port(dev) dev_to_sas_port((dev)->parent) |
#define | scsi_is_sas_phy_local(phy) scsi_is_host_device((phy)->dev.parent) |
Enumerations | |
enum | sas_device_type { SAS_PHY_UNUSED = 0, SAS_END_DEVICE = 1, SAS_EDGE_EXPANDER_DEVICE = 2, SAS_FANOUT_EXPANDER_DEVICE = 3 } |
enum | sas_linkrate { SAS_LINK_RATE_UNKNOWN = 0, SAS_PHY_DISABLED = 1, SAS_PHY_RESET_PROBLEM = 2, SAS_SATA_SPINUP_HOLD = 3, SAS_SATA_PORT_SELECTOR = 4, SAS_PHY_RESET_IN_PROGRESS = 5, SAS_LINK_RATE_1_5_GBPS = 8, SAS_LINK_RATE_G1 = SAS_LINK_RATE_1_5_GBPS, SAS_LINK_RATE_3_0_GBPS = 9, SAS_LINK_RATE_G2 = SAS_LINK_RATE_3_0_GBPS, SAS_LINK_RATE_6_0_GBPS = 10, SAS_LINK_RATE_FAILED = 0x10, SAS_PHY_VIRTUAL = 0x11 } |
Definition at line 82 of file scsi_transport_sas.h.
Definition at line 98 of file scsi_transport_sas.h.
Definition at line 156 of file scsi_transport_sas.h.
#define phy_to_shost | ( | phy | ) | dev_to_shost((phy)->dev.parent) |
Definition at line 86 of file scsi_transport_sas.h.
#define rphy_to_end_device | ( | r | ) | container_of((r), struct sas_end_device, rphy) |
Definition at line 117 of file scsi_transport_sas.h.
#define rphy_to_expander_device | ( | r | ) | container_of((r), struct sas_expander_device, rphy) |
Definition at line 138 of file scsi_transport_sas.h.
#define rphy_to_shost | ( | rphy | ) | dev_to_shost((rphy)->dev.parent) |
Definition at line 102 of file scsi_transport_sas.h.
#define SAS_EXPANDER_COMPONENT_VENDOR_ID_LEN 8 |
Definition at line 130 of file scsi_transport_sas.h.
#define SAS_EXPANDER_PRODUCT_ID_LEN 16 |
Definition at line 126 of file scsi_transport_sas.h.
#define SAS_EXPANDER_PRODUCT_REV_LEN 4 |
Definition at line 128 of file scsi_transport_sas.h.
#define SAS_EXPANDER_VENDOR_ID_LEN 8 |
Definition at line 124 of file scsi_transport_sas.h.
#define scsi_is_sas_phy_local | ( | phy | ) | scsi_is_host_device((phy)->dev.parent) |
Definition at line 235 of file scsi_transport_sas.h.
#define target_to_rphy | ( | targ | ) | dev_to_rphy((targ)->dev.parent) |
Definition at line 104 of file scsi_transport_sas.h.
#define transport_class_to_phy | ( | dev | ) | dev_to_phy((dev)->parent) |
Definition at line 84 of file scsi_transport_sas.h.
#define transport_class_to_rphy | ( | dev | ) | dev_to_rphy((dev)->parent) |
Definition at line 100 of file scsi_transport_sas.h.
#define transport_class_to_sas_port | ( | dev | ) | dev_to_sas_port((dev)->parent) |
Definition at line 158 of file scsi_transport_sas.h.
enum sas_device_type |
Definition at line 13 of file scsi_transport_sas.h.
enum sas_linkrate |
Definition at line 26 of file scsi_transport_sas.h.
|
read |
sas_attach_transport - instantiate SAS transport template : SAS transport class function template
Definition at line 1793 of file scsi_transport_sas.c.
void sas_disable_tlr | ( | struct scsi_device * | sdev | ) |
sas_disable_tlr - setting TLR flags : scsi device struct
Seting tlr_enabled flag to 0.
Definition at line 411 of file scsi_transport_sas.c.
void sas_enable_tlr | ( | struct scsi_device * | sdev | ) |
sas_enable_tlr - setting TLR flags : scsi device struct
Seting tlr_enabled flag 1.
Definition at line 426 of file scsi_transport_sas.c.
sas_end_device_alloc - allocate an rphy for an end device : which port
Allocates an SAS remote PHY structure, connected to .
Returns: SAS PHY allocated or NULL if the allocation failed.
Definition at line 1479 of file scsi_transport_sas.c.
|
read |
sas_expander_alloc - allocate an rphy for an end device : which port : SAS_EDGE_EXPANDER_DEVICE or SAS_FANOUT_EXPANDER_DEVICE
Allocates an SAS remote PHY structure, connected to .
Returns: SAS PHY allocated or NULL if the allocation failed.
Definition at line 1518 of file scsi_transport_sas.c.
unsigned int sas_is_tlr_enabled | ( | struct scsi_device * | ) |
Definition at line 441 of file scsi_transport_sas.c.
sas_phy_alloc - allocates and initialize a SAS PHY structure : Parent device : Phy index
Allocates an SAS PHY structure. It will be added in the device tree below the device specified by , which has to be either a Scsi_Host or sas_rphy.
Returns: SAS PHY allocated or NULL if the allocation failed.
Definition at line 715 of file scsi_transport_sas.c.
sas_phy_free - free a SAS PHY : SAS PHY to free
Note: This function must only be called on a PHY that has not successfully been added using sas_phy_add().
Definition at line 774 of file scsi_transport_sas.c.
sas_port_add - add a SAS port to the device hierarchy : port to be added
publishes a port to the rest of the system
Definition at line 975 of file scsi_transport_sas.c.
sas_port_add_phy - add another phy to a port to form a wide port : port to add the phy to : phy to add
When a port is initially created, it is empty (has no phys). All ports must have at least one phy to operated, and all wide ports must have at least two. The current code makes no difference between ports and wide ports, but the only object that can be connected to a remote device is a port, so ports must be formed on all devices with phys if they're connected to anything.
Definition at line 1098 of file scsi_transport_sas.c.
sas_port_alloc - allocate and initialize a SAS port structure
: parent device : port number
Allocates a SAS port structure. It will be added to the device tree below the device specified by which must be either a Scsi_Host or a sas_expander_device.
Returns NULL on error
Definition at line 904 of file scsi_transport_sas.c.
sas_port_alloc_num - allocate and initialize a SAS port structure
: parent device
Allocates a SAS port structure and a number to go with it. This interface is really for adapters where the port number has no meansing, so the sas class should manage them. It will be added to the device tree below the device specified by which must be either a Scsi_Host or a sas_expander_device.
Returns NULL on error
Definition at line 949 of file scsi_transport_sas.c.
sas_port_delete - remove SAS PORT : SAS PORT to remove
Removes the specified SAS PORT. If the SAS PORT has an associated phys, unlink them from the port as well.
Definition at line 1018 of file scsi_transport_sas.c.
sas_port_delete_phy - remove a phy from a port or wide port : port to remove the phy from : phy to remove
This operation is used for tearing down ports again. It must be done to every port or wide port before calling sas_port_delete.
Definition at line 1132 of file scsi_transport_sas.c.
sas_port_free - free a SAS PORT : SAS PORT to free
Frees the specified SAS PORT.
Note: This function must only be called on a PORT that has not successfully been added using sas_port_add().
Definition at line 1004 of file scsi_transport_sas.c.
sas_port_get_phy - try to take a reference on a port member : port to check
Definition at line 1067 of file scsi_transport_sas.c.
Definition at line 1142 of file scsi_transport_sas.c.
int sas_read_port_mode_page | ( | struct scsi_device * | ) |
Definition at line 1272 of file scsi_transport_sas.c.
void sas_release_transport | ( | struct scsi_transport_template * | t | ) |
sas_release_transport - release SAS transport template instance : transport template instance
Definition at line 1901 of file scsi_transport_sas.c.
sas_remove_children - tear down a devices SAS data structures : device belonging to the sas object
Removes all SAS PHYs and remote PHYs for a given object
Definition at line 348 of file scsi_transport_sas.c.
sas_remove_host - tear down a Scsi_Host's SAS data structures : Scsi Host that is torn down
Removes all SAS PHYs and remote PHYs for a given Scsi_Host. Must be called just before scsi_remove_host for SAS HBAs.
Definition at line 362 of file scsi_transport_sas.c.
sas_rphy_free - free a SAS remote PHY : SAS remote PHY to free
Frees the specified SAS remote PHY.
Note: This function must only be called on a remote PHY that has not successfully been added using sas_rphy_add() (or has been sas_rphy_remove()'d)
Definition at line 1613 of file scsi_transport_sas.c.
sas_rphy_remove - remove SAS remote PHY : SAS remote phy to remove
Removes the specified SAS remote PHY.
Definition at line 1666 of file scsi_transport_sas.c.
sas_rphy_unlink - unlink SAS remote PHY : SAS remote phy to unlink from its parent port
Removes port reference to an rphy
Definition at line 1651 of file scsi_transport_sas.c.
unsigned int sas_tlr_supported | ( | struct scsi_device * | sdev | ) |
sas_tlr_supported - checking TLR bit in vpd 0x90 : scsi device struct
Check Transport Layer Retries are supported or not. If vpd page 0x90 is present, TRL is supported.
Definition at line 377 of file scsi_transport_sas.c.
scsi_is_sas_phy - check if a struct device represents a SAS PHY : device to check
Returns: %1 if the device represents a SAS PHY, %0 else
Definition at line 810 of file scsi_transport_sas.c.
scsi_is_sas_port - check if a struct device represents a SAS port : device to check
Returns: %1 if the device represents a SAS Port, %0 else
Definition at line 1057 of file scsi_transport_sas.c.