svn commit: r220534 - in head/tools/tools/ath: athdecode athkey athpoke athprom athregs

2011-04-11 Thread Adrian Chadd
Author: adrian
Date: Mon Apr 11 06:53:45 2011
New Revision: 220534
URL: http://svn.freebsd.org/changeset/base/220534

Log:
  Generate opt_ah.h now for all ath tools, a recent HAL change of mine
  now requires it.

Modified:
  head/tools/tools/ath/athdecode/Makefile
  head/tools/tools/ath/athkey/Makefile
  head/tools/tools/ath/athpoke/Makefile
  head/tools/tools/ath/athprom/Makefile
  head/tools/tools/ath/athregs/Makefile

Modified: head/tools/tools/ath/athdecode/Makefile
==
--- head/tools/tools/ath/athdecode/Makefile Mon Apr 11 03:12:10 2011
(r220533)
+++ head/tools/tools/ath/athdecode/Makefile Mon Apr 11 06:53:45 2011
(r220534)
@@ -10,6 +10,14 @@ SRCS+=   dumpregs_5210.c
 SRCS+= dumpregs_5211.c
 SRCS+= dumpregs_5212.c
 SRCS+= dumpregs_5416.c
+SRCS+= opt_ah.h
+
+CLEANFILES+=   opt_ah.h
+
+opt_ah.h:
+   echo #define AH_DEBUG 1  opt_ah.h
+   echo #define AH_DEBUG_COUNTRY 1  opt_ah.h
+   echo #define AH_SUPPORT_AR5416 1  opt_ah.h
 
 .include ../Makefile.inc
 

Modified: head/tools/tools/ath/athkey/Makefile
==
--- head/tools/tools/ath/athkey/MakefileMon Apr 11 03:12:10 2011
(r220533)
+++ head/tools/tools/ath/athkey/MakefileMon Apr 11 06:53:45 2011
(r220534)
@@ -2,6 +2,17 @@
 
 PROG=  athkey
 
+SRCS=  athkey.c
+SRCS+= opt_ah.h
+
+CLEANFILES+=   opt_ah.h
+
+opt_ah.h:
+   echo #define AH_DEBUG 1  opt_ah.h
+   echo #define AH_DEBUG_COUNTRY 1  opt_ah.h
+   echo #define AH_SUPPORT_AR5416 1  opt_ah.h
+
+
 .include ../Makefile.inc
 
 .include bsd.prog.mk

Modified: head/tools/tools/ath/athpoke/Makefile
==
--- head/tools/tools/ath/athpoke/Makefile   Mon Apr 11 03:12:10 2011
(r220533)
+++ head/tools/tools/ath/athpoke/Makefile   Mon Apr 11 06:53:45 2011
(r220534)
@@ -10,6 +10,14 @@ SRCS+=   dumpregs_5210.c
 SRCS+= dumpregs_5211.c
 SRCS+= dumpregs_5212.c
 SRCS+= dumpregs_5416.c
+SRCS+= opt_ah.h
+
+CLEANFILES+=   opt_ah.h
+
+opt_ah.h:
+   echo #define AH_DEBUG 1  opt_ah.h
+   echo #define AH_DEBUG_COUNTRY 1  opt_ah.h
+   echo #define AH_SUPPORT_AR5416 1  opt_ah.h
 
 .include ../Makefile.inc
 

Modified: head/tools/tools/ath/athprom/Makefile
==
--- head/tools/tools/ath/athprom/Makefile   Mon Apr 11 03:12:10 2011
(r220533)
+++ head/tools/tools/ath/athprom/Makefile   Mon Apr 11 06:53:45 2011
(r220534)
@@ -7,6 +7,15 @@ PROG=  athprom
 TEMPLATEDIR=   /usr/local/libdata/athprom
 TEXTMODE?= 444
 
+SRCS=  athprom.c
+SRCS+= opt_ah.h
+CLEANFILES+=   opt_ah.h
+
+opt_ah.h:
+   echo #define AH_DEBUG 1  opt_ah.h
+   echo #define AH_DEBUG_COUNTRY 1  opt_ah.h
+   echo #define AH_SUPPORT_AR5416 1  opt_ah.h
+
 CFLAGS+=-DDIR_TEMPLATE='${TEMPLATEDIR}'
 
 beforeinstall:

