CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Tue Jul 14 08:06:44 UTC 2015 Modified Files: src/sys/net: if_strip.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/net/if_strip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_strip.c diff -u src/sys/net/if_strip.c:1.97 src/sys/net/if_strip.c:1.98 --- src/sys/net/if_strip.c:1.97 Thu Jun 5 23:48:16 2014 +++ src/sys/net/if_strip.c Tue Jul 14 08:06:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_strip.c,v 1.97 2014/06/05 23:48:16 rmind Exp $ */ +/* $NetBSD: if_strip.c,v 1.98 2015/07/14 08:06:44 ozaki-r Exp $ */ /* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */ /* @@ -87,7 +87,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_strip.c,v 1.97 2014/06/05 23:48:16 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: if_strip.c,v 1.98 2015/07/14 08:06:44 ozaki-r Exp $); #include opt_inet.h @@ -749,26 +749,26 @@ stripoutput(struct ifnet *ifp, struct mb printf(stripout, rt: dst af%d gw af%d, rt_getkey(rt)-sa_family, rt-rt_gateway-sa_family); if (rt_getkey(rt)-sa_family == AF_INET) - printf( dst %x, - satocsin(rt_getkey(rt))-sin_addr.s_addr); + printf( dst %x, + satocsin(rt_getkey(rt))-sin_addr.s_addr); printf(\n); } #endif switch (dst-sa_family) { case AF_INET: -if (rt != NULL rt-rt_gwroute != NULL) -rt = rt-rt_gwroute; + if (rt != NULL rt-rt_gwroute != NULL) + rt = rt-rt_gwroute; -/* assume rt is never NULL */ -if (rt == NULL || rt-rt_gateway-sa_family != AF_LINK -|| satocsdl(rt-rt_gateway)-sdl_alen != ifp-if_addrlen) { + /* assume rt is never NULL */ + if (rt == NULL || rt-rt_gateway-sa_family != AF_LINK || + satocsdl(rt-rt_gateway)-sdl_alen != ifp-if_addrlen) { DPRINTF((strip: could not arp starmode addr %x\n, - satocsin(dst)-sin_addr.s_addr)); + satocsin(dst)-sin_addr.s_addr)); m_freem(m); return (EHOSTUNREACH); } -dldst = CLLADDR(satocsdl(rt-rt_gateway)); -break; + dldst = CLLADDR(satocsdl(rt-rt_gateway)); + break; case AF_LINK: dldst = CLLADDR(satocsdl(dst));
CVS commit: src/sys
Module Name:src Committed By: ozaki-r Date: Tue Jul 14 08:44:59 UTC 2015 Modified Files: src/sys/net: if_strip.c src/sys/netinet: ip_output.c Log Message: Move rt_gwroute operation out of stripoutput We should do it in ip_hresolv_needed. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/net/if_strip.c cvs rdiff -u -r1.242 -r1.243 src/sys/netinet/ip_output.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_strip.c diff -u src/sys/net/if_strip.c:1.99 src/sys/net/if_strip.c:1.100 --- src/sys/net/if_strip.c:1.99 Tue Jul 14 08:15:41 2015 +++ src/sys/net/if_strip.c Tue Jul 14 08:44:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_strip.c,v 1.99 2015/07/14 08:15:41 ozaki-r Exp $ */ +/* $NetBSD: if_strip.c,v 1.100 2015/07/14 08:44:59 ozaki-r Exp $ */ /* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */ /* @@ -87,7 +87,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_strip.c,v 1.99 2015/07/14 08:15:41 ozaki-r Exp $); +__KERNEL_RCSID(0, $NetBSD: if_strip.c,v 1.100 2015/07/14 08:44:59 ozaki-r Exp $); #include opt_inet.h @@ -755,9 +755,6 @@ stripoutput(struct ifnet *ifp, struct mb #endif switch (dst-sa_family) { case AF_INET: - if (rt != NULL rt-rt_gwroute != NULL) - rt = rt-rt_gwroute; - /* assume rt is never NULL */ if (rt == NULL || rt-rt_gateway-sa_family != AF_LINK || satocsdl(rt-rt_gateway)-sdl_alen != ifp-if_addrlen) { Index: src/sys/netinet/ip_output.c diff -u src/sys/netinet/ip_output.c:1.242 src/sys/netinet/ip_output.c:1.243 --- src/sys/netinet/ip_output.c:1.242 Wed Jul 1 03:39:36 2015 +++ src/sys/netinet/ip_output.c Tue Jul 14 08:44:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.242 2015/07/01 03:39:36 ozaki-r Exp $ */ +/* $NetBSD: ip_output.c,v 1.243 2015/07/14 08:44:59 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ip_output.c,v 1.242 2015/07/01 03:39:36 ozaki-r Exp $); +__KERNEL_RCSID(0, $NetBSD: ip_output.c,v 1.243 2015/07/14 08:44:59 ozaki-r Exp $); #include opt_inet.h #include opt_ipsec.h @@ -167,6 +167,7 @@ ip_hresolv_needed(const struct ifnet * c case IFT_HIPPI: case IFT_IEEE1394: case IFT_ISO88025: + case IFT_SLIP: return true; default: return false;
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Tue Jul 14 08:15:41 UTC 2015 Modified Files: src/sys/net: if_strip.c Log Message: Remove unnecessary if_type setting if_type is set as IFT_SLIP below. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/net/if_strip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/if_strip.c diff -u src/sys/net/if_strip.c:1.98 src/sys/net/if_strip.c:1.99 --- src/sys/net/if_strip.c:1.98 Tue Jul 14 08:06:44 2015 +++ src/sys/net/if_strip.c Tue Jul 14 08:15:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_strip.c,v 1.98 2015/07/14 08:06:44 ozaki-r Exp $ */ +/* $NetBSD: if_strip.c,v 1.99 2015/07/14 08:15:41 ozaki-r Exp $ */ /* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */ /* @@ -87,7 +87,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_strip.c,v 1.98 2015/07/14 08:06:44 ozaki-r Exp $); +__KERNEL_RCSID(0, $NetBSD: if_strip.c,v 1.99 2015/07/14 08:15:41 ozaki-r Exp $); #include opt_inet.h @@ -368,7 +368,6 @@ strip_clone_create(struct if_clone *ifc, sc-sc_if.if_softc = sc; sc-sc_if.if_mtu = SLMTU; sc-sc_if.if_flags = 0; - sc-sc_if.if_type = IFT_OTHER; #if 0 sc-sc_if.if_flags |= SC_AUTOCOMP /* | IFF_POINTOPOINT | IFF_MULTICAST*/; #endif
CVS commit: src/sys/nfs
Module Name:src Committed By: manu Date: Wed Jul 15 03:28:55 UTC 2015 Modified Files: src/sys/nfs: nfs_bio.c nfs_clntsocket.c nfs_iod.c nfs_socket.c nfs_var.h nfs_vfsops.c nfsmount.h Log Message: Fix soft NFS force unmount For many reasons, forcibly unmounting a soft NFS mount could hang forever. Here are the fixes: - Introduce decents timeouts in operation that awaited NFS server reply. - On timeout, fails operations on soft mounts with EIO. - Introduce NFSMNT_DISMNTFORCE to let the filesystem know that a force unmount is ongoing. This causes timeouts to be reduced and prevents the NFS client to attempt reconnecting to the NFS server. Also fix a race condition where some asynchronous I/O could reference destroyed mount structures. We fix this by awaiting asynchronous I/O to drain before proceeding. Reviewed by Chuck Silvers. To generate a diff of this commit: cvs rdiff -u -r1.190 -r1.191 src/sys/nfs/nfs_bio.c cvs rdiff -u -r1.2 -r1.3 src/sys/nfs/nfs_clntsocket.c cvs rdiff -u -r1.6 -r1.7 src/sys/nfs/nfs_iod.c cvs rdiff -u -r1.196 -r1.197 src/sys/nfs/nfs_socket.c cvs rdiff -u -r1.93 -r1.94 src/sys/nfs/nfs_var.h cvs rdiff -u -r1.229 -r1.230 src/sys/nfs/nfs_vfsops.c cvs rdiff -u -r1.52 -r1.53 src/sys/nfs/nfsmount.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/nfs/nfs_bio.c diff -u src/sys/nfs/nfs_bio.c:1.190 src/sys/nfs/nfs_bio.c:1.191 --- src/sys/nfs/nfs_bio.c:1.190 Fri Sep 5 05:34:57 2014 +++ src/sys/nfs/nfs_bio.c Wed Jul 15 03:28:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_bio.c,v 1.190 2014/09/05 05:34:57 matt Exp $ */ +/* $NetBSD: nfs_bio.c,v 1.191 2015/07/15 03:28:55 manu Exp $ */ /* * Copyright (c) 1989, 1993 @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.190 2014/09/05 05:34:57 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: nfs_bio.c,v 1.191 2015/07/15 03:28:55 manu Exp $); #ifdef _KERNEL_OPT #include opt_nfs.h @@ -624,7 +624,10 @@ nfs_vinvalbuf(struct vnode *vp, int flag slptimeo = 2 * hz; } else { catch_p = false; - slptimeo = 0; + if (nmp-nm_flag NFSMNT_SOFT) + slptimeo = nmp-nm_retry * nmp-nm_timeo; + else + slptimeo = 0; } /* * First wait for any other process doing a flush to complete. @@ -743,6 +746,13 @@ nfs_asyncio(struct buf *bp) return (EIO); nmp = VFSTONFS(bp-b_vp-v_mount); + + if (nmp-nm_flag NFSMNT_SOFT) + slptimeo = nmp-nm_retry * nmp-nm_timeo; + + if (nmp-nm_iflag NFSMNT_DISMNTFORCE) + slptimeo = hz; + again: if (nmp-nm_flag NFSMNT_INT) catch_p = true; @@ -804,6 +814,13 @@ again: nmp-nm_lock, slptimeo); } if (error) { +if (error == EWOULDBLOCK +nmp-nm_flag NFSMNT_SOFT) { + mutex_exit(nmp-nm_lock); + bp-b_error = EIO; + return (EIO); +} + if (nfs_sigintr(nmp, NULL, curlwp)) { mutex_exit(nmp-nm_lock); return (EINTR); Index: src/sys/nfs/nfs_clntsocket.c diff -u src/sys/nfs/nfs_clntsocket.c:1.2 src/sys/nfs/nfs_clntsocket.c:1.3 --- src/sys/nfs/nfs_clntsocket.c:1.2 Fri Sep 5 05:34:57 2014 +++ src/sys/nfs/nfs_clntsocket.c Wed Jul 15 03:28:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_clntsocket.c,v 1.2 2014/09/05 05:34:57 matt Exp $ */ +/* $NetBSD: nfs_clntsocket.c,v 1.3 2015/07/15 03:28:55 manu Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nfs_clntsocket.c,v 1.2 2014/09/05 05:34:57 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: nfs_clntsocket.c,v 1.3 2015/07/15 03:28:55 manu Exp $); #ifdef _KERNEL_OPT #include opt_nfs.h @@ -967,6 +967,12 @@ nfs_sndlock(struct nfsmount *nmp, struct bool catch_p = false; int error = 0; + if (nmp-nm_flag NFSMNT_SOFT) + timeo = nmp-nm_retry * nmp-nm_timeo; + + if (nmp-nm_iflag NFSMNT_DISMNTFORCE) + timeo = hz; + if (rep) { l = rep-r_lwp; if (rep-r_nmp-nm_flag NFSMNT_INT) @@ -980,9 +986,20 @@ nfs_sndlock(struct nfsmount *nmp, struct goto quit; } if (catch_p) { - cv_timedwait_sig(nmp-nm_sndcv, nmp-nm_lock, timeo); + error = cv_timedwait_sig(nmp-nm_sndcv, + nmp-nm_lock, timeo); } else { - cv_timedwait(nmp-nm_sndcv, nmp-nm_lock, timeo); + error = cv_timedwait(nmp-nm_sndcv, + nmp-nm_lock, timeo); + } + + if (error) { + if ((error == EWOULDBLOCK) + (nmp-nm_flag NFSMNT_SOFT)) { +error = EIO; +goto quit; + } + error = 0; } if (catch_p) { catch_p = false; Index: src/sys/nfs/nfs_iod.c diff -u src/sys/nfs/nfs_iod.c:1.6 src/sys/nfs/nfs_iod.c:1.7 --- src/sys/nfs/nfs_iod.c:1.6 Fri Oct 25 16:01:56 2013 +++ src/sys/nfs/nfs_iod.c Wed Jul 15 03:28:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_iod.c,v 1.6 2013/10/25 16:01:56 martin Exp $ */ +/* $NetBSD: nfs_iod.c,v 1.7 2015/07/15 03:28:55 manu Exp $ */ /* * Copyright (c) 1989, 1993 @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nfs_iod.c,v 1.6
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: msaitoh Date: Wed Jul 15 04:49:02 UTC 2015 Modified Files: src/sys/arch/x86/x86: lapic.c mpacpi.c Log Message: - Add lapic_dump() to print lapic's setting. - Add mpacpi_dump() to dump mp_intrs[]. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/x86/lapic.c cvs rdiff -u -r1.98 -r1.99 src/sys/arch/x86/x86/mpacpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/lapic.c diff -u src/sys/arch/x86/x86/lapic.c:1.48 src/sys/arch/x86/x86/lapic.c:1.49 --- src/sys/arch/x86/x86/lapic.c:1.48 Mon May 18 13:04:21 2015 +++ src/sys/arch/x86/x86/lapic.c Wed Jul 15 04:49:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lapic.c,v 1.48 2015/05/18 13:04:21 msaitoh Exp $ */ +/* $NetBSD: lapic.c,v 1.49 2015/07/15 04:49:02 msaitoh Exp $ */ /*- * Copyright (c) 2000, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: lapic.c,v 1.48 2015/05/18 13:04:21 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: lapic.c,v 1.49 2015/07/15 04:49:02 msaitoh Exp $); #include opt_ddb.h #include opt_mpbios.h /* for MPDEBUG */ @@ -76,6 +76,8 @@ static void lapic_map(paddr_t); static void lapic_hwmask(struct pic *, int); static void lapic_hwunmask(struct pic *, int); static void lapic_setup(struct pic *, struct cpu_info *, int, int, int); +/* Make it public to call via ddb */ +void lapic_dump(void); struct pic local_pic = { .pic_name = lapic, @@ -194,18 +196,8 @@ lapic_set_lvt(void) } #ifdef MULTIPROCESSOR - if (mp_verbose) { - apic_format_redir (device_xname(ci-ci_dev), timer, 0, 0, - i82489_readreg(LAPIC_LVTT)); - apic_format_redir (device_xname(ci-ci_dev), pcint, 0, 0, - i82489_readreg(LAPIC_PCINT)); - apic_format_redir (device_xname(ci-ci_dev), lint, 0, 0, - i82489_readreg(LAPIC_LVINT0)); - apic_format_redir (device_xname(ci-ci_dev), lint, 1, 0, - i82489_readreg(LAPIC_LVINT1)); - apic_format_redir (device_xname(ci-ci_dev), err, 0, 0, - i82489_readreg(LAPIC_LVERR)); - } + if (mp_verbose) + lapic_dump(); #endif } @@ -616,3 +608,20 @@ lapic_setup(struct pic *pic, struct cpu_ int pin, int idtvec, int type) { } + +void +lapic_dump(void) +{ + struct cpu_info *ci = curcpu(); + + apic_format_redir (device_xname(ci-ci_dev), timer, 0, 0, + i82489_readreg(LAPIC_LVTT)); + apic_format_redir (device_xname(ci-ci_dev), pcint, 0, 0, + i82489_readreg(LAPIC_PCINT)); + apic_format_redir (device_xname(ci-ci_dev), lint, 0, 0, + i82489_readreg(LAPIC_LVINT0)); + apic_format_redir (device_xname(ci-ci_dev), lint, 1, 0, + i82489_readreg(LAPIC_LVINT1)); + apic_format_redir (device_xname(ci-ci_dev), err, 0, 0, + i82489_readreg(LAPIC_LVERR)); +} Index: src/sys/arch/x86/x86/mpacpi.c diff -u src/sys/arch/x86/x86/mpacpi.c:1.98 src/sys/arch/x86/x86/mpacpi.c:1.99 --- src/sys/arch/x86/x86/mpacpi.c:1.98 Mon Jun 22 07:26:52 2015 +++ src/sys/arch/x86/x86/mpacpi.c Wed Jul 15 04:49:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mpacpi.c,v 1.98 2015/06/22 07:26:52 msaitoh Exp $ */ +/* $NetBSD: mpacpi.c,v 1.99 2015/07/15 04:49:02 msaitoh Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,10 +36,11 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.98 2015/06/22 07:26:52 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: mpacpi.c,v 1.99 2015/07/15 04:49:02 msaitoh Exp $); #include acpica.h #include opt_acpi.h +#include opt_ddb.h #include opt_mpbios.h #include opt_multiprocessor.h #include pchb.h @@ -123,6 +124,10 @@ static void mpacpi_print_isa_intr(int); static void mpacpi_user_continue(const char *fmt, ...); +#ifdef DDB +void mpacpi_dump(void); +#endif + int mpacpi_nioapic; /* number of ioapics */ int mpacpi_ncpu; /* number of cpus */ int mpacpi_nintsrc; /* number of non-device interrupts */ @@ -1080,3 +1085,13 @@ mpacpi_user_continue(const char *fmt, .. printf(press any key to continue\n); cngetc(); } + +#ifdef DDB +void +mpacpi_dump(void) +{ + int i; + for (i = 0; i mp_nintr; i++) + mpacpi_print_intr(mp_intrs[i]); +} +#endif
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: msaitoh Date: Wed Jul 15 04:10:02 UTC 2015 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Add comment (ACPI_WAKEUP_ADDR). To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/sys/arch/amd64/amd64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.212 src/sys/arch/amd64/amd64/machdep.c:1.213 --- src/sys/arch/amd64/amd64/machdep.c:1.212 Fri Apr 24 00:04:04 2015 +++ src/sys/arch/amd64/amd64/machdep.c Wed Jul 15 04:10:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.212 2015/04/24 00:04:04 khorben Exp $ */ +/* $NetBSD: machdep.c,v 1.213 2015/07/15 04:10:02 msaitoh Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011 @@ -111,7 +111,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.212 2015/04/24 00:04:04 khorben Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.213 2015/07/15 04:10:02 msaitoh Exp $); /* #define XENDEBUG_LOW */ @@ -1581,7 +1581,7 @@ init_x86_64(paddr_t first_avail) * Page 0: BIOS data * Page 1: BIOS callback (not used yet, for symmetry with i386) * Page 2: MP bootstrap - * Page 3: ACPI wakeup code + * Page 3: ACPI wakeup code (ACPI_WAKEUP_ADDR) * Page 4: Temporary page table for 0MB-4MB * Page 5: Temporary page directory * Page 6: Temporary page map level 3
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jul 15 03:54:53 UTC 2015 Modified Files: src/sys/dev/pci: ehci_pci.c Log Message: Initialize some members little earlier. It's not a bug. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ehci_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ehci_pci.c diff -u src/sys/dev/pci/ehci_pci.c:1.59 src/sys/dev/pci/ehci_pci.c:1.60 --- src/sys/dev/pci/ehci_pci.c:1.59 Sun Sep 21 14:30:22 2014 +++ src/sys/dev/pci/ehci_pci.c Wed Jul 15 03:54:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ehci_pci.c,v 1.59 2014/09/21 14:30:22 christos Exp $ */ +/* $NetBSD: ehci_pci.c,v 1.60 2015/07/15 03:54:53 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.59 2014/09/21 14:30:22 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ehci_pci.c,v 1.60 2015/07/15 03:54:53 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -142,15 +142,15 @@ ehci_pci_attach(device_t parent, device_ return; } + sc-sc_pc = pc; + sc-sc_tag = tag; + sc-sc.sc_bus.dmatag = pa-pa_dmat; + /* Disable interrupts, so we don't get any spurious ones. */ sc-sc.sc_offs = EREAD1(sc-sc, EHCI_CAPLENGTH); DPRINTF((%s: offs=%d\n, device_xname(self), sc-sc.sc_offs)); EOWRITE4(sc-sc, EHCI_USBINTR, 0); - sc-sc_pc = pc; - sc-sc_tag = tag; - sc-sc.sc_bus.dmatag = pa-pa_dmat; - /* Handle quirks */ switch (quirk) { case EHCI_PCI_QUIRK_AMD_SB600: @@ -325,7 +325,7 @@ ehci_dump_caps(ehci_softc_t *sc, pci_chi switch (id) { case EHCI_CAP_ID_LEGACY: legctlsts = pci_conf_read(pc, tag, - addr + PCI_EHCI_USBLEGCTLSTS); + addr + PCI_EHCI_USBLEGCTLSTS); printf(ehci_dump_caps: legsup=0x%08x legctlsts=0x%08x\n, cap, legctlsts); break;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jul 15 04:03:16 UTC 2015 Modified Files: src/sys/dev/pci: if_wm.c Log Message: Don't use MSI on 8257[12] because of errata 63 Byte Enables 2 and 3 are not set on MSI writes. To generate a diff of this commit: cvs rdiff -u -r1.336 -r1.337 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.336 src/sys/dev/pci/if_wm.c:1.337 --- src/sys/dev/pci/if_wm.c:1.336 Fri Jun 26 06:57:17 2015 +++ src/sys/dev/pci/if_wm.c Wed Jul 15 04:03:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.336 2015/06/26 06:57:17 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.337 2015/07/15 04:03:16 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -81,7 +81,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.336 2015/06/26 06:57:17 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.337 2015/07/15 04:03:16 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_net_mpsafe.h @@ -1474,8 +1474,13 @@ wm_attach(device_t parent, device_t self * 82545: Errata 4 (easy to reproduce device timeout) * 82546: Errata 26 (easy to reproduce device timeout) * 82541: Errata 7 (easy to reproduce device timeout) + * + * Byte Enables 2 and 3 are not set on MSI writes + * + * 82571 82572: Errata 63 */ - if (sc-sc_type = WM_T_82541_2) + if ((sc-sc_type = WM_T_82541_2) || (sc-sc_type == WM_T_82571) + || (sc-sc_type == WM_T_82572)) pa-pa_flags = ~PCI_FLAGS_MSI_OKAY; if ((sc-sc_type == WM_T_82575) || (sc-sc_type == WM_T_82576)
CVS commit: src/lib/libc/time
Module Name:src Committed By: ginsbach Date: Tue Jul 14 18:07:17 UTC 2015 Modified Files: src/lib/libc/time: strptime.c Log Message: Set S_WDAY state for %u (same as it is set for %w). To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/lib/libc/time/strptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.43 src/lib/libc/time/strptime.c:1.44 --- src/lib/libc/time/strptime.c:1.43 Mon Jul 13 17:45:16 2015 +++ src/lib/libc/time/strptime.c Tue Jul 14 18:07:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.43 2015/07/13 17:45:16 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: strptime.c,v 1.43 2015/07/13 17:45:16 ginsbach Exp $); +__RCSID($NetBSD: strptime.c,v 1.44 2015/07/14 18:07:17 ginsbach Exp $); #endif #include namespace.h @@ -363,6 +363,7 @@ literal: bp = conv_num(bp, i, 1, 7); tm-tm_wday = i % 7; LEGAL_ALT(ALT_O); + state |= S_WDAY; continue; case 'g': /* The year corresponding to the ISO week