From owner-freebsd-scsi@freebsd.org Thu Dec 10 16:25:56 2015 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FA809D76C3 for ; Thu, 10 Dec 2015 16:25:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B5221435; Thu, 10 Dec 2015 16:25:56 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from [192.168.1.4] (c-24-6-178-251.hsd1.ca.comcast.net [24.6.178.251]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NZ500AHSHN6OW20@mr11p00im-asmtp002.me.com>; Thu, 10 Dec 2015 16:25:55 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-12-10_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510270003 definitions=main-1512100277 User-Agent: Microsoft-MacOutlook/0.0.0.151105 Date: Thu, 10 Dec 2015 08:25:53 -0800 Subject: Re: Accessing static drive info w/o ATA identify and lockup with camcontrol identify From: Ravi Pokala Sender: "Pokala, Ravi" To: Alan Somers Cc: Kevin Bowling , Ravi Pokala , "freebsd-scsi@freebsd.org" Message-id: Thread-topic: Accessing static drive info w/o ATA identify and lockup with camcontrol identify References: <80BB5907-CC31-4F06-9C70-E6F7834FF28E@panasas.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 16:25:56 -0000 -----Original Message----- From: on behalf of Alan Somers Date: 2015-12-10, Thursday at 08:15 To: Ravi Pokala Cc: Kevin Bowling , Ravi Pokala , "freebsd-scsi@freebsd.org" Subject: Re: Accessing static drive info w/o ATA identify and lockup with camcontrol identify >On Thu, Dec 10, 2015 at 9:10 AM, Pokala, Ravi wrote: >>Interesting. I never noticed that firmware wasn't already included in "struct disk", like drive model and serial number already are. It should be trivial to add, but keeping a copy of the string will of course make "struct disk" larger. That might have implications on KBI compatibility for out-of-tree drivers...? Again, I'm not sure. > > >This information is already perserved in CAM, if not in GEOM. For >SCSI disks, look at (struct cam_device).inq_data.revision. For ATA >disks, look at (struct ccb_getdev).ident_data.revision. Right, but it sounded like Kevin was looking for a way to get this from userland. That means through something like `geom disk list' (or the raw XML from which that is parsed). -Ravi