]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
xilinx_emacps: Changes spin-lock
authorAnirudha Sarangi <anirudh@xilinx.com>
Wed, 3 Apr 2013 17:36:54 +0000 (23:06 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 4 Apr 2013 05:46:04 +0000 (07:46 +0200)
commitd312cb6fbbe8e41fe1c84d793d9c0fa80d200081
treee87bb388e99c9ff84698811cebb0721d0f6f5f64
parent96ed7563a71f9706a19c572f129dd201920c0990
xilinx_emacps: Changes spin-lock

The existing implementation had a single lock for tx and rx paths.
This resulted in creating dependencies between tx and rx paths. For
example a Rx interrupt had to wait for the start_xmit routine to
finish. This could also result in potential locking issues as
reported by running on Qemu.
This patch uses two locks(one each for tx and rx paths) instead
of a single lock. This patch avoids to the extent possible not to
disable IRQs (avoids spin-lock-irqsave) and instead uses spin-lock-bh.
This effectively makes the Tx and Rx paths independent of each other.
This patch addresses all concerns (because of this new implementation)
related to inadvertent corruption of registers.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
drivers/net/ethernet/xilinx/xilinx_emacps.c