aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_port.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libsas/sas_port.c')
-rw-r--r--drivers/scsi/libsas/sas_port.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c
index 38a10478605c..7c86fd248129 100644
--- a/drivers/scsi/libsas/sas_port.c
+++ b/drivers/scsi/libsas/sas_port.c
@@ -1,25 +1,9 @@
1// SPDX-License-Identifier: GPL-2.0
1/* 2/*
2 * Serial Attached SCSI (SAS) Port class 3 * Serial Attached SCSI (SAS) Port class
3 * 4 *
4 * Copyright (C) 2005 Adaptec, Inc. All rights reserved. 5 * Copyright (C) 2005 Adaptec, Inc. All rights reserved.
5 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com> 6 * Copyright (C) 2005 Luben Tuikov <luben_tuikov@adaptec.com>
6 *
7 * This file is licensed under GPLv2.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 *
23 */ 7 */
24 8
25#include "sas_internal.h" 9#include "sas_internal.h"
@@ -70,7 +54,7 @@ static void sas_resume_port(struct asd_sas_phy *phy)
70 continue; 54 continue;
71 } 55 }
72 56
73 if (dev->dev_type == SAS_EDGE_EXPANDER_DEVICE || dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE) { 57 if (dev_is_expander(dev->dev_type)) {
74 dev->ex_dev.ex_change_count = -1; 58 dev->ex_dev.ex_change_count = -1;
75 for (i = 0; i < dev->ex_dev.num_phys; i++) { 59 for (i = 0; i < dev->ex_dev.num_phys; i++) {
76 struct ex_phy *phy = &dev->ex_dev.ex_phy[i]; 60 struct ex_phy *phy = &dev->ex_dev.ex_phy[i];
@@ -195,7 +179,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
195 179
196 sas_discover_event(phy->port, DISCE_DISCOVER_DOMAIN); 180 sas_discover_event(phy->port, DISCE_DISCOVER_DOMAIN);
197 /* Only insert a revalidate event after initial discovery */ 181 /* Only insert a revalidate event after initial discovery */
198 if (port_dev && sas_dev_type_is_expander(port_dev->dev_type)) { 182 if (port_dev && dev_is_expander(port_dev->dev_type)) {
199 struct expander_device *ex_dev = &port_dev->ex_dev; 183 struct expander_device *ex_dev = &port_dev->ex_dev;
200 184
201 ex_dev->ex_change_count = -1; 185 ex_dev->ex_change_count = -1;
@@ -264,7 +248,7 @@ void sas_deform_port(struct asd_sas_phy *phy, int gone)
264 spin_unlock_irqrestore(&sas_ha->phy_port_lock, flags); 248 spin_unlock_irqrestore(&sas_ha->phy_port_lock, flags);
265 249
266 /* Only insert revalidate event if the port still has members */ 250 /* Only insert revalidate event if the port still has members */
267 if (port->port && dev && sas_dev_type_is_expander(dev->dev_type)) { 251 if (port->port && dev && dev_is_expander(dev->dev_type)) {
268 struct expander_device *ex_dev = &dev->ex_dev; 252 struct expander_device *ex_dev = &dev->ex_dev;
269 253
270 ex_dev->ex_change_count = -1; 254 ex_dev->ex_change_count = -1;