Modified: head/tools/tools/ath/athregs/Makefile
==
--- head/tools/tools/ath/athregs/Makefile   Mon Apr 11 03:12:10 2011
(r220533)
+++ head/tools/tools/ath/athregs/Makefile   Mon Apr 11 06:53:45 2011
(r220534)
@@ -9,6 +9,14 @@ SRCS+= dumpregs_5210.c
 SRCS+= dumpregs_5211.c
 SRCS+= dumpregs_5212.c
 SRCS+= dumpregs_5416.c
+SRCS+= opt_ah.h
+
+CLEANFILES+=   opt_ah.h
+
+opt_ah.h:
+   echo #define AH_DEBUG 1  opt_ah.h
+   echo #define AH_DEBUG_COUNTRY 1  opt_ah.h
+   echo #define AH_SUPPORT_AR5416 1  opt_ah.h
 
 .include ../Makefile.inc
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220535 - head/sys/dev/usb/storage

2011-04-11 Thread Alexander Motin
Author: mav
Date: Mon Apr 11 08:23:27 2011
New Revision: 220535
URL: http://svn.freebsd.org/changeset/base/220535

Log:
  Rework change made at r203146. Instead of reporting all wire errors as
  SCSI status errors to CAM (that was wrong, as it too often turned retriable
  wire errors into non-retriable REQUEST SENSE errors), do it only for STALL
  errors on control pipe of the CBI devices. STALL on control pipe is just
  a one of the ways to report error for CBI devices.
  
  PR:   usb/150401, usb/154593.
  Reviewed by:  hselasky
  MFC after:1 week

Modified:
  head/sys/dev/usb/storage/umass.c

Modified: head/sys/dev/usb/storage/umass.c
==
--- head/sys/dev/usb/storage/umass.cMon Apr 11 06:53:45 2011
(r220534)
+++ head/sys/dev/usb/storage/umass.cMon Apr 11 08:23:27 2011
(r220535)
@@ -1849,9 +1849,23 @@ umass_t_cbi_command_callback(struct usb_
break;
 
default:/* Error */
-   umass_tr_error(xfer, error);
-   /* skip reset */
-   sc-sc_last_xfer_index = UMASS_T_CBI_COMMAND;
+   /*
+* STALL on the control pipe can be result of the command error.
+* Attempt to clear this STALL same as for bulk pipe also
+* results in command completion interrupt, but ASC/ASCQ there
+* look like not always valid, so don't bother about it.
+*/
+   if ((error == USB_ERR_STALLED) ||
+   (sc-sc_transfer.callback == umass_cam_cb)) {
+   sc-sc_transfer.ccb = NULL;
+   (sc-sc_transfer.callback)
+   (sc, ccb, sc-sc_transfer.data_len,
+   STATUS_CMD_UNKNOWN);
+   } else {
+   umass_tr_error(xfer, error);
+   /* skip reset */
+   sc-sc_last_xfer_index = UMASS_T_CBI_COMMAND;
+   }
break;
}
 }
