diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nvme-fc.h | 19 | ||||
| -rw-r--r-- | include/linux/nvme.h | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/nvme-fc.h b/include/linux/nvme-fc.h index 21c37e39e41a..36cca93a5ff2 100644 --- a/include/linux/nvme-fc.h +++ b/include/linux/nvme-fc.h | |||
| @@ -334,5 +334,24 @@ struct fcnvme_ls_disconnect_acc { | |||
| 334 | #define NVME_FC_LS_TIMEOUT_SEC 2 /* 2 seconds */ | 334 | #define NVME_FC_LS_TIMEOUT_SEC 2 /* 2 seconds */ |
| 335 | #define NVME_FC_TGTOP_TIMEOUT_SEC 2 /* 2 seconds */ | 335 | #define NVME_FC_TGTOP_TIMEOUT_SEC 2 /* 2 seconds */ |
| 336 | 336 | ||
| 337 | /* | ||
| 338 | * TRADDR string must be of form "nn-<16hexdigits>:pn-<16hexdigits>" | ||
| 339 | * the string is allowed to be specified with or without a "0x" prefix | ||
| 340 | * infront of the <16hexdigits>. Without is considered the "min" string | ||
| 341 | * and with is considered the "max" string. The hexdigits may be upper | ||
| 342 | * or lower case. | ||
| 343 | */ | ||
| 344 | #define NVME_FC_TRADDR_NNLEN 3 /* "?n-" */ | ||
| 345 | #define NVME_FC_TRADDR_OXNNLEN 5 /* "?n-0x" */ | ||
| 346 | #define NVME_FC_TRADDR_HEXNAMELEN 16 | ||
| 347 | #define NVME_FC_TRADDR_MINLENGTH \ | ||
| 348 | (2 * (NVME_FC_TRADDR_NNLEN + NVME_FC_TRADDR_HEXNAMELEN) + 1) | ||
| 349 | #define NVME_FC_TRADDR_MAXLENGTH \ | ||
| 350 | (2 * (NVME_FC_TRADDR_OXNNLEN + NVME_FC_TRADDR_HEXNAMELEN) + 1) | ||
| 351 | #define NVME_FC_TRADDR_MIN_PN_OFFSET \ | ||
| 352 | (NVME_FC_TRADDR_NNLEN + NVME_FC_TRADDR_HEXNAMELEN + 1) | ||
| 353 | #define NVME_FC_TRADDR_MAX_PN_OFFSET \ | ||
| 354 | (NVME_FC_TRADDR_OXNNLEN + NVME_FC_TRADDR_HEXNAMELEN + 1) | ||
| 355 | |||
| 337 | 356 | ||
| 338 | #endif /* _NVME_FC_H */ | 357 | #endif /* _NVME_FC_H */ |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index bc74da018bdc..25d8225dbd04 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -1006,7 +1006,7 @@ static inline bool nvme_is_write(struct nvme_command *cmd) | |||
| 1006 | * Why can't we simply have a Fabrics In and Fabrics out command? | 1006 | * Why can't we simply have a Fabrics In and Fabrics out command? |
| 1007 | */ | 1007 | */ |
| 1008 | if (unlikely(cmd->common.opcode == nvme_fabrics_command)) | 1008 | if (unlikely(cmd->common.opcode == nvme_fabrics_command)) |
| 1009 | return cmd->fabrics.opcode & 1; | 1009 | return cmd->fabrics.fctype & 1; |
| 1010 | return cmd->common.opcode & 1; | 1010 | return cmd->common.opcode & 1; |
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
