OSDN Git Service

bnxt_en: Add bnxt_en initial port params table and register it
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 28 Jan 2019 12:30:27 +0000 (18:00 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Jan 2019 06:13:09 +0000 (22:13 -0800)
commit782a624d00fa22e7499f5abc29747501ec671313
tree5aaa8b53be24b74184cd0882f17d6d56947962ed
parentb639583f9e36d044ac1b13090ae812266992cbac
bnxt_en: Add bnxt_en initial port params table and register it

Register devlink_port with devlink and create initial port params
table for bnxt_en. The table consists of a generic parameter:

wake_on_lan: Enables Wake on Lan for this port when magic packet
is received with this port's MAC address using ACPI pattern.
If enabled, the controller asserts a wake pin upon reception of
WoL packet.  ACPI (Advanced Configuration and Power Interface) is
an industry specification for the efficient handling of power
consumption in desktop and mobile computers.

v2->v3:
- Modify bnxt_dl_wol_validate(), to throw error message when user gives
  value other than DEVLINK_PARAM_WAKE_MAGIC ot to disable WOL.
- Use netdev_err() instead of netdev_warn(), when devlink_port_register()
  and devlink_port_params_register() returns error. Also, don't log rc
  in this message.

Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.h
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h