From owner-freebsd-scsi@FreeBSD.ORG Fri May 27 07:01:22 2011 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 969F61065673; Fri, 27 May 2011 07:01:22 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id BD1578FC08; Fri, 27 May 2011 07:01:21 +0000 (UTC) Received: by fxm11 with SMTP id 11so1633701fxm.13 for ; Fri, 27 May 2011 00:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=l8VOcEWuo13BcahdsXx4E/NgKgbPpqSoU3BDcRgqJ/g=; b=wgbfj+fDuQA5XNp827481AMfl28cId6eIA0+Yz21a3IPq32vq9kIV30WsTymC6m2p8 /PmkMdlgutgBPYWfo6oUN2qkqslBz9FDDyrdQzUGOlrj8f+Q9STATfTC25v8fUgA1Mpk 6dCx2XBxXJaJoUyItE7hCIIR0LUBBde0KbuUk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=NHCJcCOeZa4fIA1ZFQdrfGAydbuTNIILyEKku0dlKEZm+W1627vHGgNsohy04RP3dR x0yN0XwJy3ODq8agmg5v71qTc+Qom8IzEHq+xy+lTATA5grupkTpaRhbQvufJ52QeiAV 5tFFnsRMEkuM8L0o5URremgrNhwWH2u+TJNb0= Received: by 10.223.28.220 with SMTP id n28mr493044fac.101.1306479680500; Fri, 27 May 2011 00:01:20 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l26sm555292fah.38.2011.05.27.00.01.18 (version=SSLv3 cipher=OTHER); Fri, 27 May 2011 00:01:19 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DDF4C23.3010600@FreeBSD.org> Date: Fri, 27 May 2011 10:00:51 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: freebsd-scsi@freebsd.org, FreeBSD-Current , freebsd-hardware@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: SES/SAF-TE + SATA == SEMB! 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: Fri, 27 May 2011 07:01:22 -0000 Hi. As probably not many know, SATA specification defines the way to talk to SES/SAF-TE enclosures -- Serial ATA Enclosure Management Bridge (SEMB). It can be either separate device or built-in to SATA Port Multiplier. I know at leat two models of Port Multipliers including SEMB and having I2C interfaces to talk to SEP (backplane): SiI3726 and SiI4726. Unluckily such combination of hardware is not widely spread (backplanes are rarely used in desktops, while PMPs are rarely used in servers), but finally I've built such setup! I've connected SuperMicro SAS815TQ backplane to the SiI3726 multiplier with I2C cable and it works like a charm! I've made a patch for HEAD to support it. It adds SEMB devices support to the ATA/SATA XPT probe code, some glue to handle one more ATA-based command protocol and some changes to ses(4) driver to teach it talk to such devices: http://people.freebsd.org/~mav/semb.patch As result I've got: %dmesg |grep ses0 ses0 at ahcich8 bus 0 scbus8 target 5 lun 0 ses0: SEMB S-E-S 2.00 device ses0: Serial Number 50030481 ses0: 150.000MB/s transfers (SATA 1.x, NONE, PIO 8192bytes) ses0: SEMB SES Device ses0: GenCode 0 0 Subenclosures ses0: SubEnclosure ID 0, 4 Types With this ID, Enclosure Length 36 ses0: WWN: 3530303330343831 ses0: Type Desc[0]: Type 0x17, MaxElt 4, In Subenc 0, Text Length 0 ses0: Type Desc[1]: Type 0x4, MaxElt 1, In Subenc 0, Text Length 0 ses0: Type Desc[2]: Type 0xe, MaxElt 1, In Subenc 0, Text Length 0 ses0: Type Desc[3]: Type 0x6, MaxElt 1, In Subenc 0, Text Length 0 %camcontrol devlist at scbus8 target 0 lun 0 (ada0,pass1) at scbus8 target 1 lun 0 (ada1,pass2) at scbus8 target 2 lun 0 (pass5,ada2) at scbus8 target 3 lun 0 (pass6,ada3) at scbus8 target 5 lun 0 (ses0,pass3) at scbus8 target 15 lun 0 (pass4,pmp0) %getencstat -v /dev/ses0 /dev/ses0: Enclosure Status Element 0x0: Array device OK (Status=ok (bytes=0x11 0x00 0x00 0x00)) Element 0x1: Array device OK (Status=ok (bytes=0x11 0x00 0x00 0x00)) Element 0x2: Array device OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element 0x3: Array device OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element 0x4: Temperature sensors OK (Status=ok (bytes=0x01 0x00 0x32 0x00)) Element 0x5: Enclosure OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element 0x6: Audible alarm OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) YAY! So now three questions: 1. Does anybody else have alike hardware and wish to test it? 2. Patch reviews are welcome. 3. Is there any software except share/examples/ses working with ses(4) and/or some good use practices? -- Alexander Motin