1 Dec 09:19
Re: [PATCH] libertas: remove internal buffers from GSPI driver
On Mon, 2009-11-30 at 16:53 -0800, Colin McCabe wrote: > On Tue, Oct 27, 2009 at 3:51 PM, Andrey Yurovsky <andrey@...> wrote: > > This patch removes the internal command and data buffers that the GSPI driver > > maintained and instead relies on the Libertas core to synchronize access > > to the command and data ports as with the other interface drivers. > > Hi all, > > I'm glad to see you're improving stuff. Good catch with some of the > recent bugfixes. > > However... it seems like you are headed for a "scheduling while > atomic" with this patch. > > The original reason why if_spi_host_to_card copied the data into a > buffer, rather than simply calling spu_write and being done with it, > was that spu_write needed to sleep. spu_write invokes spi_sync, which > has a big comment that says "This call may only be used from a context > that may sleep." > > Unfortunately, if_spi_host_to_card is called from contexts where we > hold a spinlock. For example, lbs_main does > > spin_lock_irq(&priv->driver_lock); > if (!priv->dnld_sent && priv->tx_pending_len > 0) { > int ret = priv->hw_host_to_card(priv, MVMS_DAT, > > priv->tx_pending_buf, > > priv->tx_pending_len);(Continue reading)
RSS Feed