Commit 00f0a51f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

DAC960: don't use block layer bounce buffers

DAC960 just sets the block bounce limit to the dma mask, which means
that the iommu or swiotlb already take care of the bounce buffering,
and the block bouncing can be removed.
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5c26e050
...@@ -1179,7 +1179,6 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T ...@@ -1179,7 +1179,6 @@ static bool DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32))) if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
return DAC960_Failure(Controller, "DMA mask out of range"); return DAC960_Failure(Controller, "DMA mask out of range");
Controller->BounceBufferLimit = DMA_BIT_MASK(32);
if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) { if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) {
CommandMailboxesSize = 0; CommandMailboxesSize = 0;
...@@ -1380,11 +1379,8 @@ static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T ...@@ -1380,11 +1379,8 @@ static bool DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
dma_addr_t CommandMailboxDMA; dma_addr_t CommandMailboxDMA;
DAC960_V2_CommandStatus_T CommandStatus; DAC960_V2_CommandStatus_T CommandStatus;
if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(64))) if (pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(64)) &&
Controller->BounceBufferLimit = DMA_BIT_MASK(64); pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
else if (!pci_set_dma_mask(Controller->PCIDevice, DMA_BIT_MASK(32)))
Controller->BounceBufferLimit = DMA_BIT_MASK(32);
else
return DAC960_Failure(Controller, "DMA mask out of range"); return DAC960_Failure(Controller, "DMA mask out of range");
/* This is a temporary dma mapping, used only in the scope of this function */ /* This is a temporary dma mapping, used only in the scope of this function */
...@@ -2540,7 +2536,6 @@ static bool DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller) ...@@ -2540,7 +2536,6 @@ static bool DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
continue; continue;
} }
Controller->RequestQueue[n] = RequestQueue; Controller->RequestQueue[n] = RequestQueue;
blk_queue_bounce_limit(RequestQueue, Controller->BounceBufferLimit);
RequestQueue->queuedata = Controller; RequestQueue->queuedata = Controller;
blk_queue_max_segments(RequestQueue, Controller->DriverScatterGatherLimit); blk_queue_max_segments(RequestQueue, Controller->DriverScatterGatherLimit);
blk_queue_max_hw_sectors(RequestQueue, Controller->MaxBlocksPerCommand); blk_queue_max_hw_sectors(RequestQueue, Controller->MaxBlocksPerCommand);
......
...@@ -2295,7 +2295,6 @@ typedef struct DAC960_Controller ...@@ -2295,7 +2295,6 @@ typedef struct DAC960_Controller
unsigned short MaxBlocksPerCommand; unsigned short MaxBlocksPerCommand;
unsigned short ControllerScatterGatherLimit; unsigned short ControllerScatterGatherLimit;
unsigned short DriverScatterGatherLimit; unsigned short DriverScatterGatherLimit;
u64 BounceBufferLimit;
unsigned int CombinedStatusBufferLength; unsigned int CombinedStatusBufferLength;
unsigned int InitialStatusLength; unsigned int InitialStatusLength;
unsigned int CurrentStatusLength; unsigned int CurrentStatusLength;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment