I unable to access the pci registers when my pci is connected to Jetson I am getting these errors

Hi,
This is the log after above

[b][ 10.058263] x11: ffffffc001404000 x10: 0000000000000000
[ 10.058266] x9 : 000000000000bf4c x8 : ffffffc0014198d7
[ 10.058270] x7 : 0000000000000000 x6 : 0000000012b79ac9
[ 10.058273] x5 : 0000000012b79ac9 x4 : 0000000000000000
[ 10.058275] x3 : 0000000000000000 x2 : 0000000000000000
[ 10.058278] x1 : 0000000000000008 x0 : 0000000000000011

[ 10.058557] —[ end trace a28a75647629a9ee ]—
[ 10.058559] Call trace:
[ 10.058565] [] gpio_to_desc+0xc4/0xd0
[ 10.058572] [] imx274_power_on+0x120/0x1c8
[ 10.058577] [] camera_common_s_power+0xe4/0x17c
[ 10.058583] [] tegra_channel_set_power+0x50/0x90
[ 10.058587] [] vi4_power_on+0x74/0x90
[ 10.058589] [] tegra_channel_open+0x64/0xbc
[ 10.058593] [] v4l2_open+0xb8/0xfc
[ 10.058598] [] chrdev_open+0xa0/0x190
[ 10.058605] [] do_dentry_open+0x1e0/0x2f8
[ 10.058607] [] vfs_open+0x50/0x7c
[ 10.058611] [] do_last+0x120/0xbec
[ 10.058613] [] path_openat+0x74/0x2b4
[ 10.058616] [] do_filp_open+0x58/0xb0
[ 10.058619] [] do_sys_open+0x140/0x21c
[ 10.058622] [] SyS_openat+0x10/0x18
[ 10.058627] [] el0_svc_naked+0x24/0x28
[ 10.058629] gpiod_direction_output_raw: invalid GPIO
[ 10.059662] invalid GPIO -517
[ 10.059683] ------------[ cut here ]------------
[ 10.059685] WARNING: at ffffffc00037a4a8 [verbose debug info unavailable]
[ 10.059690] Modules linked in: pci_tegra bluedroid_pm

[ 10.059699] CPU: 2 PID: 415 Comm: v4l_id Tainted: G W 4.4.38 #68
[ 10.059700] Hardware name: quill (DT)
[ 10.059702] task: ffffffc1eadd1900 ti: ffffffc1e372c000 task.ti: ffffffc1e372c000
[ 10.059707] PC is at gpio_to_desc+0xc4/0xd0
[ 10.059709] LR is at gpio_to_desc+0xc4/0xd0
[ 10.059712] pc : [] lr : [] pstate: 80000045
[ 10.059714] sp : ffffffc1e372f9f0
[ 10.059718] x29: ffffffc1e372f9f0 x28: 0000000000000000
[ 10.059721] x27: 0000000000000000 x26: 0000000000000000
[ 10.059725] x25: ffffffc1e372fe80 x24: ffffffc001455000
[ 10.059728] x23: 0000000000000000 x22: ffffffc1eabc5180
[ 10.059731] x21: ffffffc00145b000 x20: 00000000fffffdfb
[ 10.059734] x19: ffffffc0012a4fc8 x18: 0000007fd3555f68
[ 10.059737] x17: 0000000000000000 x16: 0000000000000000
[ 10.059740] x15: 0000000000000000 x14: 0000000000000000
[ 10.059743] x13: 0000000000000000 x12: ffffffc00125d000
[ 10.059746] x11: ffffffc001404000 x10: 0000000000000000
[ 10.059749] x9 : 000000000000b4bc x8 : ffffffc00141a367
[ 10.059759] x7 : 0000000000000000 x6 : 0000000012b85233
[ 10.059762] x5 : 0000000012b85233 x4 : 0000000000000000
[ 10.059765] x3 : 0000000000000000 x2 : 0000000000000000
[ 10.059767] x1 : 0000000000000008 x0 : 0000000000000011

