提交 52d7e861 编写于 作者: B Brian King 提交者: James Bottomley

[SCSI] ibmvfc: Miscellaneous fixes

Properly setup the size of the async event queue. This fixes a bug where async events
were not getting processed by the driver.

Setup target_id field in the driver's target struct so that target sysfs attributes
work for multiple targets.
Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 2d0da2a4
...@@ -1136,7 +1136,7 @@ static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) ...@@ -1136,7 +1136,7 @@ static void ibmvfc_set_login_info(struct ibmvfc_host *vhost)
login_info->max_cmds = max_requests + IBMVFC_NUM_INTERNAL_REQ; login_info->max_cmds = max_requests + IBMVFC_NUM_INTERNAL_REQ;
login_info->capabilities = IBMVFC_CAN_MIGRATE; login_info->capabilities = IBMVFC_CAN_MIGRATE;
login_info->async.va = vhost->async_crq.msg_token; login_info->async.va = vhost->async_crq.msg_token;
login_info->async.len = vhost->async_crq.size; login_info->async.len = vhost->async_crq.size * sizeof(*vhost->async_crq.msgs);
strncpy(login_info->partition_name, vhost->partition_name, IBMVFC_MAX_NAME); strncpy(login_info->partition_name, vhost->partition_name, IBMVFC_MAX_NAME);
strncpy(login_info->device_name, strncpy(login_info->device_name,
vhost->host->shost_gendev.bus_id, IBMVFC_MAX_NAME); vhost->host->shost_gendev.bus_id, IBMVFC_MAX_NAME);
...@@ -3348,6 +3348,7 @@ static void ibmvfc_tgt_add_rport(struct ibmvfc_target *tgt) ...@@ -3348,6 +3348,7 @@ static void ibmvfc_tgt_add_rport(struct ibmvfc_target *tgt)
tgt_dbg(tgt, "rport add succeeded\n"); tgt_dbg(tgt, "rport add succeeded\n");
rport->maxframe_size = tgt->service_parms.common.bb_rcv_sz & 0x0fff; rport->maxframe_size = tgt->service_parms.common.bb_rcv_sz & 0x0fff;
rport->supported_classes = 0; rport->supported_classes = 0;
tgt->target_id = rport->scsi_target_id;
if (tgt->service_parms.class1_parms[0] & 0x80000000) if (tgt->service_parms.class1_parms[0] & 0x80000000)
rport->supported_classes |= FC_COS_CLASS1; rport->supported_classes |= FC_COS_CLASS1;
if (tgt->service_parms.class2_parms[0] & 0x80000000) if (tgt->service_parms.class2_parms[0] & 0x80000000)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册