From owner-freebsd-stable@FreeBSD.ORG Sun Sep 9 15:54:30 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88C94106566B for ; Sun, 9 Sep 2012 15:54:30 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 015828FC12 for ; Sun, 9 Sep 2012 15:54:29 +0000 (UTC) Received: by lage12 with SMTP id e12so991253lag.13 for ; Sun, 09 Sep 2012 08:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=u8GHfDR6+mKaKHbALtwj4CzmMuZS7NeYS0pE4Vv2Guo=; b=VBM5iaid3HAtbZERNtB+epQEzcB80b6ZzQ5jUs/STd/HaNVdLi3iy0N8zBqccpWNJK eDAuPEalciceAUno+27Hyq8hsZ4gj7luPUCYl94jnI8+7DWZ2LTempzBAJDN4TIiBvdj XHC7OdvRLIlWDjK3dw0CMm+HjT3zF8tap03Vn5fDH2eb5XCQWWJdeAV5X96S+TWh4vyt ornckgS8g+oWvyilk2sSb3DTs6iHo1p7aIMNqzcbN9LyLwogXWxg/cImiyvijbQTgHw3 bNk09Qyijj1yKwFOsI5NpEThvOwdfPDaZiUaFEMiANeS93gzbcW963FcSnC6rILcXfWf 88VQ== Received: by 10.152.129.104 with SMTP id nv8mr10175168lab.32.1347206068469; Sun, 09 Sep 2012 08:54:28 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id d1sm2864695lbk.16.2012.09.09.08.54.26 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 08:54:27 -0700 (PDT) Sender: Alexander Motin Message-ID: <504CBBB1.20905@FreeBSD.org> Date: Sun, 09 Sep 2012 18:54:25 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120628 Thunderbird/13.0.1 MIME-Version: 1.0 To: kirk@ba23.org References: <504B2C35.3030800@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD 9.1 RC1 and CAM issues with old SCSI drive X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 15:54:30 -0000 On 09.09.2012 16:25, kirk russell wrote: > On Sat, Sep 8, 2012 at 12:29 PM, Alexander Motin wrote: >> Hi. >> >> It seems like both of your problems have the same cause: device report wrong >> size of INQUIRY data, that causes failure on attempt to fetch it. With >> FreeBSD 9.0 it caused domain validation failures and so reduced transfer >> rate, on 9.1 it also causes detection failure. I am not sure why detection >> worked on 9.0, it needs some deeper code comparison, but I think it is >> mostly device problem. >> >> Could you send me output of such commands from FreeBSD 9.0: >> camcontrol cmd da0 -vEc "12 00 00 00 24 00" -i 36 - | hd >> camcontrol cmd da0 -vEc "12 00 00 00 fe 00" -i 254 - | hd >> camcontrol cmd da0 -vEc "12 00 00 01 00 00" -i 256 - | hd >> >> -- >> Alexander Motin > > This is running 9.0-RELEASE. > > # camcontrol cmd da0 -vEc "12 00 00 00 24 00" -i 36 - | hd > 00000000 00 00 02 02 fa 00 00 3e 43 4f 4d 50 41 51 50 43 |.......>COMPAQPC| > 00000010 57 44 45 39 31 30 30 57 20 20 20 20 20 20 20 20 |WDE9100W | > 00000020 31 2e 30 31 |1.01| > 00000024 > # camcontrol cmd da0 -vEc "12 00 00 00 fe 00" -i 254 - | hd > 00000000 00 00 02 02 fa 00 00 3e 43 4f 4d 50 41 51 50 43 |.......>COMPAQPC| > 00000010 57 44 45 39 31 30 30 57 20 20 20 20 20 20 20 20 |WDE9100W | > 00000020 31 2e 30 31 32 33 30 31 57 53 37 30 32 30 33 37 |1.012301WS702037| > 00000030 32 34 39 33 00 00 00 00 20 20 20 20 20 20 20 20 |2493.... | > 00000040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | > * > 00000060 57 44 45 39 31 30 30 2d 36 30 30 35 44 30 20 20 |WDE9100-6005D0 | > 00000070 34 30 36 31 30 30 31 31 39 31 30 30 32 43 30 20 |4061001191002C0 | > 00000080 32 34 30 38 00 00 00 00 00 00 00 00 00 00 00 00 |2408............| > 00000090 00 00 00 00 4e 32 30 35 30 30 39 39 30 32 35 35 |....N20500990255| > 000000a0 33 20 20 20 50 20 30 30 00 00 00 00 00 00 42 41 |3 P 00......BA| > 000000b0 43 43 42 45 4b 43 31 39 39 38 30 38 32 38 57 53 |CCBEKC19980828WS| > 000000c0 36 30 44 20 04 03 00 04 02 01 00 00 00 00 00 00 |60D ............| > 000000d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > * > 000000f0 > # camcontrol cmd da0 -vEc "12 00 00 01 00 00" -i 256 - | hd > (pass1:ahc0:0:0:0): INQUIRY. CDB: 12 0 0 1 0 0 > (pass1:ahc0:0:0:0): CAM status: SCSI Status Error > (pass1:ahc0:0:0:0): SCSI status: Check Condition > (pass1:ahc0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB) > (pass1:ahc0:0:0:0): Command Specific Info: 0xffffffff > (pass1:ahc0:0:0:0): Command byte 3 is invalid > camcontrol: error sending command > (pass1:ahc0:0:0:0): INQUIRY. CDB: 12 0 0 1 0 0 > (pass1:ahc0:0:0:0): CAM status: SCSI Status Error > (pass1:ahc0:0:0:0): SCSI status: Check Condition > (pass1:ahc0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB) > (pass1:ahc0:0:0:0): Command Specific Info: 0xffffffff > (pass1:ahc0:0:0:0): Command byte 3 is invalid It seems that problem can be in our SCSI code that rounds inquiry data size up to even. Please try to comment out line inquiry_len = roundup2(inquiry_len, 2); in sys/cam/scsi/scsi_xpt.c and rebuild the kernel. It should probably fix both device detection and transfer speed. -- Alexander Motin