[ 10.059980] —[ end trace a28a75647629a9ef ]—
[ 10.059982] Call trace:
[ 10.059986] [] gpio_to_desc+0xc4/0xd0
[ 10.059991] [] imx274_power_on+0x130/0x1c8
[ 10.059995] [] camera_common_s_power+0xe4/0x17c
[ 10.060000] [] tegra_channel_set_power+0x50/0x90
[ 10.060003] [] vi4_power_on+0x74/0x90
[ 10.060006] [] tegra_channel_open+0x64/0xbc
[ 10.060008] [] v4l2_open+0xb8/0xfc
[ 10.060012] [] chrdev_open+0xa0/0x190
[ 10.060017] [] do_dentry_open+0x1e0/0x2f8
[ 10.060022] [] vfs_open+0x50/0x7c
[ 10.060025] [] do_last+0x120/0xbec
[ 10.060028] [] path_openat+0x74/0x2b4
[ 10.060030] [] do_filp_open+0x58/0xb0
[ 10.060033] [] do_sys_open+0x140/0x21c
[ 10.060035] [] SyS_openat+0x10/0x18
[ 10.060039] [] el0_svc_naked+0x24/0x28
[ 10.060137] gpiod_direction_output_raw: invalid GPIO
[ 10.069248] invalid GPIO -517
[ 10.069278] ------------[ cut here ]------------
[ 10.069281] WARNING: at ffffffc00037a4a8 [verbose debug info unavailable]
[ 10.069287] Modules linked in: pci_tegra bluedroid_pm

[ 10.069296] CPU: 2 PID: 415 Comm: v4l_id Tainted: G W 4.4.38 #68
[ 10.069297] Hardware name: quill (DT)
[ 10.069321] task: ffffffc1eadd1900 ti: ffffffc1e372c000 task.ti: ffffffc1e372c000
[ 10.069329] PC is at gpio_to_desc+0xc4/0xd0
[ 10.069331] LR is at gpio_to_desc+0xc4/0xd0
[ 10.069335] pc : [] lr : [] pstate: 80000045
[ 10.069337] sp : ffffffc1e372fcc0
[ 10.069341] x29: ffffffc1e372fcc0 x28: ffffffc1e372c000
[ 10.069345] x27: ffffffc000b5e000 x26: 0000000000000039
[ 10.069348] x25: 000000000000011d x24: ffffffc1e3420c10
[ 10.069351] x23: ffffffc07024c050 x22: 0000000000000000
[ 10.069354] x21: ffffffc00145b000 x20: 00000000fffffdfb
[ 10.069358] x19: ffffffc0012a4fc8 x18: 0000007fd3557458
[ 10.069361] x17: 0000000000000000 x16: 0000000000000000
[ 10.069363] x15: 0000000000000000 x14: 0000000000000000
[ 10.069366] x13: 0000000000000000 x12: ffffffc00125d000
[ 10.069369] x11: ffffffc001404000 x10: 0000000000000000
[ 10.069373] x9 : 000000000000aa1c x8 : ffffffc00141ae07
[ 10.069376] x7 : 0000000000000000 x6 : 0000000012bce46b
[ 10.069379] x5 : 0000000012bce46b x4 : 0000000000000000
[ 10.069381] x3 : 0000000000000000 x2 : 0000000000000000
[ 10.069384] x1 : 0000000000000008 x0 : 0000000000000011

