]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/ulp/srp/ib_srp.c
IB/srp: Add QoS support through service ID
[karo-tx-linux.git] / drivers / infiniband / ulp / srp / ib_srp.c
index fb6c5798daf3852cfbbb6ed28590395671d034a4..9ccc63886d92904911a46a1630747478df12693d 100644 (file)
@@ -107,9 +107,11 @@ static const char *srp_target_info(struct Scsi_Host *host)
 static int srp_target_is_topspin(struct srp_target_port *target)
 {
        static const u8 topspin_oui[3] = { 0x00, 0x05, 0xad };
+       static const u8 cisco_oui[3]   = { 0x00, 0x1b, 0x0d };
 
        return topspin_workarounds &&
-               !memcmp(&target->ioc_guid, topspin_oui, sizeof topspin_oui);
+               (!memcmp(&target->ioc_guid, topspin_oui, sizeof topspin_oui) ||
+                !memcmp(&target->ioc_guid, cisco_oui, sizeof cisco_oui));
 }
 
 static int srp_target_is_mellanox(struct srp_target_port *target)
@@ -283,6 +285,7 @@ static int srp_lookup_path(struct srp_target_port *target)
                                                   target->srp_host->dev->dev,
                                                   target->srp_host->port,
                                                   &target->path,
+                                                  IB_SA_PATH_REC_SERVICE_ID    |
                                                   IB_SA_PATH_REC_DGID          |
                                                   IB_SA_PATH_REC_SGID          |
                                                   IB_SA_PATH_REC_NUMB_PATH     |
@@ -1690,6 +1693,7 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target)
                                goto out;
                        }
                        target->service_id = cpu_to_be64(simple_strtoull(p, NULL, 16));
+                       target->path.service_id = target->service_id;
                        kfree(p);
                        break;