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)
Fri, Aug 8, 10:59 AM
Unknown Object (File)
Mon, Aug 4, 4:54 AM
Unknown Object (File)
Fri, Jul 25, 3:36 PM
Unknown Object (File)
Fri, Jul 25, 12:07 AM
Unknown Object (File)
Jul 9 2025, 4:26 AM
Unknown Object (File)
Jul 9 2025, 1:11 AM
Unknown Object (File)
Jul 8 2025, 4:20 PM
Unknown Object (File)
Jul 7 2025, 6:29 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.