summaryrefslogtreecommitdiff
path: root/drivers/scsi/ibmvscsi_tgt
diff options
context:
space:
mode:
authorMichael Cyr <mikecyr@us.ibm.com>2017-03-17 00:48:20 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-22 11:43:36 (GMT)
commit29022860df8efabdf0a2d356fd614d4dba2791a5 (patch)
tree38a8cf42421420b773edc3f4a136418a3d6d046c /drivers/scsi/ibmvscsi_tgt
parent0ad1d7660a57152ab6c7ae8ff5d02b6460b281a8 (diff)
downloadlinux-29022860df8efabdf0a2d356fd614d4dba2791a5.tar.xz
scsi: ibmvscsis: Return correct partition name/# to client
[ Upstream commit 9c93cf03d4eb3dc58931ff7cac0af9c344fe5e0b ] Signed-off-by: Michael Cyr <mikecyr@us.ibm.com> Signed-off-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com> Tested-by: Steven Royer <seroyer@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/ibmvscsi_tgt')
-rw-r--r--drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index 292a3f3..8d5eeb1 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -3387,6 +3387,9 @@ static int ibmvscsis_probe(struct vio_dev *vdev,
strncat(vscsi->eye, vdev->name, MAX_EYE);
vscsi->dds.unit_id = vdev->unit_address;
+ strncpy(vscsi->dds.partition_name, partition_name,
+ sizeof(vscsi->dds.partition_name));
+ vscsi->dds.partition_num = partition_number;
spin_lock_bh(&ibmvscsis_dev_lock);
list_add_tail(&vscsi->list, &ibmvscsis_dev_list);
@@ -3603,7 +3606,7 @@ static int ibmvscsis_get_system_info(void)
num = of_get_property(rootdn, "ibm,partition-no", NULL);
if (num)
- partition_number = *num;
+ partition_number = of_read_number(num, 1);
of_node_put(rootdn);