tdr_cmd
unsigned short status = ((struct tdr_cmd *)ptr)->status;
struct tdr_cmd tdr_cmd;
lp->tdr_cmd.cmd.command = CmdTDR;
i596_add_cmd(dev, &lp->tdr_cmd.cmd);
unsigned short status = SWAP16(((struct tdr_cmd *)ptr)->status);
struct tdr_cmd tdr_cmd __attribute__((aligned(32)));
dma->tdr_cmd.cmd.command = SWAP16(CmdTDR);
dma_sync_dev(dev, &(dma->tdr_cmd), sizeof(struct tdr_cmd));
i596_add_cmd(dev, &dma->tdr_cmd.cmd);
volatile struct tdr_cmd_struct *tdr_cmd;
tdr_cmd = (struct tdr_cmd_struct *)ptr;
tdr_cmd->cmd_status = 0;
tdr_cmd->cmd_cmd = swab16(CMD_TDR | CMD_LAST);
tdr_cmd->cmd_link = 0xffff;
tdr_cmd->status = 0;
p->scb->cbl_offset = make16(tdr_cmd);
WAIT_4_STAT_COMPL(tdr_cmd);
if(!(swab16(tdr_cmd->cmd_status) & STAT_COMPL))
result = swab16(tdr_cmd->status);