17 #include <linux/pci.h>
25 size_t count, loff_t *ppos,
bool iswrite)
46 vdev->
barmap[bar] = pci_iomap(pdev, bar, 0);
59 if (count >= 3 && !(pos % 4)) {
76 }
else if ((pos % 2) == 0 && count >= 2) {
128 size_t count, loff_t *ppos,
bool iswrite)
136 size_t x_start = 0, x_end = 0;
149 if (pos + count > end)
164 vdev->
barmap[bar] = pci_iomap(pdev, bar, 0);
184 size_t fillable, filled;
187 fillable = x_start -
pos;
188 else if (pos >= x_end)
189 fillable = end -
pos;
193 if (fillable >= 4 && !(pos % 4) && (count >= 4)) {
209 }
else if (fillable >= 2 && !(pos % 2) && (count >= 2)) {
225 }
else if (fillable) {
247 for (i = 0; i < x_end -
pos; i++) {
253 filled = x_end -
pos;