From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jassi Brar Subject: Re: [PATCHv2 2/3] net: socionext: Add Synquacer NetSec driver Date: Wed, 13 Dec 2017 21:16:24 +0530 Message-ID: References: <1513098873-20977-1-git-send-email-jassisinghbrar@gmail.com> <1513098954-21093-1-git-send-email-jassisinghbrar@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: netdev-owner@vger.kernel.org To: Ard Biesheuvel Cc: "" , "devicetree@vger.kernel.org" , "David S. Miller" , Arnd Bergmann , Rob Herring , Mark Rutland , Jassi Brar List-Id: devicetree@vger.kernel.org On Tue, Dec 12, 2017 at 10:54 PM, Ard Biesheuvel wrote: > On 12 December 2017 at 17:15, wrote: .... >> + >> +static int netsec_netdev_load_microcode(struct netsec_priv *priv) >> +{ >> + int err; >> + >> + err = netsec_netdev_load_ucode_region( >> + priv, NETSEC_REG_DMAC_HM_CMD_BUF, >> + le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_HM_ME_ADDRESS_H), >> + le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_HM_ME_ADDRESS_L), >> + le32_to_cpup(priv->eeprom_base + NETSEC_EEPROM_HM_ME_SIZE)); > > ... here, and in other places below, you are still dereferencing > eeprom_base as if it is a pointer, which is not allowed with in the > __iomem address space. This should use readl() instead [which happens > to incorporate the endian swap as well] > Ahh, how could it have been just two revisions! thanks