How do I use NCQ of Intel X25-E(SSD) on ahci(4)?

Artem Belevich fbsdlist at src.cx
Wed Nov 18 20:06:13 UTC 2009


> --- 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);

The comma at the end of the "ch->numslots = ..." line looks
suspicious. Shouldn't it be ';' ?

--Artem


More information about the freebsd-current mailing list