Home
last modified time | relevance | path

Searched refs:off (Results 1 – 25 of 418) sorted by relevance

12345678910>>...17

/drivers/rapidio/
Drio-sysfs.c106 char *buf, loff_t off, size_t count) in rio_read_config() argument
111 loff_t init_off = off; in rio_read_config()
118 if (off >= size) in rio_read_config()
120 if (off + count > size) { in rio_read_config()
121 size -= off; in rio_read_config()
127 if ((off & 1) && size) { in rio_read_config()
129 rio_read_config_8(dev, off, &val); in rio_read_config()
130 data[off - init_off] = val; in rio_read_config()
131 off++; in rio_read_config()
135 if ((off & 3) && size > 2) { in rio_read_config()
[all …]
/drivers/target/
Dtarget_core_fabric_lib.c160 u32 off = 8; in fc_get_pr_transport_id() local
178 ret = hex2bin(&buf[off++], &ptr[i], 1); in fc_get_pr_transport_id()
229 u32 off = 4, padding = 0; in iscsi_get_pr_transport_id() local
248 len = sprintf(&buf[off], "%s", se_nacl->initiatorname); in iscsi_get_pr_transport_id()
281 buf[off+len] = 0x2c; off++; /* ASCII Character: "," */ in iscsi_get_pr_transport_id()
282 buf[off+len] = 0x69; off++; /* ASCII Character: "i" */ in iscsi_get_pr_transport_id()
283 buf[off+len] = 0x2c; off++; /* ASCII Character: "," */ in iscsi_get_pr_transport_id()
284 buf[off+len] = 0x30; off++; /* ASCII Character: "0" */ in iscsi_get_pr_transport_id()
285 buf[off+len] = 0x78; off++; /* ASCII Character: "x" */ in iscsi_get_pr_transport_id()
287 buf[off+len] = pr_reg->pr_reg_isid[0]; off++; in iscsi_get_pr_transport_id()
[all …]
Dtarget_core_spc.c176 u32 unit_serial_len, off = 0; in spc_emulate_evpd_83() local
179 off = 4; in spc_emulate_evpd_83()
193 buf[off++] = 0x1; in spc_emulate_evpd_83()
196 buf[off] = 0x00; in spc_emulate_evpd_83()
199 buf[off++] |= 0x3; in spc_emulate_evpd_83()
200 off++; in spc_emulate_evpd_83()
203 buf[off++] = 0x10; in spc_emulate_evpd_83()
208 buf[off++] = (0x6 << 4); in spc_emulate_evpd_83()
213 buf[off++] = 0x01; in spc_emulate_evpd_83()
214 buf[off++] = 0x40; in spc_emulate_evpd_83()
[all …]
/drivers/isdn/hardware/mISDN/
Diohelper.h39 static u8 Read##name##_IO(void *p, u8 off) { \
41 return inb(hw->ap.port + off); \
43 static void Write##name##_IO(void *p, u8 off, u8 val) { \
45 outb(val, hw->ap.port + off); \
47 static void ReadFiFo##name##_IO(void *p, u8 off, u8 *dp, int size) { \
49 insb(hw->ap.port + off, dp, size); \
51 static void WriteFiFo##name##_IO(void *p, u8 off, u8 *dp, int size) { \
53 outsb(hw->ap.port + off, dp, size); \
57 static u8 Read##name##_IND(void *p, u8 off) { \
59 outb(off, hw->ap.ale); \
[all …]
/drivers/acpi/
Dec_sys.c31 size_t count, loff_t *off) in acpi_ec_read_io() argument
38 loff_t init_off = *off; in acpi_ec_read_io()
41 if (*off >= size) in acpi_ec_read_io()
43 if (*off + count >= size) { in acpi_ec_read_io()
44 size -= *off; in acpi_ec_read_io()
50 err = ec_read(*off, &data[*off - init_off]); in acpi_ec_read_io()
53 *off += 1; in acpi_ec_read_io()
60 size_t count, loff_t *off) in acpi_ec_write_io() argument
67 loff_t init_off = *off; in acpi_ec_write_io()
71 if (*off >= EC_SPACE_SIZE) in acpi_ec_write_io()
[all …]
/drivers/w1/slaves/
Dw1_ds2433.c55 static inline size_t w1_f23_fix_count(loff_t off, size_t count, size_t size) in w1_f23_fix_count() argument
57 if (off > size) in w1_f23_fix_count()
60 if ((off + count) > size) in w1_f23_fix_count()
61 return (size - off); in w1_f23_fix_count()
71 int off = block * W1_PAGE_SIZE; in w1_f23_refresh_block() local
82 wrbuf[1] = off & 0xff; in w1_f23_refresh_block()
83 wrbuf[2] = off >> 8; in w1_f23_refresh_block()
85 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f23_refresh_block()
88 if (crc16(CRC16_INIT, &data->memory[off], W1_PAGE_SIZE) == CRC16_VALID) in w1_f23_refresh_block()
97 char *buf, loff_t off, size_t count) in w1_f23_read_bin() argument
[all …]
Dw1_ds28e04.c66 static inline size_t w1_f1C_fix_count(loff_t off, size_t count, size_t size) in w1_f1C_fix_count() argument
68 if (off > size) in w1_f1C_fix_count()
71 if ((off + count) > size) in w1_f1C_fix_count()
72 return size - off; in w1_f1C_fix_count()
81 int off = block * W1_PAGE_SIZE; in w1_f1C_refresh_block() local
92 wrbuf[1] = off & 0xff; in w1_f1C_refresh_block()
93 wrbuf[2] = off >> 8; in w1_f1C_refresh_block()
95 w1_read_block(sl->master, &data->memory[off], W1_PAGE_SIZE); in w1_f1C_refresh_block()
98 if (crc16(CRC16_INIT, &data->memory[off], W1_PAGE_SIZE) == CRC16_VALID) in w1_f1C_refresh_block()
122 char *buf, loff_t off, size_t count) in w1_f1C_read_bin() argument
[all …]
Dw1_ds2408.c77 char *buf, loff_t off, size_t count) in w1_f29_read_state() argument
81 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in w1_f29_read_state()
82 if (count != 1 || off != 0) in w1_f29_read_state()
90 char *buf, loff_t off, size_t count) in w1_f29_read_output() argument
94 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in w1_f29_read_output()
95 if (count != 1 || off != 0) in w1_f29_read_output()
104 char *buf, loff_t off, size_t count) in w1_f29_read_activity() argument
108 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in w1_f29_read_activity()
109 if (count != 1 || off != 0) in w1_f29_read_activity()
118 char *buf, loff_t off, size_t count) in w1_f29_read_cond_search_mask() argument
[all …]
Dw1_ds2431.c48 static inline size_t w1_f2d_fix_count(loff_t off, size_t count, size_t size) in w1_f2d_fix_count() argument
50 if (off > size) in w1_f2d_fix_count()
53 if ((off + count) > size) in w1_f2d_fix_count()
54 return size - off; in w1_f2d_fix_count()
66 static int w1_f2d_readblock(struct w1_slave *sl, int off, int count, char *buf) in w1_f2d_readblock() argument
74 wrbuf[1] = off & 0xff; in w1_f2d_readblock()
75 wrbuf[2] = off >> 8; in w1_f2d_readblock()
101 char *buf, loff_t off, size_t count) in w1_f2d_read_bin() argument
106 count = w1_f2d_fix_count(off, count, W1_F2D_EEPROM_SIZE); in w1_f2d_read_bin()
121 if (w1_f2d_readblock(sl, off, block_read, buf) < 0) in w1_f2d_read_bin()
[all …]
/drivers/pci/
Dpci-sysfs.c540 char *buf, loff_t off, size_t count) in pci_read_config() argument
544 loff_t init_off = off; in pci_read_config()
554 if (off > size) in pci_read_config()
556 if (off + count > size) { in pci_read_config()
557 size -= off; in pci_read_config()
565 if ((off & 1) && size) { in pci_read_config()
567 pci_user_read_config_byte(dev, off, &val); in pci_read_config()
568 data[off - init_off] = val; in pci_read_config()
569 off++; in pci_read_config()
573 if ((off & 3) && size > 2) { in pci_read_config()
[all …]
/drivers/vfio/pci/
Dvfio_pci_rdwr.c31 loff_t off, size_t count, size_t x_start, in do_io_rw() argument
39 if (off < x_start) in do_io_rw()
40 fillable = min(count, (size_t)(x_start - off)); in do_io_rw()
41 else if (off >= x_end) in do_io_rw()
46 if (fillable >= 4 && !(off % 4)) { in do_io_rw()
53 iowrite32(le32_to_cpu(val), io + off); in do_io_rw()
55 val = cpu_to_le32(ioread32(io + off)); in do_io_rw()
62 } else if (fillable >= 2 && !(off % 2)) { in do_io_rw()
69 iowrite16(le16_to_cpu(val), io + off); in do_io_rw()
71 val = cpu_to_le16(ioread16(io + off)); in do_io_rw()
[all …]
/drivers/gpio/
Dgpio-adp5520.c25 static int adp5520_gpio_get_value(struct gpio_chip *chip, unsigned off) in adp5520_gpio_get_value() argument
37 if (test_bit(off, &dev->output)) in adp5520_gpio_get_value()
42 return !!(reg_val & dev->lut[off]); in adp5520_gpio_get_value()
46 unsigned off, int val) in adp5520_gpio_set_value() argument
52 adp5520_set_bits(dev->master, ADP5520_GPIO_OUT, dev->lut[off]); in adp5520_gpio_set_value()
54 adp5520_clr_bits(dev->master, ADP5520_GPIO_OUT, dev->lut[off]); in adp5520_gpio_set_value()
57 static int adp5520_gpio_direction_input(struct gpio_chip *chip, unsigned off) in adp5520_gpio_direction_input() argument
62 clear_bit(off, &dev->output); in adp5520_gpio_direction_input()
65 dev->lut[off]); in adp5520_gpio_direction_input()
69 unsigned off, int val) in adp5520_gpio_direction_output() argument
[all …]
Dgpio-pca953x.c102 int off) in pca953x_read_single() argument
106 int offset = off / BANK_SZ; in pca953x_read_single()
121 int off) in pca953x_write_single() argument
125 int offset = off / BANK_SZ; in pca953x_write_single()
201 static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off) in pca953x_gpio_direction_input() argument
210 reg_val = chip->reg_direction[off / BANK_SZ] | (1u << (off % BANK_SZ)); in pca953x_gpio_direction_input()
220 ret = pca953x_write_single(chip, offset, reg_val, off); in pca953x_gpio_direction_input()
224 chip->reg_direction[off / BANK_SZ] = reg_val; in pca953x_gpio_direction_input()
232 unsigned off, int val) in pca953x_gpio_direction_output() argument
243 reg_val = chip->reg_output[off / BANK_SZ] in pca953x_gpio_direction_output()
[all …]
Dgpio-ucb1400.c15 static int ucb1400_gpio_dir_in(struct gpio_chip *gc, unsigned off) in ucb1400_gpio_dir_in() argument
19 ucb1400_gpio_set_direction(gpio->ac97, off, 0); in ucb1400_gpio_dir_in()
23 static int ucb1400_gpio_dir_out(struct gpio_chip *gc, unsigned off, int val) in ucb1400_gpio_dir_out() argument
27 ucb1400_gpio_set_direction(gpio->ac97, off, 1); in ucb1400_gpio_dir_out()
28 ucb1400_gpio_set_value(gpio->ac97, off, val); in ucb1400_gpio_dir_out()
32 static int ucb1400_gpio_get(struct gpio_chip *gc, unsigned off) in ucb1400_gpio_get() argument
36 return ucb1400_gpio_get_value(gpio->ac97, off); in ucb1400_gpio_get()
39 static void ucb1400_gpio_set(struct gpio_chip *gc, unsigned off, int val) in ucb1400_gpio_set() argument
43 ucb1400_gpio_set_value(gpio->ac97, off, val); in ucb1400_gpio_set()
/drivers/infiniband/hw/ipath/
Dipath_keys.c127 size_t off; in ipath_lkey_ok() local
156 off = sge->addr - mr->user_base; in ipath_lkey_ok()
158 off + sge->length > mr->length || in ipath_lkey_ok()
164 off += mr->offset; in ipath_lkey_ok()
167 while (off >= mr->map[m]->segs[n].length) { in ipath_lkey_ok()
168 off -= mr->map[m]->segs[n].length; in ipath_lkey_ok()
176 isge->vaddr = mr->map[m]->segs[n].vaddr + off; in ipath_lkey_ok()
177 isge->length = mr->map[m]->segs[n].length - off; in ipath_lkey_ok()
207 size_t off; in ipath_rkey_ok() local
239 off = vaddr - mr->iova; in ipath_rkey_ok()
[all …]
/drivers/net/ethernet/qlogic/netxen/
Dnetxen_nic_hw.c39 #define CRB_BLK(off) ((off >> 20) & 0x3f) argument
40 #define CRB_SUBBLK(off) ((off >> 16) & 0xf) argument
42 #define CRB_HI(off) ((crb_hub_agt[CRB_BLK(off)] << 20) | ((off) & 0xf0000)) argument
64 #define PCI_OFFSET_FIRST_RANGE(adapter, off) \ argument
65 ((adapter)->ahw.pci_base0 + (off))
66 #define PCI_OFFSET_SECOND_RANGE(adapter, off) \ argument
67 ((adapter)->ahw.pci_base1 + (off) - SECOND_PAGE_GROUP_START)
68 #define PCI_OFFSET_THIRD_RANGE(adapter, off) \ argument
69 ((adapter)->ahw.pci_base2 + (off) - THIRD_PAGE_GROUP_START)
72 unsigned long off) in pci_base_offset() argument
[all …]
/drivers/gpu/drm/nouveau/core/subdev/devinit/
Dfbmem.h76 fbmem_peek(struct io_mapping *fb, u32 off) in fbmem_peek() argument
78 u8 __iomem *p = io_mapping_map_atomic_wc(fb, off & PAGE_MASK); in fbmem_peek()
79 u32 val = ioread32(p + (off & ~PAGE_MASK)); in fbmem_peek()
85 fbmem_poke(struct io_mapping *fb, u32 off, u32 val) in fbmem_poke() argument
87 u8 __iomem *p = io_mapping_map_atomic_wc(fb, off & PAGE_MASK); in fbmem_poke()
88 iowrite32(val, p + (off & ~PAGE_MASK)); in fbmem_poke()
94 fbmem_readback(struct io_mapping *fb, u32 off, u32 val) in fbmem_readback() argument
96 fbmem_poke(fb, off, val); in fbmem_readback()
97 return val == fbmem_peek(fb, off); in fbmem_readback()
/drivers/net/ethernet/qlogic/qlcnic/
Dqlcnic_hw.c20 #define CRB_BLK(off) ((off >> 20) & 0x3f) argument
21 #define CRB_SUBBLK(off) ((off >> 16) & 0xf) argument
23 #define CRB_HI(off) ((crb_hub_agt[CRB_BLK(off)] << 20) | ((off) & 0xf0000)) argument
33 u64 off; member
1068 ulong off, void __iomem **addr) in qlcnic_pci_get_crb_addr_2M() argument
1072 if ((off >= QLCNIC_CRB_MAX) || (off < QLCNIC_PCI_CRBSPACE)) in qlcnic_pci_get_crb_addr_2M()
1075 off -= QLCNIC_PCI_CRBSPACE; in qlcnic_pci_get_crb_addr_2M()
1080 m = &crb_128M_2M_map[CRB_BLK(off)].sub_block[CRB_SUBBLK(off)]; in qlcnic_pci_get_crb_addr_2M()
1082 if (m->valid && (m->start_128M <= off) && (m->end_128M > off)) { in qlcnic_pci_get_crb_addr_2M()
1084 (off - m->start_128M); in qlcnic_pci_get_crb_addr_2M()
[all …]
/drivers/hid/
Dhid-picolcd_debugfs.c83 size_t s, loff_t *off) in picolcd_debug_eeprom_read() argument
92 if (*off > 0x0ff) in picolcd_debug_eeprom_read()
96 raw_data[0] = *off & 0xff; in picolcd_debug_eeprom_read()
97 raw_data[1] = (*off >> 8) & 0xff; in picolcd_debug_eeprom_read()
99 if (*off + raw_data[2] > 0xff) in picolcd_debug_eeprom_read()
100 raw_data[2] = 0x100 - *off; in picolcd_debug_eeprom_read()
114 *off += ret; in picolcd_debug_eeprom_read()
122 size_t s, loff_t *off) in picolcd_debug_eeprom_write() argument
131 if (*off > 0x0ff) in picolcd_debug_eeprom_write()
135 raw_data[0] = *off & 0xff; in picolcd_debug_eeprom_write()
[all …]
/drivers/infiniband/hw/qib/
Dqib_keys.c156 size_t off; in qib_lkey_ok() local
188 off = sge->addr - mr->user_base; in qib_lkey_ok()
190 off + sge->length > mr->length || in qib_lkey_ok()
197 off += mr->offset; in qib_lkey_ok()
206 entries_spanned_by_off = off >> mr->page_shift; in qib_lkey_ok()
207 off -= (entries_spanned_by_off << mr->page_shift); in qib_lkey_ok()
213 while (off >= mr->map[m]->segs[n].length) { in qib_lkey_ok()
214 off -= mr->map[m]->segs[n].length; in qib_lkey_ok()
223 isge->vaddr = mr->map[m]->segs[n].vaddr + off; in qib_lkey_ok()
224 isge->length = mr->map[m]->segs[n].length - off; in qib_lkey_ok()
[all …]
/drivers/dma/
Dpl330.c277 #define PL330_DBGCMD_DUMP(off, x...) do { \ argument
280 cmd_line += off; \
284 #define PL330_DBGCMD_DUMP(off, x...) do {} while (0) argument
653 static inline u32 get_id(struct pl330_info *pi, u32 off) in get_id() argument
658 id |= (readb(regs + off + 0x0) << 0); in get_id()
659 id |= (readb(regs + off + 0x4) << 8); in get_id()
660 id |= (readb(regs + off + 0x8) << 16); in get_id()
661 id |= (readb(regs + off + 0xc) << 24); in get_id()
1256 int off = 0; in _ldst_memtomem() local
1262 off += _emit_LD(dry_run, &buf[off], ALWAYS); in _ldst_memtomem()
[all …]
/drivers/misc/
Dlkdtm.c438 const char __user *user_buf, size_t count, loff_t *off) in do_register_entry() argument
467 *off += count; in do_register_entry()
474 size_t count, loff_t *off) in lkdtm_debugfs_read() argument
488 out = simple_read_from_buffer(user_buf, count, off, in lkdtm_debugfs_read()
502 size_t count, loff_t *off) in int_hardware_entry() argument
504 return do_register_entry(CN_INT_HARDWARE_ENTRY, f, buf, count, off); in int_hardware_entry()
508 size_t count, loff_t *off) in int_hw_irq_en() argument
510 return do_register_entry(CN_INT_HW_IRQ_EN, f, buf, count, off); in int_hw_irq_en()
514 size_t count, loff_t *off) in int_tasklet_entry() argument
516 return do_register_entry(CN_INT_TASKLET_ENTRY, f, buf, count, off); in int_tasklet_entry()
[all …]
Dds1682.c145 char *buf, loff_t off, size_t count) in ds1682_eeprom_read() argument
151 buf, off, count); in ds1682_eeprom_read()
153 if (off >= DS1682_EEPROM_SIZE) in ds1682_eeprom_read()
156 if (off + count > DS1682_EEPROM_SIZE) in ds1682_eeprom_read()
157 count = DS1682_EEPROM_SIZE - off; in ds1682_eeprom_read()
159 rc = i2c_smbus_read_i2c_block_data(client, DS1682_REG_EEPROM + off, in ds1682_eeprom_read()
169 char *buf, loff_t off, size_t count) in ds1682_eeprom_write() argument
174 buf, off, count); in ds1682_eeprom_write()
176 if (off >= DS1682_EEPROM_SIZE) in ds1682_eeprom_write()
179 if (off + count > DS1682_EEPROM_SIZE) in ds1682_eeprom_write()
[all …]
/drivers/mtd/
Dafs.c71 u_int off, u_int mask) in afs_read_footer() argument
74 u_int ptr = off + mtd->erasesize - sizeof(fs); in afs_read_footer()
122 if (*img_start > off) in afs_read_footer()
169 u_int mask, off, idx, sz; in parse_afs_partitions() local
184 for (idx = off = sz = 0; off < mtd->size; off += mtd->erasesize) { in parse_afs_partitions()
188 ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); in parse_afs_partitions()
217 for (idx = off = 0; off < mtd->size; off += mtd->erasesize) { in parse_afs_partitions()
222 ret = afs_read_footer(mtd, &img_ptr, &iis_ptr, off, mask); in parse_afs_partitions()
/drivers/misc/eeprom/
Deeprom.c86 char *buf, loff_t off, size_t count) in eeprom_read() argument
92 if (off > EEPROM_SIZE) in eeprom_read()
94 if (off + count > EEPROM_SIZE) in eeprom_read()
95 count = EEPROM_SIZE - off; in eeprom_read()
98 for (slice = off >> 5; slice <= (off + count - 1) >> 5; slice++) in eeprom_read()
109 if ((off + i <= 0x1f) || in eeprom_read()
110 (off + i >= 0xc0 && off + i <= 0xdf)) in eeprom_read()
113 buf[i] = data->data[off + i]; in eeprom_read()
116 memcpy(buf, &data->data[off], count); in eeprom_read()

12345678910>>...17