2007-12-12 11:00:20

by Anders Henke

[permalink] [raw]
Subject: Re: broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)

Hi,

I'd like to let you now that my boxes are running a 32-bit kernel, so
the 64-bit-uncleanliness shouldn't apply to my boxes; however,

http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch

fixed the issue on my testbox.

I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.



Regards,

Anders

PS: Sorry for breaking the threading, I'm not a regular subscriber to
linux-kernel and haven't received Miguel's message by mail.
--
1&1 Internet AG System Design
Brauerstrasse 48 v://49.721.91374.50
D-76135 Karlsruhe f://49.721.91374.225

Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger,
Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


2007-12-12 11:38:52

by Andrew Morton

[permalink] [raw]
Subject: Re: broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)

On Wed, 12 Dec 2007 11:58:41 +0100 Anders Henke <[email protected]> wrote:

> Hi,
>
> I'd like to let you now that my boxes are running a 32-bit kernel, so
> the 64-bit-uncleanliness shouldn't apply to my boxes; however,
>
> http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch
>
> fixed the issue on my testbox.
>
> I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.

What a huge patch :(

We already reverted the offening patch so I assume that 2.6.24-rc5 is
working for you?

I guess we need to look at restoring "dpt_i2o: convert to SCSI hotplug
model" and then absorbing what Miquel has done there.

2007-12-12 13:08:52

by Miquel van Smoorenburg

[permalink] [raw]
Subject: Re: broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)

On Wed, 2007-12-12 at 03:38 -0800, Andrew Morton wrote:
> On Wed, 12 Dec 2007 11:58:41 +0100 Anders Henke <[email protected]> wrote:
>
> > Hi,
> >
> > I'd like to let you now that my boxes are running a 32-bit kernel, so
> > the 64-bit-uncleanliness shouldn't apply to my boxes; however,
> >
> > http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch
> >
> > fixed the issue on my testbox.
> >
> > I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.
>
> What a huge patch :(
>
> We already reverted the offening patch so I assume that 2.6.24-rc5 is
> working for you?
>
> I guess we need to look at restoring "dpt_i2o: convert to SCSI hotplug
> model" and then absorbing what Miquel has done there.

This was just a patch I had lying around, if it worked it would confirm
my suspicion, which it has.

The minimal patch which is suitable for 2.6.23-stable and 2.6.24 would
be the attached one-liner. The "dpt_i2o: convert to SCSI hotplug model"
patch could be restored then.

(if the list eats the attachment, it's also available here:
http://www.miquels.cistron.nl/linux/linux-2.6.23+24-dpt_i2o-dma64.patch
)

Anders, does this one-liner patch work for you ?

Mike.


Attachments:
linux-2.6.23+24-dpt_i2o-dma64.patch (511.00 B)

2007-12-12 13:45:22

by Anders Henke

[permalink] [raw]
Subject: Re: broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)

Am 12.12.2007 schrieb Miquel van Smoorenburg:
> On Wed, 2007-12-12 at 03:38 -0800, Andrew Morton wrote:
> > On Wed, 12 Dec 2007 11:58:41 +0100 Anders Henke <[email protected]> wrote:
> >
> > > Hi,
> > >
> > > I'd like to let you now that my boxes are running a 32-bit kernel, so
> > > the 64-bit-uncleanliness shouldn't apply to my boxes; however,
> > >
> > > http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch
> > >
> > > fixed the issue on my testbox.
> > >
> > > I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.
> >
> > What a huge patch :(
> >
> > We already reverted the offening patch so I assume that 2.6.24-rc5 is
> > working for you?
> >
> > I guess we need to look at restoring "dpt_i2o: convert to SCSI hotplug
> > model" and then absorbing what Miquel has done there.
>
> This was just a patch I had lying around, if it worked it would confirm
> my suspicion, which it has.
>
> The minimal patch which is suitable for 2.6.23-stable and 2.6.24 would
> be the attached one-liner. The "dpt_i2o: convert to SCSI hotplug model"
> patch could be restored then.
>
> (if the list eats the attachment, it's also available here:
> http://www.miquels.cistron.nl/linux/linux-2.6.23+24-dpt_i2o-dma64.patch
> )
>
> Anders, does this one-liner patch work for you ?

Got it - and it works!

I took a clean 2.6.23, applied the patch, recompiled the kernel and
rebooted my testbox: came up with the fresh-compiled kernel
(verified by "uname -a").


Regards,

Anders
--
1&1 Internet AG System Design
Brauerstrasse 48 v://49.721.91374.50
D-76135 Karlsruhe f://49.721.91374.225

Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger,
Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren

2007-12-12 14:18:04

by Anders Henke

[permalink] [raw]
Subject: Re: broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)

