From owner-freebsd-arch@freebsd.org Mon Dec 4 20:54:03 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B0F1E6AA0C for ; Mon, 4 Dec 2017 20:54:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 24BF97923C for ; Mon, 4 Dec 2017 20:54:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 23F32E6AA0B; Mon, 4 Dec 2017 20:54:03 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23905E6AA0A for ; Mon, 4 Dec 2017 20:54:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5B4D7923A for ; Mon, 4 Dec 2017 20:54:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22b.google.com with SMTP id b5so16166013itc.3 for ; Mon, 04 Dec 2017 12:54:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=v3MX5iZVBo0KainN/yH9ihHbWGg+JVA//jdXyZcL4xc=; b=gXabySjk4LV0TyDrdV7MRaD5w5/k1UBMtRv6tQrKutopJJFPKtv8f+7yCLNkw82W2M FEOB54pVUbAKwP9v1z5PtL0l2gsfqFXp424YaQDlULra6jt5zHlzjtAR3vzEeGeZJK+6 XqmECitf5CsRkjQ9O8SxMT5Mtna23NPhKZHjwmUf/nAuacgoQscCdKqSjCpkQAa8tfqV VOP/ByBF+wXcuZO8c9W146Lbyl6U9Jjv0PZ0nJxcI55FUZljKL1mX8vq0CmxjeDj7Exk nQtGByWIYoJO+e4IFinD1DAlHm+g0XR+G5KWGhKNnDlJ14lPerzKXyUHHqBSnnwDp2MO t4LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=v3MX5iZVBo0KainN/yH9ihHbWGg+JVA//jdXyZcL4xc=; b=qo/TJtARNWlOmmWXfTRxuDeLfTN6ewSSXvV4ClW81/CVzGGFGs4ZD3Lap1kv3WXP5D jtYHD9pwO5c0aTLFC/jHKcW4GCy1lUgaQ60a9J5LucHISpULRQ3BZSpAwiy+hIvZJ5kZ dPY9Hj7Lnekcy05tUrLJ6G6CNFEB8C35+IZzZGlN62SBoVQio0X2bjIUqoAXm72+jWWp Qstst1NI64XXRIazbJ5WSi6BXP++ebldmgmVrSI6cgnDJHqwWcmRRWJlJql4JUaK200l SShilXczO9jp1RiP1IvP56/pisbM0HXTCNuqgP4RzowlNogav34pYUl7JKfDHAmPIboL dP8Q== X-Gm-Message-State: AKGB3mI57PigItjx7itgOhy9tO+xCJKvK5wgD9VJIq/VWwh9JB5Ceyst hNz+pm+W8F+U/mK7Kc1CKDWHUW54naUtdzLF6x7+ug== X-Google-Smtp-Source: AGs4zMZA/jB2DKd1LBdXpSkCOxdTgwpk1fYDPZSaTbwSevG/WgW57Z8QWlIF/yffhyEzQihonDtkrKExEylGlKxgrX0= X-Received: by 10.36.147.193 with SMTP id y184mr6019889itd.64.1512420842063; Mon, 04 Dec 2017 12:54:02 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Mon, 4 Dec 2017 12:54:00 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: <201712042023.vB4KNC0e072391@slippy.cwsent.com> References: <201712042023.vB4KNC0e072391@slippy.cwsent.com> From: Warner Losh Date: Mon, 4 Dec 2017 13:54:00 -0700 X-Google-Sender-Auth: 8OsbiFuJLNdG6nGFOf21tEjiQBw Message-ID: Subject: Re: Deprecating / Removing floppy drive support To: Cy Schubert Cc: Alex Kozlov , Willem Jan Withagen , "arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 20:54:03 -0000 On Mon, Dec 4, 2017 at 1:23 PM, Cy Schubert wrote: > In message 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 > > 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