diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-02-23 10:42:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-24 23:50:00 -0800 |
commit | cc288f54bbace136c08742da84712add54e4acfa (patch) | |
tree | 6e4742f194bc787fa3cf9c2c416e95e02204a5ab /drivers/net/qlge/qlge_dbg.c | |
parent | bb58b5b67c08b5fde08090917a040a07ac9d43de (diff) |
qlge: Increase MAC addr hw sem granularity.
Instead of taking/giving the semaphore repeatedly when iterating over
several adderesses, we have the caller hold it until all are done. This
reduces PCI bus chatter and possible waits.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_dbg.c')
-rw-r--r-- | drivers/net/qlge/qlge_dbg.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/qlge/qlge_dbg.c b/drivers/net/qlge/qlge_dbg.c index 379b895ed6e..40a70c36f5a 100644 --- a/drivers/net/qlge/qlge_dbg.c +++ b/drivers/net/qlge/qlge_dbg.c @@ -83,6 +83,10 @@ static void ql_dump_cam_entries(struct ql_adapter *qdev) { int i; u32 value[3]; + + i = ql_sem_spinlock(qdev, SEM_MAC_ADDR_MASK); + if (i) + return; for (i = 0; i < 4; i++) { if (ql_get_mac_addr_reg(qdev, MAC_ADDR_TYPE_CAM_MAC, i, value)) { printk(KERN_ERR PFX @@ -111,12 +115,16 @@ static void ql_dump_cam_entries(struct ql_adapter *qdev) qdev->ndev->name, i, value[1], value[0]); } } + ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); } void ql_dump_routing_entries(struct ql_adapter *qdev) { int i; u32 value; + i = ql_sem_spinlock(qdev, SEM_RT_IDX_MASK); + if (i) + return; for (i = 0; i < 16; i++) { value = 0; if (ql_get_routing_reg(qdev, i, &value)) { @@ -131,6 +139,7 @@ void ql_dump_routing_entries(struct ql_adapter *qdev) qdev->ndev->name, i, value); } } + ql_sem_unlock(qdev, SEM_RT_IDX_MASK); } void ql_dump_regs(struct ql_adapter *qdev) |