2002-01-05 03:04:56

by Adam J. Richter

[permalink] [raw]
Subject: Patch: linux-2.5.2-pre7/drivers/cdrom additional kdev_t fixes

Here are the remaining kdev_t fixes for
linux-2.5.2-pre7/drivers/cdrom. Note that sbpcd.c still will not compile,
due to it apparently needing some bio changes that I haven't looked
into yet. However, my changes are quite mechanical, so the spbcd.c
changes are a step toward making it compile. The changes make the
other drivers compile (sonycd535.c and sjcd.c).

I only know that these change eliminate compilation error.
There are otherwise completely untested.

--
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
[email protected] \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."


Attachments:
(No filename) (759.00 B)
cdrom.diffs (7.40 kB)
Download all attachments

2002-01-11 21:34:52

by David Dyck

[permalink] [raw]
Subject: Re: Patch: linux-2.5.2-pre7/drivers/cdrom additional kdev_t fixes



I had been testing 2.5.2-pre11 and earlier, but hadn't looked at
reading from my cdrom for a while. Yesterday I created examined several
large cdrom sets that had been readable earlier and they read partially
but get read errors. These same cdroms can be read reliable on
2.4.18-pre3 using the same hardware, and are readable on other
PC's runing older kernels.

Has anyone else seen cdrom read errors with 2.5.2-pre* kernels?

David

On Fri, 4 Jan 2002 at 19:04 -0800, Adam J. Richter <[email protected]> wrote:

> From: Adam J. Richter <[email protected]>
> To: [email protected], [email protected]
> Cc: [email protected]
> Date: Fri, 4 Jan 2002 19:04:35 -0800
> Subject: Patch: linux-2.5.2-pre7/drivers/cdrom additional kdev_t fixes
>
> Here are the remaining kdev_t fixes for
> linux-2.5.2-pre7/drivers/cdrom. Note that sbpcd.c still will not compile,
> due to it apparently needing some bio changes that I haven't looked
> into yet. However, my changes are quite mechanical, so the spbcd.c
> changes are a step toward making it compile. The changes make the
> other drivers compile (sonycd535.c and sjcd.c).
>
> I only know that these change eliminate compilation error.
> There are otherwise completely untested.
>
> --
> Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
> [email protected] \ / San Jose, California 95129-1034
> +1 408 261-6630 | g g d r a s i l United States of America
> fax +1 408 261-6631 "Free Software For The Rest Of Us."
>


Attachments:
cdrom.diffs (7.40 kB)

2002-01-12 01:24:44

by Adam J. Richter

[permalink] [raw]
Subject: Re: Patch: linux-2.5.2-pre7/drivers/cdrom additional kdev_t fixes

>I had been testing 2.5.2-pre11 and earlier, but hadn't looked at
>reading from my cdrom for a while. Yesterday I created examined several
>large cdrom sets that had been readable earlier and they read partially
>but get read errors. These same cdroms can be read reliable on
>2.4.18-pre3 using the same hardware, and are readable on other
>PC's runing older kernels.

>Has anyone else seen cdrom read errors with 2.5.2-pre* kernels?

> David

Please indicate what kind of interface your CDROM drive
has (and preferably make and model of the drive) and what
errors you saw.

If you are using an IDE or SCSI CDROM drive, then the problems
you are experiencing have nothing to do with my patch. My patch was
only for the very old "proprietary interface" CDROM drives, which are
almost all "1X" or "2X" speed drives.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
[email protected] \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

2002-01-12 02:55:24

by David Dyck

[permalink] [raw]
Subject: IDE cdrom cdrom_read_intr: data underrun / end_request: I/O error --- was Re: Patch: linux-2.5.2-pre7/drivers/cdrom additional kdev_t fixes

On Fri, 11 Jan 2002 at 17:24 -0800, Adam J. Richter <[email protected]> wrote:

> >I had been testing 2.5.2-pre11 and earlier, but hadn't looked at
> >reading from my cdrom for a while. Yesterday I created examined several
> >large cdrom sets that had been readable earlier and they read partially
> >but get read errors. These same cdroms can be read reliable on
> >2.4.18-pre3 using the same hardware, and are readable on other
> >PC's runing older kernels.
>
> >Has anyone else seen cdrom read errors with 2.5.2-pre* kernels?

Thanks for your response Adam,

> Please indicate what kind of interface your CDROM drive
> has (and preferably make and model of the drive) and what
> errors you saw.
>
> If you are using an IDE or SCSI CDROM drive, then the problems
> you are experiencing have nothing to do with my patch. My patch was
> only for the very old "proprietary interface" CDROM drives, which are
> almost all "1X" or "2X" speed drives.

Using 2.5.2-pre11

# mount /cdrom && md5sum /cdrom/*
md5sum: /cdrom/dcd-c.tar.gz: I/O error
md5sum: /cdrom/dcd-d.tar.gz: I/O error


An example of some of the messages were

ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hdc: NEC CD-ROM DRIVE:28B, ATAPI CD/DVD-ROM drive
hdc: ATAPI 32X CD-ROM drive, 256kB Cache


