Commit cd17613f authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'block-6.10-20240628' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:
 "NVMe fixes via Keith:

   - Fabrics fixes (Hannes)

   - Missing module description (Jeff)

   - Clang warning fix (Nathan)"

* tag 'block-6.10-20240628' of git://git.kernel.dk/linux:
  nvmet-fc: Remove __counted_by from nvmet_fc_tgt_queue.fod[]
  nvmet: make 'tsas' attribute idempotent for RDMA
  nvme: fixup comment for nvme RDMA Provider Type
  nvme-apple: add missing MODULE_DESCRIPTION()
  nvmet: do not return 'reserved' for empty TSAS values
  nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA.
parents a2316dda cab598bc
...@@ -1602,4 +1602,5 @@ static struct platform_driver apple_nvme_driver = { ...@@ -1602,4 +1602,5 @@ static struct platform_driver apple_nvme_driver = {
module_platform_driver(apple_nvme_driver); module_platform_driver(apple_nvme_driver);
MODULE_AUTHOR("Sven Peter <sven@svenpeter.dev>"); MODULE_AUTHOR("Sven Peter <sven@svenpeter.dev>");
MODULE_DESCRIPTION("Apple ANS NVM Express device driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -502,7 +502,7 @@ static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head) ...@@ -502,7 +502,7 @@ static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head)
enum nvme_ns_features { enum nvme_ns_features {
NVME_NS_EXT_LBAS = 1 << 0, /* support extended LBA format */ NVME_NS_EXT_LBAS = 1 << 0, /* support extended LBA format */
NVME_NS_METADATA_SUPPORTED = 1 << 1, /* support getting generated md */ NVME_NS_METADATA_SUPPORTED = 1 << 1, /* support getting generated md */
NVME_NS_DEAC, /* DEAC bit in Write Zeores supported */ NVME_NS_DEAC = 1 << 2, /* DEAC bit in Write Zeores supported */
}; };
struct nvme_ns { struct nvme_ns {
......
...@@ -410,7 +410,29 @@ static ssize_t nvmet_addr_tsas_show(struct config_item *item, ...@@ -410,7 +410,29 @@ static ssize_t nvmet_addr_tsas_show(struct config_item *item,
return sprintf(page, "%s\n", nvmet_addr_tsas_rdma[i].name); return sprintf(page, "%s\n", nvmet_addr_tsas_rdma[i].name);
} }
} }
return sprintf(page, "reserved\n"); return sprintf(page, "\n");
}
static u8 nvmet_addr_tsas_rdma_store(const char *page)
{
int i;
for (i = 0; i < ARRAY_SIZE(nvmet_addr_tsas_rdma); i++) {
if (sysfs_streq(page, nvmet_addr_tsas_rdma[i].name))
return nvmet_addr_tsas_rdma[i].type;
}
return NVMF_RDMA_QPTYPE_INVALID;
}
static u8 nvmet_addr_tsas_tcp_store(const char *page)
{
int i;
for (i = 0; i < ARRAY_SIZE(nvmet_addr_tsas_tcp); i++) {
if (sysfs_streq(page, nvmet_addr_tsas_tcp[i].name))
return nvmet_addr_tsas_tcp[i].type;
}
return NVMF_TCP_SECTYPE_INVALID;
} }
static ssize_t nvmet_addr_tsas_store(struct config_item *item, static ssize_t nvmet_addr_tsas_store(struct config_item *item,
...@@ -418,20 +440,19 @@ static ssize_t nvmet_addr_tsas_store(struct config_item *item, ...@@ -418,20 +440,19 @@ static ssize_t nvmet_addr_tsas_store(struct config_item *item,
{ {
struct nvmet_port *port = to_nvmet_port(item); struct nvmet_port *port = to_nvmet_port(item);
u8 treq = nvmet_port_disc_addr_treq_mask(port); u8 treq = nvmet_port_disc_addr_treq_mask(port);
u8 sectype; u8 sectype, qptype;
int i;
if (nvmet_is_port_enabled(port, __func__)) if (nvmet_is_port_enabled(port, __func__))
return -EACCES; return -EACCES;
if (port->disc_addr.trtype != NVMF_TRTYPE_TCP) if (port->disc_addr.trtype == NVMF_TRTYPE_RDMA) {
return -EINVAL; qptype = nvmet_addr_tsas_rdma_store(page);
if (qptype == port->disc_addr.tsas.rdma.qptype)
for (i = 0; i < ARRAY_SIZE(nvmet_addr_tsas_tcp); i++) { return count;
if (sysfs_streq(page, nvmet_addr_tsas_tcp[i].name)) { } else if (port->disc_addr.trtype == NVMF_TRTYPE_TCP) {
sectype = nvmet_addr_tsas_tcp[i].type; sectype = nvmet_addr_tsas_tcp_store(page);
if (sectype != NVMF_TCP_SECTYPE_INVALID)
goto found; goto found;
}
} }
pr_err("Invalid value '%s' for tsas\n", page); pr_err("Invalid value '%s' for tsas\n", page);
......
...@@ -148,7 +148,7 @@ struct nvmet_fc_tgt_queue { ...@@ -148,7 +148,7 @@ struct nvmet_fc_tgt_queue {
struct workqueue_struct *work_q; struct workqueue_struct *work_q;
struct kref ref; struct kref ref;
/* array of fcp_iods */ /* array of fcp_iods */
struct nvmet_fc_fcp_iod fod[] __counted_by(sqsize); struct nvmet_fc_fcp_iod fod[] /* __counted_by(sqsize) */;
} __aligned(sizeof(unsigned long long)); } __aligned(sizeof(unsigned long long));
struct nvmet_fc_hostport { struct nvmet_fc_hostport {
......
...@@ -85,10 +85,11 @@ enum { ...@@ -85,10 +85,11 @@ enum {
enum { enum {
NVMF_RDMA_QPTYPE_CONNECTED = 1, /* Reliable Connected */ NVMF_RDMA_QPTYPE_CONNECTED = 1, /* Reliable Connected */
NVMF_RDMA_QPTYPE_DATAGRAM = 2, /* Reliable Datagram */ NVMF_RDMA_QPTYPE_DATAGRAM = 2, /* Reliable Datagram */
NVMF_RDMA_QPTYPE_INVALID = 0xff,
}; };
/* RDMA QP Service Type codes for Discovery Log Page entry TSAS /* RDMA Provider Type codes for Discovery Log Page entry TSAS
* RDMA_QPTYPE field * RDMA_PRTYPE field
*/ */
enum { enum {
NVMF_RDMA_PRTYPE_NOT_SPECIFIED = 1, /* No Provider Specified */ NVMF_RDMA_PRTYPE_NOT_SPECIFIED = 1, /* No Provider Specified */
...@@ -110,6 +111,7 @@ enum { ...@@ -110,6 +111,7 @@ enum {
NVMF_TCP_SECTYPE_NONE = 0, /* No Security */ NVMF_TCP_SECTYPE_NONE = 0, /* No Security */
NVMF_TCP_SECTYPE_TLS12 = 1, /* TLSv1.2, NVMe-oF 1.1 and NVMe-TCP 3.6.1.1 */ NVMF_TCP_SECTYPE_TLS12 = 1, /* TLSv1.2, NVMe-oF 1.1 and NVMe-TCP 3.6.1.1 */
NVMF_TCP_SECTYPE_TLS13 = 2, /* TLSv1.3, NVMe-oF 1.1 and NVMe-TCP 3.6.1.1 */ NVMF_TCP_SECTYPE_TLS13 = 2, /* TLSv1.3, NVMe-oF 1.1 and NVMe-TCP 3.6.1.1 */
NVMF_TCP_SECTYPE_INVALID = 0xff,
}; };
#define NVME_AQ_DEPTH 32 #define NVME_AQ_DEPTH 32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment