|
@@ -266,9 +266,6 @@ show_sas_phy_##field(struct class_device *cdev, char *buf) \
|
|
struct sas_internal *i = to_sas_internal(shost->transportt); \
|
|
struct sas_internal *i = to_sas_internal(shost->transportt); \
|
|
int error; \
|
|
int error; \
|
|
\
|
|
\
|
|
- if (!phy->local_attached) \
|
|
|
|
- return -EINVAL; \
|
|
|
|
- \
|
|
|
|
error = i->f->get_linkerrors ? i->f->get_linkerrors(phy) : 0; \
|
|
error = i->f->get_linkerrors ? i->f->get_linkerrors(phy) : 0; \
|
|
if (error) \
|
|
if (error) \
|
|
return error; \
|
|
return error; \
|
|
@@ -299,9 +296,6 @@ static ssize_t do_sas_phy_reset(struct class_device *cdev,
|
|
struct sas_internal *i = to_sas_internal(shost->transportt);
|
|
struct sas_internal *i = to_sas_internal(shost->transportt);
|
|
int error;
|
|
int error;
|
|
|
|
|
|
- if (!phy->local_attached)
|
|
|
|
- return -EINVAL;
|
|
|
|
-
|
|
|
|
error = i->f->phy_reset(phy, hard_reset);
|
|
error = i->f->phy_reset(phy, hard_reset);
|
|
if (error)
|
|
if (error)
|
|
return error;
|
|
return error;
|
|
@@ -849,7 +843,7 @@ show_sas_rphy_enclosure_identifier(struct class_device *cdev, char *buf)
|
|
* Only devices behind an expander are supported, because the
|
|
* Only devices behind an expander are supported, because the
|
|
* enclosure identifier is a SMP feature.
|
|
* enclosure identifier is a SMP feature.
|
|
*/
|
|
*/
|
|
- if (phy->local_attached)
|
|
|
|
|
|
+ if (scsi_is_sas_phy_local(phy))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
error = i->f->get_enclosure_identifier(rphy, &identifier);
|
|
error = i->f->get_enclosure_identifier(rphy, &identifier);
|
|
@@ -870,7 +864,7 @@ show_sas_rphy_bay_identifier(struct class_device *cdev, char *buf)
|
|
struct sas_internal *i = to_sas_internal(shost->transportt);
|
|
struct sas_internal *i = to_sas_internal(shost->transportt);
|
|
int val;
|
|
int val;
|
|
|
|
|
|
- if (phy->local_attached)
|
|
|
|
|
|
+ if (scsi_is_sas_phy_local(phy))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
val = i->f->get_bay_identifier(rphy);
|
|
val = i->f->get_bay_identifier(rphy);
|