Am 12.12.2007 schrieb Andrew Morton:
> On Wed, 12 Dec 2007 11:58:41 +0100 Anders Henke <[email protected]> wrote:
>
> > Hi,
> >
> > I'd like to let you now that my boxes are running a 32-bit kernel, so
> > the 64-bit-uncleanliness shouldn't apply to my boxes; however,
> >
> > http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch
> >
> > fixed the issue on my testbox.
> >
> > I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.
>
> What a huge patch :(
>
> We already reverted the offening patch so I assume that 2.6.24-rc5 is
> working for you?

Yes, the vanilla 2.6.24-rc5 works fine (at least it's booting :-).

Linux rdb140 2.6.24-rc5 #1 SMP Wed Dec 12 15:06:05 CET 2007 i686 GNU/Linux

> I guess we need to look at restoring "dpt_i2o: convert to SCSI hotplug
> model" and then absorbing what Miquel has done there.


I've tried 2.6.23 with

http://www.miquels.cistron.nl/linux/linux-2.6.23+24-dpt_i2o-dma64.patch

... and that's enough to make my boxes boot again.


Regards,

Anders
--
1&1 Internet AG Enter any 11-digit prime number to continue.
Brauerstrasse 48 v://49.721.91374.50
D-76135 Karlsruhe f://49.721.91374.225

Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger,
Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Norbert Lang, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren

2007-12-12 19:17:25

by Andrew Morton

[permalink] [raw]
Subject: Re: broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)

On Wed, 12 Dec 2007 14:43:42 +0100 Anders Henke <[email protected]> wrote:

> Am 12.12.2007 schrieb Miquel van Smoorenburg:
> > On Wed, 2007-12-12 at 03:38 -0800, Andrew Morton wrote:
> > > On Wed, 12 Dec 2007 11:58:41 +0100 Anders Henke <[email protected]> wrote:
> > >
> > > > Hi,
> > > >
> > > > I'd like to let you now that my boxes are running a 32-bit kernel, so
> > > > the 64-bit-uncleanliness shouldn't apply to my boxes; however,
> > > >
> > > > http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch
> > > >
> > > > fixed the issue on my testbox.
> > > >
> > > > I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.
> > >
> > > What a huge patch :(
> > >
> > > We already reverted the offening patch so I assume that 2.6.24-rc5 is
> > > working for you?
> > >
> > > I guess we need to look at restoring "dpt_i2o: convert to SCSI hotplug
> > > model" and then absorbing what Miquel has done there.
> >
> > This was just a patch I had lying around, if it worked it would confirm
> > my suspicion, which it has.
> >
> > The minimal patch which is suitable for 2.6.23-stable and 2.6.24 would
> > be the attached one-liner. The "dpt_i2o: convert to SCSI hotplug model"
> > patch could be restored then.
> >
> > (if the list eats the attachment, it's also available here:
> > http://www.miquels.cistron.nl/linux/linux-2.6.23+24-dpt_i2o-dma64.patch
> > )
> >
> > Anders, does this one-liner patch work for you ?
>
> Got it - and it works!
>
> I took a clean 2.6.23, applied the patch, recompiled the kernel and
> rebooted my testbox: came up with the fresh-compiled kernel
> (verified by "uname -a").
>

That looks appropriate for 2.6.23.x:

--- linux-2.6.23.9.orig/drivers/scsi/dpt_i2o.c 2007-11-26 18:51:43.000000000 +0100
+++ linux-2.6.23.9/drivers/scsi/dpt_i2o.c 2007-12-12 13:21:05.000000000 +0100
@@ -905,8 +905,7 @@
}

pci_set_master(pDev);
- if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) &&
- pci_set_dma_mask(pDev, DMA_32BIT_MASK))
+ if (pci_set_dma_mask(pDev, DMA_32BIT_MASK))
return -EINVAL;

base_addr0_phys = pci_resource_start(pDev,0);


However it is a bit mystifying that
55d9fcf57ba5ec427544fca7abc335cf3da78160 would cause a dma mask problem
(isn't it?)

The scsi people might want to restore
55d9fcf57ba5ec427544fca7abc335cf3da78160 and then apply Miquel's patch on
top for 2.6.24, or do it for 2.6.25?

2007-12-12 19:55:29

by James Bottomley

[permalink] [raw]
Subject: Re: broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)


