Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/jdolecek-ncqfixes]: src/sys/dev/ata use KM_SLEEP in atabus_alloc_drives(...



details:   https://anonhg.NetBSD.org/src/rev/f3da49ca9718
branches:  jdolecek-ncqfixes
changeset: 850580:f3da49ca9718
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Sep 22 09:26:48 2018 +0000

description:
use KM_SLEEP in atabus_alloc_drives() to avoid spurious failures; this is
not called from interrupt context

diffstat:

 sys/dev/ata/TODO.ncq |  1 -
 sys/dev/ata/ata.c    |  6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 7aa64a040de5 -r f3da49ca9718 sys/dev/ata/TODO.ncq
--- a/sys/dev/ata/TODO.ncq      Sat Sep 22 09:22:59 2018 +0000
+++ b/sys/dev/ata/TODO.ncq      Sat Sep 22 09:26:48 2018 +0000
@@ -7,7 +7,6 @@
   triggers KASSERT()
 - fix ahci(4) error handling under paralles - invalid bio via WD_CHAOS_MONKEY
   ends up being handled as NOERROR, triggering KASSERT() in wd(4)
-- weed out remaining KM_NOSLEEP
 
 Bugs
 ----
diff -r 7aa64a040de5 -r f3da49ca9718 sys/dev/ata/ata.c
--- a/sys/dev/ata/ata.c Sat Sep 22 09:22:59 2018 +0000
+++ b/sys/dev/ata/ata.c Sat Sep 22 09:26:48 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ata.c,v 1.141.6.6 2018/09/22 09:22:59 jdolecek Exp $   */
+/*     $NetBSD: ata.c,v 1.141.6.7 2018/09/22 09:26:48 jdolecek Exp $   */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.141.6.6 2018/09/22 09:22:59 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.141.6.7 2018/09/22 09:26:48 jdolecek Exp $");
 
 #include "opt_ata.h"
 
@@ -719,7 +719,7 @@
                atabus_free_drives(chp);
        if (chp->ch_drive == NULL) {
                chp->ch_drive = kmem_zalloc(
-                   sizeof(struct ata_drive_datas) * ndrives, KM_NOSLEEP);
+                   sizeof(struct ata_drive_datas) * ndrives, KM_SLEEP);
        }
        if (chp->ch_drive == NULL) {
            aprint_error_dev(chp->ch_atac->atac_dev,



Home | Main Index | Thread Index | Old Index