public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] smc91x: always use 8-bit access if necessary
Date: Thu, 25 Aug 2016 23:33:08 +0100	[thread overview]
Message-ID: <20160825223308.GJ1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20160825144633.1850889-1-arnd@arndb.de>

On Thu, Aug 25, 2016 at 04:46:20PM +0200, Arnd Bergmann wrote:
> +#define SMC_out16(x, ioaddr, reg)					     \
> +do {									     \
> +	if (SMC_CAN_USE_8BIT && !SMC_16BIT(lp)) {			     \
> +		unsigned int __val16 = (x);				     \
> +		SMC_outb(__val16, ioaddr, reg );			     \
> +		SMC_outb(__val16 >> 8, ioaddr, reg + (1 << SMC_IO_SHIFT));   \
> +	} else {							     \
> +		SMC_outw(x, ioaddr, reg);				     \
> +	}								     \

This is insufficient.  If you look at how SMC_REG works, you'll notice
that it has side effects which can disrupt other accesses (it reads
the bank register if debugging is enabled.)

In any case, please wait for my tested patch for this.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  parent reply	other threads:[~2016-08-25 22:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 14:46 [PATCH 1/2] smc91x: always use 8-bit access if necessary Arnd Bergmann
2016-08-25 14:46 ` [PATCH 2/2] smc91x: remove ARM hack for unaligned 16-bit writes Arnd Bergmann
2016-08-25 15:39 ` [PATCH v2 1/2] smc91x: always use 8-bit access if necessary Arnd Bergmann
2016-08-25 17:48   ` Nicolas Pitre
2016-08-25 16:32 ` [PATCH " kbuild test robot
     [not found] ` <cvvmbcA3dSJWccvvnbQPVX@videotron.ca>
2016-08-25 17:59   ` [PATCH 2/2] smc91x: remove ARM hack for unaligned 16-bit writes Nicolas Pitre
2016-08-25 22:33 ` Russell King - ARM Linux [this message]
2016-08-26  9:42   ` [PATCH 1/2] smc91x: always use 8-bit access if necessary Arnd Bergmann
2016-08-26 22:39 ` kbuild test robot
2016-08-27 11:37 ` kbuild test robot

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=20160825223308.GJ1041@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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