mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 20:21:30 +00:00
Disable asking firmware for statistic if neither initiator, nor target modes enabled, because otherwise it can get crazy and be recovered only by a power reset.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3253 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2255,6 +2255,13 @@ qla24xx_get_isp_stats(scsi_qla_host_t *ha, struct link_statistics *stats,
|
||||
mbx_cmd_t *mcp = &mc;
|
||||
uint32_t *siter, *diter, dwords;
|
||||
|
||||
if (!qla_tgt_mode_enabled(ha) && !qla_ini_mode_enabled(ha)) {
|
||||
DEBUG2_3_11(printk("%s(%ld): neither initiator, nor target "
|
||||
"mode enabled, no stats returned\n",
|
||||
__func__, ha->host_no));
|
||||
return QLA_FUNCTION_FAILED;
|
||||
}
|
||||
|
||||
DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
|
||||
|
||||
mcp->mb[0] = MBC_GET_LINK_PRIV_STATS;
|
||||
|
||||
Reference in New Issue
Block a user