diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 46292561c44c..8e6b10369717 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -1491,6 +1491,7 @@ enum { | |||
1491 | SRP_OPT_PKEY = 1 << 3, | 1491 | SRP_OPT_PKEY = 1 << 3, |
1492 | SRP_OPT_SERVICE_ID = 1 << 4, | 1492 | SRP_OPT_SERVICE_ID = 1 << 4, |
1493 | SRP_OPT_MAX_SECT = 1 << 5, | 1493 | SRP_OPT_MAX_SECT = 1 << 5, |
1494 | SRP_OPT_MAX_CMD_PER_LUN = 1 << 6, | ||
1494 | SRP_OPT_ALL = (SRP_OPT_ID_EXT | | 1495 | SRP_OPT_ALL = (SRP_OPT_ID_EXT | |
1495 | SRP_OPT_IOC_GUID | | 1496 | SRP_OPT_IOC_GUID | |
1496 | SRP_OPT_DGID | | 1497 | SRP_OPT_DGID | |
@@ -1499,13 +1500,14 @@ enum { | |||
1499 | }; | 1500 | }; |
1500 | 1501 | ||
1501 | static match_table_t srp_opt_tokens = { | 1502 | static match_table_t srp_opt_tokens = { |
1502 | { SRP_OPT_ID_EXT, "id_ext=%s" }, | 1503 | { SRP_OPT_ID_EXT, "id_ext=%s" }, |
1503 | { SRP_OPT_IOC_GUID, "ioc_guid=%s" }, | 1504 | { SRP_OPT_IOC_GUID, "ioc_guid=%s" }, |
1504 | { SRP_OPT_DGID, "dgid=%s" }, | 1505 | { SRP_OPT_DGID, "dgid=%s" }, |
1505 | { SRP_OPT_PKEY, "pkey=%x" }, | 1506 | { SRP_OPT_PKEY, "pkey=%x" }, |
1506 | { SRP_OPT_SERVICE_ID, "service_id=%s" }, | 1507 | { SRP_OPT_SERVICE_ID, "service_id=%s" }, |
1507 | { SRP_OPT_MAX_SECT, "max_sect=%d" }, | 1508 | { SRP_OPT_MAX_SECT, "max_sect=%d" }, |
1508 | { SRP_OPT_ERR, NULL } | 1509 | { SRP_OPT_MAX_CMD_PER_LUN, "max_cmd_per_lun=%d" }, |
1510 | { SRP_OPT_ERR, NULL } | ||
1509 | }; | 1511 | }; |
1510 | 1512 | ||
1511 | static int srp_parse_options(const char *buf, struct srp_target_port *target) | 1513 | static int srp_parse_options(const char *buf, struct srp_target_port *target) |
@@ -1581,6 +1583,14 @@ static int srp_parse_options(const char *buf, struct srp_target_port *target) | |||
1581 | target->scsi_host->max_sectors = token; | 1583 | target->scsi_host->max_sectors = token; |
1582 | break; | 1584 | break; |
1583 | 1585 | ||
1586 | case SRP_OPT_MAX_CMD_PER_LUN: | ||
1587 | if (match_int(args, &token)) { | ||
1588 | printk(KERN_WARNING PFX "bad max cmd_per_lun parameter '%s'\n", p); | ||
1589 | goto out; | ||
1590 | } | ||
1591 | target->scsi_host->cmd_per_lun = min(token, SRP_SQ_SIZE); | ||
1592 | break; | ||
1593 | |||
1584 | default: | 1594 | default: |
1585 | printk(KERN_WARNING PFX "unknown parameter or missing value " | 1595 | printk(KERN_WARNING PFX "unknown parameter or missing value " |
1586 | "'%s' in target creation request\n", p); | 1596 | "'%s' in target creation request\n", p); |