Lines Matching defs:index

761 		u16 index, value;
763 index = data[i] & USB4_BA_INDEX_MASK;
766 switch (index) {
788 tb_sw_dbg(sw, " unknown credit allocation index %#x, skipping\n",
789 index);
1289 u8 index, u8 reg, void *buf, u8 size)
1302 val |= (index << PORT_CS_1_RETIMER_INDEX_SHIFT);
1329 u8 index, u8 reg, const void *buf, u8 size)
1349 val |= (index << PORT_CS_1_RETIMER_INDEX_SHIFT);
1390 u8 index, enum usb4_sb_opcode opcode, int timeout_msec)
1397 ret = usb4_port_sb_write(port, target, index, USB4_SB_OPCODE, &val,
1406 ret = usb4_port_sb_read(port, target, index, USB4_SB_OPCODE,
1465 * makes the retimers on the link to assign index to themselves. Returns
1723 static inline int usb4_port_retimer_op(struct tb_port *port, u8 index,
1727 return usb4_port_sb_op(port, USB4_SB_TARGET_RETIMER, index, opcode,
1734 * @index: Retimer index
1739 int usb4_port_retimer_set_inbound_sbtx(struct tb_port *port, u8 index)
1743 ret = usb4_port_retimer_op(port, index, USB4_SB_OPCODE_SET_INBOUND_SBTX,
1754 return usb4_port_retimer_op(port, index, USB4_SB_OPCODE_SET_INBOUND_SBTX,
1761 * @index: Retimer index
1766 int usb4_port_retimer_unset_inbound_sbtx(struct tb_port *port, u8 index)
1768 return usb4_port_retimer_op(port, index,
1775 * @index: Retimer index
1781 * retimer is connected to @port at @index. Returns %0 in case of
1783 * present at given @index returns %-ENODEV. In any other failure
1786 int usb4_port_retimer_read(struct tb_port *port, u8 index, u8 reg, void *buf,
1789 return usb4_port_sb_read(port, USB4_SB_TARGET_RETIMER, index, reg, buf,
1796 * @index: Retimer index
1802 * connected to @port at @index. Returns %0 in case of success. If there
1803 * is no retimer present at given @index returns %-ENODEV. In any other
1806 int usb4_port_retimer_write(struct tb_port *port, u8 index, u8 reg,
1809 return usb4_port_sb_write(port, USB4_SB_TARGET_RETIMER, index, reg, buf,
1816 * @index: Retimer index
1818 * If the retimer at @index is last one (connected directly to the
1823 int usb4_port_retimer_is_last(struct tb_port *port, u8 index)
1828 ret = usb4_port_retimer_op(port, index, USB4_SB_OPCODE_QUERY_LAST_RETIMER,
1833 ret = usb4_port_retimer_read(port, index, USB4_SB_METADATA, &metadata,
1841 * @index: Retimer index
1843 * Reads NVM sector size (in bytes) of a retimer at @index. This
1847 * retimer at @index.
1849 int usb4_port_retimer_nvm_sector_size(struct tb_port *port, u8 index)
1854 ret = usb4_port_retimer_op(port, index, USB4_SB_OPCODE_GET_NVM_SECTOR_SIZE,
1859 ret = usb4_port_retimer_read(port, index, USB4_SB_METADATA, &metadata,
1867 * @index: Retimer index
1875 int usb4_port_retimer_nvm_set_offset(struct tb_port *port, u8 index,
1885 ret = usb4_port_retimer_write(port, index, USB4_SB_METADATA, &metadata,
1890 return usb4_port_retimer_op(port, index, USB4_SB_OPCODE_NVM_SET_OFFSET,
1896 u8 index;
1905 u8 index = info->index;
1908 ret = usb4_port_retimer_write(port, index, USB4_SB_DATA,
1913 return usb4_port_retimer_op(port, index,
1920 * @index: Retimer index
1928 * no retimer at @index.
1930 int usb4_port_retimer_nvm_write(struct tb_port *port, u8 index, unsigned int address,
1933 struct retimer_info info = { .port = port, .index = index };
1936 ret = usb4_port_retimer_nvm_set_offset(port, index, address);
1947 * @index: Retimer index
1952 * index set so one needs to call usb4_port_enumerate_retimers() to
1953 * force index to be assigned.
1955 int usb4_port_retimer_nvm_authenticate(struct tb_port *port, u8 index)
1961 * authentication completes the retimer index is not set anymore
1965 return usb4_port_sb_write(port, USB4_SB_TARGET_RETIMER, index,
1972 * @index: Retimer index
1982 int usb4_port_retimer_nvm_authenticate_status(struct tb_port *port, u8 index,
1988 ret = usb4_port_retimer_read(port, index, USB4_SB_OPCODE, &val,
2000 ret = usb4_port_retimer_read(port, index, USB4_SB_METADATA,
2018 u8 index = info->index;
2026 ret = usb4_port_retimer_write(port, index, USB4_SB_METADATA, &metadata,
2031 ret = usb4_port_retimer_op(port, index, USB4_SB_OPCODE_NVM_READ, 500);
2035 return usb4_port_retimer_read(port, index, USB4_SB_DATA, buf,
2042 * @index: Retimer index
2049 * Specifically returns %-ENODEV if there is no retimer at @index.
2051 int usb4_port_retimer_nvm_read(struct tb_port *port, u8 index,
2054 struct retimer_info info = { .port = port, .index = index };