From owner-freebsd-current@FreeBSD.ORG Sat May 1 16:28:28 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE8BF1065670; Sat, 1 May 2010 16:28:27 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id 3DB808FC0C; Sat, 1 May 2010 16:28:26 +0000 (UTC) Received: by bwz8 with SMTP id 8so685233bwz.3 for ; Sat, 01 May 2010 09:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qx4/vhoEC09HpoZzOd3BtnuZR7b/q9ZxK41COB7a7r0=; b=pdzNgDCwg3DNDnHlCOVEDzgha16GZnE9WQlEIHUAp59ovNcqENlmvx5Kwf+buV8TKz 4vxXlLNKq+fNNiGUA6UsLLrneKK161KqBihZaT88CNG8kiHHofBUcLc9ITLyhcd4xu3R qHwWvWx4Huh+vHuoqqm5NTxczcJNUA81ahNhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=D1EsmKKOMD9agbT6iLJF0qbEPZhJ6m+ppC03xhsxG/9RCl3m0ui1a30fREVuoYYb2D mzUOpYLrkEM6/8GXBZCBg+bH5Id+L6++ESutAnQQ8Kc456D5NAK4w6rl89M6oa1ObKET s3kxxbwhm9OdEiKQwpaYs/H7PIqXjStr4FPok= MIME-Version: 1.0 Received: by 10.204.5.87 with SMTP id 23mr8089586bku.206.1272731300363; Sat, 01 May 2010 09:28:20 -0700 (PDT) Received: by 10.204.79.3 with HTTP; Sat, 1 May 2010 09:28:20 -0700 (PDT) In-Reply-To: <20100501150331.GA74398@alchemy.franken.de> References: <4BDAE7BD.4000503@feral.com> <20100501150331.GA74398@alchemy.franken.de> Date: Sat, 1 May 2010 20:28:20 +0400 Message-ID: From: pluknet To: Marius Strobl Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-scsi , FreeBSD Current , Matthew Jacob Subject: Re: mpt(4) MPI_EVENT_IR_RESYNC_UPDATE X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2010 16:28:28 -0000 On 1 May 2010 19:03, Marius Strobl wrote: > On Fri, Apr 30, 2010 at 06:50:26PM +0400, pluknet wrote: >> On 30 April 2010 18:22, Matthew Jacob wrote: >> > pluknet wrote: >> > Seems good to me- why not trhow it freebsd-scsi? if nobody says no, I'= ll put >> > it in >> >> Err.. I thought that list is dedicated for cam related stuff. >> >> [cc'ing scsi@ for better coverage. Sorry for cross-posting :/ ] >> >> > >> >> --- RELENG_7_3/src/sys/dev/mpt/mpt_cam.c =A0 =A0 =A0 =A02010-03-02 >> >> 15:38:13.000000000 +0300 >> >> +++ RELENG_7_3.ours/src/sys/dev/mpt/mpt_cam.c =A0 2010-04-21 >> >> 19:31:00.000000000 +0400 >> >> @@ -2564,6 +2564,12 @@ mpt_cam_event(struct mpt_softc *mpt, req >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0CAMLOCK_2_MPTLOCK(mpt); >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; >> >> =A0 =A0 =A0 =A0} >> >> + =A0 =A0 =A0 case MPI_EVENT_IR_RESYNC_UPDATE: >> >> + =A0 =A0 =A0 { >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 uint8_t resync =3D (data0 >> 16) & 0xff= ; >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 mpt_prt(mpt, "IR resync update %d compl= eted\n", resync); >> >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; >> >> + =A0 =A0 =A0 } >> >> =A0 =A0 =A0 =A0case MPI_EVENT_EVENT_CHANGE: >> >> =A0 =A0 =A0 =A0case MPI_EVENT_INTEGRATED_RAID: >> >> =A0 =A0 =A0 =A0case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: >> >> >> >> Another way - just hide such event since mptutil displays rebuild >> >> progress. >> >> >> >> >> > > Could you maybe avoid defining a variable inside a nested scope for > consistency with the majority of the existing cases and in order to > not violate style(9) unnecessarily? > > Marius > > Index: mpt_cam.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- mpt_cam.c =A0 (revision 207463) > +++ mpt_cam.c =A0 (working copy) > @@ -2575,6 +2575,10 @@ mpt_cam_event(struct mpt_softc *mpt, request_t *re > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0CAMLOCK_2_MPTLOCK(mpt); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0} > + =A0 =A0 =A0 case MPI_EVENT_IR_RESYNC_UPDATE: > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 mpt_prt(mpt, "IR resync update %d completed= \n", > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (data0 >> 16) & 0xff); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > =A0 =A0 =A0 =A0case MPI_EVENT_EVENT_CHANGE: > =A0 =A0 =A0 =A0case MPI_EVENT_INTEGRATED_RAID: > =A0 =A0 =A0 =A0case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: > I'm fine with it, resync variable is not necessary there. Thanks for review. --=20 wbr, pluknet