VFS: Disk change detected on device ide1(22,0)
ISO 9660 Extensions: Microsoft Joliet Level 3
ISOFS: changing to secondary root
hdc: cdrom_read_intr: data underrun (4294967256 blocks)
end_request: I/O error, dev 16:00, sector 299300
hdc: cdrom_read_intr: data underrun (4294967260 blocks)
end_request: I/O error, dev 16:00, sector 299304

errors repeated with sector and blocks increasing by 4
repeating 118 times


but using 2.4.18-pre3 I get no errors

2002-01-12 03:43:06

by Adam J. Richter

[permalink] [raw]
Subject: Re: IDE cdrom cdrom_read_intr: data underrun / end_request: I/O error --- was Re: Patch: linux-2.5.2-pre7/drivers/cdrom additional kdev_t fixes

>From: David Dyck <[email protected]>
[...]
>hdc: NEC CD-ROM DRIVE:28B, ATAPI CD/DVD-ROM drive

You are using an IDE CDROM drive. Therefore, it has
nothing to do with my patch.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
[email protected] \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

2002-01-12 16:37:51

by David Dyck

[permalink] [raw]
Subject: 2.5.2-pre11 / IDE cdrom_read_intr: data underrun / end_request: I/O error

On Fri, 11 Jan 2002 at 18:55 -0800, David Dyck <[email protected]> wrote:

I had been testing 2.5.2-pre11 and earlier, but hadn't looked at
reading from my cdrom for a while. Yesterday I created examined several
large cdrom sets that had been readable earlier and they read partially
but get read errors. These same cdroms can be read reliable on
2.4.18-pre3 using the same hardware, and are readable on other
PC's runing older kernels.

Has anyone else seen cdrom read errors with 2.5.2-pre* kernels?

Using 2.5.2-pre11

# mount /cdrom && md5sum /cdrom/*
md5sum: /cdrom/dcd-c.tar.gz: I/O error
md5sum: /cdrom/dcd-d.tar.gz: I/O error


An example of some of the messages were

ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hdc: NEC CD-ROM DRIVE:28B, ATAPI CD/DVD-ROM drive
hdc: ATAPI 32X CD-ROM drive, 256kB Cache


VFS: Disk change detected on device ide1(22,0)
ISO 9660 Extensions: Microsoft Joliet Level 3
ISOFS: changing to secondary root
hdc: cdrom_read_intr: data underrun (4294967256 blocks)
end_request: I/O error, dev 16:00, sector 299300
hdc: cdrom_read_intr: data underrun (4294967260 blocks)
end_request: I/O error, dev 16:00, sector 299304

errors repeated with sector and blocks increasing by 4
repeating 118 times


using 2.4.18-pre3 I get no errors

2002-01-15 03:46:59

by David Dyck

[permalink] [raw]
Subject: 2.5.2 / IDE cdrom_read_intr: data underrun / end_request: I/O error


I'm still getting data underrun errors using 2.5.2
that don't occur using 2.4.18-pre3.

Linux dd 2.5.2 #1 Mon Jan 14 19:02:09 PST 2002 i686

here's a section of dmesg output

VFS: Disk change detected on device ide1(22,0)
ISO 9660 Extensions: Microsoft Joliet Level 3
ISOFS: changing to secondary root
hdc: cdrom_read_intr: data underrun (4294967256 blocks)
end_request: I/O error, dev 16:00, sector 299300
hdc: cdrom_read_intr: data underrun (4294967260 blocks)
end_request: I/O error, dev 16:00, sector 299304


the blocks number is 'interesting' in that it is either negative or
really massive, not something that would seem to be appropriate
for the cdrom driver.

dd:dcd$ dmesg | perl -ne 'printf "%x\n", $1 if /data underrun.*?(\d+) blocks/ ' | sort | uniq -c | head
2 ffffff40
2 ffffff44
2 ffffff48
2 ffffff4c
2 ffffff50
2 ffffff54
2 ffffff58
2 ffffff5c
2 ffffff60
2 ffffff64
dd:dcd$ dmesg | perl -ne 'printf "%x\n", $1 if /data underrun.*?(\d+) blocks/ ' | sort | uniq -c | tail
4 ffffffd8
4 ffffffdc
4 ffffffe0
4 ffffffe4
4 ffffffe8
4 ffffffec
4 fffffff0
4 fffffff4
4 fffffff8
4 fffffffc



On Sat, 12 Jan 2002 at 08:37 -0800, David Dyck <[email protected]> wrote:

