From: David Miller <davem@davemloft.net>
To: kamlakant.patel@broadcom.com
Cc: netdev@vger.kernel.org, steve@shawell.net,
linus.walleij@linaro.org, robert.marklund@stericsson.com
Subject: Re: [PATCH] net/smsc911x: Fix ready check in cases where WORD_SWAP is needed
Date: Wed, 14 Nov 2012 21:51:11 -0500 (EST) [thread overview]
Message-ID: <20121114.215111.963000574513325881.davem@davemloft.net> (raw)
In-Reply-To: <1352893298-20058-1-git-send-email-kamlakant.patel@broadcom.com>
From: "Kamlakant Patel" <kamlakant.patel@broadcom.com>
Date: Wed, 14 Nov 2012 17:11:38 +0530
> The chip ready check added by the commit 3ac3546e [Always wait for
> the chip to be ready] does not work when the register read/write
> is word swapped. This check has been added before the WORD_SWAP
> register is programmed, so we need to check for swapped register
> value as well.
>
> Bit 16 is marked as RESERVED in SMSC datasheet, Steve Glendinning
> <steve@shawell.net> checked with SMSC and wrote:
>
> The chip architects have concluded we should be reading PMT_CTRL
> until we see any of bits 0, 8, 16 or 24 set. Then we should read
> BYTE_TEST to check the byte order is correct (as we already do).
>
> The rationale behind this is that some of the chip variants have
> word order swapping features too, so the READY bit could actually
> be in any of the 4 possible locations. The architects have confirmed
> that if any of these 4 positions is set the chip is ready. The other
> 3 locations will either never be set or can only go high after READY
> does (so also indicate the device is ready).
>
> This change will check for the READY bit at the 16th position. We do
> not check the other two cases (bit 8 and 24) since the driver does not
> support byte-swapped register read/write.
>
> Signed-off-by: Kamlakant Patel <kamlakant.patel@broadcom.com>
Applied, thank you.
prev parent reply other threads:[~2012-11-15 2:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-14 11:41 [PATCH] net/smsc911x: Fix ready check in cases where WORD_SWAP is needed Kamlakant Patel
2012-11-15 2:51 ` David Miller [this message]
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=20121114.215111.963000574513325881.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kamlakant.patel@broadcom.com \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=robert.marklund@stericsson.com \
--cc=steve@shawell.net \
/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