From owner-freebsd-scsi@FreeBSD.ORG Tue Jul 13 20:07:32 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 3D649106566B for ; Tue, 13 Jul 2010 20:07:32 +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 004AD8FC17 for ; Tue, 13 Jul 2010 20:07:31 +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 o6DK7PPQ015396; Tue, 13 Jul 2010 16:07:25 -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 o6DK7PvU015389; Tue, 13 Jul 2010 16:07:25 -0400 Message-ID: <4C3CC782.7000705@nec-labs.com> Date: Tue, 13 Jul 2010 16:07:30 -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: freebsd-scsi@freebsd.org, mjacob@freebsd.org References: <4C23655F.1070408@nec-labs.com> In-Reply-To: <4C23655F.1070408@nec-labs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: "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 20:07:32 -0000 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. 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.