From 3e78ee6328cba2e4b1f8810e09ea07123a339d9a Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Thu, 26 Feb 2015 12:51:05 +0000 Subject: [PATCH] For some uniformity move ahci_ch_init() call under the lock. Submitted by: Dmitry Luhtionov MFC after: 2 weeks --- sys/dev/ahci/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 32a359c930e..e05dd7033b6 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -668,8 +668,8 @@ ahci_ch_attach(device_t dev) return (ENXIO); ahci_dmainit(dev); ahci_slotsalloc(dev); - ahci_ch_init(dev); mtx_lock(&ch->mtx); + ahci_ch_init(dev); rid = ATA_IRQ_RID; if (!(ch->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE))) {