Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic consistently use the SATA correct 'port %d' inste...



details:   https://anonhg.NetBSD.org/src/rev/bb28c1e3d5bd
branches:  trunk
changeset: 994731:bb28c1e3d5bd
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Mon Nov 19 19:52:08 2018 +0000

description:
consistently use the SATA correct 'port %d' instead of 'channel', some
whitespace fixes

diffstat:

 sys/dev/ic/ahcisata_core.c |  36 ++++++++++++++++++------------------
 sys/dev/ic/siisata.c       |  10 +++++-----
 2 files changed, 23 insertions(+), 23 deletions(-)

diffs (197 lines):

diff -r 727fd84e1f2a -r bb28c1e3d5bd sys/dev/ic/ahcisata_core.c
--- a/sys/dev/ic/ahcisata_core.c        Mon Nov 19 19:10:39 2018 +0000
+++ b/sys/dev/ic/ahcisata_core.c        Mon Nov 19 19:52:08 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_core.c,v 1.66 2018/11/02 21:27:30 jdolecek Exp $      */
+/*     $NetBSD: ahcisata_core.c,v 1.67 2018/11/19 19:52:08 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.66 2018/11/02 21:27:30 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.67 2018/11/19 19:52:08 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -456,19 +456,19 @@
                ahci_setup_port(sc, i);
                if (bus_space_subregion(sc->sc_ahcit, sc->sc_ahcih,
                    AHCI_P_SSTS(i), 4,  &achp->ahcic_sstatus) != 0) {
-                       aprint_error("%s: couldn't map channel %d "
+                       aprint_error("%s: couldn't map port %d "
                            "sata_status regs\n", AHCINAME(sc), i);
                        break;
                }
                if (bus_space_subregion(sc->sc_ahcit, sc->sc_ahcih,
                    AHCI_P_SCTL(i), 4,  &achp->ahcic_scontrol) != 0) {
-                       aprint_error("%s: couldn't map channel %d "
+                       aprint_error("%s: couldn't map port %d "
                            "sata_control regs\n", AHCINAME(sc), i);
                        break;
                }
                if (bus_space_subregion(sc->sc_ahcit, sc->sc_ahcih,
                    AHCI_P_SERR(i), 4,  &achp->ahcic_serror) != 0) {
-                       aprint_error("%s: couldn't map channel %d "
+                       aprint_error("%s: couldn't map port %d "
                            "sata_error regs\n", AHCINAME(sc), i);
                        break;
                }
@@ -771,14 +771,14 @@
                                 */
                                return ERROR;
                        }
-                       aprint_debug("%s channel %d: error 0x%x sending FIS\n",
+                       aprint_debug("%s port %d: error 0x%x sending FIS\n",
                            AHCINAME(sc), chp->ch_channel, is);
                        return ERR_DF;
                }
                ata_delay(chp, 10, "ahcifis", flags);
        }
 
-       aprint_debug("%s channel %d: timeout sending FIS\n",
+       aprint_debug("%s port %d: timeout sending FIS\n",
            AHCINAME(sc), chp->ch_channel);
        return TIMEOUT;
 }
@@ -829,10 +829,10 @@
        cmd_tbl->cmdt_cfis[fis_type] = RHD_FISTYPE;
        cmd_tbl->cmdt_cfis[rhd_c] = drive;
        cmd_tbl->cmdt_cfis[rhd_control] = WDCTL_RST;
