mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 10:41:26 +00:00
Made show_login_info() work for InfiniBand HCA's with more than two
ports. show_login_info() produces the information that can be retrieved from /sys/class/infiniband_srpt/srpt-*/login_info. Note: as of today there do not yet exist any InfiniBand HCA's with more than two ports. Thanks to Frank Zago for reporting this issue. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@799 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2107,7 +2107,7 @@ static ssize_t show_login_info(struct device *dev,
|
||||
for (i = 0; i < sdev->device->phys_port_cnt; i++) {
|
||||
sport = &sdev->port[i];
|
||||
|
||||
len += sprintf(buf,
|
||||
len += sprintf(buf + len,
|
||||
"tid_ext=%016llx,ioc_guid=%016llx,pkey=ffff,"
|
||||
"dgid=%04x%04x%04x%04x%04x%04x%04x%04x,"
|
||||
"service_id=%016llx\n",
|
||||
@@ -2122,7 +2122,6 @@ static ssize_t show_login_info(struct device *dev,
|
||||
be16_to_cpu(((__be16 *) sport->gid.raw)[6]),
|
||||
be16_to_cpu(((__be16 *) sport->gid.raw)[7]),
|
||||
(unsigned long long) mellanox_ioc_guid);
|
||||
buf += len;
|
||||
}
|
||||
|
||||
return len;
|
||||
|
||||
Reference in New Issue
Block a user