From owner-freebsd-scsi@FreeBSD.ORG Mon Jul 22 11:06:51 2013 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8DA004A1 for ; Mon, 22 Jul 2013 11:06:51 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E31E24AD for ; Mon, 22 Jul 2013 11:06:51 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6MB6ptq053824 for ; Mon, 22 Jul 2013 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6MB6pRA053822 for freebsd-scsi@FreeBSD.org; Mon, 22 Jul 2013 11:06:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 22 Jul 2013 11:06:51 GMT Message-Id: <201307221106.r6MB6pRA053822@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Subject: Current problem reports assigned to freebsd-scsi@FreeBSD.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jul 2013 11:06:51 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/179932 scsi [ciss] ciss i/o stall problem with HP Bl Gen8 (and HP o kern/178795 scsi [mps] MSI for mps driver doesn't work under vmware o kern/165982 scsi [mpt] mpt instability, drive resets, and losses on Fre o kern/165740 scsi [cam] SCSI code must drain callbacks before free f kern/162256 scsi [mpt] QUEUE FULL EVENT and 'mpt_cam_event: 0x0' o docs/151336 scsi Missing documentation of scsi_ and ata_ functions in c o kern/148083 scsi [aac] Strange device reporting o kern/144648 scsi [aac] Strange values of speed and bus width in dmesg o kern/142351 scsi [mpt] LSILogic driver performance problems o kern/134488 scsi [mpt] MPT SCSI driver probes max. 8 LUNs per device o kern/130621 scsi [mpt] tranfer rate is inscrutable slow when use lsi213 f kern/129602 scsi [ahd] ahd(4) gets confused and wedges SCSI bus f kern/123674 scsi [ahc] ahc driver dumping o sparc/121676 scsi [iscsi] iscontrol do not connect iscsi-target on sparc 14 problems total. From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 23 07:11:33 2013 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B06A4DA3; Tue, 23 Jul 2013 07:11:33 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4DA202B27; Tue, 23 Jul 2013 07:11:33 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.7/8.14.7) with ESMTP id r6N7BU2e099728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jul 2013 09:11:31 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Tue, 23 Jul 2013 09:11:30 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: scsi@freebsd.org Subject: Re: Please review patch for aic7xxx_pci.c Message-ID: <20130723071129.GD9030@acme.spoerlein.net> References: <20130716094927.GA9030@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130716094927.GA9030@acme.spoerlein.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: gibbs@FreeBSD.org, ken@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 07:11:33 -0000 [adding scsi, it would be nice if I could get another set of eyes on this as I don't have the hardware to test this] On Tue, 2013-07-16 at 11:49:27 +0200, Ulrich Spörlein wrote: > > Hey Justin, Ken, > > Coverity found one more instance of swapped parameters in the kernel, > introduced quite some time ago. It's probably hard to get the hardware > to test this change these days ... > > Please see > https://github.com/uqs/freebsd-head/commit/2f8f438a380c2a52a2e9f266cd716f56c8a4bb75 > and leave comments, or reply to this mail. > > You can see the diff that introduced the problem here: > http://git.freebsd.your.org/gitweb/?p=freebsd.git;a=blobdiff;f=sys/dev/aic7xxx/aic7xxx_pci.c;h=42dcdcc57f09d11199aabd6b224f2dad730f0733;hp=a4c0f4672cab3eb965d7acf1a580162168ca9716;hb=27ca4db2579f6e74861db16299eeb52e158fa7a7;hpb=06842004edacee7beec6cb72239ded59709506a2 > > or here: > > https://github.com/uqs/freebsd-head/commit/9696016b0572574bb656fb109ff2916127fa8cb8 > > Thanks! > Uli From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 23 21:07:34 2013 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 27113E5B; Tue, 23 Jul 2013 21:07:34 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C40CC254D; Tue, 23 Jul 2013 21:07:33 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.7/8.14.7) with ESMTP id r6NL7UNn019377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jul 2013 23:07:30 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Tue, 23 Jul 2013 23:07:30 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: "Justin T. Gibbs" Subject: Re: Please review patch for aic7xxx_pci.c Message-ID: <20130723210730.GF9030@acme.spoerlein.net> References: <20130716094927.GA9030@acme.spoerlein.net> <20130723071129.GD9030@acme.spoerlein.net> <20130723204530.GE9030@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130723204530.GE9030@acme.spoerlein.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 21:07:34 -0000 [adding back scsi@freebsd.org] On Tue, 2013-07-23 at 22:45:30 +0200, Ulrich Spörlein wrote: > Thanks, but maybe it's better to have the discussion here. > > You wrote: > The difference in the argument order between the declaration and definition is > likely what led to this programming error. Your patch should also correct the > argument reversal in the declaration of ahc_9005_subdevinfo_valid(). > > The argument order you've used seems the best choice since it matches what is > used in ahc_compose_id(). > > > > I'm not sure that reversing the arguments in the function definition is > the right way. This would make the patch a no-op. > > Consider the flow pre r95378 > > if (ahc_get_pci_function(pci) > 0 > && subvendor == 0x9005 > && subdevice != device > && SUBID_9005_TYPE_KNOWN(subdevice) != 0 > && SUBID_9005_MFUNCENB(subdevice) == 0) > return (NULL); > > and after r95378 > > if (ahc_get_pci_function(pci) > 0 > && ahc_9005_subdevinfo_valid(vendor, device, subvendor, subdevice) > -> which translates to > if (device == 0x9005 > && subdevice == 0x9005 > && subvendor != vendor > && SUBID_9005_TYPE_KNOWN(subvendor) != 0 > && SUBID_9005_TYPE(subvendor) > && DEVID_9005_TYPE(vendor) == DEVID_9005_TYPE_HBA > && SUBID_9005_MFUNCENB(subdevice) == 0) > return (NULL); > > But this is nonsensical. 0x9005 is the vendor ID for adaptec, > DEVID_9005_TYPE() should test the device id, etc. > > > The strangest part is that, although this function tests for "validity", > when it returns 1 or true, then ahc_find_pci_device() is more likely to > return NULL. This all seems horribly backwards. > > It's unlikely that someone will want to run -CURRENT on a machine with > that hardware in it, so maybe we should axe it? > > Cheers, > Uli > > On Tue, 2013-07-23 at 13:34:02 -0600, Justin T. Gibbs wrote: > > Done. > > > > -- > > Justin > > > > On Jul 23, 2013, at 1:11 AM, Ulrich Spörlein wrote: > > > > > [adding scsi, it would be nice if I could get another set of eyes on > > > this as I don't have the hardware to test this] > > > > > > On Tue, 2013-07-16 at 11:49:27 +0200, Ulrich Spörlein wrote: > > >> > > >> Hey Justin, Ken, > > >> > > >> Coverity found one more instance of swapped parameters in the kernel, > > >> introduced quite some time ago. It's probably hard to get the hardware > > >> to test this change these days ... > > >> > > >> Please see > > >> https://github.com/uqs/freebsd-head/commit/2f8f438a380c2a52a2e9f266cd716f56c8a4bb75 > > >> and leave comments, or reply to this mail. > > >> > > >> You can see the diff that introduced the problem here: > > >> http://git.freebsd.your.org/gitweb/?p=freebsd.git;a=blobdiff;f=sys/dev/aic7xxx/aic7xxx_pci.c;h=42dcdcc57f09d11199aabd6b224f2dad730f0733;hp=a4c0f4672cab3eb965d7acf1a580162168ca9716;hb=27ca4db2579f6e74861db16299eeb52e158fa7a7;hpb=06842004edacee7beec6cb72239ded59709506a2 > > >> > > >> or here: > > >> > > >> https://github.com/uqs/freebsd-head/commit/9696016b0572574bb656fb109ff2916127fa8cb8 > > >> > > >> Thanks! > > >> Uli > > > _______________________________________________ > > > freebsd-scsi@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > > > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > > From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 23 21:41:29 2013 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7B66EA38; Tue, 23 Jul 2013 21:41:29 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1887926E0; Tue, 23 Jul 2013 21:41:28 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.7/8.14.7) with ESMTP id r6NLfRcU022940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Jul 2013 23:41:27 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Tue, 23 Jul 2013 23:41:27 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: "Justin T. Gibbs" Subject: Re: Please review patch for aic7xxx_pci.c Message-ID: <20130723214126.GG9030@acme.spoerlein.net> References: <20130716094927.GA9030@acme.spoerlein.net> <20130723071129.GD9030@acme.spoerlein.net> <20130723204530.GE9030@acme.spoerlein.net> <86E509ED-694D-49B0-A3D9-C9C7B71F67CE@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86E509ED-694D-49B0-A3D9-C9C7B71F67CE@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 21:41:29 -0000 On Tue, 2013-07-23 at 15:15:53 -0600, Justin T. Gibbs wrote: > On Jul 23, 2013, at 2:45 PM, Ulrich Spörlein wrote: > > > Thanks, but maybe it's better to have the discussion here. > > > > You wrote: > > The difference in the argument order between the declaration and definition is > > likely what led to this programming error. Your patch should also correct the > > argument reversal in the declaration of ahc_9005_subdevinfo_valid(). > > > > The argument order you've used seems the best choice since it matches what is > > used in ahc_compose_id(). > > > > > > > > I'm not sure that reversing the arguments in the function definition is > > the right way. This would make the patch a no-op. > > Read the quote again. I said change the "declaration", not the > "definition". To be extremely clear, the code currently looks like > this: D'oh, that's what I get for reading too fast. I've opted to change the function definition, in the end, so that declaration, definition and call-site are in sync, see https://github.com/uqs/freebsd-head/commit/e699b2fde01f235a22e1125e9f3aef16623b512f Thanks! Uli From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 23 22:04:10 2013 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 84505E42; Tue, 23 Jul 2013 22:04:10 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (aslan.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B6CD278B; Tue, 23 Jul 2013 22:04:10 +0000 (UTC) Received: from [192.168.6.167] (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r6NM49vJ086361 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 23 Jul 2013 22:04:09 GMT (envelope-from gibbs@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Please review patch for aic7xxx_pci.c From: "Justin T. Gibbs" In-Reply-To: <20130723214126.GG9030@acme.spoerlein.net> Date: Tue, 23 Jul 2013 16:04:04 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20130716094927.GA9030@acme.spoerlein.net> <20130723071129.GD9030@acme.spoerlein.net> <20130723204530.GE9030@acme.spoerlein.net> <86E509ED-694D-49B0-A3D9-C9C7B71F67CE@FreeBSD.org> <20130723214126.GG9030@acme.spoerlein.net> To: =?iso-8859-1?Q?Ulrich_Sp=F6rlein?= X-Mailer: Apple Mail (2.1508) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Tue, 23 Jul 2013 22:04:09 +0000 (UTC) Cc: scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 22:04:10 -0000 On Jul 23, 2013, at 3:41 PM, Ulrich Sp=F6rlein wrote: > On Tue, 2013-07-23 at 15:15:53 -0600, Justin T. Gibbs wrote: >> On Jul 23, 2013, at 2:45 PM, Ulrich Sp=F6rlein = wrote: >>=20 >>> Thanks, but maybe it's better to have the discussion here. >>>=20 >>> You wrote: >>> The difference in the argument order between the declaration and = definition is >>> likely what led to this programming error. Your patch should also = correct the >>> argument reversal in the declaration of ahc_9005_subdevinfo_valid(). >>>=20 >>> The argument order you've used seems the best choice since it = matches what is >>> used in ahc_compose_id(). >>>=20 >>>=20 >>>=20 >>> I'm not sure that reversing the arguments in the function definition = is >>> the right way. This would make the patch a no-op. >>=20 >> Read the quote again. I said change the "declaration", not the >> "definition". To be extremely clear, the code currently looks like >> this: >=20 > D'oh, that's what I get for reading too fast. I've opted to change the > function definition, in the end, so that declaration, definition and > call-site are in sync, see > = https://github.com/uqs/freebsd-head/commit/e699b2fde01f235a22e1125e9f3aef1= 6623b512f >=20 > Thanks! > Uli But now the order of the arguments does not match ahc_compose_id(). It seems to me that we want to only have a single convention in how this data is passed to functions. -- Justin= From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 23 22:29:42 2013 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 66E7590E; Tue, 23 Jul 2013 22:29:42 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 118782974; Tue, 23 Jul 2013 22:29:41 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.7/8.14.7) with ESMTP id r6NMTd6q024351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 24 Jul 2013 00:29:40 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Wed, 24 Jul 2013 00:29:39 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: "Justin T. Gibbs" Subject: Re: Please review patch for aic7xxx_pci.c Message-ID: <20130723222939.GH9030@acme.spoerlein.net> References: <20130716094927.GA9030@acme.spoerlein.net> <20130723071129.GD9030@acme.spoerlein.net> <20130723204530.GE9030@acme.spoerlein.net> <86E509ED-694D-49B0-A3D9-C9C7B71F67CE@FreeBSD.org> <20130723214126.GG9030@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 22:29:42 -0000 On Tue, 2013-07-23 at 16:04:04 -0600, Justin T. Gibbs wrote: > On Jul 23, 2013, at 3:41 PM, Ulrich Spörlein wrote: > > > On Tue, 2013-07-23 at 15:15:53 -0600, Justin T. Gibbs wrote: > >> On Jul 23, 2013, at 2:45 PM, Ulrich Spörlein wrote: > >> > >>> Thanks, but maybe it's better to have the discussion here. > >>> > >>> You wrote: > >>> The difference in the argument order between the declaration and definition is > >>> likely what led to this programming error. Your patch should also correct the > >>> argument reversal in the declaration of ahc_9005_subdevinfo_valid(). > >>> > >>> The argument order you've used seems the best choice since it matches what is > >>> used in ahc_compose_id(). > >>> > >>> > >>> > >>> I'm not sure that reversing the arguments in the function definition is > >>> the right way. This would make the patch a no-op. > >> > >> Read the quote again. I said change the "declaration", not the > >> "definition". To be extremely clear, the code currently looks like > >> this: > > > > D'oh, that's what I get for reading too fast. I've opted to change the > > function definition, in the end, so that declaration, definition and > > call-site are in sync, see > > https://github.com/uqs/freebsd-head/commit/e699b2fde01f235a22e1125e9f3aef16623b512f > > > > Thanks! > > Uli > > But now the order of the arguments does not match ahc_compose_id(). > > It seems to me that we want to only have a single convention in how this > data is passed to functions. Ok, back to the first variant then. commit 1afbac36d5a735b91dfb673abad9635b882d9b4d Author: Ulrich Spörlein Date: Tue Jul 16 11:37:17 2013 +0200 Match function definition to declaration and call-site. SVN r95378 refactored ahc_9005_subdevinfo_valid out into a separate function but swapped the vendor/subvendor and device/subdevice pairs of the parameters. Found by: Coverity Prevent, CID 744931 Reviewed by: gibbs diff --git a/sys/dev/aic7xxx/aic7xxx_pci.c b/sys/dev/aic7xxx/aic7xxx_pci.c index 2bf4927..73df372 100644 --- a/sys/dev/aic7xxx/aic7xxx_pci.c +++ b/sys/dev/aic7xxx/aic7xxx_pci.c @@ -673,8 +673,8 @@ const u_int ahc_num_pci_devs = NUM_ELEMENTS(ahc_pci_ident_table); #define STA 0x08 #define DPR 0x01 -static int ahc_9005_subdevinfo_valid(uint16_t vendor, uint16_t device, - uint16_t subvendor, uint16_t subdevice); +static int ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor, + uint16_t subdevice, uint16_t subvendor); static int ahc_ext_scbram_present(struct ahc_softc *ahc); static void ahc_scbram_config(struct ahc_softc *ahc, int enable, int pcheck, int fast, int large); @@ -766,7 +766,7 @@ ahc_find_pci_device(aic_dev_softc_t pci) * ID as valid. */ if (aic_get_pci_function(pci) > 0 - && ahc_9005_subdevinfo_valid(vendor, device, subvendor, subdevice) + && ahc_9005_subdevinfo_valid(device, vendor, subdevice, subvendor) && SUBID_9005_MFUNCENB(subdevice) == 0) return (NULL); From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 24 19:20:33 2013 Return-Path: Delivered-To: scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CB23CCCD; Wed, 24 Jul 2013 19:20:33 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from aslan.scsiguy.com (aslan.scsiguy.com [70.89.174.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 82AC42791; Wed, 24 Jul 2013 19:20:33 +0000 (UTC) Received: from [192.168.6.136] (207-225-98-3.dia.static.qwest.net [207.225.98.3]) (authenticated bits=0) by aslan.scsiguy.com (8.14.7/8.14.5) with ESMTP id r6OJKWZs092763 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 24 Jul 2013 19:20:32 GMT (envelope-from gibbs@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Please review patch for aic7xxx_pci.c From: "Justin T. Gibbs" In-Reply-To: <20130723222939.GH9030@acme.spoerlein.net> Date: Wed, 24 Jul 2013 13:20:27 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <1A005A2E-6DD4-4D3D-AD5B-2C8BD167EB03@FreeBSD.org> References: <20130716094927.GA9030@acme.spoerlein.net> <20130723071129.GD9030@acme.spoerlein.net> <20130723204530.GE9030@acme.spoerlein.net> <86E509ED-694D-49B0-A3D9-C9C7B71F67CE@FreeBSD.org> <20130723214126.GG9030@acme.spoerlein.net> <20130723222939.GH9030@acme.spoerlein.net> To: =?iso-8859-1?Q?Ulrich_Sp=F6rlein?= X-Mailer: Apple Mail (2.1508) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (aslan.scsiguy.com [70.89.174.89]); Wed, 24 Jul 2013 19:20:32 +0000 (UTC) Cc: scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jul 2013 19:20:33 -0000 On Jul 23, 2013, at 4:29 PM, Ulrich Sp=F6rlein wrote: > On Tue, 2013-07-23 at 16:04:04 -0600, Justin T. Gibbs wrote: >> On Jul 23, 2013, at 3:41 PM, Ulrich Sp=F6rlein = wrote: >>=20 >>> On Tue, 2013-07-23 at 15:15:53 -0600, Justin T. Gibbs wrote: >>>> On Jul 23, 2013, at 2:45 PM, Ulrich Sp=F6rlein = wrote: >>>>=20 >>>>> Thanks, but maybe it's better to have the discussion here. >>>>>=20 >>>>> You wrote: >>>>> The difference in the argument order between the declaration and = definition is >>>>> likely what led to this programming error. Your patch should also = correct the >>>>> argument reversal in the declaration of = ahc_9005_subdevinfo_valid(). >>>>>=20 >>>>> The argument order you've used seems the best choice since it = matches what is >>>>> used in ahc_compose_id(). >>>>>=20 >>>>>=20 >>>>>=20 >>>>> I'm not sure that reversing the arguments in the function = definition is >>>>> the right way. This would make the patch a no-op. >>>>=20 >>>> Read the quote again. I said change the "declaration", not the >>>> "definition". To be extremely clear, the code currently looks like >>>> this: >>>=20 >>> D'oh, that's what I get for reading too fast. I've opted to change = the >>> function definition, in the end, so that declaration, definition and >>> call-site are in sync, see >>> = https://github.com/uqs/freebsd-head/commit/e699b2fde01f235a22e1125e9f3aef1= 6623b512f >>>=20 >>> Thanks! >>> Uli >>=20 >> But now the order of the arguments does not match ahc_compose_id(). >>=20 >> It seems to me that we want to only have a single convention in how = this >> data is passed to functions. >=20 > Ok, back to the first variant then. Works for me. -- Justin= From owner-freebsd-scsi@FreeBSD.ORG Sat Jul 27 17:30:01 2013 Return-Path: Delivered-To: freebsd-scsi@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B7AD893B for ; Sat, 27 Jul 2013 17:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5AFF2DBA for ; Sat, 27 Jul 2013 17:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6RHU1VX096626 for ; Sat, 27 Jul 2013 17:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6RHU1Nf096625; Sat, 27 Jul 2013 17:30:01 GMT (envelope-from gnats) Date: Sat, 27 Jul 2013 17:30:01 GMT Message-Id: <201307271730.r6RHU1Nf096625@freefall.freebsd.org> To: freebsd-scsi@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/179932: commit references a PR X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jul 2013 17:30:01 -0000 The following reply was made to PR kern/179932; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/179932: commit references a PR Date: Sat, 27 Jul 2013 17:21:00 +0000 (UTC) Author: sbruno Date: Sat Jul 27 17:20:43 2013 New Revision: 253712 URL: http://svnweb.freebsd.org/changeset/base/253712 Log: update ciss debugger command to iterate over multiple raid controllers up to max controllers supported PR: kern/179932 Reviewed by: Markus Gebert MFC after: 2 weeks Sponsored by: Yahoo! Inc. Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Sat Jul 27 17:16:59 2013 (r253711) +++ head/sys/dev/ciss/ciss.c Sat Jul 27 17:20:43 2013 (r253712) @@ -4378,11 +4378,17 @@ ciss_print_adapter(struct ciss_softc *sc DB_COMMAND(ciss_prt, db_ciss_prt) { struct ciss_softc *sc; + devclass_t dc; + int maxciss, i; - sc = devclass_get_softc(devclass_find("ciss"), 0); - if (sc == NULL) { - printf("no ciss controllers\n"); - } else { + dc = devclass_find("ciss"); + if ( dc == NULL ) { + printf("%s: can't find devclass!\n", __func__); + return; + } + maxciss = devclass_get_maxunit(dc); + for (i = 0; i < maxciss; i++) { + sc = devclass_get_softc(dc, i); ciss_print_adapter(sc); } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"