BusLogic scatter/gather now processes 1 more block if the data length is not divisible by the length of a scatter/gather block.
This commit is contained in:
@@ -821,9 +821,16 @@ void BuslogicDataBufferFree(BuslogicRequests_t *BuslogicRequests)
|
|||||||
uint32_t ScatterGatherRead;
|
uint32_t ScatterGatherRead;
|
||||||
uint32_t ScatterEntry;
|
uint32_t ScatterEntry;
|
||||||
SGE32 ScatterGatherBuffer[MAX_SG_DESCRIPTORS];
|
SGE32 ScatterGatherBuffer[MAX_SG_DESCRIPTORS];
|
||||||
uint32_t ScatterGatherLeft = DataLength / (BuslogicRequests->Is24bit ? sizeof(SGE) : sizeof(SGE32));
|
uint32_t ScatterGatherReqSize = (BuslogicRequests->Is24bit ? sizeof(SGE) : sizeof(SGE32));
|
||||||
|
uint32_t ScatterGatherLeft = DataLength / ScatterGatherReqSize;
|
||||||
|
uint32_t ScatterGatherLength = (ScatterGatherLeft * ScatterGatherReqSize);
|
||||||
uint32_t ScatterGatherAddrCurrent = DataPointer;
|
uint32_t ScatterGatherAddrCurrent = DataPointer;
|
||||||
|
|
||||||
|
if (DataLength > ScatterGatherLength)
|
||||||
|
{
|
||||||
|
ScatterGatherLeft++;
|
||||||
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ScatterGatherRead = (ScatterGatherLeft < ELEMENTS(ScatterGatherBuffer))
|
ScatterGatherRead = (ScatterGatherLeft < ELEMENTS(ScatterGatherBuffer))
|
||||||
|
Reference in New Issue
Block a user