]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srpt: Update sport->port_guid with each port refresh
authorDoug Ledford <dledford@redhat.com>
Wed, 24 Aug 2016 16:14:19 +0000 (12:14 -0400)
committerDoug Ledford <dledford@redhat.com>
Wed, 24 Aug 2016 20:51:16 +0000 (16:51 -0400)
commita605720b96ba5f1cbe8292cac250c1b7396aacee
tree9457baf9103fe21bfd7664fb616c0146adbb6518
parentc2c85c3ef57583f24a446e6dfcb2b0b3ba161179
IB/srpt: Update sport->port_guid with each port refresh

If port_guid is set with the default subnet_prefix, then we get a change
event and run a port refresh, we don't update the port_guid.  As a
result, attempts to create a target device that uses the new
subnet_prefix in the wwn will fail to find a match and be rejected by
the ib_srpt driver.  This makes it impossible to configure a port if it
was initialized with a default subnet_prefix and later changed to any
non-default subnet-prefix.  Updating the port refresh task to always
update the wwn based upon the current subnext_prefix solves this
problem.

Cc: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: nab@linux-iscsi.org
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srpt/ib_srpt.c