public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Andreas Bombe <aeb@debian.org>
Cc: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] amiflop: get rid of sleep_on calls
Date: Wed, 31 Dec 2008 17:30:00 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.0812311728430.14380@anakin> (raw)
In-Reply-To: <20081223142246.GA5122@infernal.debian.net>

On Tue, 23 Dec 2008, Andreas Bombe wrote:
> On Sun, Dec 14, 2008 at 05:21:17PM +0100, Geert Uytterhoeven wrote:
> > On Wed, 10 Dec 2008, Andreas Bombe wrote:
> > > I just tried out my Amiga and it appears to be in better shape than
> > > expected.  So I might get to actually test it when I find the time.  My
> > > Amiga has no Linux installation so I need to whip up a ramdisk or
> > > something else sufficient to test it.
> > 
> > I think the good old ELF ramdisk at
> > ftp://ftp.uni-erlangen.de/pub/unix/Linux/680x0/v2.0/filesys/filesys-ELF-2.0.x-1400K-2.gz
> > should be sufficient to give it a try...
> 
> Not that easy with just 8 Megs of Fast RAM.  Besides, I couldn't gunzip
> the file to look at the image, gzip gives a format error.
> 
> Now, I finally got to test it with a very simply self-made initrd.  So
> far I only did some read tests in a single thread (dd to /dev/null at
> various offsets).  It didn't crash or hang, but I noticed that the
> floppy motor is never shut off (I'm not sure about the motor, at least
> the floppy LED stays on).  However, that is not a regression, I tested
> the mainline code and it shows the same problem.

Indeed, the floppy motor keeps on running.

I added some debug code and got this:

	floppy_off: nr = 0x40000000
	floppy_off: mod motor_off_timer 0 jiffies + 3*HZ
	fd_motor_off: drive = 0xc0000000


diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 8df436f..e42f168 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -336,6 +336,7 @@ static int fd_motor_on(int nr)
 {
 	nr &= 3;
 
+pr_err("%s: del motor_off_timer %d\n", __func__, nr);
 	del_timer(motor_off_timer + nr);
 
 	if (!unit[nr].motor) {
@@ -368,16 +369,13 @@ static int fd_motor_on(int nr)
 static void fd_motor_off(unsigned long drive)
 {
 	long calledfromint;
-#ifdef MODULE
-	long decusecount;
-
-	decusecount = drive & 0x40000000;
-#endif
+pr_err("%s: drive = 0x%lx\n", __func__, drive);
 	calledfromint = drive & 0x80000000;
 	drive&=3;
 	if (calledfromint && !try_fdc(drive)) {
 		/* We would be blocked in an interrupt, so try again later */
 		motor_off_timer[drive].expires = jiffies + 1;
+pr_err("%s: add motor_off_timer %ld jiffies + 1\n", __func__, drive);
 		add_timer(motor_off_timer + drive);
 		return;
 	}
@@ -391,9 +389,11 @@ static void floppy_off (unsigned int nr)
 {
 	int drive;
 
+pr_err("%s: nr = 0x%x\n", __func__, nr);
 	drive = nr & 3;
 	/* called this way it is always from interrupt */
 	motor_off_timer[drive].data = nr | 0x80000000;
+pr_err("%s: mod motor_off_timer %d jiffies + 3*HZ\n", __func__, drive);
 	mod_timer(motor_off_timer + drive, jiffies + 3*HZ);
 }
 

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

  reply	other threads:[~2008-12-31 16:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 16:59 [PATCH] amiflop: get rid of sleep_on calls Andreas Bombe
2008-12-09  8:26 ` Joerg Dorchain
2008-12-10  0:48   ` Andreas Bombe
2008-12-10  8:16     ` Joerg Dorchain
2008-12-16 20:23   ` Geert Uytterhoeven
2008-12-17  8:00     ` Joerg Dorchain
2008-12-09  8:31 ` Geert Uytterhoeven
2008-12-09 18:34   ` Andreas Bombe
2008-12-10  1:02   ` [PATCH v2] " Andreas Bombe
2008-12-14 16:21     ` Geert Uytterhoeven
2008-12-23 14:22       ` Andreas Bombe
2008-12-31 16:30         ` Geert Uytterhoeven [this message]
2008-12-13 15:20   ` [PATCH] " Kolbjørn Barmen
2008-12-13 21:30     ` Geert Uytterhoeven

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=Pine.LNX.4.64.0812311728430.14380@anakin \
    --to=geert@linux-m68k.org \
    --cc=aeb@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@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