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, Apr 18, 12:38 PM
Unknown Object (File)
Feb 23 2024, 1:29 AM
Unknown Object (File)
Feb 8 2024, 6:01 PM
Unknown Object (File)
Jan 19 2024, 9:51 AM
Unknown Object (File)
Dec 24 2023, 1:06 AM
Unknown Object (File)
Dec 22 2023, 11:16 PM
Unknown Object (File)
Nov 26 2023, 2:04 PM
Unknown Object (File)
Nov 13 2023, 7:53 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.