/linux/drivers/net/bonding/ |
H A D | bond_main.c | 1 // SPDX-License-Identifier: GPL-1.0+ 21 * the first slave bonded to the channel. All slaves will then use 28 * will attach eth0 to bond0 as a slave. eth0 hw mac address will either 30 * b: if a hw mac address already is there, eth0's hw mac address 89 #if IS_ENABLED(CONFIG_TLS_DEVICE) 97 /*---------------------------- Module parameters ----------------------------*/ 147 MODULE_PARM_DESC(mode, "Mode of operation; 0 for balance-rr, " 148 "1 for active-backup, 2 for balance-xor, " 149 "3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, " 150 "6 for balance-alb"); [all …]
|
H A D | bond_alb.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. 37 u8 padding[ETH_ZLEN - ETH_HLEN]; 54 static void alb_send_learning_packets(struct slave *slave, const u8 mac_addr[], 76 if (save_load) { in tlb_init_table_entry() 77 entry->load_history = 1 + entry->tx_bytes / in tlb_init_table_entry() 79 entry->tx_bytes = 0; in tlb_init_table_entry() 82 entry->tx_slave = NULL; in tlb_init_table_entry() 83 entry->next = TLB_NULL_INDEX; in tlb_init_table_entry() 84 entry->prev = TLB_NULL_INDEX; in tlb_init_table_entry() [all …]
|
H A D | bond_3ad.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. 52 * -------------------------------------------------------------- 54 * -------------------------------------------------------------- 122 * __get_bond_by_port - get the port's bonding struct 125 * Return @port's bonding struct, or %NULL if it can't be found. 129 if (port->slave == NULL) in __get_bond_by_port() 132 return bond_get_bond_by_slave(port->slave); in __get_bond_by_port() 136 * __get_first_agg - get the first aggregator in the bond 139 * Return the aggregator of the first slave in @bond, or %NULL if it can't be [all …]
|
H A D | bond_sysfs_slave.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 15 ssize_t (*show)(struct slave *, char *); 21 static ssize_t state_show(struct slave *slave, char *buf) in state_show() argument 23 switch (bond_slave_state(slave)) { in state_show() 34 static ssize_t mii_status_show(struct slave *slave, char *buf) in mii_status_show() argument 36 return sysfs_emit(buf, "%s\n", bond_slave_link_status(slave->link)); in mii_status_show() 40 static ssize_t link_failure_count_show(struct slave *slave, char *buf) in link_failure_count_show() argument 42 return sysfs_emit(buf, "%d\n", slave->link_failure_count); in link_failure_count_show() 46 static ssize_t perm_hwaddr_show(struct slave *slave, char *buf) in perm_hwaddr_show() argument 49 slave->dev->addr_len, in perm_hwaddr_show() [all …]
|
H A D | bond_options.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * drivers/net/bond/bond_options.c - bonding options 9 #include <linux/if.h> 92 { "balance-rr", BOND_MODE_ROUNDROBIN, BOND_VALFLAG_DEFAULT}, 93 { "active-backup", BOND_MODE_ACTIVEBACKUP, 0}, 94 { "balance-xor", BOND_MODE_XOR, 0}, 97 { "balance-tlb", BOND_MODE_TLB, 0}, 98 { "balance-alb", BOND_MODE_ALB, 0}, 99 { NULL, -1, 0}, 105 { NULL, -1, 0}, [all …]
|
H A D | bond_procfs.c | 1 // SPDX-License-Identifier: GPL-2.0 14 struct bonding *bond = pde_data(file_inode(seq->file)); in bond_info_seq_start() 16 struct slave *slave; in bond_info_seq_start() local 21 if (*pos == 0) in bond_info_seq_start() 24 bond_for_each_slave_rcu(bond, slave, iter) in bond_info_seq_start() 25 if (++off == *pos) in bond_info_seq_start() 26 return slave; in bond_info_seq_start() 33 struct bonding *bond = pde_data(file_inode(seq->file)); in bond_info_seq_next() 35 struct slave *slave; in bond_info_seq_next() local 39 if (v == SEQ_START_TOKEN) in bond_info_seq_next() [all …]
|
/linux/include/net/ |
H A D | bonding.h | 1 /* SPDX-License-Identifier: GPL-1.0+ */ 5 * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes 43 netdev_info(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 45 netdev_warn(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 47 netdev_dbg(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 49 netdev_err(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__) 51 #define BOND_MODE(bond) ((bond)->params.mode) 53 /* slave list primitives */ 54 #define bond_slave_list(bond) (&(bond)->dev->adj_list.lower) 61 netdev_adjacent_get_private(bond_slave_list(bond)->next) : \ [all …]
|
/linux/drivers/fsi/ |
H A D | fsi-core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * - Rework topology 9 * - s/chip_id/chip_loc 10 * - s/cfam/chip (cfam_id -> chip_id etc...) 27 #include "fsi-master.h" 28 #include "fsi-slave.h" 51 * FSI slave engine control register offsets 55 #define FSI_SSTAT 0x14 /* R : Slave status */ 106 * FSI endpoint-device support 123 if (addr > dev->size || size > dev->size || addr > dev->size - size) in fsi_device_read() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx4/ |
H A D | resource_tracker.c | 17 * - Redistributions of source code must retain the above 21 * - Redistributions in binary form must reproduce the above 228 /* > 0 --> apply mirror when getting into HA mode */ 229 /* = 0 --> un-apply mirror when getting out of HA mode */ 237 struct rb_node *node = root->rb_node; in res_tracker_lookup() 243 if (res_id < res->res_id) in res_tracker_lookup() 244 node = node->rb_left; in res_tracker_lookup() 245 else if (res_id > res->res_id) in res_tracker_lookup() 246 node = node->rb_right; in res_tracker_lookup() 255 struct rb_node **new = &(root->rb_node), *parent = NULL; in res_tracker_insert() [all …]
|
H A D | cmd.c | 16 * - Redistributions of source code must retain the above 20 * - Redistributions in binary form must reproduce the above 136 static int mlx4_master_process_vhcr(struct mlx4_dev *dev, int slave, 142 [CMD_STAT_INTERNAL_ERR] = -EIO, in mlx4_status_to_errno() 143 [CMD_STAT_BAD_OP] = -EPERM, in mlx4_status_to_errno() 144 [CMD_STAT_BAD_PARAM] = -EINVAL, in mlx4_status_to_errno() 145 [CMD_STAT_BAD_SYS_STATE] = -ENXIO, in mlx4_status_to_errno() 146 [CMD_STAT_BAD_RESOURCE] = -EBADF, in mlx4_status_to_errno() 147 [CMD_STAT_RESOURCE_BUSY] = -EBUSY, in mlx4_status_to_errno() 148 [CMD_STAT_EXCEED_LIM] = -ENOMEM, in mlx4_status_to_errno() [all …]
|
H A D | eq.c | 15 * - Redistributions of source code must retain the above 19 * - Redistributions in binary form must reproduce the above 38 #include <linux/dma-mapping.h> 89 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV) in get_async_ev_mask() 91 if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT) in get_async_ev_mask() 99 __raw_writel((__force u32) cpu_to_be32((eq->cons_index & 0xffffff) | in eq_set_ci() 101 eq->doorbell); in eq_set_ci() 109 /* (entry & (eq->nent - 1)) gives us a cyclic array */ in get_eqe() 110 unsigned long offset = (entry & (eq->nent - 1)) * eqe_size; in get_eqe() 118 …return eq->page_list[offset / PAGE_SIZE].buf + (offset + (eqe_factor ? MLX4_EQ_ENTRY_SIZE : 0)) % … in get_eqe() [all …]
|
/linux/drivers/soundwire/ |
H A D | bus_type.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright(c) 2015-17 Intel Corporation. 14 * sdw_get_device_id - find the matching SoundWire device id 15 * @slave: SoundWire Slave Device 16 * @drv: SoundWire Slave Driver 22 sdw_get_device_id(struct sdw_slave *slave, const struct sdw_driver *drv) in sdw_get_device_id() argument 26 for (id = drv->id_tabl in sdw_get_device_id() 40 struct sdw_slave *slave; sdw_bus_match() local 53 sdw_slave_modalias(const struct sdw_slave * slave,char * buf,size_t size) sdw_slave_modalias() argument 64 const struct sdw_slave *slave = dev_to_sdw_dev(dev); sdw_slave_uevent() local 83 struct sdw_slave *slave = dev_to_sdw_dev(dev); sdw_drv_probe() local 162 struct sdw_slave *slave = dev_to_sdw_dev(dev); sdw_drv_remove() local 185 struct sdw_slave *slave = dev_to_sdw_dev(dev); sdw_drv_shutdown() local [all...] |
H A D | debugfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright(c) 2017-2019 Intel Corporation. 21 if (!sdw_debugfs_root) in sdw_bus_debugfs_init() 24 /* create the debugfs master-N */ in sdw_bus_debugfs_init() 25 snprintf(name, sizeof(name), "master-%d-%d", bus->controller_id, bus->link_id); in sdw_bus_debugfs_init() 26 bus->debugfs = debugfs_create_dir(name, sdw_debugfs_root); in sdw_bus_debugfs_init() 31 debugfs_remove_recursive(bus->debugfs); in sdw_bus_debugfs_exit() 36 static ssize_t sdw_sprintf(struct sdw_slave *slave, in sdw_sprintf() argument 41 value = sdw_read_no_pm(slave, reg); in sdw_sprintf() 43 if (value < 0) in sdw_sprintf() [all …]
|
H A D | slave.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-17 Intel Corporation. 14 struct sdw_slave *slave = dev_to_sdw_dev(dev); in sdw_slave_release() local 16 mutex_destroy(&slave->sdw_dev_lock); in sdw_slave_release() 17 kfree(slave); in sdw_slave_release() 29 struct sdw_slave *slave; in sdw_slave_add() local 33 slave = kzalloc(sizeof(*slave), GFP_KERNEL); in sdw_slave_add() 34 if (!slave) in sdw_slave_add() 35 return -ENOMEM; in sdw_slave_add() 38 memcpy(&slave->id, id, sizeof(*id)); in sdw_slave_add() [all …]
|
H A D | stream.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2 // Copyright(c) 2015-18 Intel Corporation. 5 * stream.c - SoundWire Bus stream operations. 39 if (sdw_cols[i] == col) in sdw_find_col_index() 53 if (sdw_rows[i] == row) in sdw_find_row_index() 63 struct sdw_slave *slave, in _sdw_program_slave_port_params() argument 406 struct sdw_slave *slave = s_rt->slave; sdw_do_port_prep() local 587 struct sdw_slave *slave; sdw_notify_config() local 925 sdw_slave_port_free(struct sdw_slave * slave,struct sdw_stream_runtime * stream) sdw_slave_port_free() argument 945 sdw_slave_port_alloc(struct sdw_slave * slave,struct sdw_slave_runtime * s_rt,unsigned int num_config) sdw_slave_port_alloc() argument 972 sdw_slave_port_config(struct sdw_slave * slave,struct sdw_slave_runtime * s_rt,const struct sdw_port_config * port_config) sdw_slave_port_config() argument 1056 sdw_slave_rt_alloc(struct sdw_slave * slave,struct sdw_master_runtime * m_rt) sdw_slave_rt_alloc() argument 1090 sdw_slave_rt_find(struct sdw_slave * slave,struct sdw_stream_runtime * stream) sdw_slave_rt_find() argument 1115 sdw_slave_rt_free(struct sdw_slave * slave,struct sdw_stream_runtime * stream) sdw_slave_rt_free() argument 1289 sdw_get_slave_dpn_prop(struct sdw_slave * slave,enum sdw_data_direction direction,unsigned int port_num) sdw_get_slave_dpn_prop() argument 1988 sdw_stream_add_slave(struct sdw_slave * slave,struct sdw_stream_config * stream_config,const struct sdw_port_config * port_config,unsigned int num_ports,struct sdw_stream_runtime * stream) sdw_stream_add_slave() argument 2092 sdw_stream_remove_slave(struct sdw_slave * slave,struct sdw_stream_runtime * stream) sdw_stream_remove_slave() argument [all...] |
/linux/drivers/net/ethernet/ti/ |
H A D | netcp_ethss.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * Sandeep Paulraj <s-paulraj@ti.com> 10 * Wingman Kwok <w-kwok2@ti.com> 37 #define GBE_MODULE_NAME "netcp-gbe" 56 #define GBENU_MODULE_NAME "netcp-gbenu" 61 ((GBE_IDENT((d)->ss_version) == GBE_SS_ID_NU) || \ 62 (GBE_IDENT((d)->ss_version) == GBE_SS_ID_2U)) 65 (GBE_IDENT((d)->ss_version) == GBE_SS_ID_NU) 68 (GBE_IDENT((d)->ss_version) == GBE_SS_VERSION_14) 70 (GBE_IDENT((d)->ss_version) == GBE_SS_ID_2U) [all …]
|
/linux/sound/soc/codecs/ |
H A D | rt711-sdca-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt711-sdw-sdca.c -- rt711 SDCA ALSA SoC audio driver 16 #include "rt711-sdca.h" 17 #include "rt711-sdca-sdw.h" 128 .name = "sdw-mbq", 141 static int rt711_sdca_update_status(struct sdw_slave *slave, in rt711_sdca_update_status() argument 144 struct rt711_sdca_priv *rt711 = dev_get_drvdata(&slave->dev); in rt711_sdca_update_status() 146 if (status == SDW_SLAVE_UNATTACHED) in rt711_sdca_update_status() 147 rt711->hw_init = false; in rt711_sdca_update_status() 149 if (status == SDW_SLAVE_ATTACHED) { in rt711_sdca_update_status() [all …]
|
H A D | rt712-sdca-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt712-sdca-sdw.c -- rt712 SDCA ALSA SoC audio driver 15 #include "rt712-sdca.h" 16 #include "rt712-sdca-sdw.h" 143 .name = "sdw-mbq", 156 static int rt712_sdca_update_status(struct sdw_slave *slave, in rt712_sdca_update_status() argument 159 struct rt712_sdca_priv *rt712 = dev_get_drvdata(&slave->dev); in rt712_sdca_update_status() 161 if (status == SDW_SLAVE_UNATTACHED) in rt712_sdca_update_status() 162 rt712->hw_init = false; in rt712_sdca_update_status() 164 if (status == SDW_SLAVE_ATTACHED) { in rt712_sdca_update_status() [all …]
|
H A D | rt5682-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt5682-sdw.c -- RT5682 ALSA SoC audio component driver 27 #include <sound/soc-dapm.h> 45 regmap_write(rt5682->sdw_regmap, RT5682_SDW_CMD, 0); in rt5682_sdw_read() 46 regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_H, (reg >> 8) & 0xff); in rt5682_sdw_read() 47 regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_L, (reg & 0xff)); in rt5682_sdw_read() 48 regmap_read(rt5682->sdw_regmap, RT5682_SDW_DATA_H, &data_h); in rt5682_sdw_read() 49 regmap_read(rt5682->sdw_regmap, RT5682_SDW_DATA_L, &data_l); in rt5682_sdw_read() 63 regmap_write(rt5682->sdw_regmap, RT5682_SDW_CMD, 1); in rt5682_sdw_write() 64 regmap_write(rt5682->sdw_regmap, RT5682_SDW_ADDR_H, (reg >> 8) & 0xff); in rt5682_sdw_write() [all …]
|
H A D | rt711-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // rt711-sdw.c -- rt711 ALSA SoC audio driver 20 #include "rt711-sdw.h" 73 case 0x2012 ... 0x2015: /* HD-A read */ in rt711_volatile_register() 76 case 0x2220 ... 0x2223: /* decoded HD-A */ in rt711_volatile_register() 100 if (reg > 0xffff) in rt711_sdw_read() 105 if (is_index_reg) { /* index registers */ in rt711_sdw_read() 109 ret = regmap_write(rt711->sdw_regmap, reg, 0); in rt711_sdw_read() 110 if (ret < 0) in rt711_sdw_read() 114 ret = regmap_write(rt711->sdw_regmap, reg2, val2); in rt711_sdw_read() [all …]
|
H A D | rt700-sdw.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // rt700-sdw.c -- rt700 ALSA SoC audio driver 20 #include "rt700-sdw.h" 68 case 0x2012 ... 0x2015: /* HD-A read */ in rt700_volatile_register() 71 case 0x2220 ... 0x2223: /* decoded HD-A */ in rt700_volatile_register() 94 if (reg > 0xffff) in rt700_sdw_read() 99 if (is_index_reg) { /* index registers */ in rt700_sdw_read() 103 ret = regmap_write(rt700->sdw_regmap, reg, 0); in rt700_sdw_read() 104 if (ret < 0) in rt700_sdw_read() 108 ret = regmap_write(rt700->sdw_regmap, reg2, val2); in rt700_sdw_read() [all …]
|
/linux/drivers/net/ |
H A D | eql.c | 2 * Equalizer Load-balancer for serial network interfaces. 4 * (c) Copyright 1995 Simon "Guru Aleph-Null" Janes 17 * Phone: 1-703-847-0040 ext 103 33 * Added one-line eql_remove_slave patch. 47 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 52 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 56 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 60 * slave_load = (ULONG_MAX - (ULONG_MAX / 2)) - 74 * Broken set-bit locking snapshot 80 * Log trimmed of non-pertinent 1.x branch messages [all …]
|
/linux/drivers/i2c/busses/ |
H A D | i2c-designware-slave.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Synopsys DesignWare I2C adapter driver (slave only). 22 #include "i2c-designware-core.h" 27 regmap_write(dev->map, DW_IC_TX_TL, 0); in i2c_dw_configure_fifo_slave() 28 regmap_write(dev->map, DW_IC_RX_TL, 0); in i2c_dw_configure_fifo_slave() 30 /* Configure the I2C slave. */ in i2c_dw_configure_fifo_slave() 31 regmap_write(dev->map, DW_IC_CON, dev->slave_cfg); in i2c_dw_configure_fifo_slave() 32 regmap_write(dev->map, DW_IC_INTR_MASK, DW_IC_INTR_SLAVE_MASK); in i2c_dw_configure_fifo_slave() 36 * i2c_dw_init_slave() - Initialize the DesignWare i2c slave hardware 39 * This function configures and enables the I2C in slave mode. [all …]
|
/linux/drivers/infiniband/hw/mlx4/ |
H A D | cm.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 58 int slave; member 87 if (mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { in set_local_comm_id() 90 msg->request_id = cpu_to_be32(cm_id); in set_local_comm_id() 91 } else if (mad->mad_hdr.attr_id == CM_SIDR_REP_ATTR_ID) { in set_local_comm_id() 96 msg->local_comm_id = cpu_to_be32(cm_id); in set_local_comm_id() 102 if (mad->mad_hdr.attr_id == CM_SIDR_REQ_ATTR_ID) { in get_local_comm_id() 105 return be32_to_cpu(msg->request_id); in get_local_comm_id() 106 } else if (mad->mad_hdr.attr_id == CM_SIDR_REP_ATTR_ID) { in get_local_comm_id() [all …]
|
/linux/Documentation/i2c/ |
H A D | slave-interface.rst | 2 Linux I2C slave interface description 5 by Wolfram Sang <wsa@sang-engineering.com> in 2014-15 7 Linux can also be an I2C slave if the I2C controller in use has slave 8 functionality. For that to work, one needs slave support in the bus driver plus 10 example for the latter is the slave-eeprom driver, which acts as a dual memory 12 EEPROM, the Linux I2C slave can access the content via sysfs and handle data as 16 use a character device, be in-kernel only, or something completely different:: 19 e.g. sysfs I2C slave events I/O registers 20 +-----------+ v +---------+ v +--------+ v +------------+ 21 | Userspace +........+ Backend +-----------+ Driver +-----+ Controller | [all …]
|