On Wed, 2007-12-12 at 11:16 -0800, Andrew Morton wrote:
> On Wed, 12 Dec 2007 14:43:42 +0100 Anders Henke <[email protected]> wrote:
>
> > Am 12.12.2007 schrieb Miquel van Smoorenburg:
> > > On Wed, 2007-12-12 at 03:38 -0800, Andrew Morton wrote:
> > > > On Wed, 12 Dec 2007 11:58:41 +0100 Anders Henke <[email protected]> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I'd like to let you now that my boxes are running a 32-bit kernel, so
> > > > > the 64-bit-uncleanliness shouldn't apply to my boxes; however,
> > > > >
> > > > > http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch
> > > > >
> > > > > fixed the issue on my testbox.
> > > > >
> > > > > I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.
> > > >
> > > > What a huge patch :(
> > > >
> > > > We already reverted the offening patch so I assume that 2.6.24-rc5 is
> > > > working for you?
> > > >
> > > > I guess we need to look at restoring "dpt_i2o: convert to SCSI hotplug
> > > > model" and then absorbing what Miquel has done there.
> > >
> > > This was just a patch I had lying around, if it worked it would confirm
> > > my suspicion, which it has.
> > >
> > > The minimal patch which is suitable for 2.6.23-stable and 2.6.24 would
> > > be the attached one-liner. The "dpt_i2o: convert to SCSI hotplug model"
> > > patch could be restored then.
> > >
> > > (if the list eats the attachment, it's also available here:
> > > http://www.miquels.cistron.nl/linux/linux-2.6.23+24-dpt_i2o-dma64.patch
> > > )
> > >
> > > Anders, does this one-liner patch work for you ?
> >
> > Got it - and it works!
> >
> > I took a clean 2.6.23, applied the patch, recompiled the kernel and
> > rebooted my testbox: came up with the fresh-compiled kernel
> > (verified by "uname -a").
> >
>
> That looks appropriate for 2.6.23.x:
>
> --- linux-2.6.23.9.orig/drivers/scsi/dpt_i2o.c 2007-11-26 18:51:43.000000000 +0100
> +++ linux-2.6.23.9/drivers/scsi/dpt_i2o.c 2007-12-12 13:21:05.000000000 +0100
> @@ -905,8 +905,7 @@
> }
>
> pci_set_master(pDev);
> - if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) &&
> - pci_set_dma_mask(pDev, DMA_32BIT_MASK))
> + if (pci_set_dma_mask(pDev, DMA_32BIT_MASK))
> return -EINVAL;

Yes, this has to be in ... the mptr filling the scatterlist on the
current driver is only a u32 and so will silently truncate.

> base_addr0_phys = pci_resource_start(pDev,0);
>
>
> However it is a bit mystifying that
> 55d9fcf57ba5ec427544fca7abc335cf3da78160 would cause a dma mask problem
> (isn't it?)
>
> The scsi people might want to restore
> 55d9fcf57ba5ec427544fca7abc335cf3da78160 and then apply Miquel's patch on
> top for 2.6.24, or do it for 2.6.25?

I think it's a bit late in the game for 2.6.24, so I'm happy to leave
the hotplug reverted. We'll try adding back hotplug plus this for
2.6.25 I think.

James

2007-12-12 22:30:30

by Greg KH

[permalink] [raw]
Subject: Re: [stable] broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)

