diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2011-10-03 19:45:02 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-16 11:52:15 -0400 |
commit | f72f6979c924af1c33dac9aff5a8004e89ada667 (patch) | |
tree | 36f804347669a6676bded1d965c3269d8ca2c745 /drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |
parent | 814740d5f67ae5f205349019bfaae38bcd0c8732 (diff) |
[SCSI] bnx2fc: Return error statistics of remote peer
Add support for get_lesb so that the valid statistics are returned by the
remote peer when RLS command is issued.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index d2bbb8030f7e..0f1ca86aff9f 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -99,6 +99,25 @@ static struct notifier_block bnx2fc_cpu_notifier = { | |||
99 | .notifier_call = bnx2fc_cpu_callback, | 99 | .notifier_call = bnx2fc_cpu_callback, |
100 | }; | 100 | }; |
101 | 101 | ||
102 | static inline struct net_device *bnx2fc_netdev(const struct fc_lport *lport) | ||
103 | { | ||
104 | return ((struct bnx2fc_interface *) | ||
105 | ((struct fcoe_port *)lport_priv(lport))->priv)->netdev; | ||
106 | } | ||
107 | |||
108 | /** | ||
109 | * bnx2fc_get_lesb() - Fill the FCoE Link Error Status Block | ||
110 | * @lport: the local port | ||
111 | * @fc_lesb: the link error status block | ||
112 | */ | ||
113 | static void bnx2fc_get_lesb(struct fc_lport *lport, | ||
114 | struct fc_els_lesb *fc_lesb) | ||
115 | { | ||
116 | struct net_device *netdev = bnx2fc_netdev(lport); | ||
117 | |||
118 | __fcoe_get_lesb(lport, fc_lesb, netdev); | ||
119 | } | ||
120 | |||
102 | static void bnx2fc_clean_rx_queue(struct fc_lport *lp) | 121 | static void bnx2fc_clean_rx_queue(struct fc_lport *lp) |
103 | { | 122 | { |
104 | struct fcoe_percpu_s *bg; | 123 | struct fcoe_percpu_s *bg; |
@@ -2512,6 +2531,7 @@ static struct libfc_function_template bnx2fc_libfc_fcn_templ = { | |||
2512 | .elsct_send = bnx2fc_elsct_send, | 2531 | .elsct_send = bnx2fc_elsct_send, |
2513 | .fcp_abort_io = bnx2fc_abort_io, | 2532 | .fcp_abort_io = bnx2fc_abort_io, |
2514 | .fcp_cleanup = bnx2fc_cleanup, | 2533 | .fcp_cleanup = bnx2fc_cleanup, |
2534 | .get_lesb = bnx2fc_get_lesb, | ||
2515 | .rport_event_callback = bnx2fc_rport_event_handler, | 2535 | .rport_event_callback = bnx2fc_rport_event_handler, |
2516 | }; | 2536 | }; |
2517 | 2537 | ||