svn commit: r343709 - in stable/12/sys/mips: ingenic mips nlm

Oleksandr Tymoshenko gonzo at FreeBSD.org
Sun Feb 3 08:53:05 UTC 2019


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 <dcb314 at hotmail.com>
  
  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 <dcb314 at hotmail.com>
  
  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 <dcb314 at hotmail.com>
  
  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 <dcb314 at hotmail.com>

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);
 }
 


More information about the svn-src-all mailing list