|
@@ -778,8 +778,8 @@ dc390_DataOut_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
|
|
pSRB->pSegmentList++;
|
|
pSRB->pSegmentList++;
|
|
psgl = pSRB->pSegmentList;
|
|
psgl = pSRB->pSegmentList;
|
|
|
|
|
|
- pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
|
|
|
|
- pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
|
|
|
|
|
|
+ pSRB->SGBusAddr = sg_dma_address(psgl);
|
|
|
|
+ pSRB->SGToBeXferLen = sg_dma_len(psgl);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
pSRB->SGToBeXferLen = 0;
|
|
pSRB->SGToBeXferLen = 0;
|
|
@@ -842,7 +842,7 @@ dc390_DataIn_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
|
|
DEBUG1(ResidCnt = ((unsigned long) DC390_read8 (CtcReg_High) << 16) \
|
|
DEBUG1(ResidCnt = ((unsigned long) DC390_read8 (CtcReg_High) << 16) \
|
|
+ ((unsigned long) DC390_read8 (CtcReg_Mid) << 8) \
|
|
+ ((unsigned long) DC390_read8 (CtcReg_Mid) << 8) \
|
|
+ ((unsigned long) DC390_read8 (CtcReg_Low)));
|
|
+ ((unsigned long) DC390_read8 (CtcReg_Low)));
|
|
- DEBUG1(printk (KERN_DEBUG "Count_2_Zero (ResidCnt=%i,ToBeXfer=%li),", ResidCnt, pSRB->SGToBeXferLen));
|
|
|
|
|
|
+ DEBUG1(printk (KERN_DEBUG "Count_2_Zero (ResidCnt=%u,ToBeXfer=%lu),", ResidCnt, pSRB->SGToBeXferLen));
|
|
|
|
|
|
DC390_write8 (DMA_Cmd, READ_DIRECTION+DMA_IDLE_CMD);
|
|
DC390_write8 (DMA_Cmd, READ_DIRECTION+DMA_IDLE_CMD);
|
|
|
|
|
|
@@ -853,8 +853,8 @@ dc390_DataIn_0( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 *psstatus)
|
|
pSRB->pSegmentList++;
|
|
pSRB->pSegmentList++;
|
|
psgl = pSRB->pSegmentList;
|
|
psgl = pSRB->pSegmentList;
|
|
|
|
|
|
- pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
|
|
|
|
- pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
|
|
|
|
|
|
+ pSRB->SGBusAddr = sg_dma_address(psgl);
|
|
|
|
+ pSRB->SGToBeXferLen = sg_dma_len(psgl);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
pSRB->SGToBeXferLen = 0;
|
|
pSRB->SGToBeXferLen = 0;
|
|
@@ -921,11 +921,12 @@ din_1:
|
|
|
|
|
|
ptr = (u8 *) bus_to_virt( pSRB->SGBusAddr );
|
|
ptr = (u8 *) bus_to_virt( pSRB->SGBusAddr );
|
|
*ptr = bval;
|
|
*ptr = bval;
|
|
- pSRB->SGBusAddr++; xferCnt++;
|
|
|
|
|
|
+ pSRB->SGBusAddr++;
|
|
|
|
+ xferCnt++;
|
|
pSRB->TotalXferredLen++;
|
|
pSRB->TotalXferredLen++;
|
|
pSRB->SGToBeXferLen--;
|
|
pSRB->SGToBeXferLen--;
|
|
}
|
|
}
|
|
- DEBUG1(printk (KERN_DEBUG "Xfered: %li, Total: %li, Remaining: %li\n", xferCnt,\
|
|
|
|
|
|
+ DEBUG1(printk (KERN_DEBUG "Xfered: %lu, Total: %lu, Remaining: %lu\n", xferCnt,\
|
|
pSRB->TotalXferredLen, pSRB->SGToBeXferLen));
|
|
pSRB->TotalXferredLen, pSRB->SGToBeXferLen));
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1157,14 +1158,14 @@ dc390_restore_ptr (struct dc390_acb* pACB, struct dc390_srb* pSRB)
|
|
{
|
|
{
|
|
pSRB->pSegmentList++;
|
|
pSRB->pSegmentList++;
|
|
psgl = pSRB->pSegmentList;
|
|
psgl = pSRB->pSegmentList;
|
|
- pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
|
|
|
|
- pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
|
|
|
|
|
|
+ pSRB->SGBusAddr = sg_dma_address(psgl);
|
|
|
|
+ pSRB->SGToBeXferLen = sg_dma_len(psgl);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
pSRB->SGToBeXferLen = 0;
|
|
pSRB->SGToBeXferLen = 0;
|
|
}
|
|
}
|
|
- pSRB->SGToBeXferLen -= (pSRB->Saved_Ptr - pSRB->TotalXferredLen);
|
|
|
|
- pSRB->SGBusAddr += (pSRB->Saved_Ptr - pSRB->TotalXferredLen);
|
|
|
|
|
|
+ pSRB->SGToBeXferLen -= pSRB->Saved_Ptr - pSRB->TotalXferredLen;
|
|
|
|
+ pSRB->SGBusAddr += pSRB->Saved_Ptr - pSRB->TotalXferredLen;
|
|
printk (KERN_INFO "DC390: Pointer restored. Segment %i, Total %li, Bus %08lx\n",
|
|
printk (KERN_INFO "DC390: Pointer restored. Segment %i, Total %li, Bus %08lx\n",
|
|
pSRB->SGIndex, pSRB->Saved_Ptr, pSRB->SGBusAddr);
|
|
pSRB->SGIndex, pSRB->Saved_Ptr, pSRB->SGBusAddr);
|
|
|
|
|
|
@@ -1315,8 +1316,8 @@ dc390_DataIO_Comm( struct dc390_acb* pACB, struct dc390_srb* pSRB, u8 ioDir)
|
|
if( !pSRB->SGToBeXferLen )
|
|
if( !pSRB->SGToBeXferLen )
|
|
{
|
|
{
|
|
psgl = pSRB->pSegmentList;
|
|
psgl = pSRB->pSegmentList;
|
|
- pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
|
|
|
|
- pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
|
|
|
|
|
|
+ pSRB->SGBusAddr = sg_dma_address(psgl);
|
|
|
|
+ pSRB->SGToBeXferLen = sg_dma_len(psgl);
|
|
DEBUG1(printk (KERN_DEBUG " DC390: Next SG segment."));
|
|
DEBUG1(printk (KERN_DEBUG " DC390: Next SG segment."));
|
|
}
|
|
}
|
|
lval = pSRB->SGToBeXferLen;
|
|
lval = pSRB->SGToBeXferLen;
|