From owner-freebsd-scsi@FreeBSD.ORG Fri Feb 15 16:08:18 2013 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 783D6B41 for ; Fri, 15 Feb 2013 16:08:18 +0000 (UTC) (envelope-from dgilbert@interlog.com) Received: from smtp.infotech.no (smtp.infotech.no [82.134.31.41]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9206DC for ; Fri, 15 Feb 2013 16:08:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.infotech.no (Postfix) with ESMTP id 308932041B8; Fri, 15 Feb 2013 16:59:07 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.6 (20110518) (Debian) at infotech.no Received: from smtp.infotech.no ([127.0.0.1]) by localhost (smtp.infotech.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tVIVLbk62y3n; Fri, 15 Feb 2013 16:59:01 +0100 (CET) Received: from [192.168.48.66] (unknown [98.143.98.44]) by smtp.infotech.no (Postfix) with ESMTPA id DFDE52041B0; Fri, 15 Feb 2013 16:59:00 +0100 (CET) Message-ID: <511E5B3C.8040400@interlog.com> Date: Fri, 15 Feb 2013 10:58:52 -0500 From: Douglas Gilbert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: jackson wang Subject: Re: Link rate problem of SAS HDD References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dgilbert@interlog.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Feb 2013 16:08:18 -0000 On 13-02-15 04:02 AM, jackson wang wrote: > Hello,All. > > I have a SAS HDD,have some demands as following: > > 1.Use SCSI command to get the supported link rates,ex:1.5? 3.0? or 6.0 Gb/s; > 2.Get current working link rate with SCSI CMD; > 3.Need to downgrade 6.0gb/s to 3.0gb/s with SCSI CMD because some RAID > card had bugs, > so speed negotiation sometimes failed; > > I know many RAID cards have management tool:CLI,which could make it, > but not all system install that > tool, so using SCSI command is the only option. May I immodestly propose sdparm which is written for Linux but ported to FreeBSD (Solaris and Windoze). You will need to familiarize yourself with SAS "phy control and discover" mode page. Then see: http://sg.danny.cz/sg/sdparm.html There is an example in the Examples section. The items of interest are: Programmed minimum link rate and Programmed maximum link rate. By changing them and resetting the disk you constrain the following speed negotiation. You may also be interested in my sg3_utils (for general SCSI commands) and smp_utils (for SAS expanders) packages. They are also ported to FreeBSD. Doug Gilbert