Lines Matching refs:res
66 int res; in tb_port_state() local
71 res = tb_port_read(port, &phy, TB_CFG_PORT, port->cap_phy, 2); in tb_port_state()
72 if (res) in tb_port_state()
73 return res; in tb_port_state()
186 int res; in tb_init_port() local
189 res = tb_port_read(port, &port->config, TB_CFG_PORT, 0, 8); in tb_init_port()
190 if (res) in tb_init_port()
191 return res; in tb_init_port()
237 struct tb_cfg_result res; in tb_switch_reset() local
244 res.err = tb_cfg_write(tb->ctl, ((u32 *) &header) + 2, route, in tb_switch_reset()
246 if (res.err) in tb_switch_reset()
247 return res.err; in tb_switch_reset()
248 res = tb_cfg_reset(tb->ctl, route, TB_CFG_DEFAULT_TIMEOUT); in tb_switch_reset()
249 if (res.err > 0) in tb_switch_reset()
251 return res.err; in tb_switch_reset()
282 int res; in tb_plug_events_active() local
285 res = tb_sw_write(sw, ((u32 *) &sw->config) + 4, TB_CFG_SWITCH, 4, 1); in tb_plug_events_active()
286 if (res) in tb_plug_events_active()
287 return res; in tb_plug_events_active()
289 res = tb_sw_read(sw, &data, TB_CFG_SWITCH, sw->cap_plug_events + 1, 1); in tb_plug_events_active()
290 if (res) in tb_plug_events_active()
291 return res; in tb_plug_events_active()