I continue to see the READ_BIG problems on my 4.6.1 test system.
I've just finished a round of testing where I re-cvsup'ed with
tag=RELENG_4_6 and applied the patches suggested below.
After rebuilding and reinstalling (just the kernel, using 4.6-RELEASE
userland) I now see rare, but still occasional READ_BIG errors.
For testing I'm using a CD-R with 4.6-RELEASE mounted on /cdrom and
use the following commands:
root@nick-3% find -s . -print0 | xargs -0 md5 > ~/4.6.md5.4
root@nick-4% find -s . -print0 | xargs -0 md5 > ~/4.6.md5.5
md5: ./packages/www/xswallow-1.0.18.tgz: Input/output error
root@nick-5%
On my most recent build I have received a single READ_BIG error on
each of two runs of the command:
Jul 29 03:42:43 nick /kernel: acd0: READ_BIG - ILLEGAL REQUEST asc=0x64 ascq=0x00
error=0x00
Jul 29 04:42:00 nick /kernel: acd0: READ_BIG - ILLEGAL REQUEST asc=0x64 ascq=0x00
error=0x00
Earlier testing tonight showed that the dev->si_iosize_max patch had
the most impact. I'm not sure the other patches showed any input.
Before the last cvsup and rebuild I was seeing somewhat more errors
(using these same patches), but far less than previously. I'll try a
few more build variations and see if I can relate the change in error
rate to other things.
dmesg shows the cdrom as:
acd0: CDROM <CREATIVE CD3231E> at ata0-slave BIOSPIO
I'm currently booting with:
hw.ata.wc="0"
hw.ata.tags="0"
hw.ata.ata_dma="0"
hw.ata.atapi_dma="0"
Other variations didn't seem to have any impact.
On Thu, 25 Jul 2002, Ian Dowse wrote:
> Date: Thu, 25 Jul 2002 22:06:38 +0100
> From: Ian Dowse <[EMAIL PROTECTED]>
> To: Hans Ottevanger <[EMAIL PROTECTED]>
> Cc: John Baldwin <[EMAIL PROTECTED]>, [EMAIL PROTECTED],
> Mark Hartley <[EMAIL PROTECTED]>,
> Jesse Gross <[EMAIL PROTECTED]>, John Prince <[EMAIL PROTECTED]>
> Subject: Re: READ_BIG problems
>
> In message <[EMAIL PROTECTED]>, Hans Ottevanger writes:
> >acd0: READ_BIG command timeout - resetting
> >ata1: resetting devices .. done
> >acd0: READ_BIG command timeout - resetting
> >ata1: resetting devices .. done
>
> Could people seeing this and other ATA problems try the patch below?
> This should fix some unlikely races that could potentially be
> responsible for these problems, though I suspect it will not make
> any difference.
>
> The second part of the patch is a workaround for the "atprq" hangs
> on ATAPI tape drives.
>
> Ian
>
> Index: ata-all.c
> ===================================================================
> RCS file: /home/iedowse/CVS/src/sys/dev/ata/ata-all.c,v
> retrieving revision 1.50.2.37
> diff -u -r1.50.2.37 ata-all.c
> --- ata-all.c 19 Jun 2002 08:30:48 -0000 1.50.2.37
> +++ ata-all.c 18 Jul 2002 17:00:27 -0000
> @@ -228,10 +228,10 @@
> !ch->r_io || !ch->r_altio || !ch->r_irq)
> return ENXIO;
>
> + s = splbio();
> /* make sure channel is not busy */
> ATA_SLEEPLOCK_CH(ch, ATA_CONTROL);
>
> - s = splbio();
> #if NATADISK > 0
> if (ch->devices & ATA_ATA_MASTER && ch->device[MASTER].driver)
> ad_detach(&ch->device[MASTER], 1);
> @@ -669,10 +669,12 @@
> #endif
> int s;
>
> - if (!ATA_LOCK_CH(ch, ATA_ACTIVE))
> + s = splbio();
> + if (!ATA_LOCK_CH(ch, ATA_ACTIVE)) {
> + splx(s);
> return;
> + }
>
> - s = splbio();
> #if NATADISK > 0
> /* find & call the responsible driver if anything on the ATA queue */
> if (TAILQ_EMPTY(&ch->ata_queue)) {
> Index: atapi-all.c
> ===================================================================
> RCS file: /home/iedowse/CVS/src/sys/dev/ata/atapi-all.c,v
> retrieving revision 1.46.2.14
> diff -u -r1.46.2.14 atapi-all.c
> --- atapi-all.c 14 Jul 2002 12:35:28 -0000 1.46.2.14
> +++ atapi-all.c 14 Jul 2002 23:39:00 -0000
> @@ -186,6 +186,7 @@
> request->flags = flags;
> request->timeout = timeout * hz;
> request->ccbsize = atadev->param->packet_size ? 16 : 12;
> + request->error = EINPROGRESS;
> bcopy(ccb, request->ccb, request->ccbsize);
> if (callback) {
> request->callback = callback;
> @@ -215,7 +216,8 @@
> }
>
> /* wait for request to complete */
> - tsleep((caddr_t)request, PRIBIO, "atprq", 0);
> + if (request->error == EINPROGRESS)
> + tsleep((caddr_t)request, PRIBIO, "atprq", 0);
> splx(s);
> error = request->error;
> if (error)
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-stable" in the body of the message
>
On Fri, 26 Jul 2002, Ian Dowse wrote:
> Date: Fri, 26 Jul 2002 15:28:48 +0100
> From: Ian Dowse <[EMAIL PROTECTED]>
> To: Jesse Gross <[EMAIL PROTECTED]>
> Cc: John Baldwin <[EMAIL PROTECTED]>, [EMAIL PROTECTED],
> Mark Hartley <[EMAIL PROTECTED]>, John Prince <[EMAIL PROTECTED]>,
> Hans Ottevanger <[EMAIL PROTECTED]>
> Subject: Re: READ_BIG problems
>
> In message <[EMAIL PROTECTED]>, Jesse Gross wr
> ites:
> >No luck.
> >
> >The patch didn't seem to make any difference.
>
> Thanks to everybody for trying. Below is another patch that apparently
> does help - I got Hans to try it, and he says that it seemed to work.
>
> Does this makes a difference for anybody else?
>
> Ian
>
> Index: atapi-cd.c
> ===================================================================
> RCS file: /home/iedowse/CVS/src/sys/dev/ata/atapi-cd.c,v
> retrieving revision 1.48.2.16
> diff -u -r1.48.2.16 atapi-cd.c
> --- atapi-cd.c 27 Mar 2002 19:48:37 -0000 1.48.2.16
> +++ atapi-cd.c 26 Jul 2002 14:22:37 -0000
> @@ -266,7 +266,7 @@
> dev = make_dev(&acd_cdevsw, dkmakeminor(cdp->lun, 0, 0),
> UID_ROOT, GID_OPERATOR, 0644, "acd%d", cdp->lun);
> dev->si_drv1 = cdp;
> - dev->si_iosize_max = 252 * DEV_BSIZE;
> + dev->si_iosize_max = 64 * DEV_BSIZE;
> dev->si_bsize_phys = 2048; /* XXX SOS */
> cdp->dev = dev;
> cdp->device->flags |= ATA_D_MEDIA_CHANGED;
>
>
>
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-stable" in the body of the message
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message