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

Go to the source code of this file.

Data Structures

struct  isci_port
 
struct  sci_port_end_point_properties
 
struct  sci_port_properties
 

Macros

#define SCIC_SDS_DUMMY_PORT   0xFF
 
#define PF_NOTIFY   (1 << 0)
 
#define PF_RESUME   (1 << 1)
 
#define IPORT_RESET_PENDING   0
 
#define PORT_STATES
 
#define C(a)   SCI_##a
 
#define sci_port_active_phy(port, phy)   (((port)->active_phy_mask & (1 << (phy)->phy_index)) != 0)
 

Enumerations

enum  isci_status {
  isci_freed = 0x00, isci_starting = 0x01, isci_ready = 0x02, isci_ready_for_io = 0x03,
  isci_stopping = 0x04, isci_stopped = 0x05
}
 
enum  sci_port_not_ready_reason_code {
  SCIC_PORT_NOT_READY_NO_ACTIVE_PHYS, SCIC_PORT_NOT_READY_HARD_RESET_REQUESTED, SCIC_PORT_NOT_READY_INVALID_PORT_CONFIGURATION, SCIC_PORT_NOT_READY_RECONFIGURING,
  SCIC_PORT_NOT_READY_REASON_CODE_MAX
}
 

Functions

void sci_port_construct (struct isci_port *iport, u8 port_index, struct isci_host *ihost)
 
enum sci_status sci_port_start (struct isci_port *iport)
 
enum sci_status sci_port_stop (struct isci_port *iport)
 
enum sci_status sci_port_add_phy (struct isci_port *iport, struct isci_phy *iphy)
 
enum sci_status sci_port_remove_phy (struct isci_port *iport, struct isci_phy *iphy)
 
void sci_port_setup_transports (struct isci_port *iport, u32 device_id)
 
void isci_port_bcn_enable (struct isci_host *, struct isci_port *)
 
void sci_port_deactivate_phy (struct isci_port *iport, struct isci_phy *iphy, bool do_notify_user)
 
bool sci_port_link_detected (struct isci_port *iport, struct isci_phy *iphy)
 
enum sci_status sci_port_get_properties (struct isci_port *iport, struct sci_port_properties *prop)
 
enum sci_status sci_port_link_up (struct isci_port *iport, struct isci_phy *iphy)
 
enum sci_status sci_port_link_down (struct isci_port *iport, struct isci_phy *iphy)
 
enum sci_status sci_port_start_io (struct isci_port *iport, struct isci_remote_device *idev, struct isci_request *ireq)
 
enum sci_status sci_port_complete_io (struct isci_port *iport, struct isci_remote_device *idev, struct isci_request *ireq)
 
enum sas_linkrate sci_port_get_max_allowed_speed (struct isci_port *iport)
 
void sci_port_broadcast_change_received (struct isci_port *iport, struct isci_phy *iphy)
 
bool sci_port_is_valid_phy_assignment (struct isci_port *iport, u32 phy_index)
 
void sci_port_get_sas_address (struct isci_port *iport, struct sci_sas_address *sas_address)
 
void sci_port_get_attached_sas_address (struct isci_port *iport, struct sci_sas_address *sas_address)
 
void sci_port_set_hang_detection_timeout (struct isci_port *isci_port, u32 timeout)
 
void isci_port_formed (struct asd_sas_phy *)
 
void isci_port_deformed (struct asd_sas_phy *)
 
int isci_port_perform_hard_reset (struct isci_host *ihost, struct isci_port *iport, struct isci_phy *iphy)
 
int isci_ata_check_ready (struct domain_device *dev)
 

Variables

enum sci_port_states PORT_STATES
 

Macro Definition Documentation

#define C (   a)    SCI_##a

Definition at line 185 of file port.h.

#define IPORT_RESET_PENDING   0

Definition at line 100 of file port.h.

#define PF_NOTIFY   (1 << 0)

Definition at line 66 of file port.h.

#define PF_RESUME   (1 << 1)

Definition at line 67 of file port.h.

#define PORT_STATES
Value:
{\
C(PORT_STOPPED),\
C(PORT_STOPPING),\
C(PORT_READY),\
C(PORT_SUB_WAITING),\
C(PORT_SUB_OPERATIONAL),\
C(PORT_SUB_CONFIGURING),\
C(PORT_RESETTING),\
C(PORT_FAILED),\
}

enum sci_port_states - port state machine states : port has successfully been stopped. In this state no new IO operations are permitted. This state is entered from the STOPPING state. : port is in the process of stopping. In this state no new IO operations are permitted, but existing IO operations are allowed to complete. This state is entered from the READY state. : port is now ready. Thus, the user is able to perform IO operations on this port. This state is entered from the STARTING state. : port is started and ready but has no active phys. : port is started and ready and there is at least one phy operational. : port is started and there was an add/remove phy event. This state is only used in Automatic Port Configuration Mode (APC) : port is in the process of performing a hard reset. Thus, the user is unable to perform IO operations on this port. This state is entered from the READY state. : port has failed a reset request. This state is entered when a port reset request times out. This state is entered from the RESETTING state.

Definition at line 174 of file port.h.

#define sci_port_active_phy (   port,
  phy 
)    (((port)->active_phy_mask & (1 << (phy)->phy_index)) != 0)

Definition at line 199 of file port.h.

#define SCIC_SDS_DUMMY_PORT   0xFF

Definition at line 64 of file port.h.

Enumeration Type Documentation

