From: Ben Hutchings Date: Wed, 23 Jun 2010 13:54:31 +0000 (+0000) Subject: 3c59x: Specify window explicitly for access to windowed registers X-Git-Tag: v2.6.36-rc1~571^2~444 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a095cfc40ec7ebe63e9532383c5b5c2a27b14075;p=pandora-kernel.git 3c59x: Specify window explicitly for access to windowed registers Currently much of the code assumes that a specific window has been selected, while a few functions save and restore the window. This makes it impossible to introduce fine-grained locking. Make those assumptions explicit by introducing wrapper functions to set the window and read/write a register. Use these everywhere except vortex_interrupt(), vortex_start_xmit() and vortex_rx(). These set the window just once, or not at all in the case of vortex_rx() as it should always be called from vortex_interrupt(). Cache the current window in struct vortex_private to avoid unnecessary hardware writes. Signed-off-by: Ben Hutchings Tested-by: Arne Nordmark [against 2.6.32] Signed-off-by: David S. Miller --- Reading git-diff-tree failed