[ 10.069655] —[ end trace a28a75647629a9f0 ]—
[ 10.069657] Call trace:
[ 10.069662] [] gpio_to_desc+0xc4/0xd0
[ 10.069669] [] imx274_power_off+0xb0/0x124
[ 10.069674] [] camera_common_s_power+0x3c/0x17c
[ 10.069680] [] tegra_channel_set_power+0x50/0x90
[ 10.069683] [] vi4_power_off+0x58/0x70
[ 10.069686] [] tegra_channel_close+0x60/0x80
[ 10.069689] [] v4l2_release+0x3c/0x90
[ 10.069695] [] __fput+0x90/0x1bc
[ 10.069697] [] ____fput+0xc/0x14
[ 10.069703] [] task_work_run+0xa8/0xc4
[ 10.069708] [] do_notify_resume+0x6c/0x74
[ 10.069711] [] work_pending+0x1c/0x20
[ 10.069722] gpiod_direction_output_raw: invalid GPIO
[ 10.079269] cfg80211: World regulatory domain updated:
[ 10.079274] cfg80211: DFS Master region: unset
[ 10.079274] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 10.079280] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 10.079285] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz, 92000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 10.079288] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 10.079292] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 10.079296] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 10.079299] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 10.079302] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 10.079305] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 10.087444] xhci-tegra 3530000.xhci: cannot find firmware…retry after 1 second
[ 10.262718] dhd_module_init in
[ 10.262746] tegra_net_perf_init: cannot get wifi sclk
[ 10.262816] found wifi platform device bcmdhd_wlan
[ 10.263821] wifi_platform_get_country_code_map: could not get country_code_map
[ 10.263823] wifi_plat_dev_drv_probe:platform country code map is not available
[ 10.263834] Power-up adapter ‘DHD generic adapter’
[ 10.263840] wifi_platform_set_power = 1
[ 10.467815] wifi_platform_bus_enumerate device present 1
[ 10.489525] wifi_platform_bus_enumerate device present 0
[ 10.489942] F1 signature read @0x18000000=0x17214354
[ 10.493719] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
[ 10.494315] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[ 10.494367] wifi_platform_prealloc: failed to alloc static mem section 7
[ 10.494376] wifi_platform_get_mac_addr
[ 10.496069] CFG80211-ERROR) wl_setup_wiphy : Registering Vendor80211
[ 10.497585] wl_create_event_handler(): thread:wl_event_handler:23c started
[ 10.497622] CFG80211-ERROR) wl_event_handler : tsk Enter, tsk = 0xffffffc1df4a1a70
[ 10.499978] dhd_attach(): thread:dhd_watchdog_thread:23d started
[ 10.501859] dhd_attach(): thread:dhd_dpc:23e started
[ 10.501953] dhd_attach(): thread:dhd_rxf:23f started
[ 10.501959] dhd_deferred_work_init: work queue initialized
[ 10.502156] Dongle Host Driver, version 1.201.82 ®
Compiled in drivers/net/wireless/bcmdhd on Feb 1 2019 at 16:52:15
[ 10.502467] tegra_sysfs_register
[ 10.502497] Register interface [wlan0] MAC: 00:04:4b:8c:e3:b8

