Lines Matching refs:offset
21 u32 value, offset;
29 offset = 0x26;
31 offset = 0x2a;
35 ret = tb_sw_read(sw, &value, TB_CFG_SWITCH, offset, 1);
44 return tb_sw_write(sw, &value, TB_CFG_SWITCH, offset, 1);
65 * @offset: Previous capability offset (%0 for start)
67 * Returns dword offset of the next capability in port config space
72 int tb_port_next_cap(struct tb_port *port, unsigned int offset)
77 if (!offset)
80 ret = tb_port_read(port, &header, TB_CFG_PORT, offset, 1);
89 int offset = 0;
95 offset = tb_port_next_cap(port, offset);
96 if (offset < 0)
97 return offset;
99 ret = tb_port_read(port, &header, TB_CFG_PORT, offset, 1);
104 return offset;
105 } while (offset > 0);
115 * Returns offset to start of capability or %-ENOENT if no such
138 * @offset: Previous capability offset (%0 for start)
140 * Finds dword offset of the next capability in router config space
145 int tb_switch_next_cap(struct tb_switch *sw, unsigned int offset)
150 if (!offset)
153 ret = tb_sw_read(sw, &header, TB_CFG_SWITCH, offset, 2);
171 header.basic.cap, offset);
184 * Returns offset to start of capability or %-ENOENT if no such
190 int offset = 0;
196 offset = tb_switch_next_cap(sw, offset);
197 if (offset < 0)
198 return offset;
200 ret = tb_sw_read(sw, &header, TB_CFG_SWITCH, offset, 1);
205 return offset;
206 } while (offset);
217 * and returns offset when capability matching @vsec is found. If no
223 int offset = 0;
229 offset = tb_switch_next_cap(sw, offset);
230 if (offset < 0)
231 return offset;
233 ret = tb_sw_read(sw, &header, TB_CFG_SWITCH, offset, 1);
239 return offset;
240 } while (offset);