Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2013 12:13:47 +0700
From:      Alexey Dokuchaev <danfe@nsu.ru>
To:        questions@freebsd.org
Subject:   TRIM support on SSD via ata(4)
Message-ID:  <20130122051346.GA53833@regency.nsu.ru>

next in thread | raw e-mail | index | archive | help
Hi there,

I've just bought this Crucial M4 SSD few days ago as a (hopefully) nice
upgrade option for my old laptop (I'm currently using it via SATA->IDE
cdrom bay).  Not the best setup, but alas I see no other options for me
due to lack of any real SATA ports and an old controller (my system is
recent 8.3-STABLE):

$ pciconf -lv | grep -i ata
atapci0@pci0:0:31:1:    class=0x01018a card=0x83191033 chip=0x266f8086
rev=0x04 hdr=0x00
    device     = 'PATA100 Controller - 266F (82801FB/FBM/FW/FR/FRW)'
    subclass   = ATA

Anyway, drive is recognized and seems to work quite fine, but one thing
in dmesg puzzles me when I mount filesystem from SSD:

	TRIM flag on fs but disk does not support TRIM

Under Linux, hdparm(8) reports that TRIM is supported, so I'm wondering
why FreeBSD does not see it.  My ata(4) support in /boot/loader.conf looks
like this (little to none hardware support is compiled into the kernel):

ataintel_load="YES"
atadisk_load="YES"
atapci_load="YES"

$ kldstat | grep ata
20    1 0xc0a65000 4734     atadisk.ko
21    5 0xc0a6a000 e398     ata.ko
22    3 0xc0a79000 80d4     atapci.ko
38    1 0xc0afc000 76ec     ataintel.ko
39    2 0xc0b04000 6f50     ataahci.ko

Unfortunately, I cannot use ahci(4) and limited to atacontrol(8), which
does not have "identify" command like camcontrol(8).  Shall I recompile the
kernel with ATA_CAM option?  Is there way to force TRIM support, perhaps by
sending ATA commands directly to the drive?  Thanks,

./danfe

P.S.  Buying a new laptop is the easiest solution, but I do not want to do
that for various reasons, mostly because it's quite hard to find one that
would be nicely supported by FreeBSD these days.



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