]> git.baikalelectronics.ru Git - kernel.git/commit
asix: Rework reading from EEPROM
authorChristian Riesch <christian.riesch@omicron.at>
Thu, 19 Jul 2012 00:23:06 +0000 (00:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Jul 2012 17:48:07 +0000 (10:48 -0700)
commit9d2cd26d2a6c1260fc6159fd54b3a1f680ae38f6
tree4a200ab9b830cc15eebb88a2201d197c30ccf800
parentd78e563eaf031f8978bf284e91db58df97d8ecf4
asix: Rework reading from EEPROM

The current code for reading the EEPROM via ethtool in the asix
driver has a few issues. It cannot handle odd length values
(accesses must be aligned at 16 bit boundaries) and interprets the
offset provided by ethtool as 16 bit word offset instead as byte offset.

The new code for asix_get_eeprom() introduced by this patch is
modeled after the code in
drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c
and provides read access to the entire EEPROM with arbitrary
offsets and lengths.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/asix.h
drivers/net/usb/asix_common.c
drivers/net/usb/asix_devices.c
drivers/net/usb/ax88172a.c