type
stringclasses
5 values
content
stringlengths
9
163k
includes
#include <linux/vmalloc.h>
defines
#define RDS_IB_EVENT_STRING(foo) \
functions
void rds_ib_set_protocol(struct rds_connection *conn, unsigned int version) { conn->c_version = version; }
functions
void rds_ib_set_flow_control(struct rds_connection *conn, u32 credits) { struct rds_ib_connection *ic = conn->c_transport_data; if (rds_ib_sysctl_flow_control && credits != 0) { /* We're doing flow control */ ic->i_flowctl = 1; rds_ib_send_add_credits(conn, credits); }
functions
void rds_ib_tune_rnr(struct rds_ib_connection *ic, struct ib_qp_attr *attr) { int ret; attr->min_rnr_timer = IB_RNR_TIMER_000_32; ret = ib_modify_qp(ic->i_cm_id->qp, attr, IB_QP_MIN_RNR_TIMER); if (ret) printk(KERN_NOTICE "ib_modify_qp(IB_QP_MIN_RNR_TIMER): err=%d\n", -ret); }
functions
void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_event *event) { const struct rds_ib_connect_private *dp = NULL; struct rds_ib_connection *ic = conn->c_transport_data; struct ib_qp_attr qp_attr; int err; if (event->param.conn.private_data_len >= sizeof(*dp)) { dp = event->param.conn.p...
functions
void rds_ib_cm_fill_conn_param(struct rds_connection *conn, struct rdma_conn_param *conn_param, struct rds_ib_connect_private *dp, u32 protocol_version, u32 max_responder_resources, u32 max_initiator_depth) { struct rds_ib_connection *ic = conn->c_transport_data; struct rds_ib_device *rds_ibdev = ic->r...
functions
void rds_ib_cq_event_handler(struct ib_event *event, void *data) { rdsdebug("event %u (%s) data %p\n", event->event, rds_ib_event_str(event->event), data); }
functions
void rds_ib_qp_event_handler(struct ib_event *event, void *data) { struct rds_connection *conn = data; struct rds_ib_connection *ic = conn->c_transport_data; rdsdebug("conn %p ic %p event %u (%s)\n", conn, ic, event->event, rds_ib_event_str(event->event)); switch (event->event) { case IB_EVENT_COMM_EST: rdm...
functions
int rds_ib_setup_qp(struct rds_connection *conn) { struct rds_ib_connection *ic = conn->c_transport_data; struct ib_device *dev = ic->i_cm_id->device; struct ib_qp_init_attr attr; struct rds_ib_device *rds_ibdev; int ret; /* * It's normal to see a null device if an incoming connection races * with device rem...
functions
u32 rds_ib_protocol_compatible(struct rdma_cm_event *event) { const struct rds_ib_connect_private *dp = event->param.conn.private_data; u16 common; u32 version = 0; /* * rdma_cm private data is odd - when there is any private data in the * request, we will be given a pretty large buffer without telling us the ...
functions
int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id, struct rdma_cm_event *event) { __be64 lguid = cm_id->route.path_rec->sgid.global.interface_id; __be64 fguid = cm_id->route.path_rec->dgid.global.interface_id; const struct rds_ib_connect_private *dp = event->param.conn.private_data; struct rds_ib_connec...
functions
int rds_ib_cm_initiate_connect(struct rdma_cm_id *cm_id) { struct rds_connection *conn = cm_id->context; struct rds_ib_connection *ic = conn->c_transport_data; struct rdma_conn_param conn_param; struct rds_ib_connect_private dp; int ret; /* If the peer doesn't do protocol negotiation, we must * default to RDSv...
functions
int rds_ib_conn_connect(struct rds_connection *conn) { struct rds_ib_connection *ic = conn->c_transport_data; struct sockaddr_in src, dest; int ret; /* XXX I wonder what affect the port space has */ /* delegate cm event handler to rdma_transport */ ic->i_cm_id = rdma_create_id(rds_rdma_cm_event_handler, conn, ...
functions
void rds_ib_conn_shutdown(struct rds_connection *conn) { struct rds_ib_connection *ic = conn->c_transport_data; int err = 0; rdsdebug("cm %p pd %p cq %p %p qp %p\n", ic->i_cm_id, ic->i_pd, ic->i_send_cq, ic->i_recv_cq, ic->i_cm_id ? ic->i_cm_id->qp : NULL); if (ic->i_cm_id) { struct ib_device *dev = ic->i...
functions
int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp) { struct rds_ib_connection *ic; unsigned long flags; int ret; /* XXX too lazy? */ ic = kzalloc(sizeof(struct rds_ib_connection), GFP_KERNEL); if (!ic) return -ENOMEM; ret = rds_ib_recv_alloc_caches(ic); if (ret) { kfree(ic); return ret; }
functions
void rds_ib_conn_free(void *arg) { struct rds_ib_connection *ic = arg; spinlock_t *lock_ptr; rdsdebug("ic %p\n", ic); /* * Conn is either on a dev's list or on the nodev list. * A race with shutdown() or connect() would cause problems * (since rds_ibdev would change) but that should never happen. */ lock...
functions
void __rds_ib_conn_error(struct rds_connection *conn, const char *fmt, ...) { va_list ap; rds_conn_drop(conn); va_start(ap, fmt); vprintk(fmt, ap); va_end(ap); }
includes
#include <linux/module.h>
includes
#include <linux/kernel.h>
includes
#include <linux/netdevice.h>
includes
#include <linux/etherdevice.h>
includes
#include <linux/init.h>
includes
#include <linux/llc.h>
includes
#include <net/llc.h>
includes
#include <net/stp.h>
functions
__init br_init(void) { int err; err = stp_proto_register(&br_stp_proto); if (err < 0) { pr_err("bridge: can't register sap for STP\n"); return err; }
functions
__exit br_deinit(void) { stp_proto_unregister(&br_stp_proto); br_netlink_fini(); unregister_netdevice_notifier(&br_device_notifier); brioctl_set(NULL); unregister_pernet_subsys(&br_net_ops); rcu_barrier(); br_netfilter_fini(); #if IS_ENABLED(CONFIG_ATM_LANE) br_fdb_test_addr_hook = NULL; #endif br_fdb_fi...
includes
#include <linux/delay.h>
includes
#include <linux/clk.h>
includes
#include <linux/io.h>
includes
#include <linux/gpio.h>
includes
#include <linux/module.h>
includes
#include <sound/soc.h>
includes
#include <sound/pcm_params.h>
includes
#include <mach/dma.h>
includes
#include <mach/gpio-samsung.h>
includes
#include <plat/gpio-cfg.h>
defines
#define s3c24xx_i2s_suspend NULL
defines
#define s3c24xx_i2s_resume NULL
defines
#define S3C24XX_I2S_RATES \
structs
struct s3c24xx_i2s_info { void __iomem *regs; struct clk *iis_clk; u32 iiscon; u32 iismod; u32 iisfcon; u32 iispsr; };
functions
void s3c24xx_snd_txctrl(int on) { u32 iisfcon; u32 iiscon; u32 iismod; pr_debug("Entered %s\n", __func__); iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); pr_debug("r: IISCON: %x IISMOD: %x IISFCON: %...
functions
void s3c24xx_snd_rxctrl(int on) { u32 iisfcon; u32 iiscon; u32 iismod; pr_debug("Entered %s\n", __func__); iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); pr_debug("r: IISCON: %x IISMOD: %x IISFCON: %...
functions
int s3c24xx_snd_lrsync(void) { u32 iiscon; int timeout = 50; /* 5ms */ pr_debug("Entered %s\n", __func__); while (1) { iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); if (iiscon & S3C2410_IISCON_LRINDEX) break; if (!timeout--) return -ETIMEDOUT; udelay(100); }
functions
int s3c24xx_snd_is_clkmaster(void) { pr_debug("Entered %s\n", __func__); return (readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & S3C2410_IISMOD_SLAVE) ? 0:1; }
functions
int s3c24xx_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) { u32 iismod; pr_debug("Entered %s\n", __func__); iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); pr_debug("hw_params r: IISMOD: %x \n", iismod); switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: iismod |= S3C2...
functions
int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_dmaengine_dai_dma_data *dma_data; u32 iismod; pr_debug("Entered %s\n", __func__); dma_data = snd_soc_dai_get_dma_data(dai, substream); /* Working copies of register */...
functions
int s3c24xx_i2s_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { int ret = 0; pr_debug("Entered %s\n", __func__); switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: if (!s3c24xx_snd_is_clkmaster()) { re...
functions
int s3c24xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, int clk_id, unsigned int freq, int dir) { u32 iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); pr_debug("Entered %s\n", __func__); iismod &= ~S3C2440_IISMOD_MPLL; switch (clk_id) { case S3C24XX_CLKSRC_PCLK: break; case S3C24XX_CLKSRC_MPLL: iismod |...
functions
int s3c24xx_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, int div_id, int div) { u32 reg; pr_debug("Entered %s\n", __func__); switch (div_id) { case S3C24XX_DIV_BCLK: reg = readl(s3c24xx_i2s.regs + S3C2410_IISMOD) & ~S3C2410_IISMOD_FS_MASK; writel(reg | div, s3c24xx_i2s.regs + S3C2410_IISMOD); break; case S...
functions
u32 s3c24xx_i2s_get_clockrate(void) { return clk_get_rate(s3c24xx_i2s.iis_clk); }
functions
int s3c24xx_i2s_probe(struct snd_soc_dai *dai) { pr_debug("Entered %s\n", __func__); samsung_asoc_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out, &s3c24xx_i2s_pcm_stereo_in); s3c24xx_i2s.iis_clk = devm_clk_get(dai->dev, "iis"); if (IS_ERR(s3c24xx_i2s.iis_clk)) { pr_err("failed to get iis_clock\n"); return P...
functions
int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai) { pr_debug("Entered %s\n", __func__); s3c24xx_i2s.iiscon = readl(s3c24xx_i2s.regs + S3C2410_IISCON); s3c24xx_i2s.iismod = readl(s3c24xx_i2s.regs + S3C2410_IISMOD); s3c24xx_i2s.iisfcon = readl(s3c24xx_i2s.regs + S3C2410_IISFCON); s3c24xx_i2s.iispsr = readl(s3c24...
functions
int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai) { pr_debug("Entered %s\n", __func__); clk_prepare_enable(s3c24xx_i2s.iis_clk); writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON); writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); writel(s3c24xx_i2s.iisfcon, s3c24xx_i2s.regs + S3C2410_II...
functions
int s3c24xx_iis_dev_probe(struct platform_device *pdev) { int ret = 0; struct resource *res; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { dev_err(&pdev->dev, "Can't get IO resource.\n"); return -ENOENT; }
includes
#include <stdio.h>
includes
#include <string.h>
includes
#include <sys/stat.h>
includes
#include <sys/types.h>
includes
#include <sys/time.h>
includes
#include <unistd.h>
includes
#include <assert.h>
structs
struct XdgDirTimeList { time_t mtime; char *directory_name; int checked; XdgDirTimeList *next; };
structs
struct XdgCallbackList { XdgCallbackList *next; XdgCallbackList *prev; int callback_id; XdgMimeCallback callback; void *data; XdgMimeDestroy destroy; };
functions
void xdg_dir_time_list_add (char *file_name, time_t mtime) { XdgDirTimeList *list; for (list = dir_time_list; list; list = list->next) { if (strcmp (list->directory_name, file_name) == 0) { free (file_name); return; }
functions
void xdg_dir_time_list_free (XdgDirTimeList *list) { XdgDirTimeList *next; while (list) { next = list->next; free (list->directory_name); free (list); list = next; }
functions
int xdg_mime_init_from_directory (const char *directory) { char *file_name; struct stat st; assert (directory != NULL); file_name = malloc (strlen (directory) + strlen ("/mime/mime.cache") + 1); strcpy (file_name, directory); strcat (file_name, "/mime/mime.cache"); if (stat (file_name, &st) == 0) { ...
functions
void xdg_run_command_on_dirs (XdgDirectoryFunc func, void *user_data) { const char *xdg_data_home; const char *xdg_data_dirs; const char *ptr; xdg_data_home = getenv ("XDG_DATA_HOME"); if (xdg_data_home) { if ((func) (xdg_data_home, user_data)) return; }
functions
int xdg_check_file (const char *file_path, int *exists) { struct stat st; /* If the file exists */ if (stat (file_path, &st) == 0) { XdgDirTimeList *list; if (exists) *exists = TRUE; for (list = dir_time_list; list; list = list->next) { if (! strcmp (lis...
functions
int xdg_check_dir (const char *directory, int *invalid_dir_list) { int invalid, exists; char *file_name; assert (directory != NULL); /* Check the mime.cache file */ file_name = malloc (strlen (directory) + strlen ("/mime/mime.cache") + 1); strcpy (file_name, directory); strcat (file_name, "...
functions
else if (exists) { return FALSE; }
functions
int xdg_check_dirs (void) { XdgDirTimeList *list; int invalid_dir_list = FALSE; for (list = dir_time_list; list; list = list->next) list->checked = XDG_CHECKED_UNCHECKED; xdg_run_command_on_dirs ((XdgDirectoryFunc) xdg_check_dir, &invalid_dir_list); if (invalid_dir_list) return TRUE; for (...
functions
int xdg_check_time_and_dirs (void) { struct timeval tv; time_t current_time; int retval = FALSE; gettimeofday (&tv, NULL); current_time = tv.tv_sec; if (current_time >= last_stat_time + 5) { retval = xdg_check_dirs (); last_stat_time = current_time; }
functions
void xdg_mime_init (void) { if (xdg_check_time_and_dirs ()) { xdg_mime_shutdown (); }
functions
int xdg_mime_get_mime_types_from_file_name (const char *file_name, const char *mime_types[], int n_mime_types) { xdg_mime_init (); if (_caches) return _xdg_mime_cache_get_mime_types_from_file_name (file_name, mime_types, n_mime_types); return _xdg_glob_hash_lookup_file_name (global_h...
functions
int xdg_mime_is_valid_mime_type (const char *mime_type) { /* FIXME: We should make this a better test */ return _xdg_utf8_validate (mime_type); }
functions
void xdg_mime_shutdown (void) { XdgCallbackList *list; /* FIXME: Need to make this (and the whole library) thread safe */ if (dir_time_list) { xdg_dir_time_list_free (dir_time_list); dir_time_list = NULL; }
functions
int xdg_mime_get_max_buffer_extents (void) { xdg_mime_init (); if (_caches) return _xdg_mime_cache_get_max_buffer_extents (); return _xdg_mime_magic_get_buffer_extents (global_magic); }
functions
int _xdg_mime_mime_type_equal (const char *mime_a, const char *mime_b) { const char *unalias_a, *unalias_b; unalias_a = _xdg_mime_unalias_mime_type (mime_a); unalias_b = _xdg_mime_unalias_mime_type (mime_b); if (strcmp (unalias_a, unalias_b) == 0) return 1; return 0; }
functions
int xdg_mime_mime_type_equal (const char *mime_a, const char *mime_b) { xdg_mime_init (); return _xdg_mime_mime_type_equal (mime_a, mime_b); }
functions
int xdg_mime_media_type_equal (const char *mime_a, const char *mime_b) { char *sep; sep = strchr (mime_a, '/'); if (sep && strncmp (mime_a, mime_b, sep - mime_a + 1) == 0) return 1; return 0; }
functions
int xdg_mime_is_super_type (const char *mime) { int length; const char *type; length = strlen (mime); type = &(mime[length - 2]); if (strcmp (type, "/*") == 0) return 1; return 0; }
functions
int _xdg_mime_mime_type_subclass (const char *mime, const char *base) { const char *umime, *ubase; const char **parents; if (_caches) return _xdg_mime_cache_mime_type_subclass (mime, base); umime = _xdg_mime_unalias_mime_type (mime); ubase = _xdg_mime_unalias_mime_type (base); if (strcmp (um...
functions
int xdg_mime_mime_type_subclass (const char *mime, const char *base) { xdg_mime_init (); return _xdg_mime_mime_type_subclass (mime, base); }
functions
void xdg_mime_dump (void) { xdg_mime_init(); printf ("*** ALIASES ***\n\n"); _xdg_mime_alias_list_dump (alias_list); printf ("\n*** PARENTS ***\n\n"); _xdg_mime_parent_list_dump (parent_list); printf ("\n*** CACHE ***\n\n"); _xdg_glob_hash_dump (global_hash); printf ("\n*** GLOBS ***\n\n"); _xdg_glo...
functions
int xdg_mime_register_reload_callback (XdgMimeCallback callback, void *data, XdgMimeDestroy destroy) { XdgCallbackList *list_el; static int callback_id = 1; /* Make a new list element */ list_el = calloc (1, sizeof (XdgCallbackList)); list_el->callback_id = callback_id; list_el-...
functions
void xdg_mime_remove_callback (int callback_id) { XdgCallbackList *list; for (list = callback_list; list; list = list->next) { if (list->callback_id == callback_id) { if (list->next) list->next = list->prev; if (list->prev) list->prev->next = list->next; else callback_list = lis...
includes
#include <net/mac80211.h>
structs
struct phy_ctx_used_data { unsigned long used[BITS_TO_LONGS(NUM_PHY_CTX)]; };
functions
u8 iwl_mvm_get_channel_width(struct cfg80211_chan_def *chandef) { switch (chandef->width) { case NL80211_CHAN_WIDTH_20_NOHT: case NL80211_CHAN_WIDTH_20: return PHY_VHT_CHANNEL_MODE20; case NL80211_CHAN_WIDTH_40: return PHY_VHT_CHANNEL_MODE40; case NL80211_CHAN_WIDTH_80: return PHY_VHT_CHANNEL_MODE80; case N...
functions
u8 iwl_mvm_get_ctrl_pos(struct cfg80211_chan_def *chandef) { switch (chandef->chan->center_freq - chandef->center_freq1) { case -70: return PHY_VHT_CTRL_POS_4_BELOW; case -50: return PHY_VHT_CTRL_POS_3_BELOW; case -30: return PHY_VHT_CTRL_POS_2_BELOW; case -10: return PHY_VHT_CTRL_POS_1_BELOW; case 10: ...
functions
void iwl_mvm_phy_ctxt_cmd_hdr(struct iwl_mvm_phy_ctxt *ctxt, struct iwl_phy_context_cmd *cmd, u32 action, u32 apply_time) { memset(cmd, 0, sizeof(struct iwl_phy_context_cmd)); cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(ctxt->id, ctxt->color)); cmd->action = cpu_to_le32(action);...
functions
void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm, struct iwl_phy_context_cmd *cmd, struct cfg80211_chan_def *chandef, u8 chains_static, u8 chains_dynamic) { u8 valid_rx_chains, active_cnt, idle_cnt; /* Set the channel info data */ cmd->ci.band = (chandef->chan->band == IEEE80211_BAND...
functions
int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, struct cfg80211_chan_def *chandef, u8 chains_static, u8 chains_dynamic, u32 action, u32 apply_time) { struct iwl_phy_context_cmd cmd; int ret; /* Set the command header fields */ iwl_mvm_phy_ctxt_cmd_hdr(ctxt, &c...
functions
void iwl_mvm_phy_ctx_used_iter(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *ctx, void *_data) { struct phy_ctx_used_data *data = _data; struct iwl_mvm_phy_ctxt *phy_ctxt = (void *)ctx->drv_priv; __set_bit(phy_ctxt->id, data->used); }
functions
int iwl_mvm_phy_ctxt_add(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, struct cfg80211_chan_def *chandef, u8 chains_static, u8 chains_dynamic) { struct phy_ctx_used_data data = { .used = { }
functions
int iwl_mvm_phy_ctxt_changed(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt, struct cfg80211_chan_def *chandef, u8 chains_static, u8 chains_dynamic) { lockdep_assert_held(&mvm->mutex); ctxt->channel = chandef->chan; return iwl_mvm_phy_ctxt_apply(mvm, ctxt, chandef, chains_static, chain...
functions
void iwl_mvm_phy_ctxt_remove(struct iwl_mvm *mvm, struct iwl_mvm_phy_ctxt *ctxt) { struct iwl_phy_context_cmd cmd; int ret; lockdep_assert_held(&mvm->mutex); iwl_mvm_phy_ctxt_cmd_hdr(ctxt, &cmd, FW_CTXT_ACTION_REMOVE, 0); ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, CMD_SYNC, sizeof(struct iwl_phy_con...
defines
#define KZM_RAMADDRESS (0x80000000)