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
68 err = fallback_set_params(request, &modinfo, &eeprom); in eeprom_fallback()
109 struct eeprom_req_info *request = MODULE_EEPROM_REQINFO(req_base); in eeprom_prepare_data() local
114 page_data.offset = request->offset; in eeprom_prepare_data()
115 page_data.length = request->length; in eeprom_prepare_data()
116 page_data.i2c_address = request->i2c_address; in eeprom_prepare_data()
117 page_data.page = request->page; in eeprom_prepare_data()
118 page_data.bank = request->bank; in eeprom_prepare_data()
143 return eeprom_fallback(request, reply, info); in eeprom_prepare_data()
150 struct eeprom_req_info *request = MODULE_EEPROM_REQINFO(req_info); in eeprom_parse_request() local
158 request->i2c_address = nla_get_u8(tb[ETHTOOL_A_MODULE_EEPROM_I2C_ADDRESS]); in eeprom_parse_request()
159 request->offset = nla_get_u32(tb[ETHTOOL_A_MODULE_EEPROM_OFFSET]); in eeprom_parse_request()
160 request->length = nla_get_u32(tb[ETHTOOL_A_MODULE_EEPROM_LENGTH]); in eeprom_parse_request()
164 * This means user may only request dumps of length limited to 128 from in eeprom_parse_request()
168 request->page = nla_get_u8(tb[ETHTOOL_A_MODULE_EEPROM_PAGE]); in eeprom_parse_request()
169 if (request->page && request->offset < ETH_MODULE_EEPROM_PAGE_LEN) { in eeprom_parse_request()
175 if (request->offset < ETH_MODULE_EEPROM_PAGE_LEN && in eeprom_parse_request()
176 request->offset + request->length > ETH_MODULE_EEPROM_PAGE_LEN) { in eeprom_parse_request()
180 } else if (request->offset + request->length > ETH_MODULE_EEPROM_PAGE_LEN * 2) { in eeprom_parse_request()
187 request->bank = nla_get_u8(tb[ETHTOOL_A_MODULE_EEPROM_BANK]); in eeprom_parse_request()
195 const struct eeprom_req_info *request = MODULE_EEPROM_REQINFO(req_base); in eeprom_reply_size() local
197 return nla_total_size(sizeof(u8) * request->length); /* _EEPROM_DATA */ in eeprom_reply_size()