From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 13 21:25:30 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 358191065677; Tue, 13 Jul 2010 21:25:30 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id D3F578FC25; Tue, 13 Jul 2010 21:25:29 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o6DLPSfP056230 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 13 Jul 2010 14:25:28 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4C3CD9C4.8010007@feral.com> Date: Tue, 13 Jul 2010 14:25:24 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Leo Prasath Arulraj References: <4C23655F.1070408@nec-labs.com> <4C3CC782.7000705@nec-labs.com> In-Reply-To: <4C3CC782.7000705@nec-labs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.3 (ns1.feral.com [192.168.221.1]); Tue, 13 Jul 2010 14:25:29 -0700 (PDT) Cc: freebsd-scsi@freebsd.org Subject: Re: "Firmware timed out" with qlogic 2312 FC cards X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 21:25:30 -0000 On 7/13/2010 1:07 PM, Leo Prasath Arulraj wrote: > I am running scsi target mode disk emulation code on a QLogic 2312 FC > card. My OS version is : 9.0-CURRENT FreeBSD . This FreeBSD machine > acts as the target while a separate Linux machine acts as the > initiator accessing the FreeBSD machine as target. make sure isp_2300_load=YES is in your loader.conf > > I am seeing "Firmware timed out" errors on the FreeBSD side : > > > isp0: isp_action code 933 > (targ0:isp0:0:0:0): isp_target_start_ctio: CTIO2[207c] flags 40 xfrlen > 0 offset 4096 > isp0: RISC2HOST ISR 0x2f08013 > isp0: Firmware timed out on command > isp0: data CTIO complete > isp0: isp_handle_platform_ctio: CTIO2[2034] sts 0xb flg 0x840 sns 0 > resid 0 MID > isp0: MIDTERM CTIO[0x2034] done > > > And I see UNDERRUN errors on the Linux side : > > [ 1661.998946] sd 0:0:0:0: [sdb] Unhandled error code > [ 1661.998955] sd 0:0:0:0: [sdb] Result: hostbyte=DID_OK > driverbyte=DRIVER_TIMEOUT > [ 1661.998973] sd 0:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 > 00 08 00 > [ 1661.999024] end_request: I/O error, dev sdb, sector 0 > [ 1662.219095] comp_status 21 scsi_status 0 > [ 1662.219118] scsi(0:0:0) UNDERRUN status detected 0x15-0x0. > resid=0xda fw_resid=0x0 cdb=0x12 os_underflow=0x0 > [ 1662.219137] scsi(0:0:0:0) Dropped frame(s) detected (da of fe > bytes)...firmware reported underrun...retrying command. > > > I changed the ct_timeout field of a CTIO in the isp_freebsd.c file to > 120 from 10: > > isp_freebsd.c:1624: cto->ct_timeout = 120; // was 10 > isp_freebsd.c:1658: cto->ct_timeout = 120 ; // was 10 > > Is there someway I can fix this ? Or should I handle it the userspace > program by retrying commands. I suspect something goes wrong with the > firmware because , after this error happens, subsequents requests also > fail. > > Should I update the firmware assembly file isp_2300.h ? Where should I > get the assembly version of the firmware from ? > > Any help is appreciated. > > Thanks, > Leo. > > > >