Lines Matching refs:len

95 pci_read_data(struct pci_dev *d, void *buf, int pos, int len)  in pci_read_data()  argument
97 if (pos & (len-1)) in pci_read_data()
98 d->access->error("Unaligned read: pos=%02x, len=%d", pos, len); in pci_read_data()
99 if (pos + len <= d->cache_len) in pci_read_data()
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()
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
144 if (pos & (len-1)) in pci_write_data()
145 d->access->error("Unaligned write: pos=%02x,len=%d", pos, len); in pci_write_data()
146 if (pos + len <= d->cache_len) in pci_write_data()
147 memcpy(d->cache + pos, buf, len); in pci_write_data()
148 return d->methods->write(d, pos, buf, len); in pci_write_data()
172 pci_write_block(struct pci_dev *d, int pos, byte *buf, int len) in pci_write_block() argument
176 int l = (pos + len >= d->cache_len) ? (d->cache_len - pos) : len; in pci_write_block()
179 return d->methods->write(d, pos, buf, len); in pci_write_block()
227 pci_setup_cache(struct pci_dev *d, byte *cache, int len) in pci_setup_cache() argument
230 d->cache_len = len; in pci_setup_cache()