summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/tg3.h
diff options
context:
space:
mode:
authorMatt Carlson2011-11-04 10:14:58 +0100
committerDavid S. Miller2011-11-04 22:31:46 +0100
commit78f94dc7b10d98cf4cf8498d98581500d910c6b7 (patch)
tree871e63ccac34bef1440e0aa493bd0f08b93e74ec /drivers/net/ethernet/broadcom/tg3.h
parentMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/lin... (diff)
downloadkernel-qcow2-linux-78f94dc7b10d98cf4cf8498d98581500d910c6b7.tar.gz
kernel-qcow2-linux-78f94dc7b10d98cf4cf8498d98581500d910c6b7.tar.xz
kernel-qcow2-linux-78f94dc7b10d98cf4cf8498d98581500d910c6b7.zip
tg3: Fix APE mutex init and use
APE mutex register blocks are shared by all ports of multiport devices. For some mutexing purposes, each function is assigned their own register. For other cases, each function is assigned its own request and grant bits of a single register. For the latter cases, the tg3 driver is incorrectly allowing each function to use the same set of grant / request bits. This patch fixes the code so that each function uses the appropriate bitset. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.h')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
index f32f288134c7..03fab8cadd86 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -2344,9 +2344,13 @@
#define APE_PER_LOCK_GRANT_DRIVER 0x00001000
/* APE convenience enumerations. */
-#define TG3_APE_LOCK_GRC 1
-#define TG3_APE_LOCK_MEM 4
-#define TG3_APE_LOCK_GPIO 7
+#define TG3_APE_LOCK_PHY0 0
+#define TG3_APE_LOCK_GRC 1
+#define TG3_APE_LOCK_PHY1 2
+#define TG3_APE_LOCK_PHY2 3
+#define TG3_APE_LOCK_MEM 4
+#define TG3_APE_LOCK_PHY3 5
+#define TG3_APE_LOCK_GPIO 7
#define TG3_EEPROM_SB_F1R2_MBA_OFF 0x10