diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2014-03-19 22:03:09 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2014-03-19 22:03:09 +0100 |
commit | 3b410e54d3925a903adb2cc479177afc579c7679 (patch) | |
tree | 58365a06ad5d48813647945fcbab3c23708f9b34 | |
parent | c78961cb3b218c96f36ee96a4fcb6217080dd9f0 (diff) | |
download | pcitool-3b410e54d3925a903adb2cc479177afc579c7679.tar.gz pcitool-3b410e54d3925a903adb2cc479177afc579c7679.tar.bz2 pcitool-3b410e54d3925a903adb2cc479177afc579c7679.tar.xz pcitool-3b410e54d3925a903adb2cc479177afc579c7679.zip |
Report proper hardware address in sysfs
-rw-r--r-- | driver/sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/sysfs.c b/driver/sysfs.c index 8d3fccf..04bfdf3 100644 --- a/driver/sysfs.c +++ b/driver/sysfs.c @@ -106,9 +106,9 @@ static SYSFS_GET_FUNCTION(pcidriver_show_kmem_entry) if (entry->size >= 16) { pcidriver_kmem_sync_entry(privdata, entry, PCILIB_KMEM_SYNC_FROMDEVICE); - return snprintf(buf, PAGE_SIZE, "buffer: %d\naddr: %lx\nhw addr: %lx\nbus addr: %lx\ntype: %lx\nuse: 0x%lx\nitem: %lu\nsize: %lu\nrefs: %lu\nhw ref: %i\nmode: 0x%lx\ndata: %8x %8x %8x %8x\n", id, addr, dma_addr, dma_addr, entry->type, entry->use, entry->item, entry->size, entry->refs&KMEM_REF_COUNT, (entry->refs&KMEM_REF_HW)?1:0, entry->mode, *(u32*)(entry->cpua), *(u32*)(entry->cpua + 4), *(u32*)(entry->cpua + 8), *(u32*)(entry->cpua + 12)); + return snprintf(buf, PAGE_SIZE, "buffer: %d\naddr: %lx\nhw addr: %lx\nbus addr: %lx\ntype: %lx\nuse: 0x%lx\nitem: %lu\nsize: %lu\nrefs: %lu\nhw ref: %i\nmode: 0x%lx\ndata: %8x %8x %8x %8x\n", id, addr, virt_to_phys(addr), dma_addr, entry->type, entry->use, entry->item, entry->size, entry->refs&KMEM_REF_COUNT, (entry->refs&KMEM_REF_HW)?1:0, entry->mode, *(u32*)(entry->cpua), *(u32*)(entry->cpua + 4), *(u32*)(entry->cpua + 8), *(u32*)(entry->cpua + 12)); } else - return snprintf(buf, PAGE_SIZE, "buffer: %d\naddr: %lx\nhw addr: %lx\nbus addr: %lx\ntype: %lx\nuse: 0x%lx\nitem: %lu\nsize: %lu\nrefs: %lu\nhw ref: %i\nmode: 0x%lx\n", id, addr, dma_addr, dma_addr, entry->type, entry->use, entry->item, entry->size, entry->refs&KMEM_REF_COUNT, (entry->refs&KMEM_REF_HW)?1:0, entry->mode); + return snprintf(buf, PAGE_SIZE, "buffer: %d\naddr: %lx\nhw addr: %lx\nbus addr: %lx\ntype: %lx\nuse: 0x%lx\nitem: %lu\nsize: %lu\nrefs: %lu\nhw ref: %i\nmode: 0x%lx\n", id, addr, virt_to_phys(addr), dma_addr, entry->type, entry->use, entry->item, entry->size, entry->refs&KMEM_REF_COUNT, (entry->refs&KMEM_REF_HW)?1:0, entry->mode); } else return snprintf(buf, PAGE_SIZE, "I am in the kmem_entry show function for buffer %d\n", id); #else |