Lines Matching refs:buf
95 pci_read_data(struct pci_dev *d, void *buf, int pos, int len) in pci_read_data() argument
100 memcpy(buf, d->cache + pos, len); in pci_read_data()
101 else if (!d->methods->read(d, pos, buf, len)) in pci_read_data()
102 memset(buf, 0xff, len); in pci_read_data()
108 byte buf; in pci_read_byte() local
109 pci_read_data(d, &buf, pos, 1); in pci_read_byte()
110 return buf; in pci_read_byte()
116 word buf; in pci_read_word() local
117 pci_read_data(d, &buf, pos, 2); in pci_read_word()
118 return le16_to_cpu(buf); in pci_read_word()
124 u32 buf; in pci_read_long() local
125 pci_read_data(d, &buf, pos, 4); in pci_read_long()
126 return le32_to_cpu(buf); in pci_read_long()
130 pci_read_block(struct pci_dev *d, int pos, byte *buf, int len) in pci_read_block() argument
132 return d->methods->read(d, pos, buf, len); in pci_read_block()
136 pci_read_vpd(struct pci_dev *d, int pos, byte *buf, int len) in pci_read_vpd() argument
138 return d->methods->read_vpd ? d->methods->read_vpd(d, pos, buf, len) : 0; in pci_read_vpd()
142 pci_write_data(struct pci_dev *d, void *buf, int pos, int len) in pci_write_data() argument
147 memcpy(d->cache + pos, buf, len); in pci_write_data()
148 return d->methods->write(d, pos, buf, len); in pci_write_data()
160 word buf = cpu_to_le16(data); in pci_write_word() local
161 return pci_write_data(d, &buf, pos, 2); in pci_write_word()
167 u32 buf = cpu_to_le32(data); in pci_write_long() local
168 return pci_write_data(d, &buf, pos, 4); in pci_write_long()
172 pci_write_block(struct pci_dev *d, int pos, byte *buf, int len) in pci_write_block() argument
177 memcpy(d->cache + pos, buf, l); in pci_write_block()
179 return d->methods->write(d, pos, buf, len); in pci_write_block()