Commit d7b557d1 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] DAC960: add call to blk_queue_bounce_limit

From: Dave Olien <dmo@osdl.org>

The following patch adds a call to blk_queue_bounce_limit to the DAC960
driver.  Otherwise, it uses bounce buffering more than it needs to.
parent cca095e0
......@@ -1069,6 +1069,7 @@ static boolean DAC960_V1_EnableMemoryMailboxInterface(DAC960_Controller_T
if (pci_set_dma_mask(Controller->PCIDevice, DAC690_V1_PciDmaMask))
return DAC960_Failure(Controller, "DMA mask out of range");
Controller->BounceBufferLimit = DAC690_V1_PciDmaMask;
if ((hw_type == DAC960_PD_Controller) || (hw_type == DAC960_P_Controller)) {
CommandMailboxesSize = 0;
......@@ -1271,6 +1272,7 @@ static boolean DAC960_V2_EnableMemoryMailboxInterface(DAC960_Controller_T
if (pci_set_dma_mask(Controller->PCIDevice, DAC690_V2_PciDmaMask))
return DAC960_Failure(Controller, "DMA mask out of range");
Controller->BounceBufferLimit = DAC690_V2_PciDmaMask;
/* This is a temporary dma mapping, used only in the scope of this function */
CommandMailbox =
......@@ -2386,6 +2388,7 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
*/
RequestQueue = &Controller->RequestQueue;
blk_init_queue(RequestQueue, DAC960_RequestFunction, &Controller->queue_lock);
blk_queue_bounce_limit(RequestQueue, Controller->BounceBufferLimit);
RequestQueue->queuedata = Controller;
blk_queue_max_hw_segments(RequestQueue,
Controller->DriverScatterGatherLimit);
......
......@@ -62,11 +62,6 @@
/*
Define the pci dma mask supported by DAC960 V1 and V2 Firmware Controlers
For now set the V2 mask to only 32 bits. The controller IS capable
of doing 64 bit dma. But I have yet to find out whether this needs to
be explicitely enabled in the controller, or of the controller adapts
automatically.
*/
#define DAC690_V1_PciDmaMask 0xffffffff
......@@ -2370,6 +2365,7 @@ typedef struct DAC960_Controller
unsigned short ControllerScatterGatherLimit;
unsigned short DriverScatterGatherLimit;
unsigned int ControllerUsageCount;
u64 BounceBufferLimit;
unsigned int CombinedStatusBufferLength;
unsigned int InitialStatusLength;
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