type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
defines |
#define MLX4_FLAG_V_IGNORE_FCS_MASK 0x2 |
defines | #define MLX4_IGNORE_FCS_MASK 0x1 |
defines | #define MLNX4_TX_MAX_NUMBER 8 |
defines |
#define SET_PORT_ROCE_2_FLAGS 0x10 |
defines | #define MLX4_SET_PORT_ROCE_V1_V2 0x2 |
defines | #define MODULE_INFO_MAX_READ 48 |
defines |
#define I2C_ADDR_LOW 0x50 |
defines | #define I2C_ADDR_HIGH 0x51 |
defines | #define I2C_PAGE_SIZE 256 |
defines |
#define MAD_STATUS_2_CABLE_ERR(mad_status) ((mad_status >> 8) & 0xFF) |
structs | struct mlx4_set_port_vxlan_context {
u32 reserved1;
u8 modify_flags;
u8 reserved2;
u8 enable_flags;
u8 steering;
}; |
structs | struct mlx4_cable_info {
u8 i2c_addr;
u8 page_num;
__be16 dev_mem_address;
__be16 reserved1;
__be16 size;
__be32 reserved2[2];
u8 data[MODULE_INFO_MAX_READ];
}; |
functions | void mlx4_init_mac_table(struct mlx4_dev *dev, struct mlx4_mac_table *table)
{
int i;
mutex_init(&table->mutex);
for (i = 0; i < MLX4_MAX_MAC_NUM; i++) {
table->entries[i] = 0;
table->refs[i] = 0;
table->is_dup[i] = false;
} |
functions | void mlx4_init_vlan_table(struct mlx4_dev *dev, struct mlx4_vlan_table *table)
{
int i;
mutex_init(&table->mutex);
for (i = 0; i < MLX4_MAX_VLAN_NUM; i++) {
table->entries[i] = 0;
table->refs[i] = 0;
table->is_dup[i] = false;
} |
functions | void mlx4_init_roce_gid_table(struct mlx4_dev *dev,
struct mlx4_roce_gid_table *table)
{
int i;
mutex_init(&table->mutex);
for (i = 0; i < MLX4_ROCE_MAX_GIDS; i++)
memset(table->roce_gids[i].raw, 0, MLX4_ROCE_GID_ENTRY_SIZE);
} |
functions | int validate_index(struct mlx4_dev *dev,
struct mlx4_mac_table *table, int index)
{
int err = 0;
if (index < 0 || index >= table->max || !table->entries[index]) {
mlx4_warn(dev, "No valid Mac entry for the given index\n");
err = -EINVAL;
} |
functions | int find_index(struct mlx4_dev *dev,
struct mlx4_mac_table *table, u64 mac)
{
int i;
for (i = 0; i < MLX4_MAX_MAC_NUM; i++) {
if (table->refs[i] &&
(MLX4_MAC_MASK & mac) ==
(MLX4_MAC_MASK & be64_to_cpu(table->entries[i])))
return i;
} |
functions | int mlx4_set_port_mac_table(struct mlx4_dev *dev, u8 port,
__be64 *entries)
{
struct mlx4_cmd_mailbox *mailbox;
u32 in_mod;
int err;
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
memcpy(mailbox->buf, entries, MLX4_MAC_TABLE_SIZE);
in_mod = MLX4_SET_PORT_MAC_TABL... |
functions | int mlx4_find_cached_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *idx)
{
struct mlx4_port_info *info = &mlx4_priv(dev)->port[port];
struct mlx4_mac_table *table = &info->mac_table;
int i;
for (i = 0; i < MLX4_MAX_MAC_NUM; i++) {
if (!table->refs[i])
continue;
if (mac == (MLX4_MAC_MASK & be64_to_cpu(tab... |
functions | bool mlx4_need_mf_bond(struct mlx4_dev *dev)
{
int i, num_eth_ports = 0;
if (!mlx4_is_mfunc(dev))
return false;
mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH)
++num_eth_ports;
return (num_eth_ports == 2) ? true : false;
} |
functions | int __mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac)
{
struct mlx4_port_info *info = &mlx4_priv(dev)->port[port];
struct mlx4_mac_table *table = &info->mac_table;
int i, err = 0;
int free = -1;
int free_for_dup = -1;
bool dup = mlx4_is_mf_bonded(dev);
u8 dup_port = (port == 1) ? 2 : 1;
struct mlx4_ma... |
functions | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac)
{
u64 out_param = 0;
int err = -EINVAL;
if (mlx4_is_mfunc(dev)) {
if (!(dev->flags & MLX4_FLAG_OLD_REG_MAC)) {
err = mlx4_cmd_imm(dev, mac, &out_param,
((u32) port) << 8 | (u32) RES_MAC,
RES_OP_RESERVE_AND_MAP, MLX4_CMD_ALLOC_RES,
... |
functions | int mlx4_get_base_qpn(struct mlx4_dev *dev, u8 port)
{
return dev->caps.reserved_qps_base[MLX4_QP_REGION_ETH_ADDR] +
(port - 1) * (1 << dev->caps.log_num_macs);
} |
functions | void __mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac)
{
struct mlx4_port_info *info;
struct mlx4_mac_table *table;
int index;
bool dup = mlx4_is_mf_bonded(dev);
u8 dup_port = (port == 1) ? 2 : 1;
struct mlx4_mac_table *dup_table = &mlx4_priv(dev)->port[dup_port].mac_table;
if (port < 1 || port > de... |
functions | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, u64 mac)
{
u64 out_param = 0;
if (mlx4_is_mfunc(dev)) {
if (!(dev->flags & MLX4_FLAG_OLD_REG_MAC)) {
(void) mlx4_cmd_imm(dev, mac, &out_param,
((u32) port) << 8 | (u32) RES_MAC,
RES_OP_RESERVE_AND_MAP, MLX4_CMD_FREE_RES,
MLX4_CMD... |
functions | int __mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac)
{
struct mlx4_port_info *info = &mlx4_priv(dev)->port[port];
struct mlx4_mac_table *table = &info->mac_table;
int index = qpn - info->base_qpn;
int err = 0;
bool dup = mlx4_is_mf_bonded(dev);
u8 dup_port = (port == 1) ? 2 : 1;
struct mlx... |
functions | int mlx4_set_port_vlan_table(struct mlx4_dev *dev, u8 port,
__be32 *entries)
{
struct mlx4_cmd_mailbox *mailbox;
u32 in_mod;
int err;
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
memcpy(mailbox->buf, entries, MLX4_VLAN_TABLE_SIZE);
in_mod = MLX4_SET_PORT_VLAN_T... |
functions | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx)
{
struct mlx4_vlan_table *table = &mlx4_priv(dev)->port[port].vlan_table;
int i;
for (i = 0; i < MLX4_MAX_VLAN_NUM; ++i) {
if (table->refs[i] &&
(vid == (MLX4_VLAN_MASK &
be32_to_cpu(table->entries[i])))) {
/* VLAN alrea... |
functions | int __mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan,
int *index)
{
struct mlx4_vlan_table *table = &mlx4_priv(dev)->port[port].vlan_table;
int i, err = 0;
int free = -1;
int free_for_dup = -1;
bool dup = mlx4_is_mf_bonded(dev);
u8 dup_port = (port == 1) ? 2 : 1;
struct mlx4_vlan_table *dup_table... |
functions | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index)
{
u64 out_param = 0;
int err;
if (vlan > 4095)
return -EINVAL;
if (mlx4_is_mfunc(dev)) {
err = mlx4_cmd_imm(dev, vlan, &out_param,
((u32) port) << 8 | (u32) RES_VLAN,
RES_OP_RESERVE_AND_MAP, MLX4_CMD_ALLOC_RES,
ML... |
functions | void __mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, u16 vlan)
{
struct mlx4_vlan_table *table = &mlx4_priv(dev)->port[port].vlan_table;
int index;
bool dup = mlx4_is_mf_bonded(dev);
u8 dup_port = (port == 1) ? 2 : 1;
struct mlx4_vlan_table *dup_table = &mlx4_priv(dev)->port[dup_port].vlan_table;
if (dup) ... |
functions | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, u16 vlan)
{
u64 out_param = 0;
if (mlx4_is_mfunc(dev)) {
(void) mlx4_cmd_imm(dev, vlan, &out_param,
((u32) port) << 8 | (u32) RES_VLAN,
RES_OP_RESERVE_AND_MAP,
MLX4_CMD_FREE_RES, MLX4_CMD_TIME_CLASS_A,
MLX4_CMD_WRAPPED);
ret... |
functions | int mlx4_bond_mac_table(struct mlx4_dev *dev)
{
struct mlx4_mac_table *t1 = &mlx4_priv(dev)->port[1].mac_table;
struct mlx4_mac_table *t2 = &mlx4_priv(dev)->port[2].mac_table;
int ret = 0;
int i;
bool update1 = false;
bool update2 = false;
mutex_lock(&t1->mutex);
mutex_lock(&t2->mutex);
for (i = 0; i < MLX4_M... |
functions | else if (!t1->entries[i] && t2->entries[i]) {
t1->entries[i] = t2->entries[i];
t1->is_dup[i] = true;
update1 = true;
} |
functions | else if (t1->entries[i] && t2->entries[i]) {
t1->is_dup[i] = true;
t2->is_dup[i] = true;
} |
functions | int mlx4_unbond_mac_table(struct mlx4_dev *dev)
{
struct mlx4_mac_table *t1 = &mlx4_priv(dev)->port[1].mac_table;
struct mlx4_mac_table *t2 = &mlx4_priv(dev)->port[2].mac_table;
int ret = 0;
int ret1;
int i;
bool update1 = false;
bool update2 = false;
mutex_lock(&t1->mutex);
mutex_lock(&t2->mutex);
for (i = ... |
functions | int mlx4_bond_vlan_table(struct mlx4_dev *dev)
{
struct mlx4_vlan_table *t1 = &mlx4_priv(dev)->port[1].vlan_table;
struct mlx4_vlan_table *t2 = &mlx4_priv(dev)->port[2].vlan_table;
int ret = 0;
int i;
bool update1 = false;
bool update2 = false;
mutex_lock(&t1->mutex);
mutex_lock(&t2->mutex);
for (i = 0; i < M... |
functions | else if (!t1->entries[i] && t2->entries[i]) {
t1->entries[i] = t2->entries[i];
t1->is_dup[i] = true;
update1 = true;
} |
functions | else if (t1->entries[i] && t2->entries[i]) {
t1->is_dup[i] = true;
t2->is_dup[i] = true;
} |
functions | int mlx4_unbond_vlan_table(struct mlx4_dev *dev)
{
struct mlx4_vlan_table *t1 = &mlx4_priv(dev)->port[1].vlan_table;
struct mlx4_vlan_table *t2 = &mlx4_priv(dev)->port[2].vlan_table;
int ret = 0;
int ret1;
int i;
bool update1 = false;
bool update2 = false;
mutex_lock(&t1->mutex);
mutex_lock(&t2->mutex);
for ... |
functions | int mlx4_get_port_ib_caps(struct mlx4_dev *dev, u8 port, __be32 *caps)
{
struct mlx4_cmd_mailbox *inmailbox, *outmailbox;
u8 *inbuf, *outbuf;
int err;
inmailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(inmailbox))
return PTR_ERR(inmailbox);
outmailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(outmailbox)) {... |
functions | int mlx4_get_slave_num_gids(struct mlx4_dev *dev, int slave, int port)
{
int vfs;
int slave_gid = slave;
unsigned i;
struct mlx4_slaves_pport slaves_pport;
struct mlx4_active_ports actv_ports;
unsigned max_port_p_one;
if (slave == 0)
return MLX4_ROCE_PF_GIDS;
/* Slave is a VF */
slaves_pport = mlx4_phys_to... |
functions | int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port)
{
int gids;
unsigned i;
int slave_gid = slave;
int vfs;
struct mlx4_slaves_pport slaves_pport;
struct mlx4_active_ports actv_ports;
unsigned max_port_p_one;
if (slave == 0)
return 0;
slaves_pport = mlx4_phys_to_slaves_pport(dev, port);
a... |
functions | int mlx4_reset_roce_port_gids(struct mlx4_dev *dev, int slave,
int port, struct mlx4_cmd_mailbox *mailbox)
{
struct mlx4_roce_gid_entry *gid_entry_mbox;
struct mlx4_priv *priv = mlx4_priv(dev);
int num_gids, base, offset;
int i, err;
num_gids = mlx4_get_slave_num_gids(dev, slave, port);
base = mlx4_get_... |
functions | void mlx4_reset_roce_gids(struct mlx4_dev *dev, int slave)
{
struct mlx4_active_ports actv_ports;
struct mlx4_cmd_mailbox *mailbox;
int num_eth_ports, err;
int i;
if (slave < 0 || slave > dev->persist->num_vfs)
return;
actv_ports = mlx4_get_active_ports(dev, slave);
for (i = 0, num_eth_ports = 0; i < dev->c... |
functions | int mlx4_common_set_port(struct mlx4_dev *dev, int slave, u32 in_mod,
u8 op_mod, struct mlx4_cmd_mailbox *inbox)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_port_info *port_info;
struct mlx4_mfunc_master_ctx *master = &priv->mfunc.master;
struct mlx4_slave_state *slave_st = &master->slave_state[slave... |
functions | int mlx4_SET_PORT_wrapper(struct mlx4_dev *dev, int slave,
struct mlx4_vhcr *vhcr,
struct mlx4_cmd_mailbox *inbox,
struct mlx4_cmd_mailbox *outbox,
struct mlx4_cmd_info *cmd)
{
int port = mlx4_slave_convert_port(
dev, slave, vhcr->in_modifier & 0xFF);
if (port < 0)
return -EINVAL;
vhcr->in... |
functions | int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port, int pkey_tbl_sz)
{
struct mlx4_cmd_mailbox *mailbox;
int err, vl_cap, pkey_tbl_flag = 0;
if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
return 0;
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
((__be32 *) mailbox->... |
functions | int mlx4_SET_PORT_general(struct mlx4_dev *dev, u8 port, int mtu,
u8 pptx, u8 pfctx, u8 pprx, u8 pfcrx)
{
struct mlx4_cmd_mailbox *mailbox;
struct mlx4_set_port_general_context *context;
int err;
u32 in_mod;
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
context = ma... |
functions | int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
u8 promisc)
{
struct mlx4_cmd_mailbox *mailbox;
struct mlx4_set_port_rqp_calc_context *context;
int err;
u32 in_mod;
u32 m_promisc = (dev->caps.flags & MLX4_DEV_CAP_FLAG_VEP_MC_STEER) ?
MCAST_DIRECT : MCAST_DEFAULT;
if (dev->caps.ste... |
functions | int mlx4_SET_PORT_fcs_check(struct mlx4_dev *dev, u8 port, u8 ignore_fcs_value)
{
struct mlx4_cmd_mailbox *mailbox;
struct mlx4_set_port_general_context *context;
u32 in_mod;
int err;
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
context = mailbox->buf;
context->v_ignor... |
functions | int mlx4_SET_PORT_VXLAN(struct mlx4_dev *dev, u8 port, u8 steering, int enable)
{
int err;
u32 in_mod;
struct mlx4_cmd_mailbox *mailbox;
struct mlx4_set_port_vxlan_context *context;
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
context = mailbox->buf;
memset(context, 0... |
functions | int mlx4_SET_PORT_BEACON(struct mlx4_dev *dev, u8 port, u16 time)
{
int err;
struct mlx4_cmd_mailbox *mailbox;
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);
*((__be32 *)mailbox->buf) = cpu_to_be32(time);
err = mlx4_cmd(dev, mailbox->dma, port, MLX4_SET_PORT_BEACON_OPCOD... |
functions | int mlx4_SET_MCAST_FLTR_wrapper(struct mlx4_dev *dev, int slave,
struct mlx4_vhcr *vhcr,
struct mlx4_cmd_mailbox *inbox,
struct mlx4_cmd_mailbox *outbox,
struct mlx4_cmd_info *cmd)
{
int err = 0;
return err;
} |
functions | int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port,
u64 mac, u64 clear, u8 mode)
{
return mlx4_cmd(dev, (mac | (clear << 63)), port, mode,
MLX4_CMD_SET_MCAST_FLTR, MLX4_CMD_TIME_CLASS_B,
MLX4_CMD_WRAPPED);
} |
functions | int mlx4_SET_VLAN_FLTR_wrapper(struct mlx4_dev *dev, int slave,
struct mlx4_vhcr *vhcr,
struct mlx4_cmd_mailbox *inbox,
struct mlx4_cmd_mailbox *outbox,
struct mlx4_cmd_info *cmd)
{
int err = 0;
return err;
} |
functions | int mlx4_common_dump_eth_stats(struct mlx4_dev *dev, int slave,
u32 in_mod, struct mlx4_cmd_mailbox *outbox)
{
return mlx4_cmd_box(dev, 0, outbox->dma, in_mod, 0,
MLX4_CMD_DUMP_ETH_STATS, MLX4_CMD_TIME_CLASS_B,
MLX4_CMD_NATIVE);
} |
functions | int mlx4_DUMP_ETH_STATS_wrapper(struct mlx4_dev *dev, int slave,
struct mlx4_vhcr *vhcr,
struct mlx4_cmd_mailbox *inbox,
struct mlx4_cmd_mailbox *outbox,
struct mlx4_cmd_info *cmd)
{
if (slave != dev->caps.function)
return 0;
return mlx4_common_dump_eth_stats(dev, slave,
vhcr->in_modifier, ou... |
functions | int mlx4_get_slave_from_roce_gid(struct mlx4_dev *dev, int port, u8 *gid,
int *slave_id)
{
struct mlx4_priv *priv = mlx4_priv(dev);
int i, found_ix = -1;
int vf_gids = MLX4_ROCE_MAX_GIDS - MLX4_ROCE_PF_GIDS;
struct mlx4_slaves_pport slaves_pport;
unsigned num_vfs;
int slave_gid;
if (!mlx4_is_mfunc(dev))
... |
functions | int mlx4_get_roce_gid_from_slave(struct mlx4_dev *dev, int port, int slave_id,
u8 *gid)
{
struct mlx4_priv *priv = mlx4_priv(dev);
if (!mlx4_is_master(dev))
return -EINVAL;
memcpy(gid, priv->port[port].gid_table.roce_gids[slave_id].raw,
MLX4_ROCE_GID_ENTRY_SIZE);
return 0;
} |
functions | int mlx4_get_module_info(struct mlx4_dev *dev, u8 port,
u16 offset, u16 size, u8 *data)
{
struct mlx4_cmd_mailbox *inbox, *outbox;
struct mlx4_mad_ifc *inmad, *outmad;
struct mlx4_cable_info *cable_info;
u16 i2c_addr;
int ret;
if (size > MODULE_INFO_MAX_READ)
size = MODULE_INFO_MAX_READ;
inbox = mlx4_all... |
functions | int mlx4_max_tc(struct mlx4_dev *dev)
{
u8 num_tc = dev->caps.max_tc_eth;
if (!num_tc)
num_tc = MLNX4_TX_MAX_NUMBER;
return num_tc;
} |
functions | int au_alloc_dinfo(struct dentry *dentry)
{
struct au_dinfo *dinfo;
struct super_block *sb;
int nbr;
dinfo = au_cache_alloc_dinfo();
if (unlikely(!dinfo))
goto out;
sb = dentry->d_sb;
nbr = au_sbend(sb) + 1;
if (nbr <= 0)
nbr = 1;
dinfo->di_hdentry = kcalloc(nbr, sizeof(*dinfo->di_hdentry), GFP_NOFS);
i... |
functions | int au_di_realloc(struct au_dinfo *dinfo, int nbr)
{
int err, sz;
struct au_hdentry *hdp;
AuRwMustWriteLock(&dinfo->di_rwsem);
err = -ENOMEM;
sz = sizeof(*hdp) * (dinfo->di_bend + 1);
if (!sz)
sz = sizeof(*hdp);
hdp = au_kzrealloc(dinfo->di_hdentry, sz, sizeof(*hdp) * nbr, GFP_NOFS);
if (hdp) {
dinfo->di_... |
functions | void do_ii_write_lock(struct inode *inode, unsigned int lsc)
{
switch (lsc) {
case AuLsc_DI_CHILD:
ii_write_lock_child(inode);
break;
case AuLsc_DI_CHILD2:
ii_write_lock_child2(inode);
break;
case AuLsc_DI_CHILD3:
ii_write_lock_child3(inode);
break;
case AuLsc_DI_PARENT:
ii_write_lock_parent(inode);
... |
functions | void do_ii_read_lock(struct inode *inode, unsigned int lsc)
{
switch (lsc) {
case AuLsc_DI_CHILD:
ii_read_lock_child(inode);
break;
case AuLsc_DI_CHILD2:
ii_read_lock_child2(inode);
break;
case AuLsc_DI_CHILD3:
ii_read_lock_child3(inode);
break;
case AuLsc_DI_PARENT:
ii_read_lock_parent(inode);
bre... |
functions | void di_read_lock(struct dentry *d, int flags, unsigned int lsc)
{
au_rw_read_lock_nested(&au_di(d)->di_rwsem, lsc);
if (d->d_inode) {
if (au_ftest_lock(flags, IW))
do_ii_write_lock(d->d_inode, lsc);
else if (au_ftest_lock(flags, IR))
do_ii_read_lock(d->d_inode, lsc);
} |
functions | void di_read_unlock(struct dentry *d, int flags)
{
if (d->d_inode) {
if (au_ftest_lock(flags, IW))
ii_write_unlock(d->d_inode);
else if (au_ftest_lock(flags, IR))
ii_read_unlock(d->d_inode);
} |
functions | void di_downgrade_lock(struct dentry *d, int flags)
{
if (d->d_inode && au_ftest_lock(flags, IR))
ii_downgrade_lock(d->d_inode);
au_rw_dgrade_lock(&au_di(d)->di_rwsem);
} |
functions | void di_write_lock(struct dentry *d, unsigned int lsc)
{
au_rw_write_lock_nested(&au_di(d)->di_rwsem, lsc);
if (d->d_inode)
do_ii_write_lock(d->d_inode, lsc);
} |
functions | void di_write_unlock(struct dentry *d)
{
if (d->d_inode)
ii_write_unlock(d->d_inode);
au_rw_write_unlock(&au_di(d)->di_rwsem);
} |
functions | void di_write_lock2_child(struct dentry *d1, struct dentry *d2, int isdir)
{
AuDebugOn(d1 == d2
|| d1->d_inode == d2->d_inode
|| d1->d_sb != d2->d_sb);
if (isdir && au_test_subdir(d1, d2)) {
di_write_lock_child(d1);
di_write_lock_child2(d2);
} |
functions | void di_write_lock2_parent(struct dentry *d1, struct dentry *d2, int isdir)
{
AuDebugOn(d1 == d2
|| d1->d_inode == d2->d_inode
|| d1->d_sb != d2->d_sb);
if (isdir && au_test_subdir(d1, d2)) {
di_write_lock_parent(d1);
di_write_lock_parent2(d2);
} |
functions | void di_write_unlock2(struct dentry *d1, struct dentry *d2)
{
di_write_unlock(d1);
if (d1->d_inode == d2->d_inode)
au_rw_write_unlock(&au_di(d2)->di_rwsem);
else
di_write_unlock(d2);
} |
functions | aufs_bindex_t au_dbtail(struct dentry *dentry)
{
aufs_bindex_t bend, bwh;
bend = au_dbend(dentry);
if (0 <= bend) {
bwh = au_dbwh(dentry);
if (!bwh)
return bwh;
if (0 < bwh && bwh < bend)
return bwh - 1;
} |
functions | aufs_bindex_t au_dbtaildir(struct dentry *dentry)
{
aufs_bindex_t bend, bopq;
bend = au_dbtail(dentry);
if (0 <= bend) {
bopq = au_dbdiropq(dentry);
if (0 <= bopq && bopq < bend)
bend = bopq;
} |
functions | void au_set_h_dptr(struct dentry *dentry, aufs_bindex_t bindex,
struct dentry *h_dentry)
{
struct au_hdentry *hd = au_di(dentry)->di_hdentry + bindex;
DiMustWriteLock(dentry);
if (hd->hd_dentry)
au_hdput(hd);
hd->hd_dentry = h_dentry;
} |
functions | void au_update_digen(struct dentry *dentry)
{
atomic_set(&au_di(dentry)->di_generation, au_sigen(dentry->d_sb));
/* smp_mb(); */ /* atomic_set */
} |
functions | void au_update_dbrange(struct dentry *dentry, int do_put_zero)
{
struct au_dinfo *dinfo;
struct dentry *h_d;
DiMustWriteLock(dentry);
dinfo = au_di(dentry);
if (!dinfo || dinfo->di_bstart < 0)
return;
if (do_put_zero) {
aufs_bindex_t bindex, bend;
bend = dinfo->di_bend;
for (bindex = dinfo->di_bstart;... |
functions | void au_update_dbstart(struct dentry *dentry)
{
aufs_bindex_t bindex, bend;
struct dentry *h_dentry;
bend = au_dbend(dentry);
for (bindex = au_dbstart(dentry); bindex <= bend; bindex++) {
h_dentry = au_h_dptr(dentry, bindex);
if (!h_dentry)
continue;
if (h_dentry->d_inode) {
au_set_dbstart(dentry, bind... |
functions | void au_update_dbend(struct dentry *dentry)
{
aufs_bindex_t bindex, bstart;
struct dentry *h_dentry;
bstart = au_dbstart(dentry);
for (bindex = au_dbend(dentry); bindex <= bstart; bindex--) {
h_dentry = au_h_dptr(dentry, bindex);
if (!h_dentry)
continue;
if (h_dentry->d_inode) {
au_set_dbend(dentry, bi... |
functions | int au_find_dbindex(struct dentry *dentry, struct dentry *h_dentry)
{
aufs_bindex_t bindex, bend;
bend = au_dbend(dentry);
for (bindex = au_dbstart(dentry); bindex <= bend; bindex++)
if (au_h_dptr(dentry, bindex) == h_dentry)
return bindex;
return -1;
} |
includes | #include <linux/delay.h> |
includes | #include <mach/msm_fb.h> |
defines | #define HDMI_DBG(s...) printk("[hdmi/avc]" s) |
defines | #define HDMI_DBG(s...) do {} while (0) |
functions | int hdmi_active9022(struct i2c_client *client)
{
int i, ret = -EIO;
struct hdmi_info *info = i2c_get_clientdata(client);
u8 *video_parm = &video_param[info->res][0];
HDMI_DBG("%s+\n", __func__);
mutex_lock(&info->polling_lock);
mutex_lock(&info->lock);
//hdcp_off(info);
DisableTMDS(info);
msleep(128);... |
functions | int avc_set_video_parm(struct hdmi_info *hdmi)
{
int ret;
u8 *video_parm = video_param[hdmi->res];
ret = i2c_smbus_write_i2c_block_data(hdmi->client, 0, 8, video_parm);
return ret;
} |
functions | int avc_set_blank_screen(struct hdmi_info *hdmi)
{
HDMI_DBG("%s+\n", __func__);
hdmi_write_byte(hdmi->client, 0x09, 0x03);
hdmi_write_byte(hdmi->client, 0x19, 0x00);
hdmi_write_byte(hdmi->client, 0x26,
hdmi_read(hdmi->client, 0x26) | 0x10);
} |
functions | int hdmi_active9022_dup(struct i2c_client *client)
{
int i, ret = -EIO;
struct hdmi_info *info = i2c_get_clientdata(client);
u8 *video_parm = &video_param[info->res][0];
HDMI_DBG("%s+\n", __func__);
//hdcp_off(info);
DisableTMDS(info);
msleep(128);
/* choose video mode */
ret = i2c_smbus_write_i2c_block_dat... |
functions | bool avc_send_avi_info_frames(struct hdmi_info *hdmi)
{
int i;
HDMI_DBG("%s res=%d\n", __func__, hdmi->res);
for (i = 0; i < 14 ;i++)
hdmi_write_byte(hdmi->client, 0xc + i,
avi_info_frame[hdmi->res][i]);
return true;
} |
functions | bool InitVideo(struct hdmi_info *hdmi, u8 Mode, u8 TclkSel, bool Init)
{
int Pattern, ret;
u8 *video_parm = &video_param[hdmi->res][0];
/* Use TPI 0x08[7:6] for 9022A/24A video clock multiplier */
Pattern = (1 << 6) & 0xc0;
ReadSetWriteTPI(hdmi, TPI_PIX_REPETITION, Pattern);
ret = i2c_smbus_write_block_data(hdm... |
functions | 0
for (i = 0; i < 14 ;i++) {
hdmi_write_byte(hdmi->client, 0xc + i, avi_info_frame[info->res][i]);
} |
functions | bool avc_init_video(struct hdmi_info *hdmi, u8 mode, u8 TclkSel, bool Init)
{
int ret;
u8 *video_parm = &video_param[hdmi->res][0];
HDMI_DBG("%s\n", __func__);
/* Use TPI 0x08[7:6] for 9022A/24A video clock multiplier */
hdmi_write_byte(hdmi->client, HDMI_PIXEL_DATA, 0x60);
ret = i2c... |
functions | void avc_set_basic_audio(struct hdmi_info *hdmi)
{
int ret;
struct i2c_client *client = hdmi->client;
HDMI_DBG("%s\n", __func__);
ret = hdmi_write_byte(client, 0x26, 0x91);
ret = hdmi_write_byte(client, 0x25, 0x03);
ret = hdmi_write_byte(client, 0x27, 0x59);
ret = hdmi_write_byte(cli... |
functions | u8 avc_change_video_mode(struct hdmi_info *hdmi, int *resolution)
{
HDMI_DBG("%s\n", __func__);
hdcp_off(hdmi);
DisableTMDS(hdmi);
/* allow control InfoFrames to pass through to the sink device. */
mdelay(128);
// FIXME: video mode
avc_init_video(hdmi, vid_mode, 0, 0);
hdmi_write_byte(hdmi->client, TPI_PIX_R... |
includes |
#include <linux/config.h> |
includes | #include <linux/module.h> |
includes | #include <linux/profile.h> |
includes | #include <linux/bootmem.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.