diff options
Diffstat (limited to 'drivers/scsi/scsi_transport_sas.c')
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 5a625c3fdda..d518c1207fb 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c | |||
@@ -266,9 +266,6 @@ show_sas_phy_##field(struct class_device *cdev, char *buf) \ | |||
266 | struct sas_internal *i = to_sas_internal(shost->transportt); \ | 266 | struct sas_internal *i = to_sas_internal(shost->transportt); \ |
267 | int error; \ | 267 | int error; \ |
268 | \ | 268 | \ |
269 | if (!phy->local_attached) \ | ||
270 | return -EINVAL; \ | ||
271 | \ | ||
272 | error = i->f->get_linkerrors ? i->f->get_linkerrors(phy) : 0; \ | 269 | error = i->f->get_linkerrors ? i->f->get_linkerrors(phy) : 0; \ |
273 | if (error) \ | 270 | if (error) \ |
274 | return error; \ | 271 | return error; \ |
@@ -299,9 +296,6 @@ static ssize_t do_sas_phy_reset(struct class_device *cdev, | |||
299 | struct sas_internal *i = to_sas_internal(shost->transportt); | 296 | struct sas_internal *i = to_sas_internal(shost->transportt); |
300 | int error; | 297 | int error; |
301 | 298 | ||
302 | if (!phy->local_attached) | ||
303 | return -EINVAL; | ||
304 | |||
305 | error = i->f->phy_reset(phy, hard_reset); | 299 | error = i->f->phy_reset(phy, hard_reset); |
306 | if (error) | 300 | if (error) |
307 | return error; | 301 | return error; |
@@ -849,7 +843,7 @@ show_sas_rphy_enclosure_identifier(struct class_device *cdev, char *buf) | |||
849 | * Only devices behind an expander are supported, because the | 843 | * Only devices behind an expander are supported, because the |
850 | * enclosure identifier is a SMP feature. | 844 | * enclosure identifier is a SMP feature. |
851 | */ | 845 | */ |
852 | if (phy->local_attached) | 846 | if (scsi_is_sas_phy_local(phy)) |
853 | return -EINVAL; | 847 | return -EINVAL; |
854 | 848 | ||
855 | error = i->f->get_enclosure_identifier(rphy, &identifier); | 849 | error = i->f->get_enclosure_identifier(rphy, &identifier); |
@@ -870,7 +864,7 @@ show_sas_rphy_bay_identifier(struct class_device *cdev, char *buf) | |||
870 | struct sas_internal *i = to_sas_internal(shost->transportt); | 864 | struct sas_internal *i = to_sas_internal(shost->transportt); |
871 | int val; | 865 | int val; |
872 | 866 | ||
873 | if (phy->local_attached) | 867 | if (scsi_is_sas_phy_local(phy)) |
874 | return -EINVAL; | 868 | return -EINVAL; |
875 | 869 | ||
876 | val = i->f->get_bay_identifier(rphy); | 870 | val = i->f->get_bay_identifier(rphy); |