Page MenuHomeFreeBSD

smartpqi: Change alignment for dma tags
ClosedPublic

Authored by john.hall_microchip.com on Aug 28 2023, 5:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 21 2026, 11:49 PM
Unknown Object (File)
May 20 2026, 11:09 PM
Unknown Object (File)
May 14 2026, 1:27 PM
Unknown Object (File)
May 14 2026, 3:55 AM
Unknown Object (File)
May 14 2026, 2:47 AM
Unknown Object (File)
May 11 2026, 11:02 AM
Unknown Object (File)
May 10 2026, 10:58 AM
Unknown Object (File)
May 6 2026, 1:48 AM

Details

Summary

Problem: Under certain I/O conditions, a program doing large block disk reads can cause a controller to crash.

Root Cause: The SCSI read request and destination address in the BDMA descriptor is incorrect, causing the BDMA engine in the controller to assert.

Fix: Change the alignment for creating bus_dma_tags in the driver from PAGE_SIZE (4k) to 1, which allows the controller to manage it's own address range for BDMA transactions.

Risk: Medium

Exposure: This reverts a change first made to support NVMe drives on
Excalibur. At that time a 4k alignment was necessary. This no longer seems to be the case.

PR: 259541
Reported by: Ka Ho Ng <khng@freebsd.org>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I have testesd 14.0-BETA4 amd64 with and without this patch. dd'ing 100GB of /dev/random to a file on the SATA-booted drive works with both. This was definitely a problem with previous releases.

I will try this with ZFS, which appears to have been problematic with a previous 14.0-CURRENT snapshot.

I have tested this with root-on-ZFS using a memstick installer build from my patched /usr/src

The system appears to be stable with both patched and unpatched 14.0-BETA4.

Could this have been resolved elsewhere?

Thanks for looking at the code. We are able to see sporadic problems when running "diskinfo -i /dev/daX" doing large asynchronous random reads (1024 kbytes) . The patch resolves the problem.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 19 2023, 3:25 AM
This revision was automatically updated to reflect the committed changes.