On Wed, Apr 15, 2020 at 09:25:24AM -0400, Suganath Prabu wrote: > From: Suganath Prabu S <suganath-prabu.subramani@xxxxxxxxxxxx> > > For INVADER_SERIES each set of 8 reply queues (0 - 7, 8 - 15,..) and > VENTURA_SERIES each set of 16 reply queues (0 - 15, 16 - 31,..) should > be within 4 GB boundary. Driver uses limitation of VENTURA_SERIES to > manage INVADER_SERIES as well. So here driver is allocating the DMA able > memory for RDPQ's accordingly. > > 1) At driver load, set DMA Mask to 64 and allocate memory for RDPQ's. > 2) Check if allocated resources for RDPQ are in the same 4GB range. > 3) If #2 is true, continue with 64 bit DMA and go to #6 > 4) If #2 is false, then free all the resources from #1. > 5) Set DMA mask to 32 and allocate RDPQ's. > 6) Proceed with driver loading and other allocations > --- > v1 Change log: > 1) Use one dma pool for RDPQ's, thus removes the logic of using second > dma pool with align. > > Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@xxxxxxxxxxxx> > --- > drivers/scsi/mpt3sas/mpt3sas_base.c | 153 +++++++++++++++++++++++++----------- > drivers/scsi/mpt3sas/mpt3sas_base.h | 1 + > 2 files changed, 107 insertions(+), 47 deletions(-) > > diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c > index 27c829e..add23d7 100644 > --- a/drivers/scsi/mpt3sas/mpt3sas_base.c > +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c > @@ -3345,7 +3345,6 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc) > > pci_set_master(pdev); > > - > if (_base_config_dma_addressing(ioc, pdev) != 0) { Unrelated spurious whitespace change. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>