From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 9 19:55:30 2013 Return-Path: Delivered-To: FreeBSD-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 CA11769F for ; Tue, 9 Apr 2013 19:55:30 +0000 (UTC) (envelope-from scott4long@yahoo.com) Received: from nm29.bullet.mail.ne1.yahoo.com (nm29.bullet.mail.ne1.yahoo.com [98.138.90.92]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA8995B for ; Tue, 9 Apr 2013 19:55:30 +0000 (UTC) Received: from [98.138.226.178] by nm29.bullet.mail.ne1.yahoo.com with NNFMP; 09 Apr 2013 19:55:24 -0000 Received: from [98.136.86.52] by tm13.bullet.mail.ne1.yahoo.com with NNFMP; 09 Apr 2013 19:55:24 -0000 Received: from [127.0.0.1] by smtp113-mob.biz.mail.ac4.yahoo.com with NNFMP; 09 Apr 2013 19:55:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1365537323; bh=P1KFV/J85LhStAoimBSzaA2lhrBLW+ZpcT7XCbV9HTI=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:References:Mime-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Cc:X-Mailer:From:Subject:Date:To; b=FViQ1LvthBnSRou3eL/6xTOZALJp86fEskfBOG0Sz1M2zmIfsP2syyjWWMU0lwbG6qtMLDiFxOyyQgvs60KBs5CKThoIau/yuPLYxWElpoh5d4irhwYbqD3IIhC+YZp5a2ay7IVitX2uwlHM9uCvZ9mMzPRCIVG82cXKE1lMzUc= X-Yahoo-Newman-Id: 974570.81338.bm@smtp113-mob.biz.mail.ac4.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: YWTQIqQVM1kiPini5N8jZ2op9lsY0FwzWXAtAfEX.6xwjYI Dc6nWD4sNELi0DY7FTrpkgcC36fn9macjh0VEdCnBbIqhwtl4ZcPlHwPBKtB VlhPNt6Qbiugk2Er9W.RZ6hJlFjgYEpArgL1wArl2MNlIXXWaCjrps9HrYS0 KEhJYm.XvNqp4vnZGpaQzCT0XA9wGzAg7UbfWc16sZPlbXdZFX._46OsLLhF u.kxHsqBV0a0luzK6rzM1FMKA.Oc0lta8dZl9AtDZmyYCA0m3aIpePQi9i8m r66CA4tkjoxxHXOQdH8LtWpqY6hZBeaaKwcQkVPL68Myf_rb0lGXQI6SutHT 3r52t5Q2v2w119fu2Smri8lFD2vjhyv66swgwPa9uDEi6aNHflzznljycTAi zKAGcsjFXKMQ74B1yvoQ9tM3IL4JHtxJd92BPTIQWoWq1omOIDMsXOWGQMKB h6ZmeM5dTA25dMwVzhTg.OQqNpai5hC5jcOfH0XiNDEAE40uC3zoWRMTOPiz af38VktauE6lppWi63QpbHebMYE8qcKvA5xw- X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- X-Rocket-Received: from [10.163.125.122] (scott4long@70.193.204.127 with xymcookie) by smtp113-mob.biz.mail.ac4.yahoo.com with SMTP; 09 Apr 2013 12:55:23 -0700 PDT References: <1365452066.2312.30.camel@localhost> <1365536578.2158.4.camel@localhost> Mime-Version: 1.0 (1.0) In-Reply-To: <1365536578.2158.4.camel@localhost> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <47084443-5BBF-4014-B15B-A4F50BF5F8FA@yahoo.com> X-Mailer: iPhone Mail (10B329) From: Scott Long Subject: Re: ciss(4) malformed vendor/product data Date: Tue, 9 Apr 2013 15:55:22 -0400 To: "sbruno@freebsd.org" Cc: "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: Tue, 09 Apr 2013 19:55:30 -0000 Brilliant! Thanks a lot of pursuing this. Scott On Apr 9, 2013, at 3:42 PM, Sean Bruno wrote: > On Mon, 2013-04-08 at 13:14 -0700, Sean Bruno wrote: >> I think, at some point in the mists of time, vendor and product inquiry >> were expand to 16bytes and 48 bytes respectively, at least when I look >> at camcontrol, that's what I see. >> >> I noted that the camcontrol devlist output was slightly mangled (note >> the lack of 1+0): >> >> -bash-4.2$ sudo camcontrol devlist >> at scbus0 target 0 lun 0 (pass0,da0) >> at scbus0 target 1 lun 0 (pass1,da1) >> at scbus3 target 0 lun 0 (pass2,cd0) >> >> When I updated this to have the same padded sizes as camcontrol, then >> things realigned and became clear: >> >> at scbus0 target 0 lun 0 (pass0,da0) >> at scbus0 target 1 lun 0 (pass1,da1) >> >> >> Not sure if there's a global that should be used here, or >> > > > Thought better of the patch, and thought, "Hey! Why don't I just use > the values that CAM already defines for this purpose!" > > This will have the same result as the previous version, but be slightly > more future proofish. > > Index: ciss.c > =================================================================== > --- ciss.c (revision 249314) > +++ ciss.c (working copy) > @@ -3346,9 +3346,12 @@ > > cl = &sc->ciss_logical[bus][target]; > > - padstr(inq->vendor, "COMPAQ", 8); > - padstr(inq->product, > ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), 8); > - padstr(inq->revision, ciss_name_ldrive_status(cl->cl_lstatus->status), > 16); > + padstr(inq->vendor, "COMPAQ", > + SID_VENDOR_SIZE); > + padstr(inq->product, > ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance), > + SID_PRODUCT_SIZE); > + padstr(inq->revision, ciss_name_ldrive_status(cl->cl_lstatus->status), > + SID_REVISION_SIZE); > } > } >