The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Olaf Hering <olaf@aepfle.de>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] exit early in floppy_init when no floppy exists
Date: Tue, 29 Aug 2006 18:28:31 +1000	[thread overview]
Message-ID: <1156840111.8433.534.camel@localhost.localdomain> (raw)
In-Reply-To: <20060829080738.GA22708@aepfle.de>

On Tue, 2006-08-29 at 10:07 +0200, Olaf Hering wrote:
> modprobe -v floppy on a Apple G5 writes incorrect stuff to dmesg:
> 
> Floppy drive(s): fd0 is 2.88M
> 
> The reason is that the legacy io check happens very late,
> when part of the floppy stuff is already initialized.
> check_legacy_ioport() returns either -ENODEV right away, or it walks
> the device-tree looking for a floppy node.
> 
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> ---
> 
> Can this go into 2.6.18 please? Our installer parses dmesg to find
> floppy devices. Dont ask....
> 
> 
> 
> 
>  drivers/block/floppy.c |   12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> Index: linux-2.6.18-rc4/drivers/block/floppy.c
> ===================================================================
> --- linux-2.6.18-rc4.orig/drivers/block/floppy.c
> +++ linux-2.6.18-rc4/drivers/block/floppy.c
> @@ -4177,6 +4177,11 @@ static int __init floppy_init(void)
>  	int i, unit, drive;
>  	int err, dr;
>  
> +#if defined(CONFIG_PPC_MERGE)
> +	if (check_legacy_ioport(FDC1))
> +		return -ENODEV;
> +#endif
> +
>  	raw_cmd = NULL;
>  
>  	for (dr = 0; dr < N_DRIVE; dr++) {
> @@ -4234,13 +4239,6 @@ static int __init floppy_init(void)
>  	}
>  
>  	use_virtual_dma = can_use_virtual_dma & 1;
> -#if defined(CONFIG_PPC_MERGE)
> -	if (check_legacy_ioport(FDC1)) {
> -		del_timer(&fd_timeout);
> -		err = -ENODEV;
> -		goto out_unreg_region;
> -	}
> -#endif
>  	fdc_state[0].address = FDC1;
>  	if (fdc_state[0].address == -1) {
>  		del_timer(&fd_timeout);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


      reply	other threads:[~2006-08-29  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29  8:07 [PATCH] exit early in floppy_init when no floppy exists Olaf Hering
2006-08-29  8:28 ` Benjamin Herrenschmidt [this message]

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=1156840111.8433.534.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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