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

Go to the source code of this file.

Macros

#define C(a)   (#a)
 
#define SCIC_SDS_PHY_MAX_ARBITRATION_WAIT_TIME   (700)
 
#define SCI_END_DEVICE   0x01
 
#define phy_event_dbg(iphy, state, code)
 
#define phy_event_warn(iphy, state, code)
 

Functions

enum sas_linkrate sci_phy_linkrate (struct isci_phy *iphy)
 
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 *tl, struct scu_link_layer_registers __iomem *ll)
 
void sci_phy_setup_transport (struct isci_phy *iphy, u32 device_id)
 
void sci_phy_resume (struct isci_phy *iphy)
 
void sci_phy_get_sas_address (struct isci_phy *iphy, struct sci_sas_address *sas)
 
void sci_phy_get_attached_sas_address (struct isci_phy *iphy, struct sci_sas_address *sas)
 
void sci_phy_get_protocols (struct isci_phy *iphy, struct sci_phy_proto *proto)
 
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)
 
enum sci_status sci_phy_consume_power_handler (struct isci_phy *iphy)
 
void scu_link_layer_set_txcomsas_timeout (struct isci_phy *iphy, u32 timeout)
 
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)
 
void sci_phy_construct (struct isci_phy *iphy, struct isci_port *iport, u8 phy_index)
 
void isci_phy_init (struct isci_phy *iphy, struct isci_host *ihost, int index)
 
int isci_phy_control (struct asd_sas_phy *sas_phy, enum phy_func func, void *buf)
 

Macro Definition Documentation

#define C (   a)    (#a)

Definition at line 63 of file phy.c.

#define phy_event_dbg (   iphy,
  state,
  code 
)
Value:
dev_dbg(sciphy_to_dev(iphy), "phy-%d:%d: %s event: %s (%x)\n", \
phy_to_host(iphy)->id, iphy->phy_index, \
phy_state_name(state), phy_event_name(code), code)

Definition at line 661 of file phy.c.

#define phy_event_warn (   iphy,
  state,
  code 
)
Value:
dev_warn(sciphy_to_dev(iphy), "phy-%d:%d: %s event: %s (%x)\n", \
phy_to_host(iphy)->id, iphy->phy_index, \
phy_state_name(state), phy_event_name(code), code)

Definition at line 666 of file phy.c.

#define SCI_END_DEVICE   0x01
#define SCIC_SDS_PHY_MAX_ARBITRATION_WAIT_TIME   (700)

Definition at line 73 of file phy.c.

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 
)

Definition at line 454 of file phy.c.

void sci_phy_get_protocols ( struct isci_phy iphy,
struct sci_phy_proto proto 
)

Definition at line 462 of file phy.c.

void sci_phy_get_sas_address ( struct isci_phy iphy,
struct sci_sas_address sas 
)

Definition at line 448 of file phy.c.

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.

void scu_link_layer_set_txcomsas_timeout ( struct isci_phy iphy,
u32  timeout 
)

Definition at line 672 of file phy.c.