/drivers/thunderbolt/ |
D | tb.c | 52 sw = tb_switch_alloc(port->sw->tb, tb_downstream_route(port)); in tb_scan_port() 63 static void tb_free_invalid_tunnels(struct tb *tb) in tb_free_invalid_tunnels() argument 67 list_for_each_entry_safe(tunnel, n, &tb->tunnel_list, list) in tb_free_invalid_tunnels() 143 static void tb_activate_pcie_devices(struct tb *tb) in tb_activate_pcie_devices() argument 153 for (i = 1; i <= tb->root_switch->config.max_port_number; i++) { in tb_activate_pcie_devices() 154 if (tb_is_upstream_port(&tb->root_switch->ports[i])) in tb_activate_pcie_devices() 156 if (tb->root_switch->ports[i].config.type != TB_TYPE_PORT) in tb_activate_pcie_devices() 158 if (!tb->root_switch->ports[i].remote) in tb_activate_pcie_devices() 160 sw = tb->root_switch->ports[i].remote->sw; in tb_activate_pcie_devices() 179 down_port = tb_find_unused_down_port(tb->root_switch); in tb_activate_pcie_devices() [all …]
|
D | tb.h | 21 struct tb *tb; member 80 struct tb *tb; member 99 struct tb { struct 143 return tb_cfg_read(sw->tb->ctl, in tb_sw_read() 155 return tb_cfg_write(sw->tb->ctl, in tb_sw_write() 167 return tb_cfg_read(port->sw->tb->ctl, in tb_port_read() 179 return tb_cfg_write(port->sw->tb->ctl, in tb_port_write() 188 #define tb_err(tb, fmt, arg...) dev_err(&(tb)->nhi->pdev->dev, fmt, ## arg) argument 189 #define tb_WARN(tb, fmt, arg...) dev_WARN(&(tb)->nhi->pdev->dev, fmt, ## arg) argument 190 #define tb_warn(tb, fmt, arg...) dev_warn(&(tb)->nhi->pdev->dev, fmt, ## arg) argument [all …]
|
D | switch.c | 43 static void tb_dump_port(struct tb *tb, struct tb_regs_port_header *port) in tb_dump_port() argument 45 tb_info(tb, in tb_dump_port() 50 tb_info(tb, " Max hop id (in/out): %d/%d\n", in tb_dump_port() 52 tb_info(tb, " Max counters: %d\n", port->max_counters); in tb_dump_port() 53 tb_info(tb, " NFC Credits: %#x\n", port->nfc_credits); in tb_dump_port() 203 tb_dump_port(port->sw->tb, &port->config); in tb_init_port() 212 static void tb_dump_switch(struct tb *tb, struct tb_regs_switch_header *sw) in tb_dump_switch() argument 214 tb_info(tb, in tb_dump_switch() 218 tb_info(tb, " Max Port Number: %d\n", sw->max_port_number); in tb_dump_switch() 219 tb_info(tb, " Config:\n"); in tb_dump_switch() [all …]
|
D | path.c | 35 struct tb_path *tb_path_alloc(struct tb *tb, int num_hops) in tb_path_alloc() argument 45 path->tb = tb; in tb_path_alloc() 56 tb_WARN(path->tb, "trying to free an activated path\n") in tb_path_free() 93 tb_WARN(path->tb, "trying to deactivate an inactive path\n"); in tb_path_deactivate() 96 tb_info(path->tb, in tb_path_deactivate() 120 tb_WARN(path->tb, "trying to activate already activated path\n"); in tb_path_activate() 124 tb_info(path->tb, in tb_path_activate() 212 tb_info(path->tb, "path activation complete\n"); in tb_path_activate() 215 tb_WARN(path->tb, "path activation failed\n"); in tb_path_activate()
|
D | tunnel_pci.h | 13 struct tb *tb; member 21 struct tb_pci_tunnel *tb_pci_alloc(struct tb *tb, struct tb_port *up,
|
D | tunnel_pci.c | 16 level(__tunnel->tb, "%llx:%x <-> %llx:%x (PCI): " fmt, \ 58 struct tb_pci_tunnel *tb_pci_alloc(struct tb *tb, struct tb_port *up, in tb_pci_alloc() argument 64 tunnel->tb = tb; in tb_pci_alloc() 68 tunnel->path_to_up = tb_path_alloc(up->sw->tb, 2); in tb_pci_alloc() 71 tunnel->path_to_down = tb_path_alloc(up->sw->tb, 2); in tb_pci_alloc() 208 list_add(&tunnel->list, &tunnel->tb->tunnel_list); in tb_pci_activate()
|
D | nhi.c | 500 struct tb *tb = pci_get_drvdata(pdev); in nhi_suspend_noirq() local 501 thunderbolt_suspend(tb); in nhi_suspend_noirq() 508 struct tb *tb = pci_get_drvdata(pdev); in nhi_resume_noirq() local 509 thunderbolt_resume(tb); in nhi_resume_noirq() 539 struct tb *tb; in nhi_probe() local 597 tb = thunderbolt_alloc_and_start(nhi); in nhi_probe() 598 if (!tb) { in nhi_probe() 606 pci_set_drvdata(pdev, tb); in nhi_probe() 613 struct tb *tb = pci_get_drvdata(pdev); in nhi_remove() local 614 struct tb_nhi *nhi = tb->nhi; in nhi_remove() [all …]
|
/drivers/iio/common/st_sensors/ |
D | st_sensors_spi.c | 29 static int st_sensors_spi_read(struct st_sensor_transfer_buffer *tb, in st_sensors_spi_read() argument 36 .tx_buf = tb->tx_buf, in st_sensors_spi_read() 41 .rx_buf = tb->rx_buf, in st_sensors_spi_read() 47 mutex_lock(&tb->buf_lock); in st_sensors_spi_read() 49 tb->tx_buf[0] = reg_addr | ST_SENSORS_SPI_MULTIREAD; in st_sensors_spi_read() 51 tb->tx_buf[0] = reg_addr | ST_SENSORS_SPI_READ; in st_sensors_spi_read() 57 memcpy(data, tb->rx_buf, len); in st_sensors_spi_read() 58 mutex_unlock(&tb->buf_lock); in st_sensors_spi_read() 62 mutex_unlock(&tb->buf_lock); in st_sensors_spi_read() 66 static int st_sensors_spi_read_byte(struct st_sensor_transfer_buffer *tb, in st_sensors_spi_read_byte() argument [all …]
|
D | st_sensors_i2c.c | 29 static int st_sensors_i2c_read_byte(struct st_sensor_transfer_buffer *tb, in st_sensors_i2c_read_byte() argument 45 struct st_sensor_transfer_buffer *tb, struct device *dev, in st_sensors_i2c_read_multiple_byte() argument 55 static int st_sensors_i2c_write_byte(struct st_sensor_transfer_buffer *tb, in st_sensors_i2c_write_byte() argument
|
/drivers/target/ |
D | target_core_hba.c | 53 struct target_backend *tb, *old; in transport_backend_register() local 55 tb = kzalloc(sizeof(*tb), GFP_KERNEL); in transport_backend_register() 56 if (!tb) in transport_backend_register() 58 tb->ops = ops; in transport_backend_register() 65 kfree(tb); in transport_backend_register() 69 target_setup_backend_cits(tb); in transport_backend_register() 70 list_add_tail(&tb->list, &backend_list); in transport_backend_register() 81 struct target_backend *tb; in target_backend_unregister() local 84 list_for_each_entry(tb, &backend_list, list) { in target_backend_unregister() 85 if (tb->ops == ops) { in target_backend_unregister() [all …]
|
/drivers/net/wireless/ti/wlcore/ |
D | testmode.c | 72 static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[]) in wl1271_tm_cmd_test() argument 81 if (!tb[WL1271_TM_ATTR_DATA]) in wl1271_tm_cmd_test() 84 buf = nla_data(tb[WL1271_TM_ATTR_DATA]); in wl1271_tm_cmd_test() 85 buf_len = nla_len(tb[WL1271_TM_ATTR_DATA]); in wl1271_tm_cmd_test() 87 if (tb[WL1271_TM_ATTR_ANSWER]) in wl1271_tm_cmd_test() 88 answer = nla_get_u8(tb[WL1271_TM_ATTR_ANSWER]); in wl1271_tm_cmd_test() 151 static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[]) in wl1271_tm_cmd_interrogate() argument 160 if (!tb[WL1271_TM_ATTR_IE_ID]) in wl1271_tm_cmd_interrogate() 163 ie_id = nla_get_u8(tb[WL1271_TM_ATTR_IE_ID]); in wl1271_tm_cmd_interrogate() 215 static int wl1271_tm_cmd_configure(struct wl1271 *wl, struct nlattr *tb[]) in wl1271_tm_cmd_configure() argument [all …]
|
D | vendor_cmd.c | 35 struct nlattr *tb[NUM_WLCORE_VENDOR_ATTR]; in wlcore_vendor_cmd_smart_config_start() local 43 ret = nla_parse(tb, MAX_WLCORE_VENDOR_ATTR, data, data_len, in wlcore_vendor_cmd_smart_config_start() 48 if (!tb[WLCORE_VENDOR_ATTR_GROUP_ID]) in wlcore_vendor_cmd_smart_config_start() 63 nla_get_u32(tb[WLCORE_VENDOR_ATTR_GROUP_ID])); in wlcore_vendor_cmd_smart_config_start() 110 struct nlattr *tb[NUM_WLCORE_VENDOR_ATTR]; in wlcore_vendor_cmd_smart_config_set_group_key() local 118 ret = nla_parse(tb, MAX_WLCORE_VENDOR_ATTR, data, data_len, in wlcore_vendor_cmd_smart_config_set_group_key() 123 if (!tb[WLCORE_VENDOR_ATTR_GROUP_ID] || in wlcore_vendor_cmd_smart_config_set_group_key() 124 !tb[WLCORE_VENDOR_ATTR_GROUP_KEY]) in wlcore_vendor_cmd_smart_config_set_group_key() 139 nla_get_u32(tb[WLCORE_VENDOR_ATTR_GROUP_ID]), in wlcore_vendor_cmd_smart_config_set_group_key() 140 nla_len(tb[WLCORE_VENDOR_ATTR_GROUP_KEY]), in wlcore_vendor_cmd_smart_config_set_group_key() [all …]
|
/drivers/tty/ |
D | tty_buffer.c | 313 struct tty_buffer *tb = port->buf.tail; in tty_insert_flip_string_fixed_flag() local 316 memcpy(char_buf_ptr(tb, tb->used), chars, space); in tty_insert_flip_string_fixed_flag() 317 if (~tb->flags & TTYB_NORMAL) in tty_insert_flip_string_fixed_flag() 318 memset(flag_buf_ptr(tb, tb->used), flag, space); in tty_insert_flip_string_fixed_flag() 319 tb->used += space; in tty_insert_flip_string_fixed_flag() 348 struct tty_buffer *tb = port->buf.tail; in tty_insert_flip_string_flags() local 351 memcpy(char_buf_ptr(tb, tb->used), chars, space); in tty_insert_flip_string_flags() 352 memcpy(flag_buf_ptr(tb, tb->used), flags, space); in tty_insert_flip_string_flags() 353 tb->used += space; in tty_insert_flip_string_flags() 375 struct tty_buffer *tb; in __tty_insert_flip_char() local [all …]
|
/drivers/net/wireless/ath/ath10k/ |
D | wmi-tlv.c | 135 const void **tb = data; in ath10k_wmi_tlv_iter_parse() local 138 tb[tag] = ptr; in ath10k_wmi_tlv_iter_parse() 143 static int ath10k_wmi_tlv_parse(struct ath10k *ar, const void **tb, in ath10k_wmi_tlv_parse() argument 147 (void *)tb); in ath10k_wmi_tlv_parse() 154 const void **tb; in ath10k_wmi_tlv_parse_alloc() local 157 tb = kzalloc(sizeof(*tb) * WMI_TLV_TAG_MAX, gfp); in ath10k_wmi_tlv_parse_alloc() 158 if (!tb) in ath10k_wmi_tlv_parse_alloc() 161 ret = ath10k_wmi_tlv_parse(ar, tb, ptr, len); in ath10k_wmi_tlv_parse_alloc() 163 kfree(tb); in ath10k_wmi_tlv_parse_alloc() 167 return tb; in ath10k_wmi_tlv_parse_alloc() [all …]
|
D | testmode.c | 111 static int ath10k_tm_cmd_get_version(struct ath10k *ar, struct nlattr *tb[]) in ath10k_tm_cmd_get_version() argument 212 static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[]) in ath10k_tm_cmd_utf_start() argument 333 static int ath10k_tm_cmd_utf_stop(struct ath10k *ar, struct nlattr *tb[]) in ath10k_tm_cmd_utf_stop() argument 357 static int ath10k_tm_cmd_wmi(struct ath10k *ar, struct nlattr *tb[]) in ath10k_tm_cmd_wmi() argument 371 if (!tb[ATH10K_TM_ATTR_DATA]) { in ath10k_tm_cmd_wmi() 376 if (!tb[ATH10K_TM_ATTR_WMI_CMDID]) { in ath10k_tm_cmd_wmi() 381 buf = nla_data(tb[ATH10K_TM_ATTR_DATA]); in ath10k_tm_cmd_wmi() 382 buf_len = nla_len(tb[ATH10K_TM_ATTR_DATA]); in ath10k_tm_cmd_wmi() 383 cmd_id = nla_get_u32(tb[ATH10K_TM_ATTR_WMI_CMDID]); in ath10k_tm_cmd_wmi() 417 struct nlattr *tb[ATH10K_TM_ATTR_MAX + 1]; in ath10k_tm_cmd() local [all …]
|
/drivers/net/wireless/ath/ath6kl/ |
D | testmode.c | 73 struct nlattr *tb[ATH6KL_TM_ATTR_MAX + 1]; in ath6kl_tm_cmd() local 77 err = nla_parse(tb, ATH6KL_TM_ATTR_MAX, data, len, in ath6kl_tm_cmd() 82 if (!tb[ATH6KL_TM_ATTR_CMD]) in ath6kl_tm_cmd() 85 switch (nla_get_u32(tb[ATH6KL_TM_ATTR_CMD])) { in ath6kl_tm_cmd() 87 if (!tb[ATH6KL_TM_ATTR_DATA]) in ath6kl_tm_cmd() 90 buf = nla_data(tb[ATH6KL_TM_ATTR_DATA]); in ath6kl_tm_cmd() 91 buf_len = nla_len(tb[ATH6KL_TM_ATTR_DATA]); in ath6kl_tm_cmd()
|
/drivers/staging/lustre/lnet/lnet/ |
D | config.c | 950 struct lnet_text_buf *tb; in lnet_splitnets() local 960 tb = list_entry(nets->next, struct lnet_text_buf, ltb_list); in lnet_splitnets() 963 sep = strchr(tb->ltb_text, ','); in lnet_splitnets() 964 bracket = strchr(tb->ltb_text, '('); in lnet_splitnets() 969 offset2 = offset + (int)(bracket - tb->ltb_text); in lnet_splitnets() 986 net = lnet_netspec2net(tb->ltb_text); in lnet_splitnets() 989 strlen(tb->ltb_text)); in lnet_splitnets() 996 if (tb2 == tb) in lnet_splitnets() 1002 strlen(tb->ltb_text)); in lnet_splitnets() 1010 offset += (int)(sep - tb->ltb_text); in lnet_splitnets() [all …]
|
/drivers/net/fddi/skfp/ |
D | fplustm.c | 1065 struct s_fpmc *tb ; in mac_get_mc_table() local 1080 for (i = 0, tb = smc->hw.fp.mc.table ; i < FPMAX_MULTICAST ; i++, tb++){ in mac_get_mc_table() 1081 if (!tb->n) { /* not used */ in mac_get_mc_table() 1083 slot = tb ; in mac_get_mc_table() 1086 if (!ether_addr_equal((char *)&tb->a, (char *)own)) in mac_get_mc_table() 1088 return tb; in mac_get_mc_table() 1106 struct s_fpmc *tb ; in mac_clear_multicast() local 1111 for (i = 0, tb = smc->hw.fp.mc.table ; i < FPMAX_MULTICAST ; i++, tb++){ in mac_clear_multicast() 1112 if (!tb->perm) { in mac_clear_multicast() 1113 tb->n = 0 ; in mac_clear_multicast() [all …]
|
/drivers/net/ |
D | veth.c | 350 static int veth_validate(struct nlattr *tb[], struct nlattr *data[]) in veth_validate() argument 352 if (tb[IFLA_ADDRESS]) { in veth_validate() 353 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) in veth_validate() 355 if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS]))) in veth_validate() 358 if (tb[IFLA_MTU]) { in veth_validate() 359 if (!is_valid_veth_mtu(nla_get_u32(tb[IFLA_MTU]))) in veth_validate() 368 struct nlattr *tb[], struct nlattr *data[]) in veth_newlink() argument 400 tbp = tb; in veth_newlink() 450 if (tb[IFLA_ADDRESS] == NULL) in veth_newlink() 453 if (tb[IFLA_IFNAME]) in veth_newlink() [all …]
|
D | dummy.c | 159 static int dummy_validate(struct nlattr *tb[], struct nlattr *data[]) in dummy_validate() argument 161 if (tb[IFLA_ADDRESS]) { in dummy_validate() 162 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) in dummy_validate() 164 if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS]))) in dummy_validate()
|
/drivers/infiniband/ulp/ipoib/ |
D | ipoib_netlink.c | 68 struct nlattr *tb[], struct nlattr *data[]) in ipoib_changelink() argument 96 struct nlattr *tb[], struct nlattr *data[]) in ipoib_new_child_link() argument 103 if (!tb[IFLA_LINK]) in ipoib_new_child_link() 106 pdev = __dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK])); in ipoib_new_child_link() 135 err = ipoib_changelink(dev, tb, data); in ipoib_new_child_link()
|
/drivers/net/ethernet/rocker/ |
D | rocker_tlv.h | 113 void rocker_tlv_parse(const struct rocker_tlv **tb, int maxtype, 116 static inline void rocker_tlv_parse_nested(const struct rocker_tlv **tb, in rocker_tlv_parse_nested() argument 120 rocker_tlv_parse(tb, maxtype, rocker_tlv_data(tlv), in rocker_tlv_parse_nested() 125 rocker_tlv_parse_desc(const struct rocker_tlv **tb, int maxtype, in rocker_tlv_parse_desc() argument 128 rocker_tlv_parse(tb, maxtype, desc_info->data, in rocker_tlv_parse_desc()
|
D | rocker_tlv.c | 19 void rocker_tlv_parse(const struct rocker_tlv **tb, int maxtype, in rocker_tlv_parse() argument 26 memset(tb, 0, sizeof(struct rocker_tlv *) * (maxtype + 1)); in rocker_tlv_parse() 32 tb[type] = tlv; in rocker_tlv_parse()
|
/drivers/block/drbd/ |
D | drbd_nla.c | 30 int drbd_nla_parse_nested(struct nlattr *tb[], int maxtype, struct nlattr *nla, in drbd_nla_parse_nested() argument 37 err = nla_parse_nested(tb, maxtype, nla, policy); in drbd_nla_parse_nested()
|
/drivers/net/bonding/ |
D | bond_netlink.c | 121 static int bond_validate(struct nlattr *tb[], struct nlattr *data[]) in bond_validate() argument 123 if (tb[IFLA_ADDRESS]) { in bond_validate() 124 if (nla_len(tb[IFLA_ADDRESS]) != ETH_ALEN) in bond_validate() 126 if (!is_valid_ether_addr(nla_data(tb[IFLA_ADDRESS]))) in bond_validate() 134 struct nlattr *tb[], struct nlattr *data[]) in bond_slave_changelink() argument 160 struct nlattr *tb[], struct nlattr *data[]) in bond_changelink() argument 441 struct nlattr *tb[], struct nlattr *data[]) in bond_newlink() argument 445 err = bond_changelink(bond_dev, tb, data); in bond_newlink()
|