Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic use wdc_maxdrives for atabus_alloc_drives() also ...



details:   https://anonhg.NetBSD.org/src/rev/61d41e222f0a
branches:  trunk
changeset: 744700:61d41e222f0a
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Feb 10 20:11:48 2020 +0000

description:
use wdc_maxdrives for atabus_alloc_drives() also in wdc_sataprobe()
instead of magic 1; no functional change, all wdc_sataprobe() users
actually set wdc_maxdrives to 1

diffstat:

 sys/dev/ic/wdc.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 17e257b6d6d1 -r 61d41e222f0a sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Mon Feb 10 19:04:01 2020 +0000
+++ b/sys/dev/ic/wdc.c  Mon Feb 10 20:11:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.296 2019/12/27 09:41:50 msaitoh Exp $ */
+/*     $NetBSD: wdc.c,v 1.297 2020/02/10 20:11:48 jdolecek Exp $ */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.296 2019/12/27 09:41:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.297 2020/02/10 20:11:48 jdolecek Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -203,6 +203,7 @@
 void
 wdc_sataprobe(struct ata_channel *chp)
 {
+       struct wdc_softc *wdc = CHAN_TO_WDC(chp);
        struct wdc_regs *wdr = CHAN_TO_WDC_REGS(chp);
        uint8_t st = 0, sc __unused, sn __unused, cl, ch;
        int i;
@@ -243,7 +244,7 @@
                    "cl=0x%x ch=0x%x\n",
                    device_xname(chp->ch_atac->atac_dev), chp->ch_channel,
                    sc, sn, cl, ch), DEBUG_PROBE);
-               if (atabus_alloc_drives(chp, 1) != 0)
+               if (atabus_alloc_drives(chp, wdc->wdc_maxdrives) != 0)
                        return;
                /*
                 * sc and sn are supposed to be 0x1 for ATAPI, but in some



Home | Main Index | Thread Index | Old Index