diff options
author | John Hall <john.hall@microchip.com> | 2023-10-19 03:25:32 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2023-10-19 21:21:11 +0000 |
commit | 01619a8fafcfd99d1811b2c14a92bac1a48c6d31 (patch) | |
tree | d59496897c561ae8925c2d2e918773c2cd803e7f | |
parent | 1ad148a68ae74f3372b12b6e66fadf5ade384144 (diff) | |
download | src-01619a8fafcfd99d1811b2c14a92bac1a48c6d31.tar.gz src-01619a8fafcfd99d1811b2c14a92bac1a48c6d31.zip |
smartpqi: Change alignment for dma tags
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>
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41619
(cherry picked from commit f07b267d8cc87e88be3c78aa69504b5ebc6571ee)
-rw-r--r-- | sys/dev/smartpqi/smartpqi_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/smartpqi/smartpqi_main.c b/sys/dev/smartpqi/smartpqi_main.c index e79a6f0a173f..402841bbf4d6 100644 --- a/sys/dev/smartpqi/smartpqi_main.c +++ b/sys/dev/smartpqi/smartpqi_main.c @@ -629,8 +629,8 @@ smartpqi_attach(device_t dev) * Create DMA tag for mapping buffers into controller-addressable space. */ if (bus_dma_tag_create(softs->os_specific.pqi_parent_dmat,/* parent */ - PAGE_SIZE, 0, /* algnmnt, boundary */ - BUS_SPACE_MAXADDR,/* lowaddr */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ (bus_size_t)softs->pqi_cap.max_sg_elem*PAGE_SIZE,/* maxsize */ |