scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
authorTyrel Datwyler <tyreld@linux.ibm.com>
Wed, 3 Jun 2020 20:36:32 +0000 (15:36 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 10 Jun 2020 01:57:27 +0000 (21:57 -0400)
The adapter info MAD is used to send the client info and receive the host
info as a response. A persistent 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 host's info as our own.

[mkp: typos]

Link: https://lore.kernel.org/r/20200603203632.18426-1-tyreld@linux.ibm.com
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvscsi.c

index be173135e05eb5466902e4ab3e448b4eee6df1f3..392e7681d866313e4536c701cfd008a7650147c9 100644 (file)
@@ -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)