From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 11 13:25:41 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 109CF106566C for ; Thu, 11 Mar 2010 13:25:41 +0000 (UTC) (envelope-from scdbackup@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 39F2E8FC28 for ; Thu, 11 Mar 2010 13:25:39 +0000 (UTC) Received: (qmail invoked by alias); 11 Mar 2010 13:25:35 -0000 Received: from 165.126.46.212.adsl.ncore.de (HELO 192.168.2.69) [212.46.126.165] by mail.gmx.net (mp055) with SMTP; 11 Mar 2010 14:25:35 +0100 X-Authenticated: #2145628 X-Provags-ID: V01U2FsdGVkX192Jy5yul52wx7R1qpdG0L391TXhUS+RlUV4Zbczo BK3+g4DaYQvpPh Date: Thu, 11 Mar 2010 14:27:41 +0100 From: "Thomas Schmitt" To: freebsd-hackers@freebsd.org Message-Id: <10610127213209@192.168.2.69> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.5 Subject: How to slow down SATA to 1.5 GBit/s ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 13:25:41 -0000 Hi, i am looking for a way to curb SATA speed to 1.5 GBit/s to avoid write failures with an eSATA attached DVD burner. I tried this as superuser: # atacontrol mode acd1 current mode = SATA300 # atacontrol mode acd1 SATA150 current mode = SATA300 # atacontrol mode acd1 current mode = SATA300 with obviously no success. $ uname -a FreeBSD ... 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 atapicam is running. ------------------------------------------------ The problem of the burner appears as checksum errors during write operations (but not during reading, strangely). It hits both, FreeBSD 8.0 and Debian Linux 5.04. But Debian switches to 1.5 GBit/s after a few errors and then works fine, whereas FreeBSD stays error prone. E.g. writing to a DVD+RW by $ dd if=/dev/zero bs=1M count=100 of=/dev/cd1 100+0 records in 100+0 records out 104857600 bytes transferred in 195.130322 secs (537372 bytes/sec) yields only 10 % of normal speed and afterwards i get from dmesg: acd1: FAILURE - REQUEST_SENSE timed out acd1: FAILURE - REQUEST_SENSE timed out (cd1:ata2:0:0:0): WRITE(10). CDB: 2a 0 0 0 41 40 0 0 20 0 (cd1:ata2:0:0:0): CAM Status: SCSI Status Error (cd1:ata2:0:0:0): SCSI Status: Check Condition (cd1:ata2:0:0:0): HARDWARE FAILURE asc:8,3 (cd1:ata2:0:0:0): Logical unit communication CRC error (Ultra-DMA/32) (cd1:ata2:0:0:0): Retrying Command (per Sense Data) acd1: FAILURE - WRITE_BIG timed out ... (cd1:ata2:0:0:0): WRITE(10). CDB: 2a 0 0 0 8f c0 0 0 20 0 ... (cd1:ata2:0:0:0): WRITE(10). CDB: 2a 0 0 0 92 60 0 0 20 0 ... (cd1:ata2:0:0:0): WRITE(10). CDB: 2a 0 0 0 a1 a0 0 0 20 0 ... (cd1:ata2:0:0:0): WRITE(10). CDB: 2a 0 0 0 c7 60 0 0 20 0 ... acd1: FAILURE - REQUEST_SENSE timed out I then tried via /dev/acd1. The behavior got quite nasty: $ dd if=/dev/zero bs=1M count=100 of=/dev/acd1 was stuck for at least 15 minutes. Uninterruptible. I had to reboot. dmesg reported sparsely: acd1: FAILURE - WRITE_BIG HARDWARE ERROR asc=0x08 ascq=0x03 Further tries with /dev/acd1 yielded: $ dd if=/dev/zero bs=1M count=100 of=/dev/acd1 dd: /dev/acd1: Input/output error 2+0 records in 1+0 records out 1048576 bytes transferred in 0.882248 secs (1188527 bytes/sec) with dmesg: acd1: FAILURE - WRITE_BIG HARDWARE ERROR asc=0x08 ascq=0x03 acd1: TIMEOUT - WRITE_BIG retrying (1 retry left) Reading data works fine $ dd if=/dev/cd1 bs=1M count=1000 of=/dev/null 1000+0 records in 1000+0 records out 1048576000 bytes transferred in 127.781828 secs (8205987 bytes/sec) at nearly twice the speed of flawless writing. The same drive works well at USB or inside the computer at SATA. Nevertheless i would like to get eSATA ready so that i can test SATA drives without opening the computer box. ------------------------------------------------ Have a nice day :) Thomas