On Wed, Dec 12, 2007 at 02:54:54PM -0500, James Bottomley wrote:
>
> On Wed, 2007-12-12 at 11:16 -0800, Andrew Morton wrote:
> > On Wed, 12 Dec 2007 14:43:42 +0100 Anders Henke <[email protected]> wrote:
> >
> > > Am 12.12.2007 schrieb Miquel van Smoorenburg:
> > > > On Wed, 2007-12-12 at 03:38 -0800, Andrew Morton wrote:
> > > > > On Wed, 12 Dec 2007 11:58:41 +0100 Anders Henke <[email protected]> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I'd like to let you now that my boxes are running a 32-bit kernel, so
> > > > > > the 64-bit-uncleanliness shouldn't apply to my boxes; however,
> > > > > >
> > > > > > http://www.miquels.cistron.nl/linux/dpt_i2o-64bit-2.6.23.patch
> > > > > >
> > > > > > fixed the issue on my testbox.
> > > > > >
> > > > > > I took a clean 2.6.23, applied patch, recompiled the kernel, reboot: works.
> > > > >
> > > > > What a huge patch :(
> > > > >
> > > > > We already reverted the offening patch so I assume that 2.6.24-rc5 is
> > > > > working for you?
> > > > >
> > > > > I guess we need to look at restoring "dpt_i2o: convert to SCSI hotplug
> > > > > model" and then absorbing what Miquel has done there.
> > > >
> > > > This was just a patch I had lying around, if it worked it would confirm
> > > > my suspicion, which it has.
> > > >
> > > > The minimal patch which is suitable for 2.6.23-stable and 2.6.24 would
> > > > be the attached one-liner. The "dpt_i2o: convert to SCSI hotplug model"
> > > > patch could be restored then.
> > > >
> > > > (if the list eats the attachment, it's also available here:
> > > > http://www.miquels.cistron.nl/linux/linux-2.6.23+24-dpt_i2o-dma64.patch
> > > > )
> > > >
> > > > Anders, does this one-liner patch work for you ?
> > >
> > > Got it - and it works!
> > >
> > > I took a clean 2.6.23, applied the patch, recompiled the kernel and
> > > rebooted my testbox: came up with the fresh-compiled kernel
> > > (verified by "uname -a").
> > >
> >
> > That looks appropriate for 2.6.23.x:
> >
> > --- linux-2.6.23.9.orig/drivers/scsi/dpt_i2o.c 2007-11-26 18:51:43.000000000 +0100
> > +++ linux-2.6.23.9/drivers/scsi/dpt_i2o.c 2007-12-12 13:21:05.000000000 +0100
> > @@ -905,8 +905,7 @@
> > }
> >
> > pci_set_master(pDev);
> > - if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) &&
> > - pci_set_dma_mask(pDev, DMA_32BIT_MASK))
> > + if (pci_set_dma_mask(pDev, DMA_32BIT_MASK))
> > return -EINVAL;
>
> Yes, this has to be in ... the mptr filling the scatterlist on the
> current driver is only a u32 and so will silently truncate.
>
> > base_addr0_phys = pci_resource_start(pDev,0);
> >
> >
> > However it is a bit mystifying that
> > 55d9fcf57ba5ec427544fca7abc335cf3da78160 would cause a dma mask problem
> > (isn't it?)
> >
> > The scsi people might want to restore
> > 55d9fcf57ba5ec427544fca7abc335cf3da78160 and then apply Miquel's patch on
> > top for 2.6.24, or do it for 2.6.25?
>
> I think it's a bit late in the game for 2.6.24, so I'm happy to leave
> the hotplug reverted. We'll try adding back hotplug plus this for
> 2.6.25 I think.

So, what should be added to 2.6.23-stable then? And, can I get a real
changelog entry for it?

thanks,

greg k-h

2007-12-13 10:13:20

by Miquel van Smoorenburg

[permalink] [raw]
Subject: [PATCH] dpt_i2o: don't set DMA_64BIT_MASK [was: Re: [stable] broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)]

According to Greg KH:
> So, what should be added to 2.6.23-stable then? And, can I get a real
> changelog entry for it?

This is suitable for both 2.6.23.x and 2.6.24-rc5 :

linux-2.6-dpt_i2o-no-dma64.patch

The dpt_i2o driver can't handle 64 bit DMA addresses, so do not
let it set pci_set_dma_mask(pDev, DMA_64BIT_MASK) .

Signed-off-by: Miquel van Smoorenburg <[email protected]>

diff -ruN linux-2.6.23.9.orig/drivers/scsi/dpt_i2o.c linux-2.6.23.9/drivers/scsi/dpt_i2o.c
--- linux-2.6.23.9.orig/drivers/scsi/dpt_i2o.c 2007-11-26 18:51:43.000000000 +0100
+++ linux-2.6.23.9/drivers/scsi/dpt_i2o.c 2007-12-12 13:21:05.000000000 +0100
@@ -905,8 +905,7 @@
}

pci_set_master(pDev);
- if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) &&
- pci_set_dma_mask(pDev, DMA_32BIT_MASK))
+ if (pci_set_dma_mask(pDev, DMA_32BIT_MASK))
return -EINVAL;

base_addr0_phys = pci_resource_start(pDev,0);

2007-12-13 12:58:22

by James Bottomley

[permalink] [raw]
Subject: Re: [PATCH] dpt_i2o: don't set DMA_64BIT_MASK [was: Re: [stable] broken dpt_i2o in 2.6.23 (was: ext2 check page: bad entry in directory) (fwd)]


On Thu, 2007-12-13 at 11:11 +0100, Miquel van Smoorenburg wrote:
> According to Greg KH:
> > So, what should be added to 2.6.23-stable then? And, can I get a real
> > changelog entry for it?
>
> This is suitable for both 2.6.23.x and 2.6.24-rc5 :
>
> linux-2.6-dpt_i2o-no-dma64.patch

Actually, this one's already queued:

http://git.kernel.org/?p=linux/kernel/git/jejb/scsi-rc-fixes-2.6.git;a=commit;h=a066b307861238c1970310579c0bc2fe8c8dca51

James