[ 10.502500] dhd_prot_ioctl : bus is down. we have nothing to do
[ 10.502585] sdhci-tegra 3440000.sdhci: Tuning already done, restoring the best tap value : 64
[ 10.503626] wifi_platform_set_power = 0
[ 10.563090] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 10.951776] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 11.085708] xhci-tegra 3530000.xhci: Firmware timestamp: 2017-12-07 10:50:08 UTC, Version: 55.09 release
[ 11.087742] xhci-tegra 3530000.xhci: xHCI Host Controller
[ 11.087756] xhci-tegra 3530000.xhci: new USB bus registered, assigned bus number 1
[ 11.088590] xhci-tegra 3530000.xhci: hcc params 0x0184fd25 hci version 0x100 quirks 0x00010810
[ 11.088611] xhci-tegra 3530000.xhci: irq 59, io mem 0x03530000
[ 11.088710] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 11.088712] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 11.088714] usb usb1: Product: xHCI Host Controller
[ 11.088716] usb usb1: Manufacturer: Linux 4.4.38 xhci-hcd
[ 11.088717] usb usb1: SerialNumber: 3530000.xhci
[ 11.088970] hub 1-0:1.0: USB hub found
[ 11.088990] hub 1-0:1.0: 4 ports detected
[ 11.123792] xhci-tegra 3530000.xhci: xHCI Host Controller
[ 11.123799] xhci-tegra 3530000.xhci: new USB bus registered, assigned bus number 2
[ 11.123949] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 11.123952] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 11.123954] usb usb2: Product: xHCI Host Controller
[ 11.123955] usb usb2: Manufacturer: Linux 4.4.38 xhci-hcd
[ 11.123957] usb usb2: SerialNumber: 3530000.xhci
[ 11.124195] hub 2-0:1.0: USB hub found
[ 11.124211] hub 2-0:1.0: 3 ports detected
[ 11.124552] tegra-xotg xotg: otg: host 3530000.xhci registered
[ 11.139970] extcon-gpio-states external-connection:extcon@1: Cable state 2
[ 11.353828] tegra-pcie 10003000.pcie-controller: link 2 down, retrying
[ 11.363411] tegra-pcie 10003000.pcie-controller: link 2 down, ignoring
[ 11.371084] tegra-pcie 10003000.pcie-controller: PCI host bridge to bus 0000:00
[ 11.380174] pci_bus 0000:00: root bus resource [mem 0x50100000-0x57ffffff]
[ 11.387912] pci_bus 0000:00: root bus resource [mem 0x58000000-0x7fffffff pref]
[ 11.387917] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 11.387920] pci_bus 0000:00: root bus resource [io 0x1000-0xffff]
[ 11.387945] pci 0000:00:01.0: [10de:10e5] type 01 class 0x060400
[ 11.388035] pci 0000:00:01.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 11.388249] iommu: Adding device 0000:00:01.0 to group 55
[ 11.388327] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 11.388457] pci 0000:01:00.0: [AAAA:BBBB] type 00 class 0x000000
[ 11.388503] pci 0000:01:00.0: reg 0x10: [io 0xffffff00-0xffffffff]
[ 11.388750] iommu: Adding device 0000:01:00.0 to group 56
[ 11.388790] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 11.388819] pci 0000:00:01.0: BAR 7: assigned [io 0x1000-0x1fff]
[ 11.388822] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 11.388825] pci 0000:00:01.0: bridge window [io 0x1000-0x1fff]
[ 11.388899] pcieport 0000:00:01.0: enabling device (0000 -> 0001)
[ 11.388983] pcieport 0000:00:01.0: Signaling PME through PCIe PME interrupt
[ 11.388985] pci 0000:01:00.0: Signaling PME through PCIe PME interrupt
[ 11.388990] pcie_pme 0000:00:01.0:pcie01: service driver pcie_pme loaded
[ 11.389063] aer 0000:00:01.0:pcie02: service driver aer loaded
[ 11.407789] usb 1-2: new low-speed USB device number 2 using xhci-tegra
[ 11.560379] usb 1-2: New USB device found, idVendor=413c, idProduct=301a
[ 11.560382] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 11.560385] usb 1-2: Product: Dell MS116 USB Optical Mouse
[ 11.560386] usb 1-2: Manufacturer: PixArt
[ 11.560654] usb 1-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 11.560985] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6
[ 11.563425] input: PixArt Dell MS116 USB Optical Mouse as /devices/3530000.xhci/usb1/1-2/1-2:1.0/0003:413C:301A.0001/input/input4
[ 11.563551] hid-generic 0003:413C:301A.0001: input,hidraw0: USB HID v1.11 Mouse [PixArt Dell MS116 USB Optical Mouse] on usb-3530000.xhci-2/input0
[ 11.938692] using random self ethernet address
[ 11.943834] using random host ethernet address
[ 11.959283] Mass Storage Function, version: 2009/09/11
[ 11.965521] LUN: removable file: (no medium)
[ 11.975160] using random self ethernet address
[ 11.975163] using random host ethernet address
[ 11.979599] usb0: HOST MAC ce:11:08:31:33:3f
[ 11.979651] usb0: MAC fe:cb:81:65:ad:32
[ 11.980020] usb1: HOST MAC b2:cb:48:c3:b7:10
[ 11.980037] usb1: MAC 5a:12:c0:5f:c9:da
[ 11.980049] tegra-xudc-new 3550000.xudc: exiting ELPG
[ 11.981663] tegra-xudc-new 3550000.xudc: exiting ELPG done
[ 11.981678] tegra-xudc-new 3550000.xudc: ep 0 (type: 0, dir: out) enabled
[ 11.981706] tegra-xudc-new 3550000.xudc: entering ELPG
[ 11.986515] tegra-xudc-new 3550000.xudc: entering ELPG done
[ 11.986524] tegra-xudc-new 3550000.xudc: exiting ELPG
[ 11.992267] tegra-xudc-new 3550000.xudc: exiting ELPG done
[ 11.992278] tegra-xudc-new 3550000.xudc: entering ELPG
[ 11.996408] tegra-xudc-new 3550000.xudc: entering ELPG done
[ 12.250968] device usb0 entered promiscuous mode
[ 12.260744] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[ 12.271368] device usb1 entered promiscuous mode
[ 12.280850] IPv6: ADDRCONF(NETDEV_UP): usb1: link is not ready
[ 12.287358] l4tbr0: port 2(usb1) entered forwarding state
[ 12.293447] l4tbr0: port 2(usb1) entered forwarding state
[ 12.771596] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 5
[ 12.779538] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work ignore firmware MBOX_CMD_DEC_SSPI_CLOCK request
[ 12.975831] l4tbr0: port 2(usb1) entered disabled state
[ 13.001630] IPVS: Creating netns size=1424 id=1
[ 13.064169] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 13.104278] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 13.114439] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 13.295343] gk20a 17000000.gp10b: railgate is disabled.
[ 13.344311] tegradc 15210000.nvdisplay: blank - powerdown
[ 13.735626] CPU1: shutdown
[ 13.738427] psci: CPU1 killed.
[ 13.764481] CPU2: shutdown
[ 13.767651] psci: CPU2 killed.
[ 15.204472] fuse init (API version 7.23)
[ 17.958880] IPVS: Creating netns size=1424 id=2
[ 18.419444] tegra-i2c 3190000.i2c: arb lost in communicate to add 0x50
[ 19.370837] Bridge firewalling registered
[ 19.447148] ip_tables: © 2000-2006 Netfilter Core Team
[ 19.638959] Netfilter messages via NETLINK v0.30.
[ 19.648457] ctnetlink v0.93: registering with nfnetlink.
[ 19.811653] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready
[ 20.272503] IPVS: Creating netns size=1424 id=3
[ 20.427806] tegra-i2c 3190000.i2c: timed out for bus clear
[ 20.437270] tegra-i2c 3190000.i2c: arb lost in communicate to add 0x50
[ 20.476759] tegradc 15210000.nvdisplay: blank - powerdown
[ 20.482714] tegradc 15210000.nvdisplay: hdmi: plugged
[ 20.491038] tegradc 15210000.nvdisplay: blank - powerdown
[ 20.775223] tegradc 15210000.nvdisplay: blank - powerdown
[ 20.784020] tegradc 15210000.nvdisplay: unblank
[ 20.784034] PD DISP0 index2 UP
[ 20.788766] PD DISP1 index3 UP
[ 20.789015] PD DISP2 index4 UP
[ 20.794890] Parent Clock set for DC plld2
[ 20.814290] tegradc 15210000.nvdisplay: hdmi: pclk:148500K, set prod-setting:prod_c_150M
[ 21.865626] tegradc 15210000.nvdisplay: unblank
[ 887.323873] usb 1-1: new high-speed USB device number 3 using xhci-tegra
[ 887.467188] usb 1-1: New USB device found, idVendor=03f0, idProduct=2340
[ 887.473975] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 887.481293] usb 1-1: Product: x705w
[ 887.484911] usb 1-1: Manufacturer: HP
[ 887.488710] usb 1-1: SerialNumber: E6006A37CA670F75
[ 887.494635] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6
[ 887.502683] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 887.513222] scsi host2: usb-storage 1-1:1.0
[ 889.157638] scsi 2:0:0:0: Direct-Access hp x705w PMAP PQ: 0 ANSI: 6
[ 889.167912] sd 2:0:0:0: [sda] 30965760 512-byte logical blocks: (15.9 GB/14.8 GiB)
[ 889.176926] sd 2:0:0:0: [sda] Write Protect is off
[ 889.181776] sd 2:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 889.188141] sd 2:0:0:0: [sda] No Caching mode page found
[ 889.193491] sd 2:0:0:0: [sda] Assuming drive cache: write through
[ 889.210588] sda: sda1
[ 889.216986] sd 2:0:0:0: [sda] Attached SCSI removable disk
[ 890.375535] IPVS: Creating netns size=1424 id=4
[ 907.148759] sd 2:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[ 907.156989] sd 2:0:0:0: [sda] tag#0 Sense Key : 0x2 [current]
[ 907.162860] sd 2:0:0:0: [sda] tag#0 ASC=0x3a ASCQ=0x0
[ 907.168040] sd 2:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 01 d8 76 00 00 00 f8 00
[ 907.175648] blk_update_request: I/O error, dev sda, sector 30963200
[ 907.184424] sd 2:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[ 907.192616] sd 2:0:0:0: [sda] tag#0 Sense Key : 0x2 [current]
[ 907.198466] sd 2:0:0:0: [sda] tag#0 ASC=0x3a ASCQ=0x0
[ 907.203644] sd 2:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 01 d8 76 00 00 00 08 00
[ 907.211223] blk_update_request: I/O error, dev sda, sector 30963200
[ 907.217504] Buffer I/O error on dev sda1, logical block 3870144, async page read
[ 925.991553] usb 1-1: USB disconnect, device number 3
[ 926.049270] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6
[ 936.923853] usb 1-1: new low-speed USB device number 4 using xhci-tegra
[ 937.066467] usb 1-1: New USB device found, idVendor=1a2c, idProduct=0e24
[ 937.073261] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 937.080586] usb 1-1: Product: USB Keyboard
[ 937.084803] usb 1-1: Manufacturer: SEM
[ 937.089251] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 937.098074] usb 1-1: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 937.112741] input: SEM USB Keyboard as /devices/3530000.xhci/usb1/1-1/1-1:1.0/0003:1A2C:0E24.0002/input/input5
[ 937.177115] hid-generic 0003:1A2C:0E24.0002: input,hidraw1: USB HID v1.10 Keyboard [SEM USB Keyboard] on usb-3530000.xhci-1/input0
[ 937.195284] input: SEM USB Keyboard as /devices/3530000.xhci/usb1/1-1/1-1:1.1/0003:1A2C:0E24.0003/input/input6
[ 937.260580] hid-generic 0003:1A2C:0E24.0003: input,hidraw2: USB HID v1.10 Device [SEM USB Keyboard] on usb-3530000.xhci-1/input1[/b]

