Lines Matching +full:timeout +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0
24 mutex_lock(&card->sbp_lock); in qeth_bridge_port_role_state_show()
26 card->options.sbp.supported_funcs) in qeth_bridge_port_role_state_show()
28 &card->options.sbp.role, &state); in qeth_bridge_port_role_state_show()
39 rc = -EIO; in qeth_bridge_port_role_state_show()
42 switch (card->options.sbp.role) { in qeth_bridge_port_role_state_show()
50 rc = -EIO; in qeth_bridge_port_role_state_show()
54 card->options.sbp.role, state); in qeth_bridge_port_role_state_show()
58 mutex_unlock(&card->sbp_lock); in qeth_bridge_port_role_state_show()
88 return -EINVAL; in qeth_bridge_port_role_store()
90 mutex_lock(&card->conf_mutex); in qeth_bridge_port_role_store()
91 mutex_lock(&card->sbp_lock); in qeth_bridge_port_role_store()
94 rc = -EBUSY; in qeth_bridge_port_role_store()
95 else if (card->options.sbp.reflect_promisc) in qeth_bridge_port_role_store()
97 rc = -EPERM; in qeth_bridge_port_role_store()
101 card->options.sbp.role = role; in qeth_bridge_port_role_store()
103 card->options.sbp.role = role; in qeth_bridge_port_role_store()
105 mutex_unlock(&card->sbp_lock); in qeth_bridge_port_role_store()
106 mutex_unlock(&card->conf_mutex); in qeth_bridge_port_role_store()
137 enabled = card->options.sbp.hostnotification; in qeth_bridgeport_hostnotification_show()
146 bool enable; in qeth_bridgeport_hostnotification_store() local
149 rc = kstrtobool(buf, &enable); in qeth_bridgeport_hostnotification_store()
153 mutex_lock(&card->conf_mutex); in qeth_bridgeport_hostnotification_store()
154 mutex_lock(&card->sbp_lock); in qeth_bridgeport_hostnotification_store()
157 rc = -EBUSY; in qeth_bridgeport_hostnotification_store()
159 rc = qeth_bridgeport_an_set(card, enable); in qeth_bridgeport_hostnotification_store()
160 /* sbp_lock ensures ordering vs notifications-stopped events */ in qeth_bridgeport_hostnotification_store()
162 card->options.sbp.hostnotification = enable; in qeth_bridgeport_hostnotification_store()
164 card->options.sbp.hostnotification = enable; in qeth_bridgeport_hostnotification_store()
166 mutex_unlock(&card->sbp_lock); in qeth_bridgeport_hostnotification_store()
167 mutex_unlock(&card->conf_mutex); in qeth_bridgeport_hostnotification_store()
185 if (card->options.sbp.reflect_promisc) { in qeth_bridgeport_reflect_show()
186 if (card->options.sbp.reflect_promisc_primary) in qeth_bridgeport_reflect_show()
200 int enable, primary; in qeth_bridgeport_reflect_store() local
204 enable = 0; in qeth_bridgeport_reflect_store()
207 enable = 1; in qeth_bridgeport_reflect_store()
210 enable = 1; in qeth_bridgeport_reflect_store()
213 return -EINVAL; in qeth_bridgeport_reflect_store()
215 mutex_lock(&card->conf_mutex); in qeth_bridgeport_reflect_store()
216 mutex_lock(&card->sbp_lock); in qeth_bridgeport_reflect_store()
219 rc = -EBUSY; in qeth_bridgeport_reflect_store()
220 else if (card->options.sbp.role != QETH_SBP_ROLE_NONE) in qeth_bridgeport_reflect_store()
221 rc = -EPERM; in qeth_bridgeport_reflect_store()
223 card->options.sbp.reflect_promisc = enable; in qeth_bridgeport_reflect_store()
224 card->options.sbp.reflect_promisc_primary = primary; in qeth_bridgeport_reflect_store()
228 mutex_unlock(&card->sbp_lock); in qeth_bridgeport_reflect_store()
229 mutex_unlock(&card->conf_mutex); in qeth_bridgeport_reflect_store()
273 /* get current timeout setting */
278 u32 timeout; in qeth_vnicc_timeout_show() local
281 rc = qeth_l2_vnicc_get_timeout(card, &timeout); in qeth_vnicc_timeout_show()
282 if (rc == -EBUSY) in qeth_vnicc_timeout_show()
284 if (rc == -EOPNOTSUPP) in qeth_vnicc_timeout_show()
286 return rc ? rc : sysfs_emit(buf, "%d\n", timeout); in qeth_vnicc_timeout_show()
289 /* change timeout setting */
295 u32 timeout; in qeth_vnicc_timeout_store() local
298 rc = kstrtou32(buf, 10, &timeout); in qeth_vnicc_timeout_store()
302 mutex_lock(&card->conf_mutex); in qeth_vnicc_timeout_store()
303 rc = qeth_l2_vnicc_set_timeout(card, timeout); in qeth_vnicc_timeout_store()
304 mutex_unlock(&card->conf_mutex); in qeth_vnicc_timeout_store()
317 vnicc = qeth_l2_vnicc_sysfs_attr_to_char(attr->attr.name); in qeth_vnicc_char_show()
320 if (rc == -EBUSY) in qeth_vnicc_char_show()
322 if (rc == -EOPNOTSUPP) in qeth_vnicc_char_show()
338 return -EINVAL; in qeth_vnicc_char_store()
340 vnicc = qeth_l2_vnicc_sysfs_attr_to_char(attr->attr.name); in qeth_vnicc_char_store()
341 mutex_lock(&card->conf_mutex); in qeth_vnicc_char_store()
343 mutex_unlock(&card->conf_mutex); in qeth_vnicc_char_store()