@@ -2605,17 +2619,9 @@ umass_cam_cb(struct umass_softc *sc, uni
/*
 * The wire protocol failed and will hopefully have
 * recovered. We return an error to CAM and let CAM
-* retry the command if necessary. In case of SCSI IO
-* commands we ask the CAM layer to check the
-* condition first. This is a quick hack to make
-* certain devices work.
+* retry the command if necessary.
 */
-   if (ccb-ccb_h.func_code == XPT_SCSI_IO) {
-   ccb-ccb_h.status = CAM_SCSI_STATUS_ERROR;
-   ccb-csio.scsi_status = SCSI_STATUS_CHECK_COND;
-   } else {
-   ccb-ccb_h.status = CAM_REQ_CMP_ERR;
-   }
+   ccb-ccb_h.status = CAM_REQ_CMP_ERR;
xpt_done(ccb);
break;
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220539 - in head/sys/dev/ath/ath_hal: ar5416 ar9002

2011-04-11 Thread Adrian Chadd
Author: adrian
Date: Mon Apr 11 11:15:34 2011
New Revision: 220539
URL: http://svn.freebsd.org/changeset/base/220539

Log:
  De-dup the ar5416 rates array definition.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416.hMon Apr 11 09:28:28 2011
(r220538)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416.hMon Apr 11 11:15:34 2011
(r220539)
@@ -37,6 +37,19 @@ typedef struct {
uint16_text_center;
 } CHAN_CENTERS;
 
+typedef enum Ar5416_Rates {
+rate6mb,  rate9mb,  rate12mb, rate18mb,
+rate24mb, rate36mb, rate48mb, rate54mb,
+rate1l,   rate2l,   rate2s,   rate5_5l,
+rate5_5s, rate11l,  rate11s,  rateXr,
+rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3,
+rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7,
+rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3,
+rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7,
+rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm,
+Ar5416RateSize
+} AR5416_RATES;
+
 #defineAR5416_DEFAULT_RXCHAINMASK  7
 #defineAR5416_DEFAULT_TXCHAINMASK  1
 #defineAR5416_MAX_RATE_POWER   63

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c  Mon Apr 11 09:28:28 
2011(r220538)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c  Mon Apr 11 11:15:34 
2011(r220539)
@@ -794,20 +794,6 @@ ar5416GetChipPowerLimits(struct ath_hal 
return AH_TRUE;
 }
 
-/* XXX gag, this is sick */
-typedef enum Ar5416_Rates {
-   rate6mb,  rate9mb,  rate12mb, rate18mb,
-   rate24mb, rate36mb, rate48mb, rate54mb,
-   rate1l,   rate2l,   rate2s,   rate5_5l,
-   rate5_5s, rate11l,  rate11s,  rateXr,
-   rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3,
-   rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7,
-   rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3,
-   rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7,
-   rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm,
-   Ar5416RateSize
-} AR5416_RATES;
-
 /**
  * ar5416SetTransmitPower
  *

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c
==
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c  Mon Apr 11 09:28:28 
2011(r220538)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c  Mon Apr 11 11:15:34 
2011(r220539)
@@ -67,20 +67,6 @@ static void ar9285GetGainBoundariesAndPd
uint16_t numXpdGains);
 static uint16_t ar9285GetMaxEdgePower(uint16_t, CAL_CTL_EDGES *);
 
-/* XXX gag, this is sick */
-typedef enum Ar5416_Rates {
-   rate6mb,  rate9mb,  rate12mb, rate18mb,
-   rate24mb, rate36mb, rate48mb, rate54mb,
-   rate1l,   rate2l,   rate2s,   rate5_5l,
-   rate5_5s, rate11l,  rate11s,  rateXr,
-   rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3,
-   rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7,
-   rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3,
-   rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7,
-   rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm,
-   Ar5416RateSize
-} AR5416_RATES;
-
 HAL_BOOL
 ar9285SetTransmitPower(struct ath_hal *ah,
const struct ieee80211_channel *chan, uint16_t *rfXpdGain)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220540 - in head: release share/man/man7

2011-04-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Mon Apr 11 14:30:45 2011
New Revision: 220540
URL: http://svn.freebsd.org/changeset/base/220540

Log:
  Add an install target to release/Makefile instead of grubbing around
  (and requesting that users grub around) in /usr/obj. Also make sure that
  make clean removes the bootonly media and clean up that target a little.

Modified:
  head/release/Makefile
  head/release/generate-release.sh
  head/share/man/man7/release.7

Modified: head/release/Makefile
==
--- head/release/Makefile   Mon Apr 11 11:15:34 2011(r220539)
+++ head/release/Makefile   Mon Apr 11 14:30:45 2011(r220540)
@@ -6,6 +6,7 @@
 #  cdrom: Builds release CD-ROM media (release.iso)
 #  ftp: Sets up FTP distribution area (ftp)
 #  release: Build all media and FTP distribution area
+#  install: Copies all release media into ${DESTDIR}
 #
 # Variables affecting the build process:
 #  WORLDDIR: location of src tree -- must have built world and default kernel
@@ -159,22 +160,26 @@ memstick: system
 
 packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES}
