Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi execute the cache page MODE SENSE with XS_CTL...



details:   https://anonhg.NetBSD.org/src/rev/5ca67a96388b
branches:  trunk
changeset: 822863:5ca67a96388b
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Apr 10 18:20:43 2017 +0000

description:
execute the cache page MODE SENSE with XS_CTL_SILENT; it's pretty normal
for e.g. USB sticks thus showing error is not really useful, and the pretty
printing triggers autoload of scsiverbose module and immediate deadlock when
the DIOCGCACHE call is made by WAPBL during root mount

adresses PR kern/52147 by Michael van Elst

diffstat:

 sys/dev/scsipi/sd.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 5405ee57c843 -r 5ca67a96388b sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Mon Apr 10 18:13:46 2017 +0000
+++ b/sys/dev/scsipi/sd.c       Mon Apr 10 18:20:43 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.323 2017/04/05 20:15:49 jdolecek Exp $        */
+/*     $NetBSD: sd.c,v 1.324 2017/04/10 18:20:43 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.323 2017/04/05 20:15:49 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.324 2017/04/10 18:20:43 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_scsi.h"
@@ -1823,7 +1823,7 @@
 
        memset(&scsipi_sense, 0, sizeof(scsipi_sense));
        error = sd_mode_sense(sd, SMS_DBD, &scsipi_sense,
-           sizeof(scsipi_sense.pages.caching_params), 8, 0, &big);
+           sizeof(scsipi_sense.pages.caching_params), 8, XS_CTL_SILENT, &big);
        if (error)
                return (error);
 
@@ -1852,7 +1852,7 @@
        memset(&scsipi_sense, 0, sizeof(scsipi_sense));
        error = sd_mode_sense(sd, SMS_DBD, &scsipi_sense,
            sizeof(scsipi_sense.pages.caching_params),
-           SMS_PCTRL_CHANGEABLE|8, 0, &big);
+           SMS_PCTRL_CHANGEABLE|8, XS_CTL_SILENT, &big);
        if (error == 0) {
                if (big)
                        pages = (void *)(&scsipi_sense.header.big + 1);



Home | Main Index | Thread Index | Old Index