diff options
author | Chaitra P B <chaitra.basappa@broadcom.com> | 2018-04-24 11:28:32 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-05-08 06:34:19 +0200 |
commit | 93204b782a88f2067ff83cb732b66236644c4c56 (patch) | |
tree | 13fb19f1cc3ced8e013ee263f833d3dfdc3e0edb /drivers/scsi/mpt3sas/mpt3sas_base.h | |
parent | scsi: mpt3sas: Pre-allocate RDPQ Array at driver boot time. (diff) | |
download | linux-93204b782a88f2067ff83cb732b66236644c4c56.tar.xz linux-93204b782a88f2067ff83cb732b66236644c4c56.zip |
scsi: mpt3sas: Lockless access for chain buffers.
Introduces Chain lookup table/tracker and implements accessing chain
buffer using smid. Removed link list based access of chain buffer which
requires lock and allocated as many chains needed.
Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_base.h')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_base.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index d31a1912d31b..eeeb3b711144 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -770,7 +770,11 @@ struct pcie_sg_list { struct chain_tracker { void *chain_buffer; dma_addr_t chain_buffer_dma; - struct list_head tracker_list; +}; + +struct chain_lookup { + struct chain_tracker *chains_per_smid; + atomic_t chain_offset; }; /** @@ -1261,7 +1265,7 @@ struct MPT3SAS_ADAPTER { u32 page_size; /* chain */ - struct chain_tracker *chain_lookup; + struct chain_lookup *chain_lookup; struct list_head free_chain_list; struct dma_pool *chain_dma_pool; ulong chain_pages; |