Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
phy.h File Reference
#include <scsi/sas.h>
#include <scsi/libsas.h>
#include "isci.h"
#include "sas.h"

Go to the source code of this file.

Data Structures

struct  isci_phy
 
struct  sci_phy_cap
 
struct  sci_phy_proto
 
struct  sci_phy_properties
 
struct  sci_sas_phy_properties
 
struct  sci_sata_phy_properties
 

Macros

#define SCIC_SDS_SIGNATURE_FIS_TIMEOUT   25000
 
#define SCIC_SDS_SATA_LINK_TRAINING_TIMEOUT   250
 
#define PHY_STATES
 
#define C(a)   SCI_##a
 

Enumerations

enum  sci_phy_counter_id {
  SCIC_PHY_COUNTER_RECEIVED_FRAME, SCIC_PHY_COUNTER_TRANSMITTED_FRAME, SCIC_PHY_COUNTER_RECEIVED_FRAME_WORD, SCIC_PHY_COUNTER_TRANSMITTED_FRAME_DWORD,
  SCIC_PHY_COUNTER_LOSS_OF_SYNC_ERROR, SCIC_PHY_COUNTER_RECEIVED_DISPARITY_ERROR, SCIC_PHY_COUNTER_RECEIVED_FRAME_CRC_ERROR, SCIC_PHY_COUNTER_RECEIVED_DONE_ACK_NAK_TIMEOUT,
  SCIC_PHY_COUNTER_TRANSMITTED_DONE_ACK_NAK_TIMEOUT, SCIC_PHY_COUNTER_INACTIVITY_TIMER_EXPIRED, SCIC_PHY_COUNTER_RECEIVED_DONE_CREDIT_TIMEOUT, SCIC_PHY_COUNTER_TRANSMITTED_DONE_CREDIT_TIMEOUT,
  SCIC_PHY_COUNTER_RECEIVED_CREDIT_BLOCKED, SCIC_PHY_COUNTER_RECEIVED_SHORT_FRAME, SCIC_PHY_COUNTER_RECEIVED_FRAME_WITHOUT_CREDIT, SCIC_PHY_COUNTER_RECEIVED_FRAME_AFTER_DONE,
  SCIC_PHY_COUNTER_SN_DWORD_SYNC_ERROR
}
 

Functions

void sci_phy_construct (struct isci_phy *iphy, struct isci_port *iport, u8 phy_index)
 
struct isci_portphy_get_non_dummy_port (struct isci_phy *iphy)
 
void sci_phy_set_port (struct isci_phy *iphy, struct isci_port *iport)
 
enum sci_status sci_phy_initialize (struct isci_phy *iphy, struct scu_transport_layer_registers __iomem *transport_layer_registers, struct scu_link_layer_registers __iomem *link_layer_registers)
 
enum sci_status sci_phy_start (struct isci_phy *iphy)
 
enum sci_status sci_phy_stop (struct isci_phy *iphy)
 
enum sci_status sci_phy_reset (struct isci_phy *iphy)
 
void sci_phy_resume (struct isci_phy *iphy)
 
void sci_phy_setup_transport (struct isci_phy *iphy, u32 device_id)
 
enum sci_status sci_phy_event_handler (struct isci_phy *iphy, u32 event_code)
 
enum sci_status sci_phy_frame_handler (struct isci_phy *iphy, u32 frame_index)
 
enum sci_status sci_phy_consume_power_handler (struct isci_phy *iphy)
 
void sci_phy_get_sas_address (struct isci_phy *iphy, struct sci_sas_address *sas_address)
 
void sci_phy_get_attached_sas_address (struct isci_phy *iphy, struct sci_sas_address *sas_address)
 
void sci_phy_get_protocols (struct isci_phy *iphy, struct sci_phy_proto *protocols)
 
enum sas_linkrate sci_phy_linkrate (struct isci_phy *iphy)
 
void isci_phy_init (struct isci_phy *iphy, struct isci_host *ihost, int index)
 
int isci_phy_control (struct asd_sas_phy *phy, enum phy_func func, void *buf)
 

Variables

struct sci_phy_cap __packed
 
enum sci_phy_states PHY_STATES
 

Macro Definition Documentation

#define C (   a)    SCI_##a

Definition at line 395 of file phy.h.

#define PHY_STATES
Value:
{\
C(PHY_INITIAL),\
C(PHY_STOPPED),\
C(PHY_SUB_INITIAL),\
C(PHY_SUB_AWAIT_OSSP_EN),\
C(PHY_SUB_AWAIT_SAS_SPEED_EN),\
C(PHY_SUB_AWAIT_IAF_UF),\
C(PHY_SUB_AWAIT_SAS_POWER),\
C(PHY_SUB_AWAIT_SATA_POWER),\
C(PHY_SUB_AWAIT_SATA_PHY_EN),\
C(PHY_SUB_AWAIT_SATA_SPEED_EN),\
C(PHY_SUB_AWAIT_SIG_FIS_UF),\
C(PHY_SUB_FINAL),\
C(PHY_READY),\
C(PHY_RESETTING),\
C(PHY_FINAL),\
}

enum sci_phy_states - phy state machine states : Simply the initial state for the base domain state machine. : phy has successfully been stopped. In this state no new IO operations are permitted on this phy. : the phy is in the process of becomming ready. In this state no new IO operations are permitted on this phy. : Initial state : Wait state for the hardware OSSP event type notification : Wait state for the PHY speed notification : Wait state for the IAF Unsolicited frame notification : Wait state for the request to consume power : Wait state for request to consume power : Wait state for the SATA PHY notification : Wait for the SATA PHY speed notification : Wait state for the SIGNATURE FIS unsolicited frame notification : Exit state for this state machine : phy is now ready. Thus, the user is able to perform IO operations utilizing this phy as long as it is currently part of a valid port. This state is entered from the STARTING state. : phy is in the process of being reset. In this state no new IO operations are permitted on this phy. This state is entered from the READY state. : Simply the final state for the base phy state machine.

Definition at line 376 of file phy.h.

#define SCIC_SDS_SATA_LINK_TRAINING_TIMEOUT   250

Definition at line 77 of file phy.h.

#define SCIC_SDS_SIGNATURE_FIS_TIMEOUT   25000

Definition at line 69 of file phy.h.

Enumeration Type Documentation

enum sci_phy_counter_id - This enumeration depicts the various pieces of optional information that can be retrieved for a specific phy.

Enumerator:
SCIC_PHY_COUNTER_RECEIVED_FRAME 

This PHY information field tracks the number of frames received.

SCIC_PHY_COUNTER_TRANSMITTED_FRAME 

This PHY information field tracks the number of frames transmitted.

SCIC_PHY_COUNTER_RECEIVED_FRAME_WORD 

This PHY information field tracks the number of DWORDs received.

SCIC_PHY_COUNTER_TRANSMITTED_FRAME_DWORD 

This PHY information field tracks the number of DWORDs transmitted.

SCIC_PHY_COUNTER_LOSS_OF_SYNC_ERROR 

This PHY information field tracks the number of times DWORD synchronization was lost.

SCIC_PHY_COUNTER_RECEIVED_DISPARITY_ERROR 

This PHY information field tracks the number of received DWORDs with running disparity errors.

SCIC_PHY_COUNTER_RECEIVED_FRAME_CRC_ERROR 

This PHY information field tracks the number of received frames with a CRC error (not including short or truncated frames).

SCIC_PHY_COUNTER_RECEIVED_DONE_ACK_NAK_TIMEOUT 

This PHY information field tracks the number of DONE (ACK/NAK TIMEOUT) primitives received.

SCIC_PHY_COUNTER_TRANSMITTED_DONE_ACK_NAK_TIMEOUT 

This PHY information field tracks the number of DONE (ACK/NAK TIMEOUT) primitives transmitted.

SCIC_PHY_COUNTER_INACTIVITY_TIMER_EXPIRED 

This PHY information field tracks the number of times the inactivity timer for connections on the phy has been utilized.

SCIC_PHY_COUNTER_RECEIVED_DONE_CREDIT_TIMEOUT 

This PHY information field tracks the number of DONE (CREDIT TIMEOUT) primitives received.

SCIC_PHY_COUNTER_TRANSMITTED_DONE_CREDIT_TIMEOUT 

This PHY information field tracks the number of DONE (CREDIT TIMEOUT) primitives transmitted.

SCIC_PHY_COUNTER_RECEIVED_CREDIT_BLOCKED 

This PHY information field tracks the number of CREDIT BLOCKED primitives received.

Note
Depending on remote device implementation, credit blocks may occur regularly.
SCIC_PHY_COUNTER_RECEIVED_SHORT_FRAME 

This PHY information field contains the number of short frames received. A short frame is simply a frame smaller then what is allowed by either the SAS or SATA specification.

SCIC_PHY_COUNTER_RECEIVED_FRAME_WITHOUT_CREDIT 

This PHY information field contains the number of frames received after credit has been exhausted.

SCIC_PHY_COUNTER_RECEIVED_FRAME_AFTER_DONE 

This PHY information field contains the number of frames received after a DONE has been received.

SCIC_PHY_COUNTER_SN_DWORD_SYNC_ERROR 

This PHY information field contains the number of times the phy failed to achieve DWORD synchronization during speed negotiation.

Definition at line 236 of file phy.h.

Function Documentation

int isci_phy_control ( struct asd_sas_phy sas_phy,
enum phy_func  func,
void buf 
)

isci_phy_control() - This function is one of the SAS Domain Template functions. This is a phy management function. : This parameter specifies the sphy being controlled. : This parameter specifies the phy control function being invoked. : This parameter is specific to the phy function being invoked.

status, zero indicates success.

Definition at line 1430 of file phy.c.

void isci_phy_init ( struct isci_phy iphy,
struct isci_host ihost,
int  index 
)

Definition at line 1391 of file phy.c.

struct isci_port* phy_get_non_dummy_port ( struct isci_phy iphy)
read

This method returns the port currently containing this phy. If the phy is currently contained by the dummy port, then the phy is considered to not be part of a port. : This parameter specifies the phy for which to retrieve the containing port.

This method returns a handle to a port that contains the supplied phy. NULL This value is returned if the phy is not part of a real port (i.e. it's contained in the dummy port). !NULL All other values indicate a handle/pointer to the port containing the phy.

Definition at line 353 of file phy.c.

void sci_phy_construct ( struct isci_phy iphy,
struct isci_port iport,
u8  phy_index 
)

Definition at line 1374 of file phy.c.

enum sci_status sci_phy_consume_power_handler ( struct isci_phy iphy)

Definition at line 521 of file phy.c.

enum sci_status sci_phy_event_handler ( struct isci_phy iphy,
u32  event_code 
)

Definition at line 684 of file phy.c.

enum sci_status sci_phy_frame_handler ( struct isci_phy iphy,
u32  frame_index 
)

Definition at line 970 of file phy.c.

void sci_phy_get_attached_sas_address ( struct isci_phy iphy,
struct sci_sas_address sas_address 
)

Definition at line 454 of file phy.c.

void sci_phy_get_protocols ( struct isci_phy iphy,
struct sci_phy_proto protocols 
)

Definition at line 462 of file phy.c.

void sci_phy_get_sas_address ( struct isci_phy iphy,
struct sci_sas_address sas_address 
)

Definition at line 448 of file phy.c.

enum sci_status sci_phy_initialize ( struct isci_phy iphy,
struct scu_transport_layer_registers __iomem transport_layer_registers,
struct scu_link_layer_registers __iomem link_layer_registers 
)

Definition at line 382 of file phy.c.

enum sas_linkrate sci_phy_linkrate ( struct isci_phy iphy)

Definition at line 75 of file phy.c.

enum sci_status sci_phy_reset ( struct isci_phy iphy)

Definition at line 507 of file phy.c.

void sci_phy_resume ( struct isci_phy iphy)

Definition at line 437 of file phy.c.

void sci_phy_set_port ( struct isci_phy iphy,
struct isci_port iport 
)

This method will assign a port to the phy object. ]: iphy This parameter specifies the phy for which to assign a port object.

Definition at line 370 of file phy.c.

void sci_phy_setup_transport ( struct isci_phy iphy,
u32  device_id 
)

This method assigns the direct attached device ID for this phy.

The phy for which the direct attached device id is to be assigned. The direct attached device ID to assign to the phy. This will either be the RNi for the device or an invalid RNi if there is no current device assigned to the phy.

Definition at line 409 of file phy.c.

enum sci_status sci_phy_start ( struct isci_phy iphy)

Definition at line 467 of file phy.c.

enum sci_status sci_phy_stop ( struct isci_phy iphy)

Definition at line 481 of file phy.c.

Variable Documentation

enum sci_phy_states PHY_STATES

Definition at line 396 of file phy.h.