sh ${.CURDIR}/scripts/make-manifest.sh ${.OBJDIR}/*.txz  
${.OBJDIR}/MANIFEST
-   touch ${.OBJDIR}/${.TARGET}
+   touch ${.TARGET}
 
 cdrom: release.iso bootonly.iso
 ftp: packagesystem
-   rm -rf ${.OBJDIR}/ftp
-   mkdir ${.OBJDIR}/ftp
-   cp ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST ${.OBJDIR}/ftp
+   rm -rf ftp
+   mkdir ftp
+   cp *.txz MANIFEST ftp
 
 release: obj ${RELEASE_TARGETS}
 
 clean:
chflags -R noschg ${.OBJDIR}
-   rm -rf ${.OBJDIR}/dist ${.OBJDIR}/ftp
+   rm -rf dist ftp
rm -f packagesystem
-   rm -f ${.OBJDIR}/*.txz ${.OBJDIR}/MANIFEST
+   rm -f *.txz MANIFEST
rm -f system
-   rm -rf ${.OBJDIR}/release
-   rm -f ${.OBJDIR}/release.iso ${.OBJDIR}/memstick
+   rm -rf release bootonly
+   rm -f release.iso bootonly.iso memstick
+
+install:
+   -mkdir ${DESTDIR}
+   cp -a *.iso memstick ftp ${DESTDIR}/
 

Modified: head/release/generate-release.sh
==
--- head/release/generate-release.shMon Apr 11 11:15:34 2011
(r220539)
+++ head/release/generate-release.shMon Apr 11 14:30:45 2011
(r220540)
@@ -60,7 +60,5 @@ if [ -d $2/usr/doc ]; then 
 fi
 
 chroot $2 /bin/sh -c cd /usr/src  make $MAKE_FLAGS buildworld buildkernel 
|| exit 1
-chroot $2 /bin/sh -c cd /usr/src/release  make release || exit 1
-mkdir $2/R
-cp -pRP $2/usr/obj/usr/src/release/*.iso $2/usr/obj/usr/src/release/memstick 
$2/usr/obj/usr/src/release/ftp $2/R
+chroot $2 /bin/sh -c cd /usr/src/release  make release install DESTDIR=/R 
|| exit 1
 

Modified: head/share/man/man7/release.7
==
--- head/share/man/man7/release.7   Mon Apr 11 11:15:34 2011
(r220539)
+++ head/share/man/man7/release.7   Mon Apr 11 14:30:45 2011
(r220540)
@@ -153,17 +153,17 @@ The release makefile
 is fairly abstruse.
 Most developers will only be concerned with the
 .Cm release
-target.
+and
+.Cm install
+targets.
 .\ XXX: Some sort of introduction to this list?  All the others have one.
 .Bl -tag -width .Cm packagesystem
 .It Cm release
 Meta-target to build all release media and distributions applicable to this
-platform. All output goes to
-.Pa ${.OBJDIR} ,
-which will likely be either
-.Pa src/release
-or the equivalent path in
-.Pa /usr/obj .
+platform.
+.It Cm install
+Copy all produced release media to 
+.Pa ${DESTDIR} .
 .It Cm cdrom
 Builds installation CD-ROM images. On some systems, this may require that
 .Xr mkisofs 8
@@ -173,8 +173,10 @@ and possibly that the
 .Xr md 4
 (memory disk) device driver be present in the kernel
 (either by being compiled in or available as a module). This target
-produces a file called
+produces files called
 .Pa release.iso
+and
+.Pa bootonly.iso
 as its output.
 .It Cm memstick
 Builds an installation memory stick image named
@@ -293,12 +295,12 @@ svn co svn://svn.freebsd.org/base/head s
 cd src
 make buildworld
 cd release
-make obj release 
+make release install DESTDIR=/var/freebsd-snapshot
 .Ed
 .Pp
-After running these commands, a complete system suitable for FTP or
-CD-ROM distribution is available in the
-.Pa /usr/obj/usr/src/release
+After running these commands, all produced distribution files (tarballs
+for FTP, CD-ROM images, etc.) are available in the
+.Pa /var/freebsd-snapshot
 directory.
 .Pp
 The following sequence of commands can be used to build a
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220541 - head/usr.sbin/bsdinstall/scripts

2011-04-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Mon Apr 11 14:46:40 2011
New Revision: 220541
URL: http://svn.freebsd.org/changeset/base/220541

Log:
  Make the keymap script continue to work now that stderr is being
  redirected to the log file.

Modified:
  head/usr.sbin/bsdinstall/scripts/keymap

Modified: head/usr.sbin/bsdinstall/scripts/keymap
==
--- head/usr.sbin/bsdinstall/scripts/keymap Mon Apr 11 14:30:45 2011
(r220540)
+++ head/usr.sbin/bsdinstall/scripts/keymap Mon Apr 11 14:46:40 2011
(r220541)
@@ -28,5 +28,6 @@
 
 kbdcontrol -d /dev/null 21
 if [ $? -eq 0 ]; then
-   kbdmap 32 21 13 | grep 'keymap='  
$BSDINSTALL_TMPETC/rc.conf.keymap
+   exec 31
+   kbdmap 21 13 | grep 'keymap='  $BSDINSTALL_TMPETC/rc.conf.keymap
 fi
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220542 - in head: release share/man/man7

2011-04-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Mon Apr 11 15:03:01 2011
New Revision: 220542
URL: http://svn.freebsd.org/changeset/base/220542

Log:
  Don't do make release and make install in one step. Setting DESTDIR for
  make release has deleterious consequences.

Modified:
  head/release/generate-release.sh
  head/share/man/man7/release.7

Modified: head/release/generate-release.sh
==
--- head/release/generate-release.shMon Apr 11 14:46:40 2011
(r220541)
+++ head/release/generate-release.shMon Apr 11 15:03:01 2011
(r220542)
@@ -60,5 +60,6 @@ if [ -d $2/usr/doc ]; then 
 fi
 
 chroot $2 /bin/sh -c cd /usr/src  make $MAKE_FLAGS buildworld buildkernel 
|| exit 1
-chroot $2 /bin/sh -c cd /usr/src/release  make release install DESTDIR=/R 
|| exit 1
+chroot $2 /bin/sh -c cd /usr/src/release  make release || exit 1
+chroot $2 /bin/sh -c cd /usr/src/release  make install DESTDIR=/R || exit 1
 

Modified: head/share/man/man7/release.7
==
--- head/share/man/man7/release.7   Mon Apr 11 14:46:40 2011
(r220541)
+++ head/share/man/man7/release.7   Mon Apr 11 15:03:01 2011
(r220542)
@@ -295,7 +295,8 @@ svn co svn://svn.freebsd.org/base/head s
 cd src
 make buildworld
 cd release
-make release install DESTDIR=/var/freebsd-snapshot
+make release
+make install DESTDIR=/var/freebsd-snapshot
 .Ed
 .Pp
 After running these commands, all produced distribution files (tarballs
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r220459 - head/sys/x86/isa

2011-04-11 Thread Jung-uk Kim
On Friday 08 April 2011 06:29 pm, Bruce Evans wrote:
 On Fri, 8 Apr 2011, Jung-uk Kim wrote:
  Log:
   Refactor DELAYDEBUG as it is only useful for correcting i8254
  frequency.

 Er, DELAYDEBUG has nothing to do with the i8254 except that the
 non-i8254 case was broken (mostly in unreachable code, and missing
 instrumentation corresponding to the getit_calls counter).  Now it
 is more broken -- e.g., configuring DELAYDEBUG now prevents the
 non-i8254 timers from even being compiled.

Non-i8254 case was broken far too long and nobody cared to fix it.  
So, I concluded it isn't useful.  If you need to fix it, please 
feel free. :-)

Jung-uk Kim
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220545 - head/sys/x86/isa

2011-04-11 Thread Jung-uk Kim
Author: jkim
Date: Mon Apr 11 19:27:44 2011
New Revision: 220545
URL: http://svn.freebsd.org/changeset/base/220545

Log:
  Merge two similar functions to reduce duplication.

Modified:
  head/sys/x86/isa/clock.c

Modified: head/sys/x86/isa/clock.c
==
--- head/sys/x86/isa/clock.cMon Apr 11 17:49:26 2011(r220544)
+++ head/sys/x86/isa/clock.cMon Apr 11 19:27:44 2011(r220545)
@@ -246,40 +246,50 @@ getit(void)
 }
 
 #ifndef DELAYDEBUG
-static __inline void
-delay_tsc(int n, uint64_t freq)
+static u_int
+get_tsc(__unused struct timecounter *tc)
 {
-   uint64_t start, end, now;
 
-   sched_pin();
-   start = rdtsc();
-   end = start + (freq * n) / 100;
-   do {
-   cpu_spinwait();
-   now = rdtsc();
-   } while (now  end || (now  start  end  start));
-   sched_unpin();
+   return (rdtsc());
 }
 
-static __inline void
-delay_timecounter(struct timecounter *tc, int n)
+static __inline int
+delay_tc(int n)
 {
-   uint64_t end, now;
+   struct timecounter *tc;
+   timecounter_get_t *func;
+   uint64_t end, freq, now;
u_int last, mask, u;
 
-   mask = tc-tc_counter_mask;
-   last = tc-tc_get_timecount(tc)  mask;
-   end = tc-tc_frequency * n / 100;
+   tc = timecounter;
+   freq = atomic_load_acq_64(tsc_freq);
+   if (freq != 0) {
+   func = get_tsc;
+   mask = ~0u;
+   } else {
+   if (tc-tc_quality = 0)
+   return (0);
+   func = tc-tc_get_timecount;
+   mask = tc-tc_counter_mask;
+   freq = tc-tc_frequency;
+   }
now = 0;
+   end = freq * n / 100;
+   if (func == get_tsc)
+   sched_pin();
+   last = func(tc)  mask;
do {
cpu_spinwait();
-   u = tc-tc_get_timecount(tc)  mask;
+   u = func(tc)  mask;
if (u  last)
now += mask - last + u + 1;
else
now += u - last;
last = u;
} while (now  end);
+   if (func == get_tsc)
+   sched_unpin();
+   return (1);
 }
 #endif
 
@@ -306,19 +316,8 @@ DELAY(int n)
if (state == 1)
printf(DELAY(%d)..., n);
 #else
-   struct timecounter *tc;
-   uint64_t freq;
-
-   freq = atomic_load_acq_64(tsc_freq);
-   if (freq != 0) {
-   delay_tsc(n, freq);
+   if (delay_tc(n))
return;
-   }
-   tc = timecounter;
-   if (tc-tc_quality  0) {
-   delay_timecounter(tc, n);
-   return;
-   }
 #endif
/*
 * Read the counter first, so that the rest of the setup overhead is
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220546 - head/sys/fs/nfsserver

2011-04-11 Thread Rick Macklem
Author: rmacklem
Date: Mon Apr 11 20:54:30 2011
New Revision: 220546
URL: http://svn.freebsd.org/changeset/base/220546

Log:
  Vrele ni_startdir in the experimental NFS server for the case
  of NFSv2 getting an error return from VOP_MKNOD(). Without this
  patch, the server file system remains busy after an NFSv2
  VOP_MKNOD() fails.
  
  MFC after:2 weeks

Modified:
  head/sys/fs/nfsserver/nfs_nfsdport.c

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==
--- head/sys/fs/nfsserver/nfs_nfsdport.cMon Apr 11 19:27:44 2011
(r220545)
+++ head/sys/fs/nfsserver/nfs_nfsdport.cMon Apr 11 20:54:30 2011
(r220546)
@@ -765,10 +765,9 @@ nfsvno_createsub(struct nfsrv_descript *
ndp-ni_cnd, nvap-na_vattr);
vput(ndp-ni_dvp);
nfsvno_relpathbuf(ndp);
-   if (error) {
-   vrele(ndp-ni_startdir);
+   vrele(ndp-ni_startdir);
+   if (error)
return (error);
-   }
} else {
vrele(ndp-ni_startdir);
nfsvno_relpathbuf(ndp);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220549 - head/contrib/tzdata

2011-04-11 Thread Edwin Groothuis
Author: edwin
Date: Mon Apr 11 21:57:59 2011
New Revision: 220549
URL: http://svn.freebsd.org/changeset/base/220549

Log:
  MFV of r220547, tzdata2011f:
  
  - During 2011 the Falkland Islands will remain on Summer time.
  
  Obtained from:  ftp://elsie.nci.nih.gov/pub/

Modified:
  head/contrib/tzdata/southamerica
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/southamerica
==
--- head/contrib/tzdata/southamericaMon Apr 11 21:55:09 2011
(r220548)
+++ head/contrib/tzdata/southamericaMon Apr 11 21:57:59 2011
(r220549)
@@ -1,5 +1,5 @@
 # pre
-# @(#)southamerica 8.47
+# @(#)southamerica 8.48
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1343,6 +1343,24 @@ Zone Pacific/Galapagos   -5:58:24 -  LMT 19
 # For now, we'll just record the time in Stanley, since we have no
 # better info.
 
+# From Steffen Thorsen (2011-04-01):
+# The Falkland Islands will not turn back clocks this winter, but stay on
+# daylight saving time.
+#
+# One source:
+# a href=http://www.falklandnews.com/public/story.cfm?get=5914source=3;
+# http://www.falklandnews.com/public/story.cfm?get=5914source=3
+# /a
+#
+# We have gotten this confirmed by a clerk of the legislative assembly:
+# Normally the clocks revert to Local Mean Time (UTC/GMT -4 hours) on the
+# third Sunday of April at 0200hrs and advance to Summer Time (UTC/GMT -3
+# hours) on the first Sunday of September at 0200hrs.
+#
+# IMPORTANT NOTE: During 2011, on a trial basis, the Falkland Islands
+# will not revert to local mean time, but clocks will remain on Summer
+# time (UTC/GMT - 3 hours) throughout the whole of 2011.  Any long term
+# change to local time following the trial period will be notified.
 # Rule NAMEFROMTO  TYPEIN  ON  AT  SAVELETTER/S
 Rule   Falk19371938-   Sep lastSun 0:001:00S
 Rule   Falk19381942-   Mar Sun=19 0:000   -
@@ -1354,7 +1372,8 @@ Rule  Falk19841985-   Apr lastSun 
0:000
 Rule   Falk1984only-   Sep 16  0:001:00S
 Rule   Falk19852000-   Sep Sun=9  0:001:00S
 Rule   Falk19862000-   Apr Sun=16 0:000   -
-Rule   Falk2001max -   Apr Sun=15 2:000   -
+Rule   Falk20012010-   Apr Sun=15 2:000   -
+Rule   Falk2012max -   Apr Sun=15 2:000   -
 Rule   Falk2001max -   Sep Sun=1  2:001:00S
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Atlantic/Stanley  -3:51:24 -  LMT 1890
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220555 - head/sys/ofed/drivers/infiniband/ulp/ipoib

2011-04-11 Thread Bjoern A. Zeeb
Author: bz
Date: Tue Apr 12 01:19:23 2011
New Revision: 220555
URL: http://svn.freebsd.org/changeset/base/220555

Log:
  Even though this block is not compiled currently, properly assign
  CSUM_TSO to if_hwassist rather than if_capabilities to avoid future
  errors.
  
  Reviewed by:  jeff

Modified:
  head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c

Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
==
--- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue Apr 12 
00:38:22 2011(r220554)
+++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Tue Apr 12 
01:19:23 2011(r220555)
@@ -924,8 +924,10 @@ ipoib_set_dev_features(struct ipoib_dev_
}
 
 #if 0
-   if (priv-dev-features  NETIF_F_SG  priv-hca_caps  
IB_DEVICE_UD_TSO)
-   priv-dev-if_capabilities |= IFCAP_TSO4 | CSUM_TSO;
+   if (priv-dev-features  NETIF_F_SG  priv-hca_caps  
IB_DEVICE_UD_TSO) {
+   priv-dev-if_capabilities |= IFCAP_TSO4;
+   priv-dev-if_hwassist |= CSUM_TSO;
+   }
 #endif
 #endif
priv-dev-if_capabilities |=
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r220556 - head

2011-04-11 Thread Bjoern A. Zeeb
Author: bz
Date: Tue Apr 12 02:07:23 2011
New Revision: 220556
URL: http://svn.freebsd.org/changeset/base/220556

Log:
  If building (custom) FreeBSD images people tend to patch param.h.  In case
  this happens just before the build is started (within the same second)
  CHECK_TIME actually triggers thinking param.h is in the future (see f_Xtime,
  c_Xtime logi in find(1) sources for the details in !F_EXACTTIME case).
  Using the -mtime -0s (seconds, rather than no unit) avoids this 1s race.
  
  Submitted by: ed (2009-05-03)
  Reviewed by:  cperciva (2009-05-03), emaste
  Tested by:bz (for almost two years)
  MFC after:4 days

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Tue Apr 12 01:19:23 2011(r220555)
+++ head/Makefile   Tue Apr 12 02:07:23 2011(r220556)
@@ -214,7 +214,7 @@ ${TGTS}:
 .MAIN: all
 
 STARTTIME!= LC_ALL=C date
-CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0
+CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s
 .if !empty(CHECK_TIME)
 .error check your date/time: ${STARTTIME}
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org