Hi,

Invalid BAR0 address is assigned.
[ 11.388457] pci 0000:01:00.0: [AAAA:BBBB] type 00 class 0x000000
[ 11.388503] pci 0000:01:00.0: reg 0x10: [io 0xffffff00-0xffffffff]

I verified with one of the PCIe card which supports 256 bytes of IO mem and it got valid address 0x1000.
Please add debug logs in pci_assign_resource() and check.

We haven’t verified any PCIe cards with only IO BAR. If possible switch to prefetchable/non-pretechable memory.

  • Manikanta

Hi,
But same pcie card is working in x86 windows and linux but in arm64 i am getting that issue.

Hi,
If i use the pci_assign_resource() it allocated and getting the memory.And this is the log

[ 1050.436518] [BBN FPGA] Loading BBN FPGA driver!
[ 1050.441343] my_pci 0000:01:00.0: BAR 0: assigned [io 0x1000-0x10ff]
[ 1050.447840] my_pci 0000:01:00.0: enabling device (0000 -> 0001)
[ 1050.447851] enable the device sucess=0
[ 1050.447853] resources start avaliable=1000
[ 1050.447855] BAR 0 : base : 0x1000
[ 1050.447857] BAR 0 : len : 0x100

And in post 18 you told that it allocated address outside valid range.

