From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 00:21:13 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0240716A4A7 for ; Mon, 20 Nov 2006 00:21:13 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E77843F54 for ; Mon, 20 Nov 2006 00:17:28 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (localhost [127.0.0.1]) by ns1.feral.com (8.13.8/8.13.8) with ESMTP id kAK0HPER045258 for ; Sun, 19 Nov 2006 16:17:35 -0800 (PST) (envelope-from mjacob@freebsd.org) Received: from localhost (mjacob@localhost) by ns1.feral.com (8.13.8/8.13.8/Submit) with ESMTP id kAK0HPsP045255 for ; Sun, 19 Nov 2006 16:17:25 -0800 (PST) (envelope-from mjacob@freebsd.org) X-Authentication-Warning: ns1.feral.com: mjacob owned process doing -bs Date: Sun, 19 Nov 2006 16:17:25 -0800 (PST) From: mjacob@freebsd.org X-X-Sender: mjacob@ns1.feral.com To: freebsd-scsi@freebsd.org Message-ID: <20061119161631.L44297@ns1.feral.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mjacob@freebsd.org List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 00:21:13 -0000 There are *far* too many: xpt_print_path(path); printf("foo\n"); constructs. How about we just join them? ==== //depot/projects/newisp/cam/cam_xpt.c#12 - /home/FreeBSD/p4/newisp/cam/cam_xpt.c ==== @@ -63,6 +63,7 @@ #include #include #include +#include /* for xpt_print below */ #include "opt_cam.h" /* Datastructures internal to the xpt layer */ @@ -4160,6 +4161,16 @@ } } +void +xpt_print(struct cam_path *path, const char *fmt, ...) +{ + va_list ap; + xpt_print_path(path); + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); +} + ==== //depot/projects/newisp/cam/cam_xpt.h#1 - /home/FreeBSD/p4/newisp/cam/cam_xpt.h ==== @@ -62,6 +62,7 @@ int xpt_path_comp(struct cam_path *path1, struct cam_path *path2); void xpt_print_path(struct cam_path *path); +void xpt_print(struct cam_path *path, const char *fmt, ...); int xpt_path_string(struct cam_path *path, char *str, size_t str_len); path_id_t xpt_path_path_id(struct cam_path *path); From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 00:33:09 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B338216A4D1 for ; Mon, 20 Nov 2006 00:33:09 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.233]) by mx1.FreeBSD.org (Postfix) with ESMTP id 89F8243D76 for ; Mon, 20 Nov 2006 00:30:50 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1400600wxc for ; Sun, 19 Nov 2006 16:31:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Xaqn24iJe0I9CKwYFTobF2qmlFQv2YJVaZEyUgqFWjvsODu3Gb7O5uH53a4BrexhvfPydbLP+3NAgHTc9dv/x4K0HuDSnN9LlRaNTqnd0wtoJkERrYF9wtxLIZJu3iHjnBezv1eDKAA837sQ5+RP20tLmbc5SGDx7zy3YI+VedE= Received: by 10.70.111.2 with SMTP id j2mr8477756wxc.1163982661209; Sun, 19 Nov 2006 16:31:01 -0800 (PST) Received: by 10.70.12.2 with HTTP; Sun, 19 Nov 2006 16:31:01 -0800 (PST) Message-ID: <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> Date: Mon, 20 Nov 2006 01:31:01 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: mjacob@freebsd.org In-Reply-To: <20061119161631.L44297@ns1.feral.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061119161631.L44297@ns1.feral.com> X-Google-Sender-Auth: ca1ee6506469e21b Cc: freebsd-scsi@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 00:33:09 -0000 2006/11/20, mjacob@freebsd.org : > There are *far* too many: > > xpt_print_path(path); > printf("foo\n"); > > constructs. How about we just join them? > > ==== //depot/projects/newisp/cam/cam_xpt.c#12 - /home/FreeBSD/p4/newisp/cam/cam_xpt.c ==== > @@ -63,6 +63,7 @@ > #include > #include > #include > +#include /* for xpt_print below */ > #include "opt_cam.h" > > /* Datastructures internal to the xpt layer */ > @@ -4160,6 +4161,16 @@ > } > } > > +void > +xpt_print(struct cam_path *path, const char *fmt, ...) > +{ > + va_list ap; > + xpt_print_path(path); > + va_start(ap, fmt); > + vprintf(fmt, ap); > + va_end(ap); > +} > + > ==== //depot/projects/newisp/cam/cam_xpt.h#1 - /home/FreeBSD/p4/newisp/cam/cam_xpt.h ==== > @@ -62,6 +62,7 @@ > int xpt_path_comp(struct cam_path *path1, > struct cam_path *path2); > void xpt_print_path(struct cam_path *path); > +void xpt_print(struct cam_path *path, const char *fmt, ...); > int xpt_path_string(struct cam_path *path, char *str, > size_t str_len); > path_id_t xpt_path_path_id(struct cam_path *path); Would not be better a preprocessing stub? something like: #define XPT_PRINT(path, fmt, ...) do { \ xpt_print_path(path); \ printf(fmt, __VA_ARGS__); \ } while (0) -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 00:46:23 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70C4E16A47C; Mon, 20 Nov 2006 00:46:23 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB67E43D64; Mon, 20 Nov 2006 00:46:07 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (localhost [127.0.0.1]) by ns1.feral.com (8.13.8/8.13.8) with ESMTP id kAK0kA5g045408; Sun, 19 Nov 2006 16:46:20 -0800 (PST) (envelope-from mjacob@freebsd.org) Received: from localhost (mjacob@localhost) by ns1.feral.com (8.13.8/8.13.8/Submit) with ESMTP id kAK0kArd045405; Sun, 19 Nov 2006 16:46:10 -0800 (PST) (envelope-from mjacob@freebsd.org) X-Authentication-Warning: ns1.feral.com: mjacob owned process doing -bs Date: Sun, 19 Nov 2006 16:46:10 -0800 (PST) From: mjacob@freebsd.org X-X-Sender: mjacob@ns1.feral.com To: Attilio Rao In-Reply-To: <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> Message-ID: <20061119164455.I44297@ns1.feral.com> References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-scsi@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mjacob@freebsd.org List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 00:46:23 -0000 > Would not be better a preprocessing stub? > > something like: > > #define XPT_PRINT(path, fmt, ...) do { > \ > xpt_print_path(path); > \ > printf(fmt, __VA_ARGS__); > \ > } while (0) > Well, it's uglier (IMO0, doesn't get formal checking (which I forgot to add to the define in cam_xpt.h), and you can't port it to systems that have an older compiler. Other than that, it's probably better. From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 00:57:15 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9753A16A47B for ; Mon, 20 Nov 2006 00:57:15 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83ECB43D5F for ; Mon, 20 Nov 2006 00:56:56 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1405054wxc for ; Sun, 19 Nov 2006 16:57:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=KJoUFK0LKdy5o6nYpgSikQAK1ur7Tj+h1+OiQEniPiq1UfQ/Mo4kjBAjCsHVOqd0sv5GnhFORzacAm6s2U0iUHxolV3cSWHMDoI/9Nm0fhtA6C+rmX4YYo8gHUXIwbEV39PYc4mciPyvC1tMTYPW/DvwvBe9ErzoA2eTox3iGtk= Received: by 10.70.61.1 with SMTP id j1mr3838576wxa.1163984227675; Sun, 19 Nov 2006 16:57:07 -0800 (PST) Received: by 10.70.12.2 with HTTP; Sun, 19 Nov 2006 16:57:07 -0800 (PST) Message-ID: <3bbf2fe10611191657gaaf90ecyd6ac3e41ae59992f@mail.gmail.com> Date: Mon, 20 Nov 2006 01:57:07 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: mjacob@freebsd.org In-Reply-To: <20061119164455.I44297@ns1.feral.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061119164455.I44297@ns1.feral.com> X-Google-Sender-Auth: f85ffa70e82df663 Cc: freebsd-scsi@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 00:57:15 -0000 2006/11/20, mjacob@freebsd.org : > > > Would not be better a preprocessing stub? > > > > something like: > > > > #define XPT_PRINT(path, fmt, ...) do { > > \ > > xpt_print_path(path); > > \ > > printf(fmt, __VA_ARGS__); > > \ > > } while (0) > > > > Well, it's uglier (IMO0, doesn't get formal checking (which I forgot to > add to the define in cam_xpt.h), and you can't port it to systems that > have an older compiler. Other than that, it's probably better. Erm, we make large use of variadic macros into the code :) Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 01:07:06 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1AB2E16A47B; Mon, 20 Nov 2006 01:07:06 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9A1943D6D; Mon, 20 Nov 2006 01:06:44 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (localhost [127.0.0.1]) by ns1.feral.com (8.13.8/8.13.8) with ESMTP id kAK16lDG045495; Sun, 19 Nov 2006 17:06:57 -0800 (PST) (envelope-from mjacob@freebsd.org) Received: from localhost (mjacob@localhost) by ns1.feral.com (8.13.8/8.13.8/Submit) with ESMTP id kAK16lOv045492; Sun, 19 Nov 2006 17:06:47 -0800 (PST) (envelope-from mjacob@freebsd.org) X-Authentication-Warning: ns1.feral.com: mjacob owned process doing -bs Date: Sun, 19 Nov 2006 17:06:47 -0800 (PST) From: mjacob@freebsd.org X-X-Sender: mjacob@ns1.feral.com To: Attilio Rao In-Reply-To: <3bbf2fe10611191657gaaf90ecyd6ac3e41ae59992f@mail.gmail.com> Message-ID: <20061119170554.K45489@ns1.feral.com> References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061119164455.I44297@ns1.feral.com> <3bbf2fe10611191657gaaf90ecyd6ac3e41ae59992f@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-scsi@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mjacob@freebsd.org List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 01:07:06 -0000 > Erm, we make large use of variadic macros into the code :) Yes. I think that if the code is never going to get backported to FBSD5 or earlier, it's probably fair enough to use, but for the aesthetics. From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 01:19:52 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 945FA16A523; Mon, 20 Nov 2006 01:19:52 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id D272443DBA; Mon, 20 Nov 2006 01:16:42 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id kAK1GYxH053491; Sun, 19 Nov 2006 18:16:39 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <456101EF.1070609@samsco.org> Date: Sun, 19 Nov 2006 18:16:31 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5 MIME-Version: 1.0 To: mjacob@freebsd.org References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061119164455.I44297@ns1.feral.com> <3bbf2fe10611191657gaaf90ecyd6ac3e41ae59992f@mail.gmail.com> <20061119170554.K45489@ns1.feral.com> In-Reply-To: <20061119170554.K45489@ns1.feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: Attilio Rao , freebsd-scsi@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 01:19:52 -0000 mjacob@freebsd.org wrote: > >> Erm, we make large use of variadic macros into the code :) > > Yes. I think that if the code is never going to get backported to FBSD5 > or earlier, it's probably fair enough to use, but for the aesthetics. You mean FreeBSD 4 or FreeBSD 5? CAM is about to be pretty unportable back to FreeBSD 4 for other reasons. Scott From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 03:06:19 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 995DA16A403; Mon, 20 Nov 2006 03:06:19 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E112D43D7D; Mon, 20 Nov 2006 03:06:03 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from ns1.feral.com (localhost [127.0.0.1]) by ns1.feral.com (8.13.8/8.13.8) with ESMTP id kAK3667a049839; Sun, 19 Nov 2006 19:06:16 -0800 (PST) (envelope-from mjacob@freebsd.org) Received: from localhost (mjacob@localhost) by ns1.feral.com (8.13.8/8.13.8/Submit) with ESMTP id kAK365ST049836; Sun, 19 Nov 2006 19:06:06 -0800 (PST) (envelope-from mjacob@freebsd.org) X-Authentication-Warning: ns1.feral.com: mjacob owned process doing -bs Date: Sun, 19 Nov 2006 19:06:05 -0800 (PST) From: mjacob@freebsd.org X-X-Sender: mjacob@ns1.feral.com To: Scott Long In-Reply-To: <456101EF.1070609@samsco.org> Message-ID: <20061119190530.K49835@ns1.feral.com> References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061119164455.I44297@ns1.feral.com> <3bbf2fe10611191657gaaf90ecyd6ac3e41ae59992f@mail.gmail.com> <20061119170554.K45489@ns1.feral.com> <456101EF.1070609@samsco.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Attilio Rao , freebsd-scsi@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mjacob@freebsd.org List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 03:06:19 -0000 > mjacob@freebsd.org wrote: >> >>> Erm, we make large use of variadic macros into the code :) >> >> Yes. I think that if the code is never going to get backported to FBSD5 or >> earlier, it's probably fair enough to use, but for the aesthetics. > > You mean FreeBSD 4 or FreeBSD 5? CAM is about to be pretty unportable back > to FreeBSD 4 for other reasons. Ah, err, large chunks of it *do* go back. From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 09:54:47 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30A8516A40F for ; Mon, 20 Nov 2006 09:54:47 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCE2643D45 for ; Mon, 20 Nov 2006 09:54:31 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 97797170C0 for ; Mon, 20 Nov 2006 09:54:45 +0000 (UTC) To: scsi@freebsd.org From: Poul-Henning Kamp Date: Mon, 20 Nov 2006 09:54:43 +0000 Message-ID: <3819.1164016483@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Subject: ahc doesn't attach in Tyan S2882 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 09:54:47 -0000 ahc0: mem 0x80004010-0x8000401f irq 21 at device 3.0 on pci1 ahc0: Defaulting to MEMIO on pci1: child ahc0 requested type 3 for rid 0x14, but the BAR says it is an ioport pcib3: ahc0 requested I/O range 0x8000-0x8fff: in range ahc0: Lazy allocation of 0x4 bytes rid 0x10 type 4 at 0x8000 ahc0: PCI Device 1:3:0 failed I/O mapped test. ahc0: can't allocate register resources ahc0@pci1:3:0: class=0x010000 card=0x62a19005 chip=0x00819005 rev=0x02 hdr=0x00 vendor = 'Adaptec Inc' device = '19160 AIC-7892B Ultra160 SCSI Adapter' class = mass storage subclass = SCSI -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 11:09:36 2006 Return-Path: X-Original-To: freebsd-scsi@FreeBSD.org Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E23E16A536 for ; Mon, 20 Nov 2006 11:09:36 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7A0943D82 for ; Mon, 20 Nov 2006 11:08:11 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kAKB8QGb001609 for ; Mon, 20 Nov 2006 11:08:26 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kAKB8P8P001605 for freebsd-scsi@FreeBSD.org; Mon, 20 Nov 2006 11:08:25 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 20 Nov 2006 11:08:25 GMT Message-Id: <200611201108.kAKB8P8P001605@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 11:09:36 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/27059 scsi [sym] SCSI subsystem hangs under heavy load on (Server o kern/28508 scsi problems with backup to Tandberg SLR40 strimmer o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/40895 scsi wierd kernel / device driver bug o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o kern/60598 scsi wire down of scsi devices conflicts with config o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 o kern/81887 scsi [aac] Adaptec SCSI 2130S aac0: GetDeviceProbeInfo comm o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/93128 scsi [sym] FreeBSD 6.1 BETA 1 has problems with Symbios/LSI o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/99954 scsi [ahc] reading from DVD failes on 6.x (regression) 16 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/23314 scsi aic driver fails to detect Adaptec 1520B unless PnP is o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce o kern/38828 scsi [feature request] DPT PM2012B/90 doesn't work o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/96133 scsi [scsi] [patch] add scsi quirk for joyfly 128mb flash u o kern/103702 scsi [cam] [patch] ChipsBnk: Unsupported USB memory stick 7 problems total. From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 22:12:24 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7B0216A417; Mon, 20 Nov 2006 22:12:23 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from na.iowatelecom.net (na.iowatelecom.net [69.66.0.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id C472943D83; Mon, 20 Nov 2006 22:11:42 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by na.iowatelecom.net (8.13.6/8.12.10) with ESMTP id kAKM7tQQ009950; Mon, 20 Nov 2006 16:07:55 -0600 Received: from na.iowatelecom.net ([127.0.0.1]) by localhost (na.iowatelecom.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09611-01; Mon, 20 Nov 2006 16:07:54 -0600 (CST) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by na.iowatelecom.net (8.13.6/8.13.1) with ESMTP id kAKM7oMO009925; Mon, 20 Nov 2006 16:07:54 -0600 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id kAKMBr6x005361; Mon, 20 Nov 2006 16:11:53 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id kAKMBrtn005360; Mon, 20 Nov 2006 16:11:53 -0600 (CST) (envelope-from brooks) Date: Mon, 20 Nov 2006 16:11:53 -0600 From: Brooks Davis To: Attilio Rao Message-ID: <20061120221153.GA5155@lor.one-eyed-alien.net> References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WIyZ46R2i8wDzkSu" Content-Disposition: inline In-Reply-To: <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at iowatelecom.net Cc: freebsd-scsi@freebsd.org, mjacob@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 22:12:24 -0000 --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 20, 2006 at 01:31:01AM +0100, Attilio Rao wrote: > 2006/11/20, mjacob@freebsd.org : > >There are *far* too many: > > > > xpt_print_path(path); > > printf("foo\n"); > > > >constructs. How about we just join them? > > > >=3D=3D=3D=3D //depot/projects/newisp/cam/cam_xpt.c#12 -=20 > >/home/FreeBSD/p4/newisp/cam/cam_xpt.c =3D=3D=3D=3D > >@@ -63,6 +63,7 @@ > > #include > > #include > > #include > >+#include /* for xpt_print below */ > > #include "opt_cam.h" > > > > /* Datastructures internal to the xpt layer */ > >@@ -4160,6 +4161,16 @@ > > } > > } > > > >+void > >+xpt_print(struct cam_path *path, const char *fmt, ...) > >+{ > >+ va_list ap; > >+ xpt_print_path(path); > >+ va_start(ap, fmt); > >+ vprintf(fmt, ap); > >+ va_end(ap); > >+} > >+ > >=3D=3D=3D=3D //depot/projects/newisp/cam/cam_xpt.h#1 -=20 > >/home/FreeBSD/p4/newisp/cam/cam_xpt.h =3D=3D=3D=3D > >@@ -62,6 +62,7 @@ > > int xpt_path_comp(struct cam_path *path1, > > struct cam_path *path2); > > void xpt_print_path(struct cam_path *path); > >+void xpt_print(struct cam_path *path, const char *fmt= ,=20 > >...); > > int xpt_path_string(struct cam_path *path, char *str, > > size_t str_len); > > path_id_t xpt_path_path_id(struct cam_path *path); >=20 > Would not be better a preprocessing stub? >=20 > something like: >=20 > #define XPT_PRINT(path, fmt, ...) do { > \ > xpt_print_path(path); > \ > printf(fmt, __VA_ARGS__); > \ > } while (0) Why? What is gained? FWIW, when I added if_printif it reduced kernel size by several KB. If there's a similar effect here we should take advantage of it. -- Brooks --WIyZ46R2i8wDzkSu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFYigpXY6L6fI4GtQRArVnAJ4tOroU+bqtgffUeyfDaQv2EGM6CACdH4VV g3nXZkqGc13jTMxLJFD0d9A= =J5U+ -----END PGP SIGNATURE----- --WIyZ46R2i8wDzkSu-- From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 22:18:51 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8394716A407 for ; Mon, 20 Nov 2006 22:18:51 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 707CD43D73 for ; Mon, 20 Nov 2006 22:18:32 +0000 (GMT) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1699050wxc for ; Mon, 20 Nov 2006 14:18:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=PJCnG0mAGgRT6wrXLFmB4zoqTJIKJRtyescqpnba4m/R08tAjrLOZMSSsjc749N2AwcIcpXczFKU1hVMm/iu3qUzAVHHhQx40cISclNkV+a2afT5kzmfLfRscsuelE0uje2i8NLSzCVZpanPRC/OqK1Gr/tulxSWGKkOTEC9wpE= Received: by 10.70.117.1 with SMTP id p1mr1444861wxc.1164061123769; Mon, 20 Nov 2006 14:18:43 -0800 (PST) Received: by 10.70.12.2 with HTTP; Mon, 20 Nov 2006 14:18:43 -0800 (PST) Message-ID: <3bbf2fe10611201418m15d50703m37d9d5620e5c832d@mail.gmail.com> Date: Mon, 20 Nov 2006 23:18:43 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Brooks Davis" In-Reply-To: <20061120221153.GA5155@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061120221153.GA5155@lor.one-eyed-alien.net> X-Google-Sender-Auth: 003ec0948c0bb350 Cc: freebsd-scsi@freebsd.org, mjacob@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 22:18:51 -0000 2006/11/20, Brooks Davis : > On Mon, Nov 20, 2006 at 01:31:01AM +0100, Attilio Rao wrote: > > 2006/11/20, mjacob@freebsd.org : > > >There are *far* too many: > > > > > > xpt_print_path(path); > > > printf("foo\n"); > > > > > >constructs. How about we just join them? > > > > > >==== //depot/projects/newisp/cam/cam_xpt.c#12 - > > >/home/FreeBSD/p4/newisp/cam/cam_xpt.c ==== > > >@@ -63,6 +63,7 @@ > > > #include > > > #include > > > #include > > >+#include /* for xpt_print below */ > > > #include "opt_cam.h" > > > > > > /* Datastructures internal to the xpt layer */ > > >@@ -4160,6 +4161,16 @@ > > > } > > > } > > > > > >+void > > >+xpt_print(struct cam_path *path, const char *fmt, ...) > > >+{ > > >+ va_list ap; > > >+ xpt_print_path(path); > > >+ va_start(ap, fmt); > > >+ vprintf(fmt, ap); > > >+ va_end(ap); > > >+} > > >+ > > >==== //depot/projects/newisp/cam/cam_xpt.h#1 - > > >/home/FreeBSD/p4/newisp/cam/cam_xpt.h ==== > > >@@ -62,6 +62,7 @@ > > > int xpt_path_comp(struct cam_path *path1, > > > struct cam_path *path2); > > > void xpt_print_path(struct cam_path *path); > > >+void xpt_print(struct cam_path *path, const char *fmt, > > >...); > > > int xpt_path_string(struct cam_path *path, char *str, > > > size_t str_len); > > > path_id_t xpt_path_path_id(struct cam_path *path); > > > > Would not be better a preprocessing stub? > > > > something like: > > > > #define XPT_PRINT(path, fmt, ...) do { > > \ > > xpt_print_path(path); > > \ > > printf(fmt, __VA_ARGS__); > > \ > > } while (0) > > Why? What is gained? FWIW, when I added if_printif it reduced kernel > size by several KB. If there's a similar effect here we should take > advantage of it. It is simply faster (one function calling less), even if probabilly this could be mitigated with -fomit-frame-pointer (IMHO, this is not as over used as if_printf...). Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-scsi@FreeBSD.ORG Mon Nov 20 23:48:20 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04CA616A403; Mon, 20 Nov 2006 23:48:20 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from na.iowatelecom.net (na.iowatelecom.net [69.66.0.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEA7943D58; Mon, 20 Nov 2006 23:48:00 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by na.iowatelecom.net (8.13.6/8.12.10) with ESMTP id kAKNiEO3001128; Mon, 20 Nov 2006 17:44:15 -0600 Received: from na.iowatelecom.net ([127.0.0.1]) by localhost (na.iowatelecom.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30265-11; Mon, 20 Nov 2006 17:44:14 -0600 (CST) Received: from lor.one-eyed-alien.net (grnl-static-02-0046.dsl.iowatelecom.net [69.66.56.110]) by na.iowatelecom.net (8.13.6/8.13.1) with ESMTP id kAKNi6Xk001107; Mon, 20 Nov 2006 17:44:10 -0600 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.8/8.13.8) with ESMTP id kAKNmAfw008177; Mon, 20 Nov 2006 17:48:10 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.8/8.13.8/Submit) id kAKNmABA008176; Mon, 20 Nov 2006 17:48:10 -0600 (CST) (envelope-from brooks) Date: Mon, 20 Nov 2006 17:48:09 -0600 From: Brooks Davis To: Attilio Rao Message-ID: <20061120234809.GB5155@lor.one-eyed-alien.net> References: <20061119161631.L44297@ns1.feral.com> <3bbf2fe10611191631h6883b862uf8088533913a7bc6@mail.gmail.com> <20061120221153.GA5155@lor.one-eyed-alien.net> <3bbf2fe10611201418m15d50703m37d9d5620e5c832d@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: <3bbf2fe10611201418m15d50703m37d9d5620e5c832d@mail.gmail.com> User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at iowatelecom.net Cc: freebsd-scsi@freebsd.org, mjacob@freebsd.org Subject: Re: a code reduction function addition to cam_xpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Nov 2006 23:48:20 -0000 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 20, 2006 at 11:18:43PM +0100, Attilio Rao wrote: > 2006/11/20, Brooks Davis : > >On Mon, Nov 20, 2006 at 01:31:01AM +0100, Attilio Rao wrote: > >> 2006/11/20, mjacob@freebsd.org : > >> >There are *far* too many: > >> > > >> > xpt_print_path(path); > >> > printf("foo\n"); > >> > > >> >constructs. How about we just join them? > >> > > >> >=3D=3D=3D=3D //depot/projects/newisp/cam/cam_xpt.c#12 - > >> >/home/FreeBSD/p4/newisp/cam/cam_xpt.c =3D=3D=3D=3D > >> >@@ -63,6 +63,7 @@ > >> > #include > >> > #include > >> > #include > >> >+#include /* for xpt_print below */ > >> > #include "opt_cam.h" > >> > > >> > /* Datastructures internal to the xpt layer */ > >> >@@ -4160,6 +4161,16 @@ > >> > } > >> > } > >> > > >> >+void > >> >+xpt_print(struct cam_path *path, const char *fmt, ...) > >> >+{ > >> >+ va_list ap; > >> >+ xpt_print_path(path); > >> >+ va_start(ap, fmt); > >> >+ vprintf(fmt, ap); > >> >+ va_end(ap); > >> >+} > >> >+ > >> >=3D=3D=3D=3D //depot/projects/newisp/cam/cam_xpt.h#1 - > >> >/home/FreeBSD/p4/newisp/cam/cam_xpt.h =3D=3D=3D=3D > >> >@@ -62,6 +62,7 @@ > >> > int xpt_path_comp(struct cam_path *path1, > >> > struct cam_path *path2); > >> > void xpt_print_path(struct cam_path *path); > >> >+void xpt_print(struct cam_path *path, const char= =20 > >*fmt, > >> >...); > >> > int xpt_path_string(struct cam_path *path, char= =20 > >*str, > >> > size_t str_len); > >> > path_id_t xpt_path_path_id(struct cam_path *path); > >> > >> Would not be better a preprocessing stub? > >> > >> something like: > >> > >> #define XPT_PRINT(path, fmt, ...) do { > >> \ > >> xpt_print_path(path); > >> \ > >> printf(fmt, __VA_ARGS__); > >> \ > >> } while (0) > > > >Why? What is gained? FWIW, when I added if_printif it reduced kernel > >size by several KB. If there's a similar effect here we should take > >advantage of it. >=20 > It is simply faster (one function calling less), even if probabilly > this could be mitigated with -fomit-frame-pointer (IMHO, this is not > as over used as if_printf...). There's not possibly way you could measure a meaningful difference in performance except in a case where the system was unusable because it spent all its time blocked waiting for the console to update. -- Brooks --rJwd6BRFiFCcLxzm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFYj65XY6L6fI4GtQRAn+lAKDkgNWSQwKZaR8la5NCOG/Z/L1HygCbB7FL ySV96+J2Gr3AyAJ8QjFDlXg= =BkUa -----END PGP SIGNATURE----- --rJwd6BRFiFCcLxzm-- From owner-freebsd-scsi@FreeBSD.ORG Tue Nov 21 17:29:40 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E359016AA53; Tue, 21 Nov 2006 17:28:30 +0000 (UTC) (envelope-from Johannes.Kruger@nokia.com) Received: from mgw-ext12.nokia.com (mgw-ext12.nokia.com [131.228.20.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id D387543D82; Tue, 21 Nov 2006 17:27:59 +0000 (GMT) (envelope-from Johannes.Kruger@nokia.com) Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-ext12.nokia.com (Switch-3.1.10/Switch-3.1.10) with ESMTP id kALHR313008894; Tue, 21 Nov 2006 19:28:18 +0200 Received: from daebh102.NOE.Nokia.com ([10.241.35.112]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 21 Nov 2006 19:26:38 +0200 Received: from daebe102.NOE.Nokia.com ([10.241.35.115]) by daebh102.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 21 Nov 2006 11:26:23 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 21 Nov 2006 11:26:25 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: CAM_NEW_TRAN Thread-Index: Acb5/hoYxESEZOImQZqhF+h26wUNXgAEbNCgBN/5wBA= From: To: , X-OriginalArrivalTime: 21 Nov 2006 17:26:23.0716 (UTC) FILETIME=[2AC30A40:01C70D92] X-Nokia-AV: Clean Cc: Johannes.Kruger@nokia.com Subject: RE: CAM_NEW_TRAN X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Nov 2006 17:29:40 -0000 Hi Matthew. I tried forcing a core dump on the LSI-1064 and LSI-1064E controller. It does not seem to work via the mpt driver. The core dump is set to go to the usual place, the swap partition. # mount /dev/da0s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/da0s1e on /tmp (ufs, local, soft-updates) /dev/da0s1f on /usr (ufs, local, soft-updates) /dev/da0s1d on /var (ufs, local, soft-updates) No RAID setup, just normal SATA disk on PHY0, works fine except for core dump. Did a bit of debug checking: I see that interrupts are turned of when doing a core dump. This looks ok since I see there is polling routines registered, and I can see them being called also. The message with what it fails is: ------------------ snip --------------------- Aborting dump due to I/O error. status =3D=3D 0x58, scsi status =3D=3D 0x0 i/o error Rebooting... ------------------ snip --------------------- I added some debugging code and it looks like it calls mpt_intr lots of times, and also mpt_action, which is correct. After looping (or entering via polling) the mpt_intr routine multiple times, the bit MPI_ADDRESS_REPLY_A_BIT is set. The execution path in "mpt_scsi_reply_handler" changes from a "context only reply" to a call to do "mpt_scsi_reply_frame_handler". In this "mpt_scsi_reply_frame_handler" call the ioc_status =3D 0x4b = which is: #define MPI_IOCSTATUS_SCSI_IOC_TERMINATED (0x004B) Any idea why this happens ? Thanks Johan . From owner-freebsd-scsi@FreeBSD.ORG Wed Nov 22 04:18:15 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DD44816A403 for ; Wed, 22 Nov 2006 04:18:15 +0000 (UTC) (envelope-from lists@stringsutils.com) Received: from zoraida.natserv.net (p65-147.acedsl.com [66.114.65.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5013A43D55 for ; Wed, 22 Nov 2006 04:17:49 +0000 (GMT) (envelope-from lists@stringsutils.com) Received: from zoraida.natserv.net (localhost.natserv.net [127.0.0.1]) by zoraida.natserv.net (Postfix) with ESMTP id 83F27B88A for ; Tue, 21 Nov 2006 23:18:11 -0500 (EST) Received: from zoraida.natserv.net (zoraida.natserv.net [66.114.65.147]) by zoraida.natserv.net (Postfix) with ESMTP id 4A19CB889 for ; Tue, 21 Nov 2006 23:18:11 -0500 (EST) Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Francisco Reyes To: FreeBSD SCSI list Date: Tue, 21 Nov 2006 23:18:11 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit Subject: State of SCSI controllers for FreeBSD? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 04:18:15 -0000 Recently got a machine with an Adaptec 2130SLP. The port for aaccli did not work in i386+PAE. After working with the machine vendor got a new version of aaccli that partialy worked with AMD64. Many commands just freezed up. Today moved the machine from a stagin area to the rack and after that the aaccli program now stopped working. Any vendor in the SCSI arena that has a good working CLI or web app for FreeBSD? Looking through the archives I see that LSI is mentioned as working well for the most part. Anyone can comment on that brand or any other that is working well for FreeBSD? From owner-freebsd-scsi@FreeBSD.ORG Wed Nov 22 16:16:18 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D59C516A51E; Wed, 22 Nov 2006 16:16:18 +0000 (UTC) (envelope-from Johannes.Kruger@nokia.com) Received: from mgw-ext13.nokia.com (mgw-ext13.nokia.com [131.228.20.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC1A843D45; Wed, 22 Nov 2006 16:15:48 +0000 (GMT) (envelope-from Johannes.Kruger@nokia.com) Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-ext13.nokia.com (Switch-3.1.10/Switch-3.1.10) with ESMTP id kAMEktJZ027876; Wed, 22 Nov 2006 16:48:59 +0200 Received: from daebh101.NOE.Nokia.com ([10.241.35.111]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 22 Nov 2006 16:46:59 +0200 Received: from daebe102.NOE.Nokia.com ([10.241.35.115]) by daebh101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 22 Nov 2006 08:46:55 -0600 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Wed, 22 Nov 2006 08:46:54 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Core dumps not working via scsi_da and mpt driver Thread-Index: Acb5/hoYxESEZOImQZqhF+h26wUNXgAEbNCgBN/5wBAALQTVMA== From: To: , , , X-OriginalArrivalTime: 22 Nov 2006 14:46:55.0301 (UTC) FILETIME=[0DF48750:01C70E45] X-Nokia-AV: Clean Cc: Subject: Core dumps not working via scsi_da and mpt driver X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 16:16:18 -0000 Forcing a graceful panic, the exact message I get is: --------------- snip -------------------- # sysctl -w debug.kdb.panic=3D1 debug.kdb.panic: 0panic: kdb_sysctl_panic cpuid =3D 0 KDB: enter: panic [thread pid 3438 tid 100053 ] Stopped at kdb_enter+0x2b: nop db> panic cpuid =3D 0 Uptime: 21h29m12s Physical memory: 501 MB Dumping 75 MB:Aborting dump due to I/O error. status =3D=3D 0x58, scsi status =3D=3D 0x0 ** DUMP FAILED (ERROR 5) ** Automatic reboot in 15 seconds - press a key on the console to abort --------------- snip -------------------- The string "Aborting dump due to I/O error" is reported by scsi_da.c Johan -----Original Message----- From: Kruger Johannes (Nokia-ES/Boston)=20 Sent: Tuesday, November 21, 2006 12:26 PM To: 'mjacob@freebsd.org'; 'freebsd-scsi@freebsd.org' Cc: Kruger Johannes (Nokia-ES/Boston) Subject: RE: CAM_NEW_TRAN Hi Matthew. I tried forcing a core dump on the LSI-1064 and LSI-1064E controller. It does not seem to work via the mpt driver. The core dump is set to go to the usual place, the swap partition. # mount /dev/da0s1a on / (ufs, local) devfs on /dev (devfs, local) /dev/da0s1e on /tmp (ufs, local, soft-updates) /dev/da0s1f on /usr (ufs, local, soft-updates) /dev/da0s1d on /var (ufs, local, soft-updates) No RAID setup, just normal SATA disk on PHY0, works fine except for core dump. Did a bit of debug checking: I see that interrupts are turned of when doing a core dump. This looks ok since I see there is polling routines registered, and I can see them being called also. The message with what it fails is: ------------------ snip --------------------- Aborting dump due to I/O error. status =3D=3D 0x58, scsi status =3D=3D 0x0 i/o error Rebooting... ------------------ snip --------------------- I added some debugging code and it looks like it calls mpt_intr lots of times, and also mpt_action, which is correct. After looping (or entering via polling) the mpt_intr routine multiple times, the bit MPI_ADDRESS_REPLY_A_BIT is set. The execution path in "mpt_scsi_reply_handler" changes from a "context only reply" to a call to do "mpt_scsi_reply_frame_handler". In this "mpt_scsi_reply_frame_handler" call the ioc_status =3D 0x4b = which is: #define MPI_IOCSTATUS_SCSI_IOC_TERMINATED (0x004B) Any idea why this happens ? Thanks Johan . From owner-freebsd-scsi@FreeBSD.ORG Thu Nov 23 16:24:28 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 349BB16A40F; Thu, 23 Nov 2006 16:24:28 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04D3043D53; Thu, 23 Nov 2006 16:23:51 +0000 (GMT) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1GnHNC-000C65-4j; Thu, 23 Nov 2006 18:24:26 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-scsi@freebsd.org, freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 23 Nov 2006 18:24:25 +0200 From: Danny Braniss Message-ID: Cc: Subject: iSCSI/shutdown advice needed X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2006 16:24:28 -0000 hi, I'm trying to finish up the iSCSI initiator, and need some advice. To shutdown the initiator, I need to: 1- close down the CAM-peripherals, (ie da) 2- empty up all pending iSCSI transactions 3- close the tcp connection 2 & 3 I can handle, it's 1 that im stuck. Q: how can I call the peripheral close function, or is there some CAM command? I tried xpt_async(AC_LOST_DEVICE, isp->cam_path, NULL); but this it far to drastic, and actually will cause panic if the device is still mounted. danny