svn commit: r222276 - in head/sys/dev/ath/ath_hal: . ar5416 ar9001 ar9002
Author: adrian Date: Wed May 25 07:19:19 2011 New Revision: 76 URL: http://svn.freebsd.org/changeset/base/76 Log: Tidy up the ANI API in preparation for looking to expose some more of the ANI statistics and committing some tools which use these. * Change HAL_ANI_* commands _back_ to be numerical, rather than a bitmap; * modify access to the ANI control bitmap to convert a command to a bitmap; * Fix the ANI noise immunity fiddling for CCK errors - it wasn't checking whether noise immunity was disabled or not. Modified: head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 04:46:48 2011 (r75) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 07:19:19 2011 (r76) @@ -418,16 +418,21 @@ externHAL_BOOL ath_hal_setTxQProps(stru extern HAL_BOOL ath_hal_getTxQProps(struct ath_hal *ah, HAL_TXQ_INFO *qInfo, const HAL_TX_QUEUE_INFO *qi); +/* + * Internal HAL ANI commands. + * + * These values represent the ANI commands passed to the ANI Control method + * for AR5212, AR5416 and later chipsets. + */ typedef enum { - HAL_ANI_PRESENT = 0x1, /* is ANI support present */ - HAL_ANI_NOISE_IMMUNITY_LEVEL = 0x2, /* set level */ - HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 0x4, /* enable/disable */ - HAL_ANI_CCK_WEAK_SIGNAL_THR = 0x8, /* enable/disable */ - HAL_ANI_FIRSTEP_LEVEL = 0x10, /* set level */ - HAL_ANI_SPUR_IMMUNITY_LEVEL = 0x20, /* set level */ - HAL_ANI_MODE = 0x40,/* 0 = manual, 1 = auto (XXX do not change) */ - HAL_ANI_PHYERR_RESET =0x80, /* reset phy error stats */ - HAL_ANI_ALL = 0xff + HAL_ANI_PRESENT = 0,/* is ANI support present */ + HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */ + HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */ + HAL_ANI_CCK_WEAK_SIGNAL_THR = 3,/* enable/disable */ + HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */ + HAL_ANI_SPUR_IMMUNITY_LEVEL = 5,/* set level */ + HAL_ANI_MODE = 6, /* 0 = manual, 1 = auto (XXX do not change) */ + HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ } HAL_ANI_CMD; #defineHAL_SPUR_VAL_MASK 0x3FFF Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cWed May 25 04:46:48 2011(r75) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cWed May 25 07:19:19 2011(r76) @@ -175,9 +175,17 @@ ar5416AniControl(struct ath_hal *ah, HAL struct ar5212AniState *aniState = ahp-ah_curani; const struct ar5212AniParams *params = aniState-params; + /* Check whether the particular function is enabled */ + if (((1 cmd) AH5416(ah)-ah_ani_function) == 0) { + HALDEBUG(ah, HAL_DEBUG_ANI, %s: command %d disabled\n, + __func__, cmd); + HALDEBUG(ah, HAL_DEBUG_ANI, %s: cmd %d; mask %x\n, __func__, cmd, AH5416(ah)-ah_ani_function); + return AH_FALSE; + } + OS_MARK(ah, AH_MARK_ANI_CONTROL, cmd); - switch (cmd AH5416(ah)-ah_ani_function) { + switch (cmd) { case HAL_ANI_NOISE_IMMUNITY_LEVEL: { u_int level = param; @@ -356,14 +364,14 @@ ar5416AniOfdmErrTrigger(struct ath_hal * aniState = ahp-ah_curani; params = aniState-params; /* First, raise noise immunity level, up to max */ - if ((AH5416(ah)-ah_ani_function HAL_ANI_NOISE_IMMUNITY_LEVEL) + if ((AH5416(ah)-ah_ani_function (1 HAL_ANI_NOISE_IMMUNITY_LEVEL)) (aniState-noiseImmunityLevel+1 params-maxNoiseImmunityLevel)) { ar5416AniControl(ah, HAL_ANI_NOISE_IMMUNITY_LEVEL, aniState-noiseImmunityLevel + 1); return; } /* then, raise spur immunity level, up to max */ - if ((AH5416(ah)-ah_ani_function HAL_ANI_SPUR_IMMUNITY_LEVEL) + if ((AH5416(ah)-ah_ani_function (1 HAL_ANI_SPUR_IMMUNITY_LEVEL)) (aniState-spurImmunityLevel+1 params-maxSpurImmunityLevel)) { ar5416AniControl(ah, HAL_ANI_SPUR_IMMUNITY_LEVEL, aniState-spurImmunityLevel + 1); @@ -443,7 +451,8 @@ ar5416AniCckErrTrigger(struct ath_hal *a /*
svn commit: r222277 - in head/sys/dev/ath: . ath_hal ath_hal/ar5212
Author: adrian Date: Wed May 25 07:34:49 2011 New Revision: 77 URL: http://svn.freebsd.org/changeset/base/77 Log: The current ANI capability information uses a different set of values for the commands, compared to the internal command values (HAL_ANI_CMD.) My eventual aim is to make the HAL_ANI_CMD internal enum match the public API and then remove all this messiness. This now allows HAL_CAP_INTMIT users to use a public HAL_CAP_INTMIT_ enum rather than magic constants. The only magic constants currently used by if_ath are enable and present. Some local tools of mine allow for direct, manual fiddling of the ANI variables and I'll convert these to use the public enum API before I commit them. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_internal.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Wed May 25 07:19:19 2011 (r76) +++ head/sys/dev/ath/ath_hal/ah.h Wed May 25 07:34:49 2011 (r77) @@ -669,6 +669,41 @@ typedef struct { } HAL_CHANNEL_SURVEY; /* + * ANI commands. + * + * These are used both internally and externally via the diagnostic + * API. + * + * Note that this is NOT the ANI commands being used via the INTMIT + * capability - that has a different mapping for some reason. + */ +typedef enum { + HAL_ANI_PRESENT = 0,/* is ANI support present */ + HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */ + HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */ + HAL_ANI_CCK_WEAK_SIGNAL_THR = 3,/* enable/disable */ + HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */ + HAL_ANI_SPUR_IMMUNITY_LEVEL = 5,/* set level */ + HAL_ANI_MODE = 6, /* 0 = manual, 1 = auto (XXX do not change) */ + HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ +} HAL_ANI_CMD; + +/* + * This is the layout of the ANI INTMIT capability. + * + * Notice that the command values differ to HAL_ANI_CMD. + */ +typedef enum { + HAL_CAP_INTMIT_PRESENT = 0, + HAL_CAP_INTMIT_ENABLE = 1, + HAL_CAP_INTMIT_NOISE_IMMUNITY_LEVEL = 2, + HAL_CAP_INTMIT_OFDM_WEAK_SIGNAL_LEVEL = 3, + HAL_CAP_INTMIT_CCK_WEAK_SIGNAL_THR = 4, + HAL_CAP_INTMIT_FIRSTEP_LEVEL = 5, + HAL_CAP_INTMIT_SPUR_IMMUNITY_LEVEL = 6 +} HAL_CAP_INTMIT_CMD; + +/* * Hardware Access Layer (HAL) API. * * Clients of the HAL call ath_hal_attach to obtain a reference to an Modified: head/sys/dev/ath/ath_hal/ah_internal.h == --- head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 07:19:19 2011 (r76) +++ head/sys/dev/ath/ath_hal/ah_internal.h Wed May 25 07:34:49 2011 (r77) @@ -418,23 +418,6 @@ extern HAL_BOOL ath_hal_setTxQProps(stru extern HAL_BOOL ath_hal_getTxQProps(struct ath_hal *ah, HAL_TXQ_INFO *qInfo, const HAL_TX_QUEUE_INFO *qi); -/* - * Internal HAL ANI commands. - * - * These values represent the ANI commands passed to the ANI Control method - * for AR5212, AR5416 and later chipsets. - */ -typedef enum { - HAL_ANI_PRESENT = 0,/* is ANI support present */ - HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */ - HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */ - HAL_ANI_CCK_WEAK_SIGNAL_THR = 3,/* enable/disable */ - HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */ - HAL_ANI_SPUR_IMMUNITY_LEVEL = 5,/* set level */ - HAL_ANI_MODE = 6, /* 0 = manual, 1 = auto (XXX do not change) */ - HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */ -} HAL_ANI_CMD; - #defineHAL_SPUR_VAL_MASK 0x3FFF #defineHAL_SPUR_CHAN_WIDTH 87 #defineHAL_BIN_WIDTH_BASE_100HZ3125 Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed May 25 07:19:19 2011(r76) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed May 25 07:34:49 2011(r77) @@ -880,16 +880,16 @@ ar5212GetCapability(struct ath_hal *ah, return HAL_OK; case HAL_CAP_INTMIT:/* interference mitigation */ switch (capability) { - case 0: /* hardware capability */ + case HAL_CAP_INTMIT_PRESENT:/* hardware capability */ return HAL_OK; - case 1: + case HAL_CAP_INTMIT_ENABLE: return (ahp-ah_procPhyErr HAL_ANI_ENA) ?
svn commit: r222278 - head/share/man/man7
Author: bcr (doc committer) Date: Wed May 25 08:42:01 2011 New Revision: 78 URL: http://svn.freebsd.org/changeset/base/78 Log: Add a description to the checksum target about not only being able to verify, but also having the ability to fetch distfiles that are missing or failed the checksum calculation PR: docs/138887 Submitted by: Radim Kolar (hsn at sendmail dot cz) MFC after:5 days Modified: head/share/man/man7/ports.7 Modified: head/share/man/man7/ports.7 == --- head/share/man/man7/ports.7 Wed May 25 07:34:49 2011(r77) +++ head/share/man/man7/ports.7 Wed May 25 08:42:01 2011(r78) @@ -25,7 +25,7 @@ .\ .\ $FreeBSD$ .\ -.Dd February 14, 2009 +.Dd May 25, 2011 .Dt PORTS 7 .Os .Sh NAME @@ -124,6 +124,8 @@ and .It Cm checksum Verify that the fetched distfile's checksum matches the one the port was tested against. +If the distfile's checksum does not match, it also fetches the distfiles +which are missing or failed the checksum calculation. Defining .Va NO_CHECKSUM will skip this step. ___ 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: r222279 - head/sys/geom/part
Author: ae Date: Wed May 25 09:32:19 2011 New Revision: 79 URL: http://svn.freebsd.org/changeset/base/79 Log: Do not truncate available disk space to the closest track boundary. Modified: head/sys/geom/part/g_part_mbr.c Modified: head/sys/geom/part/g_part_mbr.c == --- head/sys/geom/part/g_part_mbr.c Wed May 25 08:42:01 2011 (r78) +++ head/sys/geom/part/g_part_mbr.c Wed May 25 09:32:19 2011 (r79) @@ -253,15 +253,14 @@ g_part_mbr_create(struct g_part_table *b { struct g_provider *pp; struct g_part_mbr_table *table; - uint32_t msize; pp = gpp-gpp_provider; if (pp-sectorsize MBRSIZE) return (ENOSPC); - msize = MIN(pp-mediasize / pp-sectorsize, UINT32_MAX); basetable-gpt_first = basetable-gpt_sectors; - basetable-gpt_last = msize - (msize % basetable-gpt_sectors) - 1; + basetable-gpt_last = MIN(pp-mediasize / pp-sectorsize, + UINT32_MAX) - 1; table = (struct g_part_mbr_table *)basetable; le16enc(table-mbr + DOSMAGICOFFSET, DOSMAGIC); @@ -470,7 +469,7 @@ g_part_mbr_read(struct g_part_table *bas basetable-gpt_entries = NDOSPART; basetable-gpt_first = basetable-gpt_sectors; - basetable-gpt_last = msize - (msize % basetable-gpt_sectors) - 1; + basetable-gpt_last = msize - 1; g_free(buf); 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: r222280 - head/sys/geom/part
Author: ae Date: Wed May 25 09:38:12 2011 New Revision: 80 URL: http://svn.freebsd.org/changeset/base/80 Log: Do not truncate available disk space to the closest track boundary. Modified: head/sys/geom/part/g_part_ebr.c Modified: head/sys/geom/part/g_part_ebr.c == --- head/sys/geom/part/g_part_ebr.c Wed May 25 09:32:19 2011 (r79) +++ head/sys/geom/part/g_part_ebr.c Wed May 25 09:38:12 2011 (r80) @@ -289,7 +289,6 @@ g_part_ebr_create(struct g_part_table *b return (ENXIO); msize = MIN(pp-mediasize / pp-sectorsize, UINT32_MAX); - msize -= msize % basetable-gpt_sectors; basetable-gpt_first = 0; basetable-gpt_last = msize - 1; basetable-gpt_entries = msize / basetable-gpt_sectors; @@ -523,7 +522,7 @@ g_part_ebr_read(struct g_part_table *bas basetable-gpt_entries = msize / basetable-gpt_sectors; basetable-gpt_first = 0; - basetable-gpt_last = msize - (msize % basetable-gpt_sectors) - 1; + basetable-gpt_last = msize - 1; 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: r222281 - head/sys/geom/part
Author: ae Date: Wed May 25 09:45:13 2011 New Revision: 81 URL: http://svn.freebsd.org/changeset/base/81 Log: Do not truncate available disk space to the closest track boundary. Modified: head/sys/geom/part/g_part_pc98.c Modified: head/sys/geom/part/g_part_pc98.c == --- head/sys/geom/part/g_part_pc98.cWed May 25 09:38:12 2011 (r80) +++ head/sys/geom/part/g_part_pc98.cWed May 25 09:45:13 2011 (r81) @@ -248,7 +248,6 @@ g_part_pc98_create(struct g_part_table * { struct g_provider *pp; struct g_part_pc98_table *table; - uint32_t cyl, msize; pp = gpp-gpp_provider; if (pp-sectorsize SECSIZE || pp-mediasize BOOTSIZE) @@ -256,11 +255,8 @@ g_part_pc98_create(struct g_part_table * if (pp-sectorsize SECSIZE) return (ENXIO); - cyl = basetable-gpt_heads * basetable-gpt_sectors; - - msize = MIN(pp-mediasize / SECSIZE, UINT32_MAX); - basetable-gpt_first = cyl; - basetable-gpt_last = msize - (msize % cyl) - 1; + basetable-gpt_first = basetable-gpt_heads * basetable-gpt_sectors; + basetable-gpt_last = MIN(pp-mediasize / SECSIZE, UINT32_MAX) - 1; table = (struct g_part_pc98_table *)basetable; le16enc(table-boot + DOSMAGICOFFSET, DOSMAGIC); @@ -488,7 +484,7 @@ g_part_pc98_read(struct g_part_table *ba basetable-gpt_entries = NDOSPART; basetable-gpt_first = cyl; - basetable-gpt_last = msize - (msize % cyl) - 1; + basetable-gpt_last = msize - 1; g_free(buf); 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: r222282 - in head/sys: amd64/conf i386/conf
Author: kevlo Date: Wed May 25 10:04:13 2011 New Revision: 82 URL: http://svn.freebsd.org/changeset/base/82 Log: Bring back r75. runfw(4) will statically link in rt2870.fw.uu to the kernel, though I have MODULES_OVERRIDE= in GENERIC. Spotted by: thompsa Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Wed May 25 09:45:13 2011(r81) +++ head/sys/amd64/conf/GENERIC Wed May 25 10:04:13 2011(r82) @@ -324,7 +324,6 @@ device udav# Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs device run # Ralink Technology RT2700/RT2800/RT3000 NICs. -device runfw # Ralink Technology RT2700/RT2800/RT3000 NICs firmware device uath# Atheros AR5523 wireless NICs device upgt# Conexant/Intersil PrismGT wireless NICs. device ural# Ralink Technology RT2500USB wireless NICs Modified: head/sys/i386/conf/GENERIC == --- head/sys/i386/conf/GENERIC Wed May 25 09:45:13 2011(r81) +++ head/sys/i386/conf/GENERIC Wed May 25 10:04:13 2011(r82) @@ -337,7 +337,6 @@ device udav# Davicom DM9601E USB # USB Wireless device rum # Ralink Technology RT2501USB wireless NICs device run # Ralink Technology RT2700/RT2800/RT3000 NICs. -device runfw # Ralink Technology RT2700/RT2800/RT3000 NICs firmware device uath# Atheros AR5523 wireless NICs device upgt# Conexant/Intersil PrismGT wireless NICs. device ural# Ralink Technology RT2500USB wireless NICs ___ 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: r222274 - stable/8/sys/kern
MFC to 7-STABLE? On 5/25/11, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 74 URL: http://svn.freebsd.org/changeset/base/74 Log: MFC r222086: The protection against the race with dev_rel(), introduced in r163328, should be extended to cover destroy_devl() calls for the children of the destroyed dev. Modified: stable/8/sys/kern/kern_conf.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/kern_conf.c == --- stable/8/sys/kern/kern_conf.c Wed May 25 01:04:12 2011 (r73) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r74) @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev-si_flags = ~SI_NAMED; + dev-si_refcount++; /* Avoid race with dev_rel() */ + /* If we are a child, remove us from the parents list */ if (dev-si_flags SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev) dev-si_flags = ~SI_CLONELIST; } - dev-si_refcount++; /* Avoid race with dev_rel() */ csw = dev-si_devsw; dev-si_devsw = NULL; /* already NULL for SI_ALIAS */ while (csw != NULL csw-d_purge != NULL dev-si_threadcount) { ___ svn-src-sta...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable To unsubscribe, send any mail to svn-src-stable-unsubscr...@freebsd.org ___ 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: r222283 - head/sys/geom/vinum
Author: ae Date: Wed May 25 11:14:26 2011 New Revision: 83 URL: http://svn.freebsd.org/changeset/base/83 Log: Prevent non-aligned reading from provider while tasting. Reject providers with unsupported sectorsize. Reported by: Joerg Wunsch MFC after:1 week Modified: head/sys/geom/vinum/geom_vinum_drive.c head/sys/geom/vinum/geom_vinum_events.c Modified: head/sys/geom/vinum/geom_vinum_drive.c == --- head/sys/geom/vinum/geom_vinum_drive.c Wed May 25 10:04:13 2011 (r82) +++ head/sys/geom/vinum/geom_vinum_drive.c Wed May 25 11:14:26 2011 (r83) @@ -126,6 +126,10 @@ gv_read_header(struct g_consumer *cp, st pp = cp-provider; KASSERT(pp != NULL, (gv_read_header: null pp)); + if ((GV_HDR_OFFSET % pp-sectorsize) != 0 || + (GV_HDR_LEN % pp-sectorsize) != 0) + return (ENODEV); + d_hdr = g_read_data(cp, GV_HDR_OFFSET, pp-sectorsize, NULL); if (d_hdr == NULL) return (-1); Modified: head/sys/geom/vinum/geom_vinum_events.c == --- head/sys/geom/vinum/geom_vinum_events.c Wed May 25 10:04:13 2011 (r82) +++ head/sys/geom/vinum/geom_vinum_events.c Wed May 25 11:14:26 2011 (r83) @@ -109,6 +109,12 @@ gv_drive_tasted(struct gv_softc *sc, str buf = NULL; G_VINUM_DEBUG(2, tasted drive on '%s', pp-name); + if ((GV_CFG_OFFSET % pp-sectorsize) != 0 || + (GV_CFG_LEN % pp-sectorsize) != 0) { + G_VINUM_DEBUG(0, provider %s has unsupported sectorsize., + pp-name); + return; + } gp = sc-geom; g_topology_lock(); ___ 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: r222274 - stable/8/sys/kern
On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. On 5/25/11, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 74 URL: http://svn.freebsd.org/changeset/base/74 Log: MFC r222086: The protection against the race with dev_rel(), introduced in r163328, should be extended to cover destroy_devl() calls for the children of the destroyed dev. Modified: stable/8/sys/kern/kern_conf.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/kern_conf.c == --- stable/8/sys/kern/kern_conf.c Wed May 25 01:04:12 2011 (r73) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r74) @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev-si_flags = ~SI_NAMED; + dev-si_refcount++; /* Avoid race with dev_rel() */ + /* If we are a child, remove us from the parents list */ if (dev-si_flags SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev) dev-si_flags = ~SI_CLONELIST; } - dev-si_refcount++; /* Avoid race with dev_rel() */ csw = dev-si_devsw; dev-si_devsw = NULL; /* already NULL for SI_ALIAS */ while (csw != NULL csw-d_purge != NULL dev-si_threadcount) { ___ svn-src-sta...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable To unsubscribe, send any mail to svn-src-stable-unsubscr...@freebsd.org pgpDGF0sgjEYW.pgp Description: PGP signature
Re: svn commit: r222274 - stable/8/sys/kern
this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. On 5/25/11, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Wed May 25 03:25:14 2011 New Revision: 74 URL: http://svn.freebsd.org/changeset/base/74 Log: MFC r222086: The protection against the race with dev_rel(), introduced in r163328, should be extended to cover destroy_devl() calls for the children of the destroyed dev. Modified: stable/8/sys/kern/kern_conf.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/kern_conf.c == --- stable/8/sys/kern/kern_conf.c Wed May 25 01:04:12 2011 (r73) +++ stable/8/sys/kern/kern_conf.c Wed May 25 03:25:14 2011 (r74) @@ -885,6 +885,8 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev-si_flags = ~SI_NAMED; + dev-si_refcount++; /* Avoid race with dev_rel() */ + /* If we are a child, remove us from the parents list */ if (dev-si_flags SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -901,7 +903,6 @@ destroy_devl(struct cdev *dev) dev-si_flags = ~SI_CLONELIST; } - dev-si_refcount++; /* Avoid race with dev_rel() */ csw = dev-si_devsw; dev-si_devsw = NULL; /* already NULL for SI_ALIAS */ while (csw != NULL csw-d_purge != NULL dev-si_threadcount) { ___ svn-src-sta...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable To unsubscribe, send any mail to svn-src-stable-unsubscr...@freebsd.org ___ 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: r222274 - stable/8/sys/kern
On Wednesday 25 May 2011 14:07:10 Oliver Pinter wrote: this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- Hi, Have you thought about: /usr/ports/multimedia/cuse4bsd ? Create some threads and: struct cuse_dev * cuse_dev_create(const struct cuse_methods *mtod, void *priv0, void *priv1, uid_t, gid_t, int permission, const char *fmt, ...) This function creates a new character device according to the given parameters. This function returns a valid cuse_dev structure pointer on success or NULL on failure. The device name can only contain a-z, A-Z, 0-9, dot, / and underscore characters. and void cuse_dev_destroy(struct cuse_dev *) This functions destroys a previ- ously created character device. Should also work under FreeBSD 7.x from what I know. --HPS ___ 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: r222274 - stable/8/sys/kern
On Wed, May 25, 2011 at 02:07:10PM +0200, Oliver Pinter wrote: this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- Only if the unload of any of the listed modules caused destruction of some devfs node. May be, the easiest for 7 is to create some md(4) device and then destroy it. On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. pgpll43Wpc0yQ.pgp Description: PGP signature
svn commit: r222285 - in head/sys/dev: ahci mvs siis
Author: mav Date: Wed May 25 13:55:49 2011 New Revision: 85 URL: http://svn.freebsd.org/changeset/base/85 Log: According to SATA specification, when Serial ATA Enclosure Management Bridge (SEMB) is unable to communicate to Storage Enclosure Processor (SEP), in response to hard and soft resets it should among other things return value 0x7F in Status register. The weird side is that it means DRQ bit set, which tells that reset request is not completed. It would be fine if SEMB was the only device on port. But if SEMB connected to PMP or built into it, it may block access to other devices sharing same SATA port. Make some tunings/fixes to soft-reset handling to workaround the issue: - ahci(4): request CLO on the port after soft reset to ignore DRQ bit; - siis(4): gracefully reinitialize port after soft reset timeout (hardware doesn't detect reset request completion in this case); - mvs(4): if PMP is used, send dummy soft-reset to the PMP port to make it clear DRQ bit for us. For now this makes quirks in ata_pmp.c, hiding SEMB ports of SiI3726/SiI4726 PMPs, less important. Further, if hardware permit, I hope to implement real SEMB support. Modified: head/sys/dev/ahci/ahci.c head/sys/dev/mvs/mvs.c head/sys/dev/siis/siis.c Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cWed May 25 13:30:44 2011(r84) +++ head/sys/dev/ahci/ahci.cWed May 25 13:55:49 2011(r85) @@ -1835,9 +1835,11 @@ ahci_execute_transaction(struct ahci_slo if (!(ATA_INL(ch-r_mem, AHCI_P_CI) (1 slot-slot))) break; if (ATA_INL(ch-r_mem, AHCI_P_TFD) ATA_S_ERROR) { +#if 0 device_printf(ch-dev, Poll error on slot %d, TFD: %04x\n, slot-slot, ATA_INL(ch-r_mem, AHCI_P_TFD)); +#endif et = AHCI_ERR_TFE; break; } @@ -1877,14 +1879,12 @@ ahci_execute_transaction(struct ahci_slo } } } - ahci_end_transaction(slot, et); /* Kick controller into sane state and enable FBS. */ if ((ccb-ccb_h.func_code == XPT_ATA_IO) (ccb-ataio.cmd.flags CAM_ATAIO_CONTROL) - (ccb-ataio.cmd.control ATA_A_RESET) == 0) { - ahci_stop(ch-dev); - ahci_start(ch-dev, 1); - } + (ccb-ataio.cmd.control ATA_A_RESET) == 0) + ch-eslots |= (1 slot-slot); + ahci_end_transaction(slot, et); return; } /* Start command execution timeout */ @@ -2169,13 +2169,6 @@ ahci_end_transaction(struct ahci_slot *s ch-numhslots++; } else xpt_done(ccb); - /* Unfreeze frozen command. */ - if (ch-frozen !ahci_check_collision(dev, ch-frozen)) { - union ccb *fccb = ch-frozen; - ch-frozen = NULL; - ahci_begin_transaction(dev, fccb); - xpt_release_simq(ch-sim, TRUE); - } /* If we have no other active commands, ... */ if (ch-rslots == 0) { /* if there was fatal error - reset port. */ @@ -2185,6 +2178,7 @@ ahci_end_transaction(struct ahci_slot *s /* if we have slots in error, we can reinit port. */ if (ch-eslots != 0) { ahci_stop(dev); + ahci_clo(dev); ahci_start(dev, 1); } /* if there commands on hold, we can do READ LOG. */ @@ -2195,6 +2189,13 @@ ahci_end_transaction(struct ahci_slot *s } else if ((ch-rslots ~ch-toslots) == 0 et != AHCI_ERR_TIMEOUT) ahci_rearm_timeout(dev); + /* Unfreeze frozen command. */ + if (ch-frozen !ahci_check_collision(dev, ch-frozen)) { + union ccb *fccb = ch-frozen; + ch-frozen = NULL; + ahci_begin_transaction(dev, fccb); + xpt_release_simq(ch-sim, TRUE); + } /* Start PM timer. */ if (ch-numrslots == 0 ch-pm_level 3 (ch-curr[ch-pm_present ? 15 : 0].caps CTS_SATA_CAPS_D_PMREQ)) { Modified: head/sys/dev/mvs/mvs.c == --- head/sys/dev/mvs/mvs.c Wed May 25 13:30:44 2011(r84) +++ head/sys/dev/mvs/mvs.c Wed May 25 13:55:49 2011(r85) @@ -1738,13 +1738,6 @@ mvs_end_transaction(struct mvs_slot *slo ch-numhslots++; } else
svn commit: r222286 - in head: contrib/openbsm/libbsm lib/libc/gen share/man/man4 share/man/man7 share/man/man9 tools/tools/ether_reflect usr.bin/mkcsmapper usr.bin/mkesdb usr.sbin/bsnmpd/modules/s...
Author: ru Date: Wed May 25 14:13:53 2011 New Revision: 86 URL: http://svn.freebsd.org/changeset/base/86 Log: [mdoc] Fixed .Dt call. Modified: head/contrib/openbsm/libbsm/audit_submit.3 head/lib/libc/gen/feature_present.3 head/share/man/man4/atrtc.4 head/share/man/man4/attimer.4 head/share/man/man4/cc.4 head/share/man/man4/h_ertt.4 head/share/man/man4/nvram2env.4 head/share/man/man7/eventtimers.7 head/share/man/man9/devfs_set_cdevpriv.9 head/share/man/man9/hhook.9 head/share/man/man9/khelp.9 head/tools/tools/ether_reflect/ether_reflect.1 head/usr.bin/mkcsmapper/mkcsmapper.1 head/usr.bin/mkesdb/mkesdb.1 head/usr.sbin/bsnmpd/modules/snmp_bridge/snmp_bridge.3 head/usr.sbin/bsnmpd/modules/snmp_hostres/snmp_hostres.3 head/usr.sbin/bsnmpd/modules/snmp_wlan/snmp_wlan.3 head/usr.sbin/usbdump/usbdump.8 Modified: head/contrib/openbsm/libbsm/audit_submit.3 == --- head/contrib/openbsm/libbsm/audit_submit.3 Wed May 25 13:55:49 2011 (r85) +++ head/contrib/openbsm/libbsm/audit_submit.3 Wed May 25 14:13:53 2011 (r86) @@ -30,7 +30,7 @@ .\ $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#17 $ .\ .Dd January 18, 2008 -.Dt audit_submit 3 +.Dt AUDIT_SUBMIT 3 .Os .Sh NAME .Nm audit_submit Modified: head/lib/libc/gen/feature_present.3 == --- head/lib/libc/gen/feature_present.3 Wed May 25 13:55:49 2011 (r85) +++ head/lib/libc/gen/feature_present.3 Wed May 25 14:13:53 2011 (r86) @@ -29,7 +29,7 @@ .\ $FreeBSD$ .\ .Dd January 8, 2008 -.Dt feature_present 3 +.Dt FEATURE_PRESENT 3 .Os .Sh NAME .Nm feature_present Modified: head/share/man/man4/atrtc.4 == --- head/share/man/man4/atrtc.4 Wed May 25 13:55:49 2011(r85) +++ head/share/man/man4/atrtc.4 Wed May 25 14:13:53 2011(r86) @@ -25,7 +25,7 @@ .\ $FreeBSD$ .\ .Dd September 17, 2010 -.Dt atrtc 4 +.Dt ATRTC 4 .Os .Sh NAME .Nm atrtc Modified: head/share/man/man4/attimer.4 == --- head/share/man/man4/attimer.4 Wed May 25 13:55:49 2011 (r85) +++ head/share/man/man4/attimer.4 Wed May 25 14:13:53 2011 (r86) @@ -25,7 +25,7 @@ .\ $FreeBSD$ .\ .Dd September 14, 2010 -.Dt attimer 4 +.Dt ATTIMER 4 .Os .Sh NAME .Nm attimer Modified: head/share/man/man4/cc.4 == --- head/share/man/man4/cc.4Wed May 25 13:55:49 2011(r85) +++ head/share/man/man4/cc.4Wed May 25 14:13:53 2011(r86) @@ -31,7 +31,7 @@ .\ $FreeBSD$ .\ .Dd February 15, 2011 -.Dt cc 4 +.Dt CC 4 .Os .Sh NAME .Nm cc Modified: head/share/man/man4/h_ertt.4 == --- head/share/man/man4/h_ertt.4Wed May 25 13:55:49 2011 (r85) +++ head/share/man/man4/h_ertt.4Wed May 25 14:13:53 2011 (r86) @@ -30,7 +30,7 @@ .\ $FreeBSD$ .\ .Dd February 15, 2011 -.Dt h_ertt 9 +.Dt H_ERTT 9 .Os .Sh NAME .Nm h_ertt Modified: head/share/man/man4/nvram2env.4 == --- head/share/man/man4/nvram2env.4 Wed May 25 13:55:49 2011 (r85) +++ head/share/man/man4/nvram2env.4 Wed May 25 14:13:53 2011 (r86) @@ -25,7 +25,7 @@ .\ $FreeBSD$ .\ .Dd April 3, 2011 -.Dt nvram2env 4 +.Dt NVRAM2ENV 4 .Os .Sh NAME .Nm nvram2env Modified: head/share/man/man7/eventtimers.7 == --- head/share/man/man7/eventtimers.7 Wed May 25 13:55:49 2011 (r85) +++ head/share/man/man7/eventtimers.7 Wed May 25 14:13:53 2011 (r86) @@ -25,7 +25,7 @@ .\ $FreeBSD$ .\ .Dd September 15, 2010 -.Dt eventtimers 4 +.Dt EVENTTIMERS 4 .Os .Sh NAME .Nm eventtimers Modified: head/share/man/man9/devfs_set_cdevpriv.9 == --- head/share/man/man9/devfs_set_cdevpriv.9Wed May 25 13:55:49 2011 (r85) +++ head/share/man/man9/devfs_set_cdevpriv.9Wed May 25 14:13:53 2011 (r86) @@ -25,7 +25,7 @@ .\ $FreeBSD$ .\ .Dd September 8, 2008 -.Dt DEVFS_CDEVPRIV +.Dt DEVFS_CDEVPRIV 9 .Os .Sh NAME .Nm devfs_set_cdevpriv , Modified: head/share/man/man9/hhook.9 == --- head/share/man/man9/hhook.9 Wed May 25 13:55:49 2011(r85) +++ head/share/man/man9/hhook.9 Wed May 25 14:13:53 2011(r86) @@ -31,7 +31,7 @@ .\ $FreeBSD$ .\ .Dd February 15, 2011 -.Dt hhook 9 +.Dt HHOOK 9 .Os .Sh NAME .Nm hhook ,
Re: svn commit: r222272 - in head/sys: netinet netinet6
Quoting Bjoern A. Zeeb b...@freebsd.org (from Wed, 25 May 2011 00:34:25 + (UTC)): Author: bz Date: Wed May 25 00:34:25 2011 New Revision: 72 URL: http://svn.freebsd.org/changeset/base/72 Log: Add FEATURE() definitions for IPv4 and IPv6 so that we can use feature_present(3) to dynamically decide whether to use one or the other family. Any estimate when you can get to the network related FEATURE macros I've send to you (those which where produced during GSoC 2010 by kibab@)? When all are in, I have a final oommit to do for the userland application which can query them (including the masking of existing features feature). Or do you prefer that I ask on net@ for a review of the network related feature macros? Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after:10 days Bye, Alexander. -- We don't really understand it, so we'll give it to the programmers. http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ 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: r222211 - head/usr.bin/gzip
Xin LI delp...@freebsd.org writes: Author: delphij Date: Mon May 23 09:40:21 2011 New Revision: 11 URL: http://svn.freebsd.org/changeset/base/11 Log: Match symbolic link handling behavior with GNU gzip, bzip2 and xz: After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. $ zcat TIFFfree.3tiff.gz zcat: TIFFfree.3tiff.gz is not a regular file Exit 1 When we are operating on a symbolic link pointing to an existing file, bail out by default, but go ahead if -f is specified. Submitted by: arundel MFC after: 2 weeks At least our man(1) relies on foocat, e.g. $ man -d TIFFfree # from graphics/tiff -- Using architecture: amd64:amd64 -- Using pager: less -- Using manual sections: 1:1aout:8:2:3:n:4:5:6:7:9:l -- Searching PATH for man directories -- Adding /home/luser/.bin/man to manpath -- Adding /usr/local/man to manpath -- Adding /usr/share/man to manpath -- Adding default manpath entries -- Adding /usr/share/openssl/man to manpath -- Parsing config file: /etc/man.conf -- Using manual path: /home/luser/.bin/man:/usr/local/man:/usr/share/man:/usr/share/openssl/man -- Using locale paths: en_US.UTF-8:en.UTF-8:. -- Searching for TIFFfree -- Found manpage /usr/local/man/man3/TIFFfree.3tiff.gz -- Skipping catpage: not found or old zcat: /usr/local/man/man3/TIFFfree.3tiff.gz is not a regular file -- Command: /usr/bin/zcat /usr/local/man/man3/TIFFfree.3tiff.gz | tbl | groff -S -P-c -Wall -mtty-char -man -Tascii | /usr/bin/col | less and uses `-f' flag only when compression is not known/not compressed setup_cattool() { case $1 in *.bz) cattool='/usr/bin/bzcat' ;; *.bz2)cattool='/usr/bin/bzcat' ;; *.gz) cattool='/usr/bin/zcat' ;; *.lzma) cattool='/usr/bin/lzcat' ;; *.xz) cattool='/usr/bin/xzcat' ;; *)cattool='/usr/bin/zcat -f' ;; esac } ___ 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: r222211 - head/usr.bin/gzip
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi, Pan, On 05/25/11 10:03, Pan Tsu wrote: Match symbolic link handling behavior with GNU gzip, bzip2 and xz: After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. $ zcat TIFFfree.3tiff.gz zcat: TIFFfree.3tiff.gz is not a regular file Exit 1 Will the attached patch help? [...] At least our man(1) relies on foocat, e.g. [...] and uses `-f' flag only when compression is not known/not compressed I think this is a gzip(1) bug and thus it's not man(1) to be fixed. However, that might indicate a different bug (thankfully it revealed the gzip(1) one) in the TIFF port :) Cheers, - -- Xin LI delp...@delphij.nethttp://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBCAAGBQJN3T6NAAoJEATO+BI/yjfB/4YIALvCH1J1GvbHFXn8aN4msBnY 28RnaioHsOpABVwJJ4H6HR6hh3XEC/rU6LeQaCocZ3K+THkKc4+OvvLJwi/QEiLz 0i4zW/K0ZM3BrwjmCuoTHSNPCTkAAcEPiGQt2XjvgPRzAXOeQSI16ABbl98i6OeK nT2ntP9izC4A0VR+YBPBYAjCi7u1Yers46fhjTEDi0ISpuKiONPeU32ZyIttee/U j0uRc4PBxAsrGZTkhMn2qB3pVRIfQje+eUxB/yHQs3JwW9CIZ/VWprIlfn1S5Gr+ JPsNeBGRYWTUS2MJyn9uEmiMZvOzGO0rzATKgzyoP6yBrUCmSQhAO6DpkMTibj8= =kLw1 -END PGP SIGNATURE- Index: usr.bin/gzip/gzip.c === --- usr.bin/gzip/gzip.c (revision 65) +++ usr.bin/gzip/gzip.c (working copy) @@ -1782,7 +1782,8 @@ } retry: - if (stat(path, sb) != 0 || (fflag == 0 lstat(path, sb) != 0)) { + if (stat(path, sb) != 0 || (fflag == 0 cflag == 0 + lstat(path, sb) != 0)) { /* lets try path.gz if we're decompressing */ if (dflag s == NULL errno == ENOENT) { len = strlen(path); ___ 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: r222211 - head/usr.bin/gzip
Xin LI delp...@delphij.net writes: On 05/25/11 10:03, Pan Tsu wrote: Match symbolic link handling behavior with GNU gzip, bzip2 and xz: After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. $ zcat TIFFfree.3tiff.gz zcat: TIFFfree.3tiff.gz is not a regular file Exit 1 Will the attached patch help? [...] Yes, with the patch I can view such manpages again. ___ 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: r222287 - head/usr.bin/gzip
Author: delphij Date: Wed May 25 18:04:11 2011 New Revision: 87 URL: http://svn.freebsd.org/changeset/base/87 Log: Fix a regression introduced with previous changeset: if output is stdout, do not check for symbolic link. Modified: head/usr.bin/gzip/gzip.c Modified: head/usr.bin/gzip/gzip.c == --- head/usr.bin/gzip/gzip.cWed May 25 14:13:53 2011(r86) +++ head/usr.bin/gzip/gzip.cWed May 25 18:04:11 2011(r87) @@ -1782,7 +1782,8 @@ handle_pathname(char *path) } retry: - if (stat(path, sb) != 0 || (fflag == 0 lstat(path, sb) != 0)) { + if (stat(path, sb) != 0 || (fflag == 0 cflag == 0 + lstat(path, sb) != 0)) { /* lets try path.gz if we're decompressing */ if (dflag s == NULL errno == ENOENT) { len = strlen(path); ___ 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: r222211 - head/usr.bin/gzip
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 05/25/11 10:46, Pan Tsu wrote: Xin LI delp...@delphij.net writes: On 05/25/11 10:03, Pan Tsu wrote: Match symbolic link handling behavior with GNU gzip, bzip2 and xz: After this change zcat(1) behaves unlike GNU zcat, bzcat and xzcat. $ zcat TIFFfree.3tiff.gz zcat: TIFFfree.3tiff.gz is not a regular file Exit 1 Will the attached patch help? [...] Yes, with the patch I can view such manpages again. Thanks! I've committed the fix as r87. Cheers, - -- Xin LI delp...@delphij.nethttp://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBCAAGBQJN3UW/AAoJEATO+BI/yjfB+dMH/3BF0r/XSElSPNN9Y6VaC8B1 w2CBySOCau7sh2vuk8vm5Mw/+vqyuR3ZpDCNpMRcLUH58KsDZBCNICE1yWt/hFgF 7gF1ZMHzt2Z3arWZFvmSWuEnkeUUI/EvH73chLNY/gqNt6tER5YmFf8cbC5xr7aB 11zexuB4eXoiFu4NldQ8ZYs8zhz1akA84IY+o97RJYk8yuMueF9ni06k2K64CvjV uWneF7QRAzNtj7NkeBW2OzmT2GvoceOa3qRMNHDOBbJT8l6VaoIQhA0uZ6jGuExi R3HmSvE9UEELnnT5QvUVgIaTiKmAuiSrtZYyOIfYCA0Ic4qY4mql9GWivblIf6Q= =Rnfh -END PGP SIGNATURE- ___ 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: r222211 - head/usr.bin/gzip
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 05/25/11 10:38, Xin LI wrote: [...] However, that might indicate a different bug Correction: I was wrong here, the MLINKS just behave this way. Cheers, - -- Xin LI delp...@delphij.nethttp://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.17 (FreeBSD) iQEcBAEBCAAGBQJN3UYsAAoJEATO+BI/yjfBI78H/j3jB9tge0kwci+wKHArjWvm DrrXBthWNk4koAPY7Y/pJxyt8ayY8Jz8cqklXPL7NPHGwJFy5RD1sslBiSzCdo7u vwnPFy9WOViu379wbyb1NrWh4qleS0PiPoKxDtcba1cQhlakt99Na2fBNMeMvknL hbn+g1zNxEjWxS53MFH32i2EraCDrttmqGJJngpX9mOZm0Q9F1IBHX76pCkBkCPg 6K+RDRiJnsIW7nVv6jSUPF/Jf6Moc8nsAgUI0OTyeaiwjB77oXykK39AI/syYbYs ZnU2J6VvJoqQztcyd5xw27zscy0cblNqVmbuD24BZ9Lfj34KwaWX3UwzNVgnBr8= =ggiS -END PGP SIGNATURE- ___ 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: r222288 - head/usr.sbin/gpioctl
Author: bcr (doc committer) Date: Wed May 25 20:25:13 2011 New Revision: 88 URL: http://svn.freebsd.org/changeset/base/88 Log: Document the device name change from gpioctl to gpioc in the man page. PR: docs/157075 Submitted by: brix Reviewed by: gonzo Modified: head/usr.sbin/gpioctl/gpioctl.8 Modified: head/usr.sbin/gpioctl/gpioctl.8 == --- head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 18:04:11 2011 (r87) +++ head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 20:25:13 2011 (r88) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd September 27, 2010 +.Dd May 15, 2011 .Dt GPIOCTL 1 .Os .Sh NAME @@ -93,17 +93,17 @@ be verbose: for each listed pin print cu .Sh EXAMPLES .Bl -bullet .It -List pins available on GPIO controller defined by device /dev/gpioctl0 +List pins available on GPIO controller defined by device /dev/gpioc0 .Pp -gpioctl -f /dev/gpioctl0 -l +gpioctl -f /dev/gpioc0 -l .It Set the value of pin 12 to 1 .Pp -gpioctl -f /dev/gpioctl0 12 1 +gpioctl -f /dev/gpioc0 12 1 .It Configure pin 12 to be input pin .Pp -gpioctl -f /dev/gpioctl0 -c 12 IN +gpioctl -f /dev/gpioc0 -c 12 IN .El .Sh HISTORY 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: r222289 - in head/sys/fs: nfs nfsclient
Author: rmacklem Date: Wed May 25 20:53:08 2011 New Revision: 89 URL: http://svn.freebsd.org/changeset/base/89 Log: Fix the new NFS client so that it correctly sets the must_commit argument for a write RPC when it succeeds for the first one and fails for a subsequent RPC within the same call to the function. This makes it compatible with the old NFS client for this case. MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfs/nfs_var.h == --- head/sys/fs/nfs/nfs_var.h Wed May 25 20:25:13 2011(r88) +++ head/sys/fs/nfs/nfs_var.h Wed May 25 20:53:08 2011(r89) @@ -370,7 +370,7 @@ int nfsrpc_readlink(vnode_t, struct uio NFSPROC_T *, struct nfsvattr *, int *, void *); int nfsrpc_read(vnode_t, struct uio *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); -int nfsrpc_write(vnode_t, struct uio *, int *, u_char *, +int nfsrpc_write(vnode_t, struct uio *, int *, int *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *, int); int nfsrpc_mknod(vnode_t, char *, int, struct vattr *, u_int32_t, enum vtype, struct ucred *, NFSPROC_T *, struct nfsvattr *, Modified: head/sys/fs/nfsclient/nfs_clrpcops.c == --- head/sys/fs/nfsclient/nfs_clrpcops.cWed May 25 20:25:13 2011 (r88) +++ head/sys/fs/nfsclient/nfs_clrpcops.cWed May 25 20:53:08 2011 (r89) @@ -68,7 +68,7 @@ static int nfsrpc_setattrrpc(vnode_t , s struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); static int nfsrpc_readrpc(vnode_t , struct uio *, struct ucred *, nfsv4stateid_t *, NFSPROC_T *, struct nfsvattr *, int *, void *); -static int nfsrpc_writerpc(vnode_t , struct uio *, int *, u_char *, +static int nfsrpc_writerpc(vnode_t , struct uio *, int *, int *, struct ucred *, nfsv4stateid_t *, NFSPROC_T *, struct nfsvattr *, int *, void *); static int nfsrpc_createv23(vnode_t , char *, int, struct vattr *, @@ -1369,7 +1369,7 @@ nfsmout: * will then deadlock. */ APPLESTATIC int -nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, u_char *verfp, +nfsrpc_write(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff, int called_from_strategy) { @@ -1382,6 +1382,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio nfsv4stateid_t stateid; void *lckp; + *must_commit = 0; if (nmp-nm_clp != NULL) clidrev = nmp-nm_clp-nfsc_clientidrev; newcred = cred; @@ -1412,7 +1413,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio if (nostateid) error = 0; else - error = nfsrpc_writerpc(vp, uiop, iomode, verfp, + error = nfsrpc_writerpc(vp, uiop, iomode, must_commit, newcred, stateid, p, nap, attrflagp, stuff); if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp-nm_clp); @@ -1447,7 +1448,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio */ static int nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iomode, -u_char *verfp, struct ucred *cred, nfsv4stateid_t *stateidp, +int *must_commit, struct ucred *cred, nfsv4stateid_t *stateidp, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp, void *stuff) { u_int32_t *tl; @@ -1585,14 +1586,16 @@ nfsrpc_writerpc(vnode_t vp, struct uio * else if (committed == NFSWRITE_DATASYNC commit == NFSWRITE_UNSTABLE) committed = commit; - if (verfp != NULL) - NFSBCOPY((caddr_t)tl, verfp, NFSX_VERF); NFSLOCKMNT(nmp); if (!NFSHASWRITEVERF(nmp)) { NFSBCOPY((caddr_t)tl, (caddr_t)nmp-nm_verf[0], NFSX_VERF); NFSSETWRITEVERF(nmp); + } else if (NFSBCMP(tl, nmp-nm_verf, + NFSX_VERF)) { + *must_commit = 1; + NFSBCOPY(tl, nmp-nm_verf, NFSX_VERF); } NFSUNLOCKMNT(nmp); } Modified: head/sys/fs/nfsclient/nfs_clvnops.c == --- head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 20:25:13 2011
svn commit: r222290 - head/usr.sbin/gpioctl
Author: bcr (doc committer) Date: Wed May 25 21:04:11 2011 New Revision: 90 URL: http://svn.freebsd.org/changeset/base/90 Log: Bump the date of the man page to the date of the actual commit. Noticed by: brix Modified: head/usr.sbin/gpioctl/gpioctl.8 Modified: head/usr.sbin/gpioctl/gpioctl.8 == --- head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 20:53:08 2011 (r89) +++ head/usr.sbin/gpioctl/gpioctl.8 Wed May 25 21:04:11 2011 (r90) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd May 15, 2011 +.Dd May 25, 2011 .Dt GPIOCTL 1 .Os .Sh NAME ___ 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: r222291 - head/sys/fs/nfsclient
Author: rmacklem Date: Wed May 25 21:17:53 2011 New Revision: 91 URL: http://svn.freebsd.org/changeset/base/91 Log: Add some missing mutex locking to the new NFS client. MFC after:2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c == --- head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 21:04:11 2011 (r90) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed May 25 21:17:53 2011 (r91) @@ -2470,10 +2470,12 @@ ncl_commit(struct vnode *vp, u_quad_t of error = nfsrpc_commit(vp, offset, cnt, cred, td, verf, nfsva, attrflag, NULL); if (!error) { + mtx_lock(nmp-nm_mtx); if (NFSBCMP((caddr_t)nmp-nm_verf, verf, NFSX_VERF)) { NFSBCOPY(verf, (caddr_t)nmp-nm_verf, NFSX_VERF); error = NFSERR_STALEWRITEVERF; } + mtx_unlock(nmp-nm_mtx); if (!error attrflag) (void) nfscl_loadattrcache(vp, nfsva, NULL, NULL, 0, 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
svn commit: r222292 - head/bin/sh
Author: jilles Date: Wed May 25 21:38:16 2011 New Revision: 92 URL: http://svn.freebsd.org/changeset/base/92 Log: sh: Show errno messages in cd. Modified: head/bin/sh/cd.c Modified: head/bin/sh/cd.c == --- head/bin/sh/cd.cWed May 25 21:17:53 2011(r91) +++ head/bin/sh/cd.cWed May 25 21:38:16 2011(r92) @@ -86,6 +86,7 @@ cdcmd(int argc, char **argv) struct stat statb; int ch, phys, print = 0, getcwderr = 0; int rc; + int errno1 = ENOENT; optreset = 1; optind = 1; opterr = 0; /* initialize getopt */ phys = Pflag; @@ -138,9 +139,11 @@ cdcmd(int argc, char **argv) rc = docd(p, print, phys); if (rc = 0) return getcwderr ? rc : 0; + if (errno != ENOENT) + errno1 = errno; } } - error(can't cd to %s, dest); + error(%s: %s, dest, strerror(errno1)); /*NOTREACHED*/ 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: r222274 - stable/8/sys/kern
On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 02:07:10PM +0200, Oliver Pinter wrote: this or likely this script is enough for test? ---8--- #!/bin/csh @ a = 100 while ( $a ) foreach i ( umass cdce foo bar ) kldload $i end foreach i ( umass cdce foo bar ) kldunload $i end @ a-- end ---8--- Only if the unload of any of the listed modules caused destruction of some devfs node. May be, the easiest for 7 is to create some md(4) device and then destroy it. On 5/25/11, Kostik Belousov kostik...@gmail.com wrote: On Wed, May 25, 2011 at 12:11:29PM +0200, Oliver Pinter wrote: MFC to 7-STABLE? Somebody need to test it for 7 (I do not expect any failures, but I also prefer to not commit untested changes). The testing should include destroying some devfs nodes, e.g. by loading and unloading a driver that creates and destroys them. Runned 3 times the attached test script. The system remained stable. FreeBSD pandora-d 7.4-STABLE FreeBSD 7.4-STABLE #83 r74=49d86ad: Wed May 25 17:49:38 CEST 2011 root@pandora-d:/usr/obj/usr/src/sys/stable amd64 commit 49d86ad84d6347006ef359ffa0fa0e575d700246 Author: kib kib@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Date: Wed May 25 03:25:14 2011 + MFC r222086: The protection against the race with dev_rel(), introduced in r163328, should be extended to cover destroy_devl() calls for the children of the destroyed dev. git-svn-id: svn://svn.freebsd.org/base/stable/8@74 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 09859aa..3207438 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -874,6 +874,8 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev-si_flags = ~SI_NAMED; + dev-si_refcount++; /* Avoid race with dev_rel() */ + /* If we are a child, remove us from the parents list */ if (dev-si_flags SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -890,7 +892,6 @@ destroy_devl(struct cdev *dev) dev-si_flags = ~SI_CLONELIST; } - dev-si_refcount++; /* Avoid race with dev_rel() */ csw = dev-si_devsw; dev-si_devsw = NULL; /* already NULL for SI_ALIAS */ while (csw != NULL csw-d_purge != NULL dev-si_threadcount) { devfs_test.log.xz Description: Binary 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: r222295 - head/tools/build/make_check
Author: obrien Date: Wed May 25 23:33:49 2011 New Revision: 95 URL: http://svn.freebsd.org/changeset/base/95 Log: + Tighten up (and simplify) the pass_cmd_vars_1 variable definition arrived from the calling make test. + Be more tolerant of newlines in the plus_flag supports the '+' flag test. Modified: head/tools/build/make_check/Makefile Modified: head/tools/build/make_check/Makefile == --- head/tools/build/make_check/MakefileWed May 25 21:53:25 2011 (r94) +++ head/tools/build/make_check/MakefileWed May 25 23:33:49 2011 (r95) @@ -1,5 +1,7 @@ # $FreeBSD$ +.MAKE.MODE=normal + # Test for broken LHS expansion. # This *must* cause make(1) to detect a recursive variable, and fail as such. .if make(lhs_expn) @@ -152,24 +154,19 @@ pass_cmd_vars: @${SMAKE} CMD1=cmd1 CMD2=cmd2 pass_cmd_vars_4 .endif -.if make(pass_cmd_vars_1) +# # Check that the variable definition arrived from the calling make +# +.if make(pass_cmd_vars_1) +# These values should get overridden by the commandline +CMD1=oops1 +CMD2=oops2 pass_cmd_vars_1: @: .if ${CMD1} != cmd1 || ${CMD2} != cmd2 .error variables not passed through MAKEFLAGS .endif - -# Check that the variable definition is in MAKEFLAGS -.if ${.MAKEFLAGS:MCMD1=*} != CMD1=cmd1 || ${.MAKEFLAGS:MCMD2=*} != CMD2=cmd2 -.error variable assignment not found in $${MAKEFLAGS} -.endif - -# Check that the variable definition is not in MFLAGS -.if ${MFLAGS:MCMD1=*} != || ${MFLAGS:MCMD2=*} != -.error variable assignment found in $${MFLAGS} -.endif .endif .if make(pass_cmd_vars_2) @@ -228,7 +225,7 @@ pass_cmd_vars_4_1: # .if make(plus_flag) OUT != ${SMAKE} -n plus_flag_1 -.if ${OUT} != /tmp +.if ${OUT:M/tmp} != /tmp .error make doesn't handle + flag .endif plus_flag: ___ 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: r222296 - stable/7/sys/kern
Author: kib Date: Thu May 26 00:09:56 2011 New Revision: 96 URL: http://svn.freebsd.org/changeset/base/96 Log: MFC r222086: The protection against the race with dev_rel(), introduced in r163328, should be extended to cover destroy_devl() calls for the children of the destroyed dev. Requested and tested by: Oliver Pinter oliver.pntr gmail com Modified: stable/7/sys/kern/kern_conf.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/kern_conf.c == --- stable/7/sys/kern/kern_conf.c Wed May 25 23:33:49 2011 (r95) +++ stable/7/sys/kern/kern_conf.c Thu May 26 00:09:56 2011 (r96) @@ -874,6 +874,8 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev-si_flags = ~SI_NAMED; + dev-si_refcount++; /* Avoid race with dev_rel() */ + /* If we are a child, remove us from the parents list */ if (dev-si_flags SI_CHILD) { LIST_REMOVE(dev, si_siblings); @@ -890,7 +892,6 @@ destroy_devl(struct cdev *dev) dev-si_flags = ~SI_CLONELIST; } - dev-si_refcount++; /* Avoid race with dev_rel() */ csw = dev-si_devsw; dev-si_devsw = NULL; /* already NULL for SI_ALIAS */ while (csw != NULL csw-d_purge != NULL dev-si_threadcount) { ___ 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: r222297 - stable/8/sys/dev/ata
Author: mav Date: Thu May 26 00:37:44 2011 New Revision: 97 URL: http://svn.freebsd.org/changeset/base/97 Log: MFC r220911: Make PATA-like soft-reset in ata(4) more strict in checking disk signature. It allows to avoid false positive device detection under Xen, that caused long probe delays due to subsequent IDENTIFY command timeouts. Modified: stable/8/sys/dev/ata/ata-lowlevel.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/ata/ata-lowlevel.c == --- stable/8/sys/dev/ata/ata-lowlevel.c Thu May 26 00:09:56 2011 (r96) +++ stable/8/sys/dev/ata/ata-lowlevel.c Thu May 26 00:37:44 2011 (r97) @@ -535,7 +535,7 @@ ata_generic_reset(device_t dev) if (lsb == ATAPI_MAGIC_LSB msb == ATAPI_MAGIC_MSB) { ch-devices |= ATA_ATAPI_MASTER; } - else if (stat0 ATA_S_READY) { + else if (lsb == 0 msb == 0 (stat0 ATA_S_READY)) { ch-devices |= ATA_ATA_MASTER; } } @@ -568,7 +568,7 @@ ata_generic_reset(device_t dev) if (lsb == ATAPI_MAGIC_LSB msb == ATAPI_MAGIC_MSB) { ch-devices |= ATA_ATAPI_SLAVE; } - else if (stat1 ATA_S_READY) { + else if (lsb == 0 msb == 0 (stat1 ATA_S_READY)) { ch-devices |= ATA_ATA_SLAVE; } } ___ 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