Home
last modified time | relevance | path

Searched refs:sl (Results 1 – 25 of 119) sorted by relevance

12345

/drivers/net/slip/
Dslip.c103 static void slip_unesc(struct slip *sl, unsigned char c);
106 static void slip_unesc6(struct slip *sl, unsigned char c);
129 static int sl_alloc_bufs(struct slip *sl, int mtu) in sl_alloc_bufs() argument
170 spin_lock_bh(&sl->lock); in sl_alloc_bufs()
171 if (sl->tty == NULL) { in sl_alloc_bufs()
172 spin_unlock_bh(&sl->lock); in sl_alloc_bufs()
176 sl->mtu = mtu; in sl_alloc_bufs()
177 sl->buffsize = len; in sl_alloc_bufs()
178 sl->rcount = 0; in sl_alloc_bufs()
179 sl->xleft = 0; in sl_alloc_bufs()
[all …]
/drivers/net/wan/
Dx25_asy.c48 static void x25_asy_unesc(struct x25_asy *sl, unsigned char c);
55 struct x25_asy *sl; in x25_asy_alloc() local
68 sl = netdev_priv(dev); in x25_asy_alloc()
70 if (!test_and_set_bit(SLF_INUSE, &sl->flags)) in x25_asy_alloc()
71 return sl; in x25_asy_alloc()
90 sl = netdev_priv(dev); in x25_asy_alloc()
96 set_bit(SLF_INUSE, &sl->flags); in x25_asy_alloc()
98 return sl; in x25_asy_alloc()
109 static void x25_asy_free(struct x25_asy *sl) in x25_asy_free() argument
112 kfree(sl->rbuff); in x25_asy_free()
[all …]
/drivers/net/can/
Dslcan.c142 static void slc_bump(struct slcan *sl) in slc_bump() argument
148 char *cmd = sl->rbuff; in slc_bump()
158 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN]; in slc_bump()
159 sl->rbuff[SLC_CMD_LEN + SLC_SFF_ID_LEN] = 0; in slc_bump()
169 cf.can_dlc = sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN]; in slc_bump()
170 sl->rbuff[SLC_CMD_LEN + SLC_EFF_ID_LEN] = 0; in slc_bump()
178 if (kstrtou32(sl->rbuff + SLC_CMD_LEN, 16, &tmpid)) in slc_bump()
210 skb->dev = sl->dev; in slc_bump()
216 can_skb_prv(skb)->ifindex = sl->dev->ifindex; in slc_bump()
222 sl->dev->stats.rx_packets++; in slc_bump()
[all …]
/drivers/w1/
Dw1.c97 struct w1_slave *sl = dev_to_w1_slave(dev); in w1_slave_release() local
99 dev_dbg(dev, "%s: Releasing %s [%p]\n", __func__, sl->name, sl); in w1_slave_release()
101 w1_family_put(sl->family); in w1_slave_release()
102 sl->master->slave_count--; in w1_slave_release()
107 struct w1_slave *sl = dev_to_w1_slave(dev); in name_show() local
109 return sprintf(buf, "%s\n", sl->name); in name_show()
116 struct w1_slave *sl = dev_to_w1_slave(dev); in id_show() local
117 ssize_t count = sizeof(sl->reg_num); in id_show()
119 memcpy(buf, (u8 *)&sl->reg_num, count); in id_show()
137 struct w1_slave *sl = kobj_to_w1_slave(kobj); in rw_write() local
[all …]
Dw1_netlink.c62 struct w1_slave *sl; member
286 struct w1_slave *sl; in w1_get_slaves() local
294 list_for_each_entry(sl, &dev->slist, w1_slave_entry) { in w1_get_slaves()
295 memcpy(&rn, &sl->reg_num, sizeof(rn)); in w1_get_slaves()
335 struct w1_slave *sl; in w1_process_command_addremove() local
344 sl = w1_slave_search_device(dev, id); in w1_process_command_addremove()
347 if (sl) in w1_process_command_addremove()
353 if (sl) in w1_process_command_addremove()
354 w1_slave_detach(sl); in w1_process_command_addremove()
406 static int w1_process_command_slave(struct w1_slave *sl, in w1_process_command_slave() argument
[all …]
Dw1_io.c401 int w1_reset_select_slave(struct w1_slave *sl) in w1_reset_select_slave() argument
403 if (w1_reset_bus(sl->master)) in w1_reset_select_slave()
406 if (sl->master->slave_count == 1) in w1_reset_select_slave()
407 w1_write_8(sl->master, W1_SKIP_ROM); in w1_reset_select_slave()
410 u64 rn = le64_to_cpu(*((u64*)&sl->reg_num)); in w1_reset_select_slave()
413 w1_write_block(sl->master, match, 9); in w1_reset_select_slave()
/drivers/w1/slaves/
Dw1_ds2408.c46 static int _read_reg(struct w1_slave *sl, u8 address, unsigned char* buf) in _read_reg() argument
49 dev_dbg(&sl->dev, in _read_reg()
51 sl, (unsigned int)address, buf); in _read_reg()
56 mutex_lock(&sl->master->bus_mutex); in _read_reg()
57 dev_dbg(&sl->dev, "mutex locked"); in _read_reg()
59 if (w1_reset_select_slave(sl)) { in _read_reg()
60 mutex_unlock(&sl->master->bus_mutex); in _read_reg()
67 w1_write_block(sl->master, wrbuf, 3); in _read_reg()
68 *buf = w1_read_8(sl->master); in _read_reg()
70 mutex_unlock(&sl->master->bus_mutex); in _read_reg()
[all …]
Dw1_ds28e04.c78 static int w1_f1C_refresh_block(struct w1_slave *sl, struct w1_f1C_data *data, in w1_f1C_refresh_block() argument
87 if (w1_reset_select_slave(sl)) { in w1_f1C_refresh_block()
95 w1_write_block(sl->master, wrbuf, 3); in w1_f1C_refresh_block()
96 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f1C_refresh_block()
105 static int w1_f1C_read(struct w1_slave *sl, int addr, int len, char *data) in w1_f1C_read() argument
110 if (w1_reset_select_slave(sl)) in w1_f1C_read()
117 w1_write_block(sl->master, wrbuf, sizeof(wrbuf)); in w1_f1C_read()
118 return w1_read_block(sl->master, data, len); in w1_f1C_read()
125 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() local
126 struct w1_f1C_data *data = sl->family_data; in eeprom_read()
[all …]
Dw1_ds2433.c68 static int w1_f23_refresh_block(struct w1_slave *sl, struct w1_f23_data *data, in w1_f23_refresh_block() argument
77 if (w1_reset_select_slave(sl)) { in w1_f23_refresh_block()
85 w1_write_block(sl->master, wrbuf, 3); in w1_f23_refresh_block()
86 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f23_refresh_block()
100 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() local
102 struct w1_f23_data *data = sl->family_data; in eeprom_read()
111 mutex_lock(&sl->master->bus_mutex); in eeprom_read()
118 if (w1_f23_refresh_block(sl, data, i)) { in eeprom_read()
128 if (w1_reset_select_slave(sl)) { in eeprom_read()
136 w1_write_block(sl->master, wrbuf, 3); in eeprom_read()
[all …]
Dw1_therm.c71 static int w1_therm_add_slave(struct w1_slave *sl) in w1_therm_add_slave() argument
73 sl->family_data = kzalloc(sizeof(struct w1_therm_family_data), in w1_therm_add_slave()
75 if (!sl->family_data) in w1_therm_add_slave()
77 atomic_set(THERM_REFCNT(sl->family_data), 1); in w1_therm_add_slave()
81 static void w1_therm_remove_slave(struct w1_slave *sl) in w1_therm_remove_slave() argument
83 int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data)); in w1_therm_remove_slave()
87 refcnt = atomic_read(THERM_REFCNT(sl->family_data)); in w1_therm_remove_slave()
89 kfree(sl->family_data); in w1_therm_remove_slave()
90 sl->family_data = NULL; in w1_therm_remove_slave()
210 struct w1_slave *sl = dev_to_w1_slave(device); in w1_therm_eeprom() local
[all …]
Dw1_ds2413.c37 struct w1_slave *sl = kobj_to_w1_slave(kobj); in state_read() local
38 dev_dbg(&sl->dev, in state_read()
47 mutex_lock(&sl->master->bus_mutex); in state_read()
48 dev_dbg(&sl->dev, "mutex locked"); in state_read()
50 if (w1_reset_select_slave(sl)) { in state_read()
51 mutex_unlock(&sl->master->bus_mutex); in state_read()
55 w1_write_8(sl->master, W1_F3A_FUNC_PIO_ACCESS_READ); in state_read()
56 *buf = w1_read_8(sl->master); in state_read()
58 mutex_unlock(&sl->master->bus_mutex); in state_read()
59 dev_dbg(&sl->dev, "mutex unlocked"); in state_read()
[all …]
Dw1_ds2431.c66 static int w1_f2d_readblock(struct w1_slave *sl, int off, int count, char *buf) in w1_f2d_readblock() argument
77 if (w1_reset_select_slave(sl)) in w1_f2d_readblock()
80 w1_write_block(sl->master, wrbuf, 3); in w1_f2d_readblock()
81 w1_read_block(sl->master, buf, count); in w1_f2d_readblock()
83 if (w1_reset_select_slave(sl)) in w1_f2d_readblock()
86 w1_write_block(sl->master, wrbuf, 3); in w1_f2d_readblock()
87 w1_read_block(sl->master, cmp, count); in w1_f2d_readblock()
93 dev_err(&sl->dev, "proof reading failed %d times\n", in w1_f2d_readblock()
103 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() local
110 mutex_lock(&sl->master->bus_mutex); in eeprom_read()
[all …]
Dw1_ds2781.c29 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2781_do_io() local
36 if (w1_reset_select_slave(sl) == 0) { in w1_ds2781_do_io()
38 w1_write_8(sl->master, W1_DS2781_WRITE_DATA); in w1_ds2781_do_io()
39 w1_write_8(sl->master, addr); in w1_ds2781_do_io()
40 w1_write_block(sl->master, buf, count); in w1_ds2781_do_io()
42 w1_write_8(sl->master, W1_DS2781_READ_DATA); in w1_ds2781_do_io()
43 w1_write_8(sl->master, addr); in w1_ds2781_do_io()
44 count = w1_read_block(sl->master, buf, count); in w1_ds2781_do_io()
54 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2781_io() local
60 mutex_lock(&sl->master->bus_mutex); in w1_ds2781_io()
[all …]
Dw1_ds2780.c32 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2780_do_io() local
39 if (w1_reset_select_slave(sl) == 0) { in w1_ds2780_do_io()
41 w1_write_8(sl->master, W1_DS2780_WRITE_DATA); in w1_ds2780_do_io()
42 w1_write_8(sl->master, addr); in w1_ds2780_do_io()
43 w1_write_block(sl->master, buf, count); in w1_ds2780_do_io()
45 w1_write_8(sl->master, W1_DS2780_READ_DATA); in w1_ds2780_do_io()
46 w1_write_8(sl->master, addr); in w1_ds2780_do_io()
47 count = w1_read_block(sl->master, buf, count); in w1_ds2780_do_io()
57 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2780_io() local
63 mutex_lock(&sl->master->bus_mutex); in w1_ds2780_io()
[all …]
Dw1_ds2406.c37 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f12_read_state() local
47 mutex_lock(&sl->master->bus_mutex); in w1_f12_read_state()
49 if (w1_reset_select_slave(sl)) { in w1_f12_read_state()
50 mutex_unlock(&sl->master->bus_mutex); in w1_f12_read_state()
54 w1_write_block(sl->master, w1_buf, 3); in w1_f12_read_state()
55 w1_read_block(sl->master, w1_buf+3, 3); in w1_f12_read_state()
63 mutex_unlock(&sl->master->bus_mutex); in w1_f12_read_state()
73 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f12_write_output() local
82 mutex_lock(&sl->master->bus_mutex); in w1_f12_write_output()
84 if (w1_reset_select_slave(sl)) { in w1_f12_write_output()
[all …]
Dw1_ds2760.c29 struct w1_slave *sl = container_of(dev, struct w1_slave, dev); in w1_ds2760_io() local
34 mutex_lock(&sl->master->bus_mutex); in w1_ds2760_io()
43 if (!w1_reset_select_slave(sl)) { in w1_ds2760_io()
45 w1_write_8(sl->master, W1_DS2760_READ_DATA); in w1_ds2760_io()
46 w1_write_8(sl->master, addr); in w1_ds2760_io()
47 count = w1_read_block(sl->master, buf, count); in w1_ds2760_io()
49 w1_write_8(sl->master, W1_DS2760_WRITE_DATA); in w1_ds2760_io()
50 w1_write_8(sl->master, addr); in w1_ds2760_io()
51 w1_write_block(sl->master, buf, count); in w1_ds2760_io()
57 mutex_unlock(&sl->master->bus_mutex); in w1_ds2760_io()
[all …]
Dw1_bq27000.c32 struct w1_slave *sl = container_of(dev->parent, struct w1_slave, dev); in w1_bq27000_read() local
34 mutex_lock(&sl->master->bus_mutex); in w1_bq27000_read()
35 w1_write_8(sl->master, HDQ_CMD_READ | reg); in w1_bq27000_read()
36 val = w1_read_8(sl->master); in w1_bq27000_read()
37 mutex_unlock(&sl->master->bus_mutex); in w1_bq27000_read()
48 static int w1_bq27000_add_slave(struct w1_slave *sl) in w1_bq27000_add_slave() argument
63 pdev->dev.parent = &sl->dev; in w1_bq27000_add_slave()
69 dev_set_drvdata(&sl->dev, pdev); in w1_bq27000_add_slave()
79 static void w1_bq27000_remove_slave(struct w1_slave *sl) in w1_bq27000_remove_slave() argument
81 struct platform_device *pdev = dev_get_drvdata(&sl->dev); in w1_bq27000_remove_slave()
Dw1_ds2423.c46 struct w1_slave *sl = dev_to_w1_slave(device); in w1_slave_show() local
47 struct w1_master *dev = sl->master; in w1_slave_show()
64 if (!w1_reset_select_slave(sl)) { in w1_slave_show()
/drivers/staging/lustre/lnet/libcfs/linux/
Dlinux-crypto.c150 struct scatterlist sl; in cfs_crypto_hash_digest() local
168 sg_init_one(&sl, buf, buf_len); in cfs_crypto_hash_digest()
170 ahash_request_set_crypt(req, &sl, hash, sl.length); in cfs_crypto_hash_digest()
228 struct scatterlist sl; in cfs_crypto_hash_update_page() local
230 sg_init_table(&sl, 1); in cfs_crypto_hash_update_page()
231 sg_set_page(&sl, page, len, offset & ~PAGE_MASK); in cfs_crypto_hash_update_page()
233 ahash_request_set_crypt(req, &sl, NULL, sl.length); in cfs_crypto_hash_update_page()
252 struct scatterlist sl; in cfs_crypto_hash_update() local
254 sg_init_one(&sl, buf, buf_len); in cfs_crypto_hash_update()
256 ahash_request_set_crypt(req, &sl, NULL, sl.length); in cfs_crypto_hash_update()
/drivers/of/
Ddevice.c237 int seen = 0, cplen, sl; in of_device_uevent() local
253 sl = strlen(compat) + 1; in of_device_uevent()
254 compat += sl; in of_device_uevent()
255 cplen -= sl; in of_device_uevent()
274 int sl; in of_device_uevent_modalias() local
283 sl = of_device_get_modalias(dev, &env->buf[env->buflen-1], in of_device_uevent_modalias()
285 if (sl >= (sizeof(env->buf) - env->buflen)) in of_device_uevent_modalias()
287 env->buflen += sl; in of_device_uevent_modalias()
/drivers/infiniband/core/
Duverbs_marshall.c46 dst->sl = src->sl; in ib_copy_ah_attr_to_user()
109 dst->sl = src->sl; in ib_copy_path_rec_to_user()
135 dst->sl = src->sl; in ib_copy_path_rec_from_user()
/drivers/pci/hotplug/
Dibmphp_core.c42 #define attn_on(sl) ibmphp_hpc_writeslot(sl, HPC_SLOT_ATTNON) argument
43 #define attn_off(sl) ibmphp_hpc_writeslot(sl, HPC_SLOT_ATTNOFF) argument
44 #define attn_LED_blink(sl) ibmphp_hpc_writeslot(sl, HPC_SLOT_BLINKLED) argument
45 #define get_ctrl_revision(sl, rev) ibmphp_hpc_readslot(sl, READ_REVLEVEL, rev) argument
46 #define get_hpc_options(sl, opt) ibmphp_hpc_readslot(sl, READ_HPCOPTIONS, opt) argument
75 static inline int get_cur_bus_info(struct slot **sl) in get_cur_bus_info() argument
78 struct slot *slot_cur = *sl; in get_cur_bus_info()
101 *sl = slot_cur; in get_cur_bus_info()
105 static inline int slot_update(struct slot **sl) in slot_update() argument
108 rc = ibmphp_hpc_readslot(*sl, READ_ALLSTAT, NULL); in slot_update()
[all …]
/drivers/infiniband/hw/hfi1/
Dud.c106 u8 sc5 = ibp->sl_to_sc[ah_attr->sl]; in ud_loopback()
114 ah_attr->sl, in ud_loopback()
137 ah_attr->sl, in ud_loopback()
250 wc.sl = ah_attr->sl; in ud_loopback()
391 sc5 = ibp->sl_to_sc[ah_attr->sl]; in hfi1_make_ud_req()
392 lrh0 |= (ah_attr->sl & 0xf) << 4; in hfi1_make_ud_req()
512 u8 sl = ibp->sc_to_sl[sc5]; in return_cnp() local
535 lrh0 |= (sc5 & 0xf) << 12 | sl << 4; in return_cnp()
685 u8 sl_from_sc, sl; in hfi1_ud_rcv() local
695 sl = (be16_to_cpu(hdr->lrh[0]) >> 4) & 0xf; in hfi1_ud_rcv()
[all …]
/drivers/scsi/
Deata.c2106 unsigned long sl[n_ready], pl[n_ready], ll[n_ready]; in reorder() local
2138 sl[n] = blk_rq_pos(SCpnt->request); in reorder()
2144 if (sl[n] < sl[n - 1]) in reorder()
2146 if (sl[n] > sl[n - 1]) in reorder()
2150 if (sl[n] > sl[n - 1]) in reorder()
2151 seek += sl[n] - sl[n - 1]; in reorder()
2153 seek += sl[n - 1] - sl[n]; in reorder()
2159 if (cursec > sl[0]) in reorder()
2160 seek += cursec - sl[0]; in reorder()
2162 seek += sl[0] - cursec; in reorder()
[all …]
/drivers/infiniband/hw/mlx4/
Dah.c50 ah->av.ib.sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28); in create_ib_ah()
103 vlan_tag |= (ah_attr->sl & 7) << 13; in create_iboe_ah()
127 ah->av.eth.sl_tclass_flowlabel |= cpu_to_be32(ah_attr->sl << 29); in create_iboe_ah()
173 ah_attr->sl = be32_to_cpu(ah->av.eth.sl_tclass_flowlabel) >> 29; in mlx4_ib_query_ah()
175 ah_attr->sl = be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 28; in mlx4_ib_query_ah()

12345