Re: [PATCH] mpt3sas: don't change the dma coherent mask after allocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 24, 2020 at 04:16:47PM +0530, Sreekanth Reddy wrote:
> Our HBA hardware has a requirement that each set of RDPQ reply
> descriptor pools should be within the 4gb region. so to accommodate
> this requirement driver is first setting the DMA coherent mask to 32
> bit then allocating the RDPQ pools

So far the requirement makes sense.

> and then resetting the DMA coherent
> make to 64 and allocating the remaining pools.

And this is where the trouble start.  You simply can't reset the mask
with outstanding allocations.  This breaks various implementations that
change the allocator based on the mask.

> if we completely set the DMA coherent mask to 32 bit then there are
> chances that sometimes driver may not get requested memory within the
> first 4gb region and HBA initialization may fail. So instead of
> setting the DMA coherent mask to 32 bit, we follow the same below
> logic which megaraid_sas driver is doing now. i.e we first allocate
> set of rdpq pools at once and check this allocated block is within the
> 4gb region, if not then free this block and allocate a new block from
> aligned pci pool.

Which is completely broken.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux