X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fnfp%2Fnfpcore%2Fnfp_cpp.h;h=720d3989e601c551c86366f3baac78c5a8b38e6d;hb=b3bc560bd6bdf3c9851d25bc0a66cb24aa1fd48c;hp=7e862145c8607c49e8c6a25d08001d0c4675ab12;hpb=c7e9729da6b521ee8a1f8bb3a1fa4c156f059ced;p=dpdk.git diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h index 7e862145c8..720d3989e6 100644 --- a/drivers/net/nfp/nfpcore/nfp_cpp.h +++ b/drivers/net/nfp/nfpcore/nfp_cpp.h @@ -6,6 +6,8 @@ #ifndef __NFP_CPP_H__ #define __NFP_CPP_H__ +#include + #include "nfp-common/nfp_platform.h" #include "nfp-common/nfp_resid.h" @@ -31,6 +33,8 @@ struct nfp_cpp { * island XPB CSRs. */ uint32_t imb_cat_table[16]; + + int driver_lock_needed; }; /* @@ -52,7 +56,7 @@ struct nfp_cpp_operations { size_t area_priv_size; /* Instance an NFP CPP */ - int (*init)(struct nfp_cpp *cpp, const char *devname); + int (*init)(struct nfp_cpp *cpp, struct rte_pci_device *dev); /* * Free the bus. @@ -166,7 +170,7 @@ void *nfp_cpp_priv(struct nfp_cpp *cpp); */ void *nfp_cpp_area_priv(struct nfp_cpp_area *cpp_area); -uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp); +uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model); /* * NFP CPP core interface for CPP clients. @@ -179,7 +183,8 @@ uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp); * * @return NFP CPP handle, or NULL on failure (and set errno accordingly). */ -struct nfp_cpp *nfp_cpp_from_device_name(const char *devname); +struct nfp_cpp *nfp_cpp_from_device_name(struct rte_pci_device *dev, + int driver_lock_needed); /* * Free a NFP CPP handle