Commit 64deb6efdc5504ce97b5c1c6f281fffbc150bd93
Committed by
James Bottomley
1 parent
6b9e152009
Exists in
master
and in
39 other branches
[SCSI] zfcp: Use status_read_buf_num provided by FCP channel
The FCP channel provides the number of status read buffers to issue. Use the provided number instead of the hardcoded number in zfcp. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Showing 5 changed files with 6 additions and 3 deletions Side-by-side Diff
drivers/s390/scsi/zfcp_aux.c
... | ... | @@ -425,7 +425,8 @@ |
425 | 425 | { |
426 | 426 | while (atomic_read(&adapter->stat_miss) > 0) |
427 | 427 | if (zfcp_fsf_status_read(adapter->qdio)) { |
428 | - if (atomic_read(&adapter->stat_miss) >= 16) { | |
428 | + if (atomic_read(&adapter->stat_miss) >= | |
429 | + adapter->stat_read_buf_num) { | |
429 | 430 | zfcp_erp_adapter_reopen(adapter, 0, "axsref1", |
430 | 431 | NULL); |
431 | 432 | return 1; |
drivers/s390/scsi/zfcp_def.h
... | ... | @@ -164,6 +164,7 @@ |
164 | 164 | stack abort/command |
165 | 165 | completion races */ |
166 | 166 | atomic_t stat_miss; /* # missing status reads*/ |
167 | + unsigned int stat_read_buf_num; | |
167 | 168 | struct work_struct stat_work; |
168 | 169 | atomic_t status; /* status of this adapter */ |
169 | 170 | struct list_head erp_ready_head; /* error recovery for this |
drivers/s390/scsi/zfcp_erp.c
... | ... | @@ -714,7 +714,7 @@ |
714 | 714 | if (zfcp_erp_adapter_strategy_open_fsf_xport(act) == ZFCP_ERP_FAILED) |
715 | 715 | return ZFCP_ERP_FAILED; |
716 | 716 | |
717 | - atomic_set(&act->adapter->stat_miss, 16); | |
717 | + atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num); | |
718 | 718 | if (zfcp_status_read_refill(act->adapter)) |
719 | 719 | return ZFCP_ERP_FAILED; |
720 | 720 |
drivers/s390/scsi/zfcp_fsf.c
... | ... | @@ -496,6 +496,7 @@ |
496 | 496 | |
497 | 497 | adapter->hydra_version = bottom->adapter_type; |
498 | 498 | adapter->timer_ticks = bottom->timer_interval; |
499 | + adapter->stat_read_buf_num = max(bottom->status_read_buf_num, (u16)16); | |
499 | 500 | |
500 | 501 | if (fc_host_permanent_port_name(shost) == -1) |
501 | 502 | fc_host_permanent_port_name(shost) = fc_host_port_name(shost); |