Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
port.c File Reference
#include "isci.h"
#include "port.h"
#include "request.h"

Go to the source code of this file.

Macros

#define SCIC_SDS_PORT_HARD_RESET_TIMEOUT   (1000)
 
#define SCU_DUMMY_INDEX   (0xFFFF)
 
#define C(a)   (#a)
 
#define ISCI_PORT_RESET_TIMEOUT   SCIC_SDS_SIGNATURE_FIS_TIMEOUT
 

Functions

const charport_state_name (enum sci_port_states state)
 
enum sci_status sci_port_get_properties (struct isci_port *iport, struct sci_port_properties *prop)
 
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)
 
void sci_port_get_attached_sas_address (struct isci_port *iport, struct sci_sas_address *sas)
 
void sci_port_setup_transports (struct isci_port *iport, u32 device_id)
 
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 sas_linkrate sci_port_get_max_allowed_speed (struct isci_port *iport)
 
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)
 
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)
 
void sci_port_set_hang_detection_timeout (struct isci_port *iport, u32 timeout)
 
void sci_port_construct (struct isci_port *iport, u8 index, struct isci_host *ihost)
 
void sci_port_broadcast_change_received (struct isci_port *iport, struct isci_phy *iphy)
 
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)
 
void isci_port_deformed (struct asd_sas_phy *phy)
 
void isci_port_formed (struct asd_sas_phy *phy)
 

Macro Definition Documentation

#define C (   a)    (#a)

Definition at line 64 of file port.c.

#define ISCI_PORT_RESET_TIMEOUT   SCIC_SDS_SIGNATURE_FIS_TIMEOUT
#define SCIC_SDS_PORT_HARD_RESET_TIMEOUT   (1000)

Definition at line 60 of file port.c.

#define SCU_DUMMY_INDEX   (0xFFFF)

Definition at line 61 of file port.c.

Function Documentation

int isci_ata_check_ready ( struct domain_device dev)

Definition at line 1694 of file port.c.

void isci_port_deformed ( struct asd_sas_phy phy)

Definition at line 1719 of file port.c.

void isci_port_formed ( struct asd_sas_phy 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.

const char* port_state_name ( enum sci_port_states  state)

Definition at line 65 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  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 
)

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 
)

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 iport,
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.