]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: switchtec_ntb: Add link management
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 3 Aug 2017 18:19:50 +0000 (12:19 -0600)
committerJon Mason <jdmason@kudzu.us>
Sun, 19 Nov 2017 01:37:12 +0000 (20:37 -0500)
commit388aa439eef69dc6ba21a1e2caf3b3d317bc56bd
tree70cc7cc97a8032c8c39a7cc87910071e73217922
parent86c243411a6106d5e51650b1c78c3f5858c7d800
NTB: switchtec_ntb: Add link management

switchtec_ntb checks for a link by looking at the shared memory
window. If the magic number is correct and the other side indicates
their link is enabled then we take the link to be up.

Whenever we change our local link status we send a msg to the
other side to check whether it's up and change their status.

The current status is maintained in a flag so ntb_is_link_up
can return quickly.

We utilize Switchtec's link status notifier to also check link changes
when the switch notices a port changes state.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
Acked-by: Allen Hubbe <Allen.Hubbe@dell.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/mscc/ntb_hw_switchtec.c