[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1--4o7piRf1VEr_cTUaE09ATnWoJfezrg=eqFzM64RoA@mail.gmail.com>
Date: Fri, 23 Feb 2018 22:02:33 +0100
From: Arnd Bergmann <arnd@...db.de>
To: James Smart <james.smart@...adcom.com>,
Dick Kennedy <dick.kennedy@...adcom.com>,
"James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Arnd Bergmann <arnd@...db.de>, Hannes Reinecke <hare@...e.com>,
Johannes Thumshirn <jthumshirn@...e.de>,
linux-scsi <linux-scsi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: lpfc: use memcpy_toio instead of writeq
On Fri, Feb 23, 2018 at 4:36 PM, Arnd Bergmann <arnd@...db.de> wrote:
> @@ -138,12 +137,10 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe)
> 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);
> - if (q->dpp_enable && q->phba->cfg_enable_dpp) {
> + if (q->dpp_enable && q->phba->cfg_enable_dpp)
> /* write to DPP aperture taking advatage of Combined Writes */
> - tmp = (uint8_t *)wqe;
> - for (i = 0; i < q->entry_size; i += sizeof(uint64_t))
> - writeq(*((uint64_t *)(tmp + i)), q->dpp_regaddr + i);
> - }
> + memcpy_toio(tmp, q->dpp_regaddr, q->entry_size);
> +
> /* ensure WQE bcopy and DPP flushed before doorbell write */
> wmb();
>
Not sure where we are with the question of whether memcpy_toio
is a good replacement or not, but further build testing showed that
my patch was completely broken in more than one way:
I mixed up the source and destination arguments, and I used
the uninitialized 'tmp' instead of 'wqe'. Don't try this patch.
Arnd
Powered by blists - more mailing lists