From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42598 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbdKSLGz (ORCPT ); Sun, 19 Nov 2017 06:06:55 -0500 Subject: Patch "scsi: lpfc: Add missing memory barrier" has been added to the 4.4-stable tree To: james.smart@broadcom.com, alexander.levin@verizon.com, dick.kennedy@broadcom.com, gregkh@linuxfoundation.org, hare@suse.com, martin.petersen@oracle.com Cc: , From: Date: Sun, 19 Nov 2017 12:06:11 +0100 Message-ID: <151108957117860@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled scsi: lpfc: Add missing memory barrier to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: scsi-lpfc-add-missing-memory-barrier.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Sun Nov 19 12:02:55 CET 2017 From: James Smart Date: Mon, 19 Dec 2016 15:07:30 -0800 Subject: scsi: lpfc: Add missing memory barrier From: James Smart [ Upstream commit 6b3b3bdb83b4ad51252d21bb13596db879e51850 ] On loosely ordered memory systems (PPC for example), the WQE elements were being updated in memory, but not necessarily flushed before the separate doorbell was written to hw which would cause hw to dma the WQE element. Thus, the hardware occasionally received partially updated WQE data. Add the memory barrier after updating the WQE memory. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/lpfc/lpfc_sli.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -118,6 +118,8 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, u if (q->phba->sli3_options & LPFC_SLI4_PHWQ_ENABLED) bf_set(wqe_wqid, &wqe->generic.wqe_com, q->queue_id); lpfc_sli_pcimem_bcopy(wqe, temp_wqe, q->entry_size); + /* ensure WQE bcopy flushed before doorbell write */ + wmb(); /* Update the host index before invoking device */ host_index = q->host_index; Patches currently in stable-queue which might be from james.smart@broadcom.com are queue-4.4/scsi-lpfc-clear-the-vendorversion-in-the-plogi-plogi-acc-payload.patch queue-4.4/scsi-lpfc-correct-host-name-in-symbolic_name-field.patch queue-4.4/scsi-lpfc-fcoe-vport-enable-disable-does-not-bring-up-the-vport.patch queue-4.4/scsi-lpfc-correct-issue-leading-to-oops-during-link-reset.patch queue-4.4/scsi-lpfc-add-missing-memory-barrier.patch