[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1505804946-39266-6-git-send-email-yanaijie@huawei.com>
Date: Tue, 19 Sep 2017 15:09:05 +0800
From: Jason Yan <yanaijie@...wei.com>
To: <martin.petersen@...cle.com>, <jejb@...ux.vnet.ibm.com>
CC: <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<john.garry@...wei.com>, <chenweilong@...wei.com>,
<zhaohongjiang@...wei.com>, <hare@...e.com>,
<dan.j.williams@...el.com>, <jthumshirn@...e.de>,
<Raj.Dinesh@...rosemi.com>, <hch@....de>,
<huangdaode@...ilicon.com>, <chenxiang66@...ilicon.com>,
Jason Yan <yanaijie@...wei.com>,
Ewan Milne <emilne@...hat.com>, Tomas Henzl <thenzl@...hat.com>
Subject: [RESEND PATCH v4 5/6] libsas: libsas: use flush_workqueue to process disco events synchronously
Use flush_workqueue to insure the disco and revalidate events processed synchronously.
Signed-off-by: Jason Yan <yanaijie@...wei.com>
CC: John Garry <john.garry@...wei.com>
CC: Johannes Thumshirn <jthumshirn@...e.de>
CC: Ewan Milne <emilne@...hat.com>
CC: Christoph Hellwig <hch@....de>
CC: Tomas Henzl <thenzl@...hat.com>
CC: Dan Williams <dan.j.williams@...el.com>
---
drivers/scsi/libsas/sas_port.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c
index 9326628..64722f4 100644
--- a/drivers/scsi/libsas/sas_port.c
+++ b/drivers/scsi/libsas/sas_port.c
@@ -192,6 +192,7 @@ static void sas_form_port(struct asd_sas_phy *phy)
si->dft->lldd_port_formed(phy);
sas_discover_event(phy->port, DISCE_DISCOVER_DOMAIN);
+ flush_workqueue(sas_ha->disco_q);
}
/**
@@ -277,6 +278,9 @@ void sas_porte_broadcast_rcvd(struct work_struct *work)
SAS_DPRINTK("broadcast received: %d\n", prim);
sas_discover_event(phy->port, DISCE_REVALIDATE_DOMAIN);
+
+ if (phy->port)
+ flush_workqueue(phy->port->ha->disco_q);
}
void sas_porte_link_reset_err(struct work_struct *work)
--
2.5.0
Powered by blists - more mailing lists