Page MenuHomeFreeBSD

Fix sysutils/smartmontools following Sr329824

Authored by cy on Feb 23 2018, 7:29 AM.



Sr329824 changed a couple of data structures in dev/nvme/nvme.h. This revision chases the changes made in Sr329824 allowing sysutils/smartmontools to build again under -CURRENT.

Test Plan

builds OK.

Tests pass on my infrastructure at home. However additional testing by others with nvme controller would be appreciated.

Diff Detail

rP FreeBSD ports repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Looks OK, we'll test it on our hardware.

This revision is now accepted and ready to land.Feb 23 2018, 2:21 PM

Doesn't work on big-endian, I'll work on a fix.

This revision now requires changes to proceed.Feb 23 2018, 3:23 PM

Unfortunately I'm not able to test this today and provide a patch but I think what needs to be done is:

  • include <sys/endian.h>
  • add htole32() for in.nsid and also for every cdwXX field
  • call nvme_completion_swapbytes() before reading cdw0

I disagree. What you are suggesting should be a separate revision and a separate commit. Do not mix fixing a little endian build with adding big endian capability. They are two separate issues.

The steps must be:

  1. Fix the port's build as broken by Sr329824.
  1. Create a new revision to support big endian architectures.

Let's go ahead and commit this break fix and create a new big endian revision.

We'll handle the BE part.

Still waiting for maintainer ( approval. I sent an email Feb 22. No reply yet.

kan accepted this revision.EditedFeb 26 2018, 4:58 PM
kan added a subscriber: kan.

The fix has nothing to do with endianness and does not break anything that was was not broken before. Please commit.

As wma said, we'll make a follow-up commit fixing BE.

This revision is now accepted and ready to land.Feb 26 2018, 5:25 PM
This revision was automatically updated to reflect the committed changes.