wake_up_interruptible(&pTA->event); /* release anything that was waiting */
if (ced->bXFerWaiting
- && (ced->rDMAInfo.wIdent == nArea))
+ && (ced->rDMAInfo.ident == nArea))
ced->bXFerWaiting = false; /* Cannot have pending xfer if area cleared */
/* Clean out the struct transarea except for the wait queue, which is at the end */
/* If we have one, kick off pending transfer */
if (bWaiting) { /* Got a block xfer waiting? */
int RWMStat =
- ced_read_write_mem(ced, !ced->rDMAInfo.bOutWard,
- ced->rDMAInfo.wIdent,
- ced->rDMAInfo.dwOffset,
- ced->rDMAInfo.dwSize);
+ ced_read_write_mem(ced,
+ !ced->rDMAInfo.outward,
+ ced->rDMAInfo.ident,
+ ced->rDMAInfo.offset,
+ ced->rDMAInfo.size);
if (RWMStat != U14ERR_NOERROR)
dev_err(&ced->interface->dev,
"%s: rw setup failed %d\n",
dev_info(&ced->interface->dev,
"*** RWM_Complete *** pending transfer will now be set up!!!\n");
iReturn =
- ced_read_write_mem(ced, !ced->rDMAInfo.bOutWard,
- ced->rDMAInfo.wIdent,
- ced->rDMAInfo.dwOffset,
- ced->rDMAInfo.dwSize);
+ ced_read_write_mem(ced, !ced->rDMAInfo.outward,
+ ced->rDMAInfo.ident,
+ ced->rDMAInfo.offset,
+ ced->rDMAInfo.size);
if (iReturn)
dev_err(&ced->interface->dev,
unsigned short wIdent = ((ucData >> 4) & 0x07); /* and area identifier */
/* fill in the structure we were given */
- pDmaDesc->wTransType = ucTransCode; /* type of transfer */
- pDmaDesc->wIdent = wIdent; /* area to use */
- pDmaDesc->dwSize = 0; /* initialise other bits */
- pDmaDesc->dwOffset = 0;
+ pDmaDesc->trans_type = ucTransCode; /* type of transfer */
+ pDmaDesc->ident = wIdent; /* area to use */
+ pDmaDesc->size = 0; /* initialise other bits */
+ pDmaDesc->offset = 0;
dev_dbg(&ced->interface->dev, "%s: type: %d ident: %d\n",
- __func__, pDmaDesc->wTransType, pDmaDesc->wIdent);
+ __func__, pDmaDesc->trans_type, pDmaDesc->ident);
- pDmaDesc->bOutWard = (ucTransCode != TM_EXTTOHOST); /* set transfer direction */
+ pDmaDesc->outward = (ucTransCode != TM_EXTTOHOST); /* set transfer direction */
switch (ucTransCode) {
case TM_EXTTOHOST: /* Extended linear transfer modes (the only ones!) */
case TM_EXTTO1401:
{
bResult =
- ced_read_huff(&(pDmaDesc->dwOffset), pBuf,
+ ced_read_huff(&(pDmaDesc->offset), pBuf,
&dDone, dwCount)
- && ced_read_huff(&(pDmaDesc->dwSize), pBuf,
+ && ced_read_huff(&(pDmaDesc->size), pBuf,
&dDone, dwCount);
if (bResult) {
dev_dbg(&ced->interface->dev,
"%s: xfer offset & size %d %d\n",
- __func__, pDmaDesc->dwOffset,
- pDmaDesc->dwSize);
+ __func__, pDmaDesc->offset,
+ pDmaDesc->size);
if ((wIdent >= MAX_TRANSAREAS) || /* Illegal area number, or... */
(!ced->rTransDef[wIdent].used) || /* area not set up, or... */
- (pDmaDesc->dwOffset > ced->rTransDef[wIdent].length) || /* range/size */
- ((pDmaDesc->dwOffset +
- pDmaDesc->dwSize) >
+ (pDmaDesc->offset > ced->rTransDef[wIdent].length) || /* range/size */
+ ((pDmaDesc->offset +
+ pDmaDesc->size) >
(ced->rTransDef[wIdent].
length))) {
bResult = false; /* bad parameter(s) */
__func__, wIdent,
ced->rTransDef[wIdent].
used,
- pDmaDesc->dwOffset,
- pDmaDesc->dwSize,
+ pDmaDesc->offset,
+ pDmaDesc->size,
ced->rTransDef[wIdent].
length);
}
spin_lock(&ced->stagedLock); /* Lock others out */
if (ced_read_dma_info(&ced->rDMAInfo, ced, pCh, dwCount)) { /* Get DMA parameters */
- unsigned short wTransType = ced->rDMAInfo.wTransType; /* check transfer type */
+ unsigned short wTransType = ced->rDMAInfo.trans_type; /* check transfer type */
dev_dbg(&ced->interface->dev,
"%s: xfer to %s, offset %d, length %d\n",
__func__,
- ced->rDMAInfo.bOutWard ? "1401" : "host",
- ced->rDMAInfo.dwOffset, ced->rDMAInfo.dwSize);
+ ced->rDMAInfo.outward ? "1401" : "host",
+ ced->rDMAInfo.offset, ced->rDMAInfo.size);
if (ced->bXFerWaiting) { /* Check here for badly out of kilter... */
/* This can never happen, really */
|| (wTransType == TM_EXTTO1401)) {
iReturn =
ced_read_write_mem(ced,
- !ced->rDMAInfo.
- bOutWard,
- ced->rDMAInfo.wIdent,
- ced->rDMAInfo.dwOffset,
- ced->rDMAInfo.dwSize);
+ !ced->rDMAInfo.outward,
+ ced->rDMAInfo.ident,
+ ced->rDMAInfo.offset,
+ ced->rDMAInfo.size);
if (iReturn != U14ERR_NOERROR)
dev_err(&ced->interface->dev,
"%s: ced_read_write_mem() failed %d\n",
/* area MUST BE LAST */
};
-/* The DMADESC structure is used to hold information on the transfer in progress. It */
-/* is set up by ReadDMAInfo, using information sent by the 1401 in an escape sequence. */
+/* The dmadesc structure is used to hold information on the transfer in */
+/* progress. It is set up by ReadDMAInfo, using information sent by the 1401 */
+/* in an escape sequence. */
struct dmadesc {
- unsigned short wTransType; /* transfer type as TM_xxx above */
- unsigned short wIdent; /* identifier word */
- unsigned int dwSize; /* bytes to transfer */
- unsigned int dwOffset; /* offset into transfer area for trans */
- bool bOutWard; /* true when data is going TO 1401 */
+ unsigned short trans_type; /* transfer type as TM_xxx above */
+ unsigned short ident; /* identifier word */
+ unsigned int size; /* bytes to transfer */
+ unsigned int offset; /* offset into transfer area for trans */
+ bool outward; /* true when data is going TO 1401 */
};
#define INBUF_SZ 256 /* input buffer size */