All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
	Nicolas Pitre <nico@fluxnic.net>,
	"David S. Miller" <davem@davemloft.net>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [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.

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
	Nicolas Pitre <nico@fluxnic.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	"David S. Miller" <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [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.

WARNING: multiple messages have this Message-ID (diff)
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:49 UTC|newest]

Thread overview: 27+ 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 ` Arnd Bergmann
2016-08-25 14:46 ` Arnd Bergmann
2016-08-25 14:46 ` [PATCH 2/2] smc91x: remove ARM hack for unaligned 16-bit writes Arnd Bergmann
2016-08-25 14:46   ` Arnd Bergmann
2016-08-25 14:46   ` Arnd Bergmann
2016-08-25 15:39 ` [PATCH v2 1/2] smc91x: always use 8-bit access if necessary Arnd Bergmann
2016-08-25 15:39   ` Arnd Bergmann
2016-08-25 15:39   ` Arnd Bergmann
2016-08-25 17:48   ` Nicolas Pitre
2016-08-25 17:48     ` Nicolas Pitre
2016-08-25 17:48     ` Nicolas Pitre
2016-08-25 16:32 ` [PATCH " kbuild test robot
2016-08-25 16:32   ` 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 17:59     ` Nicolas Pitre
2016-08-25 17:59     ` Nicolas Pitre
2016-08-25 22:33 ` Russell King - ARM Linux [this message]
2016-08-25 22:33   ` [PATCH 1/2] smc91x: always use 8-bit access if necessary Russell King - ARM Linux
2016-08-25 22:33   ` Russell King - ARM Linux
2016-08-26  9:42   ` Arnd Bergmann
2016-08-26  9:42     ` Arnd Bergmann
2016-08-26  9:42     ` Arnd Bergmann
2016-08-26 22:39 ` kbuild test robot
2016-08-26 22:39   ` kbuild test robot
2016-08-27 11:37 ` 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=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=robert.jarzmik@free.fr \
    --cc=ysato@users.sourceforge.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.