Page MenuHomeFreeBSD

Put a workaround in for command timeout malfunctioning
ClosedPublic

Authored by imp on Oct 25 2018, 8:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 5:23 PM
Unknown Object (File)
Wed, Dec 4, 11:10 PM
Unknown Object (File)
Nov 14 2024, 1:25 AM
Unknown Object (File)
Nov 13 2024, 3:15 PM
Unknown Object (File)
Oct 18 2024, 8:21 PM
Unknown Object (File)
Oct 18 2024, 8:21 PM
Unknown Object (File)
Oct 18 2024, 8:20 PM
Unknown Object (File)
Oct 18 2024, 8:20 PM
Subscribers
None

Details

Summary

At least one NVMe drive has a bug that makeing the Command Time Out
PCIe feature unreliable. The workaround is to disable this
feature. The driver wouldn't deal correctly with a timeout anyway.
Only do this for drives that are known bad.

Sponsored by: Netflix, Inc

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I think you mean "completion timeout", not "command timeout" - in both the commit message and some of the comments.

sys/dev/nvme/nvme.c
289 ↗(On Diff #49631)

DEVICE_CTL2 is 16 bits, not 32. This functionally still works, but I think a uint16_t would be more precise.

sys/dev/nvme/nvme_private.h
251 ↗(On Diff #49631)

Whitespace looks inconsistent in general with the line before it.

This revision now requires changes to proceed.Oct 25 2018, 9:30 PM
sys/dev/nvme/nvme_private.h
251 ↗(On Diff #49631)

This comment should probably say "PCIe completion timeout" instead of "transaction timeout".

imp marked 2 inline comments as done.Oct 25 2018, 10:33 PM
imp added inline comments.
sys/dev/nvme/nvme.c
289 ↗(On Diff #49631)

OK. I see that now. The vendor spec I got about this problem listed the upper 2 bytes as reserved anyway. The PCIe spec, however is clear that the next two bytes are for status (even though the spec defines it as MBZ).

sys/dev/nvme/nvme_private.h
251 ↗(On Diff #49631)

OK to both.

imp marked 4 inline comments as done.Oct 25 2018, 10:35 PM
imp added inline comments.
sys/dev/nvme/nvme_private.h
251 ↗(On Diff #49631)

I know that this looks misaligned, at least on my screen, but in an X term with fixed font they line up properly.

This revision is now accepted and ready to land.Oct 25 2018, 10:38 PM
This revision was automatically updated to reflect the committed changes.