From owner-svn-src-all@freebsd.org Sun Feb 3 08:53:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D367B14BE1B3; Sun, 3 Feb 2019 08:53:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F87A8A40E; Sun, 3 Feb 2019 08:53:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 613FD1C4A7; Sun, 3 Feb 2019 08:53:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x138r4mP026661; Sun, 3 Feb 2019 08:53:04 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x138r3CC026658; Sun, 3 Feb 2019 08:53:03 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201902030853.x138r3CC026658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 3 Feb 2019 08:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r343709 - in stable/12/sys/mips: ingenic mips nlm X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/sys/mips: ingenic mips nlm X-SVN-Commit-Revision: 343709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6F87A8A40E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2019 08:53:05 -0000 Author: gonzo Date: Sun Feb 3 08:53:03 2019 New Revision: 343709 URL: https://svnweb.freebsd.org/changeset/base/343709 Log: MFC r343443, r343446, r343448, r343452 r343443: [mips] remove dublicate values in enable mask in nlm_usb_intr_en PR: 230572 Submitted by: David Binderman r343446: [mips] remove check that is always false (unsinged < 0) cpuid and local cpu variable are unsigned so checking if value is less than zero always yields false. PR: 211088 Submitted by: David Binderman r343448: [mips] Fix counter mask in jz4780 timer driver Fix dublicate value in what is apparent copypaste mistake. The last value in mask is supposed to be for counter 7, not counter 3. PR: 229790 Submitted by: David Binderman r343452: [mips] Fix error condition check that always evaluates to false Use proper logical operand when checking the value of srcid PR: 200988 Submitted by: David Binderman Modified: stable/12/sys/mips/ingenic/jz4780_timer.c stable/12/sys/mips/mips/tlb.c stable/12/sys/mips/nlm/cms.c stable/12/sys/mips/nlm/usb_init.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/mips/ingenic/jz4780_timer.c ============================================================================== --- stable/12/sys/mips/ingenic/jz4780_timer.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/ingenic/jz4780_timer.c Sun Feb 3 08:53:03 2019 (r343709) @@ -185,7 +185,7 @@ jz4780_timer_attach(device_t dev) CSR_WRITE_4(sc, JZ_TC_TECR, TESR_OST); /* Stop all other channels as well */ CSR_WRITE_4(sc, JZ_TC_TECR, TESR_TCST0 | TESR_TCST1 | TESR_TCST2 | - TESR_TCST3 | TESR_TCST4 | TESR_TCST5 | TESR_TCST6 | TESR_TCST3); + TESR_TCST3 | TESR_TCST4 | TESR_TCST5 | TESR_TCST6 | TESR_TCST7); /* Clear detect mask flags */ CSR_WRITE_4(sc, JZ_TC_TFCR, 0xFFFFFFFF); /* Mask all interrupts */ Modified: stable/12/sys/mips/mips/tlb.c ============================================================================== --- stable/12/sys/mips/mips/tlb.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/mips/tlb.c Sun Feb 3 08:53:03 2019 (r343709) @@ -348,7 +348,7 @@ DB_SHOW_COMMAND(tlb, ddb_dump_tlb) else cpu = PCPU_GET(cpuid); - if (cpu < 0 || cpu >= mp_ncpus) { + if (cpu >= mp_ncpus) { db_printf("Invalid CPU %u\n", cpu); return; } Modified: stable/12/sys/mips/nlm/cms.c ============================================================================== --- stable/12/sys/mips/nlm/cms.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/nlm/cms.c Sun Feb 3 08:53:03 2019 (r343709) @@ -204,7 +204,7 @@ xlp_handle_msg_vc(u_int vcmask, int max_msgs) nlm_restore_flags(mflags); if (status != 0) /* no msg or error */ continue; - if (srcid < 0 && srcid >= 1024) { + if (srcid < 0 || srcid >= 1024) { printf("[%s]: bad src id %d\n", __func__, srcid); continue; Modified: stable/12/sys/mips/nlm/usb_init.c ============================================================================== --- stable/12/sys/mips/nlm/usb_init.c Sun Feb 3 08:45:01 2019 (r343708) +++ stable/12/sys/mips/nlm/usb_init.c Sun Feb 3 08:53:03 2019 (r343709) @@ -52,8 +52,7 @@ nlm_usb_intr_en(int node, int port) port_addr = nlm_get_usb_regbase(node, port); val = nlm_read_usb_reg(port_addr, USB_INT_EN); val = USB_CTRL_INTERRUPT_EN | USB_OHCI_INTERRUPT_EN | - USB_OHCI_INTERRUPT1_EN | USB_CTRL_INTERRUPT_EN | - USB_OHCI_INTERRUPT_EN | USB_OHCI_INTERRUPT2_EN; + USB_OHCI_INTERRUPT1_EN | USB_OHCI_INTERRUPT2_EN; nlm_write_usb_reg(port_addr, USB_INT_EN, val); }