Skip to content

Commit d1df091

Browse files
author
Kelvin Cao
committed
Merge branch 'devel'
2 parents ea22940 + 9f0f8fd commit d1df091

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ install-man:
6767

6868
install-bin: default
6969
$(INSTALL) -d $(DESTDIR)$(SBINDIR)
70-
$(INSTALL) -m 755 nvme $(DESTDIR)$(SBINDIR)
70+
$(INSTALL) -m 755 $(NVME) $(DESTDIR)$(SBINDIR)
7171

7272
install-bash-completion:
7373
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/bash_completion.d

switchtec-nvme-device.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ struct switchtec_device_manage_nvme_rsp
4545
{
4646
struct switchtec_device_manage_rsp_hdr hdr;
4747
uint32_t nvme_cqe[4];
48-
uint8_t nvme_data[MRPC_MAX_DATA_LEN -
49-
sizeof(struct switchtec_device_manage_rsp_hdr) -
50-
(4 * 4)];
48+
uint8_t nvme_data[SWITCHTEC_DEVICE_MANAGE_MAX_RESP - (4 * 4)];
5149
};
5250

5351
int pax_nvme_submit_admin_passthru(int fd, struct nvme_passthru_cmd *cmd)
@@ -78,7 +76,7 @@ int pax_nvme_submit_admin_passthru(int fd, struct nvme_passthru_cmd *cmd)
7876

7977
memcpy(req.nvme_data, (void *)cmd->addr, data_len);
8078

81-
req.hdr.expected_rsp_len = (sizeof(rsp.nvme_cqe) + sizeof(rsp.nvme_data))/4;
79+
req.hdr.expected_rsp_len = (sizeof(rsp.nvme_cqe) + sizeof(rsp.nvme_data));
8280

8381
ret = switchtec_device_manage(pax->dev,
8482
(struct switchtec_device_manage_req *)&req,
@@ -95,7 +93,7 @@ int pax_nvme_submit_admin_passthru(int fd, struct nvme_passthru_cmd *cmd)
9593
if (!write) {
9694
memcpy((uint64_t *)cmd->addr,
9795
rsp.nvme_data,
98-
(rsp.hdr.rsp_len - 4) * 4);
96+
rsp.hdr.rsp_len - 4 * 4);
9997
}
10098
}
10199

0 commit comments

Comments
 (0)