Date: Thu, 19 Nov 2009 02:14:40 +0900 From: Norikatsu Shigemura <nork@FreeBSD.org> To: Alexander Motin <mav@freebsd.org> Cc: freebsd-current@freebsd.org, Norikatsu Shigemura <nork@freebsd.org> Subject: Re: How do I use NCQ of Intel X25-E(SSD) on ahci(4)? Message-ID: <20091119021440.560884b2.nork@FreeBSD.org> In-Reply-To: <4B042304.8060807@FreeBSD.org> References: <20091119004651.7432a6e4.nork@FreeBSD.org> <4B042304.8060807@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Alexander. On Wed, 18 Nov 2009 18:38:28 +0200 Alexander Motin <mav@freebsd.org> wrote: > > Native Command Queuing (NCQ) yes 30/0x1E > > Here is the reason ^^^ > This drive support less tags (31) then your AHCI controller does (32). > Support for such case is not implemented yet. As temporary solution you > may limit controller to use only 31 tag, then NCQ will be used. All you > need is to go to ahci.c and change line > ch->numslots = ...; > to > ch->numslots = min(31, ...); Oops, OK! I confirmed following patch: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- sys/dev/ahci/ahci.c.orig 2009-11-17 22:25:07.474418000 +0900 +++ sys/dev/ahci/ahci.c 2009-11-19 02:00:22.193688908 +0900 @@ -779,7 +779,7 @@ ch->caps = ctlr->caps; ch->caps2 = ctlr->caps2; ch->quirks = ctlr->quirks; - ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, + ch->numslots = min(31, ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1), mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ahci(4) can use NCQ of X25-E. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: <SSDSA2SH064G1GC INTEL 045C8790> ATA/ATAPI-7 SATA 2.x device ada0: 300.000MB/s transfers ada0: Command Queueing enabled ada0: 61057MB (125045424 512 byte sectors: 16H 63S/T 16383C) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # camcontrol tags ada0 (pass0:ahcich0:0:0:0): device openings: 31 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Thank you!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091119021440.560884b2.nork>