From ceb02c91dd76012e902799e0132ad3ad3e659394 Mon Sep 17 00:00:00 2001 From: Christian Riesch Date: Thu, 19 Jul 2012 00:23:06 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/usb/asix_devices.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'drivers/net/usb/asix_devices.c') diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index ed9403b..658c08f 100644 --- a/drivers/net/usb/asix_devices.c +++ b/drivers/net/usb/asix_devices.c @@ -201,9 +201,6 @@ static int ax88172_bind(struct usbnet *dev, struct usb_interface *intf) u8 buf[ETH_ALEN]; int i; unsigned long gpio_bits = dev->driver_info->data; - struct asix_data *data = (struct asix_data *)&dev->data; - - data->eeprom_len = AX88172_EEPROM_LEN; usbnet_get_endpoints(dev,intf); @@ -409,12 +406,9 @@ static const struct net_device_ops ax88772_netdev_ops = { static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) { int ret, embd_phy; - struct asix_data *data = (struct asix_data *)&dev->data; u8 buf[ETH_ALEN]; u32 phyid; - data->eeprom_len = AX88772_EEPROM_LEN; - usbnet_get_endpoints(dev,intf); /* Get the MAC address */ @@ -767,9 +761,6 @@ static int ax88178_bind(struct usbnet *dev, struct usb_interface *intf) { int ret; u8 buf[ETH_ALEN]; - struct asix_data *data = (struct asix_data *)&dev->data; - - data->eeprom_len = AX88772_EEPROM_LEN; usbnet_get_endpoints(dev,intf); -- cgit v1.1