From owner-freebsd-scsi@FreeBSD.ORG Wed Oct 15 18:39:36 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7819F16A4B3 for ; Wed, 15 Oct 2003 18:39:36 -0700 (PDT) Received: from fastweb3.slipstreamdata.com (fastweb3.slipstreamdata.com [65.110.175.155]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A30343FBD for ; Wed, 15 Oct 2003 18:39:35 -0700 (PDT) (envelope-from dsze@alumni.uwaterloo.ca) Received: from eeyore.uwaterloo.ca (localhost.slipstreamdata.com [127.0.0.1]) h9G1dXJ8018607; Wed, 15 Oct 2003 21:39:34 -0400 Received: from CPE000021e92a64-CM014320019900.cpe.net.cable.rogers.com (@CPE000021e92a64-CM014320019900.cpe.net.cable.rogers.com [24.100.219.60]) by fastweb3.slipstreamdata.com (SlipStream SP Server 3.0.37 built 2003/10/09 16:21:23 -0400 (EDT)); Wed, 15 Oct 2003 21:39:34 -0400 (EDT) Message-Id: <6.0.0.22.2.20031015212813.039fcd48@mail.distrust.net> X-Sender: dsze@engmail.uwaterloo.ca X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Wed, 15 Oct 2003 21:41:30 -0400 To: Nate Lawson From: David Sze In-Reply-To: <20031015133813.O35236@root.org> References: <6.0.0.22.2.20031014232154.03a0b990@mail.distrust.net> <6.0.0.22.2.20031015080310.03ac9b88@mail.distrust.net> <20031015100215.U34498@root.org> <20031015180131.GA25402@pooh.distrust.net> <20031015133813.O35236@root.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed cc: freebsd-scsi@freebsd.org Subject: Re: Dell PowerEdge 1750 and mpt X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2003 01:39:36 -0000 At 01:38 PM 15/10/2003 -0700, Nate Lawson wrote this to All: >I'm out of time for this thread. Find the diff between your code and >camcontrol inquiry -S and you'll find the bug. Thanks for your help Nate. I don't expect you to respond to this message, I'm just replying so that it shows up in the archives for anyone else that might have problems with the Dell 1750 and mpt. For those who are interested, it doesn't appear to be a bug in my code. I replaced everything that I copied from camcontrol with what follows below, which only uses the functions documented in cam(3). The kernel still panic'ed after a few hours, with an identical backtrace to the one posted previously. Notice how this snippet of code never directly sends XPT_GET_TRAN_SETTINGS, so the source of the junk pointer/CCB cannot be me. Removing all traces of this serial # gathering code from our application has gotten rid of the panics. #include #include #include #include #define DEVICE_MAX 16 int main() { struct cam_device device; char kpcSerials[sizeof(device.serial_num)*DEVICE_MAX+1]; unsigned int unLen = 0; for (int n = 0; n < DEVICE_MAX; ++n) { if (NULL == ::cam_open_spec_device("pass", n, O_RDWR, &device)) break; ::bcopy(device.serial_num, kpcSerials + unLen, device.serial_num_len); unLen += device.serial_num_len; ::cam_close_spec_device(&device); } kpcSerials[unLen] = '\0'; ::printf("%s\n", kpcSerials); return 0; }