Deniz-Eren / dev-can-linux

Porting of Linux CAN-bus drivers to QNX
GNU General Public License v2.0
4 stars 1 forks source link

Support for Fintek F81601 PCIe to 2 CAN controller driver #63

Closed Deniz-Eren closed 1 month ago

Deniz-Eren commented 1 month ago

New managed functions pcim_enable_device() and pcim_iomap(), were tested by temporarily modifying the driver adv_pci.c to used pcim_enable_device() and driver kvaser_pci.c to use pcim_iomap().

This was done because we do not have a Fintek F81601 card handy nor do we have QEmu support for this card at this time, and since the associated driver is the only one that uses the functions pcim_enable_device() and pcim_iomap().

The driver was started with the command "dev-can-linux -Ex -vvv" and the following dump shows the new managed functions to be working as expected (see the '!!!' below):

Shutdown program
Shutdown IRQ loop
Shutting down adv_pci
Removing card
Removing device adv_pci-can0
unregister_netdev: adv_pci-can0
netif_stop_queue
free_irq; irq: 258
cancel_delayed_work_sync (505e01de10)
netif_tx exit: adv_pci-can0
timer_loop shutdown
pci_iounmap; addr: 206da69000
pci_iounmap; addr: 206da69000, size: 400
Removing device adv_pci-can1
unregister_netdev: adv_pci-can1
netif_stop_queue
free_irq; irq: 258
cancel_delayed_work_sync (505e01bac0)
timer_loop shutdown
netif_tx exit: adv_pci-can1
pci_iounmap; addr: 206da6a400
pci_iounmap; addr: 206da6a400, size: 400
pci_free_irq_vectors
!!!
Managed pci_disable_device for adv_pci
!!!
pci_disable_device
disabling MSI capability
disabling PCIe capability
disabling PCIe capability not allowed
Shutting down kvaser_pci
Removing device kvaser_pci-can0
unregister_netdev: kvaser_pci-can0
netif_stop_queue
free_irq; irq: 10
cancel_delayed_work_sync (505e02dd20)
netif_tx exit: kvaser_pci-can0
timer_loop shutdown
pci_release_regions
pci_disable_device
!!!
Managed pci_iounmap for kvaser_pci
pci_iounmap; addr: c000
pci_iounmap; addr: c000, size: 80
Managed pci_iounmap for kvaser_pci
pci_iounmap; addr: c080
pci_iounmap; addr: c080, size: 80
Managed pci_iounmap for kvaser_pci
pci_iounmap; addr: c170
pci_iounmap; addr: c170, size: 8
!!!