Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2010 14:27:41 +0100
From:      "Thomas Schmitt" <scdbackup@gmx.net>
To:        freebsd-hackers@freebsd.org
Subject:   How to slow down SATA to 1.5 GBit/s ?
Message-ID:  <10610127213209@192.168.2.69>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?10610127213209>