|
@@ -80,7 +80,7 @@ static int i2RetryFlushOutput(i2ChanStrPtr);
|
|
// Not a documented part of the library routines (careful...) but the Diagnostic
|
|
// Not a documented part of the library routines (careful...) but the Diagnostic
|
|
// i2diag.c finds them useful to help the throughput in certain limited
|
|
// i2diag.c finds them useful to help the throughput in certain limited
|
|
// single-threaded operations.
|
|
// single-threaded operations.
|
|
-static void iiSendPendingMail(i2eBordStrPtr);
|
|
|
|
|
|
+static inline void iiSendPendingMail(i2eBordStrPtr);
|
|
static void serviceOutgoingFifo(i2eBordStrPtr);
|
|
static void serviceOutgoingFifo(i2eBordStrPtr);
|
|
|
|
|
|
// Functions defined in ip2.c as part of interrupt handling
|
|
// Functions defined in ip2.c as part of interrupt handling
|
|
@@ -150,6 +150,13 @@ i2Validate ( i2ChanStrPtr pCh )
|
|
== (CHANNEL_MAGIC | CHANNEL_SUPPORT));
|
|
== (CHANNEL_MAGIC | CHANNEL_SUPPORT));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void iiSendPendingMail_t(unsigned long data)
|
|
|
|
+{
|
|
|
|
+ i2eBordStrPtr pB = (i2eBordStrPtr)data;
|
|
|
|
+
|
|
|
|
+ iiSendPendingMail(pB);
|
|
|
|
+}
|
|
|
|
+
|
|
//******************************************************************************
|
|
//******************************************************************************
|
|
// Function: iiSendPendingMail(pB)
|
|
// Function: iiSendPendingMail(pB)
|
|
// Parameters: Pointer to a board structure
|
|
// Parameters: Pointer to a board structure
|
|
@@ -184,12 +191,9 @@ iiSendPendingMail(i2eBordStrPtr pB)
|
|
/\/\|=mhw=|\/\/ */
|
|
/\/\|=mhw=|\/\/ */
|
|
|
|
|
|
if( ++pB->SendPendingRetry < 16 ) {
|
|
if( ++pB->SendPendingRetry < 16 ) {
|
|
-
|
|
|
|
- init_timer( &(pB->SendPendingTimer) );
|
|
|
|
- pB->SendPendingTimer.expires = jiffies + 1;
|
|
|
|
- pB->SendPendingTimer.function = (void*)(unsigned long)iiSendPendingMail;
|
|
|
|
- pB->SendPendingTimer.data = (unsigned long)pB;
|
|
|
|
- add_timer( &(pB->SendPendingTimer) );
|
|
|
|
|
|
+ setup_timer(&pB->SendPendingTimer,
|
|
|
|
+ iiSendPendingMail_t, (unsigned long)pB);
|
|
|
|
+ mod_timer(&pB->SendPendingTimer, jiffies + 1);
|
|
} else {
|
|
} else {
|
|
printk( KERN_ERR "IP2: iiSendPendingMail unable to queue outbound mail\n" );
|
|
printk( KERN_ERR "IP2: iiSendPendingMail unable to queue outbound mail\n" );
|
|
}
|
|
}
|
|
@@ -1265,8 +1269,10 @@ i2RetryFlushOutput(i2ChanStrPtr pCh)
|
|
// soon as all the data is completely sent.
|
|
// soon as all the data is completely sent.
|
|
//******************************************************************************
|
|
//******************************************************************************
|
|
static void
|
|
static void
|
|
-i2DrainWakeup(i2ChanStrPtr pCh)
|
|
|
|
|
|
+i2DrainWakeup(unsigned long d)
|
|
{
|
|
{
|
|
|
|
+ i2ChanStrPtr pCh = (i2ChanStrPtr)d;
|
|
|
|
+
|
|
ip2trace (CHANN, ITRC_DRAIN, 10, 1, pCh->BookmarkTimer.expires );
|
|
ip2trace (CHANN, ITRC_DRAIN, 10, 1, pCh->BookmarkTimer.expires );
|
|
|
|
|
|
pCh->BookmarkTimer.expires = 0;
|
|
pCh->BookmarkTimer.expires = 0;
|
|
@@ -1292,14 +1298,12 @@ i2DrainOutput(i2ChanStrPtr pCh, int timeout)
|
|
}
|
|
}
|
|
if ((timeout > 0) && (pCh->BookmarkTimer.expires == 0 )) {
|
|
if ((timeout > 0) && (pCh->BookmarkTimer.expires == 0 )) {
|
|
// One per customer (channel)
|
|
// One per customer (channel)
|
|
- init_timer( &(pCh->BookmarkTimer) );
|
|
|
|
- pCh->BookmarkTimer.expires = jiffies + timeout;
|
|
|
|
- pCh->BookmarkTimer.function = (void*)(unsigned long)i2DrainWakeup;
|
|
|
|
- pCh->BookmarkTimer.data = (unsigned long)pCh;
|
|
|
|
|
|
+ setup_timer(&pCh->BookmarkTimer, i2DrainWakeup,
|
|
|
|
+ (unsigned long)pCh);
|
|
|
|
|
|
ip2trace (CHANN, ITRC_DRAIN, 1, 1, pCh->BookmarkTimer.expires );
|
|
ip2trace (CHANN, ITRC_DRAIN, 1, 1, pCh->BookmarkTimer.expires );
|
|
|
|
|
|
- add_timer( &(pCh->BookmarkTimer) );
|
|
|
|
|
|
+ mod_timer(&pCh->BookmarkTimer, jiffies + timeout);
|
|
}
|
|
}
|
|
|
|
|
|
i2QueueCommands( PTYPE_INLINE, pCh, -1, 1, CMD_BMARK_REQ );
|
|
i2QueueCommands( PTYPE_INLINE, pCh, -1, 1, CMD_BMARK_REQ );
|