From owner-freebsd-stable Mon Apr 10 2:44:32 2000 Delivered-To: freebsd-stable@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 03BDF37B8B0; Mon, 10 Apr 2000 02:44:28 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e3AAB0I00157; Mon, 10 Apr 2000 03:11:00 -0700 (PDT) Date: Mon, 10 Apr 2000 03:11:00 -0700 From: Alfred Perlstein To: msmith@freebsd.org Cc: stable@freebsd.org Subject: Mini amr MFC? Message-ID: <20000410031100.S4381@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike, I've been really busy over here with a _lot_ of things. :) Anyhow, I wasn't able to follow the entire thread about resolving the lockups with the amr driver (I was getting lockups as well). The gist I got from what I was able to skim was that the deciding change that made it stable was simply limiting the commands to AMR_LIMITCMD (120). Anyhow, here's a diff, I plan to commit it asap if my box survives a cvs up off a local repo after patching, or would that not solve the problem in RELENG_4? Index: amr.c =================================================================== RCS file: /home/ncvs/src/sys/dev/amr/amr.c,v retrieving revision 1.7 diff -u -r1.7 amr.c --- amr.c 2000/02/17 23:33:57 1.7 +++ amr.c 2000/04/10 09:35:47 @@ -698,7 +698,11 @@ ae->ae_adapter.aa_memorysize); } sc->amr_maxdrives = 8; - sc->amr_maxio = ae->ae_adapter.aa_maxio; + /* + * Cap the maximum number of outstanding I/Os. AMI's Linux driver doesn't trust + * the controller's reported value, and lockups have been seen when we do. + */ + sc->amr_maxio = imin(ae->ae_adapter.aa_maxio, AMR_LIMITCMD); for (i = 0; i < ae->ae_ldrv.al_numdrives; i++) { sc->amr_drive[i].al_size = ae->ae_ldrv.al_size[i]; sc->amr_drive[i].al_state = ae->ae_ldrv.al_state[i]; Index: amrvar.h =================================================================== RCS file: /home/ncvs/src/sys/dev/amr/amrvar.h,v retrieving revision 1.2 diff -u -r1.2 amrvar.h --- amrvar.h 1999/10/26 23:18:57 1.2 +++ amrvar.h 2000/04/10 09:34:28 @@ -38,6 +38,7 @@ #define AMR_SIGNATURE 0x3344 #define AMR_MAXCMD 255 /* ident = 0 not allowed */ +#define AMR_LIMITCMD 120 #define AMR_MAXLD 40 #define AMR_BLKSIZE 512 -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message