Comments (4)
Is this PPC little or big endian?
from nvme-cli.
I assume big since i don't see any problems on little endian machines, and the code looks wrong for big endian anyway. Could you try a patch to confirm? I might just push this anyway, but want to be sure if fixes the issue.
---
diff --git a/nvme-ioctl.c b/nvme-ioctl.c
index 2a26ca2..c0d659b 100644
--- a/nvme-ioctl.c
+++ b/nvme-ioctl.c
@@ -363,10 +363,8 @@ int nvme_get_log(int fd, __u32 nsid, __u8 log_id, __u32 data_len, void *data)
.data_len = data_len,
};
__u32 numd = (data_len >> 2) - 1;
- __le16 numdu, numdl;
+ __u16 numdu = numd >> 16, numdl = numd & 0xffff;
- numdu = htole16((numd & 0xFFFF0000) >> 16);
- numdl = htole16(numd & 0x0000FFFF);
cmd.cdw10 = log_id | (numdl << 16);
cmd.cdw11 = numdu;
--
from nvme-cli.
I would be happy to try a patch
I added the following to the nvme_get_log function
__u16 numdu = numd >> 16, numdl = numd & 0xffff;
And commented out these lines.
__le16 numdu, numdl;
numdu = htole16((numd & 0xFFFF0000) >> 16);
numdl = htole16(numd & 0x0000FFFF);
recompiled and now fw-log works … Thank you!
Thank you
Gary
From: Keith Busch [mailto:[email protected]]
Sent: Friday, August 5, 2016 3:55 PM
To: linux-nvme/nvme-cli [email protected]
Cc: Gary Geike [email protected]; Author [email protected]
Subject: Re: [linux-nvme/nvme-cli] nvme fw-log not working in version 0.8 - INVALID_FIELD(4002) (#104)
I assume big since i don't see any problems on little endian machines, and the code looks wrong for big endian anyway. Could you try a patch to confirm? I might just push this anyway, but want to be sure if fixes the issue.
diff --git a/nvme-ioctl.c b/nvme-ioctl.c
index 2a26ca2..c0d659b 100644
--- a/nvme-ioctl.c
+++ b/nvme-ioctl.c
@@ -363,10 +363,8 @@ int nvme_get_log(int fd, __u32 nsid, __u8 log_id, __u32 data_len, void *data)
.data_len = data_len,
};
__u32 numd = (data_len >> 2) - 1;
- __le16 numdu, numdl;
- __u16 numdu = numd >> 16, numdl = numd & 0xffff;
- numdu = htole16((numd & 0xFFFF0000) >> 16);
- numdl = htole16(numd & 0x0000FFFF);
cmd.cdw10 = log_id | (numdl << 16);
cmd.cdw11 = numdu;
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/104#issuecomment-237963753, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALHCSlWiNofw9HIwhl1x3d6vB4HtLJvBks5qc6MlgaJpZM4JeAs-.
Western Digital Corporation (and its subsidiaries) E-mail Confidentiality Notice & Disclaimer:
This e-mail and any files transmitted with it may contain confidential or legally privileged information of WDC and/or its affiliates, and are intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited. If you have received this e-mail in error, please notify the sender immediately and delete the e-mail in its entirety from your system.
from nvme-cli.
Thanks, fixed pushed here:
from nvme-cli.
Related Issues (20)
- Supported Log Pages crashed when using json output HOT 1
- Not a issue but a unexpected behaviour on different firmware on nvme ns size HOT 6
- [bug report]blktests nvme/029 failed from v2.7 on s390x HOT 5
- RFE: Perform actual discovery in discover_from_nbft() HOT 8
- nvme wdc cap-diag /dev/nvme0 - Decode HOT 3
- Fabrics connect for large number of connections too slow with v2.8 HOT 73
- Commands fail on nvme-cli 2.x when nvme_core module isn't loaded, regression from nvme-cli 1.x HOT 2
- nvme format fails HOT 6
- Wrong capacity for drive under usage with nvme-cli 2.8. HOT 8
- rpmb_program_auth_key does not request the result of key programming HOT 2
- can nvme discover a target which listen on a AF_IB(gid) address? HOT 1
- Samsung SSD 980 1TB: can't download firmware HOT 41
- nvme-cli 2.8 unable to use plugin function HOT 2
- nvme get-property/set-property shows Invalid Command Opcode (0x6001) HOT 1
- 2.9: build fails HOT 5
- -- EDIT: mistakenly opened issue, please delete
- No output logs in fw-download HOT 8
- Network dropped connection on reset HOT 5
- `nvme connect` with TLS enabled is unstable HOT 2
- cannot create new ns after removing old one HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvme-cli.