提交 faf4cd85 编写于 作者: C Christof Schmitt 提交者: James Bottomley

[SCSI] zfcp: Use correct width for timer_interval field

The timer_interval is 14 bits in width. Introduce a define for
properly masking the value.
Reviewed-by: NSwen Schillig <swen@vnet.ibm.com>
Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 1bf3ff02
...@@ -495,7 +495,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req) ...@@ -495,7 +495,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req)
fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3; fc_host_supported_classes(shost) = FC_COS_CLASS2 | FC_COS_CLASS3;
adapter->hydra_version = bottom->adapter_type; adapter->hydra_version = bottom->adapter_type;
adapter->timer_ticks = bottom->timer_interval; adapter->timer_ticks = bottom->timer_interval & ZFCP_FSF_TIMER_INT_MASK;
adapter->stat_read_buf_num = max(bottom->status_read_buf_num, adapter->stat_read_buf_num = max(bottom->status_read_buf_num,
(u16)FSF_STATUS_READS_RECOM); (u16)FSF_STATUS_READS_RECOM);
......
...@@ -352,6 +352,8 @@ struct fsf_qtcb_bottom_support { ...@@ -352,6 +352,8 @@ struct fsf_qtcb_bottom_support {
u8 els[256]; u8 els[256];
} __attribute__ ((packed)); } __attribute__ ((packed));
#define ZFCP_FSF_TIMER_INT_MASK 0x3FFF
struct fsf_qtcb_bottom_config { struct fsf_qtcb_bottom_config {
u32 lic_version; u32 lic_version;
u32 feature_selection; u32 feature_selection;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册