Lines Matching refs:res

41 	int res = tb_eeprom_ctl_read(sw, &ctl);  in tb_eeprom_active()  local
42 if (res) in tb_eeprom_active()
43 return res; in tb_eeprom_active()
46 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
47 if (res) in tb_eeprom_active()
48 return res; in tb_eeprom_active()
53 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
54 if (res) in tb_eeprom_active()
55 return res; in tb_eeprom_active()
70 int res; in tb_eeprom_transfer() local
72 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
73 if (res) in tb_eeprom_transfer()
74 return res; in tb_eeprom_transfer()
77 res = tb_eeprom_ctl_write(sw, ctl); in tb_eeprom_transfer()
78 if (res) in tb_eeprom_transfer()
79 return res; in tb_eeprom_transfer()
81 res = tb_eeprom_ctl_read(sw, ctl); in tb_eeprom_transfer()
82 if (res) in tb_eeprom_transfer()
83 return res; in tb_eeprom_transfer()
96 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_out() local
97 if (res) in tb_eeprom_out()
98 return res; in tb_eeprom_out()
101 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_OUT); in tb_eeprom_out()
102 if (res) in tb_eeprom_out()
103 return res; in tb_eeprom_out()
116 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_in() local
117 if (res) in tb_eeprom_in()
118 return res; in tb_eeprom_in()
122 res = tb_eeprom_transfer(sw, &ctl, TB_EEPROM_IN); in tb_eeprom_in()
123 if (res) in tb_eeprom_in()
124 return res; in tb_eeprom_in()
136 int i, res; in tb_eeprom_read_n() local
137 res = tb_eeprom_active(sw, true); in tb_eeprom_read_n()
138 if (res) in tb_eeprom_read_n()
139 return res; in tb_eeprom_read_n()
140 res = tb_eeprom_out(sw, 3); in tb_eeprom_read_n()
141 if (res) in tb_eeprom_read_n()
142 return res; in tb_eeprom_read_n()
143 res = tb_eeprom_out(sw, offset >> 8); in tb_eeprom_read_n()
144 if (res) in tb_eeprom_read_n()
145 return res; in tb_eeprom_read_n()
146 res = tb_eeprom_out(sw, offset); in tb_eeprom_read_n()
147 if (res) in tb_eeprom_read_n()
148 return res; in tb_eeprom_read_n()
150 res = tb_eeprom_in(sw, val + i); in tb_eeprom_read_n()
151 if (res) in tb_eeprom_read_n()
152 return res; in tb_eeprom_read_n()
239 int res; in tb_eeprom_get_drom_offset() local
244 res = tb_sw_read(sw, &cap, TB_CFG_SWITCH, sw->cap_plug_events, in tb_eeprom_get_drom_offset()
246 if (res) in tb_eeprom_get_drom_offset()
247 return res; in tb_eeprom_get_drom_offset()
274 int res = tb_eeprom_get_drom_offset(sw, &drom_offset); in tb_drom_read_uid_only() local
275 if (res) in tb_drom_read_uid_only()
276 return res; in tb_drom_read_uid_only()
279 res = tb_eeprom_read_n(sw, drom_offset, data, 9); in tb_drom_read_uid_only()
280 if (res) in tb_drom_read_uid_only()
281 return res; in tb_drom_read_uid_only()
307 int res; in tb_drom_parse_entry() local
318 res = tb_port_read(port, &type, TB_CFG_PORT, 2, 1); in tb_drom_parse_entry()
319 if (res) in tb_drom_parse_entry()
320 return res; in tb_drom_parse_entry()
371 int res; in tb_drom_read() local
394 res = tb_eeprom_get_drom_offset(sw, &drom_offset); in tb_drom_read()
395 if (res) in tb_drom_read()
396 return res; in tb_drom_read()
398 res = tb_eeprom_read_n(sw, drom_offset + 14, (u8 *) &size, 2); in tb_drom_read()
399 if (res) in tb_drom_read()
400 return res; in tb_drom_read()
412 res = tb_eeprom_read_n(sw, drom_offset, sw->drom, size); in tb_drom_read()
413 if (res) in tb_drom_read()