<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cyberz.org &#187; sata</title>
	<atom:link href="http://www.cyberz.org/blog/tag/sata/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberz.org/blog</link>
	<description>Andrea Leofreddi's homepage</description>
	<lastBuildDate>Thu, 24 Nov 2011 20:11:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Solaris 10 si3124 backport (workaround for bug #6566207)</title>
		<link>http://www.cyberz.org/blog/2008/03/08/solaris-si3124-backport-workaround-for-bug-6566207/</link>
		<comments>http://www.cyberz.org/blog/2008/03/08/solaris-si3124-backport-workaround-for-bug-6566207/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 23:28:31 +0000</pubDate>
		<dc:creator>andrea</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[sata]]></category>

		<guid isPermaLink="false">http://www.cyberz.org/blog/?p=10</guid>
		<description><![CDATA[Do you think you can]]></description>
			<content:encoded><![CDATA[<p>Do you think you can get a fast cheap SATA mass storage at home with Solaris 10 and ZFS just plugging a cheap si3124 controller?</p>
<p style="text-align: center;"><a href="http://www.cyberz.org/blog/wp-content/uploads/2008/07/z4sil3124-4ports-sata-32bit.jpg"><img class="size-medium wp-image-20 aligncenter" title="si3124" src="http://www.cyberz.org/blog/wp-content/uploads/2008/07/z4sil3124-4ports-sata-32bit-299x261.jpg" alt="" width="246" height="213" /></a></p>
<p>Not so easily: on Solaris 10 you will be afflicted by some boring bug known as <a href="http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6566207" target="_blank">bug #6566207</a> which gets your controller stuck for around a minute after some heavy I/O.</p>
<p><span id="more-10"></span></p>
<p>This means you cannot move data (eg. a dvd iso file) within reasonable amount of time because your controller will get stuck on 100% busy state and your transfer will freeze for 60 seconds. In my case this behaviour was showing often, enough to drop an gig ethernet ftp transfer rate to ~2Mb/s, as you can see:</p>
<p><code>4641337344 bytes transferred in 2413 seconds (1.83M/s)</code></p>
<p>Looking on internet you can find some people complaining about this bug (some of them switched to other OSes for this issue) but no workaround has been posted for Solaris 10: too bad.</p>
<p>Sun knows the bug exists but they seem to ignore this issue (who cares about crappy hardware?). OpenSolaris people knows the bug exists and they already patched it (there&#8217;s an error in interrupt handling routine: interrupts get cleared twice), but their si3124 module simply won&#8217;t load on Solaris 10.</p>
<p>So the trick is to compile the OpenSolaris&#8217; si3124 driver for Solaris 10, and that&#8217;s what I did. I got from <a title="OpenSolaris" href="http://www.opensolaris.com">OpenSolaris</a> an si3124 source (old enough to be close to the one shipped on S10), backported the <a href="http://src.opensolaris.org/source/diff/onnv/onnv-gate/usr/src/uts/common/io/sata/adapters/si3124/si3124.c?r2=%2Fonnv%2Fonnv-gate%2Fusr%2Fsrc%2Futs%2Fcommon%2Fio%2Fsata%2Fadapters%2Fsi3124%2Fsi3124.c%404810&amp;r1=%2Fonnv%2Fonnv-gate%2Fusr%2Fsrc%2Futs%2Fcommon%2Fio%2Fsata%2Fadapters%2Fsi3124%2Fsi3124.c%403116">patch</a> and rebuilt it.</p>
<p>Now my system is working fine, I never experienced these lockups again. Below is attached a tarball containing the si3124 sources and driver compiled for x86 (32bit). If you want to build a SPARC or 64bit version of the driver you need Sun Studio 10 plus some Makefile CFLAGS tweaking.</p>
<p>To install the binary driver follow these steps:</p>
<ol>
<li>Copy /kernel/drv/si3124 in a safe place (the original driver)</li>
<li>Download the tarball below</li>
<li>Untar the the tarball and copy si3124 to /kernel/drv</li>
<li>Reboot</li>
</ol>
<p>If everything works fine, your system should boot with the new driver. You can check the version you&#8217;re running using modinfo, as shown here:</p>
<p><code>root@siona:~# modinfo | grep si3124<br />
141 f8ee2000 4c94 206 1 si3124 (si3124 driver v1.3bp)<br />
root@siona:~#</code></p>
<p>The patched driver has been tested on:</p>
<ol>
<li>Solaris 10 update 3 (native driver is 1.2)</li>
<li>Solaris 10 update 5 (native driver is 1.2)</li>
</ol>
<p>The backported driver shows version v1.3bp. You can <a title="si3124 backport (binary and sources)" href="http://www.cyberz.org/blog/wp-content/uploads/2008/03/si3124bp.tar">download the si3124 backport (binary and sources) tarball here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberz.org/blog/2008/03/08/solaris-si3124-backport-workaround-for-bug-6566207/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

