svn commit: r221582 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sat May 7 06:52:04 2011 New Revision: 221582 URL: http://svn.freebsd.org/changeset/base/221582 Log: Instead of returning an unknown mac/bb signature, just return 0. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 06:47:09 2011(r221581) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 06:52:04 2011(r221582) @@ -471,7 +471,7 @@ ar5416DetectMacHang(struct ath_hal *ah) __func__, mac_dbg.dma_dbg_3, mac_dbg.dma_dbg_4, mac_dbg.dma_dbg_5, mac_dbg.dma_dbg_6); - return HAL_MAC_HANG_UNKNOWN; + return 0; } /* @@ -524,7 +524,7 @@ ar5416DetectBBHang(struct ath_hal *ah) HALDEBUG(ah, HAL_DEBUG_HANG, "%s Found an unknown BB hang signature! " "<0x806c>=0x%x\n", __func__, hang_sig); - return HAL_BB_HANG_UNKNOWN; + return 0; #undef N } #undef NUM_STATUS_READS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221581 - head/sys/dev/ath/ath_hal
Author: adrian Date: Sat May 7 06:47:09 2011 New Revision: 221581 URL: http://svn.freebsd.org/changeset/base/221581 Log: Add some comments about which HAL capabilities are currently FreeBSD specific. The Atheros HAL and FreeBSD HAL share the same capabilities up until HAL_CAP_11D, where things begin to diverge. I'll look at tidying these up soon. Obtained from:Atheros Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Sat May 7 06:45:35 2011 (r221580) +++ head/sys/dev/ath/ath_hal/ah.h Sat May 7 06:47:09 2011 (r221581) @@ -109,6 +109,8 @@ typedef enum { HAL_CAP_TPC_ACK = 26, /* ack txpower with per-packet tpc */ HAL_CAP_TPC_CTS = 27, /* cts txpower with per-packet tpc */ HAL_CAP_11D = 28, /* 11d beacon support for changing cc */ + + /* The following are currently different IDs to the Atheros HAL */ HAL_CAP_INTMIT = 29, /* interference mitigation */ HAL_CAP_RXORN_FATAL = 30, /* HAL_INT_RXORN treated as fatal */ HAL_CAP_HT = 31, /* hardware can support HT */ @@ -124,6 +126,11 @@ typedef enum { HAL_CAP_HAS_PSPOLL = 41, /* hardware has ps-poll support */ HAL_CAP_RXDESC_SELFLINK = 42, /* support a self-linked tail RX descriptor */ HAL_CAP_GTXTO = 43, /* hardware supports global tx timeout */ + + /* The following are back to normal, shared with the Atheros HAL */ + + /* The following are private to the FreeBSD HAL (224 onward) */ + } HAL_CAPABILITY_TYPE; /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221580 - in head/sys/dev/ath/ath_hal: . ar5416
Author: adrian Date: Sat May 7 06:45:35 2011 New Revision: 221580 URL: http://svn.freebsd.org/changeset/base/221580 Log: Some BB hang changes: * Add Howl (ar9130) to the list of chips that have DFS/BB/MAC hangs * Don't treat unknown BB hangs as fatal; ath9k/Atheros HAL don't treat it as such. * Add HAL_DEBUG_DFS to the debug fields in ath_hal/ah_debug.h The BB hang check simply loops over an observation register checking for a stuck state engine, but it can happen under high traffic conditions. Ath9k and the Atheros HAL simply log a debug message and continue. Private to FreeBSD: * Add HAL_DEBUG_HANG to the debug fields * Change the hang debugging to HAL_DEBUG_HANG rather than HAL_DEBUG_DFS like in the Atheros HAL. Obtained from:Atheros Modified: head/sys/dev/ath/ath_hal/ah_debug.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ah_debug.h == --- head/sys/dev/ath/ath_hal/ah_debug.h Sat May 7 04:40:44 2011 (r221579) +++ head/sys/dev/ath/ath_hal/ah_debug.h Sat May 7 06:45:35 2011 (r221580) @@ -45,6 +45,8 @@ enum { HAL_DEBUG_GPIO = 0x0004, /* GPIO debugging */ HAL_DEBUG_INTERRUPT = 0x0008, /* interrupt handling */ HAL_DEBUG_DIVERSITY = 0x0010, /* diversity debugging */ + HAL_DEBUG_DFS = 0x0020, /* DFS debugging */ + HAL_DEBUG_HANG = 0x0040, /* BB/MAC hang debugging */ HAL_DEBUG_ANY = 0x }; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 04:40:44 2011(r221579) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat May 7 06:45:35 2011(r221580) @@ -283,9 +283,9 @@ ar5416GetCapability(struct ath_hal *ah, case HAL_CAP_BB_HANG: switch (capability) { case HAL_BB_HANG_RIFS: - return AR_SREV_SOWL(ah) ? HAL_OK : HAL_ENOTSUPP; + return (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) ? HAL_OK : HAL_ENOTSUPP; case HAL_BB_HANG_DFS: - return AR_SREV_SOWL(ah) ? HAL_OK : HAL_ENOTSUPP; + return (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) ? HAL_OK : HAL_ENOTSUPP; case HAL_BB_HANG_RX_CLEAR: return AR_SREV_MERLIN(ah) ? HAL_OK : HAL_ENOTSUPP; } @@ -293,7 +293,7 @@ ar5416GetCapability(struct ath_hal *ah, case HAL_CAP_MAC_HANG: return ((ah->ah_macVersion == AR_XSREV_VERSION_OWL_PCI) || (ah->ah_macVersion == AR_XSREV_VERSION_OWL_PCIE) || - AR_SREV_SOWL(ah)) ? + AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_DIVERSITY: /* disable classic fast diversity */ return HAL_ENXIO; @@ -466,7 +466,7 @@ ar5416DetectMacHang(struct ath_hal *ah) if (ar5416CompareDbgHang(ah, &mac_dbg, &hang_sig2)) return HAL_MAC_HANG_SIG2; - HALDEBUG(ah, HAL_DEBUG_ANY, "%s Found an unknown MAC hang signature " + HALDEBUG(ah, HAL_DEBUG_HANG, "%s Found an unknown MAC hang signature " "DMADBG_3=0x%x DMADBG_4=0x%x DMADBG_5=0x%x DMADBG_6=0x%x\n", __func__, mac_dbg.dma_dbg_3, mac_dbg.dma_dbg_4, mac_dbg.dma_dbg_5, mac_dbg.dma_dbg_6); @@ -515,13 +515,13 @@ ar5416DetectBBHang(struct ath_hal *ah) } for (i = 0; i < N(hang_list); i++) if ((hang_sig & hang_list[i].mask) == hang_list[i].val) { - HALDEBUG(ah, HAL_DEBUG_ANY, + HALDEBUG(ah, HAL_DEBUG_HANG, "%s BB hang, signature 0x%x, code 0x%x\n", __func__, hang_sig, hang_list[i].code); return hang_list[i].code; } - HALDEBUG(ah, HAL_DEBUG_ANY, "%s Found an unknown BB hang signature! " + HALDEBUG(ah, HAL_DEBUG_HANG, "%s Found an unknown BB hang signature! " "<0x806c>=0x%x\n", __func__, hang_sig); return HAL_BB_HANG_UNKNOWN; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221579 - head/sys/dev/xl
Author: yongari Date: Sat May 7 04:40:44 2011 New Revision: 221579 URL: http://svn.freebsd.org/changeset/base/221579 Log: Fix build. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Sat May 7 03:58:27 2011(r221578) +++ head/sys/dev/xl/if_xl.c Sat May 7 04:40:44 2011(r221579) @@ -2380,7 +2380,7 @@ xl_poll_locked(struct ifnet *ifp, enum p } if (status & XL_STAT_STATSOFLOW) - xl_stats_update_locked(sc); + xl_stats_update(sc); } } return (rx_npkts); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221578 - stable/7/share/man/man9
Author: gjb (doc committer) Date: Sat May 7 03:58:27 2011 New Revision: 221578 URL: http://svn.freebsd.org/changeset/base/221578 Log: MFC 205076 [1]: manlint fixes. Reported by: manlint Obtained from:uqs [1] Modified: stable/7/share/man/man9/fail.9 Directory Properties: stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man9/fail.9 == --- stable/7/share/man/man9/fail.9 Sat May 7 03:49:07 2011 (r221577) +++ stable/7/share/man/man9/fail.9 Sat May 7 03:58:27 2011 (r221578) @@ -85,7 +85,7 @@ below. The remaining .Fn KFAIL_POINT_* macros are wrappers around common error injection paths: -.Bl -tag -width 8 +.Bl -inset .It Fn KFAIL_POINT_RETURN parent name is the equivalent of .Sy KFAIL_POINT_CODE(..., return RETURN_VALUE) @@ -97,8 +97,7 @@ is the equivalent of .Sy KFAIL_POINT_CODE(..., error_var = RETURN_VALUE) .It Fn KFAIL_POINT_GOTO parent name error_var label is the equivalent of -.Sy KFAIL_POINT_CODE(..., - { error_var = RETURN_VALUE; goto label;}) +.Sy KFAIL_POINT_CODE(..., { error_var = RETURN_VALUE; goto label;}) .El .Pp .Sh SYSCTL VARIABLES ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221577 - stable/7/share/man/man5
Author: gjb (doc committer) Date: Sat May 7 03:49:07 2011 New Revision: 221577 URL: http://svn.freebsd.org/changeset/base/221577 Log: MFC 173192 [1]: manlint fixes. Reported by: manlint Obtained from:keramida [1] Modified: stable/7/share/man/man5/quota.user.5 Directory Properties: stable/7/share/man/man5/ (props changed) Modified: stable/7/share/man/man5/quota.user.5 == --- stable/7/share/man/man5/quota.user.5Sat May 7 03:29:22 2011 (r221576) +++ stable/7/share/man/man5/quota.user.5Sat May 7 03:49:07 2011 (r221577) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 3, 2007 +.Dd October 30, 2007 .Dt QUOTA.USER 5 .Os .Sh NAME @@ -50,7 +50,7 @@ file. .Pp The data files contain the following information: .Pp -.Bl -bullet -indent offset -compact +.Bl -bullet -offset indent -compact .It Current block usage .It ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221576 - stable/8/share/man/man4
Author: gjb (doc committer) Date: Sat May 7 03:29:22 2011 New Revision: 221576 URL: http://svn.freebsd.org/changeset/base/221576 Log: MFC 198441 [1]: manlint fixes. Reported by: manlint Obtained from:rpaulo [1] Modified: stable/8/share/man/man4/acpi_hp.4 stable/8/share/man/man4/acpi_wmi.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi_hp.4 == --- stable/8/share/man/man4/acpi_hp.4 Sat May 7 03:09:16 2011 (r221575) +++ stable/8/share/man/man4/acpi_hp.4 Sat May 7 03:29:22 2011 (r221576) @@ -256,7 +256,7 @@ sysctl dev.acpi_hp.0.cmi_detail=7 The .Nm device driver first appeared in -.Fx CURRENT . +.Fx 8.0 . .Sh AUTHORS .An -nosplit The @@ -279,7 +279,7 @@ http://www.microsoft.com/whdc/system/pnp This manual page was written by .An Michael Gmelin Aq free...@grem.de .Sh BUGS -This driver is experimental and has only been tested on CURRENT i386 on an +This driver is experimental and has only been tested on i386 on an HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). Expect undefined results when operating on different hardware. .Pp Modified: stable/8/share/man/man4/acpi_wmi.4 == --- stable/8/share/man/man4/acpi_wmi.4 Sat May 7 03:09:16 2011 (r221575) +++ stable/8/share/man/man4/acpi_wmi.4 Sat May 7 03:29:22 2011 (r221576) @@ -79,7 +79,7 @@ GUID IN The .Nm device driver first appeared in -.Fx CURRENT . +.Fx 8.0 . .Sh AUTHORS .An -nosplit The ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221575 - stable/8/share/man/man9
Author: gjb (doc committer) Date: Sat May 7 03:09:16 2011 New Revision: 221575 URL: http://svn.freebsd.org/changeset/base/221575 Log: MFC 205076 [1]: manlint fixes. Reported by: manlint Obtained from:uqs [1] Modified: stable/8/share/man/man9/fail.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/fail.9 == --- stable/8/share/man/man9/fail.9 Sat May 7 02:59:24 2011 (r221574) +++ stable/8/share/man/man9/fail.9 Sat May 7 03:09:16 2011 (r221575) @@ -84,7 +84,7 @@ below. The remaining .Fn KFAIL_POINT_* macros are wrappers around common error injection paths: -.Bl -tag -width 8 +.Bl -inset .It Fn KFAIL_POINT_RETURN parent name is the equivalent of .Sy KFAIL_POINT_CODE(..., return RETURN_VALUE) @@ -96,8 +96,7 @@ is the equivalent of .Sy KFAIL_POINT_CODE(..., error_var = RETURN_VALUE) .It Fn KFAIL_POINT_GOTO parent name error_var label is the equivalent of -.Sy KFAIL_POINT_CODE(..., - { error_var = RETURN_VALUE; goto label;}) +.Sy KFAIL_POINT_CODE(..., { error_var = RETURN_VALUE; goto label;}) .El .Sh SYSCTL VARIABLES The ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221574 - in head/sys/dev/ath/ath_hal: ar5416 ar9002
Author: adrian Date: Sat May 7 02:59:24 2011 New Revision: 221574 URL: http://svn.freebsd.org/changeset/base/221574 Log: Change AR_SREV_OWL_{X}_OR_LATER to AR_SREV_5416_{X}_OR_LATER. For now, these are equivalent macros. AR_SREV_OWL{X}_OR_LATER will later change to exclude Howl (AR9130) in line with what the Atheros HAL does. This should not functionally change anything. Obtained from:Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat May 7 02:54:52 2011(r221573) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat May 7 02:59:24 2011(r221574) @@ -1465,7 +1465,7 @@ ar5416GetRegChainOffset(struct ath_hal * { int regChainOffset; - if (AR_SREV_OWL_20_OR_LATER(ah) && + if (AR_SREV_5416_V20_OR_LATER(ah) && (AH5416(ah)->ah_rx_chainmask == 0x5 || AH5416(ah)->ah_tx_chainmask == 0x5) && (i != 0)) { /* Regs are swapped from chain 2 to 1 for 5416 2_0 with @@ -1518,7 +1518,7 @@ ar5416SetBoardValues(struct ath_hal *ah, * XXX update */ -if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) +if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) ar5416SetDefGainValues(ah, pModal, eep, txRxAttenLocal, regChainOffset, i); } @@ -2217,7 +2217,7 @@ ar5416SetPowerCalTable(struct ath_hal *a &tMinCalPower, gainBoundaries, pdadcValues, numXpdGain); -if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) { +if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) { ar5416SetGainBoundariesClosedLoop(ah, i, pdGainOverlap_t2, gainBoundaries); } @@ -2329,7 +2329,7 @@ ar5416GetGainBoundariesAndPdadcs(struct pPdGainBoundaries[i] = (uint16_t)AH_MIN(AR5416_MAX_RATE_POWER, pPdGainBoundaries[i]); /* NB: only applies to owl 1.0 */ -if ((i == 0) && !AR_SREV_OWL_20_OR_LATER(ah) ) { +if ((i == 0) && !AR_SREV_5416_V20_OR_LATER(ah) ) { /* * fix the gain delta, but get a delta that can be applied to min to * keep the upper power values accurate, don't think max needs to @@ -2501,27 +2501,20 @@ ar5416OverrideIni(struct ath_hal *ah, co } /* -* The AR5416 initvals have this already set to 0x11; AR9160 has -* the register set to 0x0. Figure out whether AR9130/AR9160 needs -* this before moving forward with it. -*/ -#if 0 - /* Disable BB clock gating for AR5416v2, AR9130, AR9160 */ -if (AR_SREV_OWL_20_OR_LATER(ah) || AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) { - /* -* Disable BB clock gating -* Necessary to avoid issues on AR5416 2.0 -*/ - OS_REG_WRITE(ah, 0x9800 + (651 << 2), 0x11); - } -#endif - - /* * Disable RIFS search on some chips to avoid baseband * hang issues. */ if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) (void) ar5416SetRifsDelay(ah, AH_FALSE); + +if (!AR_SREV_5416_V20_OR_LATER(ah) || AR_SREV_MERLIN(ah)) + return; + + /* +* Disable BB clock gating +* Necessary to avoid issues on AR5416 2.0 +*/ + OS_REG_WRITE(ah, 0x9800 + (651 << 2), 0x11); } struct ini { Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416desc.hSat May 7 02:54:52 2011(r221573) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416desc.hSat May 7 02:59:24 2011(r221574) @@ -387,11 +387,11 @@ struct ar5416_desc { #define RXSTATUS_OFFSET(ah)4 #define RXSTATUS_NUMWORDS(ah) 9 #define RXSTATUS_RATE(ah, ads) \ - (AR_SREV_OWL_20_OR_LATER(ah) ? \ + (AR_SREV_5416_V20_OR_LATER(ah) ? \ MS((ads)->ds_rxstatus0, AR_RxRate) : \ ((ads)->ds_rxstatus3 >> 2) & 0xFF) #define RXSTATUS_DUPLICATE(ah, ads) \ - (AR_SREV_OWL_20_OR_LATER(ah) ? \ + (AR_SREV_5416_V20_OR_LATER(ah) ?\ MS((ads)->ds_rxstatus3, AR_Parallel40) : \ ((ads)->ds_rxstatus3 >> 10) & 0x1) #endif /* _ATH_AR5416_DESC_H_ */ Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c == --- head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.cSat May 7 02:54:52 2011(r221573) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.cSat May 7 02:59:24
svn commit: r221573 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sat May 7 02:54:52 2011 New Revision: 221573 URL: http://svn.freebsd.org/changeset/base/221573 Log: Fix the OWL revision checks. A quick story, which is partially documented in the commit. The silicon revision in Linux ath9k and the Atheros HAL use an AR_SREV_REVISION mask of 0x07. FreeBSD's HAL uses the AR5212 AR_SREV_REVISION mask of 0x0F. Thus the OWL silicon revisions were coming through as 0xA, 0xB, 0xC, rather than 0x0, 0x1 and 0x2. My ath9k-sourced AR_SREV_OWL_ macros were thus using the wrong silicon revision values and wouldn't correctly match. This commit does a few things: * Change the AR_SREV_OWL_ macros to use the AR_SREV_REVISION_OWL_* values, not AR_XSREV_REVISION_OWL macros; * Disable AR_XSREV_REVISION_OWL_* values; * Modify the IS_5416 to properly check the MAC is OWL, rather than potentially matching on non-OWL revisions (which shouldn't happen unless there's a silicon revision of higher than 0x9 in a later chip..) * Add a couple more macros from the Atheros HAL for compatibility. The main difference now is that the Atheros HAL defines AR_SREV_OWL_{20,22}_OR_LATER subtly differently - it fails on all HOWL silicon. The AR_SREV_5416_*_OR_LATER macros match on the relevant OWL version -and- all HOWL versions, along with subsequent versions. A subsequent commit is going to migrate the uses of AR_SREV_OWL_X_OR_LATER to AR_SREV_5416_X_OR_LATER to match what's going on in the Atheros HAL. There's only two uses of AR_SREV_OWL_X_OR_LATER which currently don't apply to FreeBSD but it may do in the future. Yes, it's all confusing! Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat May 7 02:37:34 2011 (r221572) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Sat May 7 02:54:52 2011 (r221573) @@ -580,6 +580,17 @@ #defineAR_EEPROM_STATUS_DATA_PROT_ACCESS 0x0004 #defineAR_EEPROM_STATUS_DATA_ABSENT_ACCESS 0x0008 +/* + * AR5212 defines the MAC revision mask as 0xF, but both ath9k and + * the Atheros HAL define it as 0x7. + * + * What this means however is AR5416 silicon revisions have + * changed. The below macros are for what is contained in the + * lower four bits; if the lower three bits are taken into account + * the revisions become 1.0 => 0x0, 2.0 => 0x1, 2.2 => 0x2. + */ + +/* These are the legacy revisions, with a four bit AR_SREV_REVISION mask */ #defineAR_SREV_REVISION_OWL_10 0x08 #defineAR_SREV_REVISION_OWL_20 0x09 #defineAR_SREV_REVISION_OWL_22 0x0a @@ -590,9 +601,13 @@ #defineAR_RAD2122_SREV_MAJOR 0xf0/* Fowl: 2+5G/2x2 */ /* Test macro for owl 1.0 */ -#defineIS_5416V1(_ah) ((_ah)->ah_macRev == AR_SREV_REVISION_OWL_10) -#defineIS_5416V2(_ah) ((_ah)->ah_macRev >= AR_SREV_REVISION_OWL_20) -#defineIS_5416V2_2(_ah)((_ah)->ah_macRev == AR_SREV_REVISION_OWL_22) +#defineIS_5416V1(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev == AR_SREV_REVISION_OWL_10) +#defineIS_5416V2(_ah) (AR_SREV_OWL((ah)) && (_ah)->ah_macRev >= AR_SREV_REVISION_OWL_20) +#defineIS_5416V2_2(_ah)(AR_SREV_OWL((ah)) && (_ah)->ah_macRev == AR_SREV_REVISION_OWL_22) + +/* Misc; compatibility with Atheros HAL */ +#defineAR_SREV_5416_V20_OR_LATER(_ah) (AR_SREV_HOWL((_ah)) || AR_SREV_OWL_20_OR_LATER(_ah)) +#defineAR_SREV_5416_V22_OR_LATER(_ah) (AR_SREV_HOWL((_ah)) || AR_SREV_OWL_22_OR_LATER(_ah)) /* Expanded Mac Silicon Rev (16 bits starting with Sowl) */ #defineAR_XSREV_ID 0x /* Chip ID */ @@ -609,9 +624,20 @@ #defineAR_XSREV_VERSION_OWL_PCI0x0D #defineAR_XSREV_VERSION_OWL_PCIE 0x0C + + +/* + * These are from ath9k/Atheros and assume an AR_SREV version mask + * of 0x07, rather than 0x0F which is being used in the FreeBSD HAL. + * Thus, don't use these values as they're incorrect here; use + * AR_SREV_REVISION_OWL_{10,20,22}. + */ +#if 0 #defineAR_XSREV_REVISION_OWL_100 /* Owl 1.0 */ #defineAR_XSREV_REVISION_OWL_201 /* Owl 2.0/2.1 */ #defineAR_XSREV_REVISION_OWL_222 /* Owl 2.2 */ +#endif + #defineAR_XSREV_VERSION_HOWL 0x14/* Howl (AR9130) */ #defineAR_XSREV_VERSION_SOWL 0x40/* Sowl (AR9160) */ #defineAR_XSREV_REVISION_SOWL_10 0 /* Sowl 1.0 */ @@ -632,12 +658,12 @@ #defineAR_SREV_OWL_20_OR_LATER(_ah) \ ((AR_SREV_OWL(_ah) && \ -AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_20) || \ +AH_PRIVATE((_ah))->ah_macRev >= AR_SREV_REVISION_OW
svn commit: r221572 - stable/8/share/man/man4
Author: gjb (doc committer) Date: Sat May 7 02:37:34 2011 New Revision: 221572 URL: http://svn.freebsd.org/changeset/base/221572 Log: MFC 205076 [1], 209034 [1], 211406 [2]: manlint fixes. Reported by: manlint Obtained from:uqs[1], joel[2] Modified: stable/8/share/man/man4/acpi_wmi.4 stable/8/share/man/man4/ae.4 stable/8/share/man/man4/altq.4 stable/8/share/man/man4/amdtemp.4 stable/8/share/man/man4/cxgb.4 stable/8/share/man/man4/ddb.4 stable/8/share/man/man4/enc.4 stable/8/share/man/man4/io.4 stable/8/share/man/man4/ipsec.4 stable/8/share/man/man4/iscsi_initiator.4 stable/8/share/man/man4/textdump.4 stable/8/share/man/man4/uart.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/acpi_wmi.4 == --- stable/8/share/man/man4/acpi_wmi.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/acpi_wmi.4 Sat May 7 02:37:34 2011 (r221572) @@ -57,7 +57,7 @@ information about GUIDs found in the sys WMI status device. .El .Sh EXAMPLES -.Bd Literal +.Bd -literal # cat /dev/wmistat GUID INST EXPE METH STR EVENT OID {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NOAA Modified: stable/8/share/man/man4/ae.4 == --- stable/8/share/man/man4/ae.4Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/ae.4Sat May 7 02:37:34 2011 (r221572) @@ -41,7 +41,7 @@ kernel configuration file: Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : -.Bd -literal -offset -indent +.Bd -literal -offset indent if_ae_load="YES" .Ed .Sh DESCRIPTION Modified: stable/8/share/man/man4/altq.4 == --- stable/8/share/man/man4/altq.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/altq.4 Sat May 7 02:37:34 2011 (r221572) @@ -122,7 +122,7 @@ They have been applied to the following .Xr an 4 , .Xr ath 4 , .Xr aue 4 , -.Xt axe 4 , +.Xr axe 4 , .Xr bce 4 , .Xr bfe 4 , .Xr bge 4 , Modified: stable/8/share/man/man4/amdtemp.4 == --- stable/8/share/man/man4/amdtemp.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/amdtemp.4 Sat May 7 02:37:34 2011 (r221572) @@ -75,6 +75,5 @@ The driver first appeared in .Fx 7.1 . .Sh AUTHORS -.An .An Rui Paulo Aq rpa...@freebsd.org .An Norikatsu Shigemura Aq n...@freebsd.org Modified: stable/8/share/man/man4/cxgb.4 == --- stable/8/share/man/man4/cxgb.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/cxgb.4 Sat May 7 02:37:34 2011 (r221572) @@ -92,8 +92,6 @@ Tunables can be set at the .Xr loader 8 prompt before booting the kernel or stored in .Xr loader.conf 5 . -.Bl -tag -width indent -.El .Sh DIAGNOSTICS .Bl -diag .It "cxgb%d: Unable to allocate bus resource: memory" Modified: stable/8/share/man/man4/ddb.4 == --- stable/8/share/man/man4/ddb.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/ddb.4 Sat May 7 02:37:34 2011 (r221572) @@ -703,7 +703,7 @@ Show information from the local APIC reg .It Ic show Cm lock Ar addr Show lock structure. The output format is as follows: -.Bl -tag -offset 0 -width "flags" +.Bl -tag -width "flags" .It Ic class: Class of the lock. Possible types include Modified: stable/8/share/man/man4/enc.4 == --- stable/8/share/man/man4/enc.4 Sat May 7 02:19:46 2011 (r221571) +++ stable/8/share/man/man4/enc.4 Sat May 7 02:37:34 2011 (r221572) @@ -82,10 +82,10 @@ framework can be independently controlle variables: .Bl -column net.enc.out.ipsec_filter_mask 0x 0x .It Sy "Name DefaultsSuggested" -.It "net.enc.out.ipsec_bpf_mask" 0x0003 0x0001 -.It "net.enc.out.ipsec_filter_mask"0x0001 0x0001 -.It "net.enc.in.ipsec_bpf_mask"0x0001 0x0002 -.It "net.enc.in.ipsec_filter_mask" 0x0001 0x0002 +.It "net.enc.out.ipsec_bpf_mask0x0003 0x0001" +.It "net.enc.out.ipsec_filter_mask 0x0001 0x0001" +.It "net.enc.in.ipsec_bpf_mask 0x0001 0x0002" +.It "net.enc.in.ipsec_filter_mask 0x0001 0x0002" .El .Pp For the incoming path a value of Modified: stable/8/share/man/man4/io.4
svn commit: r221571 - head/sys/dev/xl
Author: yongari Date: Sat May 7 02:19:46 2011 New Revision: 221571 URL: http://svn.freebsd.org/changeset/base/221571 Log: Remove unneeded use of variable status. This should have been done in r221557. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Sat May 7 02:00:35 2011(r221570) +++ head/sys/dev/xl/if_xl.c Sat May 7 02:19:46 2011(r221571) @@ -2564,7 +2564,6 @@ xl_start_locked(struct ifnet *ifp) struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; struct xl_chain *prev_tx; - u_int32_t status; int error; XL_LOCK_ASSERT(sc); @@ -2651,7 +2650,6 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_tail->xl_next = start_tx; sc->xl_cdata.xl_tx_tail->xl_ptr->xl_next = htole32(start_tx->xl_phys); - status = sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status; sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status &= htole32(~XL_TXSTAT_DL_INTR); sc->xl_cdata.xl_tx_tail = cur_tx; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221570 - stable/8/sys/kern
Author: rmacklem Date: Sat May 7 02:00:35 2011 New Revision: 221570 URL: http://svn.freebsd.org/changeset/base/221570 Log: MFC: r220967 Fix a LOR in vfs_busy() where, after msleeping, it would lock the mutexes in the wrong order for the case where the MBF_MNTLSTLOCK is set. I believe this did have the potential for deadlock. For example, if multiple nfsd threads called vfs_busyfs(), which calls vfs_busy() with MBF_MNTLSTLOCK. Thanks go to pho for catching this during his testing. Modified: stable/8/sys/kern/vfs_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/vfs_subr.c == --- stable/8/sys/kern/vfs_subr.cSat May 7 01:05:31 2011 (r221569) +++ stable/8/sys/kern/vfs_subr.cSat May 7 02:00:35 2011 (r221570) @@ -380,9 +380,10 @@ vfs_busy(struct mount *mp, int flags) if (flags & MBF_MNTLSTLOCK) mtx_unlock(&mountlist_mtx); mp->mnt_kern_flag |= MNTK_MWAIT; - msleep(mp, MNT_MTX(mp), PVFS, "vfs_busy", 0); + msleep(mp, MNT_MTX(mp), PVFS | PDROP, "vfs_busy", 0); if (flags & MBF_MNTLSTLOCK) mtx_lock(&mountlist_mtx); + MNT_ILOCK(mp); } if (flags & MBF_MNTLSTLOCK) mtx_unlock(&mountlist_mtx); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221569 - in head: lib/libdwarf lib/libelf sys/sys
Author: obrien Date: Sat May 7 01:05:31 2011 New Revision: 221569 URL: http://svn.freebsd.org/changeset/base/221569 Log: Add the ability to search for all the inlined instances of a given function. Reviewed by: jb Obtained from:Juniper Networks Added: head/lib/libdwarf/dwarf_func.c (contents, props changed) Modified: head/lib/libdwarf/Makefile head/lib/libdwarf/_libdwarf.h head/lib/libdwarf/dwarf_init.c head/lib/libdwarf/libdwarf.h head/lib/libelf/Makefile head/lib/libelf/libelf_data.c head/sys/sys/elf_common.h Modified: head/lib/libdwarf/Makefile == --- head/lib/libdwarf/Makefile Sat May 7 00:25:12 2011(r221568) +++ head/lib/libdwarf/Makefile Sat May 7 01:05:31 2011(r221569) @@ -14,6 +14,7 @@ SRCS= \ dwarf_errno.c \ dwarf_finish.c \ dwarf_form.c\ + dwarf_func.c\ dwarf_init.c\ dwarf_loc.c Modified: head/lib/libdwarf/_libdwarf.h == --- head/lib/libdwarf/_libdwarf.h Sat May 7 00:25:12 2011 (r221568) +++ head/lib/libdwarf/_libdwarf.h Sat May 7 01:05:31 2011 (r221569) @@ -163,6 +163,37 @@ struct _Dwarf_Debug { dbg_cu; /* List of compilation units. */ Dwarf_CUdbg_cu_current; /* Ptr to the current compilation unit. */ + + STAILQ_HEAD(, _Dwarf_Func) dbg_func; /* List of functions */ +}; + +struct _Dwarf_Func { + Dwarf_Die func_die; + const char *func_name; + Dwarf_Addr func_low_pc; + Dwarf_Addr func_high_pc; + int func_is_inlined; + /* inlined instance */ + STAILQ_HEAD(, _Dwarf_Inlined_Func) func_inlined_instances; + STAILQ_ENTRY(_Dwarf_Func) func_next; }; +struct _Dwarf_Inlined_Func { + struct _Dwarf_Func *ifunc_origin; + Dwarf_Die ifunc_abstract; + Dwarf_Die ifunc_concrete; + Dwarf_Addr ifunc_low_pc; + Dwarf_Addr ifunc_high_pc; + STAILQ_ENTRY(_Dwarf_Inlined_Func) ifunc_next; +}; + +void dwarf_build_function_table(Dwarf_Debug dbg); + +#ifdef DWARF_DEBUG +#include +#define DWARF_ASSERT(x)assert(x) +#else +#define DWARF_ASSERT(x) +#endif + #endif /* !__LIBDWARF_H_ */ Added: head/lib/libdwarf/dwarf_func.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libdwarf/dwarf_func.c Sat May 7 01:05:31 2011 (r221569) @@ -0,0 +1,227 @@ +/*- + * Copyright (c) 2008-2009, 2011, Juniper Networks, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + * + * JNPR: dwarf_func.c 336441 2009-10-17 09:19:54Z deo + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include <_libdwarf.h> + +static void +dwarf_add_function(Dwarf_Debug dbg, Dwarf_Func func) +{ + + STAILQ_INSERT_TAIL(&dbg->dbg_func, func, func_next); +} + +int +dwarf_function_get_addr_range(Dwarf_Func f, Dwarf_Addr *low_pc, +Dwarf_Addr *high_pc) +{ + + *low_pc = f->func_low_pc; + *high_pc = f->func_high_pc; + return 0; +} + +int +dwarf_inlined_function_get_addr_range(Dwarf_Inlined_Func f, Dwarf_Addr *low_pc, +Dwarf_Addr *high_pc) +{ + + *low_pc = f->ifunc_low_pc; + *high_pc = f->ifunc_high_pc; + return 0; +} + +int +dwarf_function_is_inlined(Dwarf_Func f) +{ + + if (f->func_is_inlined == DW_INL_inlined || +
svn commit: r221568 - head/sys/dev/xl
Author: yongari Date: Sat May 7 00:25:12 2011 New Revision: 221568 URL: http://svn.freebsd.org/changeset/base/221568 Log: XL_DMACTL is 32bit register, use 32bit write macro. While I'm here add more bits for the register. Modified: head/sys/dev/xl/if_xl.c head/sys/dev/xl/if_xlreg.h Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Sat May 7 00:18:58 2011(r221567) +++ head/sys/dev/xl/if_xl.c Sat May 7 00:25:12 2011(r221568) @@ -2969,7 +2969,7 @@ xl_init_locked(struct xl_softc *sc) /* Set the RX early threshold */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_THRESH|(XL_PACKET_SIZE >>2)); - CSR_WRITE_2(sc, XL_DMACTL, XL_DMACTL_UP_RX_EARLY); + CSR_WRITE_4(sc, XL_DMACTL, XL_DMACTL_UP_RX_EARLY); /* Enable receiver and transmitter. */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_ENABLE); Modified: head/sys/dev/xl/if_xlreg.h == --- head/sys/dev/xl/if_xlreg.h Sat May 7 00:18:58 2011(r221567) +++ head/sys/dev/xl/if_xlreg.h Sat May 7 00:25:12 2011(r221568) @@ -124,6 +124,11 @@ #define XL_DMACTL_DOWN_INPROG 0x0080 #define XL_DMACTL_COUNTER_SPEED0x0100 #define XL_DMACTL_DOWNDOWN_MODE0x0200 +#define XL_DMACTL_UP_ALTSEQ_DIS0x0001 /* 3c90xB/3c90xC */ +#define XL_DMACTL_DOWN_ALTSEQ_DIS 0x0002 /* 3c90xC only */ +#define XL_DMACTL_DEFEAT_MWI 0x0010 /* 3c90xB/3c90xC */ +#define XL_DMACTL_DEFEAT_MRL 0x0010 /* 3c90xB/3c90xC */ +#define XL_DMACTL_UP_OVERRUN_DISC_DIS 0x0020 /* 3c90xB/3c90xC */ #define XL_DMACTL_TARGET_ABORT 0x4000 #define XL_DMACTL_MASTER_ABORT 0x8000 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221567 - head/sys/dev/xl
Author: yongari Date: Sat May 7 00:18:58 2011 New Revision: 221567 URL: http://svn.freebsd.org/changeset/base/221567 Log: Rearm watchdog timer if driver kick controller to recover from TX underrun error. While here, prepend 0x to status code to show TX status is hex number. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Sat May 7 00:06:02 2011(r221566) +++ head/sys/dev/xl/if_xl.c Sat May 7 00:18:58 2011(r221567) @@ -2207,7 +2207,7 @@ xl_txeoc(struct xl_softc *sc) txstat & XL_TXSTATUS_JABBER || txstat & XL_TXSTATUS_RECLAIM) { device_printf(sc->xl_dev, - "transmission error: %x\n", txstat); + "transmission error: 0x%02x\n", txstat); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_RESET); xl_wait(sc); if (sc->xl_type == XL_TYPE_905B) { @@ -2220,11 +2220,14 @@ xl_txeoc(struct xl_softc *sc) CSR_WRITE_4(sc, XL_DOWNLIST_PTR, c->xl_phys); CSR_WRITE_1(sc, XL_DOWN_POLL, 64); + sc->xl_wdog_timer = 5; } } else { - if (sc->xl_cdata.xl_tx_head != NULL) + if (sc->xl_cdata.xl_tx_head != NULL) { CSR_WRITE_4(sc, XL_DOWNLIST_PTR, sc->xl_cdata.xl_tx_head->xl_phys); + sc->xl_wdog_timer = 5; + } } /* * Remember to set this for the ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221497 - head/release/ia64
On May 6, 2011, at 6:50 AM, Nathan Whitehorn wrote: > On 05/06/11 00:21, Marcel Moolenaar wrote: >> On May 5, 2011, at 8:29 PM, Nathan Whitehorn wrote: >> >>> On 05/05/11 16:18, Marcel Moolenaar wrote: On May 5, 2011, at 7:16 AM, Nathan Whitehorn wrote: > @@ -84,15 +63,13 @@ if [ $bootable = yes ]; then > mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi > umount $MNT > mdconfig -d -u $md > -BOOTOPTS="-b $EFIPART -no-emul-boot" > +BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot" > else > BOOTOPTS="" > fi Thanks! Can you explain what this particular change does or why it's done? >>> I'm cleaning up the release-building code, and am switching them from >>> mkisofs to makefs, which provides the same functionality. This started with >>> some irritation with the cdrtools port and a bug in the HFS hybrid >>> generation that was breaking PPC release CD generation. Switching these to >>> depend on makefs in general speeds the release-building process and removes >>> the number of dependencies involved, since makefs is built as part of base. >> Actually, I was just interested in the 'bootimage=i386' part >> of your change. I totally get why you're doing it :-) > > Ah, OK :) > > That just sets the El Torito system type to 0 (x86), which is what IA64 uses, > as far as I can tell, and doesn't turn on any special magic like is done for > the mac. I suppose while we're monkeying about with makefs, we could add an > 'ia64' alias. Nah, don't worry about it... -- Marcel Moolenaar mar...@xcllnt.net ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221566 - head/sys/dev/xl
Author: yongari Date: Sat May 7 00:06:02 2011 New Revision: 221566 URL: http://svn.freebsd.org/changeset/base/221566 Log: Rename xl_stats_update() callout handler to xl_tick() and move MII tick driving logic to xl_tick(). Now xl_tick() handles MII tick as well as periodic updating of statistics. This change removes a hack used in interrupt handler where it wanted to update statistics without driving MII tick. Modified: head/sys/dev/xl/if_xl.c head/sys/dev/xl/if_xlreg.h Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 23:49:10 2011(r221565) +++ head/sys/dev/xl/if_xl.c Sat May 7 00:06:02 2011(r221566) @@ -225,8 +225,8 @@ static int xl_attach(device_t); static int xl_detach(device_t); static int xl_newbuf(struct xl_softc *, struct xl_chain_onefrag *); -static void xl_stats_update(void *); -static void xl_stats_update_locked(struct xl_softc *); +static void xl_tick(void *); +static void xl_stats_update(struct xl_softc *); static int xl_encap(struct xl_softc *, struct xl_chain *, struct mbuf **); static int xl_rxeof(struct xl_softc *); static void xl_rxeof_task(void *, int); @@ -1330,7 +1330,7 @@ xl_attach(device_t dev) goto fail; } - callout_init_mtx(&sc->xl_stat_callout, &sc->xl_mtx, 0); + callout_init_mtx(&sc->xl_tick_callout, &sc->xl_mtx, 0); TASK_INIT(&sc->xl_task, 0, xl_rxeof_task, sc); /* @@ -1695,7 +1695,7 @@ xl_detach(device_t dev) xl_stop(sc); XL_UNLOCK(sc); taskqueue_drain(taskqueue_swi, &sc->xl_task); - callout_drain(&sc->xl_stat_callout); + callout_drain(&sc->xl_tick_callout); ether_ifdetach(ifp); } if (sc->xl_miibus) @@ -2307,11 +2307,8 @@ xl_intr(void *arg) break; } - if (status & XL_STAT_STATSOFLOW) { - sc->xl_stats_no_timeout = 1; - xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; - } + if (status & XL_STAT_STATSOFLOW) + xl_stats_update(sc); } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && @@ -2379,49 +2376,46 @@ xl_poll_locked(struct ifnet *ifp, enum p xl_init_locked(sc); } - if (status & XL_STAT_STATSOFLOW) { - sc->xl_stats_no_timeout = 1; + if (status & XL_STAT_STATSOFLOW) xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; - } } } return (rx_npkts); } #endif /* DEVICE_POLLING */ -/* - * XXX: This is an entry point for callout which needs to take the lock. - */ static void -xl_stats_update(void *xsc) +xl_tick(void *xsc) { struct xl_softc *sc = xsc; + struct mii_data *mii; XL_LOCK_ASSERT(sc); + if (sc->xl_miibus != NULL) { + mii = device_get_softc(sc->xl_miibus); + mii_tick(mii); + } + + xl_stats_update(sc); if (xl_watchdog(sc) == EJUSTRETURN) return; - xl_stats_update_locked(sc); + callout_reset(&sc->xl_tick_callout, hz, xl_tick, sc); } static void -xl_stats_update_locked(struct xl_softc *sc) +xl_stats_update(struct xl_softc *sc) { struct ifnet*ifp = sc->xl_ifp; struct xl_stats xl_stats; u_int8_t*p; int i; - struct mii_data *mii = NULL; XL_LOCK_ASSERT(sc); bzero((char *)&xl_stats, sizeof(struct xl_stats)); - if (sc->xl_miibus != NULL) - mii = device_get_softc(sc->xl_miibus); - p = (u_int8_t *)&xl_stats; /* Read all the stats registers. */ @@ -2443,14 +2437,7 @@ xl_stats_update_locked(struct xl_softc * */ XL_SEL_WIN(4); CSR_READ_1(sc, XL_W4_BADSSD); - - if ((mii != NULL) && (!sc->xl_stats_no_timeout)) - mii_tick(mii); - XL_SEL_WIN(7); - - if (!sc->xl_stats_no_timeout) - callout_reset(&sc->xl_stat_callout, hz, xl_stats_update, sc); } /* @@ -2957,9 +2944,7 @@ xl_init_locked(struct xl_softc *sc) /* Clear out the stats counters. */ CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_DISABLE); - sc->xl_stats_no_timeout = 1; - xl_stats_update_locked(sc); - sc->xl_stats_no_timeout = 0; + xl_stats_update(sc); XL_SEL_WIN(4); CSR_WRITE_2(sc, XL_W4_NET_DIAG, XL_NETDIAG_UPPER_BYTES_ENABLE); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_STATS_ENABLE); @@ -3000,7 +2985,7 @@ xl_init_locked(struct xl_softc *sc) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
svn commit: r221565 - head/sys/dev/xl
Author: yongari Date: Fri May 6 23:49:10 2011 New Revision: 221565 URL: http://svn.freebsd.org/changeset/base/221565 Log: Reuse the TX descriptor(DPD) if xl_encap() failed instead of just picking the next available one. This may explain why xl(4) sees TX underrun error with no queued frame. I hope this addresses a long standing xl(4) watchdog timeout issue as well. Obtained from:OpenBSD Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 23:01:29 2011(r221564) +++ head/sys/dev/xl/if_xl.c Fri May 6 23:49:10 2011(r221565) @@ -2571,8 +2571,9 @@ static void xl_start_locked(struct ifnet *ifp) { struct xl_softc *sc = ifp->if_softc; - struct mbuf *m_head = NULL; + struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; + struct xl_chain *prev_tx; u_int32_t status; int error; @@ -2603,11 +2604,13 @@ xl_start_locked(struct ifnet *ifp) break; /* Pick a descriptor off the free list. */ + prev_tx = cur_tx; cur_tx = sc->xl_cdata.xl_tx_free; /* Pack the data into the descriptor. */ error = xl_encap(sc, cur_tx, &m_head); if (error) { + cur_tx = prev_tx; if (m_head == NULL) break; ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -2702,8 +2705,9 @@ static void xl_start_90xB_locked(struct ifnet *ifp) { struct xl_softc *sc = ifp->if_softc; - struct mbuf *m_head = NULL; + struct mbuf *m_head; struct xl_chain *prev = NULL, *cur_tx = NULL, *start_tx; + struct xl_chain *prev_tx; int error, idx; XL_LOCK_ASSERT(sc); @@ -2726,11 +2730,13 @@ xl_start_90xB_locked(struct ifnet *ifp) if (m_head == NULL) break; + prev_tx = cur_tx; cur_tx = &sc->xl_cdata.xl_tx_chain[idx]; /* Pack the data into the descriptor. */ error = xl_encap(sc, cur_tx, &m_head); if (error) { + cur_tx = prev_tx; if (m_head == NULL) break; ifp->if_drv_flags |= IFF_DRV_OACTIVE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221564 - head/sys/dev/xl
Author: yongari Date: Fri May 6 23:01:29 2011 New Revision: 221564 URL: http://svn.freebsd.org/changeset/base/221564 Log: Change xl_rxeof() a bit to return the number of processed frames in RX descriptor ring. Previously it returned the number of frames that were successfully passed to upper stack which in turn means it ignored frames that were discarded due to errors. The number of processed frames in RX descriptor ring is used to detect whether driver is out of sync with controller's current descriptor pointer. Returning number of processed frames reduces unnecessary (probably wrong) re-synchronization. While here, remove unnecessary local variable initialization. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 22:55:53 2011(r221563) +++ head/sys/dev/xl/if_xl.c Fri May 6 23:01:29 2011(r221564) @@ -1944,7 +1944,7 @@ xl_rxeof(struct xl_softc *sc) struct mbuf *m; struct ifnet*ifp = sc->xl_ifp; struct xl_chain_onefrag *cur_rx; - int total_len = 0; + int total_len; int rx_npkts = 0; u_int32_t rxstat; @@ -1963,6 +1963,7 @@ again: cur_rx = sc->xl_cdata.xl_rx_head; sc->xl_cdata.xl_rx_head = cur_rx->xl_next; total_len = rxstat & XL_RXSTAT_LENMASK; + rx_npkts++; /* * Since we have told the chip to allow large frames, @@ -2047,7 +2048,6 @@ again: XL_UNLOCK(sc); (*ifp->if_input)(ifp, m); XL_LOCK(sc); - rx_npkts++; /* * If we are running from the taskqueue, the interface @@ -2283,11 +2283,7 @@ xl_intr(void *arg) break; if (status & XL_STAT_UP_COMPLETE) { - int curpkts; - - curpkts = ifp->if_ipackets; - xl_rxeof(sc); - if (curpkts == ifp->if_ipackets) { + if (xl_rxeof(sc) == 0) { while (xl_rx_resync(sc)) xl_rxeof(sc); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221563 - head/sys/dev/xl
Author: yongari Date: Fri May 6 22:55:53 2011 New Revision: 221563 URL: http://svn.freebsd.org/changeset/base/221563 Log: Terminate interrupt handler if driver detect it's not running. Also add check for driver running state before trying to send frames. While I'm here, use for loop. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 22:45:33 2011(r221562) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:55:53 2011(r221563) @@ -2273,10 +2273,14 @@ xl_intr(void *arg) } #endif - while ((status = CSR_READ_2(sc, XL_STATUS)) & XL_INTRS && - status != 0x) { + for (;;) { + status = CSR_READ_2(sc, XL_STATUS); + if ((status & XL_INTRS) == 0 || status == 0x) + break; CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_INTR_ACK|(status & XL_INTRS)); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + break; if (status & XL_STAT_UP_COMPLETE) { int curpkts; @@ -2304,6 +2308,7 @@ xl_intr(void *arg) if (status & XL_STAT_ADFAIL) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xl_init_locked(sc); + break; } if (status & XL_STAT_STATSOFLOW) { @@ -2313,7 +2318,8 @@ xl_intr(void *arg) } } - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && + ifp->if_drv_flags & IFF_DRV_RUNNING) { if (sc->xl_type == XL_TYPE_905B) xl_start_90xB_locked(ifp); else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221561 - head/sys/dev/xl
Author: yongari Date: Fri May 6 22:45:13 2011 New Revision: 221561 URL: http://svn.freebsd.org/changeset/base/221561 Log: Updating status word should be the last operation of UPD structure renewal. Disable instruction reordering by adding volatile to xl_list_onefrag structure. Modified: head/sys/dev/xl/if_xl.c head/sys/dev/xl/if_xlreg.h Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 22:36:43 2011(r221560) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:45:13 2011(r221561) @@ -1904,8 +1904,8 @@ xl_newbuf(struct xl_softc *sc, struct xl sc->xl_tmpmap = map; c->xl_mbuf = m_new; c->xl_ptr->xl_frag.xl_len = htole32(m_new->m_len | XL_LAST_FRAG); - c->xl_ptr->xl_status = 0; c->xl_ptr->xl_frag.xl_addr = htole32(segs->ds_addr); + c->xl_ptr->xl_status = 0; bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREREAD); return (0); } Modified: head/sys/dev/xl/if_xlreg.h == --- head/sys/dev/xl/if_xlreg.h Fri May 6 22:36:43 2011(r221560) +++ head/sys/dev/xl/if_xlreg.h Fri May 6 22:45:13 2011(r221561) @@ -468,8 +468,8 @@ struct xl_list { struct xl_list_onefrag { u_int32_t xl_next;/* final entry has 0 nextptr */ - u_int32_t xl_status; - struct xl_frag xl_frag; + volatile u_int32_t xl_status; + volatile struct xl_frag xl_frag; }; struct xl_list_data { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221560 - head/sys/dev/xl
Author: yongari Date: Fri May 6 22:36:43 2011 New Revision: 221560 URL: http://svn.freebsd.org/changeset/base/221560 Log: Call bus_dmamap_sync() only after TX DPD update. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 22:31:27 2011(r221559) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:36:43 2011(r221560) @@ -2644,8 +2644,6 @@ xl_start_locked(struct ifnet *ifp) * once for each packet. */ cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); /* * Queue the packets. If the TX channel is clear, update @@ -2666,6 +2664,8 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_head = start_tx; sc->xl_cdata.xl_tx_tail = cur_tx; } + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); if (!CSR_READ_4(sc, XL_DOWNLIST_PTR)) CSR_WRITE_4(sc, XL_DOWNLIST_PTR, start_tx->xl_phys); @@ -2765,12 +2765,12 @@ xl_start_90xB_locked(struct ifnet *ifp) * once for each packet. */ cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); - bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, - BUS_DMASYNC_PREWRITE); /* Start transmission */ sc->xl_cdata.xl_tx_prod = idx; start_tx->xl_prev->xl_ptr->xl_next = htole32(start_tx->xl_phys); + bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, + BUS_DMASYNC_PREWRITE); /* * Set a timeout in case the chip goes out to lunch. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221559 - head/bin/sh
Author: jilles Date: Fri May 6 22:31:27 2011 New Revision: 221559 URL: http://svn.freebsd.org/changeset/base/221559 Log: sh: Track if the current locale's charset is UTF-8 or not. Modified: head/bin/sh/main.c head/bin/sh/var.c head/bin/sh/var.h Modified: head/bin/sh/main.c == --- head/bin/sh/main.c Fri May 6 22:26:57 2011(r221558) +++ head/bin/sh/main.c Fri May 6 22:31:27 2011(r221559) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); int rootpid; int rootshell; struct jmploc main_handler; +int localeisutf8; static void read_profile(const char *); static char *find_dot_file(char *); @@ -96,6 +97,7 @@ main(int argc, char *argv[]) char *shinit; (void) setlocale(LC_ALL, ""); + updatecharset(); state = 0; if (setjmp(main_handler.loc)) { switch (exception) { Modified: head/bin/sh/var.c == --- head/bin/sh/var.c Fri May 6 22:26:57 2011(r221558) +++ head/bin/sh/var.c Fri May 6 22:31:27 2011(r221559) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include "shell.h" #include "output.h" @@ -361,6 +362,7 @@ setvareq(char *s, int flags) if ((vp->flags & VEXPORT) && localevar(s)) { change_env(s, 1); (void) setlocale(LC_ALL, ""); + updatecharset(); } INTON; return; @@ -379,6 +381,7 @@ setvareq(char *s, int flags) if ((vp->flags & VEXPORT) && localevar(s)) { change_env(s, 1); (void) setlocale(LC_ALL, ""); + updatecharset(); } INTON; } @@ -480,6 +483,7 @@ bltinsetlocale(void) if (loc != NULL) { setlocale(LC_ALL, loc); INTON; + updatecharset(); return; } locdef = bltinlookup("LANG", 0); @@ -491,6 +495,7 @@ bltinsetlocale(void) setlocale(locale_categories[i], loc); } INTON; + updatecharset(); } /* @@ -505,12 +510,24 @@ bltinunsetlocale(void) for (lp = cmdenviron ; lp ; lp = lp->next) { if (localevar(lp->text)) { setlocale(LC_ALL, ""); + updatecharset(); return; } } INTON; } +/* + * Update the localeisutf8 flag. + */ +void +updatecharset(void) +{ + char *charset; + + charset = nl_langinfo(CODESET); + localeisutf8 = !strcmp(charset, "UTF-8"); +} /* * Generate a list of exported variables. This routine is used to construct @@ -656,6 +673,7 @@ exportcmd(int argc, char **argv) if ((vp->flags & VEXPORT) && localevar(vp->text)) { change_env(vp->text, 1); (void) setlocale(LC_ALL, ""); + updatecharset(); } goto found; } @@ -850,6 +868,7 @@ unsetvar(const char *s) if ((vp->flags & VEXPORT) && localevar(vp->text)) { change_env(s, 0); setlocale(LC_ALL, ""); + updatecharset(); } vp->flags &= ~VEXPORT; vp->flags |= VUNSET; Modified: head/bin/sh/var.h == --- head/bin/sh/var.h Fri May 6 22:26:57 2011(r221558) +++ head/bin/sh/var.h Fri May 6 22:31:27 2011(r221559) @@ -81,6 +81,8 @@ extern struct var vhistsize; extern struct var vterm; #endif +extern int localeisutf8; + /* * The following macros access the values of the above variables. * They have to skip over the name. They return the null string @@ -112,6 +114,7 @@ char *lookupvar(const char *); char *bltinlookup(const char *, int); void bltinsetlocale(void); void bltinunsetlocale(void); +void updatecharset(void); char **environment(void); int showvarscmd(int, char **); int exportcmd(int, char **); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221558 - head/sys/dev/xl
Author: yongari Date: Fri May 6 22:26:57 2011 New Revision: 221558 URL: http://svn.freebsd.org/changeset/base/221558 Log: Set status word once instead of twice. For 3C90xB/3C90xC, frame length of status word is ignored. While here move bus_dmamap_sync() up where DMA map is loaded. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 22:16:43 2011(r221557) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:26:57 2011(r221558) @@ -2507,6 +2507,7 @@ xl_encap(struct xl_softc *sc, struct xl_ *m_head = NULL; return (EIO); } + bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREWRITE); total_len = 0; for (i = 0; i < nseg; i++) { @@ -2519,8 +2520,6 @@ xl_encap(struct xl_softc *sc, struct xl_ total_len += sc->xl_cdata.xl_tx_segs[i].ds_len; } c->xl_ptr->xl_frag[nseg - 1].xl_len |= htole32(XL_LAST_FRAG); - c->xl_ptr->xl_status = htole32(total_len); - c->xl_ptr->xl_next = 0; if (sc->xl_type == XL_TYPE_905B) { status = XL_TXSTAT_RND_DEFEAT; @@ -2535,11 +2534,12 @@ xl_encap(struct xl_softc *sc, struct xl_ status |= XL_TXSTAT_UDPCKSUM; } #endif - c->xl_ptr->xl_status = htole32(status); - } + } else + status = total_len; + c->xl_ptr->xl_status = htole32(status); + c->xl_ptr->xl_next = 0; c->xl_mbuf = *m_head; - bus_dmamap_sync(sc->xl_mtag, c->xl_map, BUS_DMASYNC_PREWRITE); return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221557 - head/sys/dev/xl
Author: yongari Date: Fri May 6 22:16:43 2011 New Revision: 221557 URL: http://svn.freebsd.org/changeset/base/221557 Log: Remove unnecessary htole32/le32toh dance. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 22:07:31 2011(r221556) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:16:43 2011(r221557) @@ -2518,8 +2518,7 @@ xl_encap(struct xl_softc *sc, struct xl_ htole32(sc->xl_cdata.xl_tx_segs[i].ds_len); total_len += sc->xl_cdata.xl_tx_segs[i].ds_len; } - c->xl_ptr->xl_frag[nseg - 1].xl_len = - htole32(sc->xl_cdata.xl_tx_segs[nseg - 1].ds_len | XL_LAST_FRAG); + c->xl_ptr->xl_frag[nseg - 1].xl_len |= htole32(XL_LAST_FRAG); c->xl_ptr->xl_status = htole32(total_len); c->xl_ptr->xl_next = 0; @@ -2644,8 +2643,7 @@ xl_start_locked(struct ifnet *ifp) * get an interrupt once for the whole chain rather than * once for each packet. */ - cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) | - XL_TXSTAT_DL_INTR); + cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, BUS_DMASYNC_PREWRITE); @@ -2661,8 +2659,8 @@ xl_start_locked(struct ifnet *ifp) sc->xl_cdata.xl_tx_tail->xl_ptr->xl_next = htole32(start_tx->xl_phys); status = sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status; - sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status = - htole32(le32toh(status) & ~XL_TXSTAT_DL_INTR); + sc->xl_cdata.xl_tx_tail->xl_ptr->xl_status &= + htole32(~XL_TXSTAT_DL_INTR); sc->xl_cdata.xl_tx_tail = cur_tx; } else { sc->xl_cdata.xl_tx_head = start_tx; @@ -2766,8 +2764,7 @@ xl_start_90xB_locked(struct ifnet *ifp) * get an interrupt once for the whole chain rather than * once for each packet. */ - cur_tx->xl_ptr->xl_status = htole32(le32toh(cur_tx->xl_ptr->xl_status) | - XL_TXSTAT_DL_INTR); + cur_tx->xl_ptr->xl_status |= htole32(XL_TXSTAT_DL_INTR); bus_dmamap_sync(sc->xl_ldata.xl_tx_tag, sc->xl_ldata.xl_tx_dmamap, BUS_DMASYNC_PREWRITE); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221556 - in stable/8/sys/dev/usb: . quirk
Author: n_hibma Date: Fri May 6 22:07:31 2011 New Revision: 221556 URL: http://svn.freebsd.org/changeset/base/221556 Log: MFC r218422: Curitel UM150 needs a quirk to stop it from detaching straight after attach (resetting actually). Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c == --- stable/8/sys/dev/usb/quirk/usb_quirk.c Fri May 6 22:01:46 2011 (r221555) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Fri May 6 22:07:31 2011 (r221556) @@ -136,6 +136,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(SIEMENS2, ES75, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(QUALCOMM, CDMA_MSM, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(QUALCOMM2, CDMA_MSM, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), + USB_QUIRK(CURITEL, UM150, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(CURITEL, UM175, 0x, 0x, UQ_ASSUME_CM_OVER_DATA), /* USB Mass Storage Class Quirks */ Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsFri May 6 22:01:46 2011 (r221555) +++ stable/8/sys/dev/usb/usbdevsFri May 6 22:07:31 2011 (r221556) @@ -1308,6 +1308,7 @@ product CTX EX13000x Ex1300 hub product CURITEL HX550C 0x1101 CDMA 2000 1xRTT USB modem (HX-550C) product CURITEL HX57XB 0x2101 CDMA 2000 1xRTT USB modem (HX-570/575B/PR-600) product CURITEL PC5740 0x3701 Broadband Wireless modem +product CURITEL UM150 0x3711 EVDO modem product CURITEL UM175 0x3714 EVDO modem /* CyberPower products */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221555 - head/sys/dev/xl
Author: yongari Date: Fri May 6 22:01:46 2011 New Revision: 221555 URL: http://svn.freebsd.org/changeset/base/221555 Log: Rewrite RX filter logic and provide controller specific filter handler for 3C90x and 3C90xB/C respectively. This simplifies ioctl handler as well as enhancing readability. While I'm here don't reprogram multicast filter when driver is not running. Modified: head/sys/dev/xl/if_xl.c Modified: head/sys/dev/xl/if_xl.c == --- head/sys/dev/xl/if_xl.c Fri May 6 21:53:29 2011(r221554) +++ head/sys/dev/xl/if_xl.c Fri May 6 22:01:46 2011(r221555) @@ -263,10 +263,11 @@ static void xl_mii_send(struct xl_softc static int xl_mii_readreg(struct xl_softc *, struct xl_mii_frame *); static int xl_mii_writereg(struct xl_softc *, struct xl_mii_frame *); +static void xl_rxfilter(struct xl_softc *); +static void xl_rxfilter_90x(struct xl_softc *); +static void xl_rxfilter_90xB(struct xl_softc *); static void xl_setcfg(struct xl_softc *); static void xl_setmode(struct xl_softc *, int); -static void xl_setmulti(struct xl_softc *); -static void xl_setmulti_hash(struct xl_softc *); static void xl_reset(struct xl_softc *); static int xl_list_rx_init(struct xl_softc *); static int xl_list_tx_init(struct xl_softc *); @@ -701,101 +702,133 @@ xl_read_eeprom(struct xl_softc *sc, cadd return (err ? 1 : 0); } +static void +xl_rxfilter(struct xl_softc *sc) +{ + + if (sc->xl_type == XL_TYPE_905B) + xl_rxfilter_90xB(sc); + else + xl_rxfilter_90x(sc); +} + /* * NICs older than the 3c905B have only one multicast option, which * is to enable reception of all multicast frames. */ static void -xl_setmulti(struct xl_softc *sc) +xl_rxfilter_90x(struct xl_softc *sc) { - struct ifnet*ifp = sc->xl_ifp; + struct ifnet*ifp; struct ifmultiaddr *ifma; u_int8_trxfilt; - int mcnt = 0; XL_LOCK_ASSERT(sc); + ifp = sc->xl_ifp; + XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); + rxfilt &= ~(XL_RXFILTER_ALLFRAMES | XL_RXFILTER_ALLMULTI | + XL_RXFILTER_BROADCAST | XL_RXFILTER_INDIVIDUAL); - if (ifp->if_flags & IFF_ALLMULTI) { - rxfilt |= XL_RXFILTER_ALLMULTI; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - return; - } - - if_maddr_rlock(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) - mcnt++; - if_maddr_runlock(ifp); + /* Set the individual bit to receive frames for this host only. */ + rxfilt |= XL_RXFILTER_INDIVIDUAL; + /* Set capture broadcast bit to capture broadcast frames. */ + if (ifp->if_flags & IFF_BROADCAST) + rxfilt |= XL_RXFILTER_BROADCAST; - if (mcnt) - rxfilt |= XL_RXFILTER_ALLMULTI; - else - rxfilt &= ~XL_RXFILTER_ALLMULTI; + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) { + if (ifp->if_flags & IFF_PROMISC) + rxfilt |= XL_RXFILTER_ALLFRAMES; + if (ifp->if_flags & IFF_ALLMULTI) + rxfilt |= XL_RXFILTER_ALLMULTI; + } else { + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + rxfilt |= XL_RXFILTER_ALLMULTI; + break; + } + if_maddr_runlock(ifp); + } - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); + CSR_WRITE_2(sc, XL_COMMAND, rxfilt | XL_CMD_RX_SET_FILT); + XL_SEL_WIN(7); } /* * 3c905B adapters have a hash filter that we can program. */ static void -xl_setmulti_hash(struct xl_softc *sc) +xl_rxfilter_90xB(struct xl_softc *sc) { - struct ifnet*ifp = sc->xl_ifp; - int h = 0, i; + struct ifnet*ifp; struct ifmultiaddr *ifma; + int i, mcnt; + u_int16_t h; u_int8_trxfilt; - int mcnt = 0; XL_LOCK_ASSERT(sc); + ifp = sc->xl_ifp; + XL_SEL_WIN(5); rxfilt = CSR_READ_1(sc, XL_W5_RX_FILTER); + rxfilt &= ~(XL_RXFILTER_ALLFRAMES | XL_RXFILTER_ALLMULTI | + XL_RXFILTER_BROADCAST | XL_RXFILTER_INDIVIDUAL | + XL_RXFILTER_MULTIHASH); - if (ifp->if_flags & IFF_ALLMULTI) { - rxfilt |= XL_RXFILTER_ALLMULTI; - CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_RX_SET_FILT|rxfilt); - return; - } else - rxfilt &= ~XL_RXFIL
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
So, how about % cd /usr/src/sys % svn rm nfsclient ? :) DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221550 - head/sys/powerpc/conf
2011/5/6 Nathan Whitehorn : > Author: nwhitehorn > Date: Fri May  6 20:43:02 2011 > New Revision: 221550 > URL: http://svn.freebsd.org/changeset/base/221550 > > Log: >  SMP has worked perfectly for a very long time on 32-bit PowerPC on both >  UP and SMP hardware. Enable it in GENERIC. > While working on largeSMP, I think there is a breakage in atomic.h. More specifically, atomic_store_rel_long() (and related functions) are not going to properly work because powerpc defines them as: atomic_store_rel_long -> atomic_store_rel_32(volatile u_int *p, u_int v) while this should really follow the long arguments. This happens because powerpc doesn't follow the other architectures semantic on defining the "similar" atomic operations. Other arches define an hardcode version of _type version of the function and than make a macro the _32 (or whatever) version. In other words this is what they do: void atomic_store_rel_32() { ... } #define atomic_store_rel_int atomic_store_rel_32 which si clearly dangerous for cases as reported above. Maybe that could be fixed by passing sized types, rather than simply int or long in numbered version, but I'd really prefer to follow the semantic by other architectures and then have: void atomic_store_rel_int() { ... } #define atomic_store_rel_32 atomic_store_rel_int I fixed the ATOMIC_STORE_LOAD case in my code, because I needed it, but the final cleanup is much bigger. I can make a patch tomorrow if you can test it. Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221553 - in stable/8/sys/dev/usb: . serial
Author: n_hibma Date: Fri May 6 21:09:33 2011 New Revision: 221553 URL: http://svn.freebsd.org/changeset/base/221553 Log: MFC r217637,218178 Add another ID for the ZTE MF190 Surf Stick New ID for the Novatel MC547 Modified: stable/8/sys/dev/usb/serial/u3g.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/usb/serial/u3g.c == --- stable/8/sys/dev/usb/serial/u3g.c Fri May 6 20:46:29 2011 (r221552) +++ stable/8/sys/dev/usb/serial/u3g.c Fri May 6 21:09:33 2011 (r221553) @@ -302,6 +302,7 @@ static const struct usb_device_id u3g_de U3G_DEV(NOVATEL, EU740, 0), U3G_DEV(NOVATEL, EU870D, 0), U3G_DEV(NOVATEL, MC760, 0), + U3G_DEV(NOVATEL, MC547, 0), U3G_DEV(NOVATEL, MC950D, 0), U3G_DEV(NOVATEL, U720, 0), U3G_DEV(NOVATEL, U727, 0), @@ -415,6 +416,7 @@ static const struct usb_device_id u3g_de U3G_DEV(QUALCOMMINC, E0078, 0), U3G_DEV(QUALCOMMINC, E0082, 0), U3G_DEV(QUALCOMMINC, E0086, 0), + U3G_DEV(QUALCOMMINC, SURFSTICK, 0), U3G_DEV(QUALCOMMINC, E2002, 0), U3G_DEV(QUALCOMMINC, E2003, 0), U3G_DEV(QUALCOMMINC, MF626, 0), Modified: stable/8/sys/dev/usb/usbdevs == --- stable/8/sys/dev/usb/usbdevsFri May 6 20:46:29 2011 (r221552) +++ stable/8/sys/dev/usb/usbdevsFri May 6 21:09:33 2011 (r221553) @@ -2385,6 +2385,7 @@ product NOVATEL ZEROCD2 0x5030 Novatel product NOVATEL U727_2 0x5100 Merlin U727 CDMA product NOVATEL U760 0x6000 Novatel U760 product NOVATEL MC760 0x6002 Novatel MC760 +product NOVATEL MC547 0x7042 Novatel MC547 product NOVATEL2 FLEXPACKGPS 0x0100 NovAtel FlexPack GPS receiver /* Merlin products */ @@ -2693,6 +2694,7 @@ product QUALCOMMINC E0076 0x0076 3G mode product QUALCOMMINC E0078 0x0078 3G modem product QUALCOMMINC E0082 0x0082 3G modem product QUALCOMMINC E0086 0x0086 3G modem +product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
> Rick Macklem writes: > > My problem is that I don't know how to deal with two modules with > > the same name. > > Why do they have to have the same name? All that matters is the fstype > and the sysctls. Just make sure that the auto-load logic loads the new > stack and not the old one if neither is loaded already. > Well, the main auto-load logic is the (n)mount(2) syscall and it does a vfs_byname_kld(fstype, td, errp), which calls kern_kldload(td, fstype, &fileid) to load the module. The argument is the "fstype", so that is what is used to find/load the module. The way sys/nfsclient is set up (and I think this is the norm for file systems), the module name is the fstype name, because VFS_SET(nfs_vfsops, oldnfs, VFCF_NETWORK); (There is a DECLARE_MODULE() in this macro and it uses the 2nd arg. to set the module name, same as the fstype name. Just take a look at the VFS_SET() macro in sys/mount.h.) defines the module name as the 2nd argument, which is also the fstype. (You can give it another "name" via DECLARE_MODULE(), although I'm not sure if that it considered correct to do, but it will be the "fstype" that the mount(2) syscall will use to try and load it.) rick ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221552 - head/sys/net
Author: yongari Date: Fri May 6 20:46:29 2011 New Revision: 221552 URL: http://svn.freebsd.org/changeset/base/221552 Log: Fix white space nits and style Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c == --- head/sys/net/if_tun.c Fri May 6 20:45:50 2011(r221551) +++ head/sys/net/if_tun.c Fri May 6 20:46:29 2011(r221552) @@ -228,8 +228,8 @@ tunclone(void *arg, struct ucred *cred, i = clone_create(&tunclones, &tun_cdevsw, &u, dev, 0); if (i) { if (append_unit) { - namelen = snprintf(devname, sizeof(devname), "%s%d", name, - u); + namelen = snprintf(devname, sizeof(devname), "%s%d", + name, u); name = devname; } /* No preexisting struct cdev *, create one */ @@ -577,11 +577,8 @@ tunifioctl(struct ifnet *ifp, u_long cmd * tunoutput - queue packets from higher level ready to put out. */ static int -tunoutput( - struct ifnet *ifp, - struct mbuf *m0, - struct sockaddr *dst, - struct route *ro) +tunoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, +struct route *ro) { struct tun_softc *tp = ifp->if_softc; u_short cached_tun_flags; @@ -671,7 +668,8 @@ tunoutput( * the cdevsw interface is now pretty minimal. */ static int -tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) +tunioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, +struct thread *td) { int error; struct tun_softc *tp = dev->si_drv1; @@ -993,7 +991,7 @@ tunkqfilter(struct cdev *dev, struct kno ifp->if_xname, dev2unit(dev)); kn->kn_fop = &tun_write_filterops; break; - + default: TUNDEBUG(ifp, "%s kqfilter: invalid filter, minor = %#x\n", ifp->if_xname, dev2unit(dev)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221551 - head/bin/sh
Author: jilles Date: Fri May 6 20:45:50 2011 New Revision: 221551 URL: http://svn.freebsd.org/changeset/base/221551 Log: sh: Change the CTL* bytes to ones invalid in UTF-8. This ensures that mbrtowc(3) can be used directly once it has been verified that there is no CTL* byte. Dealing with a CTLESC byte within a multibyte character would be complicated. The new values do occur in iso-8859-* encodings. This decreases efficiency slightly but should not affect correctness. Caveat: Updating across this change and rebuilding without cleaning may yield a subtly broken sh binary. By default, make buildworld will clean and avoid problems. Modified: head/bin/sh/parser.h Modified: head/bin/sh/parser.h == --- head/bin/sh/parser.hFri May 6 20:43:02 2011(r221550) +++ head/bin/sh/parser.hFri May 6 20:45:50 2011(r221551) @@ -34,16 +34,16 @@ */ /* control characters in argument strings */ -#define CTLESC '\201' -#define CTLVAR '\202' -#define CTLENDVAR '\203' -#define CTLBACKQ '\204' +#define CTLESC '\300' +#define CTLVAR '\301' +#define CTLENDVAR '\371' +#define CTLBACKQ '\372' #define CTLQUOTE 01/* ored with CTLBACKQ code if in quotes */ /* CTLBACKQ | CTLQUOTE == '\205' */ -#defineCTLARI '\206' -#defineCTLENDARI '\207' -#defineCTLQUOTEMARK '\210' -#defineCTLQUOTEEND '\211' /* only for ${v+-...} */ +#defineCTLARI '\374' +#defineCTLENDARI '\375' +#defineCTLQUOTEMARK '\376' +#defineCTLQUOTEEND '\377' /* only for ${v+-...} */ /* variable substitution byte (follows CTLVAR) */ #define VSTYPE 0x0f/* type of variable substitution */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221550 - head/sys/powerpc/conf
Author: nwhitehorn Date: Fri May 6 20:43:02 2011 New Revision: 221550 URL: http://svn.freebsd.org/changeset/base/221550 Log: SMP has worked perfectly for a very long time on 32-bit PowerPC on both UP and SMP hardware. Enable it in GENERIC. MFC after:2 weeks Modified: head/sys/powerpc/conf/GENERIC Modified: head/sys/powerpc/conf/GENERIC == --- head/sys/powerpc/conf/GENERIC Fri May 6 20:40:33 2011 (r221549) +++ head/sys/powerpc/conf/GENERIC Fri May 6 20:43:02 2011 (r221550) @@ -77,7 +77,7 @@ options WITNESS_SKIPSPIN#Don't run wit optionsMALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # To make an SMP kernel, the next line is needed -#options SMP # Symmetric MultiProcessor Kernel +optionsSMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221549 - head/sys/netinet
Author: tuexen Date: Fri May 6 20:40:33 2011 New Revision: 221549 URL: http://svn.freebsd.org/changeset/base/221549 Log: Change the name of an internal structure, since the name is used by a structure of the (new) SCTP API. MFC after: 1 week. Modified: head/sys/netinet/sctp_auth.h Modified: head/sys/netinet/sctp_auth.h == --- head/sys/netinet/sctp_auth.hFri May 6 20:37:07 2011 (r221548) +++ head/sys/netinet/sctp_auth.hFri May 6 20:40:33 2011 (r221549) @@ -89,7 +89,7 @@ typedef struct sctp_hmaclist { } sctp_hmaclist_t; /* authentication info */ -typedef struct sctp_authinfo { +typedef struct sctp_authinformation { sctp_key_t *random; /* local random key (concatenated) */ uint32_t random_len;/* local random number length for param */ sctp_key_t *peer_random;/* peer's random key (concatenated) */ @@ -98,7 +98,7 @@ typedef struct sctp_authinfo { uint16_t active_keyid; /* active send keyid */ uint16_t assoc_keyid; /* current send keyid (cached) */ uint16_t recv_keyid;/* last recv keyid (cached) */ -} sctp_authinfo_t; +}sctp_authinfo_t; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221548 - head/sys/net
Author: yongari Date: Fri May 6 20:37:07 2011 New Revision: 221548 URL: http://svn.freebsd.org/changeset/base/221548 Log: Do not increment collision counter if transmit have failed. Transmission error in tun(4) is queueing error(i.e. ENOBUFS) and it has nothing to do with collision. Reported by: Zeus V Panchenko (zeus <> ibs dot dn dot ua) Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c == --- head/sys/net/if_tun.c Fri May 6 20:04:47 2011(r221547) +++ head/sys/net/if_tun.c Fri May 6 20:37:07 2011(r221548) @@ -661,10 +661,8 @@ tunoutput( } error = (ifp->if_transmit)(ifp, m0); - if (error) { - ifp->if_collisions++; + if (error) return (ENOBUFS); - } ifp->if_opackets++; return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
Rick Macklem writes: > My problem is that I don't know how to deal with two modules with > the same name. Why do they have to have the same name? All that matters is the fstype and the sysctls. Just make sure that the auto-load logic loads the new stack and not the old one if neither is loaded already. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221547 - stable/8/sys/sparc64/pci
Author: marius Date: Fri May 6 20:04:47 2011 New Revision: 221547 URL: http://svn.freebsd.org/changeset/base/221547 Log: MFC: r216962 Inherit the APB and the generic OFW PCI-PCI bridge driver from the generic PCI-PCI bridge driver in order to safe some code. Modified: stable/8/sys/sparc64/pci/apb.c stable/8/sys/sparc64/pci/ofw_pcib.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/sparc64/pci/apb.c == --- stable/8/sys/sparc64/pci/apb.c Fri May 6 20:04:47 2011 (r221546) +++ stable/8/sys/sparc64/pci/apb.c Fri May 6 20:04:47 2011 (r221547) @@ -81,25 +81,11 @@ static device_method_t apb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, apb_probe), DEVMETHOD(device_attach,apb_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume,bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar,pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, apb_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr,bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots,pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config,pcib_write_config), DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ @@ -110,7 +96,8 @@ static device_method_t apb_methods[] = { static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); +DEFINE_CLASS_1(pcib, apb_driver, apb_methods, sizeof(struct apb_softc), +pcib_driver); EARLY_DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0, BUS_PASS_BUS); MODULE_DEPEND(apb, pci, 1, 1, 1); Modified: stable/8/sys/sparc64/pci/ofw_pcib.c == --- stable/8/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:04:47 2011 (r221546) +++ stable/8/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:04:47 2011 (r221547) @@ -64,31 +64,11 @@ static device_method_t ofw_pcib_methods[ /* Device interface */ DEVMETHOD(device_probe, ofw_pcib_probe), DEVMETHOD(device_attach,ofw_pcib_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume,bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar,pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr,bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots,pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config,pcib_write_config), - DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), - DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), - DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_release_msix,pcib_release_msix), - DEVMETHOD(pcib_map_msi, pcib_map_msi), + DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), @@ -98,8 +78,8 @@ static device_method_t ofw_pcib_methods[ static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, -sizeof(struct ofw_pcib_gen_softc)); +DEFINE_CLASS_1(pcib, ofw_pcib_driver, ofw_pcib_methods, +sizeof(struct ofw_pcib_gen_softc), pcib_driver); EARLY_DRIVER_MODULE(ofw_pcib, pci, ofw_pc
svn commit: r221546 - stable/7/sys/sparc64/pci
Author: marius Date: Fri May 6 20:04:47 2011 New Revision: 221546 URL: http://svn.freebsd.org/changeset/base/221546 Log: MFC: r216962 Inherit the APB and the generic OFW PCI-PCI bridge driver from the generic PCI-PCI bridge driver in order to safe some code. Modified: stable/7/sys/sparc64/pci/apb.c stable/7/sys/sparc64/pci/ofw_pcib.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/apb.c == --- stable/7/sys/sparc64/pci/apb.c Fri May 6 20:02:26 2011 (r221545) +++ stable/7/sys/sparc64/pci/apb.c Fri May 6 20:04:47 2011 (r221546) @@ -82,25 +82,11 @@ static device_method_t apb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, apb_probe), DEVMETHOD(device_attach,apb_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume,bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar,pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), DEVMETHOD(bus_alloc_resource, apb_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr,bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots,pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config,pcib_write_config), DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ @@ -111,7 +97,8 @@ static device_method_t apb_methods[] = { static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc)); +DEFINE_CLASS_1(pcib, apb_driver, apb_methods, sizeof(struct apb_softc), +pcib_driver); DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0); MODULE_DEPEND(apb, pci, 1, 1, 1); Modified: stable/7/sys/sparc64/pci/ofw_pcib.c == --- stable/7/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:02:26 2011 (r221545) +++ stable/7/sys/sparc64/pci/ofw_pcib.c Fri May 6 20:04:47 2011 (r221546) @@ -65,31 +65,11 @@ static device_method_t ofw_pcib_methods[ /* Device interface */ DEVMETHOD(device_probe, ofw_pcib_probe), DEVMETHOD(device_attach,ofw_pcib_attach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume,bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_read_ivar,pcib_read_ivar), - DEVMETHOD(bus_write_ivar, pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, pcib_alloc_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr,bus_generic_teardown_intr), /* pcib interface */ - DEVMETHOD(pcib_maxslots,pcib_maxslots), - DEVMETHOD(pcib_read_config, pcib_read_config), - DEVMETHOD(pcib_write_config,pcib_write_config), - DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), - DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), - DEVMETHOD(pcib_release_msi, pcib_release_msi), - DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), - DEVMETHOD(pcib_release_msix,pcib_release_msix), - DEVMETHOD(pcib_map_msi, pcib_map_msi), + DEVMETHOD(pcib_route_interrupt, ofw_pcib_gen_route_interrupt), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, ofw_pcib_gen_get_node), @@ -99,8 +79,8 @@ static device_method_t ofw_pcib_methods[ static devclass_t pcib_devclass; -DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods, -sizeof(struct ofw_pcib_gen_softc)); +DEFINE_CLASS_1(pcib, ofw_pcib_driver, ofw_pcib_methods, +sizeof(struct ofw_pcib_gen_softc), pcib_driver); DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0); MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1); ___
svn commit: r221545 - stable/7/sys/dev/bge
Author: marius Date: Fri May 6 20:02:26 2011 New Revision: 221545 URL: http://svn.freebsd.org/changeset/base/221545 Log: MFC: r221343 Fix an logic bug which caused jumbo buffers to not be synced and unloaded. Reported and tested by: Michael Moll Modified: stable/7/sys/dev/bge/if_bge.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bge/if_bge.c == --- stable/7/sys/dev/bge/if_bge.c Fri May 6 20:02:23 2011 (r221544) +++ stable/7/sys/dev/bge/if_bge.c Fri May 6 20:02:26 2011 (r221545) @@ -1022,7 +1022,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i return (error); } - if (sc->bge_cdata.bge_rx_jumbo_chain[i] == NULL) { + if (sc->bge_cdata.bge_rx_jumbo_chain[i] != NULL) { bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221544 - stable/8/sys/dev/bge
Author: marius Date: Fri May 6 20:02:23 2011 New Revision: 221544 URL: http://svn.freebsd.org/changeset/base/221544 Log: MFC: r221343 Fix an logic bug which caused jumbo buffers to not be synced and unloaded. Reported and tested by: Michael Moll Modified: stable/8/sys/dev/bge/if_bge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bge/if_bge.c == --- stable/8/sys/dev/bge/if_bge.c Fri May 6 20:02:19 2011 (r221543) +++ stable/8/sys/dev/bge/if_bge.c Fri May 6 20:02:23 2011 (r221544) @@ -1022,7 +1022,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i return (error); } - if (sc->bge_cdata.bge_rx_jumbo_chain[i] == NULL) { + if (sc->bge_cdata.bge_rx_jumbo_chain[i] != NULL) { bus_dmamap_sync(sc->bge_cdata.bge_mtag_jumbo, sc->bge_cdata.bge_rx_jumbo_dmamap[i], BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->bge_cdata.bge_mtag_jumbo, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221543 - in head/sys: nfs nfsclient
Author: rmacklem Date: Fri May 6 20:02:19 2011 New Revision: 221543 URL: http://svn.freebsd.org/changeset/base/221543 Log: Move sys/nfsclient/nfs_kdtrace.h to sys/nfs/nfs_kdtrace.h so it can be used by the new NFS client as well as the old one. Added: head/sys/nfs/nfs_kdtrace.h - copied unchanged from r221541, head/sys/nfsclient/nfs_kdtrace.h Deleted: head/sys/nfsclient/nfs_kdtrace.h Modified: head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_subs.c head/sys/nfsclient/nfs_vnops.c Copied: head/sys/nfs/nfs_kdtrace.h (from r221541, head/sys/nfsclient/nfs_kdtrace.h) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/nfs/nfs_kdtrace.h Fri May 6 20:02:19 2011(r221543, copy of r221541, head/sys/nfsclient/nfs_kdtrace.h) @@ -0,0 +1,120 @@ +/*- + * Copyright (c) 2009 Robert N. M. Watson + * All rights reserved. + * + * This software was developed at the University of Cambridge Computer + * Laboratory with support from a grant from Google, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _NFSCLIENT_NFS_KDTRACE_H_ +#define_NFSCLIENT_NFS_KDTRACE_H_ + +#ifdef KDTRACE_HOOKS +#include + +/* + * Definitions for NFS access cache probes. + */ +extern uint32_t nfsclient_accesscache_flush_done_id; +extern uint32_t nfsclient_accesscache_get_hit_id; +extern uint32_t nfsclient_accesscache_get_miss_id; +extern uint32_t nfsclient_accesscache_load_done_id; + +#defineKDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp) do { \ + if (dtrace_nfsclient_accesscache_flush_done_probe != NULL) \ + (dtrace_nfsclient_accesscache_flush_done_probe)(\ + nfsclient_accesscache_flush_done_id, (vp)); \ +} while (0) + +#defineKDTRACE_NFS_ACCESSCACHE_GET_HIT(vp, uid, mode) do { \ + if (dtrace_nfsclient_accesscache_get_hit_probe != NULL) \ + (dtrace_nfsclient_accesscache_get_hit_probe)( \ + nfsclient_accesscache_get_hit_id, (vp), (uid), \ + (mode));\ +} while (0) + +#defineKDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode) do { \ + if (dtrace_nfsclient_accesscache_get_miss_probe != NULL)\ + (dtrace_nfsclient_accesscache_get_miss_probe)( \ + nfsclient_accesscache_get_miss_id, (vp), (uid), \ + (mode));\ +} while (0) + +#defineKDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, uid, rmode, error) do { \ + if (dtrace_nfsclient_accesscache_load_done_probe != NULL) \ + (dtrace_nfsclient_accesscache_load_done_probe)( \ + nfsclient_accesscache_load_done_id, (vp), (uid),\ + (rmode), (error)); \ +} while (0) + +/* + * Definitions for NFS attribute cache probes. + */ +extern uint32_t nfsclient_attrcache_flush_done_id; +extern uint32_t nfsclient_attrcache_get_hit_id; +extern uint32_t nfsclient_attrcache_get_miss_id; +extern uint32_t nfsclient_attrcache_load_done_id; + +#defineKDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp)do { \ + if (dtrace_nfsclient_attrcache_flush_done_probe != NULL)\ + (dtrace_nfsclient_attrcache_flush_done_probe)( \ + nfsclient_attrcache_flush_done_id, (vp)); \ +} while (0) + +#defineKDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap) do { \ + if (dtrace
svn commit: r221542 - head/sys/nfsclient
Author: rmacklem Date: Fri May 6 19:55:15 2011 New Revision: 221542 URL: http://svn.freebsd.org/changeset/base/221542 Log: Fix the module dependency in nfs_kdtrace.c for the old NFS client. This should fix a problem reported by Marcus Reid. Modified: head/sys/nfsclient/nfs_kdtrace.c Modified: head/sys/nfsclient/nfs_kdtrace.c == --- head/sys/nfsclient/nfs_kdtrace.cFri May 6 19:14:06 2011 (r221541) +++ head/sys/nfsclient/nfs_kdtrace.cFri May 6 19:55:15 2011 (r221542) @@ -539,4 +539,4 @@ DEV_MODULE(dtnfsclient, dtnfsclient_mode MODULE_VERSION(dtnfsclient, 1); MODULE_DEPEND(dtnfsclient, dtrace, 1, 1, 1); MODULE_DEPEND(dtnfsclient, opensolaris, 1, 1, 1); -MODULE_DEPEND(dtnfsclient, nfs, 1, 1, 1); +MODULE_DEPEND(dtnfsclient, oldnfs, 1, 1, 1); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221541 - head/tools/build/options
On Fri May 6 11, Ruslan Ermilov wrote: > Author: ru > Date: Fri May 6 19:14:06 2011 > New Revision: 221541 > URL: http://svn.freebsd.org/changeset/base/221541 > > Log: > MK_GPIO changed its default; reflect. could you also have a look at WITHOUT_SSP? the description says that it only affects world, but looking at sys/conf/kern.mk, it also triggers the -fstack-protector flag for the kernel. so it has an effect both on world AND kernel, if i understood things correctly. cheers. alex > > Added: > head/tools/build/options/WITHOUT_GPIO > - copied, changed from r221204, head/tools/build/options/WITH_GPIO > Deleted: > head/tools/build/options/WITH_GPIO > > Copied and modified: head/tools/build/options/WITHOUT_GPIO (from r221204, > head/tools/build/options/WITH_GPIO) > == > --- head/tools/build/options/WITH_GPIOFri Apr 29 10:33:54 2011 > (r221204, copy source) > +++ head/tools/build/options/WITHOUT_GPIO Fri May 6 19:14:06 2011 > (r221541) > @@ -1,2 +1,4 @@ > .\" $FreeBSD$ > -Set to build gpioctl(8) as part of the base system. > +Set to not build > +.Xr gpioctl 8 > +as part of the base system. -- a13x ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221541 - head/tools/build/options
Author: ru Date: Fri May 6 19:14:06 2011 New Revision: 221541 URL: http://svn.freebsd.org/changeset/base/221541 Log: MK_GPIO changed its default; reflect. Added: head/tools/build/options/WITHOUT_GPIO - copied, changed from r221204, head/tools/build/options/WITH_GPIO Deleted: head/tools/build/options/WITH_GPIO Copied and modified: head/tools/build/options/WITHOUT_GPIO (from r221204, head/tools/build/options/WITH_GPIO) == --- head/tools/build/options/WITH_GPIO Fri Apr 29 10:33:54 2011 (r221204, copy source) +++ head/tools/build/options/WITHOUT_GPIO Fri May 6 19:14:06 2011 (r221541) @@ -1,2 +1,4 @@ .\" $FreeBSD$ -Set to build gpioctl(8) as part of the base system. +Set to not build +.Xr gpioctl 8 +as part of the base system. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221540 - head/tools/build/options
Author: ru Date: Fri May 6 19:13:03 2011 New Revision: 221540 URL: http://svn.freebsd.org/changeset/base/221540 Log: Removed trailing whitespace. Modified: head/tools/build/options/WITHOUT_ACCT head/tools/build/options/WITHOUT_FLOPPY Modified: head/tools/build/options/WITHOUT_ACCT == --- head/tools/build/options/WITHOUT_ACCT Fri May 6 19:10:27 2011 (r221539) +++ head/tools/build/options/WITHOUT_ACCT Fri May 6 19:13:03 2011 (r221540) @@ -1,5 +1,5 @@ .\" $FreeBSD$ Set to not build process accounting tools such as -.Xr ac 8 +.Xr ac 8 and .Xr accton 8 . Modified: head/tools/build/options/WITHOUT_FLOPPY == --- head/tools/build/options/WITHOUT_FLOPPY Fri May 6 19:10:27 2011 (r221539) +++ head/tools/build/options/WITHOUT_FLOPPY Fri May 6 19:13:03 2011 (r221540) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to not build or install programs +Set to not build or install programs for operating floppy disk driver. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221539 - head/tools/build/options
Author: ru Date: Fri May 6 19:10:27 2011 New Revision: 221539 URL: http://svn.freebsd.org/changeset/base/221539 Log: Tidy up formatting. Modified: head/tools/build/options/WITHOUT_FDT Modified: head/tools/build/options/WITHOUT_FDT == --- head/tools/build/options/WITHOUT_FDTFri May 6 18:40:51 2011 (r221538) +++ head/tools/build/options/WITHOUT_FDTFri May 6 19:10:27 2011 (r221539) @@ -1,3 +1,3 @@ .\" $FreeBSD$ -Set to not build Flattened Device Tree support as part of the base system. This -includes the device tree compiler (dtc) and libfdt support library. +Set to not build Flattened Device Tree support as part of the base system. +This includes the device tree compiler (dtc) and libfdt support library. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221538 - in stable: 7/lib/libc/string 8/lib/libc/string
Author: delphij Date: Fri May 6 18:40:51 2011 New Revision: 221538 URL: http://svn.freebsd.org/changeset/base/221538 Log: MFC r221401: Fix prototype for ffsll(3) and fls(3). PR: docs/156796 Submitted by: Jean-Yves Migeon Modified: stable/7/lib/libc/string/ffs.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Changes in other areas also in this revision: Modified: stable/8/lib/libc/string/ffs.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/string/ffs.3 == --- stable/7/lib/libc/string/ffs.3 Fri May 6 17:51:00 2011 (r221537) +++ stable/7/lib/libc/string/ffs.3 Fri May 6 18:40:51 2011 (r221538) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 26, 2008 +.Dd May 3, 2011 .Dt FFS 3 .Os .Sh NAME @@ -50,8 +50,8 @@ .Ft int .Fn ffsl "long value" .Ft int -.Ft int .Fn ffsll "long long value" +.Ft int .Fn fls "int value" .Ft int .Fn flsl "long value" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221538 - in stable: 7/lib/libc/string 8/lib/libc/string
Author: delphij Date: Fri May 6 18:40:51 2011 New Revision: 221538 URL: http://svn.freebsd.org/changeset/base/221538 Log: MFC r221401: Fix prototype for ffsll(3) and fls(3). PR: docs/156796 Submitted by: Jean-Yves Migeon Modified: stable/8/lib/libc/string/ffs.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Changes in other areas also in this revision: Modified: stable/7/lib/libc/string/ffs.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/string/ffs.3 == --- stable/8/lib/libc/string/ffs.3 Fri May 6 17:51:00 2011 (r221537) +++ stable/8/lib/libc/string/ffs.3 Fri May 6 18:40:51 2011 (r221538) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd October 26, 2008 +.Dd May 3, 2011 .Dt FFS 3 .Os .Sh NAME @@ -50,8 +50,8 @@ .Ft int .Fn ffsl "long value" .Ft int -.Ft int .Fn ffsll "long long value" +.Ft int .Fn fls "int value" .Ft int .Fn flsl "long value" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221537 - head/sys/fs/nfsclient
Author: rmacklem Date: Fri May 6 17:51:00 2011 New Revision: 221537 URL: http://svn.freebsd.org/changeset/base/221537 Log: Set the initial value of maxfilesize to OFF_MAX in the new NFS client. It will then be reduced to whatever the server says it can support. There might be an argument that this could be one block larger, but since NFS is a byte granular system, I chose not to do that. Suggested by: Matt Dillon Tested by:Daniel Braniss (earlier version) MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c == --- head/sys/fs/nfsclient/nfs_clvfsops.cFri May 6 15:40:58 2011 (r221536) +++ head/sys/fs/nfsclient/nfs_clvfsops.cFri May 6 17:51:00 2011 (r221537) @@ -1224,7 +1224,7 @@ mountnfs(struct nfs_args *argp, struct m if ((argp->flags & (NFSMNT_NFSV3 | NFSMNT_NFSV4)) == 0) nmp->nm_maxfilesize = 0xLL; else - nmp->nm_maxfilesize = (u_int64_t)0x8000 * DEV_BSIZE - 1; + nmp->nm_maxfilesize = OFF_MAX; nmp->nm_timeo = NFS_TIMEO; nmp->nm_retry = NFS_RETRANS; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
> Pawel Jakub Dawidek writes: > > My personal opinion is that supporting such configuration is not > > worth > > the efforts and actually I'd prefer to use the same sysctl tree > > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would > > decide > > which to use by loading one kernel module or the other. > > Precisely what I was trying to say. > Well, if running the two clients concurrently isn't a requirement, how does this sound? - Get rid of the module building for the old client. (ie. delete sys/modules/nfsclient) That way there is only one client NFS module to load and there isn't any confusion over which one to load and when. --> then, if anyone wants/needs the old client, they would have to build a kernel with "options NFSCLIENT" specified. (This wouldn't really affect the diskless NFS root folks, since they have to compile a client into the kernel anyhow. If no client is compiled into the kernel, the new one would be loaded as a module. I kinda like this variation because: 1 - It's simple and I know how to do it. (I don't know how to handle things like kern_modload() calls inside the mount(2) syscall when there are 2 client modules both having fstype "nfs", etc and so forth.) 2 - It deprecates the old client, so anyone using it will know that they are and most won't switch to the old unless they really need to. The downside is that anyone wanting/needing to switch to the old client will have to recompile a kernel to do so. So, does this sound ok? rick ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
> > If you don't share my preference then it would be good to make new > NFS just 'nfs' everywhere (sysctls, fstype, etc.), so that we won't > end > up with 'newnfs' in random places in five years from now. What you do > with old NFS is less important to me:) > As you'll see from the post I just sent (about 5sec before this showed up in my box), I don't mind the idea of the two clients not being concurrently usable. (I did have that semi-hypothetical example, but I, personally, don't think it's likely. I had assumed that others would think this is "required", but if not, that's fine with me.) My problem is that I don't know how to deal with two modules with the same name. (Getting rid of the old one as a module and making people have to compile it into their kernel solves that.) If both still need to be loadable modules, I think I'm going to need some help w.r.t. how to make that work. (The mount syscall tries to load it. The /etc/rc.d/nfsclient script forces it to be loaded and who knows what else. If there are two of them, then???) rick ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
On Fri, May 06, 2011 at 07:54:25AM -0400, Rick Macklem wrote: > > On Thu, May 05, 2011 at 07:06:46PM -0400, Rick Macklem wrote: > > > Also, except for the SYSCTL() naming issue they don't comflict. At > > > the > > > moment it is perfectly ok to use both for mounts concurrently. > > > For example, you could have the following 2 lines in your > > > /etc/fstab: > > > > > > nfs-server:/sub1 /mnt nfs rw 0 0 > > > nfs-server:/sub2 /mnt2 oldnfs rw 0 0 > > > > > > I don't know why you would actually choose to do this, unless you > > > found > > > that the old NFS client did something that worked better for "/sub2" > > > for > > > your purposes, but it will work fine. > > > > My personal opinion is that supporting such configuration is not worth > > the efforts and actually I'd prefer to use the same sysctl tree > > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would > > decide > > which to use by loading one kernel module or the other. > > > Well, first off, I think there are problems if you have two modules > using the same "fstype" name. For example, the old mount syscall > which is still used by amd, does an unconditional > kern_kldload(.., "fstype",...); > > I'm not sure what happens when there are two modules both with the > same "fstype"? > > Also, there could be a script in /etc/rc.d that runs before any mount is > attempted (I don't know how to do this, but I assume rc@ will) and it > could load one or the other based on an rc.conf variable, but what > about doing a mount from single user? > > And I also don't know how to tell the system to allow kernels to be > built with one of NFSCLIENT, NFSCL, but not both of them? (It would > fail for both of them, since there would be 2 VFS_SET()s with the > same "fstype", I think?) > > I also think there might be situations where running both concurrently > could still be useful (that's the way things have been for 8.n). > Here's a not too hypothetical example: > - an 8.n system mounts 3 file servers > server1 - a FreeBSD server with NFSv4 enabled > server2 - Solaris8 > server3 - some Linux distro > and the /etc/fstab entries look like: > > server1:/vol1 /vol1 nfs rw,nfsv40 0 > server2:/vol2 /vol2 nfs rw 0 0 > server3:/vol3 /vol3 nfs rw 0 0 > > (The part w.r.t. server1 using NFSv4 isn't too hypothetical, since I > recently got email from a guy who is using NFSv4 on 8.2 because it > fixed a file locking problem for him. Related to openoffice, if I > recall correctly.) > > The above is using both NFS clients concurrently, although whoever > set it up might not realize that, since server1 using "newnfs" because > that's needed for NFSv4. > > Ok, now this system is upgraded to 9.0 and then /vol3 goes wonky. > If both clients can still run concurrently, /etc/fstab could be changed > to: > > server1:/vol1 /vol1 nfs rw,nfsv40 0 > server2:/vol2 /vol2 nfs rw 0 0 > server3:/vol3 /vol3 oldnfs rw0 0 > > to seee if the problem is caused by the switchover to the new NFS > client. If the wonkyness goes away, I have some work to do. If not, > I'm off the hook because something else is causing the wonkyness. > > If the two stacks can't run concurrently, the above change couldn't > be done, because "nfsv4" isn't supported by the old NFS client. > > In summary, at this point, changing the vfs.nfs.xxx to be shared > by the two clients is, to me, easier than trying to change things > so the two clients use the same "fstype" and can't run concurrently > and I also think there may be cases where running them concurrently > in 9.0 would be useful. If you don't share my preference then it would be good to make new NFS just 'nfs' everywhere (sysctls, fstype, etc.), so that we won't end up with 'newnfs' in random places in five years from now. What you do with old NFS is less important to me:) -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpBLcdbFNGSn.pgp Description: PGP signature
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
Pawel Jakub Dawidek writes: > My personal opinion is that supporting such configuration is not worth > the efforts and actually I'd prefer to use the same sysctl tree > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would decide > which to use by loading one kernel module or the other. Precisely what I was trying to say. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221536 - head/usr.sbin/makefs/cd9660
Author: nwhitehorn Date: Fri May 6 15:40:58 2011 New Revision: 221536 URL: http://svn.freebsd.org/changeset/base/221536 Log: Simplify this code somewhat by only writing a 512-byte-sector APM map. All firmwares can read it, we need to write one anyway for old OF versions, and if a 512-byte one is present, OS X ignores the 2048-byte one in favor of it. Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c == --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri May 6 15:33:56 2011(r221535) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri May 6 15:40:58 2011(r221536) @@ -528,25 +528,6 @@ cd9660_write_apm_partition_entry(FILE *f fseek(fd, 32 - strlen(part_name) - 1, SEEK_CUR); fwrite(part_type, strlen(part_type) + 1, 1, fd); - if (sector_size > 512) { - /* -* Some old broken software looks at 512-byte boundaries for -* partition table entries instead of sector boundaries. We -* can fit 3 entries into the first 2048-byte block, so use -* that to humor old code. -*/ - - int n_512_parts = (sector_size / 512) - 1; - if (n_512_parts > total_partitions) - n_512_parts = total_partitions; - - if (index < n_512_parts) - cd9660_write_apm_partition_entry(fd, index, n_512_parts, - sector_start * (sector_size / 512), - nsectors * (sector_size / 512), 512, part_name, - part_type); - } - return 0; } @@ -601,23 +582,30 @@ cd9660_write_boot(FILE *fd) fseek(fd, 0, SEEK_SET); apm16 = htons(0x4552); fwrite(&apm16, sizeof(apm16), 1, fd); - apm16 = htons(diskStructure.sectorSize); + /* Device block size */ + apm16 = htons(512); fwrite(&apm16, sizeof(apm16), 1, fd); - apm32 = htonl(diskStructure.totalSectors); + /* Device block count */ + apm32 = htonl(diskStructure.totalSectors * + (diskStructure.sectorSize / 512)); fwrite(&apm32, sizeof(apm32), 1, fd); + /* Device type/id */ + apm16 = htons(1); + fwrite(&apm16, sizeof(apm16), 1, fd); + fwrite(&apm16, sizeof(apm16), 1, fd); /* Count total needed entries */ total_parts = 2 + apm_partitions; /* Self + ISO9660 */ /* Write self-descriptor */ - cd9660_write_apm_partition_entry(fd, 0, - total_parts, 1, total_parts, diskStructure.sectorSize, - "Apple", "Apple_partition_map"); + cd9660_write_apm_partition_entry(fd, 0, total_parts, 1, + total_parts, 512, "Apple", "Apple_partition_map"); /* Write ISO9660 descriptor, enclosing the whole disk */ - cd9660_write_apm_partition_entry(fd, 1, - total_parts, 0, diskStructure.totalSectors, - diskStructure.sectorSize, "", "CD_ROM_Mode_1"); + cd9660_write_apm_partition_entry(fd, 1, total_parts, 0, + diskStructure.totalSectors * + (diskStructure.sectorSize / 512), 512, "ISO9660", + "CD_ROM_Mode_1"); /* Write all partition entries */ apm_partitions = 0; @@ -627,8 +615,9 @@ cd9660_write_boot(FILE *fd) cd9660_write_apm_partition_entry(fd, 2 + apm_partitions++, total_parts, - t->sector, t->num_sectors, diskStructure.sectorSize, - "CD Boot", "Apple_Bootstrap"); + t->sector * (diskStructure.sectorSize / 512), + t->num_sectors * (diskStructure.sectorSize / 512), + 512, "CD Boot", "Apple_Bootstrap"); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221535 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Fri May 6 15:33:56 2011 New Revision: 221535 URL: http://svn.freebsd.org/changeset/base/221535 Log: Add a function which enables or disables RX RIFS searching, and migrate the code which does this into it. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416.hFri May 6 15:31:27 2011 (r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.hFri May 6 15:33:56 2011 (r221535) @@ -199,6 +199,7 @@ extern HAL_STATUS ar5416GetCapability(st extern HAL_BOOL ar5416GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize); +extern HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, HAL_BOOL enable); extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri May 6 15:31:27 2011(r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri May 6 15:33:56 2011(r221535) @@ -368,6 +368,25 @@ typedef struct { uint8_t qcu_complete_state; } hal_mac_hang_check_t; +HAL_BOOL +ar5416SetRifsDelay(struct ath_hal *ah, HAL_BOOL enable) +{ + uint32_t val; + + /* Only support disabling RIFS delay for now */ + HALASSERT(enable == AH_FALSE); + + if (enable == AH_TRUE) + return AH_FALSE; + + /* Change RIFS init delay to 0 */ + val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS); + val &= ~AR_PHY_RIFS_INIT_DELAY; + OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); + + return AH_TRUE; +} + static HAL_BOOL ar5416CompareDbgHang(struct ath_hal *ah, const mac_dbg_regs_t *regs, const hal_mac_hang_check_t *check) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri May 6 15:31:27 2011(r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri May 6 15:33:56 2011(r221535) @@ -2520,11 +2520,8 @@ ar5416OverrideIni(struct ath_hal *ah, co * Disable RIFS search on some chips to avoid baseband * hang issues. */ - if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) { - val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS); - val &= ~AR_PHY_RIFS_INIT_DELAY; - OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); - } + if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) + (void) ar5416SetRifsDelay(ah, AH_FALSE); } struct ini { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221533 - head/contrib/one-true-awk
Author: ru Date: Fri May 6 14:21:46 2011 New Revision: 221533 URL: http://svn.freebsd.org/changeset/base/221533 Log: Update to a 6-May-2011 release (upstreamed some of our changes). Deleted: head/contrib/one-true-awk/proctab.c Modified: head/contrib/one-true-awk/FIXES head/contrib/one-true-awk/main.c Directory Properties: head/contrib/one-true-awk/ (props changed) Modified: head/contrib/one-true-awk/FIXES == --- head/contrib/one-true-awk/FIXES Fri May 6 14:11:20 2011 (r221532) +++ head/contrib/one-true-awk/FIXES Fri May 6 14:21:46 2011 (r221533) @@ -25,6 +25,11 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +May 6, 2011: + added #ifdef for isblank. + now allows -ffoo as well as -f foo arguments. + (thanks, ruslan) + May 1, 2011: after advice from todd miller, kevin lo, ruslan ermilov, and arnold robbins, changed srand() to return the previous Modified: head/contrib/one-true-awk/main.c == --- head/contrib/one-true-awk/main.cFri May 6 14:11:20 2011 (r221532) +++ head/contrib/one-true-awk/main.cFri May 6 14:21:46 2011 (r221533) @@ -25,7 +25,7 @@ THIS SOFTWARE. #include __FBSDID("$FreeBSD$"); -const char *version = "version 20110501 (FreeBSD)"; +const char *version = "version 20110506 (FreeBSD)"; #define DEBUG #include @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) safe = 1; break; case 'f': /* next argument is program filename */ - if (argv[1][2] != 0) { /* arg is -fsomething */ + if (argv[1][2] != 0) { /* arg is -fsomething */ if (npfile >= MAX_PFILE - 1) FATAL("too many -f options"); pfile[npfile++] = &argv[1][2]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221532 - stable/7/sys/kern
Author: fabient Date: Fri May 6 14:11:20 2011 New Revision: 221532 URL: http://svn.freebsd.org/changeset/base/221532 Log: MFC r220198: Clearing the flag when preempting will let the preempted thread run too much time. This can finish in a scheduler deadlock with ping-pong between two threads. One sample of this is: - device lapic (to have a preemption point on critical_exit()) - options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq) - running a cpu intensive task (that does not enter the kernel) - only one CPU on SMP or no SMP. As requested by jhb@ 4BSD have received the same type of fix instead of propagating the flag to the new thread. Modified: stable/7/sys/kern/sched_4bsd.c stable/7/sys/kern/sched_ule.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/sched_4bsd.c == --- stable/7/sys/kern/sched_4bsd.c Fri May 6 14:11:01 2011 (r221531) +++ stable/7/sys/kern/sched_4bsd.c Fri May 6 14:11:20 2011 (r221532) @@ -848,13 +848,9 @@ sched_switch(struct thread *td, struct t if ((p->p_flag & P_NOLOAD) == 0) sched_load_rem(); - if (newtd) { - MPASS(newtd->td_lock == &sched_lock); - newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED); - } - td->td_lastcpu = td->td_oncpu; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/7/sys/kern/sched_ule.c == --- stable/7/sys/kern/sched_ule.c Fri May 6 14:11:01 2011 (r221531) +++ stable/7/sys/kern/sched_ule.c Fri May 6 14:11:20 2011 (r221532) @@ -1879,7 +1879,8 @@ sched_switch(struct thread *td, struct t #endif td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; /* * The lock pointer in an idle thread should never change. Reset it ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221531 - vendor/one-true-awk/20110506
Author: ru Date: Fri May 6 14:11:01 2011 New Revision: 221531 URL: http://svn.freebsd.org/changeset/base/221531 Log: Tag a 20110506 release. Added: vendor/one-true-awk/20110506/ - copied from r221530, vendor/one-true-awk/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221530 - vendor/one-true-awk/dist
Author: ru Date: Fri May 6 14:08:24 2011 New Revision: 221530 URL: http://svn.freebsd.org/changeset/base/221530 Log: Vendor import of bwk's 6-May-2011 release. Modified: vendor/one-true-awk/dist/FIXES vendor/one-true-awk/dist/b.c vendor/one-true-awk/dist/main.c Modified: vendor/one-true-awk/dist/FIXES == --- vendor/one-true-awk/dist/FIXES Fri May 6 14:07:34 2011 (r221529) +++ vendor/one-true-awk/dist/FIXES Fri May 6 14:08:24 2011 (r221530) @@ -25,6 +25,11 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +May 6, 2011: + added #ifdef for isblank. + now allows -ffoo as well as -f foo arguments. + (thanks, ruslan) + May 1, 2011: after advice from todd miller, kevin lo, ruslan ermilov, and arnold robbins, changed srand() to return the previous Modified: vendor/one-true-awk/dist/b.c == --- vendor/one-true-awk/dist/b.cFri May 6 14:07:34 2011 (r221529) +++ vendor/one-true-awk/dist/b.cFri May 6 14:08:24 2011 (r221530) @@ -748,7 +748,11 @@ struct charclass { } charclasses[] = { { "alnum", 5, isalnum }, { "alpha", 5, isalpha }, +#ifndef HAS_ISBLANK { "blank", 5, isspace }, /* was isblank */ +#else + { "blank", 5, isblank }, +#endif { "cntrl", 5, iscntrl }, { "digit", 5, isdigit }, { "graph", 5, isgraph }, Modified: vendor/one-true-awk/dist/main.c == --- vendor/one-true-awk/dist/main.c Fri May 6 14:07:34 2011 (r221529) +++ vendor/one-true-awk/dist/main.c Fri May 6 14:08:24 2011 (r221530) @@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE THIS SOFTWARE. / -const char *version = "version 20110501"; +const char *version = "version 20110506"; #define DEBUG #include @@ -91,13 +91,18 @@ int main(int argc, char *argv[]) safe = 1; break; case 'f': /* next argument is program filename */ - argc--; - argv++; - if (argc <= 1) - FATAL("no program filename"); - if (npfile >= MAX_PFILE - 1) - FATAL("too many -f options"); - pfile[npfile++] = argv[1]; + if (argv[1][2] != 0) { /* arg is -fsomething */ + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = &argv[1][2]; + } else {/* arg is -f something */ + argc--; argv++; + if (argc <= 1) + FATAL("no program filename"); + if (npfile >= MAX_PFILE - 1) + FATAL("too many -f options"); + pfile[npfile++] = argv[1]; + } break; case 'F': /* set field separator */ if (argv[1][2] != 0) { /* arg is -Fsomething */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221529 - vendor/one-true-awk/dist
Author: ru Date: Fri May 6 14:07:34 2011 New Revision: 221529 URL: http://svn.freebsd.org/changeset/base/221529 Log: Don't track the generated file. Deleted: vendor/one-true-awk/dist/proctab.c ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221528 - stable/8/sys/kern
Author: fabient Date: Fri May 6 14:05:32 2011 New Revision: 221528 URL: http://svn.freebsd.org/changeset/base/221528 Log: MFC r220198: Clearing the flag when preempting will let the preempted thread run too much time. This can finish in a scheduler deadlock with ping-pong between two threads. One sample of this is: - device lapic (to have a preemption point on critical_exit()) - options DEVICE_POLLING with HZ>1499 (to have lapic freq = hardclock freq) - running a cpu intensive task (that does not enter the kernel) - only one CPU on SMP or no SMP. As requested by jhb@ 4BSD have received the same type of fix instead of propagating the flag to the new thread. Modified: stable/8/sys/kern/sched_4bsd.c stable/8/sys/kern/sched_ule.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/sched_4bsd.c == --- stable/8/sys/kern/sched_4bsd.c Fri May 6 13:51:54 2011 (r221527) +++ stable/8/sys/kern/sched_4bsd.c Fri May 6 14:05:32 2011 (r221528) @@ -944,13 +944,9 @@ sched_switch(struct thread *td, struct t if ((td->td_flags & TDF_NOLOAD) == 0) sched_load_rem(); - if (newtd) { - MPASS(newtd->td_lock == &sched_lock); - newtd->td_flags |= (td->td_flags & TDF_NEEDRESCHED); - } - td->td_lastcpu = td->td_oncpu; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/8/sys/kern/sched_ule.c == --- stable/8/sys/kern/sched_ule.c Fri May 6 13:51:54 2011 (r221527) +++ stable/8/sys/kern/sched_ule.c Fri May 6 14:05:32 2011 (r221528) @@ -1795,7 +1795,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - td->td_flags &= ~TDF_NEEDRESCHED; + if (!(flags & SW_PREEMPT)) + td->td_flags &= ~TDF_NEEDRESCHED; td->td_owepreempt = 0; tdq->tdq_switchcnt++; /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221527 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
Author: avg Date: Fri May 6 13:51:54 2011 New Revision: 221527 URL: http://svn.freebsd.org/changeset/base/221527 Log: prepare code that does topology detection for amd cpus for bulldozer This also introduces a new detection path for family 10h and newer pre-bulldozer cpus, pre-10h hardware should not be affected. Tested by:Gary Jennejohn (with pre-10h hardware) MFC after:2 weeks Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/specialreg.h head/sys/i386/i386/mp_machdep.c head/sys/i386/include/specialreg.h Modified: head/sys/amd64/amd64/mp_machdep.c == --- head/sys/amd64/amd64/mp_machdep.c Fri May 6 13:48:53 2011 (r221526) +++ head/sys/amd64/amd64/mp_machdep.c Fri May 6 13:51:54 2011 (r221527) @@ -176,11 +176,34 @@ mem_range_AP_init(void) static void topo_probe_amd(void) { + int core_id_bits; + int id; /* AMD processors do not support HTT. */ - cpu_cores = (amd_feature2 & AMDID2_CMP) != 0 ? - (cpu_procinfo2 & AMDID_CMP_CORES) + 1 : 1; cpu_logical = 1; + + if ((amd_feature2 & AMDID2_CMP) == 0) { + cpu_cores = 1; + return; + } + + core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >> + AMDID_COREID_SIZE_SHIFT; + if (core_id_bits == 0) { + cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; + return; + } + + /* Fam 10h and newer should get here. */ + for (id = 0; id <= MAX_APIC_ID; id++) { + /* Check logical CPU availability. */ + if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) + continue; + /* Check if logical CPU has the same package ID. */ + if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits)) + continue; + cpu_cores++; + } } /* Modified: head/sys/amd64/include/specialreg.h == --- head/sys/amd64/include/specialreg.h Fri May 6 13:48:53 2011 (r221526) +++ head/sys/amd64/include/specialreg.h Fri May 6 13:51:54 2011 (r221527) @@ -228,6 +228,8 @@ * AMD extended function 8000_0008h ecx info */ #defineAMDID_CMP_CORES 0x00ff +#defineAMDID_COREID_SIZE 0xf000 +#defineAMDID_COREID_SIZE_SHIFT 12 /* * CPUID manufacturers identifiers Modified: head/sys/i386/i386/mp_machdep.c == --- head/sys/i386/i386/mp_machdep.c Fri May 6 13:48:53 2011 (r221526) +++ head/sys/i386/i386/mp_machdep.c Fri May 6 13:51:54 2011 (r221527) @@ -224,11 +224,34 @@ mem_range_AP_init(void) static void topo_probe_amd(void) { + int core_id_bits; + int id; /* AMD processors do not support HTT. */ - cpu_cores = (amd_feature2 & AMDID2_CMP) != 0 ? - (cpu_procinfo2 & AMDID_CMP_CORES) + 1 : 1; cpu_logical = 1; + + if ((amd_feature2 & AMDID2_CMP) == 0) { + cpu_cores = 1; + return; + } + + core_id_bits = (cpu_procinfo2 & AMDID_COREID_SIZE) >> + AMDID_COREID_SIZE_SHIFT; + if (core_id_bits == 0) { + cpu_cores = (cpu_procinfo2 & AMDID_CMP_CORES) + 1; + return; + } + + /* Fam 10h and newer should get here. */ + for (id = 0; id <= MAX_APIC_ID; id++) { + /* Check logical CPU availability. */ + if (!cpu_info[id].cpu_present || cpu_info[id].cpu_disabled) + continue; + /* Check if logical CPU has the same package ID. */ + if ((id >> core_id_bits) != (boot_cpu_id >> core_id_bits)) + continue; + cpu_cores++; + } } /* Modified: head/sys/i386/include/specialreg.h == --- head/sys/i386/include/specialreg.h Fri May 6 13:48:53 2011 (r221526) +++ head/sys/i386/include/specialreg.h Fri May 6 13:51:54 2011 (r221527) @@ -227,6 +227,8 @@ * AMD extended function 8000_0008h ecx info */ #defineAMDID_CMP_CORES 0x00ff +#defineAMDID_COREID_SIZE 0xf000 +#defineAMDID_COREID_SIZE_SHIFT 12 /* * CPUID manufacturers identifiers ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221497 - head/release/ia64
On 05/06/11 00:21, Marcel Moolenaar wrote: On May 5, 2011, at 8:29 PM, Nathan Whitehorn wrote: On 05/05/11 16:18, Marcel Moolenaar wrote: On May 5, 2011, at 7:16 AM, Nathan Whitehorn wrote: @@ -84,15 +63,13 @@ if [ $bootable = yes ]; then mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi umount $MNT mdconfig -d -u $md -BOOTOPTS="-b $EFIPART -no-emul-boot" +BOOTOPTS="-b bootimage=i386;$EFIPART -o no-emul-boot" else BOOTOPTS="" fi Thanks! Can you explain what this particular change does or why it's done? I'm cleaning up the release-building code, and am switching them from mkisofs to makefs, which provides the same functionality. This started with some irritation with the cdrtools port and a bug in the HFS hybrid generation that was breaking PPC release CD generation. Switching these to depend on makefs in general speeds the release-building process and removes the number of dependencies involved, since makefs is built as part of base. Actually, I was just interested in the 'bootimage=i386' part of your change. I totally get why you're doing it :-) Ah, OK :) That just sets the El Torito system type to 0 (x86), which is what IA64 uses, as far as I can tell, and doesn't turn on any special magic like is done for the mac. I suppose while we're monkeying about with makefs, we could add an 'ia64' alias. -Nathan ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221526 - in head/sys: ia64/isa isa powerpc/mpc85xx sparc64/isa x86/isa
Author: jhb Date: Fri May 6 13:48:53 2011 New Revision: 221526 URL: http://svn.freebsd.org/changeset/base/221526 Log: Retire isa_setup_intr() and isa_teardown_intr() and use the generic bus versions instead. They were never needed as bus_generic_intr() and bus_teardown_intr() had been changed to pass the original child device up in 42734, but the ISA bus was not converted to new-bus until 45720. Modified: head/sys/ia64/isa/isa.c head/sys/isa/isa_common.c head/sys/isa/isa_common.h head/sys/powerpc/mpc85xx/isa.c head/sys/sparc64/isa/isa.c head/sys/x86/isa/isa.c Modified: head/sys/ia64/isa/isa.c == --- head/sys/ia64/isa/isa.c Fri May 6 13:24:10 2011(r221525) +++ head/sys/ia64/isa/isa.c Fri May 6 13:48:53 2011(r221526) @@ -135,25 +135,3 @@ isa_release_resource(device_t bus, devic struct resource_list *rl = &idev->id_resources; return resource_list_release(rl, bus, child, type, rid, r); } - -/* - * We can't use the bus_generic_* versions of these methods because those - * methods always pass the bus param as the requesting device, and we need - * to pass the child (the i386 nexus knows about this and is prepared to - * deal). - */ -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, - driver_filter_t filter, void (*ihand)(void *), void *arg, - void **cookiep) -{ - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, - void *cookie) -{ - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} Modified: head/sys/isa/isa_common.c == --- head/sys/isa/isa_common.c Fri May 6 13:24:10 2011(r221525) +++ head/sys/isa/isa_common.c Fri May 6 13:48:53 2011(r221526) @@ -1071,8 +1071,8 @@ static device_method_t isa_methods[] = { DEVMETHOD(bus_write_ivar, isa_write_ivar), DEVMETHOD(bus_child_detached, isa_child_detached), DEVMETHOD(bus_driver_added, isa_driver_added), - DEVMETHOD(bus_setup_intr, isa_setup_intr), - DEVMETHOD(bus_teardown_intr,isa_teardown_intr), + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr,bus_generic_teardown_intr), DEVMETHOD(bus_get_resource_list,isa_get_resource_list), DEVMETHOD(bus_alloc_resource, isa_alloc_resource), Modified: head/sys/isa/isa_common.h == --- head/sys/isa/isa_common.h Fri May 6 13:24:10 2011(r221525) +++ head/sys/isa/isa_common.h Fri May 6 13:48:53 2011(r221526) @@ -73,11 +73,5 @@ extern struct resource *isa_alloc_resour extern int isa_release_resource(device_t bus, device_t child, int type, int rid, struct resource *r); -extern int isa_setup_intr(device_t bus, device_t child, struct resource *r, -int flags, driver_filter_t *filter, void (*ihand)(void *), void *arg, -void **cookiep); -extern int isa_teardown_intr(device_t bus, device_t child, struct resource *r, -void *cookie); - extern driver_t isa_driver; extern devclass_t isa_devclass; Modified: head/sys/powerpc/mpc85xx/isa.c == --- head/sys/powerpc/mpc85xx/isa.c Fri May 6 13:24:10 2011 (r221525) +++ head/sys/powerpc/mpc85xx/isa.c Fri May 6 13:48:53 2011 (r221526) @@ -82,20 +82,3 @@ isa_release_resource(device_t bus, devic return (resource_list_release(rl, bus, child, type, rid, r)); } - -int -isa_setup_intr(device_t bus, device_t child, struct resource *r, int flags, -driver_filter_t filter, void (*ihand)(void *), void *arg, void **cookiep) -{ - - return (BUS_SETUP_INTR(device_get_parent(bus), child, r, flags, - filter, ihand, arg, cookiep)); -} - -int -isa_teardown_intr(device_t bus, device_t child, struct resource *r, -void *cookie) -{ - - return (BUS_TEARDOWN_INTR(device_get_parent(bus), child, r, cookie)); -} Modified: head/sys/sparc64/isa/isa.c == --- head/sys/sparc64/isa/isa.c Fri May 6 13:24:10 2011(r221525) +++ head/sys/sparc64/isa/isa.c Fri May 6 13:48:53 2011(r221526) @@ -359,26 +359,3 @@ isa_release_resource(device_t bus, devic return (bus_generic_rl_release_resource(bus, child, type, rid, res)); } - -int -isa_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, -driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) -{ - - /* -* Just pass through. This is going to be handled b
svn commit: r221525 - stable/8/sys/netipsec
Author: fabient Date: Fri May 6 13:24:10 2011 New Revision: 221525 URL: http://svn.freebsd.org/changeset/base/221525 Log: MFC r220206: Optimisation in IPSEC(4): - Remove contention on ISR during the crypto operation by using rwlock(9). - Remove a second lookup of the SA in the callback. Modified: stable/8/sys/netipsec/ipsec.h stable/8/sys/netipsec/key.c stable/8/sys/netipsec/key.h stable/8/sys/netipsec/xform.h stable/8/sys/netipsec/xform_ah.c stable/8/sys/netipsec/xform_esp.c stable/8/sys/netipsec/xform_ipcomp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netipsec/ipsec.h == --- stable/8/sys/netipsec/ipsec.h Fri May 6 13:12:45 2011 (r221524) +++ stable/8/sys/netipsec/ipsec.h Fri May 6 13:24:10 2011 (r221525) @@ -123,7 +123,7 @@ struct ipsecrequest { struct secasvar *sav; /* place holder of SA for use */ struct secpolicy *sp; /* back pointer to SP */ - struct mtx lock;/* to interlock updates */ + struct rwlock lock; /* to interlock updates */ }; /* @@ -132,11 +132,15 @@ struct ipsecrequest { * hard it is to remove this... */ #defineIPSECREQUEST_LOCK_INIT(_isr) \ - mtx_init(&(_isr)->lock, "ipsec request", NULL, MTX_DEF | MTX_RECURSE) -#defineIPSECREQUEST_LOCK(_isr) mtx_lock(&(_isr)->lock) -#defineIPSECREQUEST_UNLOCK(_isr) mtx_unlock(&(_isr)->lock) -#defineIPSECREQUEST_LOCK_DESTROY(_isr) mtx_destroy(&(_isr)->lock) -#defineIPSECREQUEST_LOCK_ASSERT(_isr) mtx_assert(&(_isr)->lock, MA_OWNED) + rw_init_flags(&(_isr)->lock, "ipsec request", RW_RECURSE) +#defineIPSECREQUEST_LOCK(_isr) rw_rlock(&(_isr)->lock) +#defineIPSECREQUEST_UNLOCK(_isr) rw_runlock(&(_isr)->lock) +#defineIPSECREQUEST_WLOCK(_isr)rw_wlock(&(_isr)->lock) +#defineIPSECREQUEST_WUNLOCK(_isr) rw_wunlock(&(_isr)->lock) +#defineIPSECREQUEST_UPGRADE(_isr) rw_try_upgrade(&(_isr)->lock) +#defineIPSECREQUEST_DOWNGRADE(_isr)rw_downgrade(&(_isr)->lock) +#defineIPSECREQUEST_LOCK_DESTROY(_isr) rw_destroy(&(_isr)->lock) +#defineIPSECREQUEST_LOCK_ASSERT(_isr) rw_assert(&(_isr)->lock, RA_LOCKED) /* security policy in PCB */ struct inpcbpolicy { Modified: stable/8/sys/netipsec/key.c == --- stable/8/sys/netipsec/key.c Fri May 6 13:12:45 2011(r221524) +++ stable/8/sys/netipsec/key.c Fri May 6 13:24:10 2011(r221525) @@ -809,6 +809,7 @@ key_checkrequest(struct ipsecrequest *is { u_int level; int error; + struct secasvar *sav; IPSEC_ASSERT(isr != NULL, ("null isr")); IPSEC_ASSERT(saidx != NULL, ("null saidx")); @@ -826,45 +827,31 @@ key_checkrequest(struct ipsecrequest *is /* get current level */ level = ipsec_get_reqlevel(isr); -#if 0 - /* -* We do allocate new SA only if the state of SA in the holder is -* SADB_SASTATE_DEAD. The SA for outbound must be the oldest. -*/ - if (isr->sav != NULL) { - if (isr->sav->sah == NULL) - panic("%s: sah is null.\n", __func__); - if (isr->sav == (struct secasvar *)LIST_FIRST( - &isr->sav->sah->savtree[SADB_SASTATE_DEAD])) { - KEY_FREESAV(&isr->sav); - isr->sav = NULL; - } - } -#else + /* -* we free any SA stashed in the IPsec request because a different +* We check new SA in the IPsec request because a different * SA may be involved each time this request is checked, either * because new SAs are being configured, or this request is * associated with an unconnected datagram socket, or this request * is associated with a system default policy. * -* The operation may have negative impact to performance. We may -* want to check cached SA carefully, rather than picking new SA -* every time. -*/ - if (isr->sav != NULL) { - KEY_FREESAV(&isr->sav); - isr->sav = NULL; - } -#endif - - /* -* new SA allocation if no SA found. * key_allocsa_policy should allocate the oldest SA available. * See key_do_allocsa_policy(), and draft-jenkins-ipsec-rekeying-03.txt. */ - if (isr->sav == NULL) - isr->sav = key_allocsa_policy(saidx); + sav = key_allocsa_policy(saidx); + if (sav != isr->sav) { + /* SA need to be u
svn commit: r221524 - stable/8/sys/netipsec
Author: fabient Date: Fri May 6 13:12:45 2011 New Revision: 221524 URL: http://svn.freebsd.org/changeset/base/221524 Log: MFC r220194: Fix two SA refcount: - AH does not release the SA like in ESP/IPCOMP when handling EAGAIN - ipsec_process_done incorrectly release the SA. Modified: stable/8/sys/netipsec/ipsec_output.c stable/8/sys/netipsec/xform_ah.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netipsec/ipsec_output.c == --- stable/8/sys/netipsec/ipsec_output.cFri May 6 13:11:50 2011 (r221523) +++ stable/8/sys/netipsec/ipsec_output.cFri May 6 13:12:45 2011 (r221524) @@ -247,7 +247,6 @@ ipsec_process_done(struct mbuf *m, struc panic("ipsec_process_done"); bad: m_freem(m); - KEY_FREESAV(&sav); return (error); } Modified: stable/8/sys/netipsec/xform_ah.c == --- stable/8/sys/netipsec/xform_ah.cFri May 6 13:11:50 2011 (r221523) +++ stable/8/sys/netipsec/xform_ah.cFri May 6 13:12:45 2011 (r221524) @@ -785,6 +785,7 @@ ah_input_cb(struct cryptop *crp) sav->tdb_cryptoid = crp->crp_sid; if (crp->crp_etype == EAGAIN) { + KEY_FREESAV(&sav); error = crypto_dispatch(crp); return error; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221523 - head/sys/fs/nfs
Author: mav Date: Fri May 6 13:11:50 2011 New Revision: 221523 URL: http://svn.freebsd.org/changeset/base/221523 Log: Increase NFS_TICKINTVL value from 10 to 500. Now that callout does useful things only once per second, so other 99 calls per second were useless and just don't allow idle system to sleep properly. Reviewed by: rmacklem Modified: head/sys/fs/nfs/nfs.h Modified: head/sys/fs/nfs/nfs.h == --- head/sys/fs/nfs/nfs.h Fri May 6 12:49:32 2011(r221522) +++ head/sys/fs/nfs/nfs.h Fri May 6 13:11:50 2011(r221523) @@ -39,7 +39,7 @@ */ #defineNFS_MAXIOVEC34 -#defineNFS_TICKINTVL 10 /* Desired time for a tick (msec) */ +#defineNFS_TICKINTVL 500 /* Desired time for a tick (msec) */ #defineNFS_HZ (hz / nfscl_ticks) /* Ticks/sec */ #defineNFS_TIMEO (1 * NFS_HZ)/* Default timeout = 1 second */ #defineNFS_MINTIMEO(1 * NFS_HZ)/* Min timeout to use */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r221522 - in stable/8: bin/sh tools/regression/bin/sh/expansion
Author: jilles Date: Fri May 6 12:49:32 2011 New Revision: 221522 URL: http://svn.freebsd.org/changeset/base/221522 Log: MFC r220903: sh: Do not word split "${#parameter}". This is only a problem if IFS contains digits, which is unusual but valid. Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated as ${#parameter}. The underlying problem was that "${#parameter}" erroneously added CTLESC bytes before determining the length. This was properly fixed for PR bin/56147 but the incorrect fix was not backed out. Reported by: Seeker on forums.freebsd.org Added: stable/8/tools/regression/bin/sh/expansion/length6.0 - copied unchanged from r220903, head/tools/regression/bin/sh/expansion/length6.0 Modified: stable/8/bin/sh/parser.c Directory Properties: stable/8/bin/sh/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) Modified: stable/8/bin/sh/parser.c == --- stable/8/bin/sh/parser.cFri May 6 07:13:34 2011(r221521) +++ stable/8/bin/sh/parser.cFri May 6 12:49:32 2011(r221522) @@ -1289,7 +1289,7 @@ parsesub: { pungetc(); } STPUTC('=', out); - if (subtype != VSLENGTH && (dblquote || arinest)) + if (dblquote || arinest) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; if (subtype != VSNORMAL) Copied: stable/8/tools/regression/bin/sh/expansion/length6.0 (from r220903, head/tools/regression/bin/sh/expansion/length6.0) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/regression/bin/sh/expansion/length6.0Fri May 6 12:49:32 2011(r221522, copy of r220903, head/tools/regression/bin/sh/expansion/length6.0) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +x='!@#$%^&*()[]' +[ ${#x} = 12 ] || echo bad 1 +[ "${#x}" = 12 ] || echo bad 2 +IFS=2 +[ ${#x} = 1 ] || echo bad 3 +[ "${#x}" = 12 ] || echo bad 4 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
> On Thu, May 05, 2011 at 07:06:46PM -0400, Rick Macklem wrote: > > Also, except for the SYSCTL() naming issue they don't comflict. At > > the > > moment it is perfectly ok to use both for mounts concurrently. > > For example, you could have the following 2 lines in your > > /etc/fstab: > > > > nfs-server:/sub1 /mnt nfs rw 0 0 > > nfs-server:/sub2 /mnt2 oldnfs rw 0 0 > > > > I don't know why you would actually choose to do this, unless you > > found > > that the old NFS client did something that worked better for "/sub2" > > for > > your purposes, but it will work fine. > > My personal opinion is that supporting such configuration is not worth > the efforts and actually I'd prefer to use the same sysctl tree > (vfs.nfs.*) and the same fstype (nfs) in both clients. User would > decide > which to use by loading one kernel module or the other. > Well, first off, I think there are problems if you have two modules using the same "fstype" name. For example, the old mount syscall which is still used by amd, does an unconditional kern_kldload(.., "fstype",...); I'm not sure what happens when there are two modules both with the same "fstype"? Also, there could be a script in /etc/rc.d that runs before any mount is attempted (I don't know how to do this, but I assume rc@ will) and it could load one or the other based on an rc.conf variable, but what about doing a mount from single user? And I also don't know how to tell the system to allow kernels to be built with one of NFSCLIENT, NFSCL, but not both of them? (It would fail for both of them, since there would be 2 VFS_SET()s with the same "fstype", I think?) I also think there might be situations where running both concurrently could still be useful (that's the way things have been for 8.n). Here's a not too hypothetical example: - an 8.n system mounts 3 file servers server1 - a FreeBSD server with NFSv4 enabled server2 - Solaris8 server3 - some Linux distro and the /etc/fstab entries look like: server1:/vol1 /vol1 nfs rw,nfsv40 0 server2:/vol2 /vol2 nfs rw 0 0 server3:/vol3 /vol3 nfs rw 0 0 (The part w.r.t. server1 using NFSv4 isn't too hypothetical, since I recently got email from a guy who is using NFSv4 on 8.2 because it fixed a file locking problem for him. Related to openoffice, if I recall correctly.) The above is using both NFS clients concurrently, although whoever set it up might not realize that, since server1 using "newnfs" because that's needed for NFSv4. Ok, now this system is upgraded to 9.0 and then /vol3 goes wonky. If both clients can still run concurrently, /etc/fstab could be changed to: server1:/vol1 /vol1 nfs rw,nfsv40 0 server2:/vol2 /vol2 nfs rw 0 0 server3:/vol3 /vol3 oldnfs rw0 0 to seee if the problem is caused by the switchover to the new NFS client. If the wonkyness goes away, I have some work to do. If not, I'm off the hook because something else is causing the wonkyness. If the two stacks can't run concurrently, the above change couldn't be done, because "nfsv4" isn't supported by the old NFS client. In summary, at this point, changing the vfs.nfs.xxx to be shared by the two clients is, to me, easier than trying to change things so the two clients use the same "fstype" and can't run concurrently and I also think there may be cases where running them concurrently in 9.0 would be useful. rick ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r221502 - in head: lib/libutil sys/sys
On Thu, 5 May 2011, David E. O'Brien wrote: Log: Don't duplicate define the stdint types. This is a regression. The [_]stdint.h files were correctly structured before. The stdint types weren't duplicate-defined (modulo bugs), but their definitions were repeated as necessary inside ifdfs. Using an omnibus header like sys/_stdint.h gives uncontrollable namespace pollution. head/sys/sys/_stdint.h - copied, changed from r221139, head/sys/sys/stdint.h sys/_stdint.h was intentionally left out, since it can only be used to increase namespace pollution (unlike machine/_stdint.h, which exists to avoid namespace pollution). Modified: head/lib/libutil/libutil.h == --- head/lib/libutil/libutil.h Thu May 5 14:43:35 2011(r221501) +++ head/lib/libutil/libutil.h Thu May 5 14:45:24 2011(r221502) @@ -41,22 +41,13 @@ #include #include +#include This also unsorts the includes. #ifndef _GID_T_DECLARED typedef __gid_t gid_t; #define _GID_T_DECLARED #endif -#ifndef _INT64_T_DECLARED -typedef__int64_t int64_t; -#define_INT64_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef__uint64_t uint64_t; -#define_UINT64_T_DECLARED -#endif - It used to define only 2 application types from . Hopefully precisely the ones that it used. Now it defines all the application types defined in , and it can't control pollution bloat if the latter is expanded. #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED Copied and modified: head/sys/sys/_stdint.h (from r221139, head/sys/sys/stdint.h) == --- head/sys/sys/stdint.h Wed Apr 27 20:42:30 2011(r221139, copy source) +++ head/sys/sys/_stdint.h Thu May 5 14:45:24 2011(r221502) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2011 David E. O'Brien * Copyright (c) 2001 Mike Barcroft * All rights reserved. * @@ -26,13 +27,8 @@ * $FreeBSD$ */ -#ifndef _SYS_STDINT_H_ -#define _SYS_STDINT_H_ - -#include -#include - -#include +#ifndef _SYS__STDINT_H_ +#define _SYS__STDINT_H_ #ifndef _INT8_T_DECLARED typedef __int8_tint8_t; @@ -74,33 +70,13 @@ typedef __uint64_t uint64_t; #define _UINT64_T_DECLARED #endif -typedef__int_least8_t int_least8_t; -typedef__int_least16_t int_least16_t; -typedef__int_least32_t int_least32_t; -typedef__int_least64_t int_least64_t; - -typedef__uint_least8_t uint_least8_t; -typedef__uint_least16_tuint_least16_t; -typedef__uint_least32_tuint_least32_t; -typedef__uint_least64_tuint_least64_t; - -typedef__int_fast8_t int_fast8_t; -typedef__int_fast16_t int_fast16_t; -typedef__int_fast32_t int_fast32_t; -typedef__int_fast64_t int_fast64_t; - -typedef__uint_fast8_t uint_fast8_t; -typedef__uint_fast16_t uint_fast16_t; -typedef__uint_fast32_t uint_fast32_t; -typedef__uint_fast64_t uint_fast64_t; - -typedef__intmax_t intmax_t; -typedef__uintmax_t uintmax_t; - #ifndef _INTPTR_T_DECLARED typedef __intptr_t intptr_t; -typedef__uintptr_t uintptr_t; #define _INTPTR_T_DECLARED #endif +#ifndef _UINTPTR_T_DECLARED +typedef__uintptr_t uintptr_t; +#define_UINTPTR_T_DECLARED +#endif -#endif /* !_SYS_STDINT_H_ */ +#endif /* !_SYS__STDINT_H_ */ Modified: head/sys/sys/stdint.h == --- head/sys/sys/stdint.h Thu May 5 14:43:35 2011(r221501) +++ head/sys/sys/stdint.h Thu May 5 14:45:24 2011(r221502) @@ -33,46 +33,7 @@ #include #include - -#ifndef _INT8_T_DECLARED -typedef__int8_tint8_t; -#define_INT8_T_DECLARED -#endif - -#ifndef _INT16_T_DECLARED -typedef__int16_t int16_t; -#define_INT16_T_DECLARED -#endif - -#ifndef _INT32_T_DECLARED -typedef__int32_t int32_t; -#define_INT32_T_DECLARED -#endif - -#ifndef _INT64_T_DECLARED -typedef__int64_t int64_t; -#define_INT64_T_DECLARED -#endif - -#ifndef _UINT8_T_DECLARED -typedef__uint8_t uint8_t; -#define_UINT8_T_DECLARED -#endif - -#ifndef _UINT16_T_DECLARED -typedef__uint16_t uint16_t; -#define_UINT16_T_DECLARED -#endif - -#ifndef _UINT32_T_DECLARED -typedef__uint32_t uint32_t; -#define_UINT32_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef__uint64_t uint64_t; -#define_UINT64_T_DECLARED -#endif +#include t
Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf
On Thu, May 05, 2011 at 07:06:46PM -0400, Rick Macklem wrote: > Also, except for the SYSCTL() naming issue they don't comflict. At the > moment it is perfectly ok to use both for mounts concurrently. > For example, you could have the following 2 lines in your /etc/fstab: > > nfs-server:/sub1/mntnfsrw 00 > nfs-server:/sub2/mnt2 oldnfs rw 00 > > I don't know why you would actually choose to do this, unless you found > that the old NFS client did something that worked better for "/sub2" for > your purposes, but it will work fine. My personal opinion is that supporting such configuration is not worth the efforts and actually I'd prefer to use the same sysctl tree (vfs.nfs.*) and the same fstype (nfs) in both clients. User would decide which to use by loading one kernel module or the other. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpvKMQMMwzuD.pgp Description: PGP signature
svn commit: r221521 - head/sys/netinet/ipfw
Author: ae Date: Fri May 6 07:13:34 2011 New Revision: 221521 URL: http://svn.freebsd.org/changeset/base/221521 Log: Convert delay parameter back to ms when reporting to user. PR: 156838 MFC after:1 week Modified: head/sys/netinet/ipfw/ip_dn_glue.c head/sys/netinet/ipfw/ip_dummynet.c Modified: head/sys/netinet/ipfw/ip_dn_glue.c == --- head/sys/netinet/ipfw/ip_dn_glue.c Fri May 6 03:44:49 2011 (r221520) +++ head/sys/netinet/ipfw/ip_dn_glue.c Fri May 6 07:13:34 2011 (r221521) @@ -624,7 +624,7 @@ dn_c_copy_pipe(struct dn_schk *s, struct /* These 4 field are the same in pipe7 and pipe8 */ pipe7->next.sle_next = (struct dn_pipe7 *)DN_IS_PIPE; pipe7->bandwidth = l->bandwidth; - pipe7->delay = l->delay; + pipe7->delay = l->delay * 1000 / hz; pipe7->pipe_nr = l->link_nr - DN_MAX_ID; if (!is7) { Modified: head/sys/netinet/ipfw/ip_dummynet.c == --- head/sys/netinet/ipfw/ip_dummynet.c Fri May 6 03:44:49 2011 (r221520) +++ head/sys/netinet/ipfw/ip_dummynet.c Fri May 6 07:13:34 2011 (r221521) @@ -808,6 +808,7 @@ copy_obj(char **start, char *end, void * /* Adjust burst parameter for link */ struct dn_link *l = (struct dn_link *)*start; l->burst = div64(l->burst, 8 * hz); + l->delay = l->delay * 1000 / hz; } else if (o->type == DN_SCH) { /* Set id->id to the number of instances */ struct dn_schk *s = _o; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"