Commit d6f6341a authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

Char: rio, fix cirrus defines

Rename defines to be in RIO* namespace to not to collide with other defines in
tree.  This broke (as akpm correctly pointed out) some allmodconfig builds,
e.g.  on ppc:

In file included from drivers/char/rio/rio_linux.c:81:
drivers/char/rio/cirrus.h:202:1: warning: "COMPLETE" redefined
In file included from include/net/netns/ipv4.h:8,
                 from include/net/net_namespace.h:13,
                 from include/linux/seq_file.h:7,
                 from include/asm/machdep.h:12,
                 from include/asm/pci.h:17,
                 from include/linux/pci.h:951,
                 from drivers/char/rio/rio_linux.c:50:
include/net/inet_frag.h:28:1: warning: this is the location of the previous definition
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cd989b3a
This diff is collapsed.
...@@ -344,7 +344,7 @@ int rio_minor(struct tty_struct *tty) ...@@ -344,7 +344,7 @@ int rio_minor(struct tty_struct *tty)
static int rio_set_real_termios(void *ptr) static int rio_set_real_termios(void *ptr)
{ {
return RIOParam((struct Port *) ptr, CONFIG, 1, 1); return RIOParam((struct Port *) ptr, RIOC_CONFIG, 1, 1);
} }
...@@ -487,7 +487,7 @@ static int rio_get_CD(void *ptr) ...@@ -487,7 +487,7 @@ static int rio_get_CD(void *ptr)
int rv; int rv;
func_enter(); func_enter();
rv = (PortP->ModemState & MSVR1_CD) != 0; rv = (PortP->ModemState & RIOC_MSVR1_CD) != 0;
rio_dprintk(RIO_DEBUG_INIT, "Getting CD status: %d\n", rv); rio_dprintk(RIO_DEBUG_INIT, "Getting CD status: %d\n", rv);
...@@ -607,7 +607,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd ...@@ -607,7 +607,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
rio_dprintk(RIO_DEBUG_TTY, "BREAK on deleted RTA\n"); rio_dprintk(RIO_DEBUG_TTY, "BREAK on deleted RTA\n");
rc = -EIO; rc = -EIO;
} else { } else {
if (RIOShortCommand(p, PortP, SBREAK, 2, 250) == RIO_FAIL) { if (RIOShortCommand(p, PortP, RIOC_SBREAK, 2, 250) ==
RIO_FAIL) {
rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n"); rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n");
rc = -EIO; rc = -EIO;
} }
...@@ -622,7 +623,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd ...@@ -622,7 +623,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
l = arg ? arg * 100 : 250; l = arg ? arg * 100 : 250;
if (l > 255) if (l > 255)
l = 255; l = 255;
if (RIOShortCommand(p, PortP, SBREAK, 2, arg ? arg * 100 : 250) == RIO_FAIL) { if (RIOShortCommand(p, PortP, RIOC_SBREAK, 2,
arg ? arg * 100 : 250) == RIO_FAIL) {
rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n"); rio_dprintk(RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n");
rc = -EIO; rc = -EIO;
} }
......
...@@ -417,7 +417,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc ...@@ -417,7 +417,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
PortP = p->RIOPortp[SysPort]; PortP = p->RIOPortp[SysPort];
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
switch (readb(&PktCmdP->Command)) { switch (readb(&PktCmdP->Command)) {
case BREAK_RECEIVED: case RIOC_BREAK_RECEIVED:
rio_dprintk(RIO_DEBUG_CMD, "Received a break!\n"); rio_dprintk(RIO_DEBUG_CMD, "Received a break!\n");
/* If the current line disc. is not multi-threading and /* If the current line disc. is not multi-threading and
the current processor is not the default, reset rup_intr the current processor is not the default, reset rup_intr
...@@ -428,16 +428,16 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc ...@@ -428,16 +428,16 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
gs_got_break(&PortP->gs); gs_got_break(&PortP->gs);
break; break;
case COMPLETE: case RIOC_COMPLETE:
rio_dprintk(RIO_DEBUG_CMD, "Command complete on phb %d host %Zd\n", readb(&PktCmdP->PhbNum), HostP - p->RIOHosts); rio_dprintk(RIO_DEBUG_CMD, "Command complete on phb %d host %Zd\n", readb(&PktCmdP->PhbNum), HostP - p->RIOHosts);
subCommand = 1; subCommand = 1;
switch (readb(&PktCmdP->SubCommand)) { switch (readb(&PktCmdP->SubCommand)) {
case MEMDUMP: case RIOC_MEMDUMP:
rio_dprintk(RIO_DEBUG_CMD, "Memory dump cmd (0x%x) from addr 0x%x\n", readb(&PktCmdP->SubCommand), readw(&PktCmdP->SubAddr)); rio_dprintk(RIO_DEBUG_CMD, "Memory dump cmd (0x%x) from addr 0x%x\n", readb(&PktCmdP->SubCommand), readw(&PktCmdP->SubAddr));
break; break;
case READ_REGISTER: case RIOC_READ_REGISTER:
rio_dprintk(RIO_DEBUG_CMD, "Read register (0x%x)\n", readw(&PktCmdP->SubAddr)); rio_dprintk(RIO_DEBUG_CMD, "Read register (0x%x)\n", readw(&PktCmdP->SubAddr));
p->CdRegister = (readb(&PktCmdP->ModemStatus) & MSVR1_HOST); p->CdRegister = (readb(&PktCmdP->ModemStatus) & RIOC_MSVR1_HOST);
break; break;
default: default:
subCommand = 0; subCommand = 0;
...@@ -456,14 +456,15 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc ...@@ -456,14 +456,15 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
rio_dprintk(RIO_DEBUG_CMD, "No change\n"); rio_dprintk(RIO_DEBUG_CMD, "No change\n");
/* FALLTHROUGH */ /* FALLTHROUGH */
case MODEM_STATUS: case RIOC_MODEM_STATUS:
/* /*
** Knock out the tbusy and tstop bits, as these are not relevant ** Knock out the tbusy and tstop bits, as these are not relevant
** to the check for modem status change (they're just there because ** to the check for modem status change (they're just there because
** it's a convenient place to put them!). ** it's a convenient place to put them!).
*/ */
ReportedModemStatus = readb(&PktCmdP->ModemStatus); ReportedModemStatus = readb(&PktCmdP->ModemStatus);
if ((PortP->ModemState & MSVR1_HOST) == (ReportedModemStatus & MSVR1_HOST)) { if ((PortP->ModemState & RIOC_MSVR1_HOST) ==
(ReportedModemStatus & RIOC_MSVR1_HOST)) {
rio_dprintk(RIO_DEBUG_CMD, "Modem status unchanged 0x%x\n", PortP->ModemState); rio_dprintk(RIO_DEBUG_CMD, "Modem status unchanged 0x%x\n", PortP->ModemState);
/* /*
** Update ModemState just in case tbusy or tstop states have ** Update ModemState just in case tbusy or tstop states have
...@@ -497,7 +498,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc ...@@ -497,7 +498,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
/* /*
** Is there a carrier? ** Is there a carrier?
*/ */
if (PortP->ModemState & MSVR1_CD) { if (PortP->ModemState & RIOC_MSVR1_CD) {
/* /*
** Has carrier just appeared? ** Has carrier just appeared?
*/ */
...@@ -691,7 +692,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) ...@@ -691,7 +692,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
*/ */
rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags); rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags);
FreeMe = RIOCommandRup(p, Rup, HostP, PacketP); FreeMe = RIOCommandRup(p, Rup, HostP, PacketP);
if (readb(&PacketP->data[5]) == MEMDUMP) { if (readb(&PacketP->data[5]) == RIOC_MEMDUMP) {
rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6]))); rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6])));
rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32); rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32);
} }
......
...@@ -422,7 +422,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ...@@ -422,7 +422,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
} }
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
if (RIOPreemptiveCmd(p, (p->RIOPortp[port]), RESUME) == RIO_FAIL) { if (RIOPreemptiveCmd(p, (p->RIOPortp[port]), RIOC_RESUME) ==
RIO_FAIL) {
rio_dprintk(RIO_DEBUG_CTRL, "RIO_RESUME failed\n"); rio_dprintk(RIO_DEBUG_CTRL, "RIO_RESUME failed\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return -EBUSY; return -EBUSY;
...@@ -636,7 +637,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ...@@ -636,7 +637,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
return -ENXIO; return -ENXIO;
} }
PortP = (p->RIOPortp[PortTty.port]); PortP = (p->RIOPortp[PortTty.port]);
RIOParam(PortP, CONFIG, PortP->State & RIO_MODEM, OK_TO_SLEEP); RIOParam(PortP, RIOC_CONFIG, PortP->State & RIO_MODEM,
OK_TO_SLEEP);
return retval; return retval;
case RIO_SET_PORT_PARAMS: case RIO_SET_PORT_PARAMS:
...@@ -1247,7 +1249,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ...@@ -1247,7 +1249,7 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
if (RIOPreemptiveCmd(p, PortP, MEMDUMP) == RIO_FAIL) { if (RIOPreemptiveCmd(p, PortP, RIOC_MEMDUMP) == RIO_FAIL) {
rio_dprintk(RIO_DEBUG_CTRL, "RIO_MEM_DUMP failed\n"); rio_dprintk(RIO_DEBUG_CTRL, "RIO_MEM_DUMP failed\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return -EBUSY; return -EBUSY;
...@@ -1313,7 +1315,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su ...@@ -1313,7 +1315,8 @@ int riocontrol(struct rio_info *p, dev_t dev, int cmd, unsigned long arg, int su
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
if (RIOPreemptiveCmd(p, PortP, READ_REGISTER) == RIO_FAIL) { if (RIOPreemptiveCmd(p, PortP, RIOC_READ_REGISTER) ==
RIO_FAIL) {
rio_dprintk(RIO_DEBUG_CTRL, "RIO_READ_REGISTER failed\n"); rio_dprintk(RIO_DEBUG_CTRL, "RIO_READ_REGISTER failed\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return -EBUSY; return -EBUSY;
...@@ -1434,50 +1437,50 @@ int RIOPreemptiveCmd(struct rio_info *p, struct Port *PortP, u8 Cmd) ...@@ -1434,50 +1437,50 @@ int RIOPreemptiveCmd(struct rio_info *p, struct Port *PortP, u8 Cmd)
PktCmdP->PhbNum = port; PktCmdP->PhbNum = port;
switch (Cmd) { switch (Cmd) {
case MEMDUMP: case RIOC_MEMDUMP:
rio_dprintk(RIO_DEBUG_CTRL, "Queue MEMDUMP command blk %p " rio_dprintk(RIO_DEBUG_CTRL, "Queue MEMDUMP command blk %p "
"(addr 0x%x)\n", CmdBlkP, (int) SubCmd.Addr); "(addr 0x%x)\n", CmdBlkP, (int) SubCmd.Addr);
PktCmdP->SubCommand = MEMDUMP; PktCmdP->SubCommand = RIOC_MEMDUMP;
PktCmdP->SubAddr = SubCmd.Addr; PktCmdP->SubAddr = SubCmd.Addr;
break; break;
case FCLOSE: case RIOC_FCLOSE:
rio_dprintk(RIO_DEBUG_CTRL, "Queue FCLOSE command blk %p\n", rio_dprintk(RIO_DEBUG_CTRL, "Queue FCLOSE command blk %p\n",
CmdBlkP); CmdBlkP);
break; break;
case READ_REGISTER: case RIOC_READ_REGISTER:
rio_dprintk(RIO_DEBUG_CTRL, "Queue READ_REGISTER (0x%x) " rio_dprintk(RIO_DEBUG_CTRL, "Queue READ_REGISTER (0x%x) "
"command blk %p\n", (int) SubCmd.Addr, CmdBlkP); "command blk %p\n", (int) SubCmd.Addr, CmdBlkP);
PktCmdP->SubCommand = READ_REGISTER; PktCmdP->SubCommand = RIOC_READ_REGISTER;
PktCmdP->SubAddr = SubCmd.Addr; PktCmdP->SubAddr = SubCmd.Addr;
break; break;
case RESUME: case RIOC_RESUME:
rio_dprintk(RIO_DEBUG_CTRL, "Queue RESUME command blk %p\n", rio_dprintk(RIO_DEBUG_CTRL, "Queue RESUME command blk %p\n",
CmdBlkP); CmdBlkP);
break; break;
case RFLUSH: case RIOC_RFLUSH:
rio_dprintk(RIO_DEBUG_CTRL, "Queue RFLUSH command blk %p\n", rio_dprintk(RIO_DEBUG_CTRL, "Queue RFLUSH command blk %p\n",
CmdBlkP); CmdBlkP);
CmdBlkP->PostFuncP = RIORFlushEnable; CmdBlkP->PostFuncP = RIORFlushEnable;
break; break;
case SUSPEND: case RIOC_SUSPEND:
rio_dprintk(RIO_DEBUG_CTRL, "Queue SUSPEND command blk %p\n", rio_dprintk(RIO_DEBUG_CTRL, "Queue SUSPEND command blk %p\n",
CmdBlkP); CmdBlkP);
break; break;
case MGET: case RIOC_MGET:
rio_dprintk(RIO_DEBUG_CTRL, "Queue MGET command blk %p\n", rio_dprintk(RIO_DEBUG_CTRL, "Queue MGET command blk %p\n",
CmdBlkP); CmdBlkP);
break; break;
case MSET: case RIOC_MSET:
case MBIC: case RIOC_MBIC:
case MBIS: case RIOC_MBIS:
CmdBlkP->Packet.data[4] = (char) PortP->ModemLines; CmdBlkP->Packet.data[4] = (char) PortP->ModemLines;
rio_dprintk(RIO_DEBUG_CTRL, "Queue MSET/MBIC/MBIS command " rio_dprintk(RIO_DEBUG_CTRL, "Queue MSET/MBIC/MBIS command "
"blk %p\n", CmdBlkP); "blk %p\n", CmdBlkP);
break; break;
case WFLUSH: case RIOC_WFLUSH:
/* /*
** If we have queued up the maximum number of Write flushes ** If we have queued up the maximum number of Write flushes
** allowed then we should not bother sending any more to the ** allowed then we should not bother sending any more to the
......
...@@ -401,9 +401,8 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP) ...@@ -401,9 +401,8 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP)
PortP->InUse = NOT_INUSE; PortP->InUse = NOT_INUSE;
rio_spin_unlock(&PortP->portSem); rio_spin_unlock(&PortP->portSem);
if (RIOParam(PortP, OPEN, ((PortP->Cor2Copy & (COR2_RTSFLOW | COR2_CTSFLOW)) == (COR2_RTSFLOW | COR2_CTSFLOW)) ? 1 : 0, DONT_SLEEP) == RIO_FAIL) { if (RIOParam(PortP, RIOC_OPEN, ((PortP->Cor2Copy & (RIOC_COR2_RTSFLOW | RIOC_COR2_CTSFLOW)) == (RIOC_COR2_RTSFLOW | RIOC_COR2_CTSFLOW)) ? 1 : 0, DONT_SLEEP) == RIO_FAIL)
continue; /* with next port */ continue; /* with next port */
}
rio_spin_lock(&PortP->portSem); rio_spin_lock(&PortP->portSem);
PortP->MagicFlags &= ~MAGIC_REBOOT; PortP->MagicFlags &= ~MAGIC_REBOOT;
} }
...@@ -429,7 +428,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP) ...@@ -429,7 +428,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP)
*/ */
PktCmdP = (struct PktCmd __iomem *) &PacketP->data[0]; PktCmdP = (struct PktCmd __iomem *) &PacketP->data[0];
writeb(WFLUSH, &PktCmdP->Command); writeb(RIOC_WFLUSH, &PktCmdP->Command);
p = PortP->HostPort % (u16) PORTS_PER_RTA; p = PortP->HostPort % (u16) PORTS_PER_RTA;
......
...@@ -177,7 +177,7 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -177,7 +177,7 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
} }
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
if (cmd == OPEN) { if (cmd == RIOC_OPEN) {
/* /*
** If the port is set to store or lock the parameters, and it is ** If the port is set to store or lock the parameters, and it is
** paramed with OPEN, we want to restore the saved port termio, but ** paramed with OPEN, we want to restore the saved port termio, but
...@@ -241,50 +241,50 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -241,50 +241,50 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
case CS5: case CS5:
{ {
rio_dprintk(RIO_DEBUG_PARAM, "5 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "5 bit data\n");
Cor1 |= COR1_5BITS; Cor1 |= RIOC_COR1_5BITS;
break; break;
} }
case CS6: case CS6:
{ {
rio_dprintk(RIO_DEBUG_PARAM, "6 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "6 bit data\n");
Cor1 |= COR1_6BITS; Cor1 |= RIOC_COR1_6BITS;
break; break;
} }
case CS7: case CS7:
{ {
rio_dprintk(RIO_DEBUG_PARAM, "7 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "7 bit data\n");
Cor1 |= COR1_7BITS; Cor1 |= RIOC_COR1_7BITS;
break; break;
} }
case CS8: case CS8:
{ {
rio_dprintk(RIO_DEBUG_PARAM, "8 bit data\n"); rio_dprintk(RIO_DEBUG_PARAM, "8 bit data\n");
Cor1 |= COR1_8BITS; Cor1 |= RIOC_COR1_8BITS;
break; break;
} }
} }
if (TtyP->termios->c_cflag & CSTOPB) { if (TtyP->termios->c_cflag & CSTOPB) {
rio_dprintk(RIO_DEBUG_PARAM, "2 stop bits\n"); rio_dprintk(RIO_DEBUG_PARAM, "2 stop bits\n");
Cor1 |= COR1_2STOP; Cor1 |= RIOC_COR1_2STOP;
} else { } else {
rio_dprintk(RIO_DEBUG_PARAM, "1 stop bit\n"); rio_dprintk(RIO_DEBUG_PARAM, "1 stop bit\n");
Cor1 |= COR1_1STOP; Cor1 |= RIOC_COR1_1STOP;
} }
if (TtyP->termios->c_cflag & PARENB) { if (TtyP->termios->c_cflag & PARENB) {
rio_dprintk(RIO_DEBUG_PARAM, "Enable parity\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable parity\n");
Cor1 |= COR1_NORMAL; Cor1 |= RIOC_COR1_NORMAL;
} else { } else {
rio_dprintk(RIO_DEBUG_PARAM, "Disable parity\n"); rio_dprintk(RIO_DEBUG_PARAM, "Disable parity\n");
Cor1 |= COR1_NOP; Cor1 |= RIOC_COR1_NOP;
} }
if (TtyP->termios->c_cflag & PARODD) { if (TtyP->termios->c_cflag & PARODD) {
rio_dprintk(RIO_DEBUG_PARAM, "Odd parity\n"); rio_dprintk(RIO_DEBUG_PARAM, "Odd parity\n");
Cor1 |= COR1_ODD; Cor1 |= RIOC_COR1_ODD;
} else { } else {
rio_dprintk(RIO_DEBUG_PARAM, "Even parity\n"); rio_dprintk(RIO_DEBUG_PARAM, "Even parity\n");
Cor1 |= COR1_EVEN; Cor1 |= RIOC_COR1_EVEN;
} }
/* /*
...@@ -292,11 +292,11 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -292,11 +292,11 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
*/ */
if (TtyP->termios->c_iflag & IXON) { if (TtyP->termios->c_iflag & IXON) {
rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop output control\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop output control\n");
Cor2 |= COR2_IXON; Cor2 |= RIOC_COR2_IXON;
} else { } else {
if (PortP->Config & RIO_IXON) { if (PortP->Config & RIO_IXON) {
rio_dprintk(RIO_DEBUG_PARAM, "Force enable start/stop output control\n"); rio_dprintk(RIO_DEBUG_PARAM, "Force enable start/stop output control\n");
Cor2 |= COR2_IXON; Cor2 |= RIOC_COR2_IXON;
} else } else
rio_dprintk(RIO_DEBUG_PARAM, "IXON has been disabled.\n"); rio_dprintk(RIO_DEBUG_PARAM, "IXON has been disabled.\n");
} }
...@@ -304,29 +304,29 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -304,29 +304,29 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
if (TtyP->termios->c_iflag & IXANY) { if (TtyP->termios->c_iflag & IXANY) {
if (PortP->Config & RIO_IXANY) { if (PortP->Config & RIO_IXANY) {
rio_dprintk(RIO_DEBUG_PARAM, "Enable any key to restart output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable any key to restart output\n");
Cor2 |= COR2_IXANY; Cor2 |= RIOC_COR2_IXANY;
} else } else
rio_dprintk(RIO_DEBUG_PARAM, "IXANY has been disabled due to sanity reasons.\n"); rio_dprintk(RIO_DEBUG_PARAM, "IXANY has been disabled due to sanity reasons.\n");
} }
if (TtyP->termios->c_iflag & IXOFF) { if (TtyP->termios->c_iflag & IXOFF) {
rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop input control 2\n"); rio_dprintk(RIO_DEBUG_PARAM, "Enable start/stop input control 2\n");
Cor2 |= COR2_IXOFF; Cor2 |= RIOC_COR2_IXOFF;
} }
if (TtyP->termios->c_cflag & HUPCL) { if (TtyP->termios->c_cflag & HUPCL) {
rio_dprintk(RIO_DEBUG_PARAM, "Hangup on last close\n"); rio_dprintk(RIO_DEBUG_PARAM, "Hangup on last close\n");
Cor2 |= COR2_HUPCL; Cor2 |= RIOC_COR2_HUPCL;
} }
if (C_CRTSCTS(TtyP)) { if (C_CRTSCTS(TtyP)) {
rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control enabled\n"); rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control enabled\n");
Cor2 |= COR2_CTSFLOW; Cor2 |= RIOC_COR2_CTSFLOW;
Cor2 |= COR2_RTSFLOW; Cor2 |= RIOC_COR2_RTSFLOW;
} else { } else {
rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control disabled\n"); rio_dprintk(RIO_DEBUG_PARAM, "Rx hardware flow control disabled\n");
Cor2 &= ~COR2_CTSFLOW; Cor2 &= ~RIOC_COR2_CTSFLOW;
Cor2 &= ~COR2_RTSFLOW; Cor2 &= ~RIOC_COR2_RTSFLOW;
} }
...@@ -341,36 +341,36 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -341,36 +341,36 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
*/ */
if (TtyP->termios->c_iflag & IGNBRK) { if (TtyP->termios->c_iflag & IGNBRK) {
rio_dprintk(RIO_DEBUG_PARAM, "Ignore break condition\n"); rio_dprintk(RIO_DEBUG_PARAM, "Ignore break condition\n");
Cor4 |= COR4_IGNBRK; Cor4 |= RIOC_COR4_IGNBRK;
} }
if (!(TtyP->termios->c_iflag & BRKINT)) { if (!(TtyP->termios->c_iflag & BRKINT)) {
rio_dprintk(RIO_DEBUG_PARAM, "Break generates NULL condition\n"); rio_dprintk(RIO_DEBUG_PARAM, "Break generates NULL condition\n");
Cor4 |= COR4_NBRKINT; Cor4 |= RIOC_COR4_NBRKINT;
} else { } else {
rio_dprintk(RIO_DEBUG_PARAM, "Interrupt on break condition\n"); rio_dprintk(RIO_DEBUG_PARAM, "Interrupt on break condition\n");
} }
if (TtyP->termios->c_iflag & INLCR) { if (TtyP->termios->c_iflag & INLCR) {
rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage return on input\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage return on input\n");
Cor4 |= COR4_INLCR; Cor4 |= RIOC_COR4_INLCR;
} }
if (TtyP->termios->c_iflag & IGNCR) { if (TtyP->termios->c_iflag & IGNCR) {
rio_dprintk(RIO_DEBUG_PARAM, "Ignore carriage return on input\n"); rio_dprintk(RIO_DEBUG_PARAM, "Ignore carriage return on input\n");
Cor4 |= COR4_IGNCR; Cor4 |= RIOC_COR4_IGNCR;
} }
if (TtyP->termios->c_iflag & ICRNL) { if (TtyP->termios->c_iflag & ICRNL) {
rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on input\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on input\n");
Cor4 |= COR4_ICRNL; Cor4 |= RIOC_COR4_ICRNL;
} }
if (TtyP->termios->c_iflag & IGNPAR) { if (TtyP->termios->c_iflag & IGNPAR) {
rio_dprintk(RIO_DEBUG_PARAM, "Ignore characters with parity errors\n"); rio_dprintk(RIO_DEBUG_PARAM, "Ignore characters with parity errors\n");
Cor4 |= COR4_IGNPAR; Cor4 |= RIOC_COR4_IGNPAR;
} }
if (TtyP->termios->c_iflag & PARMRK) { if (TtyP->termios->c_iflag & PARMRK) {
rio_dprintk(RIO_DEBUG_PARAM, "Mark parity errors\n"); rio_dprintk(RIO_DEBUG_PARAM, "Mark parity errors\n");
Cor4 |= COR4_PARMRK; Cor4 |= RIOC_COR4_PARMRK;
} }
/* /*
...@@ -378,22 +378,22 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -378,22 +378,22 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
** on reception of a config packet. ** on reception of a config packet.
** The download code handles the zero baud condition. ** The download code handles the zero baud condition.
*/ */
Cor4 |= COR4_RAISEMOD; Cor4 |= RIOC_COR4_RAISEMOD;
/* /*
** COR 5 ** COR 5
*/ */
Cor5 = COR5_CMOE; Cor5 = RIOC_COR5_CMOE;
/* /*
** Set to monitor tbusy/tstop (or not). ** Set to monitor tbusy/tstop (or not).
*/ */
if (PortP->MonitorTstate) if (PortP->MonitorTstate)
Cor5 |= COR5_TSTATE_ON; Cor5 |= RIOC_COR5_TSTATE_ON;
else else
Cor5 |= COR5_TSTATE_OFF; Cor5 |= RIOC_COR5_TSTATE_OFF;
/* /*
** Could set LNE here if you wanted LNext processing. SVR4 will use it. ** Could set LNE here if you wanted LNext processing. SVR4 will use it.
...@@ -401,24 +401,24 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -401,24 +401,24 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
if (TtyP->termios->c_iflag & ISTRIP) { if (TtyP->termios->c_iflag & ISTRIP) {
rio_dprintk(RIO_DEBUG_PARAM, "Strip input characters\n"); rio_dprintk(RIO_DEBUG_PARAM, "Strip input characters\n");
if (!(PortP->State & RIO_TRIAD_MODE)) { if (!(PortP->State & RIO_TRIAD_MODE)) {
Cor5 |= COR5_ISTRIP; Cor5 |= RIOC_COR5_ISTRIP;
} }
} }
if (TtyP->termios->c_oflag & ONLCR) { if (TtyP->termios->c_oflag & ONLCR) {
rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage-return, newline on output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map newline to carriage-return, newline on output\n");
if (PortP->CookMode == COOK_MEDIUM) if (PortP->CookMode == COOK_MEDIUM)
Cor5 |= COR5_ONLCR; Cor5 |= RIOC_COR5_ONLCR;
} }
if (TtyP->termios->c_oflag & OCRNL) { if (TtyP->termios->c_oflag & OCRNL) {
rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on output\n"); rio_dprintk(RIO_DEBUG_PARAM, "Map carriage return to newline on output\n");
if (PortP->CookMode == COOK_MEDIUM) if (PortP->CookMode == COOK_MEDIUM)
Cor5 |= COR5_OCRNL; Cor5 |= RIOC_COR5_OCRNL;
} }
if ((TtyP->termios->c_oflag & TABDLY) == TAB3) { if ((TtyP->termios->c_oflag & TABDLY) == TAB3) {
rio_dprintk(RIO_DEBUG_PARAM, "Tab delay 3 set\n"); rio_dprintk(RIO_DEBUG_PARAM, "Tab delay 3 set\n");
if (PortP->CookMode == COOK_MEDIUM) if (PortP->CookMode == COOK_MEDIUM)
Cor5 |= COR5_TAB3; Cor5 |= RIOC_COR5_TAB3;
} }
/* /*
......
...@@ -211,7 +211,7 @@ int riotopen(struct tty_struct *tty, struct file *filp) ...@@ -211,7 +211,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
rio_dprintk(RIO_DEBUG_TTY, "Waiting for RIO_CLOSING to go away\n"); rio_dprintk(RIO_DEBUG_TTY, "Waiting for RIO_CLOSING to go away\n");
if (repeat_this-- <= 0) { if (repeat_this-- <= 0) {
rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n");
RIOPreemptiveCmd(p, PortP, FCLOSE); RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
retval = -EINTR; retval = -EINTR;
goto bombout; goto bombout;
} }
...@@ -264,7 +264,7 @@ int riotopen(struct tty_struct *tty, struct file *filp) ...@@ -264,7 +264,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
here. If I read the docs correctly the "open" here. If I read the docs correctly the "open"
command piggybacks the parameters immediately. command piggybacks the parameters immediately.
-- REW */ -- REW */
RIOParam(PortP, OPEN, 1, OK_TO_SLEEP); /* Open the port */ RIOParam(PortP, RIOC_OPEN, 1, OK_TO_SLEEP); /* Open the port */
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
/* /*
...@@ -275,7 +275,7 @@ int riotopen(struct tty_struct *tty, struct file *filp) ...@@ -275,7 +275,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
rio_spin_unlock_irqrestore(&PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) { if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
rio_dprintk(RIO_DEBUG_TTY, "Waiting for open to finish broken by signal\n"); rio_dprintk(RIO_DEBUG_TTY, "Waiting for open to finish broken by signal\n");
RIOPreemptiveCmd(p, PortP, FCLOSE); RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
func_exit(); func_exit();
return -EINTR; return -EINTR;
} }
...@@ -297,7 +297,8 @@ int riotopen(struct tty_struct *tty, struct file *filp) ...@@ -297,7 +297,8 @@ int riotopen(struct tty_struct *tty, struct file *filp)
** insert test for carrier here. -- ??? ** insert test for carrier here. -- ???
** I already see that test here. What's the deal? -- REW ** I already see that test here. What's the deal? -- REW
*/ */
if ((PortP->gs.tty->termios->c_cflag & CLOCAL) || (PortP->ModemState & MSVR1_CD)) { if ((PortP->gs.tty->termios->c_cflag & CLOCAL) ||
(PortP->ModemState & RIOC_MSVR1_CD)) {
rio_dprintk(RIO_DEBUG_TTY, "open(%d) Modem carr on\n", SysPort); rio_dprintk(RIO_DEBUG_TTY, "open(%d) Modem carr on\n", SysPort);
/* /*
tp->tm.c_state |= CARR_ON; tp->tm.c_state |= CARR_ON;
...@@ -325,7 +326,7 @@ int riotopen(struct tty_struct *tty, struct file *filp) ...@@ -325,7 +326,7 @@ int riotopen(struct tty_struct *tty, struct file *filp)
** I think it's OK. -- REW ** I think it's OK. -- REW
*/ */
rio_dprintk(RIO_DEBUG_TTY, "open(%d) sleeping for carr broken by signal\n", SysPort); rio_dprintk(RIO_DEBUG_TTY, "open(%d) sleeping for carr broken by signal\n", SysPort);
RIOPreemptiveCmd(p, PortP, FCLOSE); RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
/* /*
tp->tm.c_state &= ~WOPEN; tp->tm.c_state &= ~WOPEN;
*/ */
...@@ -416,7 +417,7 @@ int riotclose(void *ptr) ...@@ -416,7 +417,7 @@ int riotclose(void *ptr)
*/ */
PortP->State &= ~RIO_MOPEN; PortP->State &= ~RIO_MOPEN;
PortP->State &= ~RIO_CARR_ON; PortP->State &= ~RIO_CARR_ON;
PortP->ModemState &= ~MSVR1_CD; PortP->ModemState &= ~RIOC_MSVR1_CD;
/* /*
** If the device was open as both a Modem and a tty line ** If the device was open as both a Modem and a tty line
** then we need to wimp out here, as the port has not really ** then we need to wimp out here, as the port has not really
...@@ -453,7 +454,7 @@ int riotclose(void *ptr) ...@@ -453,7 +454,7 @@ int riotclose(void *ptr)
if (repeat_this-- <= 0) { if (repeat_this-- <= 0) {
rv = -EINTR; rv = -EINTR;
rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n"); rio_dprintk(RIO_DEBUG_TTY, "Waiting for not idle closed broken by signal\n");
RIOPreemptiveCmd(p, PortP, FCLOSE); RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
goto close_end; goto close_end;
} }
rio_dprintk(RIO_DEBUG_TTY, "Calling timeout to flush in closing\n"); rio_dprintk(RIO_DEBUG_TTY, "Calling timeout to flush in closing\n");
...@@ -492,8 +493,8 @@ int riotclose(void *ptr) ...@@ -492,8 +493,8 @@ int riotclose(void *ptr)
/* Can't call RIOShortCommand with the port locked. */ /* Can't call RIOShortCommand with the port locked. */
rio_spin_unlock_irqrestore(&PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (RIOShortCommand(p, PortP, CLOSE, 1, 0) == RIO_FAIL) { if (RIOShortCommand(p, PortP, RIOC_CLOSE, 1, 0) == RIO_FAIL) {
RIOPreemptiveCmd(p, PortP, FCLOSE); RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
goto close_end; goto close_end;
} }
...@@ -503,7 +504,7 @@ int riotclose(void *ptr) ...@@ -503,7 +504,7 @@ int riotclose(void *ptr)
try--; try--;
if (time_after(jiffies, end_time)) { if (time_after(jiffies, end_time)) {
rio_dprintk(RIO_DEBUG_TTY, "Run out of tries - force the bugger shut!\n"); rio_dprintk(RIO_DEBUG_TTY, "Run out of tries - force the bugger shut!\n");
RIOPreemptiveCmd(p, PortP, FCLOSE); RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
break; break;
} }
rio_dprintk(RIO_DEBUG_TTY, "Close: PortState:ISOPEN is %d\n", PortP->PortState & PORT_ISOPEN); rio_dprintk(RIO_DEBUG_TTY, "Close: PortState:ISOPEN is %d\n", PortP->PortState & PORT_ISOPEN);
...@@ -515,14 +516,14 @@ int riotclose(void *ptr) ...@@ -515,14 +516,14 @@ int riotclose(void *ptr)
} }
if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) { if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
rio_dprintk(RIO_DEBUG_TTY, "RTA EINTR in delay \n"); rio_dprintk(RIO_DEBUG_TTY, "RTA EINTR in delay \n");
RIOPreemptiveCmd(p, PortP, FCLOSE); RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE);
break; break;
} }
} }
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
rio_dprintk(RIO_DEBUG_TTY, "Close: try was %d on completion\n", try); rio_dprintk(RIO_DEBUG_TTY, "Close: try was %d on completion\n", try);
/* RIOPreemptiveCmd(p, PortP, FCLOSE); */ /* RIOPreemptiveCmd(p, PortP, RIOC_FCLOSE); */
/* /*
** 15.10.1998 ARG - ESIL 0761 part fix ** 15.10.1998 ARG - ESIL 0761 part fix
......
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