Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/57bffac0592b
branches:  netbsd-8
changeset: 951998:57bffac0592b
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Feb 11 12:54:56 2021 +0000

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

        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 7e4972b8ddea -r 57bffac0592b sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Wed Feb 10 16:57:42 2021 +0000
+++ b/sys/dev/scsipi/cd.c       Thu Feb 11 12:54:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.340.6.2 2020/03/29 12:10:37 martin Exp $      */
+/*     $NetBSD: cd.c,v 1.340.6.3 2021/02/11 12:54:56 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.340.6.2 2020/03/29 12:10:37 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.340.6.3 2021/02/11 12:54:56 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 7e4972b8ddea -r 57bffac0592b sys/dev/scsipi/sd.c
--- a/sys/dev/scsipi/sd.c       Wed Feb 10 16:57:42 2021 +0000
+++ b/sys/dev/scsipi/sd.c       Thu Feb 11 12:54:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sd.c,v 1.324.6.1 2017/06/21 18:18:55 snj Exp $ */
+/*     $NetBSD: sd.c,v 1.324.6.2 2021/02/11 12:54:56 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.324.6.1 2017/06/21 18:18:55 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.324.6.2 2021/02/11 12:54:56 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_scsi.h"
@@ -950,11 +950,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