diff mbox series

ibmvscsi: don't send host info in adapter info MAD after LPM

Message ID 20200603203632.18426-1-tyreld@linux.ibm.com (mailing list archive)
State Mainlined
Commit 4919b33b63c8b69d8dcf2b867431d0e3b6dc6d28
Headers show
Series ibmvscsi: don't send host info in adapter info MAD after LPM | expand

Commit Message

Tyrel Datwyler June 3, 2020, 8:36 p.m. UTC
The adatper info MAD is used to send the client info and receive the
host info as a response. A peristent buffer is used and as such the
client info is overwritten after the response. During the course of
a normal adapter reset the client info is refreshed in the buffer in
preparation for sending the adapter info MAD.

However, in the special case of LPM where we reenable the CRQ instead
of a full CRQ teardown and reset we fail to refresh the client info in
the adapter info buffer. As a result after Live Partition Migration
(LPM) we erroneously report the hosts info as our own.

Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
---
 drivers/scsi/ibmvscsi/ibmvscsi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Martin K. Petersen June 10, 2020, 2:02 a.m. UTC | #1
On Wed, 3 Jun 2020 15:36:32 -0500, Tyrel Datwyler wrote:

> The adatper info MAD is used to send the client info and receive the
> host info as a response. A peristent buffer is used and as such the
> client info is overwritten after the response. During the course of
> a normal adapter reset the client info is refreshed in the buffer in
> preparation for sending the adapter info MAD.
> 
> However, in the special case of LPM where we reenable the CRQ instead
> of a full CRQ teardown and reset we fail to refresh the client info in
> the adapter info buffer. As a result after Live Partition Migration
> (LPM) we erroneously report the hosts info as our own.

Applied to 5.8/scsi-queue, thanks!

[1/1] scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
      https://git.kernel.org/mkp/scsi/c/4919b33b63c8
diff mbox series

Patch

diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index 59f0f1030c54..c5711c659b51 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -415,6 +415,8 @@  static int ibmvscsi_reenable_crq_queue(struct crq_queue *queue,
 	int rc = 0;
 	struct vio_dev *vdev = to_vio_dev(hostdata->dev);
 
+	set_adapter_info(hostdata);
+
 	/* Re-enable the CRQ */
 	do {
 		if (rc)