From owner-freebsd-scsi@FreeBSD.ORG Wed Jul 14 01:46:48 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 998ED10656A3; Wed, 14 Jul 2010 01:46:48 +0000 (UTC) (envelope-from leo@nec-labs.com) Received: from mail.nec-labs.com (mail.nec-labs.com [138.15.200.209]) by mx1.freebsd.org (Postfix) with ESMTP id 5C6CC8FC08; Wed, 14 Jul 2010 01:46:47 +0000 (UTC) Received: from mail.nec-labs.com (localhost.localdomain [127.0.0.1]) by mail.nec-labs.com (8.14.3/8.14.3) with ESMTP id o6E1kcSh001992; Tue, 13 Jul 2010 21:46:38 -0400 Received: from [138.15.166.202] (gsd2.nec-labs.com [138.15.166.202]) by mail.nec-labs.com (8.14.3/8.14.3) with ESMTP id o6E1kcGo001988; Tue, 13 Jul 2010 21:46:38 -0400 Message-ID: <4C3D1706.3030109@nec-labs.com> Date: Tue, 13 Jul 2010 21:46:46 -0400 From: Leo Prasath Arulraj User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Thunderbird/3.0.4 MIME-Version: 1.0 To: Matthew Jacob References: <4C23655F.1070408@nec-labs.com> <4C3CC782.7000705@nec-labs.com> <4C3CD9C4.8010007@feral.com> In-Reply-To: <4C3CD9C4.8010007@feral.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 14 Jul 2010 01:46:48 -0000 I did that and made sure kldstat displays isp_2300 after boot. But the error still persists. I also see spurious interrrupts from the device. But not sure if they signal something wrong: "kernel: isp0: bogus intr- isr 8013 (8013) iptr 276 optr 276" Aside, I am trying to use a code "Memulator" ( http://www.ece.cmu.edu/~griffin2/ ) which was developed on FreeBSD 5.2 with Adaptec 21960 scsi card. This tool emulates a scsi disk ( much like /usr/share/examples/scsi_target ). Can someone recommend a SCSI card that is on market today which is most likely to work on the FreeBSD 9.0 in target mode ? This will be very helpful. Thanks, Leo. On 07/13/2010 05:25 PM, Matthew Jacob wrote: > 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. >> >> >> >> >