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)
Sun, Mar 1, 3:18 PM
Unknown Object (File)
Sat, Feb 14, 12:58 PM
Unknown Object (File)
Sun, Feb 8, 6:21 PM
Unknown Object (File)
Feb 2 2026, 1:49 PM
Unknown Object (File)
Jan 30 2026, 9:54 AM
Unknown Object (File)
Jan 26 2026, 8:33 PM
Unknown Object (File)
Jan 26 2026, 7:48 PM
Unknown Object (File)
Jan 19 2026, 8:20 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.