Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/scsipi Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/94e655cf09d5
branches:  netbsd-9
changeset: 1002162:94e655cf09d5
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Feb 11 12:53:28 2021 +0000

description:
Pull up following revision(s) (requested by ryoon in ticket #1203):

        sys/dev/scsipi/cd.c: revision 1.350
        sys/dev/scsipi/sd.c: revision 1.331

PR 55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()

diffstat:

 sys/dev/scsipi/cd.c |  6 +++---
 sys/dev/scsipi/sd.c |  7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r 4f5ee5de3279 -r 94e655cf09d5 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Wed Feb 10 16:55:39 2021 +0000
+++ b/sys/dev/scsipi/cd.c       Thu Feb 11 12:53:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.342.4.1 2020/04/02 19:15:35 martin Exp $      */
+/*     $NetBSD: cd.c,v 1.342.4.2 2021/02/11 12:53:28 martin Exp $      */
 
 /*-
  * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.342.4.1 2020/04/02 19:15:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.342.4.2 2021/02/11 12:53:28 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1378,7 +1378,7 @@
                    XS_CTL_IGNORE_NOT_READY | XS_CTL_IGNORE_MEDIA_CHANGE));
        case DIOCEJECT:
                if (*(int *)addr == 0) {
-                       int pmask = 1 << part;
+                       int pmask = __BIT(part);
                        /*
                         * Don't force eject: check that we are the only
                         * partition open. If so, unlock it.
diff -r 4f5ee5de3279 -r 94e655cf09d5 sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Wed Feb 10 16:55:39 2021 +0000
+++ b/sys/dev/scsipi/sd.c       Thu Feb 11 12:53:28 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.327.4.1 2020/03/21 15:52:09 martin Exp $      */
+/*     $NetBSD: sd.c,v 1.327.4.2 2021/02/11 12:53:28 martin 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.327.4.1 2020/03/21 15:52:09 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.327.4.2 2021/02/11 12:53:28 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_scsi.h"
@@ -954,11 +954,12 @@
                if ((periph->periph_flags & PERIPH_REMOVABLE) == 0)
                        return (ENOTTY);
                if (*(int *)addr == 0) {
+                       int pmask = __BIT(part);
                        /*
                         * Don't force eject: check that we are the only
                         * partition open. If so, unlock it.
                         */
-                       if (DK_BUSY(dksc, part) == 0) {
+                       if (DK_BUSY(dksc, pmask) == 0) {
                                error = scsipi_prevent(periph, SPAMR_ALLOW,
                                    XS_CTL_IGNORE_NOT_READY);
                                if (error)



Home | Main Index | Thread Index | Old Index