All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Schwingen <rincewind@discworld.dascon.de>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] Sparklan WPEA-121N AR9382 168c:abcd
Date: Wed, 27 Mar 2013 23:46:40 +0100	[thread overview]
Message-ID: <515376D0.80600@discworld.dascon.de> (raw)
In-Reply-To: <CAJ-Vmon7MOLetZ1EgyjkC8yQ8cONo7gG0gGRj3-EFu78FJE1KQ@mail.gmail.com>

Am 27.03.2013 23:33, schrieb Adrian Chadd:
> Sure, here's what's going on:
>
> * There's a PCI bus reset. It's a pin. On the PCI bus.
> * The BIOS can yank that down to reset all the devices.
> * There's timing requirements for how long that pin can be pulled down
> to reset and release.
> * After the PCI bus is reset, the atheros MAC initialises the PCI
> space by reading a bunch of values from EEPROM/OTP and writing them
> into the register space. Most of these are PCI space registers but
> there can be others.
> * Some vendors do daft things, like multiple quick PCI bus resets
> back-to-back rather than doing a reset and waiting for whatever the
> standard requires or the best practice is; or just asserting reset
> quickly rather than holding it down for the required time is;
> * .. and this can interrupt / confuse the MAC during this whole
> register initialisation path.
I have had this on an ambedded design - IIRC with an AR5414, back when
Atheros switched from 3-wire EEPROMs to I2C EEPROMs on the MiniPCI modules.

If you do a PCI reset just at the time when the MAC is doing an I2C
read, the I2C EEPROM will hang in the middle of a bus cycle, with no
possibility to reset it when the MAC does the next read access, so at
least the first read will get corrupt data.

AFAIK, the PCI standard does not forbid this (there are only minimum
times for *assertion* of the reset signal), so technically, the card
violates the PCI spec if it can't cope with two PCI resets in direct order.

However, I would consider this really bad practice.

In our case, inserting a minimum delay between the point where the
hardware de-asserts reset and the point where the code re-asserts it
(because it might be a warm boot) fixed the problem reliably.

cu
Michael

  reply	other threads:[~2013-03-27 22:46 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-27 18:34 [ath9k-devel] Sparklan WPEA-121N AR9382 168c:abcd Steffen Dettmer
2013-03-27 21:31 ` Adrian Chadd
2013-03-27 21:57   ` Peter Stuge
2013-03-27 22:33     ` Adrian Chadd
2013-03-27 22:46       ` Michael Schwingen [this message]
2013-03-27 23:11         ` Peter Stuge
2013-03-27 23:04       ` Peter Stuge
2013-03-28  1:02         ` Adrian Chadd
2013-04-01 13:05         ` Daniel Smith
2013-03-28 15:04   ` Steffen Dettmer
2013-03-28 18:44     ` Michael Schwingen
  -- strict thread matches above, loose matches on Subject: below --
2011-04-12  6:01 Alex Hacker
2011-04-08 20:30 Hasan Rashid
2011-04-10 12:09 ` Mohammed Shafi
2011-04-10 12:14   ` Mohammed Shafi
2011-04-10 14:32     ` Peter Stuge
2011-04-10 15:01       ` Mohammed Shafi
2011-04-10 15:11         ` Peter Stuge
2011-04-10 15:17           ` Mohammed Shafi
2011-04-10 15:34             ` Adrian Chadd
2011-04-10 15:41               ` Mohammed Shafi
2011-04-11  1:28                 ` Hasan Rashid
2011-04-11  1:45                   ` Peter Stuge
2011-04-11 16:05                   ` Mohammed Shafi
2011-04-11 16:10                     ` Hasan Rashid
2011-04-11 16:18                       ` Mohammed Shafi
2011-04-11 16:20                         ` Peter Stuge
2011-04-11 17:54                           ` Hasan Rashid
2011-04-12 11:46                             ` Mohammed Shafi
2011-04-12 15:04                               ` Hasan Rashid
2011-04-12 22:58                                 ` Adrian Chadd
2011-04-12 16:32                               ` Hasan Rashid
2011-04-19  4:21                                 ` Mohammed Shafi
2011-04-19 15:24                                   ` Hasan Rashid
2011-04-19 16:12                                     ` Mohammed Shafi
2012-01-10 16:19                                 ` Manuel Sáez
2012-01-10 16:36                                   ` Hasan Rashid
2012-01-10 17:36                                     ` Adrian Chadd
2012-01-10 18:17                                       ` Hasan Rashid
2012-01-10 18:36                                         ` Adrian Chadd
2012-01-10 20:45                                           ` Hasan Rashid
2012-01-10 21:11                                             ` Adrian Chadd
2012-01-10 21:23                                               ` Hasan Rashid
2012-01-10 21:53                                                 ` Adrian Chadd
2012-01-10 21:25                                             ` Daniel Smith
2012-01-10 21:37                                               ` Hasan Rashid
2012-01-11 13:48                                                 ` Manuel Sáez
2012-01-11 16:33                                                 ` Adrian Chadd
2012-01-11 17:39                                                   ` Hasan Rashid
2012-01-11 21:04                                                     ` Adrian Chadd
2012-01-10 21:54                                               ` Adrian Chadd
2012-01-11 12:57                                                 ` Daniel Smith
2012-01-11 16:23                                                   ` Adrian Chadd
2013-03-27 22:10                                                   ` Peter Stuge
2013-03-27 22:34                                                     ` Adrian Chadd
2011-04-11 17:48                         ` Hasan Rashid
2011-04-11  1:09     ` Hasan Rashid
2011-04-11  2:19       ` Adrian Chadd
2011-04-11 14:06         ` Hasan Rashid
2011-04-11 16:18         ` Peter Stuge
2011-04-11 14:13       ` Mohammed Shafi
2011-04-11 14:24         ` Hasan Rashid
2011-04-11 14:32           ` Mohammed Shafi
2011-04-11 14:57         ` Hasan Rashid
2011-04-11 16:10           ` Mohammed Shafi

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=515376D0.80600@discworld.dascon.de \
    --to=rincewind@discworld.dascon.de \
    --cc=ath9k-devel@lists.ath9k.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 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.