Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | drivers/atm/idt77252.c |
static void idt77252_softint(struct work_struct *work) {
struct idt77252_dev *card = container_of(work, struct idt77252_dev, tqueue);
u32 stat;
int done;
for (done = 1;; done = 1) {
stat = readl(SAR_REG_STAT) >> 16;
if ((stat & 0x0f) < SAR_FBQ0_HIGH) {
add_rx_skb(card, 0, SAR_FB_SIZE_0, 32);
... | [
1,
0
] |
Linux Kernel | drivers/atm/idt77252.c |
static int open_card_ubr0(struct idt77252_dev *card) {
struct vc_map *vc;
vc = kzalloc(sizeof(struct vc_map), GFP_KERNEL);
if (!vc) {
printk("%s: can't alloc vc\n", card->name);
return -ENOMEM;
}
card->vcs[0] = vc;
vc->class = SCHED_UBR0;
vc->scq = alloc_scq(card, vc->class);
if (!vc->scq) {
... | [
0,
0
] |
Linux Kernel | drivers/atm/idt77252.c | static int idt77252_preset(struct idt77252_dev *card) {
u16 pci_command;
/*****************************************************************/
/* P C I C O N F I G U R A T I O N */
/*****************************************************************/
XPRINTK("%s: Enable PCI master ... | [
0,
0
] |
Linux Kernel | drivers/atm/idt77252.c |
static int __init idt77252_init(void) {
struct sk_buff *skb;
printk("%s: at %p\n", __func__, idt77252_init);
BUILD_BUG_ON(sizeof(skb->cb) <
sizeof(struct idt77252_skb_prv) + sizeof(struct atm_skb_data));
return pci_register_driver(&idt77252_driver);
} | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c | static void ia_cbrVc_close(struct atm_vcc *vcc) {
IADEV *iadev;
u16 *SchedTbl, NullVci = 0;
u32 i, NumFound;
iadev = INPH_IA_DEV(vcc->dev);
iadev->NumEnabledCBR--;
SchedTbl = (u16 *)(iadev->seg_ram + CBR_SCHED_TABLE * iadev->memSize);
if (iadev->NumEnabledCBR == 0) {
writew((UBR_EN | ABR_EN | (0x23 <... | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static int ia_avail_descs(IADEV *iadev) {
int tmp = 0;
ia_hack_tcq(iadev);
if (iadev->host_tcq_wr >= iadev->ffL.tcq_rd)
tmp = (iadev->host_tcq_wr - iadev->ffL.tcq_rd) / 2;
else
tmp = (iadev->ffL.tcq_ed - iadev->ffL.tcq_rd + 2 + iadev->host_tcq_wr -
iadev->ffL.tcq_st) /
2;
return ... | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static int ia_que_tx(IADEV *iadev) {
struct sk_buff *skb;
int num_desc;
struct atm_vcc *vcc;
num_desc = ia_avail_descs(iadev);
while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) {
if (!(vcc = ATM_SKB(skb)->vcc)) {
dev_kfree_skb_any(skb);
printk("ia_que_tx: Null vcc\n");
break;... | [
0,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static void ia_mb25_init(struct iadev_priv *iadev) {
#if 0
mb25->mb25_master_ctrl = MB25_MC_DRIC | MB25_MC_DREC | MB25_MC_ENABLED;
#endif
ia_phy_write32(iadev, MB25_MASTER_CTRL, MB25_MC_DRIC | MB25_MC_DREC);
ia_phy_write32(iadev, MB25_DIAG_CONTROL, 0);
iadev->carrier_detect =
(ia_phy_read32(iadev, MB25... | [
0,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static void ia_phy_write(struct iadev_priv *iadev, const struct ia_reg *regs,
int len) {
while (len--) {
ia_phy_write32(iadev, regs->reg, regs->val);
regs++;
}
} | [
0,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static void ia_suni_pm7345_init_ds3(struct iadev_priv *iadev) {
static const struct ia_reg suni_ds3_init[] = {{SUNI_DS3_FRM_INTR_ENBL, 0x17},
{SUNI_DS3_FRM_CFG, 0x01},
{SUNI_DS3_TRAN_CFG, 0x01},
... | [
0,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static void ia_suni_pm7345_init_e3(struct iadev_priv *iadev) {
static const struct ia_reg suni_e3_init[] = {
{SUNI_E3_FRM_FRAM_OPTIONS, 0x04},
{SUNI_E3_FRM_MAINT_OPTIONS, 0x20},
{SUNI_E3_FRM_FRAM_INTR_ENBL, 0x1d},
{SUNI_E3_FRM_MAINT_INTR_ENBL, 0x30},
{SUNI_E3_TRAN_STAT_DIAG_OPTIONS, 0},... | [
0,
0
] |
Linux Kernel | drivers/atm/iphase.c | static void xdump(u_char *cp, int length, char *prefix) {
int col, count;
u_char prntBuf[120];
u_char *pBuf = prntBuf;
count = 0;
while (count < length) {
pBuf += sprintf(pBuf, "%s", prefix);
for (col = 0; count + col < length && col < 16; col++) {
if (col != 0 && (col % 4) == 0)
pBuf +=... | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c | static void free_desc(struct atm_dev *dev, int desc) {
IADEV *iadev;
iadev = INPH_IA_DEV(dev);
writew(desc, iadev->reass_ram + iadev->rfL.fdq_wr);
iadev->rfL.fdq_wr += 2;
if (iadev->rfL.fdq_wr > iadev->rfL.fdq_ed)
iadev->rfL.fdq_wr = iadev->rfL.fdq_st;
writew(iadev->rfL.fdq_wr, iadev->reass_reg + FREEQ_... | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c | static int reset_sar(struct atm_dev *dev) {
IADEV *iadev;
int i, error = 1;
unsigned int pci[64];
iadev = INPH_IA_DEV(dev);
for (i = 0; i < 64; i++)
if ((error = pci_read_config_dword(iadev->pci, i * 4, &pci[i])) !=
PCIBIOS_SUCCESSFUL)
return error;
writel(0, iadev->reg + IPHASE5575_EXT_R... | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static void ia_update_stats(IADEV *iadev) {
if (!iadev->carrier_detect)
return;
iadev->rx_cell_cnt += readw(iadev->reass_reg + CELL_CTR0) & 0xffff;
iadev->rx_cell_cnt += (readw(iadev->reass_reg + CELL_CTR1) & 0xffff) << 16;
iadev->drop_rxpkt += readw(iadev->reass_reg + DRP_PKT_CNTR) & 0xffff;
iadev->drop... | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c | static int ia_open(struct atm_vcc *vcc) {
struct ia_vcc *ia_vcc;
int error;
if (!test_bit(ATM_VF_PARTIAL, &vcc->flags)) {
IF_EVENT(printk("ia: not partially allocated resources\n");)
vcc->dev_data = NULL;
}
if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC) {
IF_EVENT(printk("iphase ope... | [
1,
0
] |
Linux Kernel | drivers/atm/iphase.c |
static void __exit ia_module_exit(void) {
pci_unregister_driver(&ia_driver);
del_timer_sync(&ia_timer);
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void lanai_buf_allocate(struct lanai_buffer *buf, size_t bytes,
size_t minbytes, struct pci_dev *pci) {
int size;
if (bytes > (128 * 1024))
bytes = 128 * 1024;
for (size = LANAI_PAGE_SIZE; size < bytes; size *= 2)
;
if (minbytes < LANAI_PAGE_SIZE)
minbytes = LA... | [
1,
0
] |
Linux Kernel | drivers/atm/lanai.c | static int lanai_buf_size_cardorder(const struct lanai_buffer *buf) {
int order = get_order(lanai_buf_size(buf)) + (PAGE_SHIFT - 10);
if (order > 7)
order = 7;
return order;
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static inline void reset_board(const struct lanai_dev *lanai) {
DPRINTK("about to reset board\n");
reg_write(lanai, 0, Reset_Reg);
udelay(5);
}
/* -------------------- CARD SRAM UTILITIES: */
/* The SRAM is mapped into normal PCI memory space - the only catch is
* that it is only 16-bits wide but must be acce... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static inline bus_addr_t sram_addr(const struct lanai_dev *lanai, int offset) {
return lanai->base + SRAM_START + offset;
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static inline u32 sram_read(const struct lanai_dev *lanai, int offset) {
return readl(sram_addr(lanai, offset));
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static inline void sram_write(const struct lanai_dev *lanai, u32 val,
int offset) {
writel(val, sram_addr(lanai, offset));
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static int sram_test_and_clear(const struct lanai_dev *lanai) {
#ifdef FULL_MEMORY_TEST
int result;
DPRINTK("testing SRAM\n");
if ((result = sram_test_pass(lanai, 0x5555)) != 0)
return result;
if ((result = sram_test_pass(lanai, 0xAAAA)) != 0)
return result;
#endif
DPRINTK("clearing SRAM\n");
retur... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static inline bus_addr_t cardvcc_addr(const struct lanai_dev *lanai,
vci_t vci) {
return sram_addr(lanai, vci * CARDVCC_SIZE);
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void host_vcc_start_rx(const struct lanai_vcc *lvcc) {
u32 addr1;
if (lvcc->rx.atmvcc->qos.aal == ATM_AAL5) {
dma_addr_t dmaaddr = lvcc->rx.buf.dmaaddr;
cardvcc_write(lvcc, 0xFFFF, vcc_rxcrc1);
cardvcc_write(lvcc, 0xFFFF, vcc_rxcrc2);
cardvcc_write(lvcc, 0, vcc_rxwriteptr);
cardvcc_write(... | [
1,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static void host_vcc_start_tx(const struct lanai_vcc *lvcc) {
dma_addr_t dmaaddr = lvcc->tx.buf.dmaaddr;
cardvcc_write(lvcc, 0, vcc_txicg);
cardvcc_write(lvcc, 0xFFFF, vcc_txcrc1);
cardvcc_write(lvcc, 0xFFFF, vcc_txcrc2);
cardvcc_write(lvcc, 0, vcc_txreadptr);
cardvcc_write(lvcc, 0, vcc_txendptr);
cardvc... | [
1,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void lanai_shutdown_rx_vci(const struct lanai_vcc *lvcc) {
if (lvcc->vbase == NULL)
return;
/* 15.1.1 - set to trashing, wait one cell time (15us) */
cardvcc_write(
lvcc, RXADDR1_SET_RMMODE(RMMODE_TRASH) | RXADDR1_SET_MODE(RXMODE_TRASH),
vcc_rxaddr1);
udelay(15);
/* 15.1.2 - clear rest ... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address) {
return be32_to_cpup((const u32 *)&lanai->eeprom[address]);
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static inline u32 intr_pending(const struct lanai_dev *lanai) {
return reg_read(lanai, IntStatusMasked_Reg);
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static inline void intr_disable(const struct lanai_dev *lanai, u32 i) {
reg_write(lanai, i, IntControlDis_Reg);
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static inline void vcc_tx_add_aal5_trailer(struct lanai_vcc *lvcc, int len,
int cpi, int uu) {
APRINTK((((unsigned long)lvcc->tx.buf.ptr) & 15) == 8,
"vcc_tx_add_aal5_trailer: bad ptr=%p\n", lvcc->tx.buf.ptr);
lvcc->tx.buf.ptr += 2;
lvcc->tx.buf.ptr[-2] = cpu_t... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c |
static inline void vcc_tx_memzero(struct lanai_vcc *lvcc, int n) {
unsigned char *e;
int m;
if (n == 0)
return;
e = ((unsigned char *)lvcc->tx.buf.ptr) + n;
m = e - (unsigned char *)lvcc->tx.buf.end;
if (m < 0)
m = 0;
memset(lvcc->tx.buf.ptr, 0, n - m);
if (m != 0) {
memset(lvcc->tx.buf.sta... | [
1,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void vcc_tx_unqueue_aal5(struct lanai_dev *lanai, struct lanai_vcc *lvcc,
int endptr) {
int n;
struct sk_buff *skb;
int space = vcc_tx_space(lvcc, endptr);
APRINTK(vcc_is_backlogged(lvcc),
"vcc_tx_unqueue() called with empty backlog (vci=%d)\n", lvcc->vci);
whi... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static inline struct lanai_vcc *new_lanai_vcc(void) {
struct lanai_vcc *lvcc;
lvcc = kzalloc(sizeof(*lvcc), GFP_KERNEL);
if (likely(lvcc != NULL)) {
skb_queue_head_init(&lvcc->tx.backlog);
#ifdef DEBUG
lvcc->vci = -1;
#endif
}
return lvcc;
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static inline void host_vcc_unbind(struct lanai_dev *lanai,
struct lanai_vcc *lvcc) {
if (lvcc->vbase == NULL)
return;
DPRINTK("Unbinding vci %d\n", lvcc->vci);
lvcc->vbase = NULL;
lanai->vccs[lvcc->vci] = NULL;
#ifdef USE_POWERDOWN
if (--lanai->nbound == 0) {
DPRINT... | [
1,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void lanai_reset(struct lanai_dev *lanai) {
printk(KERN_CRIT DEV_LABEL "(itf %d): *NOT* resetting - not "
"implemented\n",
lanai->number);
/* The following is just a hack until we write the real
* resetter - at least ack whatever interrupt sent us
* here
*/
r... | [
0,
1
] |
Linux Kernel | drivers/atm/lanai.c | static void iter_transmit(struct lanai_dev *lanai, vci_t vci) {
struct lanai_vcc *lvcc = lanai->vccs[vci];
if (vcc_is_backlogged(lvcc))
lvcc->tx.unqueue(lanai, lvcc, lvcc->tx.endptr);
} | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void run_service(struct lanai_dev *lanai) {
int ntx = 0;
u32 wreg = reg_read(lanai, ServWrite_Reg);
const u32 *end = lanai->service.start + wreg;
while (lanai->service.ptr != end) {
ntx += handle_service(lanai, le32_to_cpup(lanai->service.ptr++));
if (lanai->service.ptr >= lanai->service.end)
... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void get_statistics(struct lanai_dev *lanai) {
u32 statreg = reg_read(lanai, Statistics_Reg);
lanai->stats.atm_ovfl += STATS_GET_FIFO_OVFL(statreg);
lanai->stats.hec_err += STATS_GET_HEC_ERR(statreg);
lanai->stats.vci_trash += STATS_GET_BAD_VCI(statreg);
lanai->stats.ovfl_trash += STATS_GET_BUF_OVFL(st... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void lanai_timed_poll(struct timer_list *t) {
struct lanai_dev *lanai = from_timer(lanai, t, timer);
#ifndef DEBUG_RW
unsigned long flags;
#ifdef USE_POWERDOWN
if (lanai->conf1 & CONFIG1_POWERDOWN)
return;
#endif
local_irq_save(flags);
/* If we can grab the spinlock, check if any services need to b... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static int vci_is_ok(struct lanai_dev *lanai, vci_t vci,
const struct atm_vcc *atmvcc) {
const struct atm_qos *qos = &atmvcc->qos;
const struct lanai_vcc *lvcc = lanai->vccs[vci];
if (vci == 0 && !vci0_is_ok(lanai, qos))
return 0;
if (unlikely(lvcc != NULL)) {
if (qos->rxtp.traffic_... | [
1,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void lanai_dev_close(struct atm_dev *atmdev) {
struct lanai_dev *lanai = (struct lanai_dev *)atmdev->dev_data;
if (lanai->base == NULL)
return;
printk(KERN_INFO DEV_LABEL "(itf %d): shutting down interface\n",
lanai->number);
lanai_timed_poll_stop(lanai);
#ifdef USE_POWERDOWN
lanai->conf1 ... | [
0,
0
] |
Linux Kernel | drivers/atm/lanai.c | static void lanai_close(struct atm_vcc *atmvcc) {
struct lanai_vcc *lvcc = (struct lanai_vcc *)atmvcc->dev_data;
struct lanai_dev *lanai = (struct lanai_dev *)atmvcc->dev->dev_data;
if (lvcc == NULL)
return;
clear_bit(ATM_VF_READY, &atmvcc->flags);
clear_bit(ATM_VF_PARTIAL, &atmvcc->flags);
if (lvcc->rx... | [
1,
0
] |
Linux Kernel | drivers/atm/lanai.c | static int lanai_init_one(struct pci_dev *pci,
const struct pci_device_id *ident) {
struct lanai_dev *lanai;
struct atm_dev *atmdev;
int result;
lanai = kzalloc(sizeof(*lanai), GFP_KERNEL);
if (lanai == NULL) {
printk(KERN_ERR DEV_LABEL ": couldn't allocate dev_data structure!\n... | [
0,
0
] |
Linux Kernel | drivers/atm/nicstar.c | static int nicstar_init_one(struct pci_dev *pcidev,
const struct pci_device_id *ent) {
static int index = -1;
unsigned int error;
index++;
cards[index] = NULL;
error = ns_init_card(index, pcidev);
if (error) {
cards[index--] = NULL;
goto err_out;
}
return 0;
err_ou... | [
0,
0
] |
Linux Kernel | drivers/atm/nicstar.c | static u32 ns_read_sram(ns_dev *card, u32 sram_address) {
unsigned long flags;
u32 data;
sram_address <<= 2;
sram_address &= 0x0007FFFC;
sram_address |= 0x50000000; /* SRAM read command */
spin_lock_irqsave(&card->res_lock, flags);
while (CMD_BUSY(card))
;
writel(sram_address, card->membase + CMD);
... | [
1,
0
] |
Linux Kernel | drivers/atm/nicstar.c | static void ns_write_sram(ns_dev *card, u32 sram_address, u32 *value,
int count) {
unsigned long flags;
int i, c;
count--;
c = count;
c <<= 2; /* to use increments of 4 */
spin_lock_irqsave(&card->res_lock, flags);
while (CMD_BUSY(card))
;
for (i = 0; i <= c; i += 4)
wr... | [
1,
0
] |
Linux Kernel | drivers/atm/nicstar.c |
static scq_info *get_scq(ns_dev *card, int size, u32 scd) {
scq_info *scq;
if (size != VBR_SCQSIZE && size != CBR_SCQSIZE)
return NULL;
scq = kmalloc(sizeof(*scq), GFP_KERNEL);
if (!scq)
return NULL;
scq->org =
dma_alloc_coherent(&card->pcidev->dev, 2 * size, &scq->dma, GFP_KERNEL);
if (!sc... | [
1,
0
] |
Linux Kernel | drivers/atm/nicstar.c | static void free_scq(ns_dev *card, scq_info *scq, struct atm_vcc *vcc) {
int i;
if (scq->num_entries == VBR_SCQ_NUM_ENTRIES)
for (i = 0; i < scq->num_entries; i++) {
if (scq->skb[i] != NULL) {
vcc = ATM_SKB(scq->skb[i])->vcc;
if (vcc->pop != NULL)
vcc->pop(vcc, scq->skb[i]);
... | [
0,
0
] |
Linux Kernel | drivers/atm/nicstar.c |
static void recycle_iov_buf(ns_dev *card, struct sk_buff *iovb) {
if (card->iovpool.count < card->iovnr.max) {
skb_queue_tail(&card->iovpool.queue, iovb);
card->iovpool.count++;
} else
dev_kfree_skb_any(iovb);
} | [
0,
0
] |
Linux Kernel | drivers/atm/nicstar.c | static void ns_poll(struct timer_list *unused) {
int i;
ns_dev *card;
unsigned long flags;
u32 stat_r, stat_w;
PRINTK("nicstar: Entering ns_poll().\n");
for (i = 0; i < num_cards; i++) {
card = cards[i];
if (!spin_trylock_irqsave(&card->int_lock, flags)) {
continue;
}
stat_w = 0;
... | [
0,
0
] |
Linux Kernel | drivers/atm/nicstarmac.c | static u_int8_t read_eprom_byte(virt_addr_t base, u_int8_t offset) {
u_int32_t val = 0;
int i, j = 0;
u_int8_t tempread = 0;
val = NICSTAR_REG_READ(base, NICSTAR_REG_GENERAL_PURPOSE) & 0xFFFFFFF0;
for (i = 0; i < ARRAY_SIZE(readtab); i++) {
NICSTAR_REG_WRITE(base, NICSTAR_REG_GENERAL_PURPOSE, (val | rea... | [
1,
0
] |
Linux Kernel | drivers/atm/solos-pci.c |
static inline void solos_pop(struct atm_vcc *vcc, struct sk_buff *skb) {
if (vcc->pop)
vcc->pop(vcc, skb);
else
dev_kfree_skb_any(skb);
} | [
1,
0
] |
Linux Kernel | drivers/atm/solos-pci.c |
static ssize_t solos_param_show(struct device *dev,
struct device_attribute *attr, char *buf) {
struct atm_dev *atmdev = container_of(dev, struct atm_dev, class_dev);
struct solos_card *card = atmdev->dev_data;
struct solos_param prm;
struct sk_buff *skb;
struct pkt_hdr *heade... | [
1,
0
] |
Linux Kernel | drivers/atm/solos-pci.c |
static char *next_string(struct sk_buff *skb) {
int i = 0;
char *this = skb->data;
for (i = 0; i < skb->len; i++) {
if (this[i] == '\n') {
this[i] = 0;
skb_pull(skb, i + 1);
return this;
}
if (!isprint(this[i]))
return NULL;
}
return NULL;
} | [
0,
0
] |
Linux Kernel | drivers/atm/solos-pci.c |
static int process_command(struct solos_card *card, int port,
struct sk_buff *skb) {
struct solos_param *prm;
unsigned long flags;
int cmdpid;
int found = 0, err;
if (skb->len < 7)
return 0;
if (skb->data[0] != 'L' || !isdigit(skb->data[1]) || !isdigit(skb->data[2]) ||
... | [
1,
0
] |
Linux Kernel | drivers/atm/solos-pci.c |
static int popen(struct atm_vcc *vcc) {
struct solos_card *card = vcc->dev->dev_data;
struct sk_buff *skb;
struct pkt_hdr *header;
if (vcc->qos.aal != ATM_AAL5) {
dev_warn(&card->dev->dev, "Unsupported ATM type %d\n", vcc->qos.aal);
return -EINVAL;
}
skb = alloc_skb(sizeof(*header), GFP_KERNEL);
... | [
1,
0
] |
Linux Kernel | drivers/atm/solos-pci.c | static void fpga_remove(struct pci_dev *dev) {
struct solos_card *card = pci_get_drvdata(dev);
iowrite32(0, card->config_regs + IRQ_EN_ADDR);
/* Reset FPGA */
iowrite32(1, card->config_regs + FPGA_MODE);
(void)ioread32(card->config_regs + FPGA_MODE);
if (card->fpga_version >= DMA_SUPPORTED)
sysfs_rem... | [
0,
0
] |
Linux Kernel | drivers/atm/solos-pci.c |
static int __init solos_pci_init(void) {
BUILD_BUG_ON(sizeof(struct solos_skb_cb) > sizeof(((struct sk_buff *)0)->cb));
printk(KERN_INFO "Solos PCI Driver Version %s\n", VERSION);
return pci_register_driver(&fpga_driver);
} | [
1,
0
] |
Linux Kernel | drivers/atm/suni.c | static int set_sonet(struct atm_dev *dev) {
if (PRIV(dev)->type == SUNI_MRI_TYPE_PM5355) {
PUT(GET(RPOP_RC) & ~SUNI_RPOP_RC_ENSS, RPOP_RC);
PUT(GET(SSTB_CTRL) & ~SUNI_SSTB_CTRL_LEN16, SSTB_CTRL);
PUT(GET(SPTB_CTRL) & ~SUNI_SPTB_CTRL_LEN16, SPTB_CTRL);
}
REG_CHANGE(SUNI_TPOP_APM_S, SUNI_TPOP_APM_S_SHI... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/arm-charlcd.c | static void charlcd_wait_complete_irq(struct charlcd *lcd) {
int ret;
ret = wait_for_completion_interruptible_timeout(&lcd->complete,
CHARLCD_TIMEOUT);
writel(0x00, lcd->virtbase + CHAR_MASK);
if (ret < 0) {
dev_err(lcd->dev,
"wait_for_complet... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/arm-charlcd.c | static bool charlcd_4bit_read_bf(struct charlcd *lcd) {
if (lcd->irq >= 0) {
writel(CHAR_RAW_CLEAR, lcd->virtbase + CHAR_RAW);
init_completion(&lcd->complete);
writel(0x01, lcd->virtbase + CHAR_MASK);
}
readl(lcd->virtbase + CHAR_COM);
return charlcd_4bit_read_char(lcd) & HD_BUSY_FLAG ? true : fals... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/arm-charlcd.c |
static void charlcd_4bit_wait_busy(struct charlcd *lcd) {
int retries = 50;
udelay(100);
while (charlcd_4bit_read_bf(lcd) && retries)
retries--;
if (!retries)
dev_err(lcd->dev, "timeout waiting for busyflag\n");
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/arm-charlcd.c | static void charlcd_4bit_print(struct charlcd *lcd, int line, const char *str) {
u8 offset;
int i;
if (line == 0)
offset = 0;
else if (line == 1)
offset = 0x28;
else
return;
/* Set offset */
charlcd_4bit_command(lcd, HD_SET_DDRAM | offset);
/* Send string */
for (i = 0; i < strlen(str) ... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/arm-charlcd.c | static void charlcd_4bit_init(struct charlcd *lcd) {
writel(HD_FUNCSET | HD_FUNCSET_8BIT, lcd->virtbase + CHAR_COM);
msleep(5);
writel(HD_FUNCSET | HD_FUNCSET_8BIT, lcd->virtbase + CHAR_COM);
udelay(100);
writel(HD_FUNCSET | HD_FUNCSET_8BIT, lcd->virtbase + CHAR_COM);
udelay(100);
/* Go to 4bit mode */
... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/arm-charlcd.c | static int charlcd_suspend(struct device *dev) {
struct charlcd *lcd = dev_get_drvdata(dev);
charlcd_4bit_command(lcd, HD_DISPCTRL);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/cfag12864b.c |
static void cfag12864b_off(void) {
cfag12864b_setcontrollers(1, 1);
cfag12864b_displaystate(0);
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/cfag12864b.c |
unsigned char cfag12864b_enable(void) {
unsigned char ret;
mutex_lock(&cfag12864b_mutex);
if (!cfag12864b_updating) {
cfag12864b_updating = 1;
cfag12864b_queue();
ret = 0;
} else
ret = 1;
mutex_unlock(&cfag12864b_mutex);
return ret;
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/cfag12864b.c | unsigned char cfag12864b_isinited(void) { return cfag12864b_inited; } | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/cfag12864b.c | static int __init cfag12864b_init(void) {
int ret = -EINVAL;
if (!ks0108_isinited()) {
printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
"ks0108 is not initialized\n");
goto none;
}
BUILD_BUG_ON(PAGE_SIZE < CFAG12864B_SIZE);
cfag12864b_buffer = (unsigned char *)get_zero... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/cfag12864b.c |
static void __exit cfag12864b_exit(void) {
cfag12864b_disable();
cfag12864b_off();
destroy_workqueue(cfag12864b_workqueue);
kfree(cfag12864b_cache);
free_page((unsigned long)cfag12864b_buffer);
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/charlcd.c | void charlcd_poke(struct charlcd *lcd) {
struct charlcd_priv *priv = charlcd_to_priv(lcd);
if (!lcd->ops->backlight)
return;
cancel_delayed_work_sync(&priv->bl_work);
mutex_lock(&priv->bl_tempo_lock);
if (!priv->bl_tempo && !(priv->flags & LCD_FLAG_L))
lcd->ops->backlight(lcd, CHARLCD_ON);
priv->... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/charlcd.c | static bool parse_xy(const char *s, unsigned long *x, unsigned long *y) {
unsigned long new_x = *x;
unsigned long new_y = *y;
char *p;
for (;;) {
if (!*s)
return false;
if (*s == ';')
break;
if (*s == 'x') {
new_x = simple_strtoul(s + 1, &p, 10);
if (p == s + 1)
re... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/charlcd.c | static int charlcd_open(struct inode *inode, struct file *file) {
struct charlcd_priv *priv = charlcd_to_priv(the_charlcd);
int ret;
ret = -EBUSY;
if (!atomic_dec_and_test(&charlcd_available))
goto fail;
ret = -EPERM;
if (file->f_mode & FMODE_READ) /* device is write-only */
goto fail;
if (priv... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/charlcd.c |
static void charlcd_puts(struct charlcd *lcd, const char *s) {
const char *tmp = s;
int count = strlen(s);
for (; count-- > 0; tmp++) {
if (((count + 1) & 0x1f) == 0)
cond_resched();
charlcd_write_char(lcd, *tmp);
}
}
#ifdef CONFIG_PANEL_BOOT_MESSAGE
#define LCD_INIT_TEXT CONFIG_PANEL_BOOT_MES... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/hd44780.c | static void hd44780_write_gpio4(struct hd44780 *hd, u8 val, unsigned int rs) {
DECLARE_BITMAP(values, 6);
unsigned int n;
/* High nibble + RS, RW */
values[0] = val >> 4;
__assign_bit(4, values, rs);
n = hd->pins[PIN_CTRL_RW] ? 6 : 5;
/* Present the data to the port */
gpiod_set_array_value_cansleep(n... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/hd44780.c | static void hd44780_write_cmd_gpio4(struct hd44780_common *hdc, int cmd) {
struct hd44780 *hd = hdc->hd44780;
hd44780_write_gpio4(hd, cmd, 0);
udelay(120);
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/hd44780.c | static void hd44780_write_data_gpio4(struct hd44780_common *hdc, int data) {
struct hd44780 *hd = hdc->hd44780;
hd44780_write_gpio4(hd, data, 1);
udelay(45);
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/hd44780_common.c |
int hd44780_common_print(struct charlcd *lcd, int c) {
struct hd44780_common *hdc = lcd->drvdata;
if (lcd->addr.x < hdc->bwidth) {
hdc->write_data(hdc, c);
return 0;
}
return 1;
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/hd44780_common.c | int hd44780_common_gotoxy(struct charlcd *lcd, unsigned int x, unsigned int y) {
struct hd44780_common *hdc = lcd->drvdata;
unsigned int addr;
addr = x < hdc->bwidth ? x & (hdc->hwidth - 1) : hdc->bwidth - 1;
if (y & 1)
addr += hdc->hwidth;
if (y & 2)
addr += hdc->bwidth;
hdc->write_cmd(hdc, LCD_CM... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/hd44780_common.c |
static void hd44780_common_set_function(struct hd44780_common *hdc) {
hdc->write_cmd(
hdc,
LCD_CMD_FUNCTION_SET |
((hdc->ifwidth == 8) ? LCD_CMD_DATA_LEN_8BITS : 0) |
((hdc->hd44780_common_flags & LCD_FLAG_F) ? LCD_CMD_FONT_5X10_DOTS
... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/hd44780_common.c |
int hd44780_common_lines(struct charlcd *lcd, enum charlcd_lines lines) {
struct hd44780_common *hdc = lcd->drvdata;
if (lines == CHARLCD_LINES_2)
hdc->hd44780_common_flags |= LCD_FLAG_N;
else
hdc->hd44780_common_flags &= ~LCD_FLAG_N;
hd44780_common_set_function(hdc);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c |
static int ht16k33_brightness_set(struct ht16k33_priv *priv,
unsigned int brightness) {
int err;
if (brightness == 0) {
priv->blink = REG_DISPLAY_SETUP_BLINK_OFF;
return ht16k33_display_off(priv);
}
err = ht16k33_display_on(priv);
if (err)
return err;
return... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c |
static int ht16k33_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_on,
unsigned long *delay_off) {
struct ht16k33_priv *priv = container_of(led_cdev, struct ht16k33_priv, led);
unsigned int delay;
uint8_t blink;
int err;
if (!*delay_on ... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c |
static void ht16k33_fb_queue(struct ht16k33_priv *priv) {
struct ht16k33_fbdev *fbdev = &priv->fbdev;
schedule_delayed_work(&priv->work, HZ / fbdev->refresh_rate);
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c | static int ht16k33_initialize(struct ht16k33_priv *priv) {
uint8_t data[HT16K33_FB_SIZE];
uint8_t byte;
int err;
memset(data, 0, sizeof(data));
err = i2c_smbus_write_block_data(priv->client, 0, sizeof(data), data);
if (err)
return err;
/* Turn on internal oscillator */
byte = REG_SYSTEM_SETUP_OSC_... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c | static int ht16k33_blank(int blank, struct fb_info *info) { return 0; } | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c |
static int ht16k33_mmap(struct fb_info *info, struct vm_area_struct *vma) {
struct ht16k33_priv *priv = info->par;
struct page *pages = virt_to_page(priv->fbdev.buffer);
return vm_map_pages_zero(vma, &pages, 1);
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c |
static int ht16k33_keypad_start(struct input_dev *dev) {
struct ht16k33_keypad *keypad = input_get_drvdata(dev);
keypad->stopped = false;
mb();
enable_irq(keypad->client->irq);
return 0;
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c |
static void ht16k33_seg7_update(struct work_struct *work) {
struct ht16k33_priv *priv =
container_of(work, struct ht16k33_priv, work.work);
struct ht16k33_seg *seg = &priv->seg;
char *s = seg->curr;
uint8_t buf[9];
buf[0] = map_to_seg7(&seg->map.seg7, *s++);
buf[1] = 0;
buf[2] = map_to_seg7(&seg->... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ht16k33.c | static int ht16k33_seg_probe(struct device *dev, struct ht16k33_priv *priv,
uint32_t brightness) {
struct ht16k33_seg *seg = &priv->seg;
int err;
err = ht16k33_brightness_set(priv, brightness);
if (err)
return err;
switch (priv->type) {
case DISP_MATRIX:
err = -EINVAL... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/img-ascii-lcd.c | static void malta_update(struct linedisp *linedisp) {
struct img_ascii_lcd_ctx *ctx =
container_of(linedisp, struct img_ascii_lcd_ctx, linedisp);
unsigned int i;
int err = 0;
for (i = 0; i < linedisp->num_chars; i++) {
err = regmap_write(ctx->regmap, ctx->offset + (i * 8), ctx->curr[i]);
if (err)... | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ks0108.c |
void ks0108_writecontrol(unsigned char byte) {
udelay(ks0108_delay);
parport_write_control(ks0108_parport, byte ^ (bit(0) | bit(1) | bit(3)));
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/ks0108.c |
void ks0108_address(unsigned char address) {
ks0108_writedata(min_t(unsigned char, address, 63) | bit(6));
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/lcd2s.c |
static int lcd2s_print(struct charlcd *lcd, int c) {
struct lcd2s_data *lcd2s = lcd->drvdata;
u8 buf[2] = {LCD2S_CMD_WRITE, c};
lcd2s_i2c_master_send(lcd2s->i2c, buf, sizeof(buf));
return 0;
} | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/line-display.c | static ssize_t message_show(struct device *dev, struct device_attribute *attr,
char *buf) {
struct linedisp *linedisp = container_of(dev, struct linedisp, dev);
return sysfs_emit(buf, "%s\n", linedisp->message);
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/line-display.c |
static ssize_t scroll_step_ms_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count) {
struct linedisp *linedisp = container_of(dev, struct linedisp, dev);
unsigned int ms;
if (kstrtouint(buf, 10, &ms) != 0)... | [
1,
0
] |
Linux Kernel | drivers/auxdisplay/panel.c | static int set_data_bits(void) {
int val;
val = r_dtr(pprt);
lcd_get_bits(LCD_PORT_D, &val);
w_dtr(pprt, val);
return val;
} | [
0,
0
] |
Linux Kernel | drivers/auxdisplay/panel.c | static void lcd_write_data_s(struct hd44780_common *hdc, int data) {
spin_lock_irq(&pprt_lock);
lcd_send_serial(0x5F);
lcd_send_serial(data & 0x0F);
lcd_send_serial((data >> 4) & 0x0F);
udelay(40); /* the shortest data takes at least 40 us */
spin_unlock_irq(&pprt_lock);
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.