Skip to content

Commit

Permalink
iavf: Fix up debug print macro
Browse files Browse the repository at this point in the history
This aligns the iavf_debug() macro with the other Intel drivers.

Add the bus number, bus_id field to i40e_bus_info so output shows
each physical port(i.e func) in following format:
  [[[[<domain>]:]<bus>]:][<slot>][.[<func>]]
domains are numbered from 0 to ffff), bus (0-ff), slot (0-1f) and
function (0-7).

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
  • Loading branch information
Jeff Kirsher committed Jun 28, 2019
1 parent ab6973a commit 75051ce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/net/ethernet/intel/iavf/iavf_osdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ struct iavf_virt_mem {
#define iavf_allocate_virt_mem(h, m, s) iavf_allocate_virt_mem_d(h, m, s)
#define iavf_free_virt_mem(h, m) iavf_free_virt_mem_d(h, m)

#define iavf_debug(h, m, s, ...) iavf_debug_d(h, m, s, ##__VA_ARGS__)
extern void iavf_debug_d(void *hw, u32 mask, char *fmt_str, ...)
__printf(3, 4);
#define iavf_debug(h, m, s, ...) \
do { \
if (((m) & (h)->debug_mask)) \
pr_info("iavf %02x:%02x.%x " s, \
(h)->bus.bus_id, (h)->bus.device, \
(h)->bus.func, ##__VA_ARGS__); \
} while (0)

#endif /* _IAVF_OSDEP_H_ */

0 comments on commit 75051ce

Please sign in to comment.