Enumerator:
isci_freed 
isci_starting 
isci_ready 
isci_ready_for_io 
isci_stopping 
isci_stopped 

Definition at line 72 of file port.h.

Enumerator:
SCIC_PORT_NOT_READY_NO_ACTIVE_PHYS 
SCIC_PORT_NOT_READY_HARD_RESET_REQUESTED 
SCIC_PORT_NOT_READY_INVALID_PORT_CONFIGURATION 
SCIC_PORT_NOT_READY_RECONFIGURING 
SCIC_PORT_NOT_READY_REASON_CODE_MAX 

Definition at line 125 of file port.h.

Function Documentation

int isci_ata_check_ready ( struct domain_device dev)

Definition at line 1694 of file port.c.

void isci_port_bcn_enable ( struct isci_host ,
struct isci_port  
)
void isci_port_deformed ( struct asd_sas_phy )

Definition at line 1719 of file port.c.

void isci_port_formed ( struct asd_sas_phy )

Definition at line 1744 of file port.c.

int isci_port_perform_hard_reset ( struct isci_host ihost,
struct isci_port iport,
struct isci_phy iphy 
)

Definition at line 1648 of file port.c.

enum sci_status sci_port_add_phy ( struct isci_port iport,
struct isci_phy iphy 
)

sci_port_add_phy() - : This parameter specifies the port in which the phy will be added. : This parameter is the phy which is to be added to the port.

This method will add a PHY to the selected port. This method returns an enum sci_status. SCI_SUCCESS the phy has been added to the port. Any other status is a failure to add the phy to the port.

Definition at line 1196 of file port.c.

void sci_port_broadcast_change_received ( struct isci_port iport,
struct isci_phy iphy 
)

Definition at line 1635 of file port.c.

enum sci_status sci_port_complete_io ( struct isci_port iport,
struct isci_remote_device idev,
struct isci_request ireq 
)

Definition at line 1401 of file port.c.

void sci_port_construct ( struct isci_port iport,
u8  port_index,
struct isci_host ihost 
)

Definition at line 1606 of file port.c.

void sci_port_deactivate_phy ( struct isci_port iport,
struct isci_phy iphy,
bool  do_notify_user 
)

Definition at line 638 of file port.c.

void sci_port_get_attached_sas_address ( struct isci_port iport,
struct sci_sas_address sas_address 
)

Definition at line 510 of file port.c.

enum sas_linkrate sci_port_get_max_allowed_speed ( struct isci_port iport)

Definition at line 846 of file port.c.

enum sci_status sci_port_get_properties ( struct isci_port iport,
struct sci_port_properties prop 
)

sci_port_get_properties() - This method simply returns the properties regarding the port, such as: physical index, protocols, sas address, etc. : this parameter specifies the port for which to retrieve the physical index. : This parameter specifies the properties structure into which to copy the requested information.

Indicate if the user specified a valid port. SCI_SUCCESS This value is returned if the specified port was valid. SCI_FAILURE_INVALID_PORT This value is returned if the specified port is not valid. When this value is returned, no data is copied to the properties output parameter.

Definition at line 128 of file port.c.

void sci_port_get_sas_address ( struct isci_port iport,
struct sci_sas_address sas_address 
)

Definition at line 499 of file port.c.

bool sci_port_is_valid_phy_assignment ( struct isci_port iport,
u32  phy_index 
)

Definition at line 362 of file port.c.

bool sci_port_link_detected ( struct isci_port iport,
struct isci_phy iphy 
)

This method is called by the PHY object when the link is detected. if the port wants the PHY to continue on to the link up state then the port layer must return true. If the port object returns false the phy object must halt its attempt to go link up. : The port associated with the phy object. : The phy object that is trying to go link up.

true if the phy object can continue to the link up condition. true Is returned if this phy can continue to the ready state. false Is returned if can not continue on to the ready state. This notification is in place for wide ports and direct attached phys. Since there are no wide ported SATA devices this could become an invalid port configuration.

Definition at line 754 of file port.c.

enum sci_status sci_port_link_down ( struct isci_port iport,
struct isci_phy iphy 
)

Definition at line 1351 of file port.c.

enum sci_status sci_port_link_up ( struct isci_port iport,
struct isci_phy iphy 
)

Definition at line 1308 of file port.c.

enum sci_status sci_port_remove_phy ( struct isci_port iport,
struct isci_phy iphy 
)

sci_port_remove_phy() - : This parameter specifies the port in which the phy will be added. : This parameter is the phy which is to be added to the port.

This method will remove the PHY from the selected PORT. This method returns an enum sci_status. SCI_SUCCESS the phy has been removed from the port. Any other status is a failure to add the phy to the port.

Definition at line 1267 of file port.c.

void sci_port_set_hang_detection_timeout ( struct isci_port isci_port,
u32  timeout 
)

Definition at line 1551 of file port.c.

void sci_port_setup_transports ( struct isci_port iport,
u32  device_id 
)

Definition at line 605 of file port.c.

enum sci_status sci_port_start ( struct isci_port iport)

Definition at line 1056 of file port.c.

enum sci_status sci_port_start_io ( struct isci_port iport,
struct isci_remote_device idev,
struct isci_request ireq 
)

Definition at line 1381 of file port.c.

enum sci_status sci_port_stop ( struct isci_port iport)

Definition at line 1124 of file port.c.

Variable Documentation

enum sci_port_states PORT_STATES

Definition at line 186 of file port.h.