diff options
author | Baruch Siach <baruch@tkos.co.il> | 2008-12-19 04:39:14 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-19 07:27:39 +0100 |
commit | 5664dd5561850df580414783cf3c8e0aa834c62e (patch) | |
tree | aac02f7e39a2adbac4920c131c1a49f6ddb571e2 /fs/coda | |
parent | netdevice zd1201: Use after free (diff) | |
download | linux-5664dd5561850df580414783cf3c8e0aa834c62e.tar.xz linux-5664dd5561850df580414783cf3c8e0aa834c62e.zip |
enc28j60: reduce the number of spi transfers in enc28j60_set_bank()
A major source of overhead in the enc28j60 driver is the SPI transfers. Each
SPI transfer entails two kernel thread context switches. One major source of
SPI transfers is the enc28j60_set_bank() functions which runs before every
register access. This patch reduces the number of SPI transfers that
enc28j60_set_bank() performs in two ways:
1. removes unnecessary bank switch for the registers that are present in all
banks
2. when switching from banks 0 or 3 to banks 1 or 2 (i.e. only one bit
changes) enc28j60_set_bank() does only one SPI transfer instead of two
According to my tests these changes reduce the number of SPI transfers in
about 25%.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/coda')
0 files changed, 0 insertions, 0 deletions