Re: [PATCH] 8139cp: set ring address after enabling C+ mode
From: David Woodhouse <dwmw2@infradead.org>
Date: 2012-11-22 23:07:58
On Wed, 2012-11-21 at 21:40 +0100, Francois Romieu wrote:
Straight to -stable ?
That's the way it works. You put the Cc: stable on the *original* commit that goes upstream. There's no sane way to retroactively add that tag after it's already been merged and tested. Yes, you can bug Greg manually to 'please add this upstream commit which we forgot to mark as Cc: stable' but that isn't the way it's usually done.
Afaik nobody complained from the original (pre b01af457) problem on real hardware. May be someone @realtek (hi Hayes) can give an explanation regarding the CpCmd, RingAddr, Cmd init sequence and the start of DMA.
That would be really useful; thanks. To recap for Hayes' benefit: the concern is that if we follow the instructions in §6.33 of the data sheet: Recommendation to C+ mode programming: Enable C+ mode functions in C+CR register first, => Enable transmit/receive in Command register (offset 37h), => Configure other related registers (ex. Descriptor start address, TCR, RCR, ...). ... then we appear to be starting up the DMA before we actually tell it the descriptor ring addresses, which will cause stray DMA to random unconfigured addresses! Is there some detail of the hardware which prevents this from actually happening? Or if not, is my proposed workaround (enabling Tx/Rx in the C+ Command Register *first*, then setting the descriptor addresses, and enabling Tx/Rx in the old-style Command register last) OK? It was observed that when setting the descriptor addresses *first*, the Transmit Descriptor Start Address Register was getting overwritten with garbage when we enabled Tx in the C+ Command Register. I note that we're also setting a bunch of other things in the Rx and Tx config registers *after* operation all seems to have started up... is that OK too? -- dwmw2
Attachments
- smime.p7s [application/x-pkcs7-signature] 6171 bytes