Date: Mon, 4 Dec 2017 13:54:00 -0700 From: Warner Losh <imp@bsdimp.com> To: Cy Schubert <Cy.Schubert@komquats.com> Cc: Alex Kozlov <ak@freebsd.org>, Willem Jan Withagen <wjw@digiware.nl>, "arch@freebsd.org" <arch@freebsd.org> Subject: Re: Deprecating / Removing floppy drive support Message-ID: <CANCZdfpfGnXLFrB-0gGheDXu-gfH1gkfhF4CmU%2BB43mwsn_g5A@mail.gmail.com> In-Reply-To: <201712042023.vB4KNC0e072391@slippy.cwsent.com> References: <imp@bsdimp.com> <CANCZdfqzHLme1AMUO0Z_%2Bz951hSfi0PV_CWgPdxThi92iLZa7A@mail.gmail.com> <201712042023.vB4KNC0e072391@slippy.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 4, 2017 at 1:23 PM, Cy Schubert <Cy.Schubert@komquats.com> wrote: > In message <CANCZdfqzHLme1AMUO0Z_+z951hSfi0PV_CWgPdxThi92iLZa7A@ > mail.gmail.c > om> > , Warner Losh writes: > > --089e0825fdccb5682d055f87a50b > > Content-Type: text/plain; charset="UTF-8" > > > > On Mon, Dec 4, 2017 at 11:07 AM, Cy Schubert <Cy.Schubert@komquats.com> > > wrote: > > > > > My test showed that MP i386 works as well. Amd64 is broken. > > > > > > What's the pathology on amd64? > > Not really much except for I/O error. > > g_vfs_done():fd0[READ(offset=184320, length=512)]error = 5 > > I can dig into it unless someone else beats me to it. > OK. EIO is 5. The only EIO I see in the driver is where we've had too many retries. Set debug.fdc=-1 and see what you get for the error. If isa_dma_init can't get lomem, it returns 0 which will cause the driver to not attach, which isn't what we're seeing. However, if configmalloc() bogusly returns an address too large, we don't check for that in isa_dma.c. I don't think that's the bug, since I'd expect different pathology. diff --git a/sys/x86/isa/isa_dma.c b/sys/x86/isa/isa_dma.c index 58601f85ae2..5c314863718 100644 --- a/sys/x86/isa/isa_dma.c +++ b/sys/x86/isa/isa_dma.c @@ -107,6 +107,12 @@ isa_dma_init(int chan, u_int bouncebufsize, int flag) if (buf == NULL) { buf = contigmalloc(bouncebufsize, M_DEVBUF, flag, 0ul, 0xfffffful, 1ul, chan & 4 ? 0x20000ul : 0x10000ul); + if (buf != NULL && + isa_dmarangecheck(buf, bouncebufsize, chan) != 0) { + printf("isa_dma_init: %p failed range check\n", buf); + contigfree(buf, bouncebufsize, M_DEVBUF); + buf = NULL; + } contig = 1; } But EIO suggests we're timing out or getting repeated errors on the command, and debug.fdc will get to the bottom of that. Might be nice to have isa_dma_init print out the buffer it gets always, just to rule out badness. I don't know if I have a box that can run amd64, but has a floppy anymore... I'll have to check my boneyard. Anyway, good luck. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpfGnXLFrB-0gGheDXu-gfH1gkfhF4CmU%2BB43mwsn_g5A>