Lines Matching full:request

29 static int fallback_set_params(struct eeprom_req_info *request,  in fallback_set_params()  argument
33 u32 offset = request->offset; in fallback_set_params()
34 u32 length = request->length; in fallback_set_params()
36 if (request->page) in fallback_set_params()
37 offset = request->page * ETH_MODULE_EEPROM_PAGE_LEN + offset; in fallback_set_params()
40 request->i2c_address == 0x51) in fallback_set_params()
53 static int eeprom_fallback(struct eeprom_req_info *request, in eeprom_fallback() argument
67 err = fallback_set_params(request, &modinfo, &eeprom); in eeprom_fallback()
114 struct eeprom_req_info *request = MODULE_EEPROM_REQINFO(req_base); in eeprom_prepare_data() local
119 page_data.offset = request->offset; in eeprom_prepare_data()
120 page_data.length = request->length; in eeprom_prepare_data()
121 page_data.i2c_address = request->i2c_address; in eeprom_prepare_data()
122 page_data.page = request->page; in eeprom_prepare_data()
123 page_data.bank = request->bank; in eeprom_prepare_data()
148 return eeprom_fallback(request, reply); in eeprom_prepare_data()
155 struct eeprom_req_info *request = MODULE_EEPROM_REQINFO(req_info); in eeprom_parse_request() local
163 request->i2c_address = nla_get_u8(tb[ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS]); in eeprom_parse_request()
164 request->offset = nla_get_u32(tb[ETHTOOL_A_MODULE_EEPROM_OFFSET]); in eeprom_parse_request()
165 request->length = nla_get_u32(tb[ETHTOOL_A_MODULE_EEPROM_LENGTH]); in eeprom_parse_request()
169 * This means user may only request dumps of length limited to 128 from in eeprom_parse_request()
173 request->page = nla_get_u8(tb[ETHTOOL_A_MODULE_EEPROM_PAGE]); in eeprom_parse_request()
174 if (request->page && request->offset < ETH_MODULE_EEPROM_PAGE_LEN) { in eeprom_parse_request()
180 if (request->offset < ETH_MODULE_EEPROM_PAGE_LEN && in eeprom_parse_request()
181 request->offset + request->length > ETH_MODULE_EEPROM_PAGE_LEN) { in eeprom_parse_request()
185 } else if (request->offset + request->length > ETH_MODULE_EEPROM_PAGE_LEN * 2) { in eeprom_parse_request()
192 request->bank = nla_get_u8(tb[ETHTOOL_A_MODULE_EEPROM_BANK]); in eeprom_parse_request()
200 const struct eeprom_req_info *request = MODULE_EEPROM_REQINFO(req_base); in eeprom_reply_size() local
202 return nla_total_size(sizeof(u8) * request->length); /* _EEPROM_DATA */ in eeprom_reply_size()