Page MenuHomeFreeBSD

Fix sysutils/smartmontools following Sr329824
ClosedPublic

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

Details

Summary

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

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

cy created this revision.Feb 23 2018, 7:29 AM

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

imp accepted this revision.Feb 23 2018, 2:21 PM

Looks good to me.

This revision is now accepted and ready to land.Feb 23 2018, 2:21 PM
mst_semihalf.com requested changes to this revision.Feb 23 2018, 3:23 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
cy added a comment.Feb 23 2018, 6:38 PM

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.

wma accepted this revision.Feb 24 2018, 8:07 AM

We'll handle the BE part.

cy added a comment.Feb 25 2018, 5:08 AM

Still waiting for maintainer (samm@os2.kiev.ua) 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.

mst_semihalf.com accepted this revision.Feb 26 2018, 5:25 PM

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.