Commit 8116f3cf authored by Sivakumar Subramani's avatar Sivakumar Subramani Committed by David S. Miller

[S2IO]: Handle and monitor all of the device errors and alarms

- Added support to poll entire set of device errors and alarams.
- A note on how device errors and alarms are handled:
- The adapter will automatically recover from uncorrectable ECC errors.
  Packets containing corrupted data will be dropped (not transmitted) or tagged
  as invalid before being passed to the host.
- The adapter cannot recover from any internal state machine errors. A state
  machine error requires a device reset.
- Any internal error that could potentially result in .store trampling.
  (undesirable PCI behaviour)is tagged as a "serious error". In such cases
  the adapter will give up its ability to be a bus master. In this situation
  the host will still be able to read internal device registers in order to
  generate an error report. A device reset is necessary to return to normal
  operation.
- In the event of a pcix data parity error, the adapter will automatically
  disable itself. Adapter_En will automatically transition from '1' to '0' and
  the adapter will enter its clean-up routine. Once the device has achieved
  quiescence, an adapter reset should be performed.
- Replaced alarm_intr_handler() with s2io_handle_errors().
- Added statistic counters to monitor the alarms.

[ Fix warnings wrt. do_s2io_chk_alarm_bit(), Callers pass in an
  "unsigned long long *" but the function takes a "u64 *" which is
  different on many 64-bit platforms. -DaveM ]
Signed-off-by: default avatarSivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: default avatarSantosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: default avatarRamkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 9caab458
This diff is collapsed.
......@@ -91,7 +91,7 @@ struct swStat {
unsigned long long serious_err_cnt;
unsigned long long soft_reset_cnt;
unsigned long long fifo_full_cnt;
unsigned long long ring_full_cnt;
unsigned long long ring_full_cnt[8];
/* LRO statistics */
unsigned long long clubbed_frms_cnt;
unsigned long long sending_both;
......@@ -126,6 +126,26 @@ struct swStat {
unsigned long long rx_buf_size_err_cnt;
unsigned long long rx_rxd_corrupt_cnt;
unsigned long long rx_unkn_err_cnt;
/* Error/alarm statistics*/
unsigned long long tda_err_cnt;
unsigned long long pfc_err_cnt;
unsigned long long pcc_err_cnt;
unsigned long long tti_err_cnt;
unsigned long long lso_err_cnt;
unsigned long long tpa_err_cnt;
unsigned long long sm_err_cnt;
unsigned long long mac_tmac_err_cnt;
unsigned long long mac_rmac_err_cnt;
unsigned long long xgxs_txgxs_err_cnt;
unsigned long long xgxs_rxgxs_err_cnt;
unsigned long long rc_err_cnt;
unsigned long long prc_pcix_err_cnt;
unsigned long long rpa_err_cnt;
unsigned long long rda_err_cnt;
unsigned long long rti_err_cnt;
unsigned long long mc_err_cnt;
};
/* Xpak releated alarm and warnings */
......@@ -1018,7 +1038,7 @@ static void free_shared_mem(struct s2io_nic *sp);
static int init_nic(struct s2io_nic *nic);
static void rx_intr_handler(struct ring_info *ring_data);
static void tx_intr_handler(struct fifo_info *fifo_data);
static void alarm_intr_handler(struct s2io_nic *sp);
static void s2io_handle_errors(void * dev_id);
static int s2io_starter(void);
static void s2io_closer(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment