From 113bf1c9f1e035129f8631b032669d6ab36a14dd Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Fri, 16 Nov 2012 18:52:57 -0700 Subject: NTB: BWD Link Recovery The BWD NTB device will drop the link if an error is encountered on the point-to-point PCI bridge. The link will stay down until all errors are cleared and the link is re-established. On link down, check to see if the error is detected, if so do the necessary housekeeping to try and recover from the error and reestablish the link. There is a potential race between the 2 NTB devices recovering at the same time. If the times are synchronized, the link will not recover and the driver will be stuck in this loop forever. Add a random interval to the recovery time to prevent this race. Signed-off-by: Jon Mason --- drivers/ntb/ntb_hw.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/ntb/ntb_hw.h') diff --git a/drivers/ntb/ntb_hw.h b/drivers/ntb/ntb_hw.h index 72fcb22..3a15d49 100644 --- a/drivers/ntb/ntb_hw.h +++ b/drivers/ntb/ntb_hw.h @@ -125,10 +125,15 @@ struct ntb_device { unsigned char num_msix; unsigned char bits_per_vector; unsigned char max_cbs; + unsigned char link_width; + unsigned char link_speed; unsigned char link_status; + struct delayed_work hb_timer; unsigned long last_ts; + struct delayed_work lr_timer; + struct dentry *debugfs_dir; }; -- cgit v1.1