From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Kazior Date: Mon, 29 Apr 2013 10:34:11 +0200 Subject: [ath9k-devel] [PATCH 20/20] ath10k: Remove unneeded locks during HTT RX attach In-Reply-To: <20862.11247.214965.970445@gargle.gargle.HOWL> References: <1367163098-22787-1-git-send-email-sujith@msujith.org> <1367163098-22787-20-git-send-email-sujith@msujith.org> <517E0E2F.7000408@tieto.com> <20862.5637.708673.839832@gargle.gargle.HOWL> <20862.6048.74676.291282@gargle.gargle.HOWL> <20862.7299.137818.979432@gargle.gargle.HOWL> <517E20F0.9020200@tieto.com> <20862.11247.214965.970445@gargle.gargle.HOWL> Message-ID: <517E3083.4000409@tieto.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On 29/04/13 10:14, Sujith Manoharan wrote: > Michal Kazior wrote: >> I'm not even sure if we should abort right away. We replenish htt rx >> buffers using GFP_ATOMIC allocation. This can fail under memory pressure >> more often (then, say, GFP_KERNEL). I wouldn't really consider this as >> fatal error. Although we could probably have a ath10k_warn/info if the >> initial allocation doesn't fill everything up. Perhaps we could fail >> only if the fill_cnt is still 0, or below a defined threshold? >> >> We could also try and split the replenishing functions and use >> GFP_KERNEL allocation during htt rx attach. > > We do a bunch of allocations using GFP_ATOMIC after htt_attach(). > Proceeding with initialization at this point seems wrong and programming > the FW with RX ring configuration via HTT_H2T_MSG_TYPE_RX_RING_CFG even though > host setup failed is probably incorrect ? You're right. > An updated patch: > > [PATCH] ath10k: Remove unneeded locks during HTT RX attach > > Fix two issues: > > * Bail out properly when RX buffer allocation fails at init time. > * Do not acquire the rx ring lock during attach() since we > don't rearm the replenish timer. > > Signed-off-by: Sujith Manoharan > --- Looks good to me now. -- Pozdrawiam / Best regards, Michal Kazior.