summaryrefslogtreecommitdiffstats
path: root/drivers/char/rio
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-28 22:00:09 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-28 22:00:09 +0000
commit1a1d77dd589de5a567fa95e36aa6999c704ceca4 (patch)
tree141e31f89f18b9fe0831f31852e0435ceaccafc5 /drivers/char/rio
parentfb9c690a18b3d66925a65b17441c37fa14d4370b (diff)
Merge with 2.4.0-test7.
Diffstat (limited to 'drivers/char/rio')
-rw-r--r--drivers/char/rio/linux_compat.h4
-rw-r--r--drivers/char/rio/rio_linux.c46
-rw-r--r--drivers/char/rio/rio_linux.h23
-rw-r--r--drivers/char/rio/rioboot.c186
-rw-r--r--drivers/char/rio/riocmd.c248
-rw-r--r--drivers/char/rio/rioctrl.c430
-rw-r--r--drivers/char/rio/rioinit.c252
-rw-r--r--drivers/char/rio/riointr.c142
-rw-r--r--drivers/char/rio/rioparam.c174
-rw-r--r--drivers/char/rio/rioroute.c148
-rw-r--r--drivers/char/rio/riotable.c168
-rw-r--r--drivers/char/rio/riotty.c222
12 files changed, 1047 insertions, 996 deletions
diff --git a/drivers/char/rio/linux_compat.h b/drivers/char/rio/linux_compat.h
index 3b6d2f3b1..ca1649f1e 100644
--- a/drivers/char/rio/linux_compat.h
+++ b/drivers/char/rio/linux_compat.h
@@ -72,8 +72,6 @@ struct ttystatics {
extern int rio_debug;
-#define rio_dprint(f, p) do {if (rio_debug & f) printk p;} while (0)
-
#define RIO_DEBUG_INIT 0x000001
#define RIO_DEBUG_BOOT 0x000002
#define RIO_DEBUG_CMD 0x000004
@@ -92,7 +90,7 @@ extern int rio_debug;
#define RIO_DEBUG_REC 0x008000
#define RIO_DEBUG_SPINLOCK 0x010000
#define RIO_DEBUG_DELAY 0x020000
-
+#define RIO_DEBUG_MOD_COUNT 0x040000
/* Copied over from riowinif.h . This is ugly. The winif file declares
also much other stuff which is incompatible with the headers from
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index 01865a09d..93d1e1c46 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -249,6 +249,8 @@ long rio_irqmask = -1;
#ifndef TWO_ZERO
#ifdef MODULE
+MODULE_AUTHOR("Rogier Wolff <R.E.Wolff@bitwizard.nl>, Patrick van de Lageweg <patrick@bitwizard.nl>");
+MODULE_DESCRIPTION("RIO driver");
MODULE_PARM(rio_poll, "i");
MODULE_PARM(rio_debug, "i");
MODULE_PARM(rio_irqmask, "i");
@@ -394,26 +396,37 @@ void rio_udelay (int usecs)
void rio_inc_mod_count (void)
{
+#ifdef MODULE
func_enter ();
+ rio_dprintk (RIO_DEBUG_MOD_COUNT, "rio_inc_mod_count\n");
MOD_INC_USE_COUNT;
func_exit ();
+#endif
}
void rio_dec_mod_count (void)
{
+#ifdef MODULE
func_enter ();
+ rio_dprintk (RIO_DEBUG_MOD_COUNT, "rio_dec_mod_count\n");
MOD_DEC_USE_COUNT;
func_exit ();
+#endif
}
static int rio_set_real_termios (void *ptr)
{
- int rv;
+ int rv, modem;
+ struct tty_struct *tty;
func_enter();
- rv = RIOParam( (struct Port *) ptr, CONFIG, 0, 1);
+ tty = ((struct Port *)ptr)->gs.tty;
+
+ modem = (MAJOR(tty->device) == RIO_NORMAL_MAJOR0) || (MAJOR(tty->device) == RIO_NORMAL_MAJOR1);
+
+ rv = RIOParam( (struct Port *) ptr, CONFIG, modem, 1);
func_exit ();
@@ -631,6 +644,7 @@ static void rio_shutdown_port (void * ptr)
func_exit();
}
+
/* I haven't the foggiest why the decrement use count has to happen
here. The whole linux serial drivers stuff needs to be redesigned.
My guess is that this is a hack to minimize the impact of a bug
@@ -641,7 +655,7 @@ static void rio_shutdown_port (void * ptr)
static void rio_hungup (void *ptr)
{
func_enter ();
- /* rio_dec_mod_count (); */
+ rio_dec_mod_count ();
func_exit ();
}
@@ -652,9 +666,22 @@ static void rio_hungup (void *ptr)
*/
static void rio_close (void *ptr)
{
+ struct Port *PortP;
+
func_enter ();
+
+ PortP = (struct Port *)ptr;
+
riotclose (ptr);
+
+ if(PortP->gs.count) {
+ printk (KERN_ERR "WARNING port count:%d\n", PortP->gs.count);
+ PortP->gs.count = 0;
+ }
+
+
rio_dec_mod_count ();
+
func_exit ();
}
@@ -974,13 +1001,12 @@ static int rio_init_datastructures (void)
port->gs.close_delay = HZ/2;
port->gs.closing_wait = 30 * HZ;
port->gs.rd = &rio_real_driver;
-
+ port->portSem = SPIN_LOCK_UNLOCKED;
/*
* Initializing wait queue
*/
init_waitqueue_head(&port->gs.open_wait);
- init_waitqueue_head(&port->gs.close_wait);
-
+ init_waitqueue_head(&port->gs.close_wait);
}
#else
/* We could postpone initializing them to when they are configured. */
@@ -1010,7 +1036,7 @@ static int rio_init_datastructures (void)
return -ENOMEM;
}
-
+#ifdef MODULE
static void rio_release_drivers(void)
{
func_enter();
@@ -1020,6 +1046,7 @@ static void rio_release_drivers(void)
tty_unregister_driver (&rio_driver);
func_exit();
}
+#endif
#ifdef TWO_ZERO
#define PDEV unsigned char pci_bus, unsigned pci_fun
@@ -1120,7 +1147,7 @@ int rio_init(void)
while ((pdev = pci_find_device (PCI_VENDOR_ID_SPECIALIX,
PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8,
pdev))) {
- if (pci_enable_device(pdev)) continue;
+ if (pci_enable_device(pdev)) continue;
#else
for (i=0;i< RIO_NBOARDS;i++) {
if (pcibios_find_device (PCI_VENDOR_ID_SPECIALIX,
@@ -1157,6 +1184,7 @@ int rio_init(void)
hp->Type = RIO_PCI;
hp->Copy = rio_pcicopy;
hp->Mode = RIO_PCI_BOOT_FROM_RAM;
+ hp->HostLock = SPIN_LOCK_UNLOCKED;
rio_reset_interrupt (hp);
rio_start_card_running (hp);
@@ -1206,7 +1234,7 @@ int rio_init(void)
while ((pdev = pci_find_device (PCI_VENDOR_ID_SPECIALIX,
PCI_DEVICE_ID_SPECIALIX_RIO,
pdev))) {
- if (pci_enable_device(pdev)) continue;
+ if (pci_enable_device(pdev)) continue;
#else
for (i=0;i< RIO_NBOARDS;i++) {
if (pcibios_find_device (PCI_VENDOR_ID_SPECIALIX,
diff --git a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h
index c8b72bdce..4242197e5 100644
--- a/drivers/char/rio/rio_linux.h
+++ b/drivers/char/rio/rio_linux.h
@@ -29,6 +29,8 @@
#define RIO_PORTSPERBOARD 128
#define RIO_NPORTS (RIO_NBOARDS * RIO_PORTSPERBOARD)
+#define MODEM_SUPPORT
+
#ifdef __KERNEL__
#define RIO_MAGIC 0x12345678
@@ -85,31 +87,34 @@ struct vpd_prom {
#endif
+void rio_dec_mod_count (void);
+void rio_inc_mod_count (void);
+
/* Allow us to debug "in the field" without requiring clients to
recompile.... */
#if 1
#define rio_spin_lock_irqsave(sem, flags) do { \
- rio_dprint(RIO_DEBUG_SPINLOCK, ("spinlockirqsave: %p %s:%d\n", \
- sem, __FILE__, __LINE__));\
+ rio_dprintk (RIO_DEBUG_SPINLOCK, "spinlockirqsave: %p %s:%d\n", \
+ sem, __FILE__, __LINE__);\
spin_lock_irqsave(sem, flags);\
} while (0)
#define rio_spin_unlock_irqrestore(sem, flags) do { \
- rio_dprint(RIO_DEBUG_SPINLOCK, ("spinunlockirqrestore: %p %s:%d\n",\
- sem, __FILE__, __LINE__));\
+ rio_dprintk (RIO_DEBUG_SPINLOCK, "spinunlockirqrestore: %p %s:%d\n",\
+ sem, __FILE__, __LINE__);\
spin_unlock_irqrestore(sem, flags);\
} while (0)
#define rio_spin_lock(sem) do { \
- rio_dprint(RIO_DEBUG_SPINLOCK, ("spinlock: %p %s:%d\n",\
- sem, __FILE__, __LINE__));\
+ rio_dprintk (RIO_DEBUG_SPINLOCK, "spinlock: %p %s:%d\n",\
+ sem, __FILE__, __LINE__);\
spin_lock(sem);\
} while (0)
#define rio_spin_unlock(sem) do { \
- rio_dprint(RIO_DEBUG_SPINLOCK, ("spinunlock: %p %s:%d\n",\
- sem, __FILE__, __LINE__));\
+ rio_dprintk (RIO_DEBUG_SPINLOCK, "spinunlock: %p %s:%d\n",\
+ sem, __FILE__, __LINE__);\
spin_unlock(sem);\
} while (0)
#else
@@ -173,7 +178,7 @@ static inline void *rio_memcpy_fromio (void *dest, void *source, int n)
*/
#ifdef DEBUG
-#define rio_dprintk(f, str...) if (rio_debug & f) printk (str)
+#define rio_dprintk(f, str...) do { if (rio_debug & f) printk (str);} while (0)
#define func_enter() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter " __FUNCTION__ "\n")
#define func_exit() rio_dprintk (RIO_DEBUG_FLOW, "rio: exit " __FUNCTION__ "\n")
#define func_enter2() rio_dprintk (RIO_DEBUG_FLOW, "rio: enter " __FUNCTION__ \
diff --git a/drivers/char/rio/rioboot.c b/drivers/char/rio/rioboot.c
index 8168f2133..d5ab5ba02 100644
--- a/drivers/char/rio/rioboot.c
+++ b/drivers/char/rio/rioboot.c
@@ -118,13 +118,13 @@ struct DownLoad * rbp;
"copyin". (Crash when a pagefault occurs). */
/* disable(oldspl); */
- rio_dprint(RIO_DEBUG_BOOT, ("Data at user address 0x%x\n",(int)rbp->DataP));
+ rio_dprintk (RIO_DEBUG_BOOT, "Data at user address 0x%x\n",(int)rbp->DataP);
/*
** Check that we have set asside enough memory for this
*/
if ( rbp->Count > SIXTY_FOUR_K ) {
- rio_dprint(RIO_DEBUG_BOOT, ("RTA Boot Code Too Large!\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA Boot Code Too Large!\n");
p->RIOError.Error = HOST_FILE_TOO_LARGE;
/* restore(oldspl); */
func_exit ();
@@ -132,7 +132,7 @@ struct DownLoad * rbp;
}
if ( p->RIOBooting ) {
- rio_dprint(RIO_DEBUG_BOOT, ("RTA Boot Code : BUSY BUSY BUSY!\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA Boot Code : BUSY BUSY BUSY!\n");
p->RIOError.Error = BOOT_IN_PROGRESS;
/* restore(oldspl); */
func_exit ();
@@ -160,7 +160,7 @@ struct DownLoad * rbp;
if ( copyin((int)rbp->DataP,((caddr_t)(p->RIOBootPackets))+offset,
rbp->Count) ==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Bad data copy from user space\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Bad data copy from user space\n");
p->RIOError.Error = COPYIN_FAILED;
/* restore(oldspl); */
func_exit ();
@@ -185,7 +185,7 @@ void rio_start_card_running (struct Host * HostP)
switch ( HostP->Type ) {
case RIO_AT:
- rio_dprint(RIO_DEBUG_BOOT, ("Start ISA card running\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Start ISA card running\n");
WBYTE(HostP->Control,
BOOT_FROM_RAM | EXTERNAL_BUS_ON
| HostP->Mode
@@ -198,7 +198,7 @@ void rio_start_card_running (struct Host * HostP)
** MCA handles IRQ vectors differently, so we don't write
** them to this register.
*/
- rio_dprint(RIO_DEBUG_BOOT, ("Start MCA card running\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Start MCA card running\n");
WBYTE(HostP->Control, McaTpBootFromRam | McaTpBusEnable | HostP->Mode);
break;
@@ -206,7 +206,7 @@ void rio_start_card_running (struct Host * HostP)
/*
** EISA is totally different and expects OUTBZs to turn it on.
*/
- rio_dprint(RIO_DEBUG_BOOT, NULL,DBG_DAEMON,"Start EISA card running\n");
+ rio_dprintk (RIO_DEBUG_BOOT, "Start EISA card running\n");
OUTBZ( HostP->Slot, EISA_CONTROL_PORT, HostP->Mode | RIOEisaVec2Ctrl[HostP->Ivec] | EISA_TP_RUN | EISA_TP_BUS_ENABLE | EISA_TP_BOOT_FROM_RAM );
break;
#endif
@@ -217,11 +217,11 @@ void rio_start_card_running (struct Host * HostP)
** mapped, so we are writing to memory registers instead of io
** ports.
*/
- rio_dprint(RIO_DEBUG_BOOT, ("Start PCI card running\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Start PCI card running\n");
WBYTE(HostP->Control, PCITpBootFromRam | PCITpBusEnable | HostP->Mode);
break;
default:
- rio_dprint(RIO_DEBUG_BOOT, ("Unknown host type %d\n",HostP->Type));
+ rio_dprintk (RIO_DEBUG_BOOT, "Unknown host type %d\n", HostP->Type);
break;
}
/*
@@ -260,15 +260,15 @@ register struct DownLoad *rbp;
HostP = NULL; /* Assure the compiler we've initialized it */
for ( host=0; host<p->RIONumHosts; host++ ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Attempt to boot host %d\n",host));
+ rio_dprintk (RIO_DEBUG_BOOT, "Attempt to boot host %d\n",host);
HostP = &p->RIOHosts[host];
- rio_dprint(RIO_DEBUG_BOOT, ("Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n",
- HostP->Type, HostP->Mode, HostP->Ivec ) );
+ rio_dprintk (RIO_DEBUG_BOOT, "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n",
+ HostP->Type, HostP->Mode, HostP->Ivec);
if ( (HostP->Flags & RUN_STATE) != RC_WAITING ) {
- rio_dprint(RIO_DEBUG_BOOT, ("%s %d already running\n","Host",host));
+ rio_dprintk (RIO_DEBUG_BOOT, "%s %d already running\n","Host",host);
continue;
}
@@ -285,13 +285,13 @@ register struct DownLoad *rbp;
*/
StartP = (caddr_t)&Cad[p->RIOConf.HostLoadBase-rbp->Count];
- rio_dprint(RIO_DEBUG_BOOT, ("kernel virtual address for host is 0x%x\n", (int)Cad ) );
- rio_dprint(RIO_DEBUG_BOOT, ("kernel virtual address for download is 0x%x\n", (int)StartP ) );
- rio_dprint(RIO_DEBUG_BOOT, ("host loadbase is 0x%x\n",p->RIOConf.HostLoadBase));
- rio_dprint(RIO_DEBUG_BOOT, ("size of download is 0x%x\n", rbp->Count ) );
+ rio_dprintk (RIO_DEBUG_BOOT, "kernel virtual address for host is 0x%x\n", (int)Cad );
+ rio_dprintk (RIO_DEBUG_BOOT, "kernel virtual address for download is 0x%x\n", (int)StartP);
+ rio_dprintk (RIO_DEBUG_BOOT, "host loadbase is 0x%x\n",p->RIOConf.HostLoadBase);
+ rio_dprintk (RIO_DEBUG_BOOT, "size of download is 0x%x\n", rbp->Count);
if ( p->RIOConf.HostLoadBase < rbp->Count ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Bin too large\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Bin too large\n");
p->RIOError.Error = HOST_FILE_TOO_LARGE;
func_exit ();
return EFBIG;
@@ -307,7 +307,7 @@ register struct DownLoad *rbp;
** This ain't going to be none too clever if the download
** code is bigger than this segment.
*/
- rio_dprint(RIO_DEBUG_BOOT, ("Copy in code\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Copy in code\n");
/*
** PCI hostcard can't cope with 32 bit accesses and so need to copy
@@ -318,7 +318,7 @@ register struct DownLoad *rbp;
DownCode = sysbrk(rbp->Count);
if ( !DownCode ) {
- rio_dprint(RIO_DEBUG_BOOT, ("No system memory available\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "No system memory available\n");
p->RIOError.Error = NOT_ENOUGH_CORE_FOR_PCI_COPY;
func_exit ();
return ENOMEM;
@@ -326,7 +326,7 @@ register struct DownLoad *rbp;
bzero(DownCode, rbp->Count);
if ( copyin((int)rbp->DataP,DownCode,rbp->Count)==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Bad copyin of host data\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Bad copyin of host data\n");
p->RIOError.Error = COPYIN_FAILED;
func_exit ();
return EFAULT;
@@ -337,13 +337,13 @@ register struct DownLoad *rbp;
sysfree( DownCode, rbp->Count );
}
else if ( copyin((int)rbp->DataP,StartP,rbp->Count)==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Bad copyin of host data\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Bad copyin of host data\n");
p->RIOError.Error = COPYIN_FAILED;
func_exit ();
return EFAULT;
}
- rio_dprint(RIO_DEBUG_BOOT, ("Copy completed\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Copy completed\n");
/*
** S T O P !
@@ -444,8 +444,8 @@ register struct DownLoad *rbp;
WBYTE( DestP[6] , NFIX(0) );
WBYTE( DestP[7] , JUMP(8) );
- rio_dprint(RIO_DEBUG_BOOT, ("host loadbase is 0x%x\n",p->RIOConf.HostLoadBase));
- rio_dprint(RIO_DEBUG_BOOT, ("startup offset is 0x%x\n",offset));
+ rio_dprintk (RIO_DEBUG_BOOT, "host loadbase is 0x%x\n",p->RIOConf.HostLoadBase);
+ rio_dprintk (RIO_DEBUG_BOOT, "startup offset is 0x%x\n",offset);
/*
** Flag what is going on
@@ -459,19 +459,19 @@ register struct DownLoad *rbp;
*/
OldParmMap = RWORD(HostP->__ParmMapR);
- rio_dprint(RIO_DEBUG_BOOT, ("Original parmmap is 0x%x\n",OldParmMap));
+ rio_dprintk (RIO_DEBUG_BOOT, "Original parmmap is 0x%x\n",OldParmMap);
/*
** And start it running (I hope).
** As there is nothing dodgy or obscure about the
** above code, this is guaranteed to work every time.
*/
- rio_dprint(RIO_DEBUG_BOOT, ("Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n",
- HostP->Type, HostP->Mode, HostP->Ivec ) );
+ rio_dprintk (RIO_DEBUG_BOOT, "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n",
+ HostP->Type, HostP->Mode, HostP->Ivec);
rio_start_card_running(HostP);
- rio_dprint(RIO_DEBUG_BOOT, ("Set control port\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Set control port\n");
/*
** Now, wait for upto five seconds for the Tp to setup the parmmap
@@ -479,7 +479,7 @@ register struct DownLoad *rbp;
*/
for ( wait_count=0; (wait_count<p->RIOConf.StartupTime)&&
(RWORD(HostP->__ParmMapR)==OldParmMap); wait_count++ ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Checkout %d, 0x%x\n",wait_count,RWORD(HostP->__ParmMapR)));
+ rio_dprintk (RIO_DEBUG_BOOT, "Checkout %d, 0x%x\n",wait_count,RWORD(HostP->__ParmMapR));
delay(HostP, HUNDRED_MS);
}
@@ -489,8 +489,8 @@ register struct DownLoad *rbp;
** has crashed & burned in a really spectacular way
*/
if ( RWORD(HostP->__ParmMapR) == OldParmMap ) {
- rio_dprint(RIO_DEBUG_BOOT, ("parmmap 0x%x\n", RWORD(HostP->__ParmMapR)));
- rio_dprint(RIO_DEBUG_BOOT, ("RIO Mesg Run Fail\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "parmmap 0x%x\n", RWORD(HostP->__ParmMapR));
+ rio_dprintk (RIO_DEBUG_BOOT, "RIO Mesg Run Fail\n");
#define HOST_DISABLE \
HostP->Flags &= ~RUN_STATE; \
@@ -501,7 +501,7 @@ register struct DownLoad *rbp;
HOST_DISABLE;
}
- rio_dprint(RIO_DEBUG_BOOT, ("Running 0x%x\n",RWORD(HostP->__ParmMapR)));
+ rio_dprintk (RIO_DEBUG_BOOT, "Running 0x%x\n", RWORD(HostP->__ParmMapR));
/*
** Well, the board thought it was OK, and setup its parmmap
@@ -513,10 +513,10 @@ register struct DownLoad *rbp;
** Grab a 32 bit pointer to the parmmap structure
*/
ParmMapP = (PARM_MAP *)RIO_PTR(Cad,RWORD(HostP->__ParmMapR));
- rio_dprint(RIO_DEBUG_BOOT, ("ParmMapP : %x\n", (int)ParmMapP));
+ rio_dprintk (RIO_DEBUG_BOOT, "ParmMapP : %x\n", (int)ParmMapP);
ParmMapP = (PARM_MAP *)((unsigned long)Cad +
(unsigned long)((RWORD((HostP->__ParmMapR))) & 0xFFFF));
- rio_dprint(RIO_DEBUG_BOOT, ("ParmMapP : %x\n", (int)ParmMapP));
+ rio_dprintk (RIO_DEBUG_BOOT, "ParmMapP : %x\n", (int)ParmMapP);
/*
** The links entry should be 0xFFFF; we set it up
@@ -524,8 +524,8 @@ register struct DownLoad *rbp;
** which links to use.
*/
if ( (RWORD(ParmMapP->links) & 0xFFFF) != 0xFFFF ) {
- rio_dprint(RIO_DEBUG_BOOT, ("RIO Mesg Run Fail %s\n", HostP->Name));
- rio_dprint(RIO_DEBUG_BOOT, ("Links = 0x%x\n",RWORD(ParmMapP->links)));
+ rio_dprintk (RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
+ rio_dprintk (RIO_DEBUG_BOOT, "Links = 0x%x\n",RWORD(ParmMapP->links));
HOST_DISABLE;
}
@@ -535,28 +535,28 @@ register struct DownLoad *rbp;
** now wait for the card to set all the parmmap->XXX stuff
** this is a wait of upto two seconds....
*/
- rio_dprint(RIO_DEBUG_BOOT, ("Looking for init_done - %d ticks\n",p->RIOConf.StartupTime));
+ rio_dprintk (RIO_DEBUG_BOOT, "Looking for init_done - %d ticks\n",p->RIOConf.StartupTime);
HostP->timeout_id = 0;
for ( wait_count=0; (wait_count<p->RIOConf.StartupTime) &&
!RWORD(ParmMapP->init_done); wait_count++ ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Waiting for init_done\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Waiting for init_done\n");
delay(HostP, HUNDRED_MS);
}
- rio_dprint(RIO_DEBUG_BOOT, ("OK! init_done!\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "OK! init_done!\n");
if (RWORD(ParmMapP->error) != E_NO_ERROR ||
!RWORD(ParmMapP->init_done) ) {
- rio_dprint(RIO_DEBUG_BOOT, ("RIO Mesg Run Fail %s\n", HostP->Name));
- rio_dprint(RIO_DEBUG_BOOT, ("Timedout waiting for init_done\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
+ rio_dprintk (RIO_DEBUG_BOOT, "Timedout waiting for init_done\n");
HOST_DISABLE;
}
- rio_dprint(RIO_DEBUG_BOOT, ("Got init_done\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Got init_done\n");
/*
** It runs! It runs!
*/
- rio_dprint(RIO_DEBUG_BOOT, ("Host ID %x Running\n",HostP->UniqueNum));
+ rio_dprintk (RIO_DEBUG_BOOT, "Host ID %x Running\n",HostP->UniqueNum);
/*
** set the time period between interrupts.
@@ -580,12 +580,14 @@ register struct DownLoad *rbp;
HostP->UnixRups[RupN].RupP = &HostP->RupP[RupN];
HostP->UnixRups[RupN].Id = RupN+1;
HostP->UnixRups[RupN].BaseSysPort = NO_PORT;
+ HostP->UnixRups[RupN].RupLock = SPIN_LOCK_UNLOCKED;
}
for ( RupN = 0; RupN<LINKS_PER_UNIT; RupN++ ) {
HostP->UnixRups[RupN+MAX_RUP].RupP = &HostP->LinkStrP[RupN].rup;
HostP->UnixRups[RupN+MAX_RUP].Id = 0;
HostP->UnixRups[RupN+MAX_RUP].BaseSysPort = NO_PORT;
+ HostP->UnixRups[RupN+MAX_RUP].RupLock = SPIN_LOCK_UNLOCKED;
}
/*
@@ -622,7 +624,7 @@ register struct DownLoad *rbp;
}
}
- rio_dprint(RIO_DEBUG_BOOT, ("Set the card running... \n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Set the card running... \n");
/*
** last thing - show the world that everything is in place
*/
@@ -638,7 +640,7 @@ register struct DownLoad *rbp;
p->RIOSystemUp++;
- rio_dprint(RIO_DEBUG_BOOT, ("Done everything %x\n", HostP->Ivec));
+ rio_dprintk (RIO_DEBUG_BOOT, "Done everything %x\n", HostP->Ivec);
func_exit ();
return 0;
}
@@ -672,7 +674,7 @@ struct PKT *PacketP;
** If we haven't been told what to boot, we can't boot it.
*/
if ( p->RIONumBootPkts == 0 ) {
- rio_dprint(RIO_DEBUG_BOOT, ("No RTA code to download yet\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "No RTA code to download yet\n");
return 0;
}
@@ -693,7 +695,7 @@ struct PKT *PacketP;
** try to unhook a command block from the command free list.
*/
if ( !(CmdBlkP = RIOGetCmdBlk()) ) {
- rio_dprint(RIO_DEBUG_BOOT, ("No command blocks to boot RTA! come back later.\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "No command blocks to boot RTA! come back later.\n");
return 0;
}
@@ -716,8 +718,8 @@ struct PKT *PacketP;
** We only expect one type of command - a BOOT_REQUEST!
*/
if ( RBYTE(PktCmdP->Command) != BOOT_REQUEST ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Unexpected command %d on BOOT RUP %d of host %d\n",
- PktCmdP->Command,Rup,HostP-p->RIOHosts));
+ rio_dprintk (RIO_DEBUG_BOOT, "Unexpected command %d on BOOT RUP %d of host %d\n",
+ PktCmdP->Command,Rup,HostP-p->RIOHosts);
ShowPacket( DBG_BOOT, PacketP );
RIOFreeCmdBlk( CmdBlkP );
return 1;
@@ -754,9 +756,9 @@ struct PKT *PacketP;
bcopy("BOOT",(void *)&CmdBlkP->Packet.data[BOOT_SEQUENCE_LEN],4);
- rio_dprint(RIO_DEBUG_BOOT, ("Boot RTA on Host %d Rup %d - %d (0x%x) packets to 0x%x\n",
+ rio_dprintk (RIO_DEBUG_BOOT, "Boot RTA on Host %d Rup %d - %d (0x%x) packets to 0x%x\n",
HostP-p->RIOHosts, Rup, p->RIONumBootPkts, p->RIONumBootPkts,
- p->RIOConf.RtaLoadBase));
+ p->RIOConf.RtaLoadBase);
/*
** If this host is in slave mode, send the RTA an invalid boot
@@ -775,11 +777,11 @@ struct PKT *PacketP;
*/
sequence = RWORD(PktCmdP->Sequence);
- rio_dprint(RIO_DEBUG_BOOT, ("Boot block %d on Host %d Rup%d\n",sequence,HostP-p->RIOHosts,Rup));
+ rio_dprintk (RIO_DEBUG_BOOT, "Boot block %d on Host %d Rup%d\n",sequence,HostP-p->RIOHosts,Rup);
if ( sequence >= p->RIONumBootPkts ) {
- rio_dprint(RIO_DEBUG_BOOT, ("Got a request for packet %d, max is %d\n", sequence,
- p->RIONumBootPkts));
+ rio_dprintk (RIO_DEBUG_BOOT, "Got a request for packet %d, max is %d\n", sequence,
+ p->RIONumBootPkts);
ShowPacket( DBG_BOOT, PacketP );
}
@@ -821,26 +823,26 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
driver will never think that the RTA has booted... -- REW */
p->RIOBooting = 0;
- rio_dprint(RIO_DEBUG_BOOT, ("RTA Boot completed - BootInProgress now %d\n", p->RIOBooting));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA Boot completed - BootInProgress now %d\n", p->RIOBooting);
/*
** Determine type of unit (16/8 port RTA).
*/
RtaType = GetUnitType(RtaUniq);
if ( Rup >= (ushort)MAX_RUP ) {
- rio_dprint(RIO_DEBUG_BOOT, ("RIO: Host %s has booted an RTA(%d) on link %c\n",
- HostP->Name, 8 * RtaType, RBYTE(PktCmdP->LinkNum)+'A' ));
+ rio_dprintk (RIO_DEBUG_BOOT, "RIO: Host %s has booted an RTA(%d) on link %c\n",
+ HostP->Name, 8 * RtaType, RBYTE(PktCmdP->LinkNum)+'A');
} else {
- rio_dprint(RIO_DEBUG_BOOT, ("RIO: RTA %s has booted an RTA(%d) on link %c\n",
+ rio_dprintk (RIO_DEBUG_BOOT, "RIO: RTA %s has booted an RTA(%d) on link %c\n",
HostP->Mapping[Rup].Name, 8 * RtaType,
- RBYTE(PktCmdP->LinkNum)+'A'));
+ RBYTE(PktCmdP->LinkNum)+'A');
}
- rio_dprint(RIO_DEBUG_BOOT, ("UniqNum is 0x%x\n",RtaUniq));
+ rio_dprintk (RIO_DEBUG_BOOT, "UniqNum is 0x%x\n",RtaUniq);
if ( ( RtaUniq == 0x00000000 ) || ( RtaUniq == 0xffffffff ) )
{
- rio_dprint(RIO_DEBUG_BOOT, ( "Illegal RTA Uniq Number\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "Illegal RTA Uniq Number\n");
return TRUE;
}
@@ -861,8 +863,8 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
*/
if (RIOSuspendBootRta(HostP, HostP->Mapping[Rup].ID, MyLink))
{
- rio_dprint(RIO_DEBUG_BOOT, ("RTA failed to suspend booting on link %c\n",
- 'A' + MyLink));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA failed to suspend booting on link %c\n",
+ 'A' + MyLink);
}
}
else
@@ -874,8 +876,8 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
*/
WWORD(HostP->LinkStrP[MyLink].WaitNoBoot, 30);
}
- rio_dprint(RIO_DEBUG_BOOT, ("RTA %x not owned - suspend booting down link %c on unit %x\n",
- RtaUniq, 'A' + MyLink, HostP->Mapping[Rup].RtaUniqueNum));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA %x not owned - suspend booting down link %c on unit %x\n",
+ RtaUniq, 'A' + MyLink, HostP->Mapping[Rup].RtaUniqueNum);
return TRUE;
}
@@ -925,16 +927,16 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
}
}
if (RtaType == TYPE_RTA16) {
- rio_dprint(RIO_DEBUG_BOOT, ("RTA will be given IDs %d+%d\n",
- entry+1, entry2+1));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA will be given IDs %d+%d\n",
+ entry+1, entry2+1);
} else {
- rio_dprint(RIO_DEBUG_BOOT, ("RTA will be given ID %d\n",entry+1));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA will be given ID %d\n",entry+1);
}
return TRUE;
}
}
- rio_dprint(RIO_DEBUG_BOOT, ("RTA not configured for this host\n"));
+ rio_dprintk (RIO_DEBUG_BOOT, "RTA not configured for this host\n");
if ( Rup >= (ushort)MAX_RUP )
{
@@ -978,13 +980,13 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
entry2 = HostP->Mapping[entry].ID2 - 1;
if ( (HostP->Mapping[entry2].Flags & SLOT_TENTATIVE) &&
(HostP->Mapping[entry2].RtaUniqueNum == RtaUniq) )
- rio_dprint(RIO_DEBUG_BOOT, ("Found previous tentative slots (%d+%d)\n",
- entry, entry2));
+ rio_dprintk (RIO_DEBUG_BOOT, "Found previous tentative slots (%d+%d)\n",
+ entry, entry2);
else
continue;
}
else
- rio_dprint(RIO_DEBUG_BOOT, ("Found previous tentative slot (%d)\n",entry));
+ rio_dprintk (RIO_DEBUG_BOOT, "Found previous tentative slot (%d)\n",entry);
if (! p->RIONoMessage)
cprintf("RTA connected to %s '%s' (%c) not configured.\n",MyType,MyName,MyLink+'A');
return TRUE;
@@ -1013,7 +1015,7 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
** + Configure RTA on host A. We now have the same RTA configured
** with different ports on two different hosts.
*/
- rio_dprint(RIO_DEBUG_BOOT, ("Have we seen RTA %x before?\n", RtaUniq ));
+ rio_dprintk (RIO_DEBUG_BOOT, "Have we seen RTA %x before?\n", RtaUniq );
found = 0;
Flag = 0; /* Convince the compiler this variable is initialized */
for ( host = 0; !found && (host < p->RIONumHosts); host++ )
@@ -1029,12 +1031,12 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
if (RtaType == TYPE_RTA16)
{
MapP2 = &p->RIOHosts[host].Mapping[MapP->ID2 - 1];
- rio_dprint(RIO_DEBUG_BOOT, ("This RTA is units %d+%d from host %s\n",
- rta+1, MapP->ID2, p->RIOHosts[host].Name ));
+ rio_dprintk (RIO_DEBUG_BOOT, "This RTA is units %d+%d from host %s\n",
+ rta+1, MapP->ID2, p->RIOHosts[host].Name);
}
else
- rio_dprint(RIO_DEBUG_BOOT, ("This RTA is unit %d from host %s\n",
- rta+1, p->RIOHosts[host].Name ));
+ rio_dprintk (RIO_DEBUG_BOOT, "This RTA is unit %d from host %s\n",
+ rta+1, p->RIOHosts[host].Name);
found = 1;
break;
}
@@ -1052,12 +1054,12 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
*/
if ( !MapP )
{
- rio_dprint(RIO_DEBUG_BOOT, ("Look for RTA %x in RIOSavedTable\n",RtaUniq));
+ rio_dprintk (RIO_DEBUG_BOOT, "Look for RTA %x in RIOSavedTable\n",RtaUniq);
for ( rta=0; rta < TOTAL_MAP_ENTRIES; rta++ )
{
- rio_dprint(RIO_DEBUG_BOOT, ("Check table entry %d (%x)",
+ rio_dprintk (RIO_DEBUG_BOOT, "Check table entry %d (%x)",
rta,
- p->RIOSavedTable[rta].RtaUniqueNum ));
+ p->RIOSavedTable[rta].RtaUniqueNum);
if ( (p->RIOSavedTable[rta].Flags & SLOT_IN_USE) &&
(p->RIOSavedTable[rta].RtaUniqueNum == RtaUniq) )
@@ -1073,11 +1075,11 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
break;
}
MapP2 = &p->RIOSavedTable[entry2];
- rio_dprint(RIO_DEBUG_BOOT, ("This RTA is from table entries %d+%d\n",
- rta, entry2));
+ rio_dprintk (RIO_DEBUG_BOOT, "This RTA is from table entries %d+%d\n",
+ rta, entry2);
}
else
- rio_dprint(RIO_DEBUG_BOOT, ("This RTA is from table entry %d\n", rta));
+ rio_dprintk (RIO_DEBUG_BOOT, "This RTA is from table entry %d\n", rta);
break;
}
}
@@ -1133,8 +1135,8 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
{
if (Flag & SLOT_IN_USE)
{
- rio_dprint(RIO_DEBUG_BOOT, (
- "This RTA configured on another host - move entry to current host (1)\n"));
+ rio_dprintk (RIO_DEBUG_BOOT,
+ "This RTA configured on another host - move entry to current host (1)\n");
HostP->Mapping[entry].SysPort = MapP->SysPort;
CCOPY( MapP->Name, HostP->Mapping[entry].Name, MAX_NAME_LEN );
HostP->Mapping[entry].Flags =
@@ -1147,12 +1149,12 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
p->RIOFirstPortsBooted = HostP->Mapping[entry].SysPort;
if ( HostP->Mapping[entry].SysPort > p->RIOLastPortsBooted )
p->RIOLastPortsBooted = HostP->Mapping[entry].SysPort;
- rio_dprint(RIO_DEBUG_BOOT, ("SysPort %d, Name %s\n",(int)MapP->SysPort,MapP->Name));
+ rio_dprintk (RIO_DEBUG_BOOT, "SysPort %d, Name %s\n",(int)MapP->SysPort,MapP->Name);
}
else
{
- rio_dprint(RIO_DEBUG_BOOT, (
- "This RTA has a tentative entry on another host - delete that entry (1)\n"));
+ rio_dprintk (RIO_DEBUG_BOOT,
+ "This RTA has a tentative entry on another host - delete that entry (1)\n");
HostP->Mapping[entry].Flags =
SLOT_TENTATIVE | RTA_BOOTED | RTA_NEWBOOT;
#if NEED_TO_FIX
@@ -1177,9 +1179,9 @@ int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, struct Pk
p->RIOFirstPortsBooted = HostP->Mapping[entry2].SysPort;
if (HostP->Mapping[entry2].SysPort > p->RIOLastPortsBooted)
p->RIOLastPortsBooted = HostP->Mapping[entry2].SysPort;
- rio_dprint(RIO_DEBUG_BOOT, ("SysPort %d, Name %s\n",
+ rio_dprintk (RIO_DEBUG_BOOT, "SysPort %d, Name %s\n",
(int)HostP->Mapping[entry2].SysPort,
- HostP->Mapping[entry].Name));
+ HostP->Mapping[entry].Name);
}
else
HostP->Mapping[entry2].Flags = SLOT_TENTATIVE |
@@ -1272,7 +1274,7 @@ struct Host *HostP;
{
int link;
- rio_dprint(RIO_DEBUG_BOOT, ("FillSlot(%d, %d, 0x%x...)\n", entry, entry2, RtaUniq));
+ rio_dprintk (RIO_DEBUG_BOOT, "FillSlot(%d, %d, 0x%x...)\n", entry, entry2, RtaUniq);
HostP->Mapping[entry].Flags = (RTA_BOOTED | RTA_NEWBOOT | SLOT_TENTATIVE);
HostP->Mapping[entry].SysPort = NO_PORT;
diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c
index 835d815d3..3a330a07c 100644
--- a/drivers/char/rio/riocmd.c
+++ b/drivers/char/rio/riocmd.c
@@ -91,12 +91,12 @@ struct Map * MapP;
{
struct CmdBlk *CmdBlkP;
- rio_dprint(RIO_DEBUG_CMD, ("FOAD RTA\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "FOAD RTA\n");
CmdBlkP = RIOGetCmdBlk();
if ( !CmdBlkP ) {
- rio_dprint(RIO_DEBUG_CMD, ("FOAD RTA: GetCmdBlk failed\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "FOAD RTA: GetCmdBlk failed\n");
return ENXIO;
}
@@ -111,7 +111,7 @@ struct Map * MapP;
CmdBlkP->Packet.data[3] = (IFOAD_MAGIC >> 8) & 0xFF;
if ( RIOQueueCmdBlk( HostP, MapP->ID-1, CmdBlkP) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("FOAD RTA: Failed to queue foad command\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "FOAD RTA: Failed to queue foad command\n");
return EIO;
}
return 0;
@@ -124,12 +124,12 @@ struct Map * MapP;
{
struct CmdBlk *CmdBlkP;
- rio_dprint(RIO_DEBUG_CMD, ("ZOMBIE RTA\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "ZOMBIE RTA\n");
CmdBlkP = RIOGetCmdBlk();
if ( !CmdBlkP ) {
- rio_dprint(RIO_DEBUG_CMD, ("ZOMBIE RTA: GetCmdBlk failed\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "ZOMBIE RTA: GetCmdBlk failed\n");
return ENXIO;
}
@@ -144,7 +144,7 @@ struct Map * MapP;
CmdBlkP->Packet.data[3] = (ZOMBIE_MAGIC >> 8) & 0xFF;
if ( RIOQueueCmdBlk( HostP, MapP->ID-1, CmdBlkP) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("ZOMBIE RTA: Failed to queue zombie command\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "ZOMBIE RTA: Failed to queue zombie command\n");
return EIO;
}
return 0;
@@ -158,7 +158,7 @@ int (* func)( struct Host *HostP, struct Map *MapP );
{
uint Host;
- rio_dprint(RIO_DEBUG_CMD, ("Command RTA 0x%x func 0x%x\n", RtaUnique, (int)func ));
+ rio_dprintk (RIO_DEBUG_CMD, "Command RTA 0x%x func 0x%x\n", RtaUnique, (int)func);
if ( !RtaUnique )
return(0);
@@ -203,7 +203,7 @@ caddr_t arg;
uint Host;
if ( copyin( (int)arg, (caddr_t)&IdRta, sizeof(IdRta) ) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("RIO_IDENTIFY_RTA copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "RIO_IDENTIFY_RTA copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
@@ -231,12 +231,12 @@ caddr_t arg;
*/
struct CmdBlk *CmdBlkP;
- rio_dprint(RIO_DEBUG_CMD, ("IDENTIFY RTA\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "IDENTIFY RTA\n");
CmdBlkP = RIOGetCmdBlk();
if ( !CmdBlkP ) {
- rio_dprint(RIO_DEBUG_CMD, ("IDENTIFY RTA: GetCmdBlk failed\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "IDENTIFY RTA: GetCmdBlk failed\n");
return ENXIO;
}
@@ -249,9 +249,8 @@ caddr_t arg;
CmdBlkP->Packet.data[1] = 0;
CmdBlkP->Packet.data[2] = IdRta.ID;
- if ( RIOQueueCmdBlk( HostP, MapP->ID-1, CmdBlkP)
- == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("IDENTIFY RTA: Failed to queue command\n"));
+ if ( RIOQueueCmdBlk( HostP, MapP->ID-1, CmdBlkP) == RIO_FAIL ) {
+ rio_dprintk (RIO_DEBUG_CMD, "IDENTIFY RTA: Failed to queue command\n");
return EIO;
}
return 0;
@@ -274,11 +273,10 @@ caddr_t arg;
struct Host *HostP;
struct CmdBlk *CmdBlkP;
- rio_dprint(RIO_DEBUG_CMD, ("KILL HOST NEIGHBOUR\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "KILL HOST NEIGHBOUR\n");
- if ( copyin( (int)arg, (caddr_t)&KillUnit,
- sizeof(KillUnit) ) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("RIO_KILL_NEIGHBOUR copy failed\n"));
+ if ( copyin( (int)arg, (caddr_t)&KillUnit, sizeof(KillUnit) ) == COPYFAIL ) {
+ rio_dprintk (RIO_DEBUG_CMD, "RIO_KILL_NEIGHBOUR copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
@@ -289,7 +287,7 @@ caddr_t arg;
CmdBlkP = RIOGetCmdBlk();
if ( !CmdBlkP ) {
- rio_dprint(RIO_DEBUG_CMD, ("UFOAD: GetCmdBlk failed\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "UFOAD: GetCmdBlk failed\n");
return ENXIO;
}
@@ -310,7 +308,7 @@ caddr_t arg;
if ( HostP->UniqueNum == KillUnit.UniqueNum ) {
if ( RIOQueueCmdBlk( HostP, RTAS_PER_HOST+KillUnit.Link,
CmdBlkP) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("UFOAD: Failed queue command\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "UFOAD: Failed queue command\n");
return EIO;
}
return 0;
@@ -320,7 +318,7 @@ caddr_t arg;
if ( HostP->Mapping[ID].RtaUniqueNum == KillUnit.UniqueNum ) {
CmdBlkP->Packet.dest_unit = ID+1;
if ( RIOQueueCmdBlk( HostP, ID, CmdBlkP) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("UFOAD: Failed queue command\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "UFOAD: Failed queue command\n");
return EIO;
}
return 0;
@@ -339,12 +337,12 @@ int Link;
{
struct CmdBlk *CmdBlkP;
- rio_dprint(RIO_DEBUG_CMD, ("SUSPEND BOOT ON RTA ID %d, link %c\n", ID, 'A' + Link));
+ rio_dprintk (RIO_DEBUG_CMD, "SUSPEND BOOT ON RTA ID %d, link %c\n", ID, 'A' + Link);
CmdBlkP = RIOGetCmdBlk();
if ( !CmdBlkP ) {
- rio_dprint(RIO_DEBUG_CMD, ("SUSPEND BOOT ON RTA: GetCmdBlk failed\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "SUSPEND BOOT ON RTA: GetCmdBlk failed\n");
return ENXIO;
}
@@ -359,7 +357,7 @@ int Link;
CmdBlkP->Packet.data[3] = (IWAIT_MAGIC >> 8) & 0xFF;
if ( RIOQueueCmdBlk( HostP, ID - 1, CmdBlkP) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_CMD, ("SUSPEND BOOT ON RTA: Failed to queue iwait command\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "SUSPEND BOOT ON RTA: Failed to queue iwait command\n");
return EIO;
}
return 0;
@@ -416,6 +414,7 @@ PKT *PacketP;
ushort subCommand;
unsigned long flags;
+ func_enter ();
#ifdef CHECK
CheckHost( Host );
@@ -435,34 +434,35 @@ PKT *PacketP;
UnixRupP = &HostP->UnixRups[rup];
SysPort = UnixRupP->BaseSysPort +
(RBYTE(PktCmdP->PhbNum) % (ushort)PORTS_PER_RTA);
- rio_dprint(RIO_DEBUG_CMD, ("Command on rup %d, port %d\n", rup, SysPort));
+ rio_dprintk (RIO_DEBUG_CMD, "Command on rup %d, port %d\n", rup, SysPort);
#ifdef CHECK
CheckRup( rup );
CheckUnixRupP( UnixRupP );
#endif
if ( UnixRupP->BaseSysPort == NO_PORT ) {
- rio_dprint(RIO_DEBUG_CMD, ("OBSCURE ERROR!\n"));
- rio_dprint(RIO_DEBUG_CMD, ("Diagnostics follow. Please WRITE THESE DOWN and report them to Specialix Technical Support\n"));
- rio_dprint(RIO_DEBUG_CMD, ("CONTROL information: Host number %d, name ``%s''\n",
- HostP-p->RIOHosts, HostP->Name ));
- rio_dprint(RIO_DEBUG_CMD, ("CONTROL information: Rup number 0x%x\n", rup));
-
- if ( Rup >= (ushort)MAX_RUP )
- rio_dprint(RIO_DEBUG_CMD, ("CONTROL information: This is the RUP for RTA ``%s''\n",
- HostP->Mapping[Rup].Name ));
- else
- rio_dprint(RIO_DEBUG_CMD, ("CONTROL information: This is the RUP for link ``%c'' of host ``%s''\n", 'A' + Rup - MAX_RUP, HostP->Name ));
-
- rio_dprint(RIO_DEBUG_CMD, ("PACKET information: Destination 0x%x:0x%x\n",
- PacketP->dest_unit, PacketP->dest_port ));
- rio_dprint(RIO_DEBUG_CMD, ("PACKET information: Source 0x%x:0x%x\n",
- PacketP->src_unit, PacketP->src_port ));
- rio_dprint(RIO_DEBUG_CMD, ("PACKET information: Length 0x%x (%d)\n", PacketP->len,PacketP->len ));
- rio_dprint(RIO_DEBUG_CMD, ("PACKET information: Control 0x%x (%d)\n", PacketP->control, PacketP->control));
- rio_dprint(RIO_DEBUG_CMD, ("PACKET information: Check 0x%x (%d)\n", PacketP->csum, PacketP->csum ));
- rio_dprint(RIO_DEBUG_CMD, ("COMMAND information: Host Port Number 0x%x,
- Command Code 0x%x\n", PktCmdP->PhbNum, PktCmdP->Command ));
+ rio_dprintk (RIO_DEBUG_CMD, "OBSCURE ERROR!\n");
+ rio_dprintk (RIO_DEBUG_CMD, "Diagnostics follow. Please WRITE THESE DOWN and report them to Specialix Technical Support\n");
+ rio_dprintk (RIO_DEBUG_CMD, "CONTROL information: Host number %d, name ``%s''\n",
+ HostP-p->RIOHosts, HostP->Name );
+ rio_dprintk (RIO_DEBUG_CMD, "CONTROL information: Rup number 0x%x\n", rup);
+
+ if ( Rup >= (ushort)MAX_RUP ) {
+ rio_dprintk (RIO_DEBUG_CMD, "CONTROL information: This is the RUP for RTA ``%s''\n",
+ HostP->Mapping[Rup].Name);
+ } else
+ rio_dprintk (RIO_DEBUG_CMD, "CONTROL information: This is the RUP for link ``%c'' of host ``%s''\n",
+ ('A' + Rup - MAX_RUP), HostP->Name);
+
+ rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Destination 0x%x:0x%x\n",
+ PacketP->dest_unit, PacketP->dest_port );
+ rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Source 0x%x:0x%x\n",
+ PacketP->src_unit, PacketP->src_port );
+ rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Length 0x%x (%d)\n", PacketP->len,PacketP->len );
+ rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Control 0x%x (%d)\n", PacketP->control, PacketP->control);
+ rio_dprintk (RIO_DEBUG_CMD, "PACKET information: Check 0x%x (%d)\n", PacketP->csum, PacketP->csum );
+ rio_dprintk (RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x,
+ Command Code 0x%x\n", PktCmdP->PhbNum, PktCmdP->Command );
return TRUE;
}
@@ -470,13 +470,10 @@ PKT *PacketP;
CheckSysPort( SysPort );
#endif
PortP = p->RIOPortp[ SysPort ];
-#if 0
- ttyP = PortP->TtyP;
-#endif
rio_spin_lock_irqsave(&PortP->portSem, flags);
switch( RBYTE(PktCmdP->Command) ) {
case BREAK_RECEIVED:
- rio_dprint(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
the current processor is not the default, reset rup_intr
and return FALSE to ensure that the command packet is
@@ -486,16 +483,16 @@ PKT *PacketP;
break;
case COMPLETE:
- rio_dprint(RIO_DEBUG_CMD, ("Command complete on phb %d host %d\n",
- RBYTE(PktCmdP->PhbNum), HostP-p->RIOHosts));
+ rio_dprintk (RIO_DEBUG_CMD, "Command complete on phb %d host %d\n",
+ RBYTE(PktCmdP->PhbNum), HostP-p->RIOHosts);
subCommand = 1;
switch (RBYTE(PktCmdP->SubCommand)) {
case MEMDUMP :
- rio_dprint(RIO_DEBUG_CMD, ("Memory dump cmd (0x%x) from addr 0x%x\n",
- RBYTE(PktCmdP->SubCommand), RWORD(PktCmdP->SubAddr)));
+ rio_dprintk (RIO_DEBUG_CMD, "Memory dump cmd (0x%x) from addr 0x%x\n",
+ RBYTE(PktCmdP->SubCommand), RWORD(PktCmdP->SubAddr));
break;
case READ_REGISTER :
- rio_dprint(RIO_DEBUG_CMD, ("Read register (0x%x)\n", RWORD(PktCmdP->SubAddr)));
+ rio_dprintk (RIO_DEBUG_CMD, "Read register (0x%x)\n", RWORD(PktCmdP->SubAddr));
p->CdRegister = (RBYTE(PktCmdP->ModemStatus) & MSVR1_HOST);
break;
default :
@@ -504,18 +501,16 @@ PKT *PacketP;
}
if (subCommand)
break;
- rio_dprint(RIO_DEBUG_CMD, ("New status is 0x%x was 0x%x\n",
- RBYTE(PktCmdP->PortStatus),PortP->PortState));
+ rio_dprintk (RIO_DEBUG_CMD, "New status is 0x%x was 0x%x\n",
+ RBYTE(PktCmdP->PortStatus),PortP->PortState);
if (PortP->PortState != RBYTE(PktCmdP->PortStatus)) {
- rio_dprint(RIO_DEBUG_CMD, ("Mark status & wakeup\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "Mark status & wakeup\n");
PortP->PortState = RBYTE(PktCmdP->PortStatus);
/* What should we do here ...
wakeup( &PortP->PortState );
*/
- }
- else {
- rio_dprint(RIO_DEBUG_CMD, ("No change\n"));
- }
+ } else
+ rio_dprintk (RIO_DEBUG_CMD, "No change\n");
/* FALLTHROUGH */
case MODEM_STATUS:
@@ -527,7 +522,7 @@ PKT *PacketP;
ReportedModemStatus = RBYTE(PktCmdP->ModemStatus);
if ((PortP->ModemState & MSVR1_HOST) ==
(ReportedModemStatus & MSVR1_HOST)) {
- rio_dprint(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
** changed.
@@ -535,8 +530,8 @@ PKT *PacketP;
PortP->ModemState = ReportedModemStatus;
}
else {
- rio_dprint(RIO_DEBUG_CMD, ("Modem status change from 0x%x to 0x%x\n",
- PortP->ModemState, ReportedModemStatus));
+ rio_dprintk (RIO_DEBUG_CMD, "Modem status change from 0x%x to 0x%x\n",
+ PortP->ModemState, ReportedModemStatus);
PortP->ModemState = ReportedModemStatus;
#ifdef MODEM_SUPPORT
if ( PortP->Mapped ) {
@@ -551,50 +546,41 @@ PKT *PacketP;
** If the device is a modem, then check the modem
** carrier.
*/
- if(!(ttyP->t_cflag & CLOCAL) &&
- ((PortP->State & (RIO_MOPEN|RIO_WOPEN))))
- {
+ if (PortP->gs.tty == NULL)
+ break;
+
+ if (!(PortP->gs.tty->termios->c_cflag & CLOCAL) &&
+ ((PortP->State & (RIO_MOPEN|RIO_WOPEN)))) {
+
+ rio_dprintk (RIO_DEBUG_CMD, "Is there a Carrier?\n");
/*
** Is there a carrier?
*/
- if ( PortP->ModemState & MSVR1_CD )
- {
+ if ( PortP->ModemState & MSVR1_CD ) {
/*
** Has carrier just appeared?
*/
- if (!(ttyP->t_state & CARR_ON))
- {
- rio_dprint(RIO_DEBUG_CMD, PortP,DBG_MODEM,"Carrier just came up.\n");
- ttyP->t_state |=CARR_ON;
+ if (!(PortP->State & RIO_CARR_ON)) {
+ rio_dprintk (RIO_DEBUG_CMD, "Carrier just came up.\n");
+ PortP->State |= RIO_CARR_ON;
/*
** wakeup anyone in WOPEN
*/
- if ( ttyP->t_state & (ISOPEN|WOPEN) )
- wakeup((caddr_t)&ttyP->t_canq);
+ if (PortP->State & (PORT_ISOPEN | RIO_WOPEN) )
+ wake_up_interruptible (&PortP->gs.open_wait);
#ifdef STATS
PortP->Stat.ModemOnCnt++;
#endif
}
- }
- else
- {
+ } else {
/*
** Has carrier just dropped?
*/
- if (ttyP->t_state & CARR_ON)
- {
- /*
- ** send SIGHUP to the process group
- */
- if ( ttyP->t_state & (ISOPEN|WOPEN) )
- {
- signal(ttyP->t_pgrp,SIGHUP);
- ttyflush(ttyP,(FREAD|FWRITE));
- }
- ttyP->t_state &= ~CARR_ON;
- wakeup( (caddr_t)&PortP->TxBufferOut );
- wakeup( (caddr_t)&PortP->TxBufferIn );
- rio_dprint(RIO_DEBUG_CMD, PortP,DBG_MODEM,"Carrier just went down.\n");
+ if (PortP->State & RIO_CARR_ON) {
+ if (PortP->State & (PORT_ISOPEN|RIO_WOPEN|RIO_MOPEN))
+ tty_hangup (PortP->gs.tty);
+ PortP->State &= ~RIO_CARR_ON;
+ rio_dprintk (RIO_DEBUG_CMD, "Carrirer just went down\n");
#ifdef STATS
PortP->Stat.ModemOffCnt++;
#endif
@@ -607,11 +593,14 @@ PKT *PacketP;
break;
default:
- rio_dprint(RIO_DEBUG_CMD, ("Unknown command %d on CMD_RUP of host %d\n",
- RBYTE(PktCmdP->Command),HostP-p->RIOHosts));
+ rio_dprintk (RIO_DEBUG_CMD, "Unknown command %d on CMD_RUP of host %d\n",
+ RBYTE(PktCmdP->Command),HostP-p->RIOHosts);
break;
}
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
+
+ func_exit ();
+
return TRUE;
}
/*
@@ -667,11 +656,8 @@ struct CmdBlk *CmdBlkP;
CheckRup( Rup );
CheckCmdBlkP( CmdBlkP );
#endif
-
- rio_dprint(RIO_DEBUG_CMD, ("RIOQueueCmdBlk(Host, Rup %d, 0x%x)\n", Rup, (int)CmdBlkP ));
-
if ( Rup >= (ushort)(MAX_RUP+LINKS_PER_UNIT) ) {
- rio_dprint(RIO_DEBUG_CMD, ("Illegal rup number %d in RIOQueueCmdBlk\n",Rup));
+ rio_dprintk (RIO_DEBUG_CMD, "Illegal rup number %d in RIOQueueCmdBlk\n",Rup);
RIOFreeCmdBlk( CmdBlkP );
return RIO_FAIL;
}
@@ -685,11 +671,12 @@ struct CmdBlk *CmdBlkP;
** straight on the RUP....
*/
if ( (UnixRupP->CmdsWaitingP == NULL) && (UnixRupP->CmdPendingP == NULL) &&
- (RWORD(UnixRupP->RupP->txcontrol) == TX_RUP_INACTIVE) &&
+ (RWORD(UnixRupP->RupP->txcontrol) == TX_RUP_INACTIVE ) &&
(CmdBlkP->PreFuncP ? (*CmdBlkP->PreFuncP)(CmdBlkP->PreArg,CmdBlkP)
:TRUE)) {
- rio_dprint(RIO_DEBUG_CMD, ("RUP inactive-placing command straight on. Cmd byte is 0x%x\n",
- CmdBlkP->Packet.data[0]));
+ rio_dprintk (RIO_DEBUG_CMD, "RUP inactive-placing command straight on. Cmd byte is 0x%x\n",
+ CmdBlkP->Packet.data[0]);
+
/*
** Whammy! blat that pack!
@@ -711,28 +698,27 @@ struct CmdBlk *CmdBlkP;
return RIO_SUCCESS;
}
-
- rio_dprint(RIO_DEBUG_CMD, ("RUP active - en-queing\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "RUP active - en-queing\n");
if ( UnixRupP->CmdsWaitingP != NULL)
- rio_dprint(RIO_DEBUG_CMD, ("Rup active - command waiting\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "Rup active - command waiting\n");
if ( UnixRupP->CmdPendingP != NULL )
- rio_dprint(RIO_DEBUG_CMD, ("Rup active - command pending\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "Rup active - command pending\n");
if ( RWORD(UnixRupP->RupP->txcontrol) != TX_RUP_INACTIVE )
- rio_dprint(RIO_DEBUG_CMD, ("Rup active - command rup not ready\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "Rup active - command rup not ready\n");
Base = &UnixRupP->CmdsWaitingP;
- rio_dprint(RIO_DEBUG_CMD, ("First try to queue cmdblk 0x%x at 0x%x\n",(int)CmdBlkP,(int)Base));
+ rio_dprintk (RIO_DEBUG_CMD, "First try to queue cmdblk 0x%x at 0x%x\n", (int)CmdBlkP,(int)Base);
while ( *Base ) {
- rio_dprint(RIO_DEBUG_CMD, ("Command cmdblk 0x%x here\n",(int)(*Base)));
+ rio_dprintk (RIO_DEBUG_CMD, "Command cmdblk 0x%x here\n", (int)(*Base));
Base = &((*Base)->NextP);
- rio_dprint(RIO_DEBUG_CMD, ("Now try to queue cmd cmdblk 0x%x at 0x%x\n",
- (int)CmdBlkP,(int)Base));
+ rio_dprintk (RIO_DEBUG_CMD, "Now try to queue cmd cmdblk 0x%x at 0x%x\n",
+ (int)CmdBlkP,(int)Base);
}
- rio_dprint(RIO_DEBUG_CMD, ("Will queue cmdblk 0x%x at 0x%x\n",(int)CmdBlkP,(int)Base));
+ rio_dprintk (RIO_DEBUG_CMD, "Will queue cmdblk 0x%x at 0x%x\n",(int)CmdBlkP,(int)Base);
*Base = CmdBlkP;
@@ -775,17 +761,15 @@ struct Host * HostP;
if ( RWORD(UnixRupP->RupP->rxcontrol) != RX_RUP_INACTIVE ) {
int FreeMe;
- /* rio_dprint(RIO_DEBUG_CMD, ("RIORupCmd( %d, %d )\n", HostP-p->RIOHosts, Rup )); */
-
PacketP =(PKT *)RIO_PTR(HostP->Caddr,RWORD(UnixRupP->RupP->rxpkt));
ShowPacket( DBG_CMD, PacketP );
switch ( RBYTE(PacketP->dest_port) ) {
case BOOT_RUP:
- rio_dprint(RIO_DEBUG_CMD, ("Incoming Boot %s packet '%x'\n",
+ rio_dprintk (RIO_DEBUG_CMD, "Incoming Boot %s packet '%x'\n",
RBYTE(PacketP->len) & 0x80 ? "Command":"Data",
- RBYTE(PacketP->data[0]) ));
+ RBYTE(PacketP->data[0]));
rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags);
FreeMe= RIOBootRup(p, Rup,HostP,PacketP);
rio_spin_lock_irqsave(&UnixRupP->RupLock, flags);
@@ -800,8 +784,8 @@ struct Host * HostP;
rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags);
FreeMe= RIOCommandRup(p, Rup,HostP,PacketP);
if (PacketP->data[5] == MEMDUMP) {
- rio_dprint(RIO_DEBUG_CMD, ("Memdump from 0x%x complete\n",
- *(ushort *) &(PacketP->data[6])));
+ rio_dprintk (RIO_DEBUG_CMD, "Memdump from 0x%x complete\n",
+ *(ushort *) &(PacketP->data[6]));
HostP->Copy( (caddr_t)&(PacketP->data[8]),
(caddr_t)p->RIOMemDump, 32 );
}
@@ -815,19 +799,19 @@ struct Host * HostP;
break;
default:
- rio_dprint(RIO_DEBUG_CMD, ("Unknown RUP %d\n", RBYTE(PacketP->dest_port)));
+ rio_dprintk (RIO_DEBUG_CMD, "Unknown RUP %d\n", RBYTE(PacketP->dest_port));
FreeMe = 1;
break;
}
if ( FreeMe ) {
- rio_dprint(RIO_DEBUG_CMD, ("Free processed incoming command packet\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "Free processed incoming command packet\n");
put_free_end(HostP,PacketP);
WWORD(UnixRupP->RupP->rxcontrol , RX_RUP_INACTIVE);
if ( RWORD(UnixRupP->RupP->handshake)==PHB_HANDSHAKE_SET ) {
- rio_dprint(RIO_DEBUG_CMD, ("Handshake rup %d\n",Rup));
+ rio_dprintk (RIO_DEBUG_CMD, "Handshake rup %d\n",Rup);
WWORD(UnixRupP->RupP->handshake,
PHB_HANDSHAKE_SET|PHB_HANDSHAKE_RESET);
}
@@ -839,7 +823,7 @@ struct Host * HostP;
** and it has completed, then tidy it up.
*/
if ( (CmdBlkP = UnixRupP->CmdPendingP) && /* ASSIGN! */
- (RWORD(UnixRupP->RupP->txcontrol) == TX_RUP_INACTIVE) ) {
+ (RWORD(UnixRupP->RupP->txcontrol) == TX_RUP_INACTIVE)) {
/*
** we are idle.
** there is a command in pending.
@@ -848,11 +832,11 @@ struct Host * HostP;
** what happened).
*/
if ( CmdBlkP->Packet.dest_port == BOOT_RUP )
- rio_dprint(RIO_DEBUG_CMD, ("Free Boot %s Command Block '%x'\n",
+ rio_dprintk (RIO_DEBUG_CMD, "Free Boot %s Command Block '%x'\n",
CmdBlkP->Packet.len & 0x80 ? "Command":"Data",
- CmdBlkP->Packet.data[0] ));
+ CmdBlkP->Packet.data[0]);
- rio_dprint(RIO_DEBUG_CMD, ("Command 0x%x completed\n",(int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CMD, "Command 0x%x completed\n",(int)CmdBlkP);
/*
** Clear the Rup lock to prevent mutual exclusion.
@@ -880,27 +864,27 @@ struct Host * HostP;
*/
if ( (CmdBlkP = UnixRupP->CmdsWaitingP) && /* ASSIGN! */
(UnixRupP->CmdPendingP == NULL) &&
- (RWORD(UnixRupP->RupP->txcontrol) == TX_RUP_INACTIVE) ) {
+ (RWORD(UnixRupP->RupP->txcontrol) == TX_RUP_INACTIVE)) {
/*
** if the pre-function is non-zero, call it.
** If it returns RIO_FAIL then don't
** send this command yet!
*/
#ifdef CHECK
-CheckCmdBlkP( CmdBlkP );
+ CheckCmdBlkP (CmdBlkP);
#endif
if ( !(CmdBlkP->PreFuncP ?
(*CmdBlkP->PreFuncP)(CmdBlkP->PreArg, CmdBlkP) : TRUE)) {
- rio_dprint(RIO_DEBUG_CMD, ("Not ready to start command 0x%x\n",(int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CMD, "Not ready to start command 0x%x\n",(int)CmdBlkP);
}
else {
- rio_dprint(RIO_DEBUG_CMD, ("Start new command 0x%x Cmd byte is 0x%x\n",
- (int)CmdBlkP, CmdBlkP->Packet.data[0]));
+ rio_dprintk (RIO_DEBUG_CMD, "Start new command 0x%x Cmd byte is 0x%x\n",
+ (int)CmdBlkP, CmdBlkP->Packet.data[0]);
/*
** Whammy! blat that pack!
*/
#ifdef CHECK
-CheckPacketP( (PKT *)RIO_PTR(HostP->Caddr,UnixRupP->RupP->txpkt) );
+ CheckPacketP ((PKT *)RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt));
#endif
HostP->Copy( (caddr_t)&CmdBlkP->Packet,
RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(PKT));
@@ -1026,7 +1010,7 @@ struct CmdBlk *CmdBlkP;
** MAGIC! (Basically, handshake the RX buffer, so that
** the RTAs upstream can be re-enabled.)
*/
- rio_dprint(RIO_DEBUG_CMD, ("Util: Set RX handshake bit\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "Util: Set RX handshake bit\n");
WWORD(PortP->PhbP->handshake, PHB_HANDSHAKE_SET|PHB_HANDSHAKE_RESET);
}
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
@@ -1046,7 +1030,7 @@ struct CmdBlk *CmdBlkP;
#ifdef CHECK
CheckPortP( PortP );
#endif
- rio_dprint(RIO_DEBUG_CMD, ("Decrement in use count for port\n"));
+ rio_dprintk (RIO_DEBUG_CMD, "Decrement in use count for port\n");
if (PortP->InUse) {
if ( --PortP->InUse != NOT_INUSE ) {
diff --git a/drivers/char/rio/rioctrl.c b/drivers/char/rio/rioctrl.c
index fa68646d5..af61dc997 100644
--- a/drivers/char/rio/rioctrl.c
+++ b/drivers/char/rio/rioctrl.c
@@ -137,7 +137,7 @@ int copyin (int arg, caddr_t dp, int siz)
{
int rv;
- rio_dprint (RIO_DEBUG_CTRL, ("Copying %d bytes from user %p to %p.\n", siz, (void *) arg, dp));
+ rio_dprintk (RIO_DEBUG_CTRL, "Copying %d bytes from user %p to %p.\n", siz, (void *)arg, dp);
rv = copy_from_user (dp, (void *)arg, siz);
if (rv < 0) return COPYFAIL;
else return rv;
@@ -148,7 +148,7 @@ int copyout (caddr_t dp, int arg, int siz)
{
int rv;
- rio_dprint (RIO_DEBUG_CTRL, ("Copying %d bytes to user %p from %p.\n", siz, (void *) arg, dp));
+ rio_dprintk (RIO_DEBUG_CTRL, "Copying %d bytes to user %p from %p.\n", siz, (void *)arg, dp);
rv = copy_to_user ((void *)arg, dp, siz);
if (rv < 0) return COPYFAIL;
else return rv;
@@ -207,7 +207,7 @@ int su;
Host=0;
PortP = NULL;
- rio_dprint(RIO_DEBUG_CTRL, ("control ioctl cmd: 0x%x arg: 0x%x\n", cmd, (int)arg));
+ rio_dprintk (RIO_DEBUG_CTRL, "control ioctl cmd: 0x%x arg: 0x%x\n", cmd, (int)arg);
switch (cmd) {
/*
@@ -218,7 +218,7 @@ int su;
** otherwise just the specified host card will be changed.
*/
case RIO_SET_TIMER:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SET_TIMER to %dms\n", (uint)arg));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SET_TIMER to %dms\n", (uint)arg);
{
int host, value;
host = (uint)arg >> 16;
@@ -296,42 +296,42 @@ int su;
*/
case RIO_FOAD_RTA:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_FOAD_RTA\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_FOAD_RTA\n");
return RIOCommandRta(p, (uint)arg, RIOFoadRta);
case RIO_ZOMBIE_RTA:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_ZOMBIE_RTA\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_ZOMBIE_RTA\n");
return RIOCommandRta(p, (uint)arg, RIOZombieRta);
case RIO_IDENTIFY_RTA:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_IDENTIFY_RTA\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_IDENTIFY_RTA\n");
return RIOIdentifyRta(p, arg);
case RIO_KILL_NEIGHBOUR:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_KILL_NEIGHBOUR\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_KILL_NEIGHBOUR\n");
return RIOKillNeighbour(p, arg);
case SPECIAL_RUP_CMD:
{
struct CmdBlk *CmdBlkP;
- rio_dprint(RIO_DEBUG_CTRL, ("SPECIAL_RUP_CMD\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "SPECIAL_RUP_CMD\n");
if (copyin((int)arg, (caddr_t)&SpecialRupCmd,
sizeof(SpecialRupCmd)) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("SPECIAL_RUP_CMD copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "SPECIAL_RUP_CMD copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
CmdBlkP = RIOGetCmdBlk();
if ( !CmdBlkP ) {
- rio_dprint(RIO_DEBUG_CTRL, ("SPECIAL_RUP_CMD GetCmdBlk failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "SPECIAL_RUP_CMD GetCmdBlk failed\n");
return ENXIO;
}
CmdBlkP->Packet = SpecialRupCmd.Packet;
if ( SpecialRupCmd.Host >= p->RIONumHosts )
SpecialRupCmd.Host = 0;
- rio_dprint(RIO_DEBUG_CTRL, ("Queue special rup command for host %d rup %d\n",
- SpecialRupCmd.Host, SpecialRupCmd.RupNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue special rup command for host %d rup %d\n",
+ SpecialRupCmd.Host, SpecialRupCmd.RupNum);
if (RIOQueueCmdBlk(&p->RIOHosts[SpecialRupCmd.Host],
SpecialRupCmd.RupNum, CmdBlkP) == RIO_FAIL) {
cprintf("FAILED TO QUEUE SPECIAL RUP COMMAND\n");
@@ -348,7 +348,7 @@ RIO_DEBUG_CTRL, if (su)
return EPERM;
case RIO_ALL_MODEM:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_ALL_MODEM\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_ALL_MODEM\n");
p->RIOError.Error = IOCTL_COMMAND_UNKNOWN;
return EINVAL;
@@ -356,44 +356,44 @@ RIO_DEBUG_CTRL, if (su)
/*
** Read the routing table from the device driver to user space
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_TABLE\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_TABLE\n");
if ((retval = RIOApel(p)) != 0)
return retval;
if (copyout((caddr_t)p->RIOConnectTable, (int)arg,
TOTAL_MAP_ENTRIES*sizeof(struct Map)) == COPYFAIL) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_TABLE copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_TABLE copy failed\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
{
int entry;
- rio_dprint(RIO_DEBUG_CTRL, ("*****\nMAP ENTRIES\n") );
+ rio_dprintk (RIO_DEBUG_CTRL, "*****\nMAP ENTRIES\n");
for ( entry=0; entry<TOTAL_MAP_ENTRIES; entry++ )
{
if ((p->RIOConnectTable[entry].ID == 0) &&
(p->RIOConnectTable[entry].HostUniqueNum == 0) &&
(p->RIOConnectTable[entry].RtaUniqueNum == 0)) continue;
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.HostUniqueNum = 0x%x\n", entry, p->RIOConnectTable[entry].HostUniqueNum ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.RtaUniqueNum = 0x%x\n", entry, p->RIOConnectTable[entry].RtaUniqueNum ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.ID = 0x%x\n", entry, p->RIOConnectTable[entry].ID ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.ID2 = 0x%x\n", entry, p->RIOConnectTable[entry].ID2 ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Flags = 0x%x\n", entry, (int)p->RIOConnectTable[entry].Flags ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.SysPort = 0x%x\n", entry, (int)p->RIOConnectTable[entry].SysPort ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[0].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[0].Unit ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[0].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[0].Link ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[1].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[1].Unit ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[1].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[1].Link ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[2].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[2].Unit ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[2].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[2].Link ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[3].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[3].Unit ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Top[4].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[3].Link ) );
- rio_dprint(RIO_DEBUG_CTRL, ("Map entry %d.Name = %s\n", entry, p->RIOConnectTable[entry].Name ) );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.HostUniqueNum = 0x%x\n", entry, p->RIOConnectTable[entry].HostUniqueNum );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.RtaUniqueNum = 0x%x\n", entry, p->RIOConnectTable[entry].RtaUniqueNum );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.ID = 0x%x\n", entry, p->RIOConnectTable[entry].ID );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.ID2 = 0x%x\n", entry, p->RIOConnectTable[entry].ID2 );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Flags = 0x%x\n", entry, (int)p->RIOConnectTable[entry].Flags );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.SysPort = 0x%x\n", entry, (int)p->RIOConnectTable[entry].SysPort );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[0].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[0].Unit );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[0].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[0].Link );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[1].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[1].Unit );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[1].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[1].Link );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[2].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[2].Unit );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[2].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[2].Link );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[3].Unit = %x\n", entry, p->RIOConnectTable[entry].Topology[3].Unit );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Top[4].Link = %x\n", entry, p->RIOConnectTable[entry].Topology[3].Link );
+ rio_dprintk (RIO_DEBUG_CTRL, "Map entry %d.Name = %s\n", entry, p->RIOConnectTable[entry].Name );
}
- rio_dprint(RIO_DEBUG_CTRL, ("*****\nEND MAP ENTRIES\n") );
+ rio_dprintk (RIO_DEBUG_CTRL, "*****\nEND MAP ENTRIES\n");
}
p->RIOQuickCheck = NOT_CHANGED; /* a table has been gotten */
return 0;
@@ -402,16 +402,16 @@ RIO_DEBUG_CTRL, if (su)
/*
** Write the routing table to the device driver from user space
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PUT_TABLE\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_TABLE\n");
if ( !su ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PUT_TABLE !Root\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_TABLE !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
if ( copyin((int)arg, (caddr_t)&p->RIOConnectTable[0],
TOTAL_MAP_ENTRIES*sizeof(struct Map) ) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PUT_TABLE copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_TABLE copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
@@ -449,17 +449,17 @@ RIO_DEBUG_CTRL, if (su)
** Send bindings table, containing unique numbers of RTAs owned
** by this system to user space
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_BINDINGS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_BINDINGS\n");
if ( !su )
{
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_BINDINGS !Root\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_BINDINGS !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
if (copyout((caddr_t) p->RIOBindTab, (int)arg,
(sizeof(ulong) * MAX_RTA_BINDINGS)) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_BINDINGS copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_BINDINGS copy failed\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -470,17 +470,17 @@ RIO_DEBUG_CTRL, if (su)
** Receive a bindings table, containing unique numbers of RTAs owned
** by this system
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PUT_BINDINGS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_BINDINGS\n");
if ( !su )
{
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PUT_BINDINGS !Root\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_BINDINGS !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
if (copyin((int)arg, (caddr_t)&p->RIOBindTab[0],
(sizeof(ulong) * MAX_RTA_BINDINGS))==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PUT_BINDINGS copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PUT_BINDINGS copy failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
@@ -493,10 +493,10 @@ RIO_DEBUG_CTRL, if (su)
** Bind this RTA to host, so that it will be booted by
** host in 'boot owned RTAs' mode.
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_BIND_RTA\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_BIND_RTA\n");
if ( !su ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_BIND_RTA !Root\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_BIND_RTA !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
@@ -508,8 +508,8 @@ RIO_DEBUG_CTRL, if (su)
** Already exists - delete
*/
p->RIOBindTab[Entry] = 0L;
- rio_dprint(RIO_DEBUG_CTRL, ("Removing Rta %x from p->RIOBindTab\n",
- (int) arg));
+ rio_dprintk (RIO_DEBUG_CTRL, "Removing Rta %x from p->RIOBindTab\n",
+ (int) arg);
return 0;
}
}
@@ -518,90 +518,90 @@ RIO_DEBUG_CTRL, if (su)
*/
if (EmptySlot != -1) {
p->RIOBindTab[EmptySlot] = (int) arg;
- rio_dprint(RIO_DEBUG_CTRL, ("Adding Rta %x to p->RIOBindTab\n",
- (int) arg));
+ rio_dprintk (RIO_DEBUG_CTRL, "Adding Rta %x to p->RIOBindTab\n",
+ (int) arg);
}
else {
- rio_dprint(RIO_DEBUG_CTRL, ("p->RIOBindTab full! - Rta %x not added\n",
- (int) arg));
+ rio_dprintk (RIO_DEBUG_CTRL, "p->RIOBindTab full! - Rta %x not added\n",
+ (int) arg);
return 1;
}
return 0;
}
case RIO_RESUME :
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_RESUME\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME\n");
port = (uint) arg;
if ((port < 0) || (port > 511)) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_RESUME: Bad port number %d\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME: Bad port number %d\n", port);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
PortP = p->RIOPortp[port];
if (!PortP->Mapped) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_RESUME: Port %d not mapped\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME: Port %d not mapped\n", port);
p->RIOError.Error = PORT_NOT_MAPPED_INTO_SYSTEM;
return EINVAL;
}
if (!(PortP->State & (RIO_LOPEN | RIO_MOPEN))) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_RESUME: Port %d not open\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME: Port %d not open\n", port);
return EINVAL;
}
rio_spin_lock_irqsave(&PortP->portSem, flags);
if (RIOPreemptiveCmd(p, (p->RIOPortp[port]), RESUME) ==
RIO_FAIL) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_RESUME failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME failed\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return EBUSY;
}
else {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_RESUME: Port %d resumed\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESUME: Port %d resumed\n", port);
PortP->State |= RIO_BUSY;
}
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return retval;
case RIO_ASSIGN_RTA:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_ASSIGN_RTA\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_ASSIGN_RTA\n");
if ( !su ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_ASSIGN_RTA !Root\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_ASSIGN_RTA !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
if (copyin((int)arg, (caddr_t)&MapEnt, sizeof(MapEnt))
== COPYFAIL) {
- rio_dprint(RIO_DEBUG_CTRL, ("Copy from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Copy from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
return RIOAssignRta(p, &MapEnt);
case RIO_CHANGE_NAME:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_CHANGE_NAME\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_CHANGE_NAME\n");
if ( !su ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_CHANGE_NAME !Root\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_CHANGE_NAME !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
if (copyin((int)arg, (caddr_t)&MapEnt, sizeof(MapEnt))
== COPYFAIL) {
- rio_dprint(RIO_DEBUG_CTRL, ("Copy from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Copy from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
return RIOChangeName(p, &MapEnt);
case RIO_DELETE_RTA:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_DELETE_RTA\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_DELETE_RTA\n");
if ( !su ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_DELETE_RTA !Root\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_DELETE_RTA !Root\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
if (copyin((int)arg, (caddr_t)&MapEnt, sizeof(MapEnt))
== COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("Copy from data space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Copy from data space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
@@ -638,7 +638,7 @@ RIO_DEBUG_CTRL, if (su)
return 0;
case RIO_GET_LOG:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_LOG\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_LOG\n");
#ifdef LOGGING
RIOGetLog(arg);
return 0;
@@ -653,17 +653,17 @@ RIO_DEBUG_CTRL, if (su)
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Get module type for port %d\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "Get module type for port %d\n", port);
if ( port < 0 || port > 511 )
{
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_MODTYPE: Bad port number %d\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_MODTYPE: Bad port number %d\n", port);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
PortP = (p->RIOPortp[port]);
if (!PortP->Mapped)
{
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_MODTYPE: Port %d not mapped\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_MODTYPE: Port %d not mapped\n", port);
p->RIOError.Error = PORT_NOT_MAPPED_INTO_SYSTEM;
return EINVAL;
}
@@ -703,7 +703,7 @@ RIO_DEBUG_CTRL, if (su)
*/
case RIO_BLOCK_OPENS:
- rio_dprint(RIO_DEBUG_CTRL, ("Opens block until booted\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Opens block until booted\n");
for ( Entry=0; Entry < RIO_PORTS; Entry++ ) {
rio_spin_lock_irqsave(&PortP->portSem, flags);
p->RIOPortp[Entry]->WaitUntilBooted = 1;
@@ -712,33 +712,33 @@ RIO_DEBUG_CTRL, if (su)
return 0;
case RIO_SETUP_PORTS:
- rio_dprint(RIO_DEBUG_CTRL, ("Setup ports\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Setup ports\n");
if (copyin((int)arg, (caddr_t)&PortSetup, sizeof(PortSetup))
== COPYFAIL ) {
p->RIOError.Error = COPYIN_FAILED;
- rio_dprint(RIO_DEBUG_CTRL, ("EFAULT"));
+ rio_dprintk (RIO_DEBUG_CTRL, "EFAULT");
return EFAULT;
}
if ( PortSetup.From > PortSetup.To ||
PortSetup.To >= RIO_PORTS ) {
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
- rio_dprint(RIO_DEBUG_CTRL, ("ENXIO"));
+ rio_dprintk (RIO_DEBUG_CTRL, "ENXIO");
return ENXIO;
}
if ( PortSetup.XpCps > p->RIOConf.MaxXpCps ||
PortSetup.XpCps < p->RIOConf.MinXpCps ) {
p->RIOError.Error = XPRINT_CPS_OUT_OF_RANGE;
- rio_dprint(RIO_DEBUG_CTRL, ("EINVAL"));
+ rio_dprintk (RIO_DEBUG_CTRL, "EINVAL");
return EINVAL;
}
if ( !p->RIOPortp ) {
cprintf("No p->RIOPortp array!\n");
- rio_dprint(RIO_DEBUG_CTRL, ("No p->RIOPortp array!\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "No p->RIOPortp array!\n");
return EIO;
}
- rio_dprint(RIO_DEBUG_CTRL, ("entering loop (%d %d)!\n", PortSetup.From, PortSetup.To));
+ rio_dprintk (RIO_DEBUG_CTRL, "entering loop (%d %d)!\n", PortSetup.From, PortSetup.To);
for (loop=PortSetup.From; loop<=PortSetup.To; loop++) {
- rio_dprint(RIO_DEBUG_CTRL, ("in loop (%d)!\n", loop));
+ rio_dprintk (RIO_DEBUG_CTRL, "in loop (%d)!\n", loop);
#if 0
PortP = p->RIOPortp[loop];
if ( !PortP->TtyP )
@@ -791,12 +791,12 @@ RIO_DEBUG_CTRL, if (su)
rio_spin_unlock_irqrestore( &PortP->portSem , flags);
#endif
}
- rio_dprint(RIO_DEBUG_CTRL, ("after loop (%d)!\n", loop));
- rio_dprint(RIO_DEBUG_CTRL, ("Retval:%x\n", retval ) );
+ rio_dprintk (RIO_DEBUG_CTRL, "after loop (%d)!\n", loop);
+ rio_dprintk (RIO_DEBUG_CTRL, "Retval:%x\n", retval);
return retval;
case RIO_GET_PORT_SETUP :
- rio_dprint(RIO_DEBUG_CTRL, ("Get port setup\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Get port setup\n");
if (copyin((int)arg, (caddr_t)&PortSetup, sizeof(PortSetup))
== COPYFAIL ) {
p->RIOError.Error = COPYIN_FAILED;
@@ -832,7 +832,7 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_GET_PORT_PARAMS :
- rio_dprint(RIO_DEBUG_CTRL, ("Get port params\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Get port params\n");
if (copyin( (int)arg, (caddr_t)&PortParams,
sizeof(struct PortParams)) == COPYFAIL) {
p->RIOError.Error = COPYIN_FAILED;
@@ -845,7 +845,7 @@ RIO_DEBUG_CTRL, if (su)
PortP = (p->RIOPortp[PortParams.Port]);
PortParams.Config = PortP->Config;
PortParams.State = PortP->State;
- rio_dprint(RIO_DEBUG_CTRL, ("Port %d\n", PortParams.Port));
+ rio_dprintk (RIO_DEBUG_CTRL, "Port %d\n", PortParams.Port);
if (copyout((caddr_t)&PortParams, (int)arg,
sizeof(struct PortParams)) == COPYFAIL ) {
@@ -855,7 +855,7 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_GET_PORT_TTY :
- rio_dprint(RIO_DEBUG_CTRL, ("Get port tty\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Get port tty\n");
if (copyin((int)arg, (caddr_t)&PortTty, sizeof(struct PortTty))
== COPYFAIL) {
p->RIOError.Error = COPYIN_FAILED;
@@ -866,7 +866,7 @@ RIO_DEBUG_CTRL, if (su)
return ENXIO;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Port %d\n", PortTty.port));
+ rio_dprintk (RIO_DEBUG_CTRL, "Port %d\n", PortTty.port);
PortP = (p->RIOPortp[PortTty.port]);
#if 0
PortTty.Tty.tm.c_iflag = PortP->TtyP->tm.c_iflag;
@@ -887,7 +887,7 @@ RIO_DEBUG_CTRL, if (su)
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Set port %d tty\n", PortTty.port));
+ rio_dprintk (RIO_DEBUG_CTRL, "Set port %d tty\n", PortTty.port);
if (PortTty.port >= (ushort) RIO_PORTS) {
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return ENXIO;
@@ -906,7 +906,7 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_SET_PORT_PARAMS :
- rio_dprint(RIO_DEBUG_CTRL, ("Set port params\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Set port params\n");
if ( copyin((int)arg, (caddr_t)&PortParams, sizeof(PortParams))
== COPYFAIL ) {
p->RIOError.Error = COPYIN_FAILED;
@@ -923,7 +923,7 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_GET_PORT_STATS :
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GET_PORT_STATS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GET_PORT_STATS\n");
if ( copyin((int)arg, (caddr_t)&portStats,
sizeof(struct portStats)) == COPYFAIL ) {
p->RIOError.Error = COPYIN_FAILED;
@@ -949,7 +949,7 @@ RIO_DEBUG_CTRL, if (su)
case RIO_RESET_PORT_STATS :
port = (uint) arg;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_RESET_PORT_STATS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_RESET_PORT_STATS\n");
if ( port >= RIO_PORTS ) {
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return ENXIO;
@@ -965,7 +965,7 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_GATHER_PORT_STATS :
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GATHER_PORT_STATS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GATHER_PORT_STATS\n");
if ( copyin( (int)arg, (caddr_t)&portStats,
sizeof(struct portStats)) == COPYFAIL ) {
p->RIOError.Error = COPYIN_FAILED;
@@ -985,22 +985,22 @@ RIO_DEBUG_CTRL, if (su)
case RIO_READ_LEVELS:
{
int num;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_READ_LEVELS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_READ_LEVELS\n");
for ( num=0; RIODbInf[num].Flag; num++ ) ;
- rio_dprint(RIO_DEBUG_CTRL, ("%d levels to copy\n",num));
+ rio_dprintk (RIO_DEBUG_CTRL, "%d levels to copy\n",num);
if (copyout((caddr_t)RIODbInf,(int)arg,
sizeof(struct DbInf)*(num+1))==COPYFAIL) {
- rio_dprint(RIO_DEBUG_CTRL, ("ReadLevels Copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "ReadLevels Copy failed\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
- rio_dprint(RIO_DEBUG_CTRL, ("%d levels to copied\n",num));
+ rio_dprintk (RIO_DEBUG_CTRL, "%d levels to copied\n",num);
return retval;
}
#endif
case RIO_READ_CONFIG:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_READ_CONFIG\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_READ_CONFIG\n");
if (copyout((caddr_t)&p->RIOConf, (int)arg,
sizeof(struct Conf)) ==COPYFAIL ) {
p->RIOError.Error = COPYOUT_FAILED;
@@ -1009,7 +1009,7 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_SET_CONFIG:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SET_CONFIG\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SET_CONFIG\n");
if ( !su ) {
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
@@ -1029,11 +1029,11 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_START_POLLER:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_START_POLLER\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_START_POLLER\n");
return EINVAL;
case RIO_STOP_POLLER:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_STOP_POLLER\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_STOP_POLLER\n");
if ( !su ) {
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
@@ -1043,7 +1043,7 @@ RIO_DEBUG_CTRL, if (su)
case RIO_SETDEBUG:
case RIO_GETDEBUG:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SETDEBUG/RIO_GETDEBUG\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SETDEBUG/RIO_GETDEBUG\n");
if ( copyin( (int)arg, (caddr_t)&DebugCtrl, sizeof(DebugCtrl) )
==COPYFAIL ) {
p->RIOError.Error = COPYIN_FAILED;
@@ -1057,18 +1057,18 @@ RIO_DEBUG_CTRL, if (su)
}
p->rio_debug = DebugCtrl.Debug;
p->RIODebugWait = DebugCtrl.Wait;
- rio_dprint(RIO_DEBUG_CTRL, ("Set global debug to 0x%x set wait to 0x%x\n",
- p->rio_debug,p->RIODebugWait));
+ rio_dprintk (RIO_DEBUG_CTRL, "Set global debug to 0x%x set wait to 0x%x\n",
+ p->rio_debug,p->RIODebugWait);
}
else {
- rio_dprint(RIO_DEBUG_CTRL, ("Get global debug 0x%x wait 0x%x\n",
- p->rio_debug,p->RIODebugWait));
+ rio_dprintk (RIO_DEBUG_CTRL, "Get global debug 0x%x wait 0x%x\n",
+ p->rio_debug,p->RIODebugWait);
DebugCtrl.Debug = p->rio_debug;
DebugCtrl.Wait = p->RIODebugWait;
if ( copyout((caddr_t)&DebugCtrl,(int)arg,
sizeof(DebugCtrl)) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SET/GET DEBUG: bad port number %d\n",
- DebugCtrl.SysPort));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SET/GET DEBUG: bad port number %d\n",
+ DebugCtrl.SysPort);
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1076,8 +1076,8 @@ RIO_DEBUG_CTRL, if (su)
}
else if ( DebugCtrl.SysPort >= RIO_PORTS &&
DebugCtrl.SysPort != NO_PORT ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SET/GET DEBUG: bad port number %d\n",
- DebugCtrl.SysPort));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SET/GET DEBUG: bad port number %d\n",
+ DebugCtrl.SysPort);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return ENXIO;
}
@@ -1089,16 +1089,16 @@ RIO_DEBUG_CTRL, if (su)
rio_spin_lock_irqsave(&PortP->portSem, flags);
p->RIOPortp[DebugCtrl.SysPort]->Debug = DebugCtrl.Debug;
rio_spin_unlock_irqrestore( &PortP->portSem , flags);
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SETDEBUG 0x%x\n",
- p->RIOPortp[DebugCtrl.SysPort]->Debug));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SETDEBUG 0x%x\n",
+ p->RIOPortp[DebugCtrl.SysPort]->Debug);
}
else {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GETDEBUG 0x%x\n",
- p->RIOPortp[DebugCtrl.SysPort]->Debug));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GETDEBUG 0x%x\n",
+ p->RIOPortp[DebugCtrl.SysPort]->Debug);
DebugCtrl.Debug = p->RIOPortp[DebugCtrl.SysPort]->Debug;
if ( copyout((caddr_t)&DebugCtrl,(int)arg,
sizeof(DebugCtrl))==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_GETDEBUG: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_GETDEBUG: Bad copy to user space\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1111,12 +1111,12 @@ RIO_DEBUG_CTRL, if (su)
** We return MAX_VERSION_LEN bytes, being a
** textual null terminated string.
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_VERSID\n") );
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_VERSID\n");
if ( copyout( (caddr_t)RIOVersid(),
(int)arg,
sizeof(struct rioVersion) ) == COPYFAIL )
{
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_VERSID: Bad copy to user space (host=%d)\n",Host) );
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_VERSID: Bad copy to user space (host=%d)\n", Host);
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1150,10 +1150,10 @@ RIO_DEBUG_CTRL, if (su)
** Enquire as to the number of hosts located
** at init time.
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_NUM_HOSTS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_NUM_HOSTS\n");
if (copyout((caddr_t)&p->RIONumHosts, (int)arg,
sizeof(p->RIONumHosts) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_NUM_HOSTS: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_NUM_HOSTS: Bad copy to user space\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1163,9 +1163,9 @@ RIO_DEBUG_CTRL, if (su)
/*
** Kill host. This may not be in the final version...
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_FOAD %d\n", (int)arg));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_FOAD %d\n", (int)arg);
if ( !su ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_FOAD: Not super user\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_FOAD: Not super user\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
@@ -1213,27 +1213,27 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_DOWNLOAD:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_DOWNLOAD\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_DOWNLOAD\n");
if ( !su ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_DOWNLOAD: Not super user\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_DOWNLOAD: Not super user\n");
p->RIOError.Error = NOT_SUPER_USER;
return EPERM;
}
if ( copyin((int)arg, (caddr_t)&DownLoad,
sizeof(DownLoad) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_DOWNLOAD: Copy in from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_DOWNLOAD: Copy in from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Copied in download code for product code 0x%x\n",
- DownLoad.ProductCode ) );
+ rio_dprintk (RIO_DEBUG_CTRL, "Copied in download code for product code 0x%x\n",
+ DownLoad.ProductCode);
/*
** It is important that the product code is an unsigned object!
*/
if ( DownLoad.ProductCode > MAX_PRODUCT ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_DOWNLOAD: Bad product code %d passed\n",
- DownLoad.ProductCode));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_DOWNLOAD: Bad product code %d passed\n",
+ DownLoad.ProductCode);
p->RIOError.Error = NO_SUCH_PRODUCT;
return ENXIO;
}
@@ -1254,63 +1254,63 @@ RIO_DEBUG_CTRL, if (su)
if (copyin((int)arg, (caddr_t)&host,
sizeof(host) ) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, (
- "RIO_HOST_REQ: Copy in from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL,
+ "RIO_HOST_REQ: Copy in from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
/*
** Fetch the parmmap
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PARMS\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PARMS\n");
if ( copyout( (caddr_t)p->RIOHosts[host].ParmMapP,
(int)arg, sizeof(PARM_MAP) )==COPYFAIL ) {
p->RIOError.Error = COPYOUT_FAILED;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_PARMS: Copy out to user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_PARMS: Copy out to user space failed\n");
return EFAULT;
}
}
return retval;
case RIO_HOST_REQ:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_REQ\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_REQ\n");
if (copyin((int)arg, (caddr_t)&HostReq,
sizeof(HostReq) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_REQ: Copy in from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_REQ: Copy in from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
if ( HostReq.HostNum >= p->RIONumHosts ) {
p->RIOError.Error = HOST_NUMBER_OUT_OF_RANGE;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_REQ: Illegal host number %d\n",
- HostReq.HostNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_REQ: Illegal host number %d\n",
+ HostReq.HostNum);
return ENXIO;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Request for host %d\n", HostReq.HostNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "Request for host %d\n", HostReq.HostNum);
if (copyout((caddr_t)&p->RIOHosts[HostReq.HostNum],
(int)HostReq.HostP,sizeof(struct Host) ) == COPYFAIL) {
p->RIOError.Error = COPYOUT_FAILED;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_REQ: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_REQ: Bad copy to user space\n");
return EFAULT;
}
return retval;
case RIO_HOST_DPRAM:
- rio_dprint(RIO_DEBUG_CTRL, ("Request for DPRAM\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Request for DPRAM\n");
if ( copyin( (int)arg, (caddr_t)&HostDpRam,
sizeof(HostDpRam) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_DPRAM: Copy in from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_DPRAM: Copy in from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
if ( HostDpRam.HostNum >= p->RIONumHosts ) {
p->RIOError.Error = HOST_NUMBER_OUT_OF_RANGE;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_DPRAM: Illegal host number %d\n",
- HostDpRam.HostNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_DPRAM: Illegal host number %d\n",
+ HostDpRam.HostNum);
return ENXIO;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Request for host %d\n", HostDpRam.HostNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "Request for host %d\n", HostDpRam.HostNum);
if (p->RIOHosts[HostDpRam.HostNum].Type == RIO_PCI) {
int off;
@@ -1321,7 +1321,7 @@ RIO_DEBUG_CTRL, if (su)
if ( copyout( (caddr_t)copy, (int)HostDpRam.DpRamP,
sizeof(struct DpRam) ) == COPYFAIL ) {
p->RIOError.Error = COPYOUT_FAILED;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_DPRAM: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_DPRAM: Bad copy to user space\n");
return EFAULT;
}
}
@@ -1329,15 +1329,15 @@ RIO_DEBUG_CTRL, if (su)
(int)HostDpRam.DpRamP,
sizeof(struct DpRam) ) == COPYFAIL ) {
p->RIOError.Error = COPYOUT_FAILED;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_DPRAM: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_DPRAM: Bad copy to user space\n");
return EFAULT;
}
return retval;
case RIO_SET_BUSY:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SET_BUSY\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SET_BUSY\n");
if ( (int)arg < 0 || (int)arg > 511 ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SET_BUSY: Bad port number %d\n",(int)arg));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SET_BUSY: Bad port number %d\n",(int)arg);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
@@ -1351,26 +1351,26 @@ RIO_DEBUG_CTRL, if (su)
** The daemon want port information
** (probably for debug reasons)
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_PORT\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_PORT\n");
if ( copyin((int)arg, (caddr_t)&PortReq,
sizeof(PortReq) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_PORT: Copy in from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_PORT: Copy in from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
if (PortReq.SysPort >= RIO_PORTS) { /* SysPort is unsigned */
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_PORT: Illegal port number %d\n",
- PortReq.SysPort));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_PORT: Illegal port number %d\n",
+ PortReq.SysPort);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return ENXIO;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Request for port %d\n", PortReq.SysPort));
+ rio_dprintk (RIO_DEBUG_CTRL, "Request for port %d\n", PortReq.SysPort);
if (copyout((caddr_t)p->RIOPortp[PortReq.SysPort],
(int)PortReq.PortP,
sizeof(struct Port) ) == COPYFAIL) {
p->RIOError.Error = COPYOUT_FAILED;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_PORT: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_PORT: Bad copy to user space\n");
return EFAULT;
}
return retval;
@@ -1380,40 +1380,40 @@ RIO_DEBUG_CTRL, if (su)
** The daemon want rup information
** (probably for debug reasons)
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_RUP\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_RUP\n");
if (copyin((int)arg, (caddr_t)&RupReq,
sizeof(RupReq) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_RUP: Copy in from user space failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_RUP: Copy in from user space failed\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
if (RupReq.HostNum >= p->RIONumHosts) { /* host is unsigned */
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_RUP: Illegal host number %d\n",
- RupReq.HostNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_RUP: Illegal host number %d\n",
+ RupReq.HostNum);
p->RIOError.Error = HOST_NUMBER_OUT_OF_RANGE;
return ENXIO;
}
if ( RupReq.RupNum >= MAX_RUP+LINKS_PER_UNIT ) { /* eek! */
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_RUP: Illegal rup number %d\n",
- RupReq.RupNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_RUP: Illegal rup number %d\n",
+ RupReq.RupNum);
p->RIOError.Error = RUP_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
HostP = &p->RIOHosts[RupReq.HostNum];
if ((HostP->Flags & RUN_STATE) != RC_RUNNING) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_RUP: Host %d not running\n",
- RupReq.HostNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_RUP: Host %d not running\n",
+ RupReq.HostNum);
p->RIOError.Error = HOST_NOT_RUNNING;
return EIO;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Request for rup %d from host %d\n",
- RupReq.RupNum,RupReq.HostNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "Request for rup %d from host %d\n",
+ RupReq.RupNum,RupReq.HostNum);
if (copyout((caddr_t)HostP->UnixRups[RupReq.RupNum].RupP,
(int)RupReq.RupP,sizeof(struct RUP) ) == COPYFAIL) {
p->RIOError.Error = COPYOUT_FAILED;
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_RUP: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_RUP: Bad copy to user space\n");
return EFAULT;
}
return retval;
@@ -1423,39 +1423,39 @@ RIO_DEBUG_CTRL, if (su)
** The daemon want lpb information
** (probably for debug reasons)
*/
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_LPB\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_LPB\n");
if (copyin((int)arg, (caddr_t)&LpbReq,
sizeof(LpbReq) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_LPB: Bad copy from user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_LPB: Bad copy from user space\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
if (LpbReq.Host >= p->RIONumHosts) { /* host is unsigned */
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_LPB: Illegal host number %d\n",
- LpbReq.Host));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_LPB: Illegal host number %d\n",
+ LpbReq.Host);
p->RIOError.Error = HOST_NUMBER_OUT_OF_RANGE;
return ENXIO;
}
if ( LpbReq.Link >= LINKS_PER_UNIT ) { /* eek! */
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_LPB: Illegal link number %d\n",
- LpbReq.Link));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_LPB: Illegal link number %d\n",
+ LpbReq.Link);
p->RIOError.Error = LINK_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
HostP = &p->RIOHosts[LpbReq.Host];
if ( (HostP->Flags & RUN_STATE) != RC_RUNNING ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_LPB: Host %d not running\n",
- LpbReq.Host));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_LPB: Host %d not running\n",
+ LpbReq.Host );
p->RIOError.Error = HOST_NOT_RUNNING;
return EIO;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Request for lpb %d from host %d\n",
- LpbReq.Link, LpbReq.Host));
+ rio_dprintk (RIO_DEBUG_CTRL, "Request for lpb %d from host %d\n",
+ LpbReq.Link, LpbReq.Host);
if (copyout((caddr_t)&HostP->LinkStrP[LpbReq.Link],
(int)LpbReq.LpbP,sizeof(struct LPB) ) == COPYFAIL) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_HOST_LPB: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_HOST_LPB: Bad copy to user space\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1494,7 +1494,7 @@ RIO_DEBUG_CTRL, if (su)
p->RIOError.Error = NOT_RECEIVING_PROCESS;
return EPERM;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Clear signal process to zero\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Clear signal process to zero\n");
p->RIOSignalProcess = 0;
return retval;
@@ -1526,10 +1526,10 @@ RIO_DEBUG_CTRL, if (su)
case RIO_MAP_B50_TO_57600:
case RIO_MAP_B110_TO_110:
case RIO_MAP_B110_TO_115200:
- rio_dprint(RIO_DEBUG_CTRL, ("Baud rate mapping\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Baud rate mapping\n");
port = (uint) arg;
if ( port < 0 || port > 511 ) {
- rio_dprint(RIO_DEBUG_CTRL, ("Baud rate mapping: Bad port number %d\n", port));
+ rio_dprintk (RIO_DEBUG_CTRL, "Baud rate mapping: Bad port number %d\n", port);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
@@ -1553,14 +1553,14 @@ RIO_DEBUG_CTRL, if (su)
return retval;
case RIO_STREAM_INFO:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_STREAM_INFO\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_STREAM_INFO\n");
return EINVAL;
case RIO_SEND_PACKET:
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SEND_PACKET\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SEND_PACKET\n");
if ( copyin( (int)arg, (caddr_t)&SendPack,
sizeof(SendPack) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_SEND_PACKET: Bad copy from user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_SEND_PACKET: Bad copy from user space\n");
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
@@ -1605,7 +1605,7 @@ RIO_DEBUG_CTRL, if (su)
case RIO_WHAT_MESG:
if ( copyout( (caddr_t)&p->RIONoMessage, (int)arg,
sizeof(p->RIONoMessage) )==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_WHAT_MESG: Bad copy to user space\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_WHAT_MESG: Bad copy to user space\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1617,8 +1617,8 @@ RIO_DEBUG_CTRL, if (su)
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_MEM_DUMP host %d rup %d addr %x\n",
- SubCmd.Host, SubCmd.Rup, SubCmd.Addr));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_MEM_DUMP host %d rup %d addr %x\n",
+ SubCmd.Host, SubCmd.Rup, SubCmd.Addr);
if (SubCmd.Rup >= MAX_RUP+LINKS_PER_UNIT ) {
p->RIOError.Error = RUP_NUMBER_OUT_OF_RANGE;
@@ -1638,7 +1638,7 @@ RIO_DEBUG_CTRL, if (su)
rio_spin_lock_irqsave(&PortP->portSem, flags);
if ( RIOPreemptiveCmd(p, PortP, MEMDUMP ) == RIO_FAIL ) {
- rio_dprint(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);
return EBUSY;
}
@@ -1648,7 +1648,7 @@ RIO_DEBUG_CTRL, if (su)
rio_spin_unlock_irqrestore( &PortP->portSem , flags);
if ( copyout( (caddr_t)p->RIOMemDump, (int)arg,
MEMDUMP_SIZE) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_MEM_DUMP copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_MEM_DUMP copy failed\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1657,14 +1657,14 @@ RIO_DEBUG_CTRL, if (su)
case RIO_TICK:
if ((int)arg < 0 || (int)arg >= p->RIONumHosts)
return EINVAL;
- rio_dprint(RIO_DEBUG_CTRL, ("Set interrupt for host %d\n", (int)arg ));
+ rio_dprintk (RIO_DEBUG_CTRL, "Set interrupt for host %d\n", (int)arg);
WBYTE(p->RIOHosts[(int)arg].SetInt , 0xff);
return 0;
case RIO_TOCK:
if ((int)arg < 0 || (int)arg >= p->RIONumHosts)
return EINVAL;
- rio_dprint(RIO_DEBUG_CTRL, ("Clear interrupt for host %d\n", (int)arg ));
+ rio_dprintk (RIO_DEBUG_CTRL, "Clear interrupt for host %d\n", (int)arg);
WBYTE((p->RIOHosts[(int)arg].ResetInt) , 0xff);
return 0;
@@ -1684,12 +1684,12 @@ RIO_DEBUG_CTRL, if (su)
p->RIOError.Error = COPYIN_FAILED;
return EFAULT;
}
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_READ_REGISTER host %d rup %d port %d reg %x\n",
- SubCmd.Host, SubCmd.Rup, SubCmd.Port, SubCmd.Addr));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_READ_REGISTER host %d rup %d port %d reg %x\n",
+ SubCmd.Host, SubCmd.Rup, SubCmd.Port, SubCmd.Addr);
if (SubCmd.Port > 511) {
- rio_dprint(RIO_DEBUG_CTRL, ("Baud rate mapping: Bad port number %d\n",
- SubCmd.Port));
+ rio_dprintk (RIO_DEBUG_CTRL, "Baud rate mapping: Bad port number %d\n",
+ SubCmd.Port);
p->RIOError.Error = PORT_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
@@ -1711,7 +1711,7 @@ RIO_DEBUG_CTRL, if (su)
rio_spin_lock_irqsave(&PortP->portSem, flags);
if (RIOPreemptiveCmd(p, PortP, READ_REGISTER) == RIO_FAIL) {
- rio_dprint(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);
return EBUSY;
}
@@ -1721,7 +1721,7 @@ RIO_DEBUG_CTRL, if (su)
rio_spin_unlock_irqrestore( &PortP->portSem , flags);
if (copyout((caddr_t)&p->CdRegister, (int)arg,
sizeof(uint)) == COPYFAIL ) {
- rio_dprint(RIO_DEBUG_CTRL, ("RIO_READ_REGISTER copy failed\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "RIO_READ_REGISTER copy failed\n");
p->RIOError.Error = COPYOUT_FAILED;
return EFAULT;
}
@@ -1738,18 +1738,18 @@ RIO_DEBUG_CTRL, if (su)
switch ( (uint)arg & RIO_DEV_MASK ) {
case RIO_DEV_DIRECT:
arg = (caddr_t)drv_makedev(major(dev), port);
- rio_dprint(RIO_DEBUG_CTRL, ("Makedev direct 0x%x is 0x%x\n",port, (int)arg ));
+ rio_dprintk (RIO_DEBUG_CTRL, "Makedev direct 0x%x is 0x%x\n",port, (int)arg);
return (int)arg;
case RIO_DEV_MODEM:
arg = (caddr_t)drv_makedev(major(dev), (port|RIO_MODEM_BIT) );
- rio_dprint(RIO_DEBUG_CTRL, ("Makedev modem 0x%x is 0x%x\n",port, (int)arg ));
+ rio_dprintk (RIO_DEBUG_CTRL, "Makedev modem 0x%x is 0x%x\n",port, (int)arg);
return (int)arg;
case RIO_DEV_XPRINT:
arg = (caddr_t)drv_makedev(major(dev), port);
- rio_dprint(RIO_DEBUG_CTRL, ("Makedev printer 0x%x is 0x%x\n",port, (int)arg ));
+ rio_dprintk (RIO_DEBUG_CTRL, "Makedev printer 0x%x is 0x%x\n",port, (int)arg);
return (int)arg;
}
- rio_dprint(RIO_DEBUG_CTRL, ("MAKE Device is called\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "MAKE Device is called\n");
return EINVAL;
}
/*
@@ -1766,17 +1766,17 @@ RIO_DEBUG_CTRL, if (su)
mino = RIO_UNMODEM(dv);
if ( RIO_ISMODEM(dv) ) {
- rio_dprint(RIO_DEBUG_CTRL, ("Minor for device 0x%x: modem %d\n", dv, mino));
+ rio_dprintk (RIO_DEBUG_CTRL, "Minor for device 0x%x: modem %d\n", dv, mino);
arg = (caddr_t)(mino | RIO_DEV_MODEM);
}
else {
- rio_dprint(RIO_DEBUG_CTRL, ("Minor for device 0x%x: direct %d\n", dv, mino));
+ rio_dprintk (RIO_DEBUG_CTRL, "Minor for device 0x%x: direct %d\n", dv, mino);
arg = (caddr_t)(mino | RIO_DEV_DIRECT);
}
return (int)arg;
}
}
- rio_dprint(RIO_DEBUG_CTRL, ("INVALID DAEMON IOCTL 0x%x\n",cmd));
+ rio_dprintk (RIO_DEBUG_CTRL, "INVALID DAEMON IOCTL 0x%x\n",cmd);
p->RIOError.Error = IOCTL_COMMAND_UNKNOWN;
func_exit ();
@@ -1803,18 +1803,18 @@ uchar Cmd;
#endif
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_CTRL, ("Preemptive command to deleted RTA ignored\n"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Preemptive command to deleted RTA ignored\n");
return RIO_FAIL;
}
if (((int)((char)PortP->InUse) == -1) || ! (CmdBlkP = RIOGetCmdBlk()) ) {
- rio_dprint(RIO_DEBUG_CTRL, ("Cannot allocate command block for command %d on port %d\n",
- Cmd, PortP->PortNum));
+ rio_dprintk (RIO_DEBUG_CTRL, "Cannot allocate command block for command %d on port %d\n",
+ Cmd, PortP->PortNum);
return RIO_FAIL;
}
- rio_dprint(RIO_DEBUG_CTRL, ("Command blk 0x%x - InUse now %d\n",
- (int)CmdBlkP,PortP->InUse));
+ rio_dprintk (RIO_DEBUG_CTRL, "Command blk 0x%x - InUse now %d\n",
+ (int)CmdBlkP,PortP->InUse);
PktCmdP = (struct PktCmd_M *)&CmdBlkP->Packet.data[0];
@@ -1840,40 +1840,40 @@ uchar Cmd;
switch ( Cmd ) {
case MEMDUMP:
- rio_dprint(RIO_DEBUG_CTRL, ("Queue MEMDUMP command blk 0x%x (addr 0x%x)\n",
- (int)CmdBlkP, (int)SubCmd.Addr));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue MEMDUMP command blk 0x%x (addr 0x%x)\n",
+ (int)CmdBlkP, (int)SubCmd.Addr);
PktCmdP->SubCommand = MEMDUMP;
PktCmdP->SubAddr = SubCmd.Addr;
break;
case FCLOSE:
- rio_dprint(RIO_DEBUG_CTRL, ("Queue FCLOSE command blk 0x%x\n",(int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue FCLOSE command blk 0x%x\n",(int)CmdBlkP);
break;
case READ_REGISTER:
- rio_dprint(RIO_DEBUG_CTRL, ("Queue READ_REGISTER (0x%x) command blk 0x%x\n",
- (int)SubCmd.Addr, (int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue READ_REGISTER (0x%x) command blk 0x%x\n",
+ (int)SubCmd.Addr, (int)CmdBlkP);
PktCmdP->SubCommand = READ_REGISTER;
PktCmdP->SubAddr = SubCmd.Addr;
break;
case RESUME:
- rio_dprint(RIO_DEBUG_CTRL, ("Queue RESUME command blk 0x%x\n",(int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue RESUME command blk 0x%x\n",(int)CmdBlkP);
break;
case RFLUSH:
- rio_dprint(RIO_DEBUG_CTRL, ("Queue RFLUSH command blk 0x%x\n",(int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue RFLUSH command blk 0x%x\n",(int)CmdBlkP);
CmdBlkP->PostFuncP = RIORFlushEnable;
break;
case SUSPEND:
- rio_dprint(RIO_DEBUG_CTRL, ("Queue SUSPEND command blk 0x%x\n",(int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue SUSPEND command blk 0x%x\n",(int)CmdBlkP);
break;
case MGET :
- rio_dprint(RIO_DEBUG_CTRL, ("Queue MGET command blk 0x%x\n", (int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue MGET command blk 0x%x\n", (int)CmdBlkP);
break;
case MSET :
case MBIC :
case MBIS :
CmdBlkP->Packet.data[4] = (char) PortP->ModemLines;
- rio_dprint(RIO_DEBUG_CTRL, ("Queue MSET/MBIC/MBIS command blk 0x%x\n", (int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue MSET/MBIC/MBIS command blk 0x%x\n", (int)CmdBlkP);
break;
case WFLUSH:
@@ -1883,12 +1883,12 @@ uchar Cmd;
** RTA.
*/
if ((int)((char)PortP->WflushFlag) == (int)-1) {
- rio_dprint(RIO_DEBUG_CTRL, ("Trashed WFLUSH, WflushFlag about to wrap!"));
+ rio_dprintk (RIO_DEBUG_CTRL, "Trashed WFLUSH, WflushFlag about to wrap!");
RIOFreeCmdBlk(CmdBlkP);
return(RIO_FAIL);
} else {
- rio_dprint(RIO_DEBUG_CTRL, ("Queue WFLUSH command blk 0x%x\n",
- (int)CmdBlkP));
+ rio_dprintk (RIO_DEBUG_CTRL, "Queue WFLUSH command blk 0x%x\n",
+ (int)CmdBlkP);
CmdBlkP->PostFuncP = RIOWFlushMark;
}
break;
diff --git a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c
index 59cfdedd5..cbefdac2d 100644
--- a/drivers/char/rio/rioinit.c
+++ b/drivers/char/rio/rioinit.c
@@ -81,7 +81,7 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3";
#include "control.h"
#include "cirrus.h"
#include "rioioctl.h"
-
+#include "rio_linux.h"
#undef bcopy
#define bcopy rio_pcicopy
@@ -109,7 +109,7 @@ struct RioHostInfo * info;
*/
if ( !p->RIOPortp )
{
- rio_dprint(RIO_DEBUG_INIT, ("Allocating and setting up driver data structures\n") );
+ rio_dprintk (RIO_DEBUG_INIT, "Allocating and setting up driver data structures\n");
RIOAllocDataStructs(p); /* allocate host/port structs */
RIOSetupDataStructs(p); /* setup topology structs */
@@ -155,16 +155,16 @@ struct RioHostInfo * info;
if ( info->bus & ISA_BUS )
{
- rio_dprint(RIO_DEBUG_INIT, ("initialising card %d (ISA)\n", p->RIONumHosts) );
+ rio_dprintk (RIO_DEBUG_INIT, "initialising card %d (ISA)\n", p->RIONumHosts);
RIOISAinit(p, p->mode);
}
else
{
- rio_dprint(RIO_DEBUG_INIT, ("initialising card %d (PCI)\n", p->RIONumHosts) );
+ rio_dprintk (RIO_DEBUG_INIT, "initialising card %d (PCI)\n", p->RIONumHosts);
RIOPCIinit(p, RIO_PCI_DEFAULT_MODE);
}
- rio_dprint(RIO_DEBUG_INIT, ("Total hosts initialised so far : %d\n", p->RIONumHosts) );
+ rio_dprintk (RIO_DEBUG_INIT, "Total hosts initialised so far : %d\n", p->RIONumHosts);
#ifdef FUTURE_RELEASE
@@ -193,13 +193,13 @@ int mode;
p->intr_tid = iointset(p->RIOHosts[p->RIONumHosts].Ivec,
(int (*)())rio_intr, (char*)p->RIONumHosts);
- rio_dprint(RIO_DEBUG_INIT, ("Set interrupt handler, intr_tid = 0x%x\n", p->intr_tid ) );
+ rio_dprintk (RIO_DEBUG_INIT, "Set interrupt handler, intr_tid = 0x%x\n", p->intr_tid );
if (RIODoAT(p, p->RIOHosts[p->RIONumHosts].PaddrP, mode)) {
return;
}
else {
- rio_dprint(RIO_DEBUG_INIT, ("RIODoAT failed\n"));
+ rio_dprintk (RIO_DEBUG_INIT, "RIODoAT failed\n");
p->RIOFailed++;
}
#endif
@@ -268,7 +268,7 @@ int Base;
** map it in in one 64K block.
*/
if (RIOMapin(Base, RIO_AT_MEM_SIZE, &virtAddr) == -1) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Couldn't map the board in!\n"));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Couldn't map the board in!\n");
return((caddr_t)0);
}
@@ -285,8 +285,8 @@ int Base;
** Signature mismatch - card not at this address
*/
RIOMapout(Base, RIO_AT_MEM_SIZE, virtAddr);
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Couldn't match the signature 0x%x 0x%x!\n",
- (int)cardp, off));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Couldn't match the signature 0x%x 0x%x!\n",
+ (int)cardp, off);
return((caddr_t)0);
}
}
@@ -356,10 +356,10 @@ int mode;
((RBYTE(p->RIOHosts[p->RIONumHosts].Unique[1])&0xFF)<<8)|
((RBYTE(p->RIOHosts[p->RIONumHosts].Unique[2])&0xFF)<<16)|
((RBYTE(p->RIOHosts[p->RIONumHosts].Unique[3])&0xFF)<<24);
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Uniquenum 0x%x\n",p->RIOHosts[p->RIONumHosts].UniqueNum));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Uniquenum 0x%x\n",p->RIOHosts[p->RIONumHosts].UniqueNum);
p->RIONumHosts++;
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Tests Passed at 0x%x\n", Base));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Tests Passed at 0x%x\n", Base);
return(1);
}
#if 0
@@ -378,7 +378,7 @@ int RIOMCAinit(int Mode)
** is only FAST LINKS
*/
Mode = (Mode & FAST_LINKS) ? McaTpFastLinks : McaTpSlowLinks;
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"RIOMCAinit(%d)\n",Mode);
+ rio_dprintk (RIO_DEBUG_INIT, "RIOMCAinit(%d)\n",Mode);
/*
@@ -395,7 +395,7 @@ int RIOMCAinit(int Mode)
*/
if (((inb(McaIdHigh)<< 8)|inb(McaIdLow)) == McaRIOId)
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Potential MCA card in slot %d\n",SlotNumber);
+ rio_dprintk (RIO_DEBUG_INIT, "Potential MCA card in slot %d\n", SlotNumber);
/*
** Card appears to be a RIO MCA card!
@@ -417,48 +417,44 @@ int RIOMCAinit(int Mode)
*/
Ivec = inb(McaIrqEnable);
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Ivec is %x\n",Ivec);
+ rio_dprintk (RIO_DEBUG_INIT, "Ivec is %x\n", Ivec);
switch ( Ivec & McaIrqMask )
{
case McaIrq9:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ9\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ9\n");
break;
case McaIrq3:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ3\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ3\n");
break;
case McaIrq4:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ4\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ4\n");
break;
case McaIrq7:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ7\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ7\n");
break;
case McaIrq10:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ10\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ10\n");
break;
case McaIrq11:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ11\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ11\n");
break;
case McaIrq12:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ12\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ12\n");
break;
case McaIrq15:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"IRQ15\n");
+ rio_dprintk (RIO_DEBUG_INIT, "IRQ15\n");
break;
}
/*
** If the card enable bit isn't set, then set it!
*/
- if ((Ivec & McaCardEnable) != McaCardEnable )
- {
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"McaCardEnable not set - setting!\n");
- outb(McaIrqEnable,Ivec|McaCardEnable);
- }
- else
- {
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"McaCardEnable already set\n");
- }
+ if ((Ivec & McaCardEnable) != McaCardEnable) {
+ rio_dprintk (RIO_DEBUG_INIT, "McaCardEnable not set - setting!\n");
+ outb(McaIrqEnable,Ivec|McaCardEnable);
+ } else
+ rio_dprintk (RIO_DEBUG_INIT, "McaCardEnable already set\n");
/*
** Convert the IRQ enable mask into something useful
@@ -468,10 +464,10 @@ int RIOMCAinit(int Mode)
/*
** Find the physical address
*/
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"inb(McaMemory) is %x\n",inb(McaMemory));
+ rio_dprintk (RIO_DEBUG_INIT, "inb(McaMemory) is %x\n", inb(McaMemory));
Paddr = McaAddress(inb(McaMemory));
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"MCA card has Ivec %d Addr %x\n",Ivec,Paddr);
+ rio_dprintk (RIO_DEBUG_INIT, "MCA card has Ivec %d Addr %x\n", Ivec, Paddr);
if ( Paddr != 0 )
{
@@ -482,21 +478,20 @@ int RIOMCAinit(int Mode)
Handle = RIOMapin( Paddr, RIO_MCA_MEM_SIZE, &Caddr );
if ( Handle == -1 ) {
- rio_dprint(RIO_DEBUG_INIT, ("Couldn't map %d bytes at %x\n", RIO_MCA_MEM_SIZE,Paddr);
+ rio_dprintk (RIO_DEBUG_INIT, "Couldn't map %d bytes at %x\n", RIO_MCA_MEM_SIZE, Paddr;
continue;
}
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Board mapped to vaddr 0x%x\n",Caddr);
+ rio_dprintk (RIO_DEBUG_INIT, "Board mapped to vaddr 0x%x\n", Caddr);
/*
** And check that it is actually there!
*/
if ( RIOBoardTest( Paddr,Caddr,RIO_MCA,SlotNumber ) == RIO_SUCCESS )
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Board has passed test\n");
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,
- "Slot %d. Type %d. Paddr 0x%x. Caddr 0x%x. Mode 0x%x.\n",
- SlotNumber,RIO_MCA,Paddr,Caddr,Mode);
+ rio_dprintk (RIO_DEBUG_INIT, "Board has passed test\n");
+ rio_dprintk (RIO_DEBUG_INIT, "Slot %d. Type %d. Paddr 0x%x. Caddr 0x%x. Mode 0x%x.\n",
+ SlotNumber, RIO_MCA, Paddr, Caddr, Mode);
/*
** Board has passed its scrub test. Fill in all the
@@ -524,25 +519,25 @@ int RIOMCAinit(int Mode)
/*
** It failed the test, so ignore it.
*/
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_FAIL,"TEST FAILED\n");
+ rio_dprintk (RIO_DEBUG_INIT, "TEST FAILED\n");
RIOMapout(Paddr, RIO_MCA_MEM_SIZE, Caddr );
}
}
else
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Slot %d - Paddr zero!\n",SlotNumber);
+ rio_dprintk (RIO_DEBUG_INIT, "Slot %d - Paddr zero!\n", SlotNumber);
}
}
else
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Slot %d NOT RIO\n",SlotNumber);
+ rio_dprintk (RIO_DEBUG_INIT, "Slot %d NOT RIO\n", SlotNumber);
}
}
/*
** Now we have checked all the slots, turn off the MCA slot selector
*/
outb(McaSlotSelect,0);
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Slot %d NOT RIO\n",SlotNumber);
+ rio_dprintk (RIO_DEBUG_INIT, "Slot %d NOT RIO\n", SlotNumber);
return ret;
}
@@ -565,13 +560,13 @@ int RIOEISAinit( int Mode )
if ( EISADone )
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"RIOEISAinit() - already done, return.\n");
+ rio_dprintk (RIO_DEBUG_INIT, "RIOEISAinit() - already done, return.\n");
return(0);
}
EISADone++;
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"RIOEISAinit()\n");
+ rio_dprintk (RIO_DEBUG_INIT, "RIOEISAinit()\n");
/*
@@ -584,23 +579,21 @@ int RIOEISAinit( int Mode )
Ident = (INBZ(EisaSlot,EISA_PRODUCT_IDENT_HI)<<8) |
INBZ(EisaSlot,EISA_PRODUCT_IDENT_LO);
- /* rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT, "Check EISA slot %d, ID=%x\n",EisaSlot,Ident); */
-
if ( Ident == RIO_EISA_IDENT )
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Found Specialix product\n");
+ rio_dprintk (RIO_DEBUG_INIT, "Found Specialix product\n");
if ( INBZ(EisaSlot,EISA_PRODUCT_NUMBER) != RIO_EISA_PRODUCT_CODE )
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Not Specialix RIO - Product number %x\n",
- INBZ(EisaSlot,EISA_PRODUCT_NUMBER));
+ rio_dprintk (RIO_DEBUG_INIT, "Not Specialix RIO - Product number %x\n",
+ INBZ(EisaSlot, EISA_PRODUCT_NUMBER));
continue; /* next slot */
}
/*
** Its a Specialix RIO!
*/
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"RIO Revision %d\n",
- INBZ(EisaSlot,EISA_REVISION_NUMBER));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO Revision %d\n",
+ INBZ(EisaSlot, EISA_REVISION_NUMBER));
RIOMachineType |= (1<<RIO_EISA);
@@ -627,43 +620,43 @@ int RIOEISAinit( int Mode )
switch ( Ivec & EISA_INTERRUPT_MASK )
{
case EISA_IRQ_3:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 3\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 3\n");
break;
case EISA_IRQ_4:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 4\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 4\n");
break;
case EISA_IRQ_5:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 5\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 5\n");
break;
case EISA_IRQ_6:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 6\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 6\n");
break;
case EISA_IRQ_7:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 7\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 7\n");
break;
case EISA_IRQ_9:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 9\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 9\n");
break;
case EISA_IRQ_10:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 10\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 10\n");
break;
case EISA_IRQ_11:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 11\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 11\n");
break;
case EISA_IRQ_12:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 12\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 12\n");
break;
case EISA_IRQ_14:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 14\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 14\n");
break;
case EISA_IRQ_15:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA IRQ 15\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA IRQ 15\n");
break;
case EISA_POLLED:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"EISA POLLED\n");
+ rio_dprintk (RIO_DEBUG_INIT, "EISA POLLED\n");
break;
default:
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT|DBG_FAIL,"Shagged interrupt number!\n");
+ rio_dprintk (RIO_DEBUG_INIT, NULL,DBG_INIT|DBG_FAIL,"Shagged interrupt number!\n");
Ivec &= EISA_CONTROL_MASK;
}
#endif
@@ -741,7 +734,7 @@ int RIOEISAinit( int Mode )
*/
Ivec = RIOEisaToIvec(Ivec);
- rio_dprint(RIO_DEBUG_INIT, NULL, DBG_INIT, "EISA host in slot %d has Ivec 0x%x\n",
+ rio_dprintk (RIO_DEBUG_INIT, "EISA host in slot %d has Ivec 0x%x\n",
EisaSlot, Ivec);
/*
@@ -750,11 +743,11 @@ int RIOEISAinit( int Mode )
Paddr = (INBZ(EisaSlot,EISA_MEMORY_BASE_HI)<<24) |
(INBZ(EisaSlot,EISA_MEMORY_BASE_LO)<<16);
- rio_dprint(RIO_DEBUG_INIT, NULL, DBG_INIT,"EISA card has Ivec %d Addr %x\n",Ivec,Paddr);
+ rio_dprintk (RIO_DEBUG_INIT, "EISA card has Ivec %d Addr %x\n", Ivec, Paddr);
if ( Paddr == 0 )
{
- rio_dprint(RIO_DEBUG_INIT, NULL, DBG_INIT | DBG_FAIL,
+ rio_dprintk (RIO_DEBUG_INIT,
"Board in slot %d configured for address zero!\n", EisaSlot);
continue;
}
@@ -762,23 +755,23 @@ int RIOEISAinit( int Mode )
/*
** Tell the memory mapper that we want to talk to it
*/
- rio_dprint(RIO_DEBUG_INIT, NULL, DBG_INIT,"About to map EISA card \n");
+ rio_dprintk (RIO_DEBUG_INIT, "About to map EISA card \n");
if (RIOMapin( Paddr, RIO_EISA_MEM_SIZE, &Caddr) == -1) {
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_FAIL,"Couldn't map %d bytes at %x\n",
+ rio_dprintk (RIO_DEBUG_INIT, "Couldn't map %d bytes at %x\n",
RIO_EISA_MEM_SIZE,Paddr);
continue;
}
- rio_dprint(RIO_DEBUG_INIT, NULL, DBG_INIT,"Board mapped to vaddr 0x%x\n",Caddr);
+ rio_dprintk (RIO_DEBUG_INIT, "Board mapped to vaddr 0x%x\n", Caddr);
/*
** And check that it is actually there!
*/
if ( RIOBoardTest( Paddr,Caddr,RIO_EISA,EisaSlot) == RIO_SUCCESS )
{
- rio_dprint(RIO_DEBUG_INIT, NULL, DBG_INIT,"Board has passed test\n");
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,
+ rio_dprintk (RIO_DEBUG_INIT, "Board has passed test\n");
+ rio_dprintk (RIO_DEBUG_INIT,
"Slot %d. Ivec %d. Type %d. Paddr 0x%x. Caddr 0x%x. Mode 0x%x.\n",
EisaSlot,Ivec,RIO_EISA,Paddr,Caddr,Mode);
@@ -818,7 +811,7 @@ int RIOEISAinit( int Mode )
/*
** It failed the test, so ignore it.
*/
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_FAIL,"TEST FAILED\n");
+ rio_dprintk (RIO_DEBUG_INIT, "TEST FAILED\n");
RIOMapout(Paddr, RIO_EISA_MEM_SIZE, Caddr );
}
@@ -917,7 +910,7 @@ int Mode;
int Handle; /* Handle to Virtual memory allocated for current PCI host */
- rio_dprint(RIO_DEBUG_INIT, ("Search for a RIO PCI card - start at slot %d\n", slot ) );
+ rio_dprintk (RIO_DEBUG_INIT, "Search for a RIO PCI card - start at slot %d\n", slot);
/*
** Initialise the search status
@@ -926,7 +919,7 @@ int Mode;
while ( (slot < MAX_PCI_SLOT) & (p->RIOLastPCISearch != RIO_SUCCESS) )
{
- rio_dprint(RIO_DEBUG_INIT, ("Currently testing slot %d\n", slot ) );
+ rio_dprintk (RIO_DEBUG_INIT, "Currently testing slot %d\n", slot);
if (read_config(0,slot,0) == RIO_PCI_JET_CARD) {
p->RIOHosts[p->RIONumHosts].Ivec = 0;
@@ -934,7 +927,7 @@ int Mode;
Paddr = Paddr - (Paddr & 0x1); /* Mask off the io bit */
if ( (Paddr == 0) || ((Paddr & 0xffff0000) == 0xffff0000) ) {
- rio_dprint(RIO_DEBUG_INIT, ("Goofed up slot\n") ); /* what! */
+ rio_dprintk (RIO_DEBUG_INIT, "Goofed up slot\n"); /* what! */
slot++;
continue;
}
@@ -942,11 +935,11 @@ int Mode;
p->RIOHosts[p->RIONumHosts].PaddrP = Paddr;
Ivec = (read_config(0,slot,0x3c) & 0xff);
- rio_dprint(RIO_DEBUG_INIT, ("PCI Host at 0x%x, Intr %d\n", (int)Paddr, Ivec ) );
+ rio_dprintk (RIO_DEBUG_INIT, "PCI Host at 0x%x, Intr %d\n", (int)Paddr, Ivec);
Handle = RIOMapin( Paddr, RIO_PCI_MEM_SIZE, &Caddr );
if (Handle == -1) {
- rio_dprint(RIO_DEBUG_INIT, ("Couldn't map %d bytes at 0x%x\n", RIO_PCI_MEM_SIZE, (int)Paddr ) );
+ rio_dprintk (RIO_DEBUG_INIT, "Couldn't map %d bytes at 0x%x\n", RIO_PCI_MEM_SIZE, (int)Paddr);
slot++;
continue;
}
@@ -954,9 +947,8 @@ int Mode;
p->intr_tid = iointset(p->RIOHosts[p->RIONumHosts].Ivec,
(int (*)())rio_intr, (char *)p->RIONumHosts);
if (RIOBoardTest( Paddr, Caddr, RIO_PCI, 0 ) == RIO_SUCCESS) {
- rio_dprint(RIO_DEBUG_INIT, ("Board has passed test\n"));
- rio_dprint(RIO_DEBUG_INIT, ("Paddr 0x%x. Caddr 0x%x. Mode 0x%x.\n", Paddr, Caddr,
- Mode));
+ rio_dprintk (RIO_DEBUG_INIT, ("Board has passed test\n");
+ rio_dprintk (RIO_DEBUG_INIT, ("Paddr 0x%x. Caddr 0x%x. Mode 0x%x.\n", Paddr, Caddr, Mode);
/*
** Board has passed its scrub test. Fill in all the
@@ -991,8 +983,8 @@ int Mode;
((RBYTE(p->RIOHosts[p->RIONumHosts].Unique[2])&0xFF)<<16)|
((RBYTE(p->RIOHosts[p->RIONumHosts].Unique[3])&0xFF)<<24);
- rio_dprint(RIO_DEBUG_INIT, ("Unique no 0x%x.\n",
- p->RIOHosts[p->RIONumHosts].UniqueNum ) );
+ rio_dprintk (RIO_DEBUG_INIT, "Unique no 0x%x.\n",
+ p->RIOHosts[p->RIONumHosts].UniqueNum);
p->RIOLastPCISearch = RIO_SUCCESS;
p->RIONumHosts++;
@@ -1002,8 +994,8 @@ int Mode;
}
if ( slot >= MAX_PCI_SLOT ) {
- rio_dprint(RIO_DEBUG_INIT, ("All %d PCI slots have tested for RIO cards !!!\n",
- MAX_PCI_SLOT ) );
+ rio_dprintk (RIO_DEBUG_INIT, "All %d PCI slots have tested for RIO cards !!!\n",
+ MAX_PCI_SLOT);
}
@@ -1025,7 +1017,7 @@ void riohalt( void )
int host;
for ( host=0; host<p->RIONumHosts; host++ )
{
- rio_dprint(RIO_DEBUG_INIT, NULL,DBG_INIT,"Stop host %d\n",host);
+ rio_dprintk (RIO_DEBUG_INIT, "Stop host %d\n", host);
(void)RIOBoardTest( p->RIOHosts[host].PaddrP, p->RIOHosts[host].Caddr, p->RIOHosts[host].Type,p->RIOHosts[host].Slot );
}
}
@@ -1058,8 +1050,8 @@ int slot;
int op, bank;
int nbanks;
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Reset host type=%d, DpRam=0x%x, slot=%d\n",
- type,(int)DpRam,slot));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Reset host type=%d, DpRam=0x%x, slot=%d\n",
+ type,(int)DpRam, slot);
RIOHostReset(type, DpRam, slot);
@@ -1071,7 +1063,7 @@ int slot;
** scratch - 1000h bytes
*/
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Setup ram/size arrays\n"));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Setup ram/size arrays\n");
size[0] = DP_SRAM1_SIZE;
size[1] = DP_SRAM2_SIZE;
@@ -1087,12 +1079,12 @@ int slot;
if (nbanks == 3) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Memory: 0x%x(0x%x), 0x%x(0x%x), 0x%x(0x%x)\n",
- (int)ram[0], size[0], (int)ram[1], size[1], (int)ram[2], size[2]));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Memory: 0x%x(0x%x), 0x%x(0x%x), 0x%x(0x%x)\n",
+ (int)ram[0], size[0], (int)ram[1], size[1], (int)ram[2], size[2]);
} else {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: 0x%x(0x%x), 0x%x(0x%x), 0x%x(0x%x), 0x%x(0x%x)\n",
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: 0x%x(0x%x), 0x%x(0x%x), 0x%x(0x%x), 0x%x(0x%x)\n",
(int)ram[0], size[0], (int)ram[1], size[1], (int)ram[2], size[2], (int)ram[3],
- size[3]));
+ size[3]);
}
/*
@@ -1103,14 +1095,14 @@ int slot;
for (op=0; op<TEST_END; op++) {
for (bank=0; bank<nbanks; bank++) {
if (RIOScrub(op, (BYTE *)ram[bank], size[bank]) == RIO_FAIL) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: RIOScrub band %d, op %d failed\n",
- bank, op));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: RIOScrub band %d, op %d failed\n",
+ bank, op);
return RIO_FAIL;
}
}
}
- rio_dprint(RIO_DEBUG_INIT, ("Test completed\n"));
+ rio_dprintk (RIO_DEBUG_INIT, "Test completed\n");
return RIO_SUCCESS;
}
@@ -1158,14 +1150,14 @@ int size;
if (op) {
for (off=0; off<size; off++) {
if (RBYTE(ram[off]) != oldbyte) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Byte Pre Check 1: BYTE at offset 0x%x should have been=%x, was=%x\n", off, oldbyte, RBYTE(ram[off])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Byte Pre Check 1: BYTE at offset 0x%x should have been=%x, was=%x\n", off, oldbyte, RBYTE(ram[off]));
return RIO_FAIL;
}
}
for (off=0; off<size; off+=2) {
if (*(ushort *)&ram[off] != oldword) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Word Pre Check: WORD at offset 0x%x should have been=%x, was=%x\n",off,oldword,*(ushort *)&ram[off]));
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Word Pre Check: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n",off,RBYTE(ram[off]),off+1,RBYTE(ram[off+1])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Word Pre Check: WORD at offset 0x%x should have been=%x, was=%x\n",off,oldword,*(ushort *)&ram[off]);
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Word Pre Check: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n", off, RBYTE(ram[off]), off+1, RBYTE(ram[off+1]));
return RIO_FAIL;
}
}
@@ -1180,12 +1172,12 @@ int size;
*/
for (off=0; off<size; off++) {
if (op && (RBYTE(ram[off]) != oldbyte)) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Byte Pre Check 2: BYTE at offset 0x%x should have been=%x, was=%x\n",off,oldbyte,RBYTE(ram[off])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Byte Pre Check 2: BYTE at offset 0x%x should have been=%x, was=%x\n", off, oldbyte, RBYTE(ram[off]));
return RIO_FAIL;
}
WBYTE(ram[off],invbyte);
if (RBYTE(ram[off]) != invbyte) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Byte Inv Check: BYTE at offset 0x%x should have been=%x, was=%x\n",off,invbyte,RBYTE(ram[off])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Byte Inv Check: BYTE at offset 0x%x should have been=%x, was=%x\n", off, invbyte, RBYTE(ram[off]));
return RIO_FAIL;
}
}
@@ -1199,15 +1191,15 @@ int size;
*/
for (off=0; off<size; off+=2) {
if (*(ushort *)&ram[off] != invword) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Word Inv Check: WORD at offset 0x%x should have been=%x, was=%x\n",off,invword,*(ushort *)&ram[off]));
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Word Inv Check: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n",off,RBYTE(ram[off]),off+1,RBYTE(ram[off+1])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Word Inv Check: WORD at offset 0x%x should have been=%x, was=%x\n", off, invword, *(ushort *)&ram[off]);
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Word Inv Check: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n", off, RBYTE(ram[off]), off+1, RBYTE(ram[off+1]));
return RIO_FAIL;
}
*(ushort *)&ram[off] = newword;
if ( *(ushort *)&ram[off] != newword ) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Post Word Check 1: WORD at offset 0x%x should have been=%x, was=%x\n",off,newword,*(ushort *)&ram[off]));
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Post Word Check 1: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n",off,RBYTE(ram[off]),off+1,RBYTE(ram[off+1])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Post Word Check 1: WORD at offset 0x%x should have been=%x, was=%x\n", off, newword, *(ushort *)&ram[off]);
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Post Word Check 1: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n", off, RBYTE(ram[off]), off+1, RBYTE(ram[off+1]));
return RIO_FAIL;
}
}
@@ -1219,15 +1211,15 @@ int size;
*/
for (off=0; off<size; off++) {
if (RBYTE(ram[off]) != newbyte) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Post Byte Check: BYTE at offset 0x%x should have been=%x, was=%x\n",off,newbyte,RBYTE(ram[off])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Post Byte Check: BYTE at offset 0x%x should have been=%x, was=%x\n", off, newbyte, RBYTE(ram[off]));
return RIO_FAIL;
}
}
for (off=0; off<size; off+=2) {
if ( *(ushort *)&ram[off] != newword ) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Post Word Check 2: WORD at offset 0x%x should have been=%x, was=%x\n",off,newword,*(ushort *)&ram[off]));
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: Post Word Check 2: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n",off,RBYTE(ram[off]),off+1,RBYTE(ram[off+1])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Post Word Check 2: WORD at offset 0x%x should have been=%x, was=%x\n", off, newword, *(ushort *)&ram[off]);
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: Post Word Check 2: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n", off, RBYTE(ram[off]), off+1, RBYTE(ram[off+1]));
return RIO_FAIL;
}
}
@@ -1244,8 +1236,8 @@ int size;
for ( off=0; off<size; off+=2 ) {
if (*(ushort *)&ram[off] != swapword) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: SwapWord Check 1: WORD at offset 0x%x should have been=%x, was=%x\n",off,swapword,*((ushort *)&ram[off])));
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: SwapWord Check 1: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n",off,RBYTE(ram[off]),off+1,RBYTE(ram[off+1])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: SwapWord Check 1: WORD at offset 0x%x should have been=%x, was=%x\n", off, swapword, *((ushort *)&ram[off]));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: SwapWord Check 1: BYTE at offset 0x%x is %x BYTE at offset 0x%x is %x\n", off, RBYTE(ram[off]), off+1, RBYTE(ram[off+1]));
return RIO_FAIL;
}
*((ushort *)&ram[off]) = ~swapword;
@@ -1253,11 +1245,11 @@ int size;
for (off=0; off<size; off+=2) {
if (RBYTE(ram[off]) != newbyte) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: SwapWord Check 2: BYTE at offset 0x%x should have been=%x, was=%x\n",off,newbyte,RBYTE(ram[off])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: SwapWord Check 2: BYTE at offset 0x%x should have been=%x, was=%x\n", off, newbyte, RBYTE(ram[off]));
return RIO_FAIL;
}
if (RBYTE(ram[off+1]) != invbyte) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: SwapWord Check 2: BYTE at offset 0x%x should have been=%x, was=%x\n",off+1,invbyte,RBYTE(ram[off+1])));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: SwapWord Check 2: BYTE at offset 0x%x should have been=%x, was=%x\n", off+1, invbyte, RBYTE(ram[off+1]));
return RIO_FAIL;
}
*((ushort *)&ram[off]) = newword;
@@ -1384,14 +1376,14 @@ struct rio_info * p;
p->RIOPortp = (struct Port *)sysbrk(RIO_PORTS * sizeof(struct Port));
if (!p->RIOPortp) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: No memory for port structures\n"));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: No memory for port structures\n");
p->RIOFailed++;
return;
}
bzero( p->RIOPortp, sizeof(struct Port) * RIO_PORTS );
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: allocated and cleared memory for port structs\n") );
- rio_dprint(RIO_DEBUG_INIT, ("First RIO port struct @0x%x, size=0x%x bytes\n",
- (int)p->RIOPortp, sizeof(struct Port) ) );
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: allocated and cleared memory for port structs\n");
+ rio_dprintk (RIO_DEBUG_INIT, "First RIO port struct @0x%x, size=0x%x bytes\n",
+ (int)p->RIOPortp, sizeof(struct Port));
for( port=0; port<RIO_PORTS; port++ ) {
p->RIOPortp[port].PortNum = port;
@@ -1404,14 +1396,14 @@ struct rio_info * p;
p->RIOHosts = (struct Host *)sysbrk(RIO_HOSTS * sizeof(struct Host));
if (!p->RIOHosts) {
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: No memory for host structures\n"));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: No memory for host structures\n");
p->RIOFailed++;
return;
}
bzero(p->RIOHosts, sizeof(struct Host)*RIO_HOSTS);
- rio_dprint(RIO_DEBUG_INIT, ("RIO-init: allocated and cleared memory for host structs\n"));
- rio_dprint(RIO_DEBUG_INIT, ("First RIO host struct @0x%x, size=0x%x bytes\n",
- (int)p->RIOHosts, sizeof(struct Host) ) );
+ rio_dprintk (RIO_DEBUG_INIT, "RIO-init: allocated and cleared memory for host structs\n");
+ rio_dprintk (RIO_DEBUG_INIT, "First RIO host struct @0x%x, size=0x%x bytes\n",
+ (int)p->RIOHosts, sizeof(struct Host));
for( host=0; host<RIO_HOSTS; host++ ) {
spin_lock_init (&p->RIOHosts[host].HostLock);
@@ -1494,10 +1486,10 @@ struct rio_info * p;
char * RIORelID = RELEASE_ID;
int host;
- rio_dprint(RIO_DEBUG_INIT, ("RIO : Release: %s ID: %s\n", RIORelease, RIORelID));
+ rio_dprintk (RIO_DEBUG_INIT, "RIO : Release: %s ID: %s\n", RIORelease, RIORelID);
if ( p->RIONumHosts==0 ) {
- rio_dprint(RIO_DEBUG_INIT, ("\nNo Hosts configured\n"));
+ rio_dprintk (RIO_DEBUG_INIT, "\nNo Hosts configured\n");
return(0);
}
@@ -1505,7 +1497,7 @@ struct rio_info * p;
struct Host *HostP = &p->RIOHosts[host];
switch ( HostP->Type ) {
case RIO_AT:
- rio_dprint(RIO_DEBUG_INIT, ("AT BUS : found the card at 0x%x\n", HostP->PaddrP));
+ rio_dprintk (RIO_DEBUG_INIT, "AT BUS : found the card at 0x%x\n", HostP->PaddrP);
}
}
return 0;
@@ -1587,17 +1579,17 @@ uint Slot;
/*
** Reset the Tpu
*/
- rio_dprint(RIO_DEBUG_INIT, ("RIOHostReset: type 0x%x", Type ) );
+ rio_dprintk (RIO_DEBUG_INIT, "RIOHostReset: type 0x%x", Type);
switch ( Type ) {
case RIO_AT:
- rio_dprint(RIO_DEBUG_INIT, (" (RIO_AT)\n"));
+ rio_dprintk (RIO_DEBUG_INIT, " (RIO_AT)\n");
WBYTE(DpRamP->DpControl, BOOT_FROM_RAM | EXTERNAL_BUS_OFF |
INTERRUPT_DISABLE | BYTE_OPERATION |
SLOW_LINKS | SLOW_AT_BUS);
WBYTE(DpRamP->DpResetTpu, 0xFF);
rio_udelay (3);
- rio_dprint(RIO_DEBUG_INIT, ("RIOHostReset: Don't know if it worked. Try reset again\n") );
+ rio_dprintk (RIO_DEBUG_INIT, "RIOHostReset: Don't know if it worked. Try reset again\n");
WBYTE(DpRamP->DpControl, BOOT_FROM_RAM | EXTERNAL_BUS_OFF |
INTERRUPT_DISABLE | BYTE_OPERATION |
SLOW_LINKS | SLOW_AT_BUS);
@@ -1630,7 +1622,7 @@ uint Slot;
break;
#endif
case RIO_PCI:
- rio_dprint(RIO_DEBUG_INIT, (" (RIO_PCI)\n") );
+ rio_dprintk (RIO_DEBUG_INIT, " (RIO_PCI)\n");
DpRamP->DpControl = RIO_PCI_BOOT_FROM_RAM;
DpRamP->DpResetInt = 0xFF;
DpRamP->DpResetTpu = 0xFF;
@@ -1645,7 +1637,7 @@ uint Slot;
#endif
default:
- rio_dprint(RIO_DEBUG_INIT, (" (UNKNOWN)\n") );
+ rio_dprintk (RIO_DEBUG_INIT, " (UNKNOWN)\n");
break;
}
return;
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c
index e92609839..f52124b78 100644
--- a/drivers/char/rio/riointr.c
+++ b/drivers/char/rio/riointr.c
@@ -190,8 +190,8 @@ char * en;
tty = PortP->gs.tty;
- rio_dprint (RIO_DEBUG_INTR, ("tx port %d: %d chars queued.\n",
- PortP->PortNum, PortP->gs.xmit_cnt));
+ rio_dprintk (RIO_DEBUG_INTR, "tx port %d: %d chars queued.\n",
+ PortP->PortNum, PortP->gs.xmit_cnt);
if (!PortP->gs.xmit_cnt) return;
@@ -215,10 +215,10 @@ char * en;
{ int t;
t = (c > 10)?10:c;
- rio_dprint (RIO_DEBUG_INTR, ("tx port %d: copying %d chars: %s - %s\n",
- PortP->PortNum, c,
- firstchars (PortP->gs.xmit_buf + PortP->gs.xmit_tail , t),
- firstchars (PortP->gs.xmit_buf + PortP->gs.xmit_tail + c-t, t)));
+ rio_dprintk (RIO_DEBUG_INTR, "rio: tx port %d: copying %d chars: %s - %s\n",
+ PortP->PortNum, c,
+ firstchars (PortP->gs.xmit_buf + PortP->gs.xmit_tail , t),
+ firstchars (PortP->gs.xmit_buf + PortP->gs.xmit_tail + c-t, t));
}
/* If for one reason or another, we can't copy more data,
we're done! */
@@ -244,14 +244,14 @@ char * en;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (PortP->gs.xmit_cnt <= (PortP->gs.wakeup_chars + 2*PKT_MAX_DATA_LEN)) {
- rio_dprint (RIO_DEBUG_INTR, ("Waking up.... ldisc:%d (%d/%d)....",
+ rio_dprintk (RIO_DEBUG_INTR, "Waking up.... ldisc:%d (%d/%d)....",
(int)(PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)),
- PortP->gs.wakeup_chars, PortP->gs.xmit_cnt));
+ PortP->gs.wakeup_chars, PortP->gs.xmit_cnt);
if ((PortP->gs.tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
PortP->gs.tty->ldisc.write_wakeup)
(PortP->gs.tty->ldisc.write_wakeup)(PortP->gs.tty);
- rio_dprint (RIO_DEBUG_INTR, ("(%d/%d)\n",
- PortP->gs.wakeup_chars, PortP->gs.xmit_cnt));
+ rio_dprintk (RIO_DEBUG_INTR, "(%d/%d)\n",
+ PortP->gs.wakeup_chars, PortP->gs.xmit_cnt);
wake_up_interruptible(&PortP->gs.tty->write_wait);
}
@@ -273,7 +273,7 @@ struct rio_info * p;
for ( host=0; host<p->RIONumHosts; host++ ) {
struct Host *HostP = &p->RIOHosts[host];
- rio_dprint(RIO_DEBUG_INTR, ("riointr() doing host %d type %d\n", host, HostP->Type ) );
+ rio_dprintk (RIO_DEBUG_INTR, "riointr() doing host %d type %d\n", host, HostP->Type);
switch( HostP->Type ) {
case RIO_AT:
@@ -363,7 +363,7 @@ int From;
static int t =0;
rio_spin_unlock (&HostP->HostLock);
if ((t++ % 200) == 0)
- rio_dprint(RIO_DEBUG_INTR, ("Interrupt but host not running. flags=%x.\n", (int)HostP->Flags));
+ rio_dprintk (RIO_DEBUG_INTR, "Interrupt but host not running. flags=%x.\n", (int)HostP->Flags);
return;
}
rio_spin_unlock (&HostP->HostLock);
@@ -372,7 +372,7 @@ int From;
WWORD( HostP->ParmMapP->rup_intr , 0 );
p->RIORupCount++;
RupIntr++;
- rio_dprint(RIO_DEBUG_INTR, ("RUP interrupt on host %d\n", HostP-p->RIOHosts ));
+ rio_dprintk (RIO_DEBUG_INTR, "rio: RUP interrupt on host %d\n", HostP-p->RIOHosts);
RIOPollHostCommands(p, HostP );
}
@@ -383,7 +383,7 @@ int From;
p->RIORxCount++;
RxIntr++;
- rio_dprint(RIO_DEBUG_INTR, ("RX interrupt on host %d\n", HostP-p->RIOHosts));
+ rio_dprintk (RIO_DEBUG_INTR, "rio: RX interrupt on host %d\n", HostP-p->RIOHosts);
/*
** Loop through every port. If the port is mapped into
** the system ( i.e. has /dev/ttyXXXX associated ) then it is
@@ -451,7 +451,7 @@ int From;
** MAGIC! ( Basically, handshake the RX buffer, so that
** the RTAs upstream can be re-enabled. )
*/
- rio_dprint(RIO_DEBUG_INTR, ("Set RX handshake bit\n" ));
+ rio_dprintk (RIO_DEBUG_INTR, "Set RX handshake bit\n");
WWORD( PortP->PhbP->handshake,
PHB_HANDSHAKE_SET|PHB_HANDSHAKE_RESET );
}
@@ -466,7 +466,7 @@ int From;
p->RIOTxCount++;
TxIntr++;
- rio_dprint(RIO_DEBUG_INTR, ("TX interrupt on host %d\n", HostP-p->RIOHosts));
+ rio_dprintk (RIO_DEBUG_INTR, "rio: TX interrupt on host %d\n", HostP-p->RIOHosts);
/*
** Loop through every port.
@@ -504,7 +504,7 @@ int From;
continue;
}
- rio_dprint (RIO_DEBUG_INTR, ("Looking into port %d.\n", port));
+ rio_dprintk (RIO_DEBUG_INTR, "rio: Looking into port %d.\n", port);
/*
** Lock the port before we begin working on it.
*/
@@ -515,7 +515,7 @@ int From;
** we need do none of this processing.
*/
if ( !can_add_transmit( &PacketP, PortP ) ) {
- rio_dprint (RIO_DEBUG_INTR, ("Can't add to port, so skipping.\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "Can't add to port, so skipping.\n");
rio_spin_unlock(&PortP->portSem);
continue;
}
@@ -527,7 +527,7 @@ int From;
ttyP = PortP->gs.tty;
/* If ttyP is NULL, the port is getting closed. Forget about it. */
if (!ttyP) {
- rio_dprint (RIO_DEBUG_INTR, ("no tty, so skipping.\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "no tty, so skipping.\n");
rio_spin_unlock(&PortP->portSem);
continue;
}
@@ -603,10 +603,10 @@ int From;
** with WFLUSH
*/
if ( PortP->WflushFlag ) {
- rio_dprint(RIO_DEBUG_INTR, ("Want to WFLUSH mark this port\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "Want to WFLUSH mark this port\n");
if ( PortP->InUse )
- rio_dprint(RIO_DEBUG_INTR, ("FAILS - PORT IS IN USE\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "FAILS - PORT IS IN USE\n");
}
while ( PortP->WflushFlag &&
@@ -615,7 +615,7 @@ int From;
int p;
struct PktCmd *PktCmdP;
- rio_dprint(RIO_DEBUG_INTR, ("Add WFLUSH marker to data queue\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "Add WFLUSH marker to data queue\n");
/*
** make it look just like a WFLUSH command
*/
@@ -670,8 +670,8 @@ int From;
PortP->MagicFlags &= ~MAGIC_FLUSH;
}
- rio_dprint(RIO_DEBUG_INTR, ("Wflush count now stands at %d\n",
- PortP->WflushFlag));
+ rio_dprintk (RIO_DEBUG_INTR, "Wflush count now stands at %d\n",
+ PortP->WflushFlag);
}
if ( PortP->MagicFlags & MORE_OUTPUT_EYGOR ) {
if ( PortP->MagicFlags & MAGIC_FLUSH ) {
@@ -747,12 +747,12 @@ struct Port * PortP;
TtyP = PortP->gs.tty;
if (!TtyP) {
- rio_dprint (RIO_DEBUG_INTR, ("RIOReceive: tty is null. \n"));
+ rio_dprintk (RIO_DEBUG_INTR, "RIOReceive: tty is null. \n");
return;
}
if (PortP->State & RIO_THROTTLE_RX) {
- rio_dprint (RIO_DEBUG_INTR, ("RIOReceive: Throttled. Can't handle more input.\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "RIOReceive: Throttled. Can't handle more input.\n");
return;
}
@@ -786,18 +786,18 @@ struct Port * PortP;
** check that it is not a command!
*/
if ( PacketP->len & PKT_CMD_BIT ) {
- rio_dprint(RIO_DEBUG_INTR, ("RIO: unexpected command packet received on PHB\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "RIO: unexpected command packet received on PHB\n");
/* rio_dprint(RIO_DEBUG_INTR, (" sysport = %d\n", p->RIOPortp->PortNum)); */
- rio_dprint(RIO_DEBUG_INTR, (" dest_unit = %d\n", PacketP->dest_unit));
- rio_dprint(RIO_DEBUG_INTR, (" dest_port = %d\n", PacketP->dest_port));
- rio_dprint(RIO_DEBUG_INTR, (" src_unit = %d\n", PacketP->src_unit));
- rio_dprint(RIO_DEBUG_INTR, (" src_port = %d\n", PacketP->src_port));
- rio_dprint(RIO_DEBUG_INTR, (" len = %d\n", PacketP->len));
- rio_dprint(RIO_DEBUG_INTR, (" control = %d\n", PacketP->control));
- rio_dprint(RIO_DEBUG_INTR, (" csum = %d\n", PacketP->csum));
- rio_dprint(RIO_DEBUG_INTR, (" data bytes: "));
+ rio_dprintk (RIO_DEBUG_INTR, " dest_unit = %d\n", PacketP->dest_unit);
+ rio_dprintk (RIO_DEBUG_INTR, " dest_port = %d\n", PacketP->dest_port);
+ rio_dprintk (RIO_DEBUG_INTR, " src_unit = %d\n", PacketP->src_unit);
+ rio_dprintk (RIO_DEBUG_INTR, " src_port = %d\n", PacketP->src_port);
+ rio_dprintk (RIO_DEBUG_INTR, " len = %d\n", PacketP->len);
+ rio_dprintk (RIO_DEBUG_INTR, " control = %d\n", PacketP->control);
+ rio_dprintk (RIO_DEBUG_INTR, " csum = %d\n", PacketP->csum);
+ rio_dprintk (RIO_DEBUG_INTR, " data bytes: ");
for ( DataCnt=0; DataCnt<PKT_MAX_DATA_LEN; DataCnt++ )
- rio_dprint(RIO_DEBUG_INTR, ("%d\n", PacketP->data[DataCnt]));
+ rio_dprintk (RIO_DEBUG_INTR, "%d\n", PacketP->data[DataCnt]);
remove_receive( PortP );
put_free_end( PortP->HostP, PacketP );
continue; /* with next packet */
@@ -820,8 +820,8 @@ struct Port * PortP;
transCount = min(PacketP->len & PKT_LEN_MASK,
TTY_FLIPBUF_SIZE - TtyP->flip.count);
- rio_dprint(RIO_DEBUG_REC, ("port %d: Copy %d bytes\n",
- PortP->PortNum, transCount ) );
+ rio_dprintk (RIO_DEBUG_REC, "port %d: Copy %d bytes\n",
+ PortP->PortNum, transCount);
/*
** To use the following 'kkprintfs' for debugging - change the '#undef'
** to '#define', (this is the only place ___DEBUG_IT___ occurs in the
@@ -880,7 +880,7 @@ struct Port * PortP;
}
}
if (copied) {
- rio_dprint ( RIO_DEBUG_REC, ("port %d: pushing tty flip buffer: %d total bytes copied.\n", PortP->PortNum, copied));
+ rio_dprintk (RIO_DEBUG_REC, "port %d: pushing tty flip buffer: %d total bytes copied.\n", PortP->PortNum, copied);
tty_flip_buffer_push (TtyP);
}
@@ -906,25 +906,25 @@ int port;
SysPort = port; /* Believe me, it works. */
if ( SysPort < 0 || SysPort >= RIO_PORTS ) {
- rio_dprint(RIO_DEBUG_INTR, ("Illegal port %d derived from TTY in riotproc()\n",SysPort));
+ rio_dprintk (RIO_DEBUG_INTR, "Illegal port %d derived from TTY in riotproc()\n",SysPort);
return 0;
}
PortP = p->RIOPortp[SysPort];
if ((uint)PortP->PhbP < (uint)PortP->Caddr ||
(uint)PortP->PhbP >= (uint)PortP->Caddr+SIXTY_FOUR_K ) {
- rio_dprint(RIO_DEBUG_INTR, ("RIO: NULL or BAD PhbP on sys port %d in proc routine\n",
- SysPort));
- rio_dprint(RIO_DEBUG_INTR, (" PortP = 0x%x\n",PortP));
- rio_dprint(RIO_DEBUG_INTR, (" PortP->PhbP = 0x%x\n",PortP->PhbP));
- rio_dprint(RIO_DEBUG_INTR, (" PortP->Caddr = 0x%x\n",PortP->PhbP));
- rio_dprint(RIO_DEBUG_INTR, (" PortP->HostPort = 0x%x\n",PortP->HostPort));
+ rio_dprintk (RIO_DEBUG_INTR, "RIO: NULL or BAD PhbP on sys port %d in proc routine\n",
+ SysPort);
+ rio_dprintk (RIO_DEBUG_INTR, " PortP = 0x%x\n",PortP);
+ rio_dprintk (RIO_DEBUG_INTR, " PortP->PhbP = 0x%x\n",PortP->PhbP);
+ rio_dprintk (RIO_DEBUG_INTR, " PortP->Caddr = 0x%x\n",PortP->PhbP);
+ rio_dprintk (RIO_DEBUG_INTR, " PortP->HostPort = 0x%x\n",PortP->HostPort);
return 0;
}
switch(cmd) {
case T_WFLUSH:
- rio_dprint(RIO_DEBUG_INTR, "T_WFLUSH\n");
+ rio_dprintk (RIO_DEBUG_INTR, "T_WFLUSH\n");
/*
** Because of the spooky way the RIO works, we don't need
** to issue a flush command on any of the SET*F commands,
@@ -941,14 +941,14 @@ int port;
** form a wflush packet - 1 byte long, no data
*/
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_INTR, ("WFLUSH on deleted RTA\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "WFLUSH on deleted RTA\n");
}
else {
if ( RIOPreemptiveCmd(p, PortP, WFLUSH ) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_INTR, ("T_WFLUSH Command failed\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_WFLUSH Command failed\n");
}
else
- rio_dprint(RIO_DEBUG_INTR, ("T_WFLUSH Command\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_WFLUSH Command\n");
}
/*
** WFLUSH operation - flush the data!
@@ -956,7 +956,7 @@ int port;
PortP->TxBufferIn = PortP->TxBufferOut = 0;
}
else {
- rio_dprint(RIO_DEBUG_INTR, ("T_WFLUSH Command ignored\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_WFLUSH Command ignored\n");
}
/*
** sort out the line discipline
@@ -966,16 +966,16 @@ int port;
break;
case T_RESUME:
- rio_dprint(RIO_DEBUG_INTR, ("T_RESUME\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_RESUME\n");
/*
** send pre-emptive resume packet
*/
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_INTR, ("RESUME on deleted RTA\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "RESUME on deleted RTA\n");
}
else {
if ( RIOPreemptiveCmd(p, PortP, RESUME ) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_INTR, ("T_RESUME Command failed\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_RESUME Command failed\n");
}
}
/*
@@ -986,7 +986,7 @@ int port;
break;
case T_TIME:
- rio_dprint(RIO_DEBUG_INTR, ("T_TIME\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_TIME\n");
/*
** T_TIME is called when xDLY is set in oflags and
** the line discipline timeout has expired. It's
@@ -1008,16 +1008,16 @@ start:
break;
case T_SUSPEND:
- rio_dprint(RIO_DEBUG_INTR, ("T_SUSPEND\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_SUSPEND\n");
/*
** send a suspend pre-emptive packet.
*/
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_INTR, ("SUSPEND deleted RTA\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "SUSPEND deleted RTA\n");
}
else {
if ( RIOPreemptiveCmd(p, PortP, SUSPEND ) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_INTR, ("T_SUSPEND Command failed\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_SUSPEND Command failed\n");
}
}
/*
@@ -1026,18 +1026,18 @@ start:
break;
case T_BLOCK:
- rio_dprint(RIO_DEBUG_INTR, ("T_BLOCK\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_BLOCK\n");
break;
case T_RFLUSH:
- rio_dprint(RIO_DEBUG_INTR, ("T_RFLUSH\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_RFLUSH\n");
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_INTR, ("RFLUSH on deleted RTA\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "RFLUSH on deleted RTA\n");
PortP->RxDataStart = 0;
}
else {
if ( RIOPreemptiveCmd( p, PortP, RFLUSH ) == RIO_FAIL ) {
- rio_dprint(RIO_DEBUG_INTR, ("T_RFLUSH Command failed\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_RFLUSH Command failed\n");
return 0;
}
PortP->RxDataStart = 0;
@@ -1050,14 +1050,14 @@ start:
/*
** MAGIC!
*/
- rio_dprint(RIO_DEBUG_INTR, ("Set receive handshake bit\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "Set receive handshake bit\n");
PortP->PhbP->handshake |= PHB_HANDSHAKE_RESET;
}
}
break;
/* FALLTHROUGH */
case T_UNBLOCK:
- rio_dprint(RIO_DEBUG_INTR, ("T_UNBLOCK\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_UNBLOCK\n");
/*
** If there is any data to receive set a timeout to service it.
*/
@@ -1065,7 +1065,7 @@ start:
break;
case T_BREAK:
- rio_dprint(RIO_DEBUG_INTR, ("T_BREAK\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "T_BREAK\n");
/*
** Send a break command. For Sys V
** this is a timed break, so we
@@ -1075,12 +1075,12 @@ start:
** Build a BREAK command
*/
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_INTR, ("BREAK on deleted RTA\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "BREAK on deleted RTA\n");
}
else {
if (RIOShortCommand(PortP,SBREAK,2,
p->RIOConf.BreakInterval)==RIO_FAIL) {
- rio_dprint(RIO_DEBUG_INTR, ("SBREAK RIOShortCommand failed\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "SBREAK RIOShortCommand failed\n");
}
}
@@ -1090,18 +1090,18 @@ start:
break;
case T_INPUT:
- rio_dprint(RIO_DEBUG_INTR, ("Proc T_INPUT called - I don't know what to do!\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "Proc T_INPUT called - I don't know what to do!\n");
break;
case T_PARM:
- rio_dprint(RIO_DEBUG_INTR, ("Proc T_PARM called - I don't know what to do!\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "Proc T_PARM called - I don't know what to do!\n");
break;
case T_SWTCH:
- rio_dprint(RIO_DEBUG_INTR, ("Proc T_SWTCH called - I don't know what to do!\n"));
+ rio_dprintk (RIO_DEBUG_INTR, "Proc T_SWTCH called - I don't know what to do!\n");
break;
default:
- rio_dprint(RIO_DEBUG_INTR, ("Proc UNKNOWN command %d\n",cmd));
+ rio_dprintk (RIO_DEBUG_INTR, "Proc UNKNOWN command %d\n",cmd);
}
/*
** T_OUTPUT returns without passing through this point!
diff --git a/drivers/char/rio/rioparam.c b/drivers/char/rio/rioparam.c
index 550e2c17d..4ce8443c3 100644
--- a/drivers/char/rio/rioparam.c
+++ b/drivers/char/rio/rioparam.c
@@ -176,13 +176,18 @@ int SleepFlag;
int retries = 0xff;
unsigned long flags;
+ func_enter ();
+
TtyP = PortP->gs.tty;
- rio_dprint(RIO_DEBUG_PARAM, ("RIOParam: Port:%d cmd:%d Modem:%d SleepFlag:%d Mapped: %d, tty=%p\n",
- PortP->PortNum, cmd, Modem, SleepFlag, PortP->Mapped, TtyP) );
+ rio_dprintk (RIO_DEBUG_PARAM, "RIOParam: Port:%d cmd:%d Modem:%d SleepFlag:%d Mapped: %d, tty=%p\n",
+ PortP->PortNum, cmd, Modem, SleepFlag, PortP->Mapped, TtyP);
if (!TtyP) {
- rio_dprint (RIO_DEBUG_PARAM, ("Can't call rioparam with null tty.\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Can't call rioparam with null tty.\n");
+
+ func_exit ();
+
return RIO_FAIL;
}
rio_spin_lock_irqsave(&PortP->portSem, flags );
@@ -205,7 +210,7 @@ int SleepFlag;
PortP->FirstOpen = 0;
}
else if (PortP->Store || PortP->Lock) {
- rio_dprint(RIO_DEBUG_PARAM, ("OPEN: Restoring stored/locked params\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "OPEN: Restoring stored/locked params\n");
TtyP->tm.c_iflag = PortP->StoredTty.iflag;
TtyP->tm.c_oflag = PortP->StoredTty.oflag;
TtyP->tm.c_cflag = PortP->StoredTty.cflag;
@@ -226,41 +231,49 @@ int SleepFlag;
break;
}
if ( PortP->InUse != NOT_INUSE ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Port IN_USE for pre-emptive command\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Port IN_USE for pre-emptive command\n");
}
if ( !res ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Port has no space on transmit queue\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Port has no space on transmit queue\n");
}
if ( SleepFlag != OK_TO_SLEEP ) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags);
+ func_exit();
+
return RIO_FAIL;
}
- rio_dprint(RIO_DEBUG_PARAM, ("wait for can_add_transmit\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "wait for can_add_transmit\n");
rio_spin_unlock_irqrestore( &PortP->portSem, flags);
retval = RIODelay(PortP, HUNDRED_MS);
rio_spin_lock_irqsave( &PortP->portSem, flags);
if (retval == RIO_FAIL) {
- rio_dprint(RIO_DEBUG_PARAM, ("wait for can_add_transmit broken by signal\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "wait for can_add_transmit broken by signal\n");
rio_spin_unlock_irqrestore( &PortP->portSem, flags);
pseterr(EINTR);
+ func_exit();
+
return RIO_FAIL;
}
if ( PortP->State & RIO_DELETED ) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags);
+ func_exit ();
+
return RIO_SUCCESS;
}
}
if (!res) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags);
+ func_exit ();
+
return RIO_FAIL;
}
- rio_dprint(RIO_DEBUG_PARAM, ("can_add_transmit() returns %x\n",res));
- rio_dprint(RIO_DEBUG_PARAM, ("Packet is 0x%x\n",(int) PacketP));
+ rio_dprintk (RIO_DEBUG_PARAM, "can_add_transmit() returns %x\n",res);
+ rio_dprintk (RIO_DEBUG_PARAM, "Packet is 0x%x\n",(int) PacketP);
phb_param_ptr = (struct phb_param *)PacketP->data;
@@ -270,7 +283,7 @@ int SleepFlag;
** COR 1
*/
if ( TtyP->tm.c_iflag & INPCK ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Parity checking on input enabled\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Parity checking on input enabled\n");
Cor1 |= COR1_INPCK;
}
#endif
@@ -278,53 +291,53 @@ int SleepFlag;
switch ( TtyP->termios->c_cflag & CSIZE ) {
case CS5:
{
- rio_dprint(RIO_DEBUG_PARAM, ("5 bit data\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "5 bit data\n");
Cor1 |= COR1_5BITS;
break;
}
case CS6:
{
- rio_dprint(RIO_DEBUG_PARAM, ("6 bit data\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "6 bit data\n");
Cor1 |= COR1_6BITS;
break;
}
case CS7:
{
- rio_dprint(RIO_DEBUG_PARAM, ("7 bit data\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "7 bit data\n");
Cor1 |= COR1_7BITS;
break;
}
case CS8:
{
- rio_dprint(RIO_DEBUG_PARAM, ("8 bit data\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "8 bit data\n");
Cor1 |= COR1_8BITS;
break;
}
}
if ( TtyP->termios->c_cflag & CSTOPB ) {
- rio_dprint(RIO_DEBUG_PARAM, ("2 stop bits\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "2 stop bits\n");
Cor1 |= COR1_2STOP;
}
else {
- rio_dprint(RIO_DEBUG_PARAM, ("1 stop bit\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "1 stop bit\n");
Cor1 |= COR1_1STOP;
}
if ( TtyP->termios->c_cflag & PARENB ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Enable parity\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable parity\n");
Cor1 |= COR1_NORMAL;
}
else {
- rio_dprint(RIO_DEBUG_PARAM, ("Disable parity\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Disable parity\n");
Cor1 |= COR1_NOP;
}
if ( TtyP->termios->c_cflag & PARODD ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Odd parity\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Odd parity\n");
Cor1 |= COR1_ODD;
}
else {
- rio_dprint(RIO_DEBUG_PARAM, ("Even parity\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Even parity\n");
Cor1 |= COR1_EVEN;
}
@@ -332,89 +345,89 @@ int SleepFlag;
** COR 2
*/
if ( TtyP->termios->c_iflag & IXON ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Enable start/stop output control\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable start/stop output control\n");
Cor2 |= COR2_IXON;
}
else {
if ( PortP->Config & RIO_IXON ) {
- rio_dprint(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;
}
else
- rio_dprint(RIO_DEBUG_PARAM, ("IXON has been disabled.\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "IXON has been disabled.\n");
}
if (TtyP->termios->c_iflag & IXANY) {
if ( PortP->Config & RIO_IXANY ) {
- rio_dprint(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;
}
else
- rio_dprint(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 ) {
- rio_dprint(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;
}
if ( TtyP->termios->c_cflag & HUPCL ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Hangup on last close\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Hangup on last close\n");
Cor2 |= COR2_HUPCL;
}
if ( C_CRTSCTS (TtyP)) {
- rio_dprint(RIO_DEBUG_PARAM, ("Rx hardware flow control enabled\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Rx hardware flow control enabled\n");
Cor2 |= COR2_CTSFLOW;
Cor2 |= COR2_RTSFLOW;
} else {
- rio_dprint(RIO_DEBUG_PARAM, ("Rx hardware flow control disabled\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Rx hardware flow control disabled\n");
Cor2 &= ~COR2_CTSFLOW;
Cor2 &= ~COR2_RTSFLOW;
}
if ( TtyP->termios->c_cflag & CLOCAL ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Local line\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Local line\n");
}
else {
- rio_dprint(RIO_DEBUG_PARAM, ("Possible Modem line\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Possible Modem line\n");
}
/*
** COR 4 (there is no COR 3)
*/
if ( TtyP->termios->c_iflag & IGNBRK ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Ignore break condition\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Ignore break condition\n");
Cor4 |= COR4_IGNBRK;
}
if ( !(TtyP->termios->c_iflag & BRKINT) ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Break generates NULL condition\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Break generates NULL condition\n");
Cor4 |= COR4_NBRKINT;
} else {
- rio_dprint(RIO_DEBUG_PARAM, ("Interrupt on break condition\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Interrupt on break condition\n");
}
if ( TtyP->termios->c_iflag & INLCR ) {
- rio_dprint(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;
}
if ( TtyP->termios->c_iflag & IGNCR ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Ignore carriage return on input\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Ignore carriage return on input\n");
Cor4 |= COR4_IGNCR;
}
if ( TtyP->termios->c_iflag & ICRNL ) {
- rio_dprint(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;
}
if ( TtyP->termios->c_iflag & IGNPAR ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Ignore characters with parity errors\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Ignore characters with parity errors\n");
Cor4 |= COR4_IGNPAR;
}
if ( TtyP->termios->c_iflag & PARMRK ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Mark parity errors\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Mark parity errors\n");
Cor4 |= COR4_PARMRK;
}
@@ -444,24 +457,24 @@ int SleepFlag;
** Could set LNE here if you wanted LNext processing. SVR4 will use it.
*/
if ( TtyP->termios->c_iflag & ISTRIP ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Strip input characters\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Strip input characters\n");
if (! (PortP->State & RIO_TRIAD_MODE)) {
Cor5 |= COR5_ISTRIP;
}
}
if ( TtyP->termios->c_oflag & ONLCR ) {
- rio_dprint(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 )
Cor5 |= COR5_ONLCR;
}
if ( TtyP->termios->c_oflag & OCRNL ) {
- rio_dprint(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 )
Cor5 |= COR5_OCRNL;
}
if ( ( TtyP->termios->c_oflag & TABDLY) == TAB3 ) {
- rio_dprint(RIO_DEBUG_PARAM, ("Tab delay 3 set\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Tab delay 3 set\n");
if ( PortP->CookMode == COOK_MEDIUM )
Cor5 |= COR5_TAB3;
}
@@ -481,8 +494,8 @@ int SleepFlag;
/*
** Baud rate bytes
*/
- rio_dprint(RIO_DEBUG_PARAM, ("Mapping of rx/tx baud %x (%x)\n",
- TtyP->termios->c_cflag, CBAUD));
+ rio_dprintk (RIO_DEBUG_PARAM, "Mapping of rx/tx baud %x (%x)\n",
+ TtyP->termios->c_cflag, CBAUD);
switch (TtyP->termios->c_cflag & CBAUD) {
#define e(b) case B ## b : RxBaud = TxBaud = RIO_B ## b ;break
@@ -494,77 +507,77 @@ int SleepFlag;
/* XXX MIssing conversion table. XXX */
/* (TtyP->termios->c_cflag & V_CBAUD); */
- rio_dprint(RIO_DEBUG_PARAM, ("tx baud 0x%x, rx baud 0x%x\n", TxBaud, RxBaud));
+ rio_dprintk (RIO_DEBUG_PARAM, "tx baud 0x%x, rx baud 0x%x\n", TxBaud, RxBaud);
/*
** Leftovers
*/
if ( TtyP->termios->c_cflag & CREAD )
- rio_dprint(RIO_DEBUG_PARAM, ("Enable receiver\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable receiver\n");
#ifdef RCV1EN
if ( TtyP->termios->c_cflag & RCV1EN )
- rio_dprint(RIO_DEBUG_PARAM, ("RCV1EN (?)\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "RCV1EN (?)\n");
#endif
#ifdef XMT1EN
if ( TtyP->termios->c_cflag & XMT1EN )
- rio_dprint(RIO_DEBUG_PARAM, ("XMT1EN (?)\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "XMT1EN (?)\n");
#endif
#if 0
if ( TtyP->termios->c_cflag & LOBLK )
- rio_dprint(RIO_DEBUG_PARAM, ("LOBLK - JCL output blocks when not current\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "LOBLK - JCL output blocks when not current\n");
#endif
if ( TtyP->termios->c_lflag & ISIG )
- rio_dprint(RIO_DEBUG_PARAM, ("Input character signal generating enabled\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Input character signal generating enabled\n");
if ( TtyP->termios->c_lflag & ICANON )
- rio_dprint(RIO_DEBUG_PARAM, ("Canonical input: erase and kill enabled\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Canonical input: erase and kill enabled\n");
if ( TtyP->termios->c_lflag & XCASE )
- rio_dprint(RIO_DEBUG_PARAM, ("Canonical upper/lower presentation\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Canonical upper/lower presentation\n");
if ( TtyP->termios->c_lflag & ECHO )
- rio_dprint(RIO_DEBUG_PARAM, ("Enable input echo\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable input echo\n");
if ( TtyP->termios->c_lflag & ECHOE )
- rio_dprint(RIO_DEBUG_PARAM, ("Enable echo erase\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable echo erase\n");
if ( TtyP->termios->c_lflag & ECHOK )
- rio_dprint(RIO_DEBUG_PARAM, ("Enable echo kill\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable echo kill\n");
if ( TtyP->termios->c_lflag & ECHONL )
- rio_dprint(RIO_DEBUG_PARAM, ("Enable echo newline\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable echo newline\n");
if ( TtyP->termios->c_lflag & NOFLSH )
- rio_dprint(RIO_DEBUG_PARAM, ("Disable flush after interrupt or quit\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Disable flush after interrupt or quit\n");
#ifdef TOSTOP
if ( TtyP->termios->c_lflag & TOSTOP )
- rio_dprint(RIO_DEBUG_PARAM, ("Send SIGTTOU for background output\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Send SIGTTOU for background output\n");
#endif
#ifdef XCLUDE
if ( TtyP->termios->c_lflag & XCLUDE )
- rio_dprint(RIO_DEBUG_PARAM, ("Exclusive use of this line\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Exclusive use of this line\n");
#endif
if ( TtyP->termios->c_iflag & IUCLC )
- rio_dprint(RIO_DEBUG_PARAM, ("Map uppercase to lowercase on input\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Map uppercase to lowercase on input\n");
if ( TtyP->termios->c_oflag & OPOST )
- rio_dprint(RIO_DEBUG_PARAM, ("Enable output post-processing\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Enable output post-processing\n");
if ( TtyP->termios->c_oflag & OLCUC )
- rio_dprint(RIO_DEBUG_PARAM, ("Map lowercase to uppercase on output\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Map lowercase to uppercase on output\n");
if ( TtyP->termios->c_oflag & ONOCR )
- rio_dprint(RIO_DEBUG_PARAM, ("No carriage return output at column 0\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "No carriage return output at column 0\n");
if ( TtyP->termios->c_oflag & ONLRET )
- rio_dprint(RIO_DEBUG_PARAM, ("Newline performs carriage return function\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Newline performs carriage return function\n");
if ( TtyP->termios->c_oflag & OFILL )
- rio_dprint(RIO_DEBUG_PARAM, ("Use fill characters for delay\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Use fill characters for delay\n");
if ( TtyP->termios->c_oflag & OFDEL )
- rio_dprint(RIO_DEBUG_PARAM, ("Fill character is DEL\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Fill character is DEL\n");
if ( TtyP->termios->c_oflag & NLDLY )
- rio_dprint(RIO_DEBUG_PARAM, ("Newline delay set\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Newline delay set\n");
if ( TtyP->termios->c_oflag & CRDLY )
- rio_dprint(RIO_DEBUG_PARAM, ("Carriage return delay set\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Carriage return delay set\n");
if ( TtyP->termios->c_oflag & TABDLY )
- rio_dprint(RIO_DEBUG_PARAM, ("Tab delay set\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Tab delay set\n");
#if 0
if ( TtyP->termios->c_oflag & BSDLY )
- rio_dprint(RIO_DEBUG_PARAM, ("Back-space delay set\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Back-space delay set\n");
if ( TtyP->termios->c_oflag & VTDLY )
- rio_dprint(RIO_DEBUG_PARAM, ("Vertical tab delay set\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Vertical tab delay set\n");
if ( TtyP->termios->c_oflag & FFDLY )
- rio_dprint(RIO_DEBUG_PARAM, ("Form-feed delay set\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "Form-feed delay set\n");
#endif
/*
** These things are kind of useful in a later life!
@@ -573,6 +586,8 @@ int SleepFlag;
if ( PortP->State & RIO_DELETED ) {
rio_spin_unlock_irqrestore( &PortP->portSem, flags);
+ func_exit ();
+
return RIO_FAIL;
}
@@ -610,10 +625,12 @@ int SleepFlag;
rio_spin_unlock_irqrestore( &PortP->portSem, flags);
- rio_dprint(RIO_DEBUG_PARAM, ("add_transmit returned.\n"));
+ rio_dprintk (RIO_DEBUG_PARAM, "add_transmit returned.\n");
/*
** job done.
*/
+ func_exit ();
+
return RIO_SUCCESS;
}
@@ -644,7 +661,7 @@ add_transmit(PortP)
struct Port *PortP;
{
if (RWORD(*PortP->TxAdd) & PKT_IN_USE) {
- rio_dprint (RIO_DEBUG_PARAM, ("add_transmit: Packet has been stolen!"));
+ rio_dprintk (RIO_DEBUG_PARAM, "add_transmit: Packet has been stolen!");
}
WWORD( *(ushort *)PortP->TxAdd, RWORD(*PortP->TxAdd) | PKT_IN_USE);
PortP->TxAdd = (PortP->TxAdd == PortP->TxEnd) ? PortP->TxStart :
@@ -672,7 +689,7 @@ PKT *PktP;
*
************************************************/
- rio_dprint(RIO_DEBUG_PFE, ("put_free_end(PktP=%x)\n",(int)PktP));
+ rio_dprintk (RIO_DEBUG_PFE, "put_free_end(PktP=%x)\n",(int)PktP);
if ((old_end=RWORD(HostP->ParmMapP->free_list_end)) != TPNULL) {
new_end = RIO_OFF(HostP->Caddr,PktP);
@@ -683,12 +700,13 @@ PKT *PktP;
WWORD(HostP->ParmMapP->free_list_end, new_end);
}
else { /* First packet on the free list this should never happen! */
- rio_dprint(RIO_DEBUG_PFE, ("put_free_end(): This should never happen\n"));
+ rio_dprintk (RIO_DEBUG_PFE, "put_free_end(): This should never happen\n");
WWORD(HostP->ParmMapP->free_list_end , RIO_OFF(HostP->Caddr,PktP));
tmp_pointer = (FREE_LIST *)PktP;
WWORD(tmp_pointer->prev , TPNULL);
WWORD(tmp_pointer->next , TPNULL);
}
+ rio_dprintk (RIO_DEBUG_CMD, "Before unlock: %p\n", &HostP->HostLock);
rio_spin_unlock_irqrestore(&HostP->HostLock, flags);
}
diff --git a/drivers/char/rio/rioroute.c b/drivers/char/rio/rioroute.c
index 2f13eb273..ab78ddf5d 100644
--- a/drivers/char/rio/rioroute.c
+++ b/drivers/char/rio/rioroute.c
@@ -178,8 +178,8 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
if ( Lies )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("LIES! DAMN LIES! %d LIES!\n",Lies));
- rio_dprint(RIO_DEBUG_ROUTE, ("%d:%c %d:%c %d:%c %d:%c\n",
+ rio_dprintk (RIO_DEBUG_ROUTE, "LIES! DAMN LIES! %d LIES!\n",Lies);
+ rio_dprintk (RIO_DEBUG_ROUTE, "%d:%c %d:%c %d:%c %d:%c\n",
RBYTE(PktCmdP->RouteTopology[0].Unit),
'A'+RBYTE(PktCmdP->RouteTopology[0].Link),
RBYTE(PktCmdP->RouteTopology[1].Unit),
@@ -187,7 +187,7 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
RBYTE(PktCmdP->RouteTopology[2].Unit),
'A'+RBYTE(PktCmdP->RouteTopology[2].Link),
RBYTE(PktCmdP->RouteTopology[3].Unit),
- 'A'+RBYTE(PktCmdP->RouteTopology[3].Link)));
+ 'A'+RBYTE(PktCmdP->RouteTopology[3].Link));
return TRUE;
}
@@ -219,11 +219,11 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
NewUnit != ROUTE_NO_ID &&
NewUnit != ROUTE_INTERCONNECT )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("I have a link from %s %s to unit %d:%d - I don't like it.\n",
+ rio_dprintk (RIO_DEBUG_ROUTE, "I have a link from %s %s to unit %d:%d - I don't like it.\n",
MyType,
MyName,
NewUnit,
- NewLink));
+ NewLink);
}
else
{
@@ -248,8 +248,8 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
RIOConCon(p,HostP,ThisUnit,ThisLink,NewUnit,NewLink,CONNECT);
if ( NewUnit == ROUTE_NO_ID )
- rio_dprint(RIO_DEBUG_ROUTE, ("%s %s (%c) is connected to an unconfigured unit.\n",
- MyType,MyName,'A'+ThisLink));
+ rio_dprintk (RIO_DEBUG_ROUTE, "%s %s (%c) is connected to an unconfigured unit.\n",
+ MyType,MyName,'A'+ThisLink);
if ( NewUnit == ROUTE_INTERCONNECT )
{
@@ -267,14 +267,14 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
if ( HostP->Topology[OldLink].Unit == ThisUnit &&
HostP->Topology[OldLink].Link == ThisLink )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("SETTING HOST (%c) TO DISCONNECTED!\n", OldLink+'A'));
+ rio_dprintk (RIO_DEBUG_ROUTE, "SETTING HOST (%c) TO DISCONNECTED!\n", OldLink+'A');
HostP->Topology[OldLink].Unit = ROUTE_DISCONNECT;
HostP->Topology[OldLink].Link = NO_LINK;
}
else
{
- rio_dprint(RIO_DEBUG_ROUTE, ("HOST(%c) WAS NOT CONNECTED TO %s (%c)!\n",
- OldLink+'A',HostP->Mapping[ThisUnit-1].Name,ThisLink+'A'));
+ rio_dprintk (RIO_DEBUG_ROUTE, "HOST(%c) WAS NOT CONNECTED TO %s (%c)!\n",
+ OldLink+'A',HostP->Mapping[ThisUnit-1].Name,ThisLink+'A');
}
}
else if ( OldUnit <= MAX_RUP )
@@ -282,29 +282,29 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
if ( HostP->Mapping[OldUnit-1].Topology[OldLink].Unit == ThisUnit &&
HostP->Mapping[OldUnit-1].Topology[OldLink].Link == ThisLink )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("SETTING RTA %s (%c) TO DISCONNECTED!\n",
- HostP->Mapping[OldUnit-1].Name,OldLink+'A'));
+ rio_dprintk (RIO_DEBUG_ROUTE, "SETTING RTA %s (%c) TO DISCONNECTED!\n",
+ HostP->Mapping[OldUnit-1].Name,OldLink+'A');
HostP->Mapping[OldUnit-1].Topology[OldLink].Unit=ROUTE_DISCONNECT;
HostP->Mapping[OldUnit-1].Topology[OldLink].Link=NO_LINK;
}
else
{
- rio_dprint(RIO_DEBUG_ROUTE, ("RTA %s (%c) WAS NOT CONNECTED TO %s (%c)\n",
+ rio_dprintk (RIO_DEBUG_ROUTE, "RTA %s (%c) WAS NOT CONNECTED TO %s (%c)\n",
HostP->Mapping[OldUnit-1].Name,OldLink+'A',
- HostP->Mapping[ThisUnit-1].Name,ThisLink+'A'));
+ HostP->Mapping[ThisUnit-1].Name,ThisLink+'A');
}
}
if ( NewUnit == HOST_ID )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("MARKING HOST (%c) CONNECTED TO %s (%c)\n",
- NewLink+'A',MyName,ThisLink+'A'));
+ rio_dprintk (RIO_DEBUG_ROUTE, "MARKING HOST (%c) CONNECTED TO %s (%c)\n",
+ NewLink+'A',MyName,ThisLink+'A');
HostP->Topology[NewLink].Unit = ThisUnit;
HostP->Topology[NewLink].Link = ThisLink;
}
else if ( NewUnit <= MAX_RUP )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("MARKING RTA %s (%c) CONNECTED TO %s (%c)\n",
- HostP->Mapping[NewUnit-1].Name,NewLink+'A',MyName,ThisLink+'A'));
+ rio_dprintk (RIO_DEBUG_ROUTE, "MARKING RTA %s (%c) CONNECTED TO %s (%c)\n",
+ HostP->Mapping[NewUnit-1].Name,NewLink+'A',MyName,ThisLink+'A');
HostP->Mapping[NewUnit-1].Topology[NewLink].Unit=ThisUnit;
HostP->Mapping[NewUnit-1].Topology[NewLink].Link=ThisLink;
}
@@ -321,8 +321,8 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
*/
if ( RBYTE(PktCmdP->Command) != ROUTE_REQUEST )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Unknown command %d received on rup %d host %d ROUTE_RUP\n",
- RBYTE(PktCmdP->Command),Rup,(int)HostP));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Unknown command %d received on rup %d host %d ROUTE_RUP\n",
+ RBYTE(PktCmdP->Command),Rup,(int)HostP);
return TRUE;
}
@@ -336,7 +336,7 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
*/
RtaType = GetUnitType(RtaUniq);
- rio_dprint(RIO_DEBUG_ROUTE, ("Received a request for an ID for serial number %x\n", RtaUniq));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Received a request for an ID for serial number %x\n", RtaUniq);
Mod = RBYTE(PktCmdP->ModuleTypes);
Mod1 = LONYBLE(Mod);
@@ -347,14 +347,14 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
** with 8 port, set 2nd ident in Mod2 to the same as Mod1.
*/
Mod2 = Mod1;
- rio_dprint(RIO_DEBUG_ROUTE, ("Backplane type is %s (all ports)\n",
- p->RIOModuleTypes[Mod1].Name ));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Backplane type is %s (all ports)\n",
+ p->RIOModuleTypes[Mod1].Name);
}
else
{
Mod2 = HINYBLE(Mod);
- rio_dprint(RIO_DEBUG_ROUTE, ("Module types are %s (ports 0-3) and %s (ports 4-7)\n",
- p->RIOModuleTypes[Mod1].Name, p->RIOModuleTypes[Mod2].Name ));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Module types are %s (ports 0-3) and %s (ports 4-7)\n",
+ p->RIOModuleTypes[Mod1].Name, p->RIOModuleTypes[Mod2].Name);
}
if ( RtaUniq == 0xffffffff )
@@ -367,7 +367,7 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
*/
if ( !(CmdBlkP = RIOGetCmdBlk()) )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("No command blocks to route RTA! come back later.\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "No command blocks to route RTA! come back later.\n");
return 0;
}
@@ -384,8 +384,8 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
if (! RIOBootOk(p, HostP, RtaUniq))
{
- rio_dprint(RIO_DEBUG_ROUTE, ("RTA %x tried to get an ID, but does not belong - FOAD it!\n",
- RtaUniq));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RTA %x tried to get an ID, but does not belong - FOAD it!\n",
+ RtaUniq);
PktReplyP->Command = ROUTE_FOAD;
HostP->Copy("RT_FOAD", PktReplyP->CommandText, 7);
RIOQueueCmdBlk(HostP, Rup, CmdBlkP);
@@ -397,13 +397,13 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
*/
for ( ThisUnit=0; ThisUnit<MAX_RUP; ThisUnit++ )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Entry %d Flags=%s %s UniqueNum=0x%x\n",
+ rio_dprintk (RIO_DEBUG_ROUTE, "Entry %d Flags=%s %s UniqueNum=0x%x\n",
ThisUnit,
HostP->Mapping[ThisUnit].Flags & SLOT_IN_USE ?
"Slot-In-Use":"Not In Use",
HostP->Mapping[ThisUnit].Flags & SLOT_TENTATIVE ?
"Slot-Tentative":"Not Tentative",
- HostP->Mapping[ThisUnit].RtaUniqueNum ));
+ HostP->Mapping[ThisUnit].RtaUniqueNum);
/*
** We have an entry for it.
@@ -414,12 +414,12 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
if (RtaType == TYPE_RTA16)
{
ThisUnit2 = HostP->Mapping[ThisUnit].ID2 - 1;
- rio_dprint(RIO_DEBUG_ROUTE, ("Found unit 0x%x at slots %d+%d\n",
- RtaUniq,ThisUnit,ThisUnit2));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Found unit 0x%x at slots %d+%d\n",
+ RtaUniq,ThisUnit,ThisUnit2);
}
else
- rio_dprint(RIO_DEBUG_ROUTE, ("Found unit 0x%x at slot %d\n",
- RtaUniq,ThisUnit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Found unit 0x%x at slot %d\n",
+ RtaUniq,ThisUnit);
/*
** If we have no knowledge of booting it, then the host has
** been re-booted, and so we must kill the RTA, so that it
@@ -458,14 +458,14 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
*/
RIOFixPhbs(p, HostP, ThisUnit2);
PktReplyP->IDNum2 = ThisUnit2+1;
- rio_dprint(RIO_DEBUG_ROUTE, ("RTA '%s' has been allocated IDs %d+%d\n",
- HostP->Mapping[ThisUnit].Name, PktReplyP->IDNum, PktReplyP->IDNum2));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RTA '%s' has been allocated IDs %d+%d\n",
+ HostP->Mapping[ThisUnit].Name, PktReplyP->IDNum, PktReplyP->IDNum2);
}
else
{
PktReplyP->IDNum2 = ROUTE_NO_ID;
- rio_dprint(RIO_DEBUG_ROUTE, ("RTA '%s' has been allocated ID %d\n",
- HostP->Mapping[ThisUnit].Name,PktReplyP->IDNum));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RTA '%s' has been allocated ID %d\n",
+ HostP->Mapping[ThisUnit].Name,PktReplyP->IDNum);
}
HostP->Copy("RT_ALLOCAT",PktReplyP->CommandText,10);
@@ -489,7 +489,7 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
PortP = p->RIOPortp[port+HostP->Mapping[ThisUnit].SysPort];
if ( PortP->State & (RIO_MOPEN|RIO_LOPEN) )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Re-opened this port\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Re-opened this port\n");
rio_spin_lock_irqsave(&PortP->portSem, flags);
PortP->MagicFlags |= MAGIC_REBOOT;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
@@ -502,7 +502,7 @@ int RIORouteRup( struct rio_info *p, uint Rup, struct Host *HostP, PKT *PacketP
PortP = p->RIOPortp[port+HostP->Mapping[ThisUnit2].SysPort];
if ( PortP->State & (RIO_MOPEN|RIO_LOPEN) )
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Re-opened this port\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Re-opened this port\n");
rio_spin_lock_irqsave(&PortP->portSem, flags);
PortP->MagicFlags |= MAGIC_REBOOT;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
@@ -628,7 +628,7 @@ uint unit;
unsigned long flags;
int PortN = HostP->Mapping[unit].SysPort;
- rio_dprint(RIO_DEBUG_ROUTE, ("RIOFixPhbs unit %d sysport %d\n", unit, PortN));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RIOFixPhbs unit %d sysport %d\n", unit, PortN);
if (PortN != -1) {
ushort dest_unit = HostP->Mapping[unit].ID2;
@@ -656,7 +656,7 @@ uint unit;
** unset, so go no further.
*/
if (PortP->TxStart == 0) {
- rio_dprint(RIO_DEBUG_ROUTE, ("Tx pkts not set up yet\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Tx pkts not set up yet\n");
break;
}
@@ -691,10 +691,10 @@ uint unit;
WBYTE(Pkt->dest_unit, dest_unit);
WBYTE(Pkt->dest_port, dest_port);
}
- rio_dprint(RIO_DEBUG_ROUTE, ("phb dest: Old %x:%x New %x:%x\n",
+ rio_dprintk (RIO_DEBUG_ROUTE, "phb dest: Old %x:%x New %x:%x\n",
RWORD(PortP->PhbP->destination) & 0xff,
(RWORD(PortP->PhbP->destination) >> 8) & 0xff,
- dest_unit, dest_port));
+ dest_unit, dest_port);
WWORD(PortP->PhbP->destination, dest_unit + (dest_port << 8));
WWORD(PortP->PhbP->link, link);
@@ -706,7 +706,7 @@ uint unit;
*/
if (link > 3) return;
if (((unit * 8) + 7) > RWORD(HostP->LinkStrP[link].last_port)) {
- rio_dprint(RIO_DEBUG_ROUTE, ("last port on host link %d: %d\n", link, (unit * 8) + 7));
+ rio_dprintk (RIO_DEBUG_ROUTE, "last port on host link %d: %d\n", link, (unit * 8) + 7);
WWORD(HostP->LinkStrP[link].last_port, (unit * 8) + 7);
}
}
@@ -732,7 +732,7 @@ uint UnitId;
CheckUnitId( UnitId );
#endif
if ( RIOCheck( HostP, UnitId ) ) {
- rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d is NOT isolated\n",UnitId));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Unit %d is NOT isolated\n", UnitId);
rio_spin_unlock_irqrestore(&HostP->HostLock, flags);
return(0);
}
@@ -771,7 +771,7 @@ uint UnitId;
HostP->Mapping[UnitId].Flags |= BEEN_HERE;
if ( p->RIOPrintDisabled == DO_PRINT )
- rio_dprint(RIO_DEBUG_ROUTE, ("RIOMesgIsolated %s",HostP->Mapping[UnitId].Name));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RIOMesgIsolated %s", HostP->Mapping[UnitId].Name);
for ( link=0; link<LINKS_PER_UNIT; link++) {
unit = HostP->Mapping[UnitId].Topology[link].Unit;
@@ -795,7 +795,7 @@ uint UnitId;
CheckUnitId( UnitId );
#endif
/* rio_dprint(RIO_DEBUG_ROUTE, ("Check to see if unit %d has a route to the host\n",UnitId)); */
- rio_dprint(RIO_DEBUG_ROUTE, ("RIOCheck : UnitID = %d\n",UnitId));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RIOCheck : UnitID = %d\n", UnitId);
if ( UnitId == HOST_ID ) {
/* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d is NOT isolated - it IS the host!\n", UnitId)); */
@@ -854,16 +854,16 @@ uint Uniq;
case RIO_MCA:
case RIO_EISA:
case RIO_PCI:
- rio_dprint(RIO_DEBUG_ROUTE, ("Unit type: Host\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Unit type: Host\n");
return(TYPE_HOST);
case RIO_RTA_16:
- rio_dprint(RIO_DEBUG_ROUTE, ("Unit type: 16 port RTA\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Unit type: 16 port RTA\n");
return(TYPE_RTA16);
case RIO_RTA:
- rio_dprint(RIO_DEBUG_ROUTE, ("Unit type: 8 port RTA\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Unit type: 8 port RTA\n");
return(TYPE_RTA8);
default :
- rio_dprint(RIO_DEBUG_ROUTE, ("Unit type: Unrecognised\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Unit type: Unrecognised\n");
return(99);
}
}
@@ -876,7 +876,7 @@ struct rio_info * p;
return(0);
p->RIOQuickCheck = CHANGED;
if ( p->RIOSignalProcess ) {
- rio_dprint(RIO_DEBUG_ROUTE, ("Send SIG-HUP"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Send SIG-HUP");
/*
psignal( RIOSignalProcess, SIGHUP );
*/
@@ -951,10 +951,10 @@ int Change;
ToName = ToId ? HostP->Mapping[ToId-1].Name : HostP->Name;
ToType = ToId ? "RTA" : "HOST";
- rio_dprint(RIO_DEBUG_ROUTE, ("Link between %s '%s' (%c) and %s '%s' (%c) %s.\n",
+ rio_dprintk (RIO_DEBUG_ROUTE, "Link between %s '%s' (%c) and %s '%s' (%c) %s.\n",
FromType, FromName, 'A'+FromLink,
ToType, ToName, 'A'+ToLink,
- (Change==CONNECT) ? "established" : "disconnected"));
+ (Change==CONNECT) ? "established" : "disconnected");
cprintf("Link between %s '%s' (%c) and %s '%s' (%c) %s.\n",
FromType, FromName, 'A'+FromLink,
ToType, ToName, 'A'+ToLink,
@@ -1000,7 +1000,7 @@ RIOFreeDisconnected(struct rio_info *p, struct Host *HostP, int unit)
int link;
- rio_dprint(RIO_DEBUG_ROUTE, ("RIOFreeDisconnect unit %d\n",unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RIOFreeDisconnect unit %d\n", unit);
/*
** If the slot is tentative and does not belong to the
** second half of a 16 port RTA then scan to see if
@@ -1023,17 +1023,17 @@ RIOFreeDisconnected(struct rio_info *p, struct Host *HostP, int unit)
** made this slot tentative and not yet received a topology update.
** Lets check how long ago we made it tentative.
*/
- rio_dprint(RIO_DEBUG_ROUTE, ("Just about to check LBOLT on entry %d\n",unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Just about to check LBOLT on entry %d\n", unit);
if (drv_getparm(LBOLT, (ulong_t *) &current_time))
- rio_dprint(RIO_DEBUG_ROUTE, ("drv_getparm(LBOLT,....) Failed.\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "drv_getparm(LBOLT,....) Failed.\n");
elapse_time = current_time - TentTime[unit];
- rio_dprint(RIO_DEBUG_ROUTE, ("elapse %d = current %d - tent %d (%d usec)\n",
- elapse_time, current_time, TentTime[unit],drv_hztousec(elapse_time)));
+ rio_dprintk (RIO_DEBUG_ROUTE, "elapse %d = current %d - tent %d (%d usec)\n",
+ elapse_time, current_time, TentTime[unit], drv_hztousec(elapse_time));
if (drv_hztousec(elapse_time) < WAIT_TO_FINISH)
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Skipping slot %d, not timed out yet %d\n"
- ,unit,drv_hztousec(elapse_time)));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Skipping slot %d, not timed out yet %d\n",
+ unit, drv_hztousec(elapse_time));
return 1;
}
#endif
@@ -1046,7 +1046,7 @@ RIOFreeDisconnected(struct rio_info *p, struct Host *HostP, int unit)
{
int nOther = (HostP->Mapping[unit].ID2) -1;
- rio_dprint(RIO_DEBUG_ROUTE, ("RioFreedis second slot %d.\n",nOther));
+ rio_dprintk (RIO_DEBUG_ROUTE, "RioFreedis second slot %d.\n", nOther);
bzero((caddr_t)&HostP->Mapping[nOther], sizeof(struct Map));
}
RIORemoveFromSavedTable(p, &HostP->Mapping[unit]);
@@ -1082,19 +1082,19 @@ RIOFindFreeID(struct rio_info *p, struct Host *HostP, uint *pID1, uint *pID2)
*/
for (unit = 0; unit < MAX_RUP; unit++)
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Scanning unit %d\n",unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Scanning unit %d\n",unit);
/*
** If the flags are zero then the slot is empty.
*/
if (HostP->Mapping[unit].Flags == 0)
{
- rio_dprint(RIO_DEBUG_ROUTE, (" This slot is empty.\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, " This slot is empty.\n");
/*
** If we haven't allocated the first ID then do it now.
*/
if (*pID1 == MAX_RUP)
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Make tentative entry for first unit %d\n", unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Make tentative entry for first unit %d\n", unit);
*pID1 = unit;
/*
@@ -1109,7 +1109,7 @@ RIOFindFreeID(struct rio_info *p, struct Host *HostP, uint *pID1, uint *pID2)
/*
** Allocate the second slot and return.
*/
- rio_dprint(RIO_DEBUG_ROUTE, ("Make tentative entry for second unit %d\n", unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Make tentative entry for second unit %d\n", unit);
*pID2 = unit;
return 0;
}
@@ -1121,18 +1121,18 @@ RIOFindFreeID(struct rio_info *p, struct Host *HostP, uint *pID1, uint *pID2)
** need to start all over again looking for tentative slots
** that we can re-use.
*/
- rio_dprint(RIO_DEBUG_ROUTE, ("Starting to scan for tentative slots\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Starting to scan for tentative slots\n");
for (unit = 0; unit < MAX_RUP; unit++)
{
if (((HostP->Mapping[unit].Flags & SLOT_TENTATIVE) ||
(HostP->Mapping[unit].Flags == 0)) && !
(HostP->Mapping[unit].Flags & RTA16_SECOND_SLOT ))
{
- rio_dprint(RIO_DEBUG_ROUTE, (" Slot %d looks promising.\n",unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, " Slot %d looks promising.\n",unit);
if(unit == *pID1)
{
- rio_dprint(RIO_DEBUG_ROUTE, (" No it isn't, its the 1st half\n"));
+ rio_dprintk (RIO_DEBUG_ROUTE, " No it isn't, its the 1st half\n");
continue;
}
@@ -1152,7 +1152,7 @@ RIOFindFreeID(struct rio_info *p, struct Host *HostP, uint *pID1, uint *pID2)
*/
if (*pID1 == MAX_RUP)
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Grab tentative entry for first unit %d\n", unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Grab tentative entry for first unit %d\n", unit);
*pID1 = unit;
/*
@@ -1172,8 +1172,8 @@ RIOFindFreeID(struct rio_info *p, struct Host *HostP, uint *pID1, uint *pID2)
/*
** Allocate the second slot and return.
*/
- rio_dprint(RIO_DEBUG_ROUTE, ("Grab tentative/empty entry for second unit %d\n",
- unit));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Grab tentative/empty entry for second unit %d\n",
+ unit);
*pID2 = unit;
/*
@@ -1190,7 +1190,7 @@ RIOFindFreeID(struct rio_info *p, struct Host *HostP, uint *pID1, uint *pID2)
if (*pID1 > *pID2)
{
- rio_dprint(RIO_DEBUG_ROUTE, ("Swapping IDS %d %d\n",*pID1,*pID2));
+ rio_dprintk (RIO_DEBUG_ROUTE, "Swapping IDS %d %d\n", *pID1, *pID2);
tempID = *pID1;
*pID1 = *pID2;
*pID2 = tempID;
diff --git a/drivers/char/rio/riotable.c b/drivers/char/rio/riotable.c
index 6329a6e18..2b82c25ad 100644
--- a/drivers/char/rio/riotable.c
+++ b/drivers/char/rio/riotable.c
@@ -120,7 +120,7 @@ struct rio_info * p;
** (9) That names aren't duplicated
** xx (10) That hosts that actually exist are mentioned in the table. xx
*/
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(1)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(1)\n");
if ( p->RIOSystemUp ) { /* (1) */
p->RIOError.Error = HOST_HAS_ALREADY_BEEN_BOOTED;
return EBUSY;
@@ -133,7 +133,7 @@ struct rio_info * p;
for ( Entry=0; Entry<TOTAL_MAP_ENTRIES; Entry++ ) {
MapP = &p->RIOConnectTable[Entry];
if ((MapP->Flags & RTA16_SECOND_SLOT) == 0) {
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(2)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(2)\n");
cptr = MapP->Name; /* (2) */
cptr[MAX_NAME_LEN-1]='\0';
if ( cptr[0]=='\0' ) {
@@ -161,19 +161,19 @@ struct rio_info * p;
continue;
}
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(3)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(3)\n");
if ( !MapP->RtaUniqueNum && !MapP->HostUniqueNum ) { /* (3) */
if ( MapP->ID || MapP->SysPort || MapP->Flags ) {
- rio_dprint(RIO_DEBUG_TABLE, ("%s pretending to be empty but isn't\n",MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "%s pretending to be empty but isn't\n",MapP->Name);
p->RIOError.Error = TABLE_ENTRY_ISNT_PROPERLY_NULL;
p->RIOError.Entry = Entry;
return ENXIO;
}
- rio_dprint(RIO_DEBUG_TABLE, ("!RIO: Daemon: test (3) passes\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "!RIO: Daemon: test (3) passes\n");
continue;
}
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(4)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(4)\n");
for ( Host=0; Host<p->RIONumHosts; Host++ ) { /* (4) */
if ( p->RIOHosts[Host].UniqueNum==MapP->HostUniqueNum ) {
HostP = &p->RIOHosts[Host];
@@ -187,8 +187,8 @@ struct rio_info * p;
}
if ( Host >= p->RIONumHosts ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RTA %s has unknown host unique number 0x%x\n",
- MapP->Name,MapP->HostUniqueNum));
+ rio_dprintk (RIO_DEBUG_TABLE, "RTA %s has unknown host unique number 0x%x\n",
+ MapP->Name, MapP->HostUniqueNum);
MapP->HostUniqueNum = 0;
/* MapP->RtaUniqueNum = 0; */
/* MapP->ID = 0; */
@@ -198,18 +198,18 @@ struct rio_info * p;
continue;
}
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(5)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(5)\n");
if ( MapP->RtaUniqueNum ) { /* (5) */
if ( !MapP->ID ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RIO: RTA %s has been allocated an ID of zero!\n",
- MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIO: RTA %s has been allocated an ID of zero!\n",
+ MapP->Name);
p->RIOError.Error = ZERO_RTA_ID;
p->RIOError.Entry = Entry;
return ENXIO;
}
if ( MapP->ID > MAX_RUP ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RIO: RTA %s has been allocated an illegal ID %d\n",
- MapP->Name, MapP->ID));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIO: RTA %s has been allocated an illegal ID %d\n",
+ MapP->Name, MapP->ID);
p->RIOError.Error = ID_NUMBER_OUT_OF_RANGE;
p->RIOError.Entry = Entry;
return ENXIO;
@@ -218,8 +218,8 @@ struct rio_info * p;
if ( MapP->HostUniqueNum ==
p->RIOConnectTable[SubEnt].HostUniqueNum &&
MapP->ID == p->RIOConnectTable[SubEnt].ID ) {
- rio_dprint(RIO_DEBUG_TABLE, ("Dupl. ID number allocated to RTA %s and RTA %s\n",
- MapP->Name,p->RIOConnectTable[SubEnt].Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Dupl. ID number allocated to RTA %s and RTA %s\n",
+ MapP->Name, p->RIOConnectTable[SubEnt].Name);
p->RIOError.Error = DUPLICATED_RTA_ID;
p->RIOError.Entry = Entry;
p->RIOError.Other = SubEnt;
@@ -232,29 +232,29 @@ struct rio_info * p;
if ((MapP->RtaUniqueNum ==
p->RIOConnectTable[SubEnt].RtaUniqueNum)
&& (MapP->ID2 != p->RIOConnectTable[SubEnt].ID)) {
- rio_dprint(RIO_DEBUG_TABLE, ("RTA %s has duplicate unique number\n",MapP->Name));
- rio_dprint(RIO_DEBUG_TABLE, ("RTA %s has duplicate unique number\n",
- p->RIOConnectTable[SubEnt].Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "RTA %s has duplicate unique number\n",MapP->Name);
+ rio_dprintk (RIO_DEBUG_TABLE, "RTA %s has duplicate unique number\n",
+ p->RIOConnectTable[SubEnt].Name);
p->RIOError.Error = DUPLICATE_UNIQUE_NUMBER;
p->RIOError.Entry = Entry;
p->RIOError.Other = SubEnt;
return ENXIO;
}
}
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(7a)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(7a)\n");
/* (7a) */
if ((MapP->SysPort != NO_PORT)&&(MapP->SysPort % PORTS_PER_RTA)) {
- rio_dprint(RIO_DEBUG_TABLE, ("TTY Port number %d-RTA %s is not a multiple of %d!\n",
- (int)MapP->SysPort,MapP->Name,PORTS_PER_RTA));
+ rio_dprintk (RIO_DEBUG_TABLE, "TTY Port number %d-RTA %s is not a multiple of %d!\n",
+ (int)MapP->SysPort,MapP->Name, PORTS_PER_RTA);
p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
p->RIOError.Entry = Entry;
return ENXIO;
}
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(7b)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(7b)\n");
/* (7b) */
if ((MapP->SysPort != NO_PORT)&&(MapP->SysPort >= RIO_PORTS)) {
- rio_dprint(RIO_DEBUG_TABLE, ("TTY Port number %d for RTA %s is too big\n",
- (int)MapP->SysPort,MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "TTY Port number %d for RTA %s is too big\n",
+ (int)MapP->SysPort, MapP->Name);
p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
p->RIOError.Entry = Entry;
return ENXIO;
@@ -263,22 +263,22 @@ struct rio_info * p;
if ( p->RIOConnectTable[SubEnt].Flags & RTA16_SECOND_SLOT )
continue;
if ( p->RIOConnectTable[SubEnt].RtaUniqueNum ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(8)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(8)\n");
/* (8) */
if ( (MapP->SysPort != NO_PORT) && (MapP->SysPort ==
p->RIOConnectTable[SubEnt].SysPort) ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RTA %s:same TTY port # as RTA %s (%d)\n",
+ rio_dprintk (RIO_DEBUG_TABLE, "RTA %s:same TTY port # as RTA %s (%d)\n",
MapP->Name, p->RIOConnectTable[SubEnt].Name,
- (int)MapP->SysPort));
+ (int)MapP->SysPort);
p->RIOError.Error = TTY_NUMBER_IN_USE;
p->RIOError.Entry = Entry;
p->RIOError.Other = SubEnt;
return ENXIO;
}
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(9)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(9)\n");
if (RIOStrCmp(MapP->Name,
p->RIOConnectTable[SubEnt].Name)==0 && !(MapP->Flags & RTA16_SECOND_SLOT)) { /* (9) */
- rio_dprint(RIO_DEBUG_TABLE, ("RTA name %s used twice\n",MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "RTA name %s used twice\n", MapP->Name);
p->RIOError.Error = NAME_USED_TWICE;
p->RIOError.Entry = Entry;
p->RIOError.Other = SubEnt;
@@ -288,17 +288,17 @@ struct rio_info * p;
}
}
else { /* (6) */
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(6)\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(6)\n");
if ( MapP->ID ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RIO:HOST %s has been allocated ID that isn't zero!\n",
- MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIO:HOST %s has been allocated ID that isn't zero!\n",
+ MapP->Name);
p->RIOError.Error = HOST_ID_NOT_ZERO;
p->RIOError.Entry = Entry;
return ENXIO;
}
if ( MapP->SysPort != NO_PORT ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RIO: HOST %s has been allocated port numbers!\n",
- MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIO: HOST %s has been allocated port numbers!\n",
+ MapP->Name);
p->RIOError.Error = HOST_SYSPORT_BAD;
p->RIOError.Entry = Entry;
return ENXIO;
@@ -326,7 +326,7 @@ struct rio_info * p;
** Copy in the new table entries
*/
for ( Entry=0; Entry< TOTAL_MAP_ENTRIES; Entry++ ) {
- rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: Copy table for Host entry %d\n", Entry));
+ rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: Copy table for Host entry %d\n", Entry);
MapP = &p->RIOConnectTable[Entry];
/*
@@ -344,7 +344,7 @@ struct rio_info * p;
** If it is a host, then we only need to fill in the name field.
*/
if ( MapP->ID==0 ) {
- rio_dprint(RIO_DEBUG_TABLE, ("Host entry found. Name %s\n",MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Host entry found. Name %s\n", MapP->Name);
bcopy(MapP->Name,HostP->Name,MAX_NAME_LEN);
continue;
}
@@ -357,7 +357,7 @@ struct rio_info * p;
HostMapP = &HostP->Mapping[MapP->ID-1];
if (MapP->Flags & SLOT_IN_USE) {
- rio_dprint(RIO_DEBUG_TABLE, ("Rta entry found. Name %s\n",MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Rta entry found. Name %s\n", MapP->Name);
/*
** structure assign, then sort out the bits we shouldn't have done
*/
@@ -370,7 +370,7 @@ struct rio_info * p;
RIOReMapPorts(p, HostP, HostMapP );
}
else {
- rio_dprint(RIO_DEBUG_TABLE, ("TENTATIVE Rta entry found. Name %s\n",MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "TENTATIVE Rta entry found. Name %s\n", MapP->Name);
}
}
@@ -420,11 +420,11 @@ struct rio_info * p;
*/
if (Host1 != Host)
{
- rio_dprint(RIO_DEBUG_TABLE, ("Default name %s already used\n", p->RIOHosts[Host].Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Default name %s already used\n", p->RIOHosts[Host].Name);
bcopy("HOST 1",p->RIOHosts[Host].Name,7);
p->RIOHosts[Host].Name[5] += Host1;
}
- rio_dprint(RIO_DEBUG_TABLE, ("Assigning default name %s\n", p->RIOHosts[Host].Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Assigning default name %s\n", p->RIOHosts[Host].Name);
}
return 0;
}
@@ -447,13 +447,13 @@ struct rio_info * p;
disable(oldspl); /* strange but true! */
- rio_dprint(RIO_DEBUG_TABLE, ("Generating a table to return to config.rio\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Generating a table to return to config.rio\n");
bzero((caddr_t)&p->RIOConnectTable[0],
sizeof(struct Map) * TOTAL_MAP_ENTRIES );
for ( Host=0; Host<RIO_HOSTS; Host++ ) {
- rio_dprint(RIO_DEBUG_TABLE, ("Processing host %d\n", Host));
+ rio_dprintk (RIO_DEBUG_TABLE, "Processing host %d\n", Host);
HostP = &p->RIOHosts[Host];
MapP = &p->RIOConnectTable[Next++];
MapP->HostUniqueNum = HostP->UniqueNum;
@@ -501,8 +501,8 @@ struct Map *MapP;
int work_done = 0;
unsigned long flags;
- rio_dprint(RIO_DEBUG_TABLE, ("Delete entry on host %x, rta %x\n",
- MapP->HostUniqueNum,MapP->RtaUniqueNum));
+ rio_dprintk (RIO_DEBUG_TABLE, "Delete entry on host %x, rta %x\n",
+ MapP->HostUniqueNum, MapP->RtaUniqueNum);
for ( host=0; host < p->RIONumHosts; host++ ) {
HostP = &p->RIOHosts[host];
@@ -517,15 +517,15 @@ struct Map *MapP;
for ( entry=0; entry<MAX_RUP; entry++ ) {
if ( MapP->RtaUniqueNum == HostP->Mapping[entry].RtaUniqueNum ) {
HostMapP = &HostP->Mapping[entry];
- rio_dprint(RIO_DEBUG_TABLE, ("Found entry offset %d on host %s\n",
- entry,HostP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Found entry offset %d on host %s\n",
+ entry, HostP->Name);
/*
** Check all four links of the unit are disconnected
*/
for ( link=0; link< LINKS_PER_UNIT; link++ ) {
if ( HostMapP->Topology[link].Unit != ROUTE_DISCONNECT ) {
- rio_dprint(RIO_DEBUG_TABLE, ("Entry is in use and cannot be deleted!\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Entry is in use and cannot be deleted!\n");
p->RIOError.Error = UNIT_IS_IN_USE;
rio_spin_unlock_irqrestore( &HostP->HostLock, flags);
return EBUSY;
@@ -540,7 +540,7 @@ struct Map *MapP;
if ( SysPort != NO_PORT ) {
for (port=SysPort; port < SysPort+PORTS_PER_RTA; port++) {
PortP = p->RIOPortp[port];
- rio_dprint(RIO_DEBUG_TABLE, ("Unmap port\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Unmap port\n");
rio_spin_lock_irqsave( &PortP->portSem, flags );
@@ -548,7 +548,7 @@ struct Map *MapP;
if ( PortP->State & (RIO_MOPEN|RIO_LOPEN) ) {
- rio_dprint(RIO_DEBUG_TABLE, ("Gob on port\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Gob on port\n");
PortP->TxBufferIn = PortP->TxBufferOut = 0;
/* What should I do
wakeup( &PortP->TxBufferIn );
@@ -585,25 +585,25 @@ struct Map *MapP;
*/
Pkt = (PKT *) RIO_PTR(HostP->Caddr,
RWORD(*TxPktP));
- rio_dprint(RIO_DEBUG_TABLE, (
+ rio_dprintk (RIO_DEBUG_TABLE,
"Tx packet (%x) destination: Old %x:%x New %x:%x\n",
*TxPktP, Pkt->dest_unit,
- Pkt->dest_port, dest_unit, dest_port));
+ Pkt->dest_port, dest_unit, dest_port);
WWORD(Pkt->dest_unit, dest_unit);
WWORD(Pkt->dest_port, dest_port);
}
- rio_dprint(RIO_DEBUG_TABLE, (
+ rio_dprintk (RIO_DEBUG_TABLE,
"Port %d phb destination: Old %x:%x New %x:%x\n",
port, PortP->PhbP->destination & 0xff,
(PortP->PhbP->destination >> 8) & 0xff,
- dest_unit, dest_port));
+ dest_unit, dest_port);
WWORD(PortP->PhbP->destination,
dest_unit + (dest_port << 8));
}
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
}
}
- rio_dprint(RIO_DEBUG_TABLE, ("Entry nulled.\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Entry nulled.\n");
bzero((char *)HostMapP,sizeof(struct Map));
work_done++;
}
@@ -625,7 +625,7 @@ struct Map *MapP;
if ( work_done )
return 0;
- rio_dprint(RIO_DEBUG_TABLE, ("Couldn't find entry to be deleted\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Couldn't find entry to be deleted\n");
p->RIOError.Error = COULDNT_FIND_ENTRY;
return ENXIO;
}
@@ -638,32 +638,32 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
int link;
- rio_dprint(RIO_DEBUG_TABLE, ("Assign entry on host %x, rta %x, ID %d, Sysport %d\n",
+ rio_dprintk (RIO_DEBUG_TABLE, "Assign entry on host %x, rta %x, ID %d, Sysport %d\n",
MapP->HostUniqueNum,MapP->RtaUniqueNum,
- MapP->ID, (int)MapP->SysPort ));
+ MapP->ID, (int)MapP->SysPort);
if ((MapP->ID != (ushort)-1) &&
((int)MapP->ID < (int)1 || (int)MapP->ID > MAX_RUP ))
{
- rio_dprint(RIO_DEBUG_TABLE, ("Bad ID in map entry!\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Bad ID in map entry!\n");
p->RIOError.Error = ID_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
if (MapP->RtaUniqueNum == 0)
{
- rio_dprint(RIO_DEBUG_TABLE, ("Rta Unique number zero!\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Rta Unique number zero!\n");
p->RIOError.Error = RTA_UNIQUE_NUMBER_ZERO;
return EINVAL;
}
if ( (MapP->SysPort != NO_PORT) && (MapP->SysPort % PORTS_PER_RTA) )
{
- rio_dprint(RIO_DEBUG_TABLE, ("Port %d not multiple of %d!\n",(int)MapP->SysPort,PORTS_PER_RTA));
+ rio_dprintk (RIO_DEBUG_TABLE, "Port %d not multiple of %d!\n",(int)MapP->SysPort,PORTS_PER_RTA);
p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
if ( (MapP->SysPort != NO_PORT) && (MapP->SysPort >= RIO_PORTS) )
{
- rio_dprint(RIO_DEBUG_TABLE, ("Port %d not valid!\n",(int)MapP->SysPort));
+ rio_dprintk (RIO_DEBUG_TABLE, "Port %d not valid!\n",(int)MapP->SysPort);
p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
@@ -677,7 +677,7 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
{
if ( *sptr<' ' || *sptr>'~' )
{
- rio_dprint(RIO_DEBUG_TABLE, ("Name entry contains non-printing characters!\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Name entry contains non-printing characters!\n");
p->RIOError.Error = BAD_CHARACTER_IN_NAME;
return EINVAL;
}
@@ -702,8 +702,8 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
{
int nNewID;
- rio_dprint(RIO_DEBUG_TABLE, ("Attempting to get a new ID for rta \"%s\"\n",
- MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Attempting to get a new ID for rta \"%s\"\n",
+ MapP->Name);
/*
** The idea here is to allow RTA's to be assigned
** before they actually appear on the network.
@@ -721,7 +721,7 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
return EBUSY;
}
MapP->ID = (ushort)nNewID + 1;
- rio_dprint(RIO_DEBUG_TABLE, ("Allocated ID %d for this new RTA.\n",MapP->ID));
+ rio_dprintk (RIO_DEBUG_TABLE, "Allocated ID %d for this new RTA.\n", MapP->ID);
HostMapP = &p->RIOHosts[host].Mapping[nNewID];
HostMapP->RtaUniqueNum = MapP->RtaUniqueNum;
HostMapP->HostUniqueNum = MapP->HostUniqueNum;
@@ -747,9 +747,9 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
HostMapP->Flags |= RTA16_SECOND_SLOT;
HostMapP->ID2 = MapP->ID2 = p->RIOHosts[host].Mapping[unit].ID;
p->RIOHosts[host].Mapping[unit].ID2 = MapP->ID;
- rio_dprint(RIO_DEBUG_TABLE, ("Cross referenced id %d to ID %d.\n",
+ rio_dprintk (RIO_DEBUG_TABLE, "Cross referenced id %d to ID %d.\n",
MapP->ID,
- p->RIOHosts[host].Mapping[unit].ID));
+ p->RIOHosts[host].Mapping[unit].ID);
}
}
@@ -757,7 +757,7 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
if ( HostMapP->Flags & SLOT_IN_USE )
{
- rio_dprint(RIO_DEBUG_TABLE, ("Map table slot for ID %d is already in use.\n",MapP->ID));
+ rio_dprintk (RIO_DEBUG_TABLE, "Map table slot for ID %d is already in use.\n", MapP->ID);
p->RIOError.Error = ID_ALREADY_IN_USE;
return EBUSY;
}
@@ -791,15 +791,15 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
p->RIOLastPortsBooted = HostMapP->SysPort;
}
if (MapP->Flags & RTA16_SECOND_SLOT)
- rio_dprint(RIO_DEBUG_TABLE, ("Second map of RTA %s added to configuration\n",
- p->RIOHosts[host].Mapping[MapP->ID2 - 1].Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "Second map of RTA %s added to configuration\n",
+ p->RIOHosts[host].Mapping[MapP->ID2 - 1].Name);
else
- rio_dprint(RIO_DEBUG_TABLE, ("RTA %s added to configuration\n",MapP->Name));
+ rio_dprintk (RIO_DEBUG_TABLE, "RTA %s added to configuration\n", MapP->Name);
return 0;
}
}
p->RIOError.Error = UNKNOWN_HOST_NUMBER;
- rio_dprint(RIO_DEBUG_TABLE, ("Unknown host %x\n",MapP->HostUniqueNum));
+ rio_dprintk (RIO_DEBUG_TABLE, "Unknown host %x\n", MapP->HostUniqueNum);
return ENXIO;
}
@@ -822,7 +822,7 @@ struct Map *HostMapP;
CheckHostMapP( HostMapP );
#endif
- rio_dprint(RIO_DEBUG_TABLE, ("Mapping sysport %d to id %d\n",(int)HostMapP->SysPort, HostMapP->ID));
+ rio_dprintk (RIO_DEBUG_TABLE, "Mapping sysport %d to id %d\n", (int)HostMapP->SysPort, HostMapP->ID);
/*
** We need to tell the UnixRups which sysport the rup corresponds to
@@ -833,26 +833,26 @@ struct Map *HostMapP;
return(0);
RtaType = GetUnitType(HostMapP->RtaUniqueNum);
- rio_dprint(RIO_DEBUG_TABLE, ("Mapping sysport %d-%d\n",
- (int)HostMapP->SysPort,(int)HostMapP->SysPort+PORTS_PER_RTA-1));
+ rio_dprintk (RIO_DEBUG_TABLE, "Mapping sysport %d-%d\n",
+ (int)HostMapP->SysPort, (int)HostMapP->SysPort+PORTS_PER_RTA-1);
/*
** now map each of its eight ports
*/
for ( SubEnt=0; SubEnt<PORTS_PER_RTA; SubEnt++) {
- rio_dprint (RIO_DEBUG_TABLE, ("subent = %d, HostMapP->SysPort = %d\n",
- SubEnt, (int) HostMapP->SysPort));
+ rio_dprintk (RIO_DEBUG_TABLE, "subent = %d, HostMapP->SysPort = %d\n",
+ SubEnt, (int)HostMapP->SysPort);
SysPort = HostMapP->SysPort+SubEnt; /* portnumber within system */
/* portnumber on host */
HostPort = (HostMapP->ID-1)*PORTS_PER_RTA+SubEnt;
- rio_dprint (RIO_DEBUG_TABLE, ("c1 p = %p, p->rioPortp = %p\n", p, p->RIOPortp));
+ rio_dprintk (RIO_DEBUG_TABLE, "c1 p = %p, p->rioPortp = %p\n", p, p->RIOPortp);
PortP = p->RIOPortp[SysPort];
#if 0
PortP->TtyP = &p->channel[SysPort];
#endif
- rio_dprint(RIO_DEBUG_TABLE, ("Map port\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Map port\n");
/*
** Point at all the real neat data structures
@@ -1008,12 +1008,12 @@ struct Map* MapP;
struct Map *HostMapP;
char *sptr;
- rio_dprint(RIO_DEBUG_TABLE, ("Change name entry on host %x, rta %x, ID %d, Sysport %d\n",
+ rio_dprintk (RIO_DEBUG_TABLE, "Change name entry on host %x, rta %x, ID %d, Sysport %d\n",
MapP->HostUniqueNum,MapP->RtaUniqueNum,
- MapP->ID, (int)MapP->SysPort ));
+ MapP->ID, (int)MapP->SysPort);
if ( MapP->ID > MAX_RUP ) {
- rio_dprint(RIO_DEBUG_TABLE, ("Bad ID in map entry!\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Bad ID in map entry!\n");
p->RIOError.Error = ID_NUMBER_OUT_OF_RANGE;
return EINVAL;
}
@@ -1023,7 +1023,7 @@ struct Map* MapP;
while ( *sptr ) {
if ( *sptr<' ' || *sptr>'~' ) {
- rio_dprint(RIO_DEBUG_TABLE, ("Name entry contains non-printing characters!\n"));
+ rio_dprintk (RIO_DEBUG_TABLE, "Name entry contains non-printing characters!\n");
p->RIOError.Error = BAD_CHARACTER_IN_NAME;
return EINVAL;
}
@@ -1052,6 +1052,6 @@ struct Map* MapP;
}
}
p->RIOError.Error = UNKNOWN_HOST_NUMBER;
- rio_dprint(RIO_DEBUG_TABLE, ("Unknown host %x\n",MapP->HostUniqueNum));
+ rio_dprintk (RIO_DEBUG_TABLE, "Unknown host %x\n", MapP->HostUniqueNum);
return ENXIO;
}
diff --git a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c
index cda417f3f..c9134e3fc 100644
--- a/drivers/char/rio/riotty.c
+++ b/drivers/char/rio/riotty.c
@@ -164,15 +164,15 @@ riotopen(struct tty_struct * tty, struct file * filp)
Modem = rio_ismodem (tty->device);
if ( p->RIOFailed ) {
- rio_dprint(RIO_DEBUG_TTY, ("System initialisation failed\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "System initialisation failed\n");
pseterr(ENXIO);
func_exit ();
return -ENXIO;
}
- rio_dprint(RIO_DEBUG_TTY, ("port open SysPort %d (%s) (mapped:%d)\n",
+ rio_dprintk (RIO_DEBUG_TTY, "port open SysPort %d (%s) (mapped:%d)\n",
SysPort, Modem ? "Modem" : "tty",
- p->RIOPortp[SysPort]->Mapped ) );
+ p->RIOPortp[SysPort]->Mapped);
/*
** Validate that we have received a legitimate request.
@@ -181,7 +181,7 @@ riotopen(struct tty_struct * tty, struct file * filp)
** has been mapped onto a host.
*/
if (SysPort >= RIO_PORTS) { /* out of range ? */
- rio_dprint(RIO_DEBUG_TTY, ("Illegal port number %d\n",SysPort));
+ rio_dprintk (RIO_DEBUG_TTY, "Illegal port number %d\n",SysPort);
pseterr(ENXIO);
func_exit();
return -ENXIO;
@@ -197,7 +197,7 @@ riotopen(struct tty_struct * tty, struct file * filp)
** The system doesn't know which RTA this port
** corresponds to.
*/
- rio_dprint(RIO_DEBUG_TTY, ("port not mapped into system\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "port not mapped into system\n");
func_exit ();
pseterr(ENXIO);
return -ENXIO;
@@ -206,17 +206,26 @@ riotopen(struct tty_struct * tty, struct file * filp)
tty->driver_data = PortP;
PortP->gs.tty = tty;
+ if (!PortP->gs.count)
+ rio_inc_mod_count ();
PortP->gs.count++;
- rio_dprint(RIO_DEBUG_TTY, ("%d bytes in tx buffer\n",
- PortP->gs.xmit_cnt));
- gs_init_port (&PortP->gs);
+ rio_dprintk (RIO_DEBUG_TTY, "%d bytes in tx buffer\n",
+ PortP->gs.xmit_cnt);
+
+ retval = gs_init_port (&PortP->gs);
+ if (retval) {
+ PortP->gs.count--;
+ if (PortP->gs.count)
+ rio_dec_mod_count ();
+ return -ENXIO;
+ }
/*
** If the host hasn't been booted yet, then
** fail
*/
if ( (PortP->HostP->Flags & RUN_STATE) != RC_RUNNING ) {
- rio_dprint(RIO_DEBUG_TTY, ("Host not running\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Host not running\n");
pseterr(ENXIO);
func_exit ();
return -ENXIO;
@@ -230,24 +239,24 @@ riotopen(struct tty_struct * tty, struct file * filp)
#if 0
if (!(PortP->HostP->Mapping[PortP->RupNum].Flags & RTA_BOOTED)) {
if (PortP->WaitUntilBooted) {
- rio_dprint(RIO_DEBUG_TTY, ("Waiting for RTA to boot\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Waiting for RTA to boot\n");
do {
if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
- rio_dprint(RIO_DEBUG_TTY, ("RTA EINTR in delay \n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RTA EINTR in delay \n");
func_exit ();
return -EINTR;
}
if (repeat_this -- <= 0) {
- rio_dprint(RIO_DEBUG_TTY, ("Waiting for RTA to boot timeout\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Waiting for RTA to boot timeout\n");
RIOPreemptiveCmd(p, PortP, FCLOSE );
pseterr(EINTR);
func_exit ();
return -EIO;
}
} while(!(PortP->HostP->Mapping[PortP->RupNum].Flags & RTA_BOOTED));
- rio_dprint(RIO_DEBUG_TTY, ("RTA has been booted\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RTA has been booted\n");
} else {
- rio_dprint(RIO_DEBUG_TTY, ("RTA never booted\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RTA never booted\n");
pseterr(ENXIO);
func_exit ();
return 0;
@@ -258,10 +267,10 @@ riotopen(struct tty_struct * tty, struct file * filp)
easier to read and shorter. Now, if it works too that would
be great... -- REW
*/
- rio_dprint(RIO_DEBUG_TTY, ("Checking if RTA has booted... \n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Checking if RTA has booted... \n");
while (!(PortP->HostP->Mapping[PortP->RupNum].Flags & RTA_BOOTED)) {
if (!PortP->WaitUntilBooted) {
- rio_dprint(RIO_DEBUG_TTY, ("RTA never booted\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RTA never booted\n");
func_exit ();
return -ENXIO;
}
@@ -271,17 +280,17 @@ riotopen(struct tty_struct * tty, struct file * filp)
now. --REW
*/
if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
- rio_dprint(RIO_DEBUG_TTY, ("RTA_wait_for_boot: EINTR in delay \n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RTA_wait_for_boot: EINTR in delay \n");
func_exit ();
return -EINTR;
}
if (repeat_this -- <= 0) {
- rio_dprint(RIO_DEBUG_TTY, ("Waiting for RTA to boot timeout\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Waiting for RTA to boot timeout\n");
func_exit ();
return -EIO;
}
}
- rio_dprint(RIO_DEBUG_TTY, ("RTA has been booted\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RTA has been booted\n");
#endif
#if 0
tp = PortP->TtyP; /* get tty struct */
@@ -304,9 +313,9 @@ riotopen(struct tty_struct * tty, struct file * filp)
** for it to finish, so that it doesn't close us!
*/
while ( (PortP->State & RIO_CLOSING) && !p->RIOHalted ) {
- rio_dprint(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) {
- rio_dprint(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 );
retval = -EINTR;
goto bombout;
@@ -321,7 +330,7 @@ riotopen(struct tty_struct * tty, struct file * filp)
}
if ( !PortP->Mapped ) {
- rio_dprint(RIO_DEBUG_TTY, ("Port unmapped while closing!\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Port unmapped while closing!\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
retval = -ENXIO;
func_exit ();
@@ -344,8 +353,8 @@ riotopen(struct tty_struct * tty, struct file * filp)
}
if (!(PortP->firstOpen)) { /* First time ? */
- rio_dprint(RIO_DEBUG_TTY, ("First open for this port\n"));
- rio_inc_mod_count ();
+ rio_dprintk (RIO_DEBUG_TTY, "First open for this port\n");
+
PortP->firstOpen++;
PortP->CookMode = 0; /* XXX RIOCookMode(tp); */
@@ -375,7 +384,7 @@ riotopen(struct tty_struct * tty, struct file * filp)
** wait for the port to be not closed.
*/
while ( !(PortP->PortState & PORT_ISOPEN) && !p->RIOHalted ) {
- rio_dprint(RIO_DEBUG_TTY, ("Waiting for PORT_ISOPEN-currently %x\n",PortP->PortState));
+ rio_dprintk (RIO_DEBUG_TTY, "Waiting for PORT_ISOPEN-currently %x\n",PortP->PortState);
/*
** 15.10.1998 ARG - ESIL 0759
** (Part) fix for port being trashed when opened whilst RTA "disconnected"
@@ -392,7 +401,7 @@ riotopen(struct tty_struct * tty, struct file * filp)
*/
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (RIODelay(PortP, HUNDRED_MS) == RIO_FAIL) {
- rio_dprint(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 );
func_exit ();
return -EINTR;
@@ -407,52 +416,67 @@ bombout:
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return retval;
}
- rio_dprint(RIO_DEBUG_TTY, ("PORT_ISOPEN found\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "PORT_ISOPEN found\n");
}
#ifdef MODEM_SUPPORT
if (Modem) {
- rio_dprint(RIO_DEBUG_TTY, ("Modem - test for carrier\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Modem - test for carrier\n");
/*
** ACTION
** insert test for carrier here. -- ???
** I already see that test here. What's the deal? -- REW
*/
- if ((tp->tm.c_cflag & CLOCAL) || (PortP->ModemState & MSVR1_CD))
+ if ((PortP->gs.tty->termios->c_cflag & CLOCAL) || (PortP->ModemState & MSVR1_CD))
{
- rio_dprint(RIO_DEBUG_TTY, (PortP,DBG_OPEN,"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;
wakeup((caddr_t) &tp->tm.c_canq);
+ */
+ PortP->State |= RIO_CARR_ON;
+ wake_up_interruptible (&PortP->gs.open_wait);
}
else /* no carrier - wait for DCD */
{
- while (!(tp->tm.c_state&CARR_ON) &&
- !(filp->f_flags&O_NONBLOCK) && !p->RIOHalted )
- {
- rio_dprint(RIO_DEBUG_TTY, (PortP,DBG_OPEN,"open(%d) sleeping for carr on\n",SysPort));
- tp->tm.c_state |= WOPEN;
+ /*
+ while (!(PortP->gs.tty->termios->c_state & CARR_ON) &&
+ !(filp->f_flags & O_NONBLOCK) && !p->RIOHalted )
+ */
+ while (!(PortP->State & RIO_CARR_ON) &&
+ !(filp->f_flags & O_NONBLOCK) && !p->RIOHalted ) {
+
+ rio_dprintk (RIO_DEBUG_TTY, "open(%d) sleeping for carr on\n",SysPort);
+ /*
+ PortP->gs.tty->termios->c_state |= WOPEN;
+ */
PortP->State |= RIO_WOPEN;
- if ( sleep((caddr_t)&tp->tm.c_canq, TTIPRI|PCATCH))
+#if 0
+ if ( sleep((caddr_t)&tp->tm.c_canqo, TTIPRI|PCATCH))
{
/*
** ACTION: verify that this is a good thing
** to do here. -- ???
** I think it's OK. -- REW
*/
- rio_dprint(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 );
+ /*
tp->tm.c_state &= ~WOPEN;
+ */
PortP->State &= ~RIO_WOPEN;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
func_exit ();
return -EINTR;
}
+#endif
}
PortP->State &= ~RIO_WOPEN;
}
- if ( RIOHalted )
+ if ( p->RIOHalted )
goto bombout;
+ rio_dprintk (RIO_DEBUG_TTY, "Setting RIO_MOPEN\n");
PortP->State |= RIO_MOPEN;
}
else
@@ -470,7 +494,7 @@ bombout:
goto bombout;
}
- rio_dprint(RIO_DEBUG_TTY, ("high level open done\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "high level open done\n");
#ifdef STATS
PortP->Stat.OpenCnt++;
@@ -482,7 +506,7 @@ bombout:
PortP->opens++;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
- rio_dprint(RIO_DEBUG_TTY, ("Returning from open\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Returning from open\n");
func_exit ();
return 0;
}
@@ -509,13 +533,13 @@ riotclose(void *ptr)
int Modem;
int rv =0;
- rio_dprint(RIO_DEBUG_TTY, ("port close SysPort %d\n",PortP->PortNum));
+ rio_dprintk (RIO_DEBUG_TTY, "port close SysPort %d\n",PortP->PortNum);
/* PortP = p->RIOPortp[SysPort]; */
- rio_dprint(RIO_DEBUG_TTY, ("Port is at address 0x%x\n",(int)PortP));
+ rio_dprintk (RIO_DEBUG_TTY, "Port is at address 0x%x\n",(int)PortP);
/* tp = PortP->TtyP;*/ /* Get tty */
tty = PortP->gs.tty;
- rio_dprint(RIO_DEBUG_TTY, ("TTY is at address 0x%x\n",(int)tty));
+ rio_dprintk (RIO_DEBUG_TTY, "TTY is at address 0x%x\n",(int)tty);
Modem = rio_ismodem(tty->device);
#if 0
/* What F.CKING cache? Even then, a higly idle multiprocessor,
@@ -533,7 +557,7 @@ riotclose(void *ptr)
PortP->State |= RIO_CLOSING;
if ( (PortP->State & RIO_DELETED) ) {
- rio_dprint(RIO_DEBUG_TTY, ("Close on deleted RTA\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Close on deleted RTA\n");
deleted = 1;
}
@@ -543,7 +567,7 @@ riotclose(void *ptr)
goto close_end;
}
- rio_dprint(RIO_DEBUG_TTY, ("Clear bits\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Clear bits\n");
/*
** clear the open bits for this device
*/
@@ -561,7 +585,7 @@ riotclose(void *ptr)
** The port is still open for the other task -
** return, pretending that we are still active.
*/
- rio_dprint(RIO_DEBUG_TTY, ("Channel %d still open !\n",PortP->PortNum));
+ rio_dprintk (RIO_DEBUG_TTY, "Channel %d still open !\n",PortP->PortNum);
PortP->State &= ~RIO_CLOSING;
if (PortP->firstOpen)
PortP->firstOpen--;
@@ -569,7 +593,7 @@ riotclose(void *ptr)
return -EIO;
}
- rio_dprint(RIO_DEBUG_TTY, ("Closing down - everything must go!\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Closing down - everything must go!\n");
PortP->State &= ~RIO_DYNOROD;
@@ -578,7 +602,7 @@ riotclose(void *ptr)
** to drain down before closing. Bye-bye....
** (We never meant to do this)
*/
- rio_dprint(RIO_DEBUG_TTY, ("Timeout 1 starts\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Timeout 1 starts\n");
#if 0
if (!deleted)
@@ -587,14 +611,14 @@ riotclose(void *ptr)
cprintf("Need to flush the ttyport\n");
if (repeat_this -- <= 0) {
rv = -EINTR;
- rio_dprint(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 );
goto close_end;
}
- rio_dprint(RIO_DEBUG_TTY, ("Calling timeout to flush in closing\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Calling timeout to flush in closing\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (RIODelay_ni(PortP, HUNDRED_MS*10) == RIO_FAIL) {
- rio_dprint(RIO_DEBUG_TTY, ("RTA EINTR in delay \n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RTA EINTR in delay \n");
rv = -EINTR;
rio_spin_lock_irqsave(&PortP->portSem, flags);
goto close_end;
@@ -611,7 +635,7 @@ riotclose(void *ptr)
** The port has been re-opened for the other task -
** return, pretending that we are still active.
*/
- rio_dprint(RIO_DEBUG_TTY, ("Channel %d re-open!\n", PortP->PortNum));
+ rio_dprintk (RIO_DEBUG_TTY, "Channel %d re-open!\n", PortP->PortNum);
PortP->State &= ~RIO_CLOSING;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (PortP->firstOpen)
@@ -638,12 +662,12 @@ riotclose(void *ptr)
while (try && (PortP->PortState & PORT_ISOPEN)) {
try--;
if (try == 0) {
- rio_dprint(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);
break;
}
- rio_dprint(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);
if ( p->RIOHalted ) {
RIOClearUp( PortP );
@@ -652,7 +676,7 @@ riotclose(void *ptr)
RIODelay_ni(PortP, HUNDRED_MS);
}
rio_spin_lock_irqsave(&PortP->portSem, flags);
- rio_dprint(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); */
@@ -682,7 +706,7 @@ close_end:
if (PortP->firstOpen)
PortP->firstOpen--;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
- rio_dprint(RIO_DEBUG_TTY, ("Return from close\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Return from close\n");
return rv;
}
@@ -731,7 +755,7 @@ static void
RIOClearUp(PortP)
struct Port *PortP;
{
- rio_dprint(RIO_DEBUG_TTY, ("RIOHalted set\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "RIOHalted set\n");
PortP->Config = 0; /* Direct semaphore */
PortP->PortState = 0;
PortP->firstOpen = 0;
@@ -761,7 +785,7 @@ static int RIOShortCommand(struct rio_info *p, struct Port *PortP,
int retries = 20; /* at 10 per second -> 2 seconds */
unsigned long flags;
- rio_dprint(RIO_DEBUG_TTY, ("entering shortcommand.\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "entering shortcommand.\n");
#ifdef CHECK
CheckPortP( PortP );
if ( len < 1 || len > 2 )
@@ -769,7 +793,7 @@ static int RIOShortCommand(struct rio_info *p, struct Port *PortP,
#endif
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_TTY, ("Short command to deleted RTA ignored\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Short command to deleted RTA ignored\n");
return RIO_FAIL;
}
rio_spin_lock_irqsave(&PortP->portSem, flags);
@@ -779,8 +803,8 @@ static int RIOShortCommand(struct rio_info *p, struct Port *PortP,
** be free again.
*/
while ( (PortP->InUse != NOT_INUSE) && !p->RIOHalted ) {
- rio_dprint(RIO_DEBUG_TTY, ("Waiting for not in use (%d)\n",
- retries));
+ rio_dprintk (RIO_DEBUG_TTY, "Waiting for not in use (%d)\n",
+ retries);
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (retries-- <= 0) {
return RIO_FAIL;
@@ -791,16 +815,16 @@ static int RIOShortCommand(struct rio_info *p, struct Port *PortP,
rio_spin_lock_irqsave(&PortP->portSem, flags);
}
if ( PortP->State & RIO_DELETED ) {
- rio_dprint(RIO_DEBUG_TTY, ("Short command to deleted RTA ignored\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Short command to deleted RTA ignored\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return RIO_FAIL;
}
while ( !can_add_transmit(&PacketP,PortP) && !p->RIOHalted ) {
- rio_dprint(RIO_DEBUG_TTY, ("Waiting to add short command to queue (%d)\n", retries));
+ rio_dprintk (RIO_DEBUG_TTY, "Waiting to add short command to queue (%d)\n", retries);
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
if (retries-- <= 0) {
- rio_dprint(RIO_DEBUG_TTY, ("out of tries. Failing\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "out of tries. Failing\n");
return RIO_FAIL;
}
if ( RIODelay_ni(PortP, HUNDRED_MS)==RIO_FAIL ) {
@@ -865,11 +889,11 @@ register caddr_t arg;
int Modem = rio_ismodem(dev);
int ioctl_processed;
- rio_dprint(RIO_DEBUG_TTY, ("port ioctl SysPort %d command 0x%x argument 0x%x %s\n",
- SysPort,cmd,arg,Modem?"Modem":"tty"));
+ rio_dprintk (RIO_DEBUG_TTY, "port ioctl SysPort %d command 0x%x argument 0x%x %s\n",
+ SysPort, cmd, arg, Modem?"Modem":"tty") ;
if ( SysPort >= RIO_PORTS ) {
- rio_dprint(RIO_DEBUG_TTY, ("Bad port number %d\n",SysPort));
+ rio_dprintk (RIO_DEBUG_TTY, "Bad port number %d\n", SysPort);
return -ENXIO;
}
@@ -926,22 +950,22 @@ register caddr_t arg;
return 0;
case TCRIOTSTATE:
- rio_dprint(RIO_DEBUG_TTY, ("tbusy/tstop monitoring %sabled\n",
- arg ? "en" : "dis"));
+ rio_dprintk (RIO_DEBUG_TTY, "tbusy/tstop monitoring %sabled\n",
+ arg ? "en" : "dis");
/* MonitorTstate = 0 ;*/
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
RIOParam(PortP, CONFIG, Modem, OK_TO_SLEEP);
return 0;
case TCRIOSTATE: /* current state of Modem input pins */
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOSTATE\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOSTATE\n");
if (RIOPreemptiveCmd(p, PortP, MGET) == RIO_FAIL)
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOSTATE command failed\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOSTATE command failed\n");
PortP->State |= RIO_BUSY;
current = PortP->ModemState;
if ( copyout((caddr_t)&current, (int)arg,
sizeof(current))==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_TTY, ("Copyout failed\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Copyout failed\n");
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
pseterr(EFAULT);
}
@@ -950,15 +974,15 @@ register caddr_t arg;
case TCRIOMBIS: /* Set modem lines */
case TCRIOMBIC: /* Clear modem lines */
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOMBIS/TCRIOMBIC\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOMBIS/TCRIOMBIC\n");
if (cmd == TCRIOMBIS) {
uint state;
state = (uint)arg;
PortP->ModemState |= (ushort)state;
PortP->ModemLines = (ulong) arg;
if (RIOPreemptiveCmd(p, PortP, MBIS) == RIO_FAIL)
- rio_dprint(RIO_DEBUG_TTY, (
- "TCRIOMBIS command failed\n"));
+ rio_dprintk (RIO_DEBUG_TTY,
+ "TCRIOMBIS command failed\n");
}
else {
uint state;
@@ -967,17 +991,17 @@ register caddr_t arg;
PortP->ModemState &= ~(ushort)state;
PortP->ModemLines = (ulong) arg;
if (RIOPreemptiveCmd(p, PortP, MBIC) == RIO_FAIL)
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOMBIC command failed\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOMBIC command failed\n");
}
PortP->State |= RIO_BUSY;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return 0;
case TCRIOXPON: /* set Xprint ON string */
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOXPON\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOXPON\n");
if ( copyin((int)arg, (caddr_t)PortP->Xprint.XpOn,
MAX_XP_CTRL_LEN)==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_TTY, ("Copyin failed\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Copyin failed\n");
PortP->Xprint.XpOn[0] = '\0';
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
pseterr(EFAULT);
@@ -989,10 +1013,10 @@ register caddr_t arg;
return 0;
case TCRIOXPOFF: /* set Xprint OFF string */
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOXPOFF\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOXPOFF\n");
if ( copyin( (int)arg, (caddr_t)PortP->Xprint.XpOff,
MAX_XP_CTRL_LEN)==COPYFAIL ) {
- rio_dprint(RIO_DEBUG_TTY, ("Copyin failed\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Copyin failed\n");
PortP->Xprint.XpOff[0] = '\0';
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
pseterr(EFAULT);
@@ -1004,10 +1028,10 @@ register caddr_t arg;
return 0;
case TCRIOXPCPS: /* set Xprint CPS string */
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOXPCPS\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOXPCPS\n");
if ( (uint)arg > p->RIOConf.MaxXpCps ||
(uint)arg < p->RIOConf.MinXpCps ) {
- rio_dprint(RIO_DEBUG_TTY, ("%d CPS out of range\n",arg));
+ rio_dprintk (RIO_DEBUG_TTY, "%d CPS out of range\n",arg);
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
pseterr(EINVAL);
return 0;
@@ -1017,7 +1041,7 @@ register caddr_t arg;
return 0;
case TCRIOXPRINT:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOXPRINT\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOXPRINT\n");
if ( copyout((caddr_t)&PortP->Xprint, (int)arg,
sizeof(struct Xprint))==COPYFAIL ) {
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
@@ -1027,25 +1051,25 @@ register caddr_t arg;
return 0;
case TCRIOIXANYON:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOIXANYON\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOIXANYON\n");
PortP->Config |= RIO_IXANY;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return 0;
case TCRIOIXANYOFF:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOIXANYOFF\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOIXANYOFF\n");
PortP->Config &= ~RIO_IXANY;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return 0;
case TCRIOIXONON:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOIXONON\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOIXONON\n");
PortP->Config |= RIO_IXON;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return 0;
case TCRIOIXONOFF:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOIXONOFF\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOIXONOFF\n");
PortP->Config &= ~RIO_IXON;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
return 0;
@@ -1055,28 +1079,28 @@ register caddr_t arg;
** Added support for CTS and RTS flow control ioctls :
*/
case TCRIOCTSFLOWEN:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOCTSFLOWEN\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOCTSFLOWEN\n");
PortP->Config |= RIO_CTSFLOW;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
RIOParam(PortP,CONFIG,Modem,OK_TO_SLEEP);
return 0;
case TCRIOCTSFLOWDIS:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIOCTSFLOWDIS\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIOCTSFLOWDIS\n");
PortP->Config &= ~RIO_CTSFLOW;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
RIOParam(PortP,CONFIG,Modem,OK_TO_SLEEP);
return 0;
case TCRIORTSFLOWEN:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIORTSFLOWEN\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIORTSFLOWEN\n");
PortP->Config |= RIO_RTSFLOW;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
RIOParam(PortP,CONFIG,Modem,OK_TO_SLEEP);
return 0;
case TCRIORTSFLOWDIS:
- rio_dprint(RIO_DEBUG_TTY, ("TCRIORTSFLOWDIS\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "TCRIORTSFLOWDIS\n");
PortP->Config &= ~RIO_RTSFLOW;
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
RIOParam(PortP,CONFIG,Modem,OK_TO_SLEEP);
@@ -1100,13 +1124,13 @@ register caddr_t arg;
case TCSETAW:
case TCSETAF:
ioctl_processed++;
- rio_dprint(RIO_DEBUG_TTY, ("NON POSIX ioctl\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "NON POSIX ioctl\n");
ttyseth_pv(PortP, tp, (struct termios *)arg, 0);
break;
case TCSETAP: /* posix tcsetattr() */
case TCSETAWP: /* posix tcsetattr() */
case TCSETAFP: /* posix tcsetattr() */
- rio_dprint(RIO_DEBUG_TTY, ("NON POSIX SYSV ioctl\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "NON POSIX SYSV ioctl\n");
ttyseth_pv(PortP, tp, (struct termios *)arg, 1);
ioctl_processed++;
break;
@@ -1141,7 +1165,7 @@ register caddr_t arg;
#endif
case TIOCSETD:
case TIOCSETN:
- rio_dprint(RIO_DEBUG_TTY, ("wait for non-BUSY, semaphore set\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "wait for non-BUSY, semaphore set\n");
/*
** Wait for drain here, at least as far as the double buffer
** being empty.
@@ -1208,8 +1232,8 @@ register caddr_t arg;
PortP->CookMode = RIOCookMode(tp); /* Set new cooking mode */
- rio_dprint(RIO_DEBUG_TTY, ("RIOIoctl changed %d newcook %d oldcook %d\n",
- changed,PortP->CookMode,oldcook));
+ rio_dprintk (RIO_DEBUG_TTY, "RIOIoctl changed %d newcook %d oldcook %d\n",
+ changed,PortP->CookMode,oldcook);
#ifdef MODEM_SUPPORT
/*
@@ -1232,7 +1256,7 @@ register caddr_t arg;
*/
if (changed || oldcook != PortP->CookMode || (ioctl_processed)) {
rio_spin_unlock_irqrestore(&PortP->portSem, flags);
- rio_dprint(RIO_DEBUG_TTY, ("Ioctl changing the PORT settings\n"));
+ rio_dprintk (RIO_DEBUG_TTY, "Ioctl changing the PORT settings\n");
RIOParam(PortP,CONFIG,Modem,OK_TO_SLEEP);
rio_spin_lock_irqsave(&PortP->portSem, flags);
}