-       switch(ahci_exec_fis(chp, 100, flags, c_slot)) {
+       switch (ahci_exec_fis(chp, 100, flags, c_slot)) {
        case ERR_DF:
        case TIMEOUT:
-               aprint_error("%s channel %d: setting WDCTL_RST failed "
+               aprint_error("%s port %d: setting WDCTL_RST failed "
                    "for drive %d\n", AHCINAME(sc), chp->ch_channel, drive);
                if (sigp)
                        *sigp = 0xffffffff;
@@ -847,7 +847,7 @@
        cmd_tbl->cmdt_cfis[fis_type] = RHD_FISTYPE;
        cmd_tbl->cmdt_cfis[rhd_c] = drive;
        cmd_tbl->cmdt_cfis[rhd_control] = 0;
-       switch(ahci_exec_fis(chp, 310, flags, c_slot)) {
+       switch (ahci_exec_fis(chp, 310, flags, c_slot)) {
        case ERR_DF:
        case TIMEOUT:
                if ((sc->sc_ahci_quirks & AHCI_QUIRK_BADPMPRESET) != 0 &&
@@ -861,7 +861,7 @@
                        ahci_channel_stop(sc, chp, flags);
                        goto again;
                }
-               aprint_error("%s channel %d: clearing WDCTL_RST failed "
+               aprint_error("%s port %d: clearing WDCTL_RST failed "
                    "for drive %d\n", AHCINAME(sc), chp->ch_channel, drive);
                if (sigp)
                        *sigp = 0xffffffff;
@@ -930,7 +930,7 @@
        ahci_channel_start(sc, chp, flags,
            (sc->sc_ahci_cap & AHCI_CAP_CLO) ? 1 : 0);
        /* wait 31s for BSY to clear */
-       for (i = 0; i <AHCI_RST_WAIT; i++) {
+       for (i = 0; i < AHCI_RST_WAIT; i++) {
                tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel));
                if ((AHCI_TFD_ST(tfd) & WDCS_BSY) == 0)
                        break;
@@ -1193,7 +1193,7 @@
        struct ata_command *ata_c = &xfer->c_ata_c;
        bool deactivate = true;
 
-       AHCIDEBUG_PRINT(("ahci_cmd_kill_xfer channel %d\n", chp->ch_channel),
+       AHCIDEBUG_PRINT(("ahci_cmd_kill_xfer port %d\n", chp->ch_channel),
            DEBUG_FUNCS);
 
        switch (reason) {
@@ -1226,7 +1226,7 @@
        struct ata_command *ata_c = &xfer->c_ata_c;
        struct ahci_channel *achp = (struct ahci_channel *)chp;
 
-       AHCIDEBUG_PRINT(("ahci_cmd_complete channel %d CMD 0x%x CI 0x%x\n",
+       AHCIDEBUG_PRINT(("ahci_cmd_complete port %d CMD 0x%x CI 0x%x\n",
            chp->ch_channel,
            AHCI_READ(AHCI_CH2SC(chp), AHCI_P_CMD(chp->ch_channel)),
            AHCI_READ(AHCI_CH2SC(chp), AHCI_P_CI(chp->ch_channel))),
@@ -1268,7 +1268,7 @@
        uint16_t *idwordbuf;
        int i;
 
-       AHCIDEBUG_PRINT(("ahci_cmd_done channel %d flags %#x/%#x\n",
+       AHCIDEBUG_PRINT(("ahci_cmd_done port %d flags %#x/%#x\n",
            chp->ch_channel, xfer->c_flags, ata_c->flags), DEBUG_FUNCS);
 
        if (ata_c->flags & (AT_READ|AT_WRITE) && ata_c->bcount > 0) {
@@ -1433,7 +1433,7 @@
        struct ata_bio *ata_bio = &xfer->c_bio;
        bool deactivate = true;
 
-       AHCIDEBUG_PRINT(("ahci_bio_kill_xfer channel %d\n", chp->ch_channel),
+       AHCIDEBUG_PRINT(("ahci_bio_kill_xfer port %d\n", chp->ch_channel),
            DEBUG_FUNCS);
 
        ata_bio->flags |= ATA_ITSDONE;
@@ -1470,7 +1470,7 @@
        struct ahci_channel *achp = (struct ahci_channel *)chp;
        struct ahci_softc *sc = (struct ahci_softc *)chp->ch_atac;
 
-       AHCIDEBUG_PRINT(("ahci_bio_complete channel %d\n", chp->ch_channel),
+       AHCIDEBUG_PRINT(("ahci_bio_complete port %d\n", chp->ch_channel),
            DEBUG_FUNCS);
 
        if (ata_waitdrain_xfer_check(chp, xfer))
@@ -1930,7 +1930,7 @@
        struct ahci_channel *achp = (struct ahci_channel *)chp;
        struct ahci_softc *sc = (struct ahci_softc *)chp->ch_atac;
 
-       AHCIDEBUG_PRINT(("ahci_atapi_complete channel %d\n", chp->ch_channel),
+       AHCIDEBUG_PRINT(("ahci_atapi_complete port %d\n", chp->ch_channel),
            DEBUG_FUNCS);
 
        if (ata_waitdrain_xfer_check(chp, xfer))
diff -r 727fd84e1f2a -r bb28c1e3d5bd sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c      Mon Nov 19 19:10:39 2018 +0000
+++ b/sys/dev/ic/siisata.c      Mon Nov 19 19:52:08 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.38 2018/10/24 20:07:37 jdolecek Exp $ */
+/* $NetBSD: siisata.c,v 1.39 2018/11/19 19:52:08 jdolecek Exp $ */
 
 /* from ahcisata_core.c */
 
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.38 2018/10/24 20:07:37 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.39 2018/11/19 19:52:08 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -573,7 +573,7 @@
                        }
                } else {
                        aprint_error_dev(sc->sc_atac.atac_dev, "fatal error %d"
-                           " on channel %d (ctx 0x%x), resetting\n",
+                           " on port %d (ctx 0x%x), resetting\n",
                            ec, chp->ch_channel,
                            PRREAD(sc, PRX(chp->ch_channel, PRO_PCR)));
 
@@ -753,7 +753,7 @@
        struct siisata_softc *sc = (struct siisata_softc *)chp->ch_atac;
        struct siisata_channel *schp = (struct siisata_channel *)chp;
 
-       SIISATA_DEBUG_PRINT(("%s: %s channel %d\n", SIISATANAME(sc), __func__,
+       SIISATA_DEBUG_PRINT(("%s: %s port %d\n", SIISATANAME(sc), __func__,
            chp->ch_channel), DEBUG_FUNCS);
 
        ata_channel_lock_owned(chp);
@@ -1672,7 +1672,7 @@
                if (periph == NULL) {
                        aprint_error_dev(sc->sc_dev,
                            "%s: unable to allocate periph for "
-                           "channel %d drive %d\n", __func__,
+                           "port %d drive %d\n", __func__,
                            chp->ch_channel, target);
                        return;
                }



Home | Main Index | Thread Index | Old Index