mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
To: linux-kernel@vger.kernel.org
Subject: looping on a single timing event
Date: Fri, 31 Aug 2001 12:40:08 -0400	[thread overview]
Message-ID: <200108311640.MAA00467@mailhost.eng.mc.xerox.com> (raw)


I'm writing a device driver.  Its for a proprietary serial interface
I'm using 2.4.5.

It seems something is going south, and I go into ack_timeout nonstop
(even though I added ONE event with a timer).

    665 static void ack_timeout(unsigned long ptr)
    666 {
    667         my_printk("ack timeout\n");
    668         if(xmit_retries < 3) {
    669                 if(!current_xmitting_packet) {
    670                         my_printk("resending packet\n");
    671                         xmit_bytes_sent = 0;
    672                         xmit_state = SENDING_MSG;
    673                         current_xmitting_packet = xmit_messages;         
    674                         kis_continue_output();
    675                         xmit_retries++;
    676                 } else {
    677                         my_printk("currently sending packet\n");
    678                 }
    679         } else {
    680                 my_printk("retranxmits up");
    681                 send_nack(0x80);        /* guess */
    682                 remove_head_xmit_message();
    683         }
    684 
    685 }
    686 
    687 static void setup_ack_timer(void)
    688 {
    689         init_timer(&ack_timer);
    690         ack_timer.function = ack_timeout;
    691         ack_timer.expires = jiffies + (HZ/25);
    692         ack_timer.data = NULL;
    693         add_timer(&ack_timer);
    694         my_printk("added ack timer\n");
    695 }
    696 


my_printk is a macro allowing me to see the time:
# define my_printk(args...) { kis_show_time();  printk(##args); }

The code at line 687 isn't executing.
I'm seeing a continious
	ack timeout (line 667)
	currently sending packet (line 677)

I also don't have console control.

ack_timeout is only called via the ack_timer.function.

(Of course, when I log more things, the timing changes and I don't
have a problem (but others things don't work with my hardware interface).

Any hints for getting console control back when this starts happening?
Or logging in a non-time-destructive way?

marty		mleisner@eng.mc.xerox.com   
Don't  confuse education with schooling.
	Milton Friedman to Yogi Berra

                 reply	other threads:[~2001-08-31 16:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200108311640.MAA00467@mailhost.eng.mc.xerox.com \
    --to=mleisner@eng.mc.xerox.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®