• Home
  • Raw
  • Download

Lines Matching refs:eeprom

1512 	struct ethtool_eeprom eeprom;  in ethtool_get_any_eeprom()  local
1513 void __user *userbuf = useraddr + sizeof(eeprom); in ethtool_get_any_eeprom()
1518 if (copy_from_user(&eeprom, useraddr, sizeof(eeprom))) in ethtool_get_any_eeprom()
1522 if (eeprom.offset + eeprom.len <= eeprom.offset) in ethtool_get_any_eeprom()
1526 if (eeprom.offset + eeprom.len > total_len) in ethtool_get_any_eeprom()
1533 bytes_remaining = eeprom.len; in ethtool_get_any_eeprom()
1535 eeprom.len = min(bytes_remaining, (u32)PAGE_SIZE); in ethtool_get_any_eeprom()
1537 ret = getter(dev, &eeprom, data); in ethtool_get_any_eeprom()
1540 if (copy_to_user(userbuf, data, eeprom.len)) { in ethtool_get_any_eeprom()
1544 userbuf += eeprom.len; in ethtool_get_any_eeprom()
1545 eeprom.offset += eeprom.len; in ethtool_get_any_eeprom()
1546 bytes_remaining -= eeprom.len; in ethtool_get_any_eeprom()
1549 eeprom.len = userbuf - (useraddr + sizeof(eeprom)); in ethtool_get_any_eeprom()
1550 eeprom.offset -= eeprom.len; in ethtool_get_any_eeprom()
1551 if (copy_to_user(useraddr, &eeprom, sizeof(eeprom))) in ethtool_get_any_eeprom()
1572 struct ethtool_eeprom eeprom; in ethtool_set_eeprom() local
1574 void __user *userbuf = useraddr + sizeof(eeprom); in ethtool_set_eeprom()
1583 if (copy_from_user(&eeprom, useraddr, sizeof(eeprom))) in ethtool_set_eeprom()
1587 if (eeprom.offset + eeprom.len <= eeprom.offset) in ethtool_set_eeprom()
1591 if (eeprom.offset + eeprom.len > ops->get_eeprom_len(dev)) in ethtool_set_eeprom()
1598 bytes_remaining = eeprom.len; in ethtool_set_eeprom()
1600 eeprom.len = min(bytes_remaining, (u32)PAGE_SIZE); in ethtool_set_eeprom()
1602 if (copy_from_user(data, userbuf, eeprom.len)) { in ethtool_set_eeprom()
1606 ret = ops->set_eeprom(dev, &eeprom, data); in ethtool_set_eeprom()
1609 userbuf += eeprom.len; in ethtool_set_eeprom()
1610 eeprom.offset += eeprom.len; in ethtool_set_eeprom()
1611 bytes_remaining -= eeprom.len; in ethtool_set_eeprom()