> On Fri, 11 Jan 2002 at 18:55 -0800, David Dyck <[email protected]> wrote:
>
> I had been testing 2.5.2-pre11 and earlier, but hadn't looked at
> reading from my cdrom for a while. Yesterday I created examined several
> large cdrom sets that had been readable earlier and they read partially
> but get read errors. These same cdroms can be read reliable on
> 2.4.18-pre3 using the same hardware, and are readable on other
> PC's runing older kernels.
>
> Has anyone else seen cdrom read errors with 2.5.2-pre* kernels?
>
> Using 2.5.2-pre11
>
> # mount /cdrom && md5sum /cdrom/*
> md5sum: /cdrom/dcd-c.tar.gz: I/O error
> md5sum: /cdrom/dcd-d.tar.gz: I/O error
>
>
> An example of some of the messages were
>
> ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
> hdc: NEC CD-ROM DRIVE:28B, ATAPI CD/DVD-ROM drive
> hdc: ATAPI 32X CD-ROM drive, 256kB Cache
>
>
> VFS: Disk change detected on device ide1(22,0)
> ISO 9660 Extensions: Microsoft Joliet Level 3
> ISOFS: changing to secondary root
> hdc: cdrom_read_intr: data underrun (4294967256 blocks)
> end_request: I/O error, dev 16:00, sector 299300
> hdc: cdrom_read_intr: data underrun (4294967260 blocks)
> end_request: I/O error, dev 16:00, sector 299304
>
> errors repeated with sector and blocks increasing by 4
> repeating 118 times
>
>
> using 2.4.18-pre3 I get no errors

2002-01-15 09:20:13

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.2 / IDE cdrom_read_intr: data underrun / end_request: I/O error

On Mon, Jan 14 2002, David Dyck wrote:
>
> I'm still getting data underrun errors using 2.5.2
> that don't occur using 2.4.18-pre3.

I'll check up on that, mind checking when this happened exactly in the
2.5 series?

--
Jens Axboe

2002-01-15 15:47:52

by David Dyck

[permalink] [raw]
Subject: Re: 2.5.2 / IDE cdrom_read_intr: data underrun / end_request: I/O error

On Tue, 15 Jan 2002 at 10:19 +0100, Jens Axboe <[email protected]> wrote:

> On Mon, Jan 14 2002, David Dyck wrote:
> >
> > I'm still getting data underrun errors using 2.5.2
> > that don't occur using 2.4.18-pre3.
>
> I'll check up on that, mind checking when this happened exactly in the
> 2.5 series?

I know it fails in 2.5.1, and 2.5.2
(do you need more resolution -- the problem is that many of these
early kernels don't shut down well on my computer, so I end up
fsck'ing after restart. (I guess this should encourage me to
convert to ext3 :-)

I'd be willing to try a couple other ones if you have
specific -pre patches you'd like resolution on.

2002-03-12 12:14:51

by Anton Altaparmakov

[permalink] [raw]
Subject: BIO broke non-DMA cdrom all 2.5.x kernels from BIO start till 2.5.6 affected!

Hello Jens,

I went on a holiday for two weeks and had a 2.5.x bitkeeper tree with me on
my laptop. I discovered my cdrom doesn't work. "ls" works fine but doing
"cp -r /mnt/cdrom/* /tmp/" gives masses of underruns so I can't use my
cdrom at all.

Using the beauty of bitkeeper I started cloning/undoing using a binary
search pattern to determine _which_ kernel patch broke my cdrom.

I suspected the taskfile IDE patches so I centered around that at first but
in the end I found that the very first introduction of the BIO patches
broke it and it has never worked since.

2.2.16-3: works
2.4.x for various x (even ones after the 2.5.0 split): work
2.5.0 and 2.5.1-pre1: work
2.5.1-pre2 and later break up to and including 2.5.6 (and I tried a _lot_
of them!, full list available on request...)

(2.5.5-pre1 didn't even boot hanging in partition discovery on the very
first attempt to read from disk as verified by a few printk()s, but 2.5.6
boots ok so that has been fixed.)

For the laptop: it is an old Pentium 200MMX, with an Opti IDE controller
(laptop is Viper chipset, I am compiling in Opti IDE support in the kernel,
otherwise kernel doesn't boot). hda is a 6GB hd and hdb is the cdrom.
Enabling DMA on either device kills the system instantly (lost interrupt
and good bye, no recovery possible or perhaps I never waited long enough)
so no dma enabled, but multi mode is enabled (I set it to 8 sectors with
hdparm). Unmask IRQ is disabled as that also causes problems (those started
when the taskfile patches went in but I just disabled it at that point and
didn't think about it anymore after that and I haven't tried to enable it).

Also I _sometimes_ see the "timer added twice" error from IDE during boot
(e.g. in 2.5.4-pre1 for example, happens at random points during boot
process, does not always occur, never occurs more than once) but once the
system is up and I have set multi mode to 8 sectors I never see the error
again even if I am doing heavy bitkeeper and concurrent kernel compile
activities. (Laptop only has 48MB RAM so it swaps/has to reload data from
disk a lot.)

I think you may or may not have had a patch for someone with a related/the
same problem some time ago (I can't find the mail any more I am thinking
about so I may be dreaming...). If there is a patch could you mail me the
patch/or even better a url for it? If not, what details would you like to
see about my laptop? - I would be very happy to try any patches/ideas you
have... Should it become necessary I could provide ssh access to the
laptop. (It is on a 10mbit lan and I could leave it on&connected around the
clock.)

Best regards,

Anton


--
"I've not lost my mind. It's backed up on tape somewhere." - Unknown
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/