]> git.ipfire.org Git - people/arne_f/kernel.git/commit
lpfc: Add iotag memory barrier
authorJames Smart <james.smart@emulex.com>
Wed, 7 May 2014 21:16:46 +0000 (17:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jun 2015 19:25:37 +0000 (12:25 -0700)
commite42ec4ae3b532218a9166a7bcc11455e35dda5fd
tree65864aa973668a971191d004d6c568af07687746
parent6b17faf3d5fa6a727c40613bdf24d73b2a59df27
lpfc: Add iotag memory barrier

commit 27f344eb15dd0da80ebec80c7245e8c85043f841 upstream.

Add a memory barrier to ensure the valid bit is read before
any of the cqe payload is read. This fixes an issue seen
on Power where the cqe payload was getting loaded before
the valid bit. When this occurred, we saw an iotag out of
range error when a command completed, but since the iotag
looked invalid the command didn't get completed to scsi core.
Later we hit the command timeout, attempted to abort the command,
then waited for the aborted command to get returned. Since the
adapter already returned the command, we timeout waiting,
and end up escalating EEH all the way to host reset. This
patch fixes this issue.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_sli.c