ex_phy
static int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy)
static int sas_ata_clear_pending(struct domain_device *dev, struct ex_phy *phy)
struct ex_phy *ex_phy = &ex_dev->ex_dev.ex_phy[phy->number];
switch (ex_phy->attached_dev_type) {
if (ex_phy->attached_sata_dev)
return sas_ata_clear_pending(dev, ex_phy);
int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
kfree(dev->ex_dev.ex_phy);
memset(ex_phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
sas_configure_routing(dev, ex_phy->attached_sas_addr);
} else if (ex_phy->linkrate == SAS_LINK_RATE_UNKNOWN)
if (ex_phy->attached_dev_type != SAS_END_DEVICE &&
ex_phy->attached_dev_type != SAS_FANOUT_EXPANDER_DEVICE &&
ex_phy->attached_dev_type != SAS_EDGE_EXPANDER_DEVICE &&
ex_phy->attached_dev_type != SAS_SATA_PENDING) {
ex_phy->attached_dev_type,
res = sas_configure_routing(dev, ex_phy->attached_sas_addr);
SAS_ADDR(ex_phy->attached_sas_addr), res);
sas_disable_routing(dev, ex_phy->attached_sas_addr);
phy_id, SAS_ADDR(ex_phy->attached_sas_addr));
switch (ex_phy->attached_dev_type) {
SAS_ADDR(ex_phy->attached_sas_addr),
ex_phy->attached_phy_id,
ex_phy->attached_sas_addr, SAS_ADDR_SIZE);
struct ex_phy *phy = &ex->ex_phy[i];
struct ex_phy *ex_phy = &ex->ex_phy[i];
if (ex_phy->phy_state == PHY_VACANT ||
ex_phy->phy_state == PHY_NOT_PRESENT ||
ex_phy->phy_state == PHY_DEVICE_DISCOVERED)
switch (ex_phy->linkrate) {
struct ex_phy *phy = &ex->ex_phy[i];
struct ex_phy *parent_phy,
struct ex_phy *child_phy)
struct ex_phy *parent_phy,
struct ex_phy *child_phy)
struct ex_phy *parent_phy)
struct ex_phy *child_phy;
child_phy = &child_ex->ex_phy[parent_phy->attached_phy_id];
struct ex_phy *parent_phy)
struct ex_phy *child_phy;
child_phy = &child_ex->ex_phy[parent_phy->attached_phy_id];
struct ex_phy *parent_phy = &parent_ex->ex_phy[i];
struct ex_phy *phy = &ex->ex_phy[phy_id];
struct ex_phy *phy = &ex_parent->ex_phy[i];
static char sas_route_char(struct domain_device *dev, struct ex_phy *phy)
if (phy_change_count != ex->ex_phy[i].phy_change_count) {
ex->ex_phy[i].phy_change_count =
struct ex_phy *phy = &ex_dev->ex_phy[phy_id];
struct ex_phy *ex_phy = &dev->ex_dev.ex_phy[phy_id];
if (sas_phy_match_dev_addr(child, ex_phy)) {
struct ex_phy *phy = &ex->ex_phy[phy_id];
struct ex_phy *changed_phy = &ex->ex_phy[phy_id];
struct ex_phy *phy = &ex->ex_phy[i];
struct ex_phy *phy = &ex->ex_phy[phy_id];
struct ex_phy *phy;
phy = &ex_dev->ex_phy[phy_id];
static void sas_port_add_ex_phy(struct sas_port *port, struct ex_phy *ex_phy)
sas_port_add_phy(port, ex_phy->phy);
ex_phy->port = port;
ex_phy->phy_state = PHY_DEVICE_DISCOVERED;
struct ex_phy *ex_phy = &ex_dev->ex_dev.ex_phy[phy_id];
if (!ex_phy->port)
rphy = ex_phy->port->rphy;
struct ex_phy *ex_phy = &ex->ex_phy[phy_id];
ex->ex_phy = kzalloc_objs(*ex->ex_phy, ex->num_phys);
if (!ex->ex_phy)
kfree(ex->ex_phy);
ex->ex_phy = NULL;
sas_port_add_ex_phy(ex->parent_port, ex_phy);
struct ex_phy *phy = &ex->ex_phy[phy_id];
struct ex_phy *phy = &ex->ex_phy[i];
struct ex_phy *parent_phy)
struct ex_phy *phy = &parent_ex->ex_phy[i];
static int sas_ex_add_dev(struct domain_device *parent, struct ex_phy *phy,
struct ex_phy *phy = &parent_ex->ex_phy[phy_id];
struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id];
struct ex_phy *ephy = &parent->ex_dev.ex_phy[i];
struct ex_phy *phy = &parent->ex_dev.ex_phy[phy_id];
struct ex_phy *ex_phy = &ex->ex_phy[phy_id];
if (ex_phy->linkrate == SAS_SATA_SPINUP_HOLD) {
if (!dev->parent && sas_phy_match_port_addr(dev->port, ex_phy)) {
if (dev->parent && sas_phy_match_dev_addr(dev->parent, ex_phy)) {
if (ex_phy->routing_attr == TABLE_ROUTING)
if (sas_dev_present_in_domain(dev->port, ex_phy->attached_sas_addr))
sas_ex_disable_port(dev, ex_phy->attached_sas_addr);
if (ex_phy->attached_dev_type == SAS_PHY_UNUSED) {
if (ex_phy->routing_attr == DIRECT_ROUTING) {
struct ex_phy *phy)
struct ex_phy *phy)
static inline bool sas_phy_addr_match(struct ex_phy *p1, struct ex_phy *p2)
int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy,
struct ex_phy *phy = &dev->ex_dev.ex_phy[i];
return dev->parent->ex_dev.ex_phy->phy_id;
struct ex_phy *ex_phy;