How to slow down SATA to 1.5 GBit/s ?

Juergen Lock nox at jelal.kn-bremen.de
Fri Mar 12 21:04:08 UTC 2010


In article <10609484503607 at 192.168.2.69> you write:
>Hi,
>
>Andrey V. Elsukov wrote:
>> Can you show `pciconf -l` output?
>
># pciconf -l
>hostb0 at pci0:0:0:0:      class=0x060000 card=0x50001458 chip=0x79111002 rev=0x00 hdr=0x00
>pcib1 at pci0:0:1:0:       class=0x060400 card=0x79121002 chip=0x79121002 rev=0x00 hdr=0x01
>pcib2 at pci0:0:6:0:       class=0x060400 card=0x50001458 chip=0x79161002 rev=0x00 hdr=0x01
>atapci0 at pci0:0:17:0:    class=0x010601 card=0xb0021458 chip=0x43911002 rev=0x00 hdr=0x00

That looks like an SB700 aka ATI IXP700 which should be supported by
ahci(4) on FreeBSD >= 8.0 and then hopefully will slow down to sata150
if you set
	hint.ahcich.X.sata_rev=1
in /boot/device.hints (see man ahci.)  The controller doesn't like scsi
commands sent to non-atapi devices like ada(4) tho (they cause the bus
to hang), so if your burning app does things like `cdrecord -scanbus'
and you are on 8.0 release (as opposed to stable/8 or head where I think
this condition is catched now) you might want to try the patch in this
posting:
	http://docs.freebsd.org/cgi/mid.cgi?4B6358F3.7080908
(Click on the `Raw E-Mail' link at the top to grab the patch, I hope it
applies to 8.0 release too...)

 More about ahci(4) is here:
	http://ivoras.sharanet.org/blog/tree/2009-11-17.trying-ahci-in-8.0.html

 As mentioned there disks will rename from adX to adaY, another option
to cope with that if you don't want to adjust fstab each time you
dis/enable ahci(4) is to mount them by using /dev/ufsid/XXXX device nodes
at least if you still use ufs; you can find the device node to use by doing:

	dumpfs /dev/adXsYa | sed -n '/id/{s-^.*\[ \(.*\) \(.*\) \]$-/dev/ufsid/\1\2-;p;q;}'

(you still have to take care of swap manually then tho, and dumpdev in
rc.conf if you have it set explicitly.)

 Once fstab is fixed, have ahci.ko loaded via loader.conf and reboot:
	ahci_load="YES"
- or if you want to try it only temporary at first you can also escape
to the loader prompt from the beastie menu and then type:
	load ahci
	boot -v
or:
	load ahci
	boot -v -s
if you want to try it in single user mode first.

 Oh and with ahci the burner will appear as a cd(4) device automatically
so you also don't need atapicam anymore.

 And you may be able to change ahci(4) sata speed at runtime too using
camcontrol,
	http://docs.freebsd.org/cgi/mid.cgi?4B18DDDA.3050608
tho I don't know whether 8.0 release has that part of the code yet.

 HTH, :)
	Juergen


More information about the freebsd-hackers mailing list