diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2010-04-30 12:09:36 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-02 15:42:33 -0400 |
commit | 64deb6efdc5504ce97b5c1c6f281fffbc150bd93 (patch) | |
tree | dac0645d128d00b19ca55fe11f6d51b6e9f19d8e /drivers/s390/scsi | |
parent | 6b9e1520094a8aa68009c265eb694e0be9f5be3f (diff) |
[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>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 3 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 2 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.h | 2 |
5 files changed, 6 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index abf33db647ff..e331df2122f7 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -425,7 +425,8 @@ int zfcp_status_read_refill(struct zfcp_adapter *adapter) | |||
425 | { | 425 | { |
426 | while (atomic_read(&adapter->stat_miss) > 0) | 426 | while (atomic_read(&adapter->stat_miss) > 0) |
427 | if (zfcp_fsf_status_read(adapter->qdio)) { | 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 | zfcp_erp_adapter_reopen(adapter, 0, "axsref1", | 430 | zfcp_erp_adapter_reopen(adapter, 0, "axsref1", |
430 | NULL); | 431 | NULL); |
431 | return 1; | 432 | return 1; |
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 0b2ae60a6f9f..9fa1b064893e 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -164,6 +164,7 @@ struct zfcp_adapter { | |||
164 | stack abort/command | 164 | stack abort/command |
165 | completion races */ | 165 | completion races */ |
166 | atomic_t stat_miss; /* # missing status reads*/ | 166 | atomic_t stat_miss; /* # missing status reads*/ |
167 | unsigned int stat_read_buf_num; | ||
167 | struct work_struct stat_work; | 168 | struct work_struct stat_work; |
168 | atomic_t status; /* status of this adapter */ | 169 | atomic_t status; /* status of this adapter */ |
169 | struct list_head erp_ready_head; /* error recovery for this | 170 | struct list_head erp_ready_head; /* error recovery for this |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 0be5e7ea2828..e3dbeda97179 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -714,7 +714,7 @@ static int zfcp_erp_adapter_strategy_open_fsf(struct zfcp_erp_action *act) | |||
714 | if (zfcp_erp_adapter_strategy_open_fsf_xport(act) == ZFCP_ERP_FAILED) | 714 | if (zfcp_erp_adapter_strategy_open_fsf_xport(act) == ZFCP_ERP_FAILED) |
715 | return ZFCP_ERP_FAILED; | 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 | if (zfcp_status_read_refill(act->adapter)) | 718 | if (zfcp_status_read_refill(act->adapter)) |
719 | return ZFCP_ERP_FAILED; | 719 | return ZFCP_ERP_FAILED; |
720 | 720 | ||
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 3822f22b8150..9f90b03ac97d 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -496,6 +496,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req) | |||
496 | 496 | ||
497 | adapter->hydra_version = bottom->adapter_type; | 497 | adapter->hydra_version = bottom->adapter_type; |
498 | adapter->timer_ticks = bottom->timer_interval; | 498 | adapter->timer_ticks = bottom->timer_interval; |
499 | adapter->stat_read_buf_num = max(bottom->status_read_buf_num, (u16)16); | ||
499 | 500 | ||
500 | if (fc_host_permanent_port_name(shost) == -1) | 501 | if (fc_host_permanent_port_name(shost) == -1) |
501 | fc_host_permanent_port_name(shost) = fc_host_port_name(shost); | 502 | fc_host_permanent_port_name(shost) = fc_host_port_name(shost); |
diff --git a/drivers/s390/scsi/zfcp_fsf.h b/drivers/s390/scsi/zfcp_fsf.h index 4008bd786793..519083fd6e89 100644 --- a/drivers/s390/scsi/zfcp_fsf.h +++ b/drivers/s390/scsi/zfcp_fsf.h | |||
@@ -366,7 +366,7 @@ struct fsf_qtcb_bottom_config { | |||
366 | u32 adapter_type; | 366 | u32 adapter_type; |
367 | u8 res0; | 367 | u8 res0; |
368 | u8 peer_d_id[3]; | 368 | u8 peer_d_id[3]; |
369 | u8 res1[2]; | 369 | u16 status_read_buf_num; |
370 | u16 timer_interval; | 370 | u16 timer_interval; |
371 | u8 res2[9]; | 371 | u8 res2[9]; |
372 | u8 s_id[3]; | 372 | u8 s_id[3]; |