Skip to content

Commit

Permalink
Revert "nvme: add bug report info for global duplicate id"
Browse files Browse the repository at this point in the history
This reverts commit af4b149.
  • Loading branch information
xanmod committed Jul 30, 2022
1 parent 5711c19 commit 0e21949
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 45 deletions.
1 change: 0 additions & 1 deletion drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3690,7 +3690,6 @@ static struct nvme_ns_head *nvme_alloc_ns_head(struct nvme_ctrl *ctrl,
if (ret) {
dev_err(ctrl->device,
"duplicate IDs for nsid %d\n", nsid);
nvme_print_device_info(ctrl);
goto out_cleanup_srcu;
}

Expand Down
28 changes: 0 additions & 28 deletions drivers/nvme/host/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ struct nvme_ctrl_ops {
void (*delete_ctrl)(struct nvme_ctrl *ctrl);
void (*stop_ctrl)(struct nvme_ctrl *ctrl);
int (*get_address)(struct nvme_ctrl *ctrl, char *buf, int size);
void (*print_device_info)(struct nvme_ctrl *ctrl);
};

/*
Expand Down Expand Up @@ -543,33 +542,6 @@ static inline struct request *nvme_cid_to_rq(struct blk_mq_tags *tags,
return blk_mq_tag_to_rq(tags, nvme_tag_from_cid(command_id));
}

/*
* Return the length of the string without the space padding
*/
static inline int nvme_strlen(char *s, int len)
{
while (s[len - 1] == ' ')
len--;
return len;
}

static inline void nvme_print_device_info(struct nvme_ctrl *ctrl)
{
struct nvme_subsystem *subsys = ctrl->subsys;

if (ctrl->ops->print_device_info) {
ctrl->ops->print_device_info(ctrl);
return;
}

dev_err(ctrl->device,
"VID:%04x model:%.*s firmware:%.*s\n", subsys->vendor_id,
nvme_strlen(subsys->model, sizeof(subsys->model)),
subsys->model, nvme_strlen(subsys->firmware_rev,
sizeof(subsys->firmware_rev)),
subsys->firmware_rev);
}

#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS
void nvme_fault_inject_init(struct nvme_fault_inject *fault_inj,
const char *dev_name);
Expand Down
16 changes: 0 additions & 16 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2875,21 +2875,6 @@ static int nvme_pci_get_address(struct nvme_ctrl *ctrl, char *buf, int size)
return snprintf(buf, size, "%s\n", dev_name(&pdev->dev));
}


static void nvme_pci_print_device_info(struct nvme_ctrl *ctrl)
{
struct pci_dev *pdev = to_pci_dev(to_nvme_dev(ctrl)->dev);
struct nvme_subsystem *subsys = ctrl->subsys;

dev_err(ctrl->device,
"VID:DID %04x:%04x model:%.*s firmware:%.*s\n",
pdev->vendor, pdev->device,
nvme_strlen(subsys->model, sizeof(subsys->model)),
subsys->model, nvme_strlen(subsys->firmware_rev,
sizeof(subsys->firmware_rev)),
subsys->firmware_rev);
}

static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = {
.name = "pcie",
.module = THIS_MODULE,
Expand All @@ -2901,7 +2886,6 @@ static const struct nvme_ctrl_ops nvme_pci_ctrl_ops = {
.free_ctrl = nvme_pci_free_ctrl,
.submit_async_event = nvme_pci_submit_async_event,
.get_address = nvme_pci_get_address,
.print_device_info = nvme_pci_print_device_info,
};

static int nvme_dev_map(struct nvme_dev *dev)
Expand Down

0 comments on commit 0e21949

Please sign in to comment.