Hi all, On Wed, Mar 28, 2012 at 23:53, Jakub Kicinski <kubakici@xxxxx> wrote: > On Wed, 28 Mar 2012 14:14:29 +0200 > Stanislaw Gruszka <sgruszka@xxxxxxxxxx> wrote: > >> Hello, >> >> On Tue, Mar 27, 2012 at 08:11:07PM +0200, Gertjan van Wingerde wrote: >> > > /* >> > > - * Disable DMA, will be reenabled later when enabling >> > > - * the radio. >> > > - */ >> > > - rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®); >> > > - rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0); >> > > - rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_RX_DMA, 0); >> > > - rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg); >> > > - >> > > - /* >> > > * Initialize firmware. >> > > */ >> > > rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0); >> > >> > This basically seems to be a revert of commit >> > 4ed1dd2a7ec880b301beb61cbc1e08811ec340e4 in the wireless-testing tree. >> > That commit was submitted by Stanislaw, which basically does the reverse >> > of what you are doing here. >> > >> > I leave it up to you and Stanislaw to decide on what the state is that >> > we need to be in. >> >> When DMA was disabled before FW load, I observed frame receives before >> ->enable_radio, so looks like WPDMA_GLO_CFG register is overwritten by >> F/W load. Although received frames did not make any damage, I prefer >> not to allow hw to send data to driver, before driver will be really >> ready to receive them. > > Hm. I obviously did check whether FW load does overwrite WPDMA_GLO_CFG > and it didn't. Maybe it's device dependent? What bothers me is that now > we have a (very) short window between FW load and disabling DMA. Stupid question: why not disable DMA before the FW load, then disable it afterwards just to make sure the hardware's in a known state after the FW load? - this will catch any errant firmwares out there and (mostly) eliminate the window between FW load and DMA disabling. Thanks, -- Julian Calaby Email: julian.calaby@xxxxxxxxx Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/ -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html