Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286233
b: refs/heads/master
c: 5181423
h: refs/heads/master
i:
  286231: 9329473
v: v3
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent a1aabfd commit 5d831ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a53295b6998f62d961c29e54051c1cf1d738c2b3
refs/heads/master: 51814232ecae90f888c902e252306df8d017f0dd
10 changes: 9 additions & 1 deletion trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ struct nvme_dev {
struct msix_entry *entry;
struct nvme_bar __iomem *bar;
struct list_head namespaces;
char serial[20];
char model[40];
char firmware_rev[8];
};

/*
Expand Down Expand Up @@ -979,6 +982,7 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev)
{
int res, nn, i;
struct nvme_ns *ns, *next;
struct nvme_id_ctrl *ctrl;
void *id;
dma_addr_t dma_addr;
struct nvme_command cid, crt;
Expand All @@ -1003,7 +1007,11 @@ static int __devinit nvme_dev_add(struct nvme_dev *dev)
goto out_free;
}

nn = le32_to_cpup(&((struct nvme_id_ctrl *)id)->nn);
ctrl = id;
nn = le32_to_cpup(&ctrl->nn);
memcpy(dev->serial, ctrl->sn, sizeof(ctrl->sn));
memcpy(dev->model, ctrl->mn, sizeof(ctrl->mn));
memcpy(dev->firmware_rev, ctrl->fr, sizeof(ctrl->fr));

cid.identify.cns = 0;
memset(&crt, 0, sizeof(crt));
Expand Down

0 comments on commit 5d831ad

Please sign in to comment.