A question about pcim_iomap_regions() and Managed Device Resource API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI, linux-pci developers,

There are very few Ethernet drivers which use
pcim_iomap_regions(); for example,
drivers/net/ethernet/realtek/r8169.c.

My question is: why do they use this
Managed Device Resource API and not
the regular Device Resource API (ioremap() for example), which is used in
**most** Ethernet Linux device drivers, for example, in I40E driver:

...
    err = pci_request_mem_regions(pdev, i40e_driver_name);
    ...
    hw->hw_addr = ioremap(pci_resource_start(pdev, 0), pf->ioremap_len);
...

Is there some inherent HW feature in r8169 (or the other
drivers, see list below) which requires using this API ? Is usage
of this API (the managed devices, with pcim_iomap_regions(), etc) is
mandatory for these device drivers, and cannot be
use in most drivers (like I40E and most of the others) ?

The other Linux Ethenet drivers that use
pcim_iomap_regions() are:
amd/xgbe, cavium/common/cavium_ptp.c, intel/ice/ice_main.c,
oki-semi/pch_gbe/pch_gbe_main.c, stmicro/stmmac/stmmac_pci.c,
synopsys/dwc-xlgmac-pci.c and toshiba/tc35815.c.

Regards,
Kevin W.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux