All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: petkovbb@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	stable@kernel.org
Subject: Re: [PATCH] ide-floppy fix
Date: Tue, 22 Jul 2008 21:49:19 +0200	[thread overview]
Message-ID: <200807222149.19939.bzolnier@gmail.com> (raw)
In-Reply-To: <20080722052735.GA16054@gollum.tnic>


Hi,

On Tuesday 22 July 2008, Borislav Petkov wrote:

[...]

> [    5.879917] ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
> [    5.879997] probe_mask=0x3, i=0x0, io_addr=0x1f0
> [    5.880057] ide_generic: I/O resource 0x1F0-0x1F7 not free.
> [    5.880115] probe_mask=0x3, i=0x1, io_addr=0x170
> [    5.880173] ide_generic: I/O resource 0x170-0x177 not free.
> [    5.880246] ide_host_register: loop0: i=0, hwif=00000000
> [    5.880299] ide_host_register: loop0: i=1, hwif=00000000
> [    5.880357] ide_host_register: loop0: i=2, hwif=00000000
> 
> and then it goes KABOOM!
> 
> 
> 
> I tested both with BLK_DEV_GENERIC on and off and the
> error happens only when it is on:
> 
> --- config.ok   2008-07-22 06:58:48.000000000 +0200
> +++ config.b0rked       2008-07-22 06:59:31.000000000 +0200
> @@ -1,7 +1,7 @@
>  #
>  # Automatically generated make config: don't edit
>  # Linux kernel version: 2.6.26
> -# Tue Jul 22 06:58:28 2008
> +# Tue Jul 22 06:59:24 2008
>  #
>  # CONFIG_64BIT is not set
>  CONFIG_X86_32=y
> @@ -600,7 +600,7 @@ CONFIG_IDE_PROC_FS=y
>  #
>  # IDE chipset support/bugfixes
>  #
> -# CONFIG_IDE_GENERIC is not set
> +CONFIG_IDE_GENERIC=y
>  # CONFIG_BLK_DEV_PLATFORM is not set
>  # CONFIG_BLK_DEV_CMD640 is not set
>  # CONFIG_BLK_DEV_IDEPNP is not set
> 
> I've also attached the .config that breaks the machine. Please take a look in
> case i'm missing something.

Thanks, with this config I can reproduce the problem.

> > [ Besides it shouldn't result in phantom hde & hdf devices
> >   and ide_generic blowing up on failure. ]
> > 
> > Have you tried the memset() fix that I proposed
> > (pata tree contains the revised patch now)?
> 
> yep, test runs ontop of your tree from Sunday which already has the fix.

*sigh*

The previous fix was garbage and contained brown-paper-bag bug:

diff -u b/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
--- b/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -114,7 +114,7 @@
 	printk(KERN_INFO DRV_NAME ": please use \"probe_mask=0x3f\" module "
 			 "parameter for probing all legacy ISA IDE ports\n");
 
-	memset(hws, 0, MAX_HWIFS);
+	memset(hws, 0, sizeof(hw_regs_t *) * MAX_HWIFS);
 
 	for (i = 0; i < ARRAY_SIZE(legacy_bases); i++) {
 		io_addr = legacy_bases[i];


Now it should be finally fixed.

> > > One of the possible fixes is adding
> > > 
> > > depends on !BLK_DEV_GENERIC
> > > 
> > > after each IDE chipset driver using the generic detection in drivers/ide/Kconfig
> > > but it's a not-that-elegant one. Another thing would be using a dummy one like
> > > BLK_DEV_IDEDMA_PCI, but I'm not that sure. Will look into it. I'm pretty sure
> > > you have a better idea...
> > 
> > pata_legacy.c has a proper fix which needs porting into ide-generic.c
> > (it should be pretty easy thing to do).
> 
> (is this a hint^^? :))

It has *HINT* written all over it. ;)

Thanks,
Bart

  reply	other threads:[~2008-07-22 20:50 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15  5:33 [PATCH] ide-floppy fix Borislav Petkov
2008-07-15  5:40 ` Borislav Petkov
2008-07-16 15:59 ` Bartlomiej Zolnierkiewicz
2008-07-15 20:39   ` Borislav Petkov
2008-07-15 20:58     ` Bartlomiej Zolnierkiewicz
2008-07-16  5:20       ` Borislav Petkov
2008-07-16 17:56         ` Bartlomiej Zolnierkiewicz
2008-07-20 12:06           ` Borislav Petkov
2008-07-21 19:03             ` Bartlomiej Zolnierkiewicz
2008-07-22  5:27               ` Borislav Petkov
2008-07-22 19:49                 ` Bartlomiej Zolnierkiewicz [this message]
2008-07-23  6:32                   ` Borislav Petkov
2008-07-23 18:51                     ` Bartlomiej Zolnierkiewicz
2008-08-01  5:48                       ` [PATCH] ide-generic: skip automatic probing of legacy iobases (was: Re: [PATCH] ide-floppy fix) Borislav Petkov
2008-08-02 17:02                         ` Bartlomiej Zolnierkiewicz
2008-08-02 18:32                           ` Borislav Petkov
2008-08-02 18:46                             ` Bartlomiej Zolnierkiewicz
2008-08-03  7:37                               ` [PATCH 1/2] pata_legacy: export functionality to ide Borislav Petkov
2008-08-03 11:59                                 ` Alan Cox
2008-08-03 13:37                                   ` Bartlomiej Zolnierkiewicz
2008-08-03 13:39                                     ` Alan Cox
2008-08-03 23:43                                       ` Jeff Garzik
2008-08-03 14:38                                   ` Borislav Petkov
2008-08-03 15:22                                     ` Alan Cox
2008-08-03 16:51                                       ` Borislav Petkov
2008-08-05 14:26                                         ` Sergei Shtylyov
2008-08-05 14:32                                           ` Boris Petkov
2008-08-05 14:41                                             ` Bartlomiej Zolnierkiewicz
2008-08-06  6:10                                               ` Borislav Petkov
2008-08-06 11:34                                                 ` Sergei Shtylyov
2008-08-06 11:34                                                   ` Sergei Shtylyov
2008-08-06 14:03                                                   ` Boris Petkov
2008-08-06 15:57                                                     ` Sergei Shtylyov
2008-08-06 19:47                                                       ` Borislav Petkov
2008-08-06 19:46                                                         ` Alan Cox
2008-08-06 20:04                                                         ` Sergei Shtylyov
2008-08-07  4:36                                                           ` [PATCH] ide-generic: handle probing of legacy io-ports v5 (was: Re: [PATCH 1/2] pata_legacy: export functionality to ide) Borislav Petkov
2008-08-07 17:06                                                             ` Bartlomiej Zolnierkiewicz
2008-08-08 10:04                                                             ` [PATCH] ide-generic: handle probing of legacy io-ports v5 Sergei Shtylyov
2008-08-08 10:04                                                               ` Sergei Shtylyov
2008-08-03  7:38                               ` [PATCH 2/2] ide-generic: handle probing of legacy io-ports Borislav Petkov
2008-08-03 14:11                                 ` Bartlomiej Zolnierkiewicz
2008-08-03 14:45                                   ` Borislav Petkov
2008-08-03 14:54                                     ` Borislav Petkov
2008-08-03 14:59                                     ` Bartlomiej Zolnierkiewicz
2008-08-03 15:08                                   ` Borislav Petkov

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=200807222149.19939.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.com \
    --cc=stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.