Home
last modified time | relevance | path

Searched full:sw (Results 1 – 25 of 3036) sorted by relevance

12345678910>>...122

/kernel/linux/linux-6.6/drivers/thunderbolt/
Deeprom.c18 static int tb_eeprom_ctl_write(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_write() argument
20 return tb_sw_write(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + ROUTER_CS_4, 1); in tb_eeprom_ctl_write()
26 static int tb_eeprom_ctl_read(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_read() argument
28 return tb_sw_read(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + ROUTER_CS_4, 1); in tb_eeprom_ctl_read()
42 static int tb_eeprom_active(struct tb_switch *sw, bool enable) in tb_eeprom_active() argument
45 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_active()
50 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
54 return tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
57 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
61 return tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
[all …]
Dswitch.c37 static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw) in __nvm_get_auth_status() argument
42 if (uuid_equal(&st->uuid, sw->uuid)) in __nvm_get_auth_status()
49 static void nvm_get_auth_status(const struct tb_switch *sw, u32 *status) in nvm_get_auth_status() argument
54 st = __nvm_get_auth_status(sw); in nvm_get_auth_status()
60 static void nvm_set_auth_status(const struct tb_switch *sw, u32 status) in nvm_set_auth_status() argument
64 if (WARN_ON(!sw->uuid)) in nvm_set_auth_status()
68 st = __nvm_get_auth_status(sw); in nvm_set_auth_status()
75 memcpy(&st->uuid, sw->uuid, sizeof(st->uuid)); in nvm_set_auth_status()
85 static void nvm_clear_auth_status(const struct tb_switch *sw) in nvm_clear_auth_status() argument
90 st = __nvm_get_auth_status(sw); in nvm_clear_auth_status()
[all …]
Dtmu.c58 static bool tb_switch_tmu_enhanced_is_supported(const struct tb_switch *sw) in tb_switch_tmu_enhanced_is_supported() argument
60 return usb4_switch_version(sw) > 1; in tb_switch_tmu_enhanced_is_supported()
63 static int tb_switch_set_tmu_mode_params(struct tb_switch *sw, in tb_switch_set_tmu_mode_params() argument
72 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
73 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_set_tmu_mode_params()
80 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
81 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_set_tmu_mode_params()
85 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
86 sw->tmu.cap + TMU_RTR_CS_15, 1); in tb_switch_set_tmu_mode_params()
99 ret = tb_sw_write(sw, &val, TB_CFG_SWITCH, in tb_switch_set_tmu_mode_params()
[all …]
Dlc.c15 * @sw: Switch whose UUID is read
18 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid) in tb_lc_read_uuid() argument
20 if (!sw->cap_lc) in tb_lc_read_uuid()
22 return tb_sw_read(sw, uuid, TB_CFG_SWITCH, sw->cap_lc + TB_LC_FUSE, 4); in tb_lc_read_uuid()
25 static int read_lc_desc(struct tb_switch *sw, u32 *desc) in read_lc_desc() argument
27 if (!sw->cap_lc) in read_lc_desc()
29 return tb_sw_read(sw, desc, TB_CFG_SWITCH, sw->cap_lc + TB_LC_DESC, 1); in read_lc_desc()
34 struct tb_switch *sw = port->sw; in find_port_lc_cap() local
38 ret = read_lc_desc(sw, &desc); in find_port_lc_cap()
47 return sw->cap_lc + start + phys * size; in find_port_lc_cap()
[all …]
Dtb.h235 * @sw: Switch the port belongs to
268 struct tb_switch *sw; member
496 int (*runtime_suspend_switch)(struct tb_switch *sw);
497 int (*runtime_resume_switch)(struct tb_switch *sw);
502 int (*disapprove_switch)(struct tb *tb, struct tb_switch *sw);
503 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
504 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
505 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
514 int (*usb4_switch_op)(struct tb_switch *sw, u16 opcode, u32 *metadata,
517 int (*usb4_switch_nvm_authenticate_status)(struct tb_switch *sw,
[all …]
/kernel/linux/linux-5.10/drivers/thunderbolt/
Dswitch.c42 static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw) in __nvm_get_auth_status() argument
47 if (uuid_equal(&st->uuid, sw->uuid)) in __nvm_get_auth_status()
54 static void nvm_get_auth_status(const struct tb_switch *sw, u32 *status) in nvm_get_auth_status() argument
59 st = __nvm_get_auth_status(sw); in nvm_get_auth_status()
65 static void nvm_set_auth_status(const struct tb_switch *sw, u32 status) in nvm_set_auth_status() argument
69 if (WARN_ON(!sw->uuid)) in nvm_set_auth_status()
73 st = __nvm_get_auth_status(sw); in nvm_set_auth_status()
80 memcpy(&st->uuid, sw->uuid, sizeof(st->uuid)); in nvm_set_auth_status()
90 static void nvm_clear_auth_status(const struct tb_switch *sw) in nvm_clear_auth_status() argument
95 st = __nvm_get_auth_status(sw); in nvm_clear_auth_status()
[all …]
Deeprom.c18 static int tb_eeprom_ctl_write(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_write() argument
20 return tb_sw_write(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + 4, 1); in tb_eeprom_ctl_write()
26 static int tb_eeprom_ctl_read(struct tb_switch *sw, struct tb_eeprom_ctl *ctl) in tb_eeprom_ctl_read() argument
28 return tb_sw_read(sw, ctl, TB_CFG_SWITCH, sw->cap_plug_events + 4, 1); in tb_eeprom_ctl_read()
42 static int tb_eeprom_active(struct tb_switch *sw, bool enable) in tb_eeprom_active() argument
45 int res = tb_eeprom_ctl_read(sw, &ctl); in tb_eeprom_active()
50 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
54 return tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
57 res = tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
61 return tb_eeprom_ctl_write(sw, &ctl); in tb_eeprom_active()
[all …]
Dtmu.c14 static const char *tb_switch_tmu_mode_name(const struct tb_switch *sw) in tb_switch_tmu_mode_name() argument
16 bool root_switch = !tb_route(sw); in tb_switch_tmu_mode_name()
18 switch (sw->tmu.rate) { in tb_switch_tmu_mode_name()
26 if (sw->tmu.unidirectional) in tb_switch_tmu_mode_name()
40 static bool tb_switch_tmu_ucap_supported(struct tb_switch *sw) in tb_switch_tmu_ucap_supported() argument
45 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_tmu_ucap_supported()
46 sw->tmu.cap + TMU_RTR_CS_0, 1); in tb_switch_tmu_ucap_supported()
53 static int tb_switch_tmu_rate_read(struct tb_switch *sw) in tb_switch_tmu_rate_read() argument
58 ret = tb_sw_read(sw, &val, TB_CFG_SWITCH, in tb_switch_tmu_rate_read()
59 sw->tmu.cap + TMU_RTR_CS_3, 1); in tb_switch_tmu_rate_read()
[all …]
Dlc.c13 * @sw: Switch whose UUID is read
16 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid) in tb_lc_read_uuid() argument
18 if (!sw->cap_lc) in tb_lc_read_uuid()
20 return tb_sw_read(sw, uuid, TB_CFG_SWITCH, sw->cap_lc + TB_LC_FUSE, 4); in tb_lc_read_uuid()
23 static int read_lc_desc(struct tb_switch *sw, u32 *desc) in read_lc_desc() argument
25 if (!sw->cap_lc) in read_lc_desc()
27 return tb_sw_read(sw, desc, TB_CFG_SWITCH, sw->cap_lc + TB_LC_DESC, 1); in read_lc_desc()
32 struct tb_switch *sw = port->sw; in find_port_lc_cap() local
36 ret = read_lc_desc(sw, &desc); in find_port_lc_cap()
45 return sw->cap_lc + start + phys * size; in find_port_lc_cap()
[all …]
Dtb.h183 * @sw: Switch the port belongs to
202 struct tb_switch *sw; member
383 int (*runtime_suspend_switch)(struct tb_switch *sw);
384 int (*runtime_resume_switch)(struct tb_switch *sw);
389 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
390 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
391 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
417 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port() argument
419 return &sw->ports[sw->config.upstream_port_number]; in tb_upstream_port()
431 const struct tb_port *upstream_port = tb_upstream_port(port->sw); in tb_is_upstream_port()
[all …]
Dtb.c69 static void tb_add_dp_resources(struct tb_switch *sw) in tb_add_dp_resources() argument
71 struct tb_cm *tcm = tb_priv(sw->tb); in tb_add_dp_resources()
74 tb_switch_for_each_port(sw, port) { in tb_add_dp_resources()
78 if (!tb_switch_query_dp_resource(sw, port)) in tb_add_dp_resources()
86 static void tb_remove_dp_resources(struct tb_switch *sw) in tb_remove_dp_resources() argument
88 struct tb_cm *tcm = tb_priv(sw->tb); in tb_remove_dp_resources()
92 tb_switch_for_each_port(sw, port) { in tb_remove_dp_resources()
94 tb_remove_dp_resources(port->remote->sw); in tb_remove_dp_resources()
98 if (port->sw == sw) { in tb_remove_dp_resources()
105 static void tb_discover_tunnels(struct tb_switch *sw) in tb_discover_tunnels() argument
[all …]
/kernel/linux/linux-6.6/drivers/usb/roles/
Dclass.c41 * @sw: USB role switch
44 * Set USB role @role for @sw.
46 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
50 if (IS_ERR_OR_NULL(sw)) in usb_role_switch_set_role()
53 if (!sw->registered) in usb_role_switch_set_role()
56 mutex_lock(&sw->lock); in usb_role_switch_set_role()
58 ret = sw->set(sw, role); in usb_role_switch_set_role()
60 sw->role = role; in usb_role_switch_set_role()
61 kobject_uevent(&sw->dev.kobj, KOBJ_CHANGE); in usb_role_switch_set_role()
64 mutex_unlock(&sw->lock); in usb_role_switch_set_role()
[all …]
/kernel/linux/linux-5.10/drivers/usb/roles/
Dclass.c38 * @sw: USB role switch
41 * Set USB role @role for @sw.
43 int usb_role_switch_set_role(struct usb_role_switch *sw, enum usb_role role) in usb_role_switch_set_role() argument
47 if (IS_ERR_OR_NULL(sw)) in usb_role_switch_set_role()
50 mutex_lock(&sw->lock); in usb_role_switch_set_role()
52 ret = sw->set(sw, role); in usb_role_switch_set_role()
54 sw->role = role; in usb_role_switch_set_role()
55 kobject_uevent(&sw->dev.kobj, KOBJ_CHANGE); in usb_role_switch_set_role()
58 mutex_unlock(&sw->lock); in usb_role_switch_set_role()
66 * @sw: USB role switch
[all …]
/kernel/linux/linux-6.6/drivers/platform/surface/
Dsurface_aggregator_tabletsw.c29 int (*get_state)(struct ssam_tablet_sw *sw, struct ssam_tablet_sw_state *state);
30 const char *(*state_name)(struct ssam_tablet_sw *sw,
32 bool (*state_is_tablet_mode)(struct ssam_tablet_sw *sw,
55 int (*get_state)(struct ssam_tablet_sw *sw, struct ssam_tablet_sw_state *state);
56 const char *(*state_name)(struct ssam_tablet_sw *sw,
58 bool (*state_is_tablet_mode)(struct ssam_tablet_sw *sw,
72 struct ssam_tablet_sw *sw = dev_get_drvdata(dev); in state_show() local
73 const char *state = sw->ops.state_name(sw, &sw->state); in state_show()
90 struct ssam_tablet_sw *sw = container_of(work, struct ssam_tablet_sw, update_work); in ssam_tablet_sw_update_workfn() local
94 status = sw->ops.get_state(sw, &state); in ssam_tablet_sw_update_workfn()
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/marvell/prestera/
Dprestera_router_hw.c54 static int prestera_nexthop_group_set(struct prestera_switch *sw,
57 prestera_nexthop_group_util_hw_state(struct prestera_switch *sw,
67 int prestera_router_hw_init(struct prestera_switch *sw) in prestera_router_hw_init() argument
71 err = rhashtable_init(&sw->router->nh_neigh_ht, in prestera_router_hw_init()
76 err = rhashtable_init(&sw->router->nexthop_group_ht, in prestera_router_hw_init()
81 err = rhashtable_init(&sw->router->fib_ht, in prestera_router_hw_init()
86 INIT_LIST_HEAD(&sw->router->vr_list); in prestera_router_hw_init()
87 INIT_LIST_HEAD(&sw->router->rif_entry_list); in prestera_router_hw_init()
92 rhashtable_destroy(&sw->router->nexthop_group_ht); in prestera_router_hw_init()
94 rhashtable_destroy(&sw->router->nh_neigh_ht); in prestera_router_hw_init()
[all …]
Dprestera_main.c93 struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw, in prestera_port_find_by_hwid() argument
98 read_lock(&sw->port_list_lock); in prestera_port_find_by_hwid()
99 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_port_find_by_hwid()
105 read_unlock(&sw->port_list_lock); in prestera_port_find_by_hwid()
110 struct prestera_port *prestera_find_port(struct prestera_switch *sw, u32 id) in prestera_find_port() argument
114 read_lock(&sw->port_list_lock); in prestera_find_port()
115 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_find_port()
121 read_unlock(&sw->port_list_lock); in prestera_find_port()
131 return port ? port->sw : NULL; in prestera_switch_get()
371 struct prestera_switch *sw = port->sw; in prestera_port_sfp_bind() local
[all …]
Dprestera_router.c106 static int prestera_util_nhc2nc_key(struct prestera_switch *sw, in prestera_util_nhc2nc_key() argument
133 prestera_util_nhc_eq_n_cache_key(struct prestera_switch *sw, in prestera_util_nhc_eq_n_cache_key() argument
140 err = prestera_util_nhc2nc_key(sw, nhc, &tk); in prestera_util_nhc_eq_n_cache_key()
151 prestera_util_neigh2nc_key(struct prestera_switch *sw, struct neighbour *n, in prestera_util_neigh2nc_key() argument
430 prestera_neigh_iface_init(struct prestera_switch *sw, in prestera_neigh_iface_init() argument
452 prestera_kern_neigh_cache_find(struct prestera_switch *sw, in prestera_kern_neigh_cache_find() argument
458 rhashtable_lookup_fast(&sw->router->kern_neigh_cache_ht, key, in prestera_kern_neigh_cache_find()
464 __prestera_kern_neigh_cache_destruct(struct prestera_switch *sw, in __prestera_kern_neigh_cache_destruct() argument
471 __prestera_kern_neigh_cache_destroy(struct prestera_switch *sw, in __prestera_kern_neigh_cache_destroy() argument
474 rhashtable_remove_fast(&sw->router->kern_neigh_cache_ht, in __prestera_kern_neigh_cache_destroy()
[all …]
Dprestera_hw.h140 (struct prestera_switch *sw, struct prestera_event *evt, void *arg);
152 int prestera_hw_switch_init(struct prestera_switch *sw);
153 void prestera_hw_switch_fini(struct prestera_switch *sw);
154 int prestera_hw_switch_ageing_set(struct prestera_switch *sw, u32 ageing_ms);
155 int prestera_hw_switch_mac_set(struct prestera_switch *sw, const char *mac);
192 int prestera_hw_vlan_create(struct prestera_switch *sw, u16 vid);
193 int prestera_hw_vlan_delete(struct prestera_switch *sw, u16 vid);
205 int prestera_hw_fdb_flush_vlan(struct prestera_switch *sw, u16 vid, u32 mode);
210 int prestera_hw_bridge_create(struct prestera_switch *sw, u16 *bridge_id);
211 int prestera_hw_bridge_delete(struct prestera_switch *sw, u16 bridge_id);
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/prestera/
Dprestera_main.c50 struct prestera_port *prestera_port_find_by_hwid(struct prestera_switch *sw, in prestera_port_find_by_hwid() argument
55 read_lock(&sw->port_list_lock); in prestera_port_find_by_hwid()
56 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_port_find_by_hwid()
62 read_unlock(&sw->port_list_lock); in prestera_port_find_by_hwid()
67 struct prestera_port *prestera_find_port(struct prestera_switch *sw, u32 id) in prestera_find_port() argument
71 read_lock(&sw->port_list_lock); in prestera_find_port()
72 list_for_each_entry(tmp, &sw->port_list, list) { in prestera_find_port()
78 read_unlock(&sw->port_list_lock); in prestera_find_port()
125 if (memcmp(port->sw->base_mac, addr, ETH_ALEN - 1)) in prestera_is_valid_mac_addr()
267 write_lock(&port->sw->port_list_lock); in prestera_port_list_add()
[all …]
/kernel/linux/linux-5.10/arch/ia64/kernel/
Dentry.h25 #define SW(f) (IA64_SWITCH_STACK_##f##_OFFSET) macro
43 .savesp ar.unat,SW(CALLER_UNAT)+16+(off); \
44 .savesp ar.fpsr,SW(AR_FPSR)+16+(off); \
45 .spillsp f2,SW(F2)+16+(off); .spillsp f3,SW(F3)+16+(off); \
46 .spillsp f4,SW(F4)+16+(off); .spillsp f5,SW(F5)+16+(off); \
47 .spillsp f16,SW(F16)+16+(off); .spillsp f17,SW(F17)+16+(off); \
48 .spillsp f18,SW(F18)+16+(off); .spillsp f19,SW(F19)+16+(off); \
49 .spillsp f20,SW(F20)+16+(off); .spillsp f21,SW(F21)+16+(off); \
50 .spillsp f22,SW(F22)+16+(off); .spillsp f23,SW(F23)+16+(off); \
51 .spillsp f24,SW(F24)+16+(off); .spillsp f25,SW(F25)+16+(off); \
[all …]
/kernel/linux/linux-6.6/arch/ia64/kernel/
Dentry.h25 #define SW(f) (IA64_SWITCH_STACK_##f##_OFFSET) macro
43 .savesp ar.unat,SW(CALLER_UNAT)+16+(off); \
44 .savesp ar.fpsr,SW(AR_FPSR)+16+(off); \
45 .spillsp f2,SW(F2)+16+(off); .spillsp f3,SW(F3)+16+(off); \
46 .spillsp f4,SW(F4)+16+(off); .spillsp f5,SW(F5)+16+(off); \
47 .spillsp f16,SW(F16)+16+(off); .spillsp f17,SW(F17)+16+(off); \
48 .spillsp f18,SW(F18)+16+(off); .spillsp f19,SW(F19)+16+(off); \
49 .spillsp f20,SW(F20)+16+(off); .spillsp f21,SW(F21)+16+(off); \
50 .spillsp f22,SW(F22)+16+(off); .spillsp f23,SW(F23)+16+(off); \
51 .spillsp f24,SW(F24)+16+(off); .spillsp f25,SW(F25)+16+(off); \
[all …]
/kernel/linux/linux-6.6/arch/mips/alchemy/common/
Dsleeper.S25 sw $1, PT_R1(sp)
26 sw $2, PT_R2(sp)
27 sw $3, PT_R3(sp)
28 sw $4, PT_R4(sp)
29 sw $5, PT_R5(sp)
30 sw $6, PT_R6(sp)
31 sw $7, PT_R7(sp)
32 sw $16, PT_R16(sp)
33 sw $17, PT_R17(sp)
34 sw $18, PT_R18(sp)
[all …]
/kernel/linux/linux-5.10/arch/mips/alchemy/common/
Dsleeper.S25 sw $1, PT_R1(sp)
26 sw $2, PT_R2(sp)
27 sw $3, PT_R3(sp)
28 sw $4, PT_R4(sp)
29 sw $5, PT_R5(sp)
30 sw $6, PT_R6(sp)
31 sw $7, PT_R7(sp)
32 sw $16, PT_R16(sp)
33 sw $17, PT_R17(sp)
34 sw $18, PT_R18(sp)
[all …]
/kernel/linux/linux-5.10/drivers/input/misc/
Dad714x.c216 struct ad714x_button_drv *sw = &ad714x->sw->button[idx]; in ad714x_button_state_machine() local
218 switch (sw->state) { in ad714x_button_state_machine()
223 input_report_key(sw->input, hw->keycode, 1); in ad714x_button_state_machine()
224 input_sync(sw->input); in ad714x_button_state_machine()
225 sw->state = ACTIVE; in ad714x_button_state_machine()
233 input_report_key(sw->input, hw->keycode, 0); in ad714x_button_state_machine()
234 input_sync(sw->input); in ad714x_button_state_machine()
235 sw->state = IDLE; in ad714x_button_state_machine()
269 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_highest_stage() local
271 sw->highest_stage = ad714x_cal_highest_stage(ad714x, hw->start_stage, in ad714x_slider_cal_highest_stage()
[all …]
/kernel/linux/linux-6.6/drivers/input/misc/
Dad714x.c216 struct ad714x_button_drv *sw = &ad714x->sw->button[idx]; in ad714x_button_state_machine() local
218 switch (sw->state) { in ad714x_button_state_machine()
223 input_report_key(sw->input, hw->keycode, 1); in ad714x_button_state_machine()
224 input_sync(sw->input); in ad714x_button_state_machine()
225 sw->state = ACTIVE; in ad714x_button_state_machine()
233 input_report_key(sw->input, hw->keycode, 0); in ad714x_button_state_machine()
234 input_sync(sw->input); in ad714x_button_state_machine()
235 sw->state = IDLE; in ad714x_button_state_machine()
269 struct ad714x_slider_drv *sw = &ad714x->sw->slider[idx]; in ad714x_slider_cal_highest_stage() local
271 sw->highest_stage = ad714x_cal_highest_stage(ad714x, hw->start_stage, in ad714x_slider_cal_highest_stage()
[all …]

12345678910>>...122