And i use ioremap and pci_iomap from their also i am unable to get the data.

Can you check and give the solution as soon as possible

Hi,

I verified with RTL8111, IO BAR is assigned with correct address and I am able map it using pci_iomap() and then access it. You have to check why IO BAR start address is 0xffffff00 which is not in the range 0x1000-0xffff.

If i use the pci_assign_resource() it allocated and getting the memory.And this is the log
BAR is not assigned during enumeration because child’s IO resource is not part of 0x1000-0xffff.
Successful enumeration will have both these prints. However 2nd print is not present in the logs you posted.

[ 5.104355] pci 0000:01:00.0: reg 0x10: [io 0x0000-0x00ff]

[ 5.159562] pci 0000:01:00.0: BAR 0: assigned [io 0x1000-0x10ff]

You have to check why child’s IO resource is 0xffffff00-0xffffffff and not 0x1000-0x10ff.
Track pci_alloc_child_bus() call to debug this issue.

Sample code I used to access RTL8111’s IO bar is

int device_probe(struct pci_dev *dev, const struct pci_device_id *id)
{

	int ret;
	unsigned long val=0;
	void __iomem *ioaddr;

	pr_info("vid=%x\t did=%x\t devfn=%x\n", dev->vendor, dev->device, dev->devfn);

	ret = pci_enable_device(dev);
	if (ret < 0) {
		pr_err("unable to enable PCI device: %d\n", ret);
	}
	
    ioaddr = pci_iomap(pdev, 0, 256);
    if (!ioaddr) {
		pr_err("rtnic: failed to map MMIO range\n");
		return -1;

	}

    pr_err("ioaddr: %p val at 0x74: 0x%x\n", ioaddr, ioread8(ioaddr + 0x74));
    iowrite8(0xeb, ioaddr + 0x74);
    pr_err("ioaddr: %p val at 0x74: 0x%x\n", ioaddr, ioread8(ioaddr + 0x74));
    pr_err("ioaddr: %p val at 0x74: 0x%x 0x%x\n", ioaddr, ioread16(ioaddr + 0x74), ioread32(ioaddr + 0x74));
	
    return 0;
}
  • Manikanta