From: 陈华才 <chenhc@lemote.com>
To: "James Smart" <james.smart@broadcom.com>,
"Dick Kennedy" <dick.kennedy@broadcom.com>
Cc: "James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
"Fuxin Zhang" <zhangfx@lemote.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
stable <stable@vger.kernel.org>
Subject: Re:[PATCH] scsi: lpfc: Switch memcpy_fromio() to __read32_copy()
Date: Mon, 5 Mar 2018 14:56:51 +0800 [thread overview]
Message-ID: <tencent_75DC38C65689608F38146CF0@qq.com> (raw)
In-Reply-To: <tencent_3B2D19AE6395B45001767B9B@qq.com>
No one has the same problem? Or this patch need improve?
Huacai
------------------ Original ------------------
From: "陈华才"<chenhc@lemote.com>;
Date: Thu, Mar 1, 2018 01:59 PM
To: "James Smart"<james.smart@broadcom.com>; "Dick Kennedy"<dick.kennedy@broadcom.com>;
Cc: "James E . J . Bottomley"<jejb@linux.vnet.ibm.com>; "Martin K . Petersen"<martin.petersen@oracle.com>; "Fuxin Zhang"<zhangfx@lemote.com>; "linux-scsi"<linux-scsi@vger.kernel.org>; "stable"<stable@vger.kernel.org>;
Subject: Re:[PATCH] scsi: lpfc: Switch memcpy_fromio() to __read32_copy()
Ping?
------------------ Original ------------------
From: "Huacai Chen"<chenhc@lemote.com>;
Date: Fri, Jan 26, 2018 08:53 PM
To: "James Smart"<james.smart@broadcom.com>; "Dick Kennedy"<dick.kennedy@broadcom.com>;
Cc: "James E . J . Bottomley"<jejb@linux.vnet.ibm.com>; "Martin K . Petersen"<martin.petersen@oracle.com>; "Fuxin Zhang"<zhangfx@lemote.com>; "linux-scsi"<linux-scsi@vger.kernel.org>; "Huacai Chen"<chenhc@lemote.com>; "stable"<stable@vger.kernel.org>;
Subject: [PATCH] scsi: lpfc: Switch memcpy_fromio() to __read32_copy()
In commit bc73905abf770192 ("[SCSI] lpfc 8.3.16: SLI Additions, updates,
and code cleanup"), lpfc_memcpy_to_slim() have switched memcpy_toio() to
__write32_copy() in order to prevent unaligned 64 bit copy. Recently, we
found that lpfc_memcpy_from_slim() have similar issues, so let it switch
memcpy_fromio() to __read32_copy().
Cc: stable@vger.kernel.org
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
drivers/scsi/lpfc/lpfc_compat.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_compat.h b/drivers/scsi/lpfc/lpfc_compat.h
index 6b32b0a..47d4fad 100644
--- a/drivers/scsi/lpfc/lpfc_compat.h
+++ b/drivers/scsi/lpfc/lpfc_compat.h
@@ -91,8 +91,8 @@ lpfc_memcpy_to_slim( void __iomem *dest, void *src, unsigned int bytes)
static inline void
lpfc_memcpy_from_slim( void *dest, void __iomem *src, unsigned int bytes)
{
- /* actually returns 1 byte past dest */
- memcpy_fromio( dest, src, bytes);
+ /* convert bytes in argument list to word count for copy function */
+ __ioread32_copy(dest, src, bytes / sizeof(uint32_t));
}
#endif /* __BIG_ENDIAN */
--
2.7.0
next prev parent reply other threads:[~2018-03-05 6:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 12:53 [PATCH] scsi: lpfc: Switch memcpy_fromio() to __read32_copy() Huacai Chen
2018-03-01 5:59 ` 陈华才
2018-03-05 6:56 ` 陈华才 [this message]
2018-03-05 15:37 ` [PATCH] " James Smart
2018-03-06 1:19 ` 陈华才
2018-07-09 1:36 ` 陈华才
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_75DC38C65689608F38146CF0@qq.com \
--to=chenhc@lemote.com \
--cc=dick.kennedy@broadcom.com \
--cc=james.smart@broadcom.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
--cc=zhangfx@lemote.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).