svn commit: r189868 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Mon Mar 16 08:15:35 2009
New Revision: 189868
URL: http://svn.freebsd.org/changeset/base/189868

Log:
  Fix R600 writeback across suspend/resume.
  
  This is likely a NOOP for us, since I haven't ported the suspend/resume
  code yet.
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/r600_cp.c

Modified: head/sys/dev/drm/r600_cp.c
==
--- head/sys/dev/drm/r600_cp.c  Mon Mar 16 05:39:37 2009(r189867)
+++ head/sys/dev/drm/r600_cp.c  Mon Mar 16 08:15:35 2009(r189868)
@@ -1740,9 +1740,6 @@ static void r600_cp_init_ring_buffer(str
 
RADEON_WRITE(R600_CP_DEBUG, (1 << 27) | (1 << 28));
 
-   /* Start with assuming that writeback doesn't work */
-   dev_priv->writeback_works = 0;
-
/* Initialize the scratch register pointer.  This will cause
 * the scratch register values to be written out to memory
 * whenever they are updated.
___
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: r189869 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Mon Mar 16 08:19:11 2009
New Revision: 189869
URL: http://svn.freebsd.org/changeset/base/189869

Log:
  Get rid of any remaining PZERO flags in mtx_sleep()
  
  Also, clean up some ifdef mess while I'm here.
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drm_drv.c
  head/sys/dev/drm/drm_lock.c
  head/sys/dev/drm/radeon_cp.c

Modified: head/sys/dev/drm/drm_drv.c
==
--- head/sys/dev/drm/drm_drv.c  Mon Mar 16 08:15:35 2009(r189868)
+++ head/sys/dev/drm/drm_drv.c  Mon Mar 16 08:19:11 2009(r189869)
@@ -666,7 +666,7 @@ void drm_close(void *data)
}
/* Contention */
retcode = mtx_sleep((void *)&dev->lock.lock_queue,
-   &dev->dev_lock, PZERO | PCATCH, "drmlk2", 0);
+   &dev->dev_lock, PCATCH, "drmlk2", 0);
if (retcode)
break;
}

Modified: head/sys/dev/drm/drm_lock.c
==
--- head/sys/dev/drm/drm_lock.c Mon Mar 16 08:15:35 2009(r189868)
+++ head/sys/dev/drm/drm_lock.c Mon Mar 16 08:19:11 2009(r189869)
@@ -82,7 +82,7 @@ int drm_lock(struct drm_device *dev, voi
 
/* Contention */
ret = mtx_sleep((void *)&dev->lock.lock_queue, &dev->dev_lock,
-   PZERO | PCATCH, "drmlk2", 0);
+   PCATCH, "drmlk2", 0);
if (ret != 0)
break;
}

Modified: head/sys/dev/drm/radeon_cp.c
==
--- head/sys/dev/drm/radeon_cp.cMon Mar 16 08:15:35 2009
(r189868)
+++ head/sys/dev/drm/radeon_cp.cMon Mar 16 08:19:11 2009
(r189869)
@@ -1708,26 +1708,14 @@ void radeon_do_release(struct drm_device
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= 
CHIP_R600) {
while ((ret = r600_do_cp_idle(dev_priv)) != 0) {
DRM_DEBUG("radeon_do_cp_idle %d\n", 
ret);
-#ifdef __linux__
-   schedule();
-#elsif defined(__FreeBSD__)
mtx_sleep(&ret, &dev->dev_lock, 0,
"rdnrel", 1);
-#else
-   tsleep(&ret, PZERO, "rdnrel", 1);
-#endif
}
} else {
while ((ret = radeon_do_cp_idle(dev_priv)) != 
0) {
DRM_DEBUG("radeon_do_cp_idle %d\n", 
ret);
-#ifdef __linux__
-   schedule();
-#elsif defined(__FreeBSD__)
mtx_sleep(&ret, &dev->dev_lock, 0,
"rdnrel", 1);
-#else
-   tsleep(&ret, PZERO, "rdnrel", 1);
-#endif
}
}
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= 
CHIP_R600) {
___
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: r189870 - head/sys/dev/atkbdc

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Mon Mar 16 08:21:51 2009
New Revision: 189870
URL: http://svn.freebsd.org/changeset/base/189870

Log:
  Teach psm about O_ASYNC
  
  This makes Xorg happy if you aren't using moused.
  
  MFC after:3 days

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Mon Mar 16 08:19:11 2009(r189869)
+++ head/sys/dev/atkbdc/psm.c   Mon Mar 16 08:21:51 2009(r189870)
@@ -70,7 +70,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -299,6 +302,7 @@ struct psm_softc {  /* Driver status inf
struct cdev *bdev;
int lasterr;
int cmdcount;
+   struct sigio*async; /* Processes waiting for SIGIO */
 };
 static devclass_t psm_devclass;
 #definePSM_SOFTC(unit) \
@@ -1490,6 +1494,7 @@ psmopen(struct cdev *dev, int flag, int 
sc->mode.level = sc->dflt_mode.level;
sc->mode.protocol = sc->dflt_mode.protocol;
sc->watchdog = FALSE;
+   sc->async = NULL;
 
/* flush the event queue */
sc->queue.count = 0;
@@ -1629,6 +1634,12 @@ psmclose(struct cdev *dev, int flag, int
/* remove anything left in the output buffer */
empty_aux_buffer(sc->kbdc, 10);
 
+   /* clean up and sigio requests */
+   if (sc->async != NULL) {
+   funsetown(&sc->async);
+   sc->async = NULL;
+   }
+
/* close is almost always successful */
sc->state &= ~PSM_OPEN;
kbdc_lock(sc->kbdc, FALSE);
@@ -2190,6 +2201,15 @@ psmioctl(struct cdev *dev, u_long cmd, c
break;
 #endif /* MOUSE_GETHWID */
 
+   case FIONBIO:
+   case FIOASYNC:
+   break;
+   case FIOSETOWN:
+   error = fsetown(*(int *)addr, &sc->async);
+   break;
+   case FIOGETOWN:
+   *(int *) addr = fgetown(&sc->async);
+   break;
default:
return (ENOTTY);
}
@@ -3454,6 +3474,9 @@ next:
wakeup(sc);
}
selwakeuppri(&sc->rsel, PZERO);
+   if (sc->async != NULL) {
+   pgsigio(&sc->async, SIGIO, 0);
+   }
sc->state &= ~PSM_SOFTARMED;
splx(s);
 }
___
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: r189862 - head/sys/compat/linux

2009-03-16 Thread Alexander Leidinger
Quoting Dmitry Chagin  (from Sun, 15 Mar 2009  
19:38:34 + (UTC)):



Author: dchagin
Date: Sun Mar 15 19:38:34 2009
New Revision: 189862
URL: http://svn.freebsd.org/changeset/base/189862

Log:
  Ignore FUTEX_FD op, as it is done by linux.


It would be good if there would be a comment for this case, telling  
that this is done by Linux too, else someone may think it's a missing  
feature in FreeBSD.


Bye,
Alexander.

--
Philosophy will clip an angel's wings.
-- John Keats

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: r189862 - head/sys/compat/linux

2009-03-16 Thread Chagin Dmitry
On Mon, Mar 16, 2009 at 09:39:53AM +0100, Alexander Leidinger wrote:
> Quoting Dmitry Chagin  (from Sun, 15 Mar 2009  
> 19:38:34 + (UTC)):
> 
> > Author: dchagin
> > Date: Sun Mar 15 19:38:34 2009
> > New Revision: 189862
> > URL: http://svn.freebsd.org/changeset/base/189862
> >
> > Log:
> >   Ignore FUTEX_FD op, as it is done by linux.
> 
> It would be good if there would be a comment for this case, telling  
> that this is done by Linux too, else someone may think it's a missing  
> feature in FreeBSD.
> 

ok, thnx. bellow a commit msg about it.

commit 82af7aca56c67061420d618cc5a30f0fd4106b80
Author: Eric Sesterhenn 
Date:   Fri Jan 25 10:40:46 2008 +0100

Removal of FUTEX_FD

Since FUTEX_FD was scheduled for removal in June 2007 lets remove it.

Google Code search found no users for it and NGPT was abandoned in 2003
according to IBM.  futex.h is left untouched to make sure the id does
not get reassigned.  Since queue_me() has no users left it is commented
out to avoid a warning, i didnt remove it completely since it is part of
the internal api (matching unqueue_me())



-- 
Have fun!
chd


pgpR0oCRb6Mno.pgp
Description: PGP signature


svn commit: r189871 - head/sys/net

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 09:22:34 2009
New Revision: 189871
URL: http://svn.freebsd.org/changeset/base/189871

Log:
  if_hwassist should be initialized with CSUM, rather than IFCAP, flags.
  
  Submitted by: yongari
  MFC after:1 week

Modified:
  head/sys/net/if_loop.c

Modified: head/sys/net/if_loop.c
==
--- head/sys/net/if_loop.c  Mon Mar 16 08:21:51 2009(r189870)
+++ head/sys/net/if_loop.c  Mon Mar 16 09:22:34 2009(r189871)
@@ -138,8 +138,8 @@ lo_clone_create(struct if_clone *ifc, in
ifp->if_ioctl = loioctl;
ifp->if_output = looutput;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
-   ifp->if_hwassist = ifp->if_capabilities = ifp->if_capenable =
-   IFCAP_HWCSUM;
+   ifp->if_capabilities = ifp->if_capenable = IFCAP_HWCSUM;
+   ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP;
if_attach(ifp);
bpfattach(ifp, DLT_NULL, sizeof(u_int32_t));
if (V_loif == NULL)
___
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: r189872 - in head/sys: amd64/conf boot/forth

2009-03-16 Thread Dmitry Chagin
Author: dchagin
Date: Mon Mar 16 10:36:24 2009
New Revision: 189872
URL: http://svn.freebsd.org/changeset/base/189872

Log:
  Chase the k8temp->amdtemp rename in NOTES and loader.conf.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/amd64/conf/NOTES
  head/sys/boot/forth/loader.conf

Modified: head/sys/amd64/conf/NOTES
==
--- head/sys/amd64/conf/NOTES   Mon Mar 16 09:22:34 2009(r189871)
+++ head/sys/amd64/conf/NOTES   Mon Mar 16 10:36:24 2009(r189872)
@@ -400,10 +400,10 @@ deviceichwd
 # Temperature sensors:
 #
 # coretemp: on-die sensor on Intel Core and newer CPUs
-# k8temp: on-die sensor on AMD K8 CPUs
+# amdtemp: on-die sensor on AMD K8/K10/K11 CPUs
 #
 device coretemp
-device k8temp
+device amdtemp
 
 #
 # CPU control pseudo-device. Provides access to MSRs, CPUID info and

Modified: head/sys/boot/forth/loader.conf
==
--- head/sys/boot/forth/loader.conf Mon Mar 16 09:22:34 2009
(r189871)
+++ head/sys/boot/forth/loader.conf Mon Mar 16 10:36:24 2009
(r189872)
@@ -402,7 +402,7 @@ accf_http_load="NO" # Wait for full HTT
 random_load="NO"   # Random device
 speaker_load="NO"  # AT speaker module
 coretemp_load="NO" # Intel Core CPU temperature monitor
-k8temp_load="NO"   # AMD K8 temperature monitor
+amdtemp_load="NO"  # AMD K8/K10/K11 temperature monitor
 
 ##
 ###  ACPI settings  ##
___
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: r189873 - head/sys/net

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 10:56:50 2009
New Revision: 189873
URL: http://svn.freebsd.org/changeset/base/189873

Log:
  Define and use two macros for loopback checksum offload:
  
  LO_CSUM_FEATURES - a bitmask of supported transmit offload features, which
will be stored in if_hwassist if IFCAP_TXCSUM is enabled, and be cleared
from mbuf packet header csum flags on transmit. (1)
  
  LO_CSUM_SET - a bitmask of supported receive offload features, which will
be set on the mbuf packet header csum flags on transmit if IFCAP_RXCSUM
is enabled.
  
  While here, fix SCTP offload for loopback: offer generation on the
  transmit side, don't just skip validation on the receive side.
  
  Obtained from:  DragonflyBSD (1)
  MFC after:  1 week

Modified:
  head/sys/net/if_loop.c

Modified: head/sys/net/if_loop.c
==
--- head/sys/net/if_loop.c  Mon Mar 16 10:36:24 2009(r189872)
+++ head/sys/net/if_loop.c  Mon Mar 16 10:56:50 2009(r189873)
@@ -94,6 +94,11 @@
 #define LOMTU  16384
 #endif
 
+#defineLO_CSUM_FEATURES(CSUM_IP | CSUM_TCP | CSUM_UDP | 
CSUM_SCTP)
+#defineLO_CSUM_SET (CSUM_DATA_VALID | CSUM_PSEUDO_HDR | \
+   CSUM_IP_CHECKED | CSUM_IP_VALID | \
+   CSUM_SCTP_VALID)
+
 intloioctl(struct ifnet *, u_long, caddr_t);
 static voidlortrequest(int, struct rtentry *, struct rt_addrinfo *);
 intlooutput(struct ifnet *ifp, struct mbuf *m,
@@ -139,7 +144,7 @@ lo_clone_create(struct if_clone *ifc, in
ifp->if_output = looutput;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
ifp->if_capabilities = ifp->if_capenable = IFCAP_HWCSUM;
-   ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP;
+   ifp->if_hwassist = LO_CSUM_FEATURES;
if_attach(ifp);
bpfattach(ifp, DLT_NULL, sizeof(u_int32_t));
if (V_loif == NULL)
@@ -216,11 +221,9 @@ looutput(struct ifnet *ifp, struct mbuf 
case AF_INET:
if (ifp->if_capenable & IFCAP_RXCSUM) {
m->m_pkthdr.csum_data = 0x;
-   m->m_pkthdr.csum_flags = CSUM_DATA_VALID |
-   CSUM_PSEUDO_HDR | CSUM_IP_CHECKED |
-   CSUM_IP_VALID | CSUM_SCTP_VALID;
+   m->m_pkthdr.csum_flags = LO_CSUM_SET;
}
-   m->m_pkthdr.csum_flags &= ~(CSUM_IP | CSUM_TCP | CSUM_UDP);
+   m->m_pkthdr.csum_flags &= ~LO_CSUM_FEATURES;
case AF_INET6:
case AF_IPX:
case AF_APPLETALK:
@@ -407,7 +410,7 @@ loioctl(struct ifnet *ifp, u_long cmd, c
if ((mask & IFCAP_TXCSUM) != 0)
ifp->if_capenable ^= IFCAP_TXCSUM;
if (ifp->if_capenable & IFCAP_TXCSUM)
-   ifp->if_hwassist = CSUM_IP | CSUM_TCP | CSUM_UDP;
+   ifp->if_hwassist = LO_CSUM_FEATURES;
else
ifp->if_hwassist = 0;
break;
___
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: r189874 - head/sys/compat/ndis

2009-03-16 Thread Weongyo Jeong
Author: weongyo
Date: Mon Mar 16 11:19:07 2009
New Revision: 189874
URL: http://svn.freebsd.org/changeset/base/189874

Log:
  use usb2_desc_foreach() to iterate the USB config descriptor instread of
  accessing structures directly to check some invalid descriptors.
  
  Pointed by:   hps

Modified:
  head/sys/compat/ndis/subr_usbd.c

Modified: head/sys/compat/ndis/subr_usbd.c
==
--- head/sys/compat/ndis/subr_usbd.cMon Mar 16 10:56:50 2009
(r189873)
+++ head/sys/compat/ndis/subr_usbd.cMon Mar 16 11:19:07 2009
(r189874)
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -1206,12 +1207,11 @@ USBD_ParseConfigurationDescriptorEx(conf
int32_t intfsubclass;
int32_t intfproto;
 {
-   char *pos;
+   struct usb2_descriptor *next = NULL;
usb_interface_descriptor_t *desc;
 
-   for (pos = start; pos < ((char *)conf + UGETW(conf->wTotalLength));
-pos += desc->bLength) {
-   desc = (usb_interface_descriptor_t *)pos;
+   while ((next = usb2_desc_foreach(conf, next)) != NULL) {
+   desc = (usb_interface_descriptor_t *)next;
if (desc->bDescriptorType != UDESC_INTERFACE)
continue;
if (!(intfnum == -1 || desc->bInterfaceNumber == intfnum))
___
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: r189875 - head/bin/cat

2009-03-16 Thread Dag-Erling Smorgrav
Author: des
Date: Mon Mar 16 12:16:17 2009
New Revision: 189875
URL: http://svn.freebsd.org/changeset/base/189875

Log:
  cat(1) compiles fine at WARNS level 6.

Modified:
  head/bin/cat/Makefile

Modified: head/bin/cat/Makefile
==
--- head/bin/cat/Makefile   Mon Mar 16 11:19:07 2009(r189874)
+++ head/bin/cat/Makefile   Mon Mar 16 12:16:17 2009(r189875)
@@ -2,5 +2,6 @@
 # $FreeBSD$
 
 PROG=  cat
+WARNS?=6
 
 .include 
___
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: r189876 - head/sys/dev/sound/pci/hda

2009-03-16 Thread Alexander Motin
Author: mav
Date: Mon Mar 16 12:42:23 2009
New Revision: 189876
URL: http://svn.freebsd.org/changeset/base/189876

Log:
  Fix spelling in message.

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Mon Mar 16 12:16:17 2009
(r189875)
+++ head/sys/dev/sound/pci/hda/hdac.c   Mon Mar 16 12:42:23 2009
(r189876)
@@ -7923,9 +7923,9 @@ hdac_pcm_attach(device_t dev)
device_printf(dev, 
"+--+\n");
hdac_dump_pcmchannels(pdevinfo);
device_printf(dev, "\n");
-   device_printf(dev, "++\n");
-   device_printf(dev, "| DUMPING Playback/Record Pathes |\n");
-   device_printf(dev, "++\n");
+   device_printf(dev, "+---+\n");
+   device_printf(dev, "| DUMPING Playback/Record Paths |\n");
+   device_printf(dev, "+---+\n");
hdac_dump_dac(pdevinfo);
hdac_dump_adc(pdevinfo);
hdac_dump_mix(pdevinfo);
___
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: r189877 - head/contrib/libpcap

2009-03-16 Thread VANHULLEBUS Yvan
Author: vanhu
Date: Mon Mar 16 15:09:47 2009
New Revision: 189877
URL: http://svn.freebsd.org/changeset/base/189877

Log:
  Added DLT_ENC to map list, so it is now possible
  to save dumps on enc0
  
  Reviewed by:  gnn(mentor)
  Obtained from:NETASQ
  MFC after:1 week

Modified:
  head/contrib/libpcap/savefile.c

Modified: head/contrib/libpcap/savefile.c
==
--- head/contrib/libpcap/savefile.c Mon Mar 16 12:42:23 2009
(r189876)
+++ head/contrib/libpcap/savefile.c Mon Mar 16 15:09:47 2009
(r189877)
@@ -811,6 +811,9 @@ static struct linktype_map {
/* IPMB */
{ DLT_IPMB, LINKTYPE_IPMB },
 
+   /* enc0 device */
+   { DLT_ENC, LINKTYPE_ENC },
+
{ -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"


svn commit: r189878 - in head/sys: gnu/fs/xfs/FreeBSD kern sys ufs/ffs

2009-03-16 Thread Konstantin Belousov
Author: kib
Date: Mon Mar 16 15:39:46 2009
New Revision: 189878
URL: http://svn.freebsd.org/changeset/base/189878

Log:
  Fix two issues with bufdaemon, often causing the processes to hang in
  the "nbufkv" sleep.
  
  First, ffs background cg group block write requests a new buffer for
  the shadow copy. When ffs_bufwrite() is called from the bufdaemon due
  to buffers shortage, requesting the buffer deadlock bufdaemon.
  Introduce a new flag for getnewbuf(), GB_NOWAIT_BD, to request getblk
  to not block while allocating the buffer, and return failure
  instead. Add a flag argument to the geteblk to allow to pass the flags
  to getblk(). Do not repeat the getnewbuf() call from geteblk if buffer
  allocation failed and either GB_NOWAIT_BD is specified, or geteblk()
  is called from bufdaemon (or its helper, see below). In
  ffs_bufwrite(), fall back to synchronous cg block write if shadow
  block allocation failed.
  
  Since r107847, buffer write assumes that vnode owning the buffer is
  locked. The second problem is that buffer cache may accumulate many
  buffers belonging to limited number of vnodes. With such workload,
  quite often threads that own the mentioned vnodes locks are trying to
  read another block from the vnodes, and, due to buffer cache
  exhaustion, are asking bufdaemon for help. Bufdaemon is unable to make
  any substantial progress because the vnodes are locked.
  
  Allow the threads owning vnode locks to help the bufdaemon by doing
  the flush pass over the buffer cache before getnewbuf() is going to
  uninterruptible sleep. Move the flushing code from buf_daemon() to new
  helper function buf_do_flush(), that is called from getnewbuf().  The
  number of buffers flushed by single call to buf_do_flush() from
  getnewbuf() is limited by new sysctl vfs.flushbufqtarget.  Prevent
  recursive calls to buf_do_flush() by marking the bufdaemon and threads
  that temporarily help bufdaemon by TDP_BUFNEED flag.
  
  In collaboration with:pho
  Reviewed by:   tegge (previous version)
  Tested by: glebius, yandex ...
  MFC after: 3 weeks

Modified:
  head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
  head/sys/kern/vfs_bio.c
  head/sys/sys/buf.h
  head/sys/sys/proc.h
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c
==
--- head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c   Mon Mar 16 15:09:47 2009
(r189877)
+++ head/sys/gnu/fs/xfs/FreeBSD/xfs_buf.c   Mon Mar 16 15:39:46 2009
(r189878)
@@ -81,7 +81,7 @@ xfs_buf_get_empty(size_t size,  xfs_buft
 {
struct buf *bp;
 
-   bp = geteblk(0);
+   bp = geteblk(0, 0);
if (bp != NULL) {
bp->b_bufsize = size;
bp->b_bcount = size;
@@ -100,7 +100,7 @@ xfs_buf_get_noaddr(size_t len, xfs_bufta
if (len >= MAXPHYS)
return (NULL);
 
-   bp = geteblk(len);
+   bp = geteblk(len, 0);
if (bp != NULL) {
BUF_ASSERT_HELD(bp);
 

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Mon Mar 16 15:09:47 2009(r189877)
+++ head/sys/kern/vfs_bio.c Mon Mar 16 15:39:46 2009(r189878)
@@ -106,7 +106,8 @@ static void vfs_setdirty_locked_object(s
 static void vfs_vmio_release(struct buf *bp);
 static int vfs_bio_clcheck(struct vnode *vp, int size,
daddr_t lblkno, daddr_t blkno);
-static int flushbufqueues(int, int);
+static int buf_do_flush(struct vnode *vp);
+static int flushbufqueues(struct vnode *, int, int);
 static void buf_daemon(void);
 static void bremfreel(struct buf *bp);
 #if defined(COMPAT_FREEBSD4) || defined(COMPAT_FREEBSD5) || \
@@ -198,6 +199,9 @@ SYSCTL_INT(_vfs, OID_AUTO, getnewbufcall
 static int getnewbufrestarts;
 SYSCTL_INT(_vfs, OID_AUTO, getnewbufrestarts, CTLFLAG_RW, &getnewbufrestarts, 
0,
 "Number of times getnewbuf has had to restart a buffer aquisition");
+static int flushbufqtarget = 100;
+SYSCTL_INT(_vfs, OID_AUTO, flushbufqtarget, CTLFLAG_RW, &flushbufqtarget, 0,
+"Amount of work to do in flushbufqueues when helping bufdaemon");
 
 /*
  * Wakeup point for bufdaemon, as well as indicator of whether it is already
@@ -258,6 +262,7 @@ static struct mtx nblock;
 #define QUEUE_DIRTY_GIANT 3/* B_DELWRI buffers that need giant */
 #define QUEUE_EMPTYKVA 4   /* empty buffer headers w/KVA assignment */
 #define QUEUE_EMPTY5   /* empty buffer headers */
+#define QUEUE_SENTINEL 1024/* not an queue index, but mark for sentinel */
 
 /* Queues for free buffers with various properties */
 static TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES] = { { 0 } };
@@ -1710,21 +1715,23 @@ vfs_bio_awrite(struct buf *bp)
  */
 
 static struct buf *
-getnewbuf(int slpflag, int slptimeo, int size, int maxsize)
+getnewbuf(struct vnode *vp, int slpflag, int slptimeo, int size, int maxsize,
+

svn commit: r189879 - head/sys/dev/sound/pci/hda

2009-03-16 Thread Alexander Motin
Author: mav
Date: Mon Mar 16 15:50:29 2009
New Revision: 189879
URL: http://svn.freebsd.org/changeset/base/189879

Log:
  Remove CD input hack for ALC268 based Acer systems. Latest systems does not
  implement CD input in hardware, while unconditional showing it confuse users.
  Also it was made in the way that sometimes improper with present driver.
  
  Add patch for ALC268 based Acer TM5320 to make headphones jack sensing work.
  Default configuration defines two separate playback associations, which
  current driver unable to trace properly due to order they are defined and
  limited codec uniformity.
  
  Submitted by: G. Mirov 

Modified:
  head/sys/dev/sound/pci/hda/hdac.c

Modified: head/sys/dev/sound/pci/hda/hdac.c
==
--- head/sys/dev/sound/pci/hda/hdac.c   Mon Mar 16 15:39:46 2009
(r189878)
+++ head/sys/dev/sound/pci/hda/hdac.c   Mon Mar 16 15:50:29 2009
(r189879)
@@ -83,7 +83,7 @@
 
 #include "mixer_if.h"
 
-#define HDA_DRV_TEST_REV   "20090226_0129"
+#define HDA_DRV_TEST_REV   "20090316_0130"
 
 SND_DECLARE_FILE("$FreeBSD$");
 
@@ -247,6 +247,7 @@ SND_DECLARE_FILE("$FreeBSD$");
 #define ACER_A4715_SUBVENDOR   HDA_MODEL_CONSTRUCT(ACER, 0x0133)
 #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110)
 #define ACER_T6292_SUBVENDOR   HDA_MODEL_CONSTRUCT(ACER, 0x011b)
+#define ACER_T5320_SUBVENDOR   HDA_MODEL_CONSTRUCT(ACER, 0x011f)
 #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x)
 
 /* Asus */
@@ -2452,13 +2453,14 @@ hdac_widget_pin_getconfig(struct hdac_wi
patch = "seq=15 device=Headphones";
break;
}
-   } else if (id == HDA_CODEC_ALC268 &&
-   HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, sc->pci_subvendor)) {
+   } else if (id == HDA_CODEC_ALC268) {
+   if (sc->pci_subvendor == ACER_T5320_SUBVENDOR) {
switch (nid) {
-   case 28:
-   patch = "device=CD conn=fixed";
+   case 20: /* Headphones Jack */
+   patch = "as=1 seq=15";
break;
}
+   }
}
 
if (patch != NULL)
___
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: r189880 - head/share/man/man8

2009-03-16 Thread Sam Leffler
Author: sam
Date: Mon Mar 16 15:54:21 2009
New Revision: 189880
URL: http://svn.freebsd.org/changeset/base/189880

Log:
  (finally) document -n

Modified:
  head/share/man/man8/nanobsd.8

Modified: head/share/man/man8/nanobsd.8
==
--- head/share/man/man8/nanobsd.8   Mon Mar 16 15:50:29 2009
(r189879)
+++ head/share/man/man8/nanobsd.8   Mon Mar 16 15:54:21 2009
(r189880)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 28, 2006
+.Dd March 16, 2009
 .Dt NANOBSD 8
 .Os
 .Sh NAME
@@ -33,7 +33,7 @@
 applications
 .Sh SYNOPSIS
 .Nm
-.Op Fl bhkw
+.Op Fl bhknw
 .Op Fl c Ar config-file
 .Sh DESCRIPTION
 The
@@ -59,6 +59,12 @@ Display usage information.
 Skip the
 .Cm buildkernel
 stage of the build.
+.It Fl n
+Do not cleanup before each build stage.
+This suppresses the normal cleanup work done before the
+.Cm buildworld
+stage and adds -DNO_CLEAN to the make command line
+used for each build stage (world and kernel).
 .It Fl w
 Skip the
 .Cm buildworld
___
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: r189881 - svnadmin/conf

2009-03-16 Thread Joseph Koshy
Author: jkoshy
Date: Mon Mar 16 16:14:26 2009
New Revision: 189881
URL: http://svn.freebsd.org/changeset/base/189881

Log:
  Please welcome Fabien Thomas (fabient) to the ranks of FreeBSD's
  "src" committers.
  
  Fabien will be working on PMC related things.  I will be his mentor.
  
  Approved by:  core

Modified:
  svnadmin/conf/access
  svnadmin/conf/mentors

Modified: svnadmin/conf/access
==
--- svnadmin/conf/accessMon Mar 16 15:54:21 2009(r189880)
+++ svnadmin/conf/accessMon Mar 16 16:14:26 2009(r189881)
@@ -72,6 +72,7 @@ emaste
 emax
 eri
 erik
+fabient
 fanf
 fjoe
 flz

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Mon Mar 16 15:54:21 2009(r189880)
+++ svnadmin/conf/mentors   Mon Mar 16 16:14:26 2009(r189881)
@@ -14,6 +14,7 @@ avg   rpaulo  Co-mentor: jhb
 cbzimmer   sam
 dchaginkib
 erimlaier  Co-mentor: thompsa
+fabientjkoshy
 jamie  bz  Co-mentor: brooks
 rdivacky   ed
 remko  imp
___
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: r189882 - head/sys/pci

2009-03-16 Thread Andriy Gapon
Author: avg
Date: Mon Mar 16 16:15:14 2009
New Revision: 189882
URL: http://svn.freebsd.org/changeset/base/189882

Log:
  intpm: minor enhancements
  
  1. fix nointr check in intsmb_start, matters only if ENABLE_ALART is
 defined (by default, it is not);
  2. drop unnecessary inspection/reporting of power-management io registers
 base address;
  3. in verbose mode report errors from SMBus host controller and their
 mapping to smbus(4) errors;
  
  Approved by:  jhb (mentor)

Modified:
  head/sys/pci/intpm.c

Modified: head/sys/pci/intpm.c
==
--- head/sys/pci/intpm.cMon Mar 16 16:14:26 2009(r189881)
+++ head/sys/pci/intpm.cMon Mar 16 16:15:14 2009(r189882)
@@ -167,10 +167,6 @@ intsmb_attach(device_t dev)
goto fail;
}
 
-   value = pci_read_config(dev, PCI_BASE_ADDR_PM, 4);
-   device_printf(dev, "PM %s %x\n", (value & 1) ? "I/O mapped" : "Memory",
-   value & 0xfffe);
-
sc->isbusy = 0;
sc->smbus = device_add_child(dev, "smbus", -1);
if (sc->smbus == NULL) {
@@ -365,13 +361,13 @@ intsmb_start(struct intsmb_softc *sc, un
tmp |= PIIX4_SMBHSTCNT_START;
 
/* While not in autoconfiguration enable interrupts. */
-   if (!cold || !nointr)
+   if (!cold && !nointr)
tmp |= PIIX4_SMBHSTCNT_INTREN;
bus_write_1(sc->io_res, PIIX4_SMBHSTCNT, tmp);
 }
 
 static int
-intsmb_error(int status)
+intsmb_error(device_t dev, int status)
 {
int error = 0;
 
@@ -381,6 +377,10 @@ intsmb_error(int status)
error |= SMB_ECOLLI;
if (status & PIIX4_SMBHSTSTAT_FAIL)
error |= SMB_ENOACK;
+
+   if (error != 0 && bootverbose)
+   device_printf(dev, "error = %d, status = %#x\n", error, status);
+
return (error);
 }
 
@@ -410,7 +410,7 @@ intsmb_stop_poll(struct intsmb_softc *sc
status = bus_read_1(sc->io_res, PIIX4_SMBHSTSTS);
if (!(status & PIIX4_SMBHSTSTAT_BUSY)) {
sc->isbusy = 0;
-   error = intsmb_error(status);
+   error = intsmb_error(sc->dev, status);
if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR))
device_printf(sc->dev, "unknown cause why?\n");
return (error);
@@ -442,7 +442,7 @@ intsmb_stop(struct intsmb_softc *sc)
if (error == 0) {
status = bus_read_1(sc->io_res, PIIX4_SMBHSTSTS);
if (!(status & PIIX4_SMBHSTSTAT_BUSY)) {
-   error = intsmb_error(status);
+   error = intsmb_error(sc->dev, status);
if (error == 0 && !(status & PIIX4_SMBHSTSTAT_INTR))
device_printf(sc->dev, "unknown cause why?\n");
 #ifdef ENABLE_ALART
___
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: r189883 - head/lib/libc/nls

2009-03-16 Thread Gabor Kovesdan
Author: gabor (doc,ports committer)
Date: Mon Mar 16 16:33:08 2009
New Revision: 189883
URL: http://svn.freebsd.org/changeset/base/189883

Log:
  - Add Brazilian Portuguese catalog [1]
  - Fixes for German catalog [2]
  
  PR:   kern/132694 [1], conf/80504 [2]
  Submitted by: Murilo Opsfelder  [1],
brueffer [2]

Added:
  head/lib/libc/nls/pt_BR.ISO8859-1.msg   (contents, props changed)
Modified:
  head/lib/libc/nls/Makefile.inc
  head/lib/libc/nls/de_DE.ISO8859-1.msg

Modified: head/lib/libc/nls/Makefile.inc
==
--- head/lib/libc/nls/Makefile.inc  Mon Mar 16 16:15:14 2009
(r189882)
+++ head/lib/libc/nls/Makefile.inc  Mon Mar 16 16:33:08 2009
(r189883)
@@ -27,6 +27,7 @@ NLS+= mn_MN.UTF-8
 NLS+=  nl_NL.ISO8859-1
 NLS+=  no_NO.ISO8859-1
 NLS+=  pl_PL.ISO8859-2
+NLS+=  pt_BR.ISO8859-1
 NLS+=  ru_RU.KOI8-R
 NLS+=  sk_SK.ISO8859-2
 NLS+=  sv_SE.ISO8859-1

Modified: head/lib/libc/nls/de_DE.ISO8859-1.msg
==
--- head/lib/libc/nls/de_DE.ISO8859-1.msg   Mon Mar 16 16:15:14 2009
(r189882)
+++ head/lib/libc/nls/de_DE.ISO8859-1.msg   Mon Mar 16 16:33:08 2009
(r189883)
@@ -24,13 +24,13 @@ $ ENOEXEC
 $ EBADF
 9 Ung�ltiger Dateideskriptor
 $ ECHILD
-10 Kein Kindprozess
+10 Keine Kindprozesse
 $ EDEADLK
 11 Ein Deadlock wurde vermieden
 $ ENOMEM
 12 Kann nicht genug Speicher belegen
 $ EACCES
-13 Zugriff verboten
+13 Zugriff verweigert
 $ EFAULT
 14 Ung�ltige Adresse
 $ ENOTBLK
@@ -50,13 +50,13 @@ $ EISDIR
 $ EINVAL
 22 Ung�ltiges Argument
 $ ENFILE
-23 Zu viele offene Dateien im gesamten System
+23 Zu viele offene Dateien im System
 $ EMFILE
 24 Zu viele offene Dateien
 $ ENOTTY
-25 Ung�ltiger Ioctl f�r dieses Ger�t
+25 Ung�ltiger IOCTL f�r dieses Ger�t
 $ ETXTBSY
-26 Ausf�hrbare Datei wird benutzt
+26 Text-Datei ist belegt
 $ EFBIG
 27 Datei zu gro�
 $ ENOSPC
@@ -70,13 +70,13 @@ $ EMLINK
 $ EPIPE
 32 Unterbrochene Pipe
 $ EDOM
-33 Numerisches Argument ausserhalb des Wertebereichs
+33 Numerisches Argument au�erhalb des Wertebereichs
 $ ERANGE
-34 Ergebnis zu gro� oder zu klein
+34 Ergebnis zu gro�
 $ EAGAIN, EWOULDBLOCK
 35 Ressource vor�bergehend nicht verf�gbar
 $ EINPROGRESS
-36 Operation wird jetzt fortgesetzt
+36 Operation wird jetzt ausgef�hrt
 $ EALREADY
 37 Operation wird bereits ausgef�hrt
 $ ENOTSOCK
@@ -98,7 +98,7 @@ $ EOPNOTSUPP
 $ EPFNOSUPPORT
 46 Protokollfamilie nicht unterst�tzt
 $ EAFNOSUPPORT
-47 Addressart wird von der Protokollfamilie nicht unterst�tzt
+47 Adressfamilie wird von der Protokollfamilie nicht unterst�tzt
 $ EADDRINUSE
 48 Adresse wird bereits benutzt
 $ EADDRNOTAVAIL
@@ -142,7 +142,7 @@ $ EPROCLIM
 $ EUSERS
 68 Zu viele Benutzer
 $ EDQUOT
-69 Plattenplatzlimit ersch�pft
+69 Platzlimit �berschritten
 $ ESTALE
 70 Verwaister NFS-Dateideskriptor
 $ EREMOTE
@@ -150,7 +150,7 @@ $ EREMOTE
 $ EBADRPC
 72 RPC-Struktur ist ung�ltig
 $ ERPCMISMATCH
-73 RPC-Version stimmt nicht
+73 RPC-Version ist falsch
 $ EPROGUNAVAIL
 74 RPC-Programm nicht verf�gbar
 $ EPROGMISMATCH
@@ -164,7 +164,7 @@ $ ENOSYS
 $ EFTYPE
 79 Ung�ltiger Dateityp oder Dateiformat
 $ EAUTH
-80 Authentikationsfehler
+80 Authentifikationsfehler
 $ ENEEDAUTH
 81 Authentikator ben�tigt
 $ EIDRM
@@ -173,30 +173,14 @@ $ ENOMSG
 83 Keine Nachricht vom gew�nschten Typ
 $ EOVERFLOW
 84 Wert zu gro�, um in Datentyp zu speichern
-$ EILSEQ
-85 Illegale Byte-Sequenz
-$ ENOTSUP
-86 Operation nicht unterst�tzt
 $ ECANCELED
-87 Operation abgebrochen
-$ EBADMSG
-88 Ung�ltige Nachricht
-$ ENODATA
-89 Keine Nachricht verf�gbar
-$ ENOSR
-90 Keine STREAM-Ressourcen verf�gbar
-$ ENOSTR
-91 Kein STREAM
-$ ETIME
-92 Zeit�berschreitung bei STREAM Ioctl
+85 Operation abgebrochen
+$ EILSEQ
+86 Ung�ltige Byte-Sequenz
 $ ENOATTR
-93 Attribut nicht gefunden
-$ EMULTIHOP
-94 Multihopversuch
-$ ENOLINK
-95 Verbindung wurde getrennt
-$ EPROTO
-96 Protokollfehler
+87 Attribut nicht gefunden
+$ EDOOFUS
+88 Programmierfehler
 $
 $ strsignal() support catalog
 $
@@ -224,7 +208,7 @@ $ SIGBUS
 $ SIGSEGV
 11 Illegaler Speicherzugriff
 $ SIGSYS
-12 Ung�ltiger Systemaufruf
+12 Ung�ltiger Speicherzugriff
 $ SIGPIPE
 13 Unterbrochene Pipe
 $ SIGALRM
@@ -246,22 +230,20 @@ $ SIGTTIN
 $ SIGTTOU
 22 Gestoppt (Ausgabe)
 $ SIGIO
-23 Ein/Ausgabe ist m�glich
+23 Ein/Ausgabe m�glich
 $ SIGXCPU
-24 CPU-Zeitlimit ersch�pft
+24 CPU-Zeitlimit �berschritten
 $ SIGXFSZ
-25 Dateigr��e hat das Limit erreicht
+25 Dateigr��enlimit �berschritten
 $ SIGVTALRM
 26 Virtueller Wecker abgelaufen
 $ SIGPROF
 27 Profil-Wecker abgelaufen
 $ SIGWINCH
-28 Fenstergr��e hat sich ge�ndert
+28 Fenstergr��e hat sich ver�ndert
 $ SIGINFO
 29 Informationsanforderung
 $ SIGUSR1
 30 Benutzerdefiniertes Signal 1
 $ SIGUSR2
 31 Benutzerdefiniertes Signal 2
-$ SIGPWR
-32 Status�nderung der Energieversorgung

Added: head/lib/libc/nls/pt_BR.ISO8859-1.msg

Re: svn commit: r189877 - head/contrib/libpcap

2009-03-16 Thread Bjoern A. Zeeb

On Mon, 16 Mar 2009, VANHULLEBUS Yvan wrote:


Author: vanhu
Date: Mon Mar 16 15:09:47 2009
New Revision: 189877
URL: http://svn.freebsd.org/changeset/base/189877

Log:
 Added DLT_ENC to map list, so it is now possible
 to save dumps on enc0

 Reviewed by:   gnn(mentor)
 Obtained from: NETASQ
 MFC after: 1 week



If you haven't you should also submit this upstream as OpenBSD can
make use of that as well. (www.tcpdump.org)


All entries (that aren't overlong) are tab separated in in the
linktype_map map[]. It would be nice, to keep the style of the vendor.



Modified:
 head/contrib/libpcap/savefile.c

Modified: head/contrib/libpcap/savefile.c
==
--- head/contrib/libpcap/savefile.c Mon Mar 16 12:42:23 2009
(r189876)
+++ head/contrib/libpcap/savefile.c Mon Mar 16 15:09:47 2009
(r189877)
@@ -811,6 +811,9 @@ static struct linktype_map {
/* IPMB */
{ DLT_IPMB, LINKTYPE_IPMB },

+   /* enc0 device */
+   { DLT_ENC, LINKTYPE_ENC },
+
{ -1,   -1 }
};




--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
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: r189886 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb security/audit

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 16:57:04 2009
New Revision: 189886
URL: http://svn.freebsd.org/changeset/base/189886

Log:
  Merge r174894 from head to stable/7:
  
Change "audit_pipe_preselect" to "audit_pipe_presel" to make it print
with proper alignment in ddb(4) and vmstat(8).

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/security/audit/audit_pipe.c

Modified: stable/7/sys/security/audit/audit_pipe.c
==
--- stable/7/sys/security/audit/audit_pipe.cMon Mar 16 16:55:05 2009
(r189885)
+++ stable/7/sys/security/audit/audit_pipe.cMon Mar 16 16:57:04 2009
(r189886)
@@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$");
 static MALLOC_DEFINE(M_AUDIT_PIPE, "audit_pipe", "Audit pipes");
 static MALLOC_DEFINE(M_AUDIT_PIPE_ENTRY, "audit_pipeent",
 "Audit pipe entries and buffers");
-static MALLOC_DEFINE(M_AUDIT_PIPE_PRESELECT, "audit_pipe_preselect",
+static MALLOC_DEFINE(M_AUDIT_PIPE_PRESELECT, "audit_pipe_presel",
 "Audit pipe preselection structure");
 
 /*
___
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: r189887 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern security/audit

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:03:33 2009
New Revision: 189887
URL: http://svn.freebsd.org/changeset/base/189887

Log:
  Merge r182750, r182754 from head to stable/7:
  
If the process id specified is invalid, the system call returns ESRCH
  
Unbreak the build.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/kern_proc.c
  stable/7/sys/security/audit/audit_syscalls.c

Modified: stable/7/sys/kern/kern_proc.c
==
--- stable/7/sys/kern/kern_proc.c   Mon Mar 16 16:57:04 2009
(r189886)
+++ stable/7/sys/kern/kern_proc.c   Mon Mar 16 17:03:33 2009
(r189887)
@@ -994,10 +994,10 @@ sysctl_out_proc(struct proc *p, struct s
np = pfind(pid);
}
if (np == NULL)
-   return EAGAIN;
+   return (ESRCH);
if (np != p) {
PROC_UNLOCK(np);
-   return EAGAIN;
+   return (ESRCH);
}
PROC_UNLOCK(np);
return (0);

Modified: stable/7/sys/security/audit/audit_syscalls.c
==
--- stable/7/sys/security/audit/audit_syscalls.cMon Mar 16 16:57:04 
2009(r189886)
+++ stable/7/sys/security/audit/audit_syscalls.cMon Mar 16 17:03:33 
2009(r189887)
@@ -314,12 +314,12 @@ auditon(struct thread *td, struct audito
 
case A_GETPINFO:
if (udata.au_aupinfo.ap_pid < 1)
-   return (EINVAL);
+   return (ESRCH);
if ((tp = pfind(udata.au_aupinfo.ap_pid)) == NULL)
-   return (EINVAL);
-   if (p_cansee(td, tp) != 0) {
+   return (ESRCH);
+   if ((error = p_cansee(td, tp)) != 0) {
PROC_UNLOCK(tp);
-   return (EINVAL);
+   return (error);
}
cred = tp->p_ucred;
if (cred->cr_audit.ai_termid.at_type == AU_IPv6) {
@@ -341,16 +341,16 @@ auditon(struct thread *td, struct audito
 
case A_SETPMASK:
if (udata.au_aupinfo.ap_pid < 1)
-   return (EINVAL);
+   return (ESRCH);
newcred = crget();
if ((tp = pfind(udata.au_aupinfo.ap_pid)) == NULL) {
crfree(newcred);
-   return (EINVAL);
+   return (ESRCH);
}
-   if (p_cansee(td, tp) != 0) {
+   if ((error = p_cansee(td, tp)) != 0) {
PROC_UNLOCK(tp);
crfree(newcred);
-   return (EINVAL);
+   return (error);
}
oldcred = tp->p_ucred;
crcopy(newcred, oldcred);
@@ -377,9 +377,9 @@ auditon(struct thread *td, struct audito
 
case A_GETPINFO_ADDR:
if (udata.au_aupinfo_addr.ap_pid < 1)
-   return (EINVAL);
+   return (ESRCH);
if ((tp = pfind(udata.au_aupinfo_addr.ap_pid)) == NULL)
-   return (EINVAL);
+   return (ESRCH);
cred = tp->p_ucred;
udata.au_aupinfo_addr.ap_auid = cred->cr_audit.ai_auid;
udata.au_aupinfo_addr.ap_mask.am_success =
___
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: r189888 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb security/audit

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:08:10 2009
New Revision: 189888
URL: http://svn.freebsd.org/changeset/base/189888

Log:
  Merge r186662 from head to stable/7:
  
Fix white space botch: use carriage returns rather than tabs.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/security/audit/audit_pipe.c

Modified: stable/7/sys/security/audit/audit_pipe.c
==
--- stable/7/sys/security/audit/audit_pipe.cMon Mar 16 17:03:33 2009
(r189887)
+++ stable/7/sys/security/audit/audit_pipe.cMon Mar 16 17:08:10 2009
(r189888)
@@ -169,7 +169,8 @@ struct audit_pipe {
/*
 * Current pending record list.  Protected by a combination of ap_mtx
 * and ap_sx.  Note particularly that *both* locks are required to
-* remove a record from the head of the queue, as an in-progress read   
 * may sleep while copying and therefore cannot hold ap_mtx.
+* remove a record from the head of the queue, as an in-progress read
+* may sleep while copying and therefore cannot hold ap_mtx.
 */
TAILQ_HEAD(, audit_pipe_entry)   ap_queue;
 
___
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: r189889 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb security/audit

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:15:02 2009
New Revision: 189889
URL: http://svn.freebsd.org/changeset/base/189889

Log:
  Merge r186822 from head to stable/7:
  
In AUDIT_SYSCALL_EXIT(), invoke audit_syscall_exit() only if an audit
record is active on the current thread--historically we may always
have wanted to enter the audit code if auditing was enabled, but now
we just commit the audit record so don't need to enter if there isn't
one.
  
Obtained from:  TrustedBSD Project
Sponsored by:   Apple, Inc.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/security/audit/audit.h

Modified: stable/7/sys/security/audit/audit.h
==
--- stable/7/sys/security/audit/audit.h Mon Mar 16 17:08:10 2009
(r189888)
+++ stable/7/sys/security/audit/audit.h Mon Mar 16 17:15:02 2009
(r189889)
@@ -198,11 +198,11 @@ void   audit_thread_free(struct thread *t
 
 /*
  * Wrap the audit_syscall_exit() function so that it is called only when
- * auditing is enabled, or we have a audit record on the thread.  It is
- * possible that an audit record was begun before auditing was turned off.
+ * we have a audit record on the thread.  Audit records can persist after
+ * auditing is disabled, so we don't just check audit_enabled here.
  */
 #defineAUDIT_SYSCALL_EXIT(error, td)   do {
\
-   if (audit_enabled || (td->td_ar != NULL))   \
+   if (td->td_ar != NULL)  \
audit_syscall_exit(error, td);  \
 } while (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: r189890 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb security/audit sys

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:25:09 2009
New Revision: 189890
URL: http://svn.freebsd.org/changeset/base/189890

Log:
  Merge r189570 from head to stable/7:
  
Add a new thread-private flag, TDP_AUDITREC, to indicate whether or
not there is an audit record hung off of td_ar on the current thread.
Test this flag instead of td_ar when auditing syscall arguments or
checking for an audit record to commit on syscall return.  Under
these circumstances, td_pflags is much more likely to be in the cache
(especially if there is no auditing of the current system call), so
this should help reduce cache misses in the system call return path.
  
Reported by:kris
Obtained from:  TrustedBSD Project

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/security/audit/audit.c
  stable/7/sys/security/audit/audit.h
  stable/7/sys/security/audit/audit_syscalls.c
  stable/7/sys/sys/proc.h

Modified: stable/7/sys/security/audit/audit.c
==
--- stable/7/sys/security/audit/audit.c Mon Mar 16 17:15:02 2009
(r189889)
+++ stable/7/sys/security/audit/audit.c Mon Mar 16 17:25:09 2009
(r189890)
@@ -446,6 +446,8 @@ audit_syscall_enter(unsigned short code,
au_id_t auid;
 
KASSERT(td->td_ar == NULL, ("audit_syscall_enter: td->td_ar != NULL"));
+   KASSERT((td->td_pflags & TDP_AUDITREC) == 0,
+   ("audit_syscall_enter: TDP_AUDITREC set"));
 
/*
 * In FreeBSD, each ABI has its own system call table, and hence
@@ -496,9 +498,13 @@ audit_syscall_enter(unsigned short code,
panic("audit_failing_stop: thread continued");
}
td->td_ar = audit_new(event, td);
-   } else if (audit_pipe_preselect(auid, event, class, AU_PRS_BOTH, 0))
+   if (td->td_ar != NULL)
+   td->td_pflags |= TDP_AUDITREC;
+   } else if (audit_pipe_preselect(auid, event, class, AU_PRS_BOTH, 0)) {
td->td_ar = audit_new(event, td);
-   else
+   if (td->td_ar != NULL)
+   td->td_pflags |= TDP_AUDITREC;
+   } else
td->td_ar = NULL;
 }
 
@@ -526,6 +532,7 @@ audit_syscall_exit(int error, struct thr
 
audit_commit(td->td_ar, error, retval);
td->td_ar = NULL;
+   td->td_pflags &= ~TDP_AUDITREC;
 }
 
 void
@@ -580,6 +587,8 @@ audit_thread_free(struct thread *td)
 {
 
KASSERT(td->td_ar == NULL, ("audit_thread_free: td_ar != NULL"));
+   KASSERT((td->td_pflags & TDP_AUDITREC) == 0,
+   ("audit_thread_free: TDP_AUDITREC set"));
 }
 
 void

Modified: stable/7/sys/security/audit/audit.h
==
--- stable/7/sys/security/audit/audit.h Mon Mar 16 17:15:02 2009
(r189889)
+++ stable/7/sys/security/audit/audit.h Mon Mar 16 17:25:09 2009
(r189890)
@@ -186,7 +186,7 @@ void audit_thread_free(struct thread *t
  * audit_enabled flag before performing the actual call.
  */
 #defineAUDIT_ARG(op, args...)  do {
\
-   if (td->td_ar != NULL)  \
+   if (td->td_pflags & TDP_AUDITREC)   \
audit_arg_ ## op (args);\
 } while (0)
 
@@ -202,7 +202,7 @@ void audit_thread_free(struct thread *t
  * auditing is disabled, so we don't just check audit_enabled here.
  */
 #defineAUDIT_SYSCALL_EXIT(error, td)   do {
\
-   if (td->td_ar != NULL)  \
+   if (td->td_pflags & TDP_AUDITREC)   \
audit_syscall_exit(error, td);  \
 } while (0)
 
@@ -210,7 +210,7 @@ void audit_thread_free(struct thread *t
  * A Macro to wrap the audit_sysclose() function.
  */
 #defineAUDIT_SYSCLOSE(td, fd)  do {
\
-   if (audit_enabled)  \
+   if (td->td_pflags & TDP_AUDITREC)   \
audit_sysclose(td, fd); \
 } while (0)
 

Modified: stable/7/sys/security/audit/audit_syscalls.c
==
--- stable/7/sys/security/audit/audit_syscalls.cMon Mar 16 17:15:02 
2009(r189889)
+++ stable/7/sys/security/audit/audit_syscalls.cMon Mar 16 17:25:09 
2009(r189890)
@@ -96,6 +96,7 @@ audit(struct thread *td, struct audit_ar
td->td_ar = audit_new(AUE_NULL, td);
if (td->td_ar == NULL)
return (ENOTSUP)

svn commit: r189891 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:30:38 2009
New Revision: 189891
URL: http://svn.freebsd.org/changeset/base/189891

Log:
  Merge r189545 from head to stable/7:
  
  By default, don't compile in counters of calls to various time
  query functions in the kernel, as these effectively serialize
  parallel calls to the gettimeofday(2) system call, as well as
  other kernel services that use timestamps.
  
  Use the NetBSD version of the fix (kern_tc.c:1.32 by ad@) as
  they have picked up our timecounter code and also ran into the
  same problem.
  
  Reported by:kris
  Obtained from:  NetBSD

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/kern_tc.c

Modified: stable/7/sys/kern/kern_tc.c
==
--- stable/7/sys/kern/kern_tc.c Mon Mar 16 17:25:09 2009(r189890)
+++ stable/7/sys/kern/kern_tc.c Mon Mar 16 17:30:38 2009(r189891)
@@ -103,6 +103,7 @@ static int timestepwarnings;
 SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW,
 ×tepwarnings, 0, "");
 
+#ifdef TC_COUNTERS
 #define TC_STATS(foo) \
static u_int foo; \
SYSCTL_UINT(_kern_timecounter, OID_AUTO, foo, CTLFLAG_RD, &foo, 0, "");\
@@ -114,7 +115,11 @@ TC_STATS(ngetbinuptime); TC_STATS(ngetna
 TC_STATS(ngetbintime);   TC_STATS(ngetnanotime);   TC_STATS(ngetmicrotime);
 TC_STATS(nsetclock);
 
+#defineTC_COUNT(var)   var++
 #undef TC_STATS
+#else
+#defineTC_COUNT(var)   /* nothing */
+#endif /* TC_COUNTERS */
 
 static void tc_windup(void);
 static void cpu_tick_calibrate(int);
@@ -180,7 +185,7 @@ binuptime(struct bintime *bt)
struct timehands *th;
u_int gen;
 
-   nbinuptime++;
+   TC_COUNT(nbinuptime);
do {
th = timehands;
gen = th->th_generation;
@@ -194,7 +199,7 @@ nanouptime(struct timespec *tsp)
 {
struct bintime bt;
 
-   nnanouptime++;
+   TC_COUNT(nnanouptime);
binuptime(&bt);
bintime2timespec(&bt, tsp);
 }
@@ -204,7 +209,7 @@ microuptime(struct timeval *tvp)
 {
struct bintime bt;
 
-   nmicrouptime++;
+   TC_COUNT(nmicrouptime);
binuptime(&bt);
bintime2timeval(&bt, tvp);
 }
@@ -213,7 +218,7 @@ void
 bintime(struct bintime *bt)
 {
 
-   nbintime++;
+   TC_COUNT(nbintime);
binuptime(bt);
bintime_add(bt, &boottimebin);
 }
@@ -223,7 +228,7 @@ nanotime(struct timespec *tsp)
 {
struct bintime bt;
 
-   nnanotime++;
+   TC_COUNT(nnanotime);
bintime(&bt);
bintime2timespec(&bt, tsp);
 }
@@ -233,7 +238,7 @@ microtime(struct timeval *tvp)
 {
struct bintime bt;
 
-   nmicrotime++;
+   TC_COUNT(nmicrotime);
bintime(&bt);
bintime2timeval(&bt, tvp);
 }
@@ -244,7 +249,7 @@ getbinuptime(struct bintime *bt)
struct timehands *th;
u_int gen;
 
-   ngetbinuptime++;
+   TC_COUNT(ngetbinuptime);
do {
th = timehands;
gen = th->th_generation;
@@ -258,7 +263,7 @@ getnanouptime(struct timespec *tsp)
struct timehands *th;
u_int gen;
 
-   ngetnanouptime++;
+   TC_COUNT(ngetnanouptime);
do {
th = timehands;
gen = th->th_generation;
@@ -272,7 +277,7 @@ getmicrouptime(struct timeval *tvp)
struct timehands *th;
u_int gen;
 
-   ngetmicrouptime++;
+   TC_COUNT(ngetmicrouptime);
do {
th = timehands;
gen = th->th_generation;
@@ -286,7 +291,7 @@ getbintime(struct bintime *bt)
struct timehands *th;
u_int gen;
 
-   ngetbintime++;
+   TC_COUNT(ngetbintime);
do {
th = timehands;
gen = th->th_generation;
@@ -301,7 +306,7 @@ getnanotime(struct timespec *tsp)
struct timehands *th;
u_int gen;
 
-   ngetnanotime++;
+   TC_COUNT(ngetnanotime);
do {
th = timehands;
gen = th->th_generation;
@@ -315,7 +320,7 @@ getmicrotime(struct timeval *tvp)
struct timehands *th;
u_int gen;
 
-   ngetmicrotime++;
+   TC_COUNT(ngetmicrotime);
do {
th = timehands;
gen = th->th_generation;
@@ -406,7 +411,7 @@ tc_setclock(struct timespec *ts)
struct bintime bt, bt2;
 
cpu_tick_calibrate(1);
-   nsetclock++;
+   TC_COUNT(nsetclock);
nanotime(&tbef);
timespec2bintime(ts, &bt);
binuptime(&bt2);
___
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: r189892 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:46:55 2009
New Revision: 189892
URL: http://svn.freebsd.org/changeset/base/189892

Log:
  Merge r189655 from head to stable/7:
  
Prefer ENETDOWN to ENXIO when returning queuing errors due to a link
down, interface down, etc, with if_cxgb's if_transmit routine.
  
Reviewed by:  kmacy

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/cxgb/cxgb_multiq.c

Modified: stable/7/sys/dev/cxgb/cxgb_multiq.c
==
--- stable/7/sys/dev/cxgb/cxgb_multiq.c Mon Mar 16 17:30:38 2009
(r189891)
+++ stable/7/sys/dev/cxgb/cxgb_multiq.c Mon Mar 16 17:46:55 2009
(r189892)
@@ -131,7 +131,7 @@ cxgb_pcpu_enqueue_packet_(struct sge_qse
KASSERT(m->m_type == MT_DATA, ("bad mbuf type %d", m->m_type));
if (qs->qs_flags & QS_EXITING) {
m_freem(m);
-   return (ENXIO);
+   return (ENETDOWN);
}
txq = &qs->txq[TXQ_ETH];
err = buf_ring_enqueue(&txq->txq_mr, m);
@@ -425,13 +425,13 @@ cxgb_pcpu_start_(struct sge_qset *qs, st

  retry:
if (!pi->link_config.link_ok)
-   initerr = ENXIO;
+   initerr = ENETDOWN;
else if (qs->qs_flags & QS_EXITING)
-   initerr = ENXIO;
+   initerr = ENETDOWN;
else if ((pi->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
-   initerr = ENXIO;
+   initerr = ENETDOWN;
else if ((pi->ifp->if_flags & IFF_UP) == 0)
-   initerr = ENXIO;
+   initerr = ENETDOWN;
else if (immpkt) {
 
if (!buf_ring_empty(&txq->txq_mr)) 
___
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: r189893 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cm dev/cxgb

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:55:24 2009
New Revision: 189893
URL: http://svn.freebsd.org/changeset/base/189893

Log:
  Merge r188545 from head to stable/7:
  
Remove unused ifaddr and ifreq local variables.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cm/smc90cx6.c
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/dev/cm/smc90cx6.c
==
--- stable/7/sys/dev/cm/smc90cx6.c  Mon Mar 16 17:46:55 2009
(r189892)
+++ stable/7/sys/dev/cm/smc90cx6.c  Mon Mar 16 17:55:24 2009
(r189893)
@@ -861,14 +861,10 @@ cm_ioctl(ifp, command, data)
caddr_t data;
 {
struct cm_softc *sc;
-   struct ifaddr *ifa;
-   struct ifreq *ifr;
int error;
 
error = 0;
sc = ifp->if_softc;
-   ifa = (struct ifaddr *)data;
-   ifr = (struct ifreq *)data;
 
 #if defined(CM_DEBUG) && (CM_DEBUG > 2)
if_printf(ifp, "ioctl() called, cmd = 0x%lx\n", command);
___
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: r189894 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb net

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 17:57:29 2009
New Revision: 189894
URL: http://svn.freebsd.org/changeset/base/189894

Log:
  Merge r188546 from head to stable/7:
  
Remove unused ifaddr local variable in ioctl routine.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/net/if_vlan.c

Modified: stable/7/sys/net/if_vlan.c
==
--- stable/7/sys/net/if_vlan.c  Mon Mar 16 17:55:24 2009(r189893)
+++ stable/7/sys/net/if_vlan.c  Mon Mar 16 17:57:29 2009(r189894)
@@ -1296,7 +1296,6 @@ vlan_trunk_capabilities(struct ifnet *if
 static int
 vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
-   struct ifaddr *ifa;
struct ifnet *p;
struct ifreq *ifr;
struct ifvlan *ifv;
@@ -1304,7 +1303,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd
int error = 0;
 
ifr = (struct ifreq *)data;
-   ifa = (struct ifaddr *)data;
ifv = ifp->if_softc;
 
switch (cmd) {
___
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: r189895 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 18:02:00 2009
New Revision: 189895
URL: http://svn.freebsd.org/changeset/base/189895

Log:
  Merge r188962 from head to stable/7:
  
In in_rtqkill(), assert the radix head lock, and pass RTF_RNH_LOCKED
to in_rtrequest(); the radix head lock is already acquired before
rnh_walktree is called in in_rtqtimo_one().  This avoids a recursive
acquisition that is no longer permitted in 8.x due to use of an rwlock
for the radix head lock.
  
Reported by:  dikshie 
  
  While not strictly required in 7.x, I am merging this to keep locking as
  consistent as possible in the routing code between 7.x and 8.x.  Note
  that because the rwlock change has not been merged, this becomes
  LOCK_ASSERT rather than WLOCK_ASSERT.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/netinet/in_rmx.c

Modified: stable/7/sys/netinet/in_rmx.c
==
--- stable/7/sys/netinet/in_rmx.c   Mon Mar 16 17:57:29 2009
(r189894)
+++ stable/7/sys/netinet/in_rmx.c   Mon Mar 16 18:02:00 2009
(r189895)
@@ -219,6 +219,8 @@ in_rtqkill(struct radix_node *rn, void *
struct rtentry *rt = (struct rtentry *)rn;
int err;
 
+   RADIX_NODE_HEAD_LOCK_ASSERT(ap->rnh);
+
if (rt->rt_flags & RTPRF_OURS) {
ap->found++;
 
@@ -229,7 +231,8 @@ in_rtqkill(struct radix_node *rn, void *
err = in_rtrequest(RTM_DELETE,
(struct sockaddr *)rt_key(rt),
rt->rt_gateway, rt_mask(rt),
-   rt->rt_flags, 0, rt->rt_fibnum);
+   rt->rt_flags | RTF_RNH_LOCKED, 0,
+   rt->rt_fibnum);
if (err) {
log(LOG_WARNING, "in_rtqkill: error %d\n", err);
} 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: r189896 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet6

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 18:05:31 2009
New Revision: 189896
URL: http://svn.freebsd.org/changeset/base/189896

Log:
  Merge r188963 from head to stable/7:
  
Assert the radix head lock in in6_rtqkill().

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/netinet6/in6_rmx.c

Modified: stable/7/sys/netinet6/in6_rmx.c
==
--- stable/7/sys/netinet6/in6_rmx.c Mon Mar 16 18:02:00 2009
(r189895)
+++ stable/7/sys/netinet6/in6_rmx.c Mon Mar 16 18:05:31 2009
(r189896)
@@ -289,6 +289,8 @@ in6_rtqkill(struct radix_node *rn, void 
struct rtentry *rt = (struct rtentry *)rn;
int err;
 
+   RADIX_NODE_HEAD_LOCK_ASSERT(ap->rnh);
+
if (rt->rt_flags & RTPRF_OURS) {
ap->found++;
 
___
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: r189897 - stable/7/share/man/man8

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 18:07:23 2009
New Revision: 189897
URL: http://svn.freebsd.org/changeset/base/189897

Log:
  Merge r189778 from head to stable/7:
  
Don't suggest mounting procfs in diskless configurations.

Modified:
  stable/7/share/man/man8/   (props changed)
  stable/7/share/man/man8/diskless.8

Modified: stable/7/share/man/man8/diskless.8
==
--- stable/7/share/man/man8/diskless.8  Mon Mar 16 18:05:31 2009
(r189896)
+++ stable/7/share/man/man8/diskless.8  Mon Mar 16 18:07:23 2009
(r189897)
@@ -376,7 +376,6 @@ As a minimum, you normally need to have 
 .Bd -literal -offset indent
 : / nfsro 0 0
 :/usr   /usr  nfsro 0 0
-proc/proc procfs rw 0 0
 .Ed
 .Pp
 You also need to create a customized version of
___
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: r189898 - stable/7/sys/netinet6

2009-03-16 Thread Robert Watson
Author: rwatson
Date: Mon Mar 16 18:15:52 2009
New Revision: 189898
URL: http://svn.freebsd.org/changeset/base/189898

Log:
  Merge adding RTF_RNH_LOCKED to the flags argument of rtrequest() in
  in6_rtqkill(), making it match in_rtqkill().
  
  This change appeared in 8.x as part of the arpv2 merge (r186119) but
  that isn't appropriate to merge.

Modified:
  stable/7/sys/netinet6/in6_rmx.c

Modified: stable/7/sys/netinet6/in6_rmx.c
==
--- stable/7/sys/netinet6/in6_rmx.c Mon Mar 16 18:07:23 2009
(r189897)
+++ stable/7/sys/netinet6/in6_rmx.c Mon Mar 16 18:15:52 2009
(r189898)
@@ -301,7 +301,7 @@ in6_rtqkill(struct radix_node *rn, void 
err = rtrequest(RTM_DELETE,
(struct sockaddr *)rt_key(rt),
rt->rt_gateway, rt_mask(rt),
-   rt->rt_flags, 0);
+   rt->rt_flags|RTF_RNH_LOCKED, 0);
if (err) {
log(LOG_WARNING, "in6_rtqkill: error %d", err);
} 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"


Re: svn commit: r189765 - in head: . lib/libc lib/libc/nls

2009-03-16 Thread Ulrich Spörlein
On Fri, 13.03.2009 at 14:22:16 -0400, David Schultz wrote:
> On Fri, Mar 13, 2009, Sean C. Farley wrote:
> > Now, you only need to revive the BSD-licensed libiconv[1].  :)
> [...]
> >   1. http://people.freebsd.org/~bland/iconv-2.1.tar.gz
> 
> I asked a few weeks ago on standards@ why we weren't using Citrus
> iconv, which is what NetBSD uses, and seems to be in a somewhat
> better state than this. It also provides various wide character
> conversion routines that overlap with what tjr@ has already done
> in FreeBSD, so we'd have to sort that out. And we'd have to sort
> out a gazillion ports that want -liconv.

I, for one, would love to see some iconv overlo^Wsupport in base. That
way, I could teach calendar(1) to translate stuff to LC_CTYPE, right now
the German calendar file is saved in Latin1 whereas I'm using UTF-8
terminals :/

Cheers,
Ulrich Spörlein
-- 
None are more hopelessly enslaved than those who falsely believe they are free
-- Johann Wolfgang von Goethe
___
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: r189899 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Mon Mar 16 19:09:59 2009
New Revision: 189899
URL: http://svn.freebsd.org/changeset/base/189899

Log:
  Use the right MSI_REARM for RS600.
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/radeon_irq.c

Modified: head/sys/dev/drm/radeon_irq.c
==
--- head/sys/dev/drm/radeon_irq.c   Mon Mar 16 18:15:52 2009
(r189898)
+++ head/sys/dev/drm/radeon_irq.c   Mon Mar 16 19:09:59 2009
(r189899)
@@ -229,6 +229,7 @@ irqreturn_t radeon_driver_irq_handler(DR
RADEON_WRITE(RADEON_AIC_CNTL,
tmp | RS400_MSI_REARM);
break;
+   case CHIP_RS600:
case CHIP_RS690:
case CHIP_RS740:
tmp = RADEON_READ(RADEON_BUS_CNTL) &
___
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: r189900 - head/sys/geom/eli

2009-03-16 Thread Pawel Jakub Dawidek
Author: pjd
Date: Mon Mar 16 19:31:08 2009
New Revision: 189900
URL: http://svn.freebsd.org/changeset/base/189900

Log:
  Detach GELI providers on shutdown/reboot, which will allow providers 
underneath
  to close properly.
  
  Reported, reviewed and tested by: guido
  MFC after:1 week

Modified:
  head/sys/geom/eli/g_eli.c

Modified: head/sys/geom/eli/g_eli.c
==
--- head/sys/geom/eli/g_eli.c   Mon Mar 16 19:09:59 2009(r189899)
+++ head/sys/geom/eli/g_eli.c   Mon Mar 16 19:31:08 2009(r189900)
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -81,8 +82,12 @@ TUNABLE_INT("kern.geom.eli.batch", &g_el
 SYSCTL_UINT(_kern_geom_eli, OID_AUTO, batch, CTLFLAG_RW, &g_eli_batch, 0,
 "Use crypto operations batching");
 
+static eventhandler_tag g_eli_pre_sync = NULL;
+
 static int g_eli_destroy_geom(struct gctl_req *req, struct g_class *mp,
 struct g_geom *gp);
+static void g_eli_init(struct g_class *mp);
+static void g_eli_fini(struct g_class *mp);
 
 static g_taste_t g_eli_taste;
 static g_dumpconf_t g_eli_dumpconf;
@@ -92,7 +97,9 @@ struct g_class g_eli_class = {
.version = G_VERSION,
.ctlreq = g_eli_config,
.taste = g_eli_taste,
-   .destroy_geom = g_eli_destroy_geom
+   .destroy_geom = g_eli_destroy_geom,
+   .init = g_eli_init,
+   .fini = g_eli_fini
 };
 
 
@@ -1075,5 +1082,52 @@ g_eli_dumpconf(struct sbuf *sb, const ch
g_eli_algo2str(sc->sc_ealgo));
 }
 
+static void
+g_eli_shutdown_pre_sync(void *arg, int howto)
+{
+   struct g_class *mp;
+   struct g_geom *gp, *gp2;
+   struct g_provider *pp;
+   struct g_eli_softc *sc;
+   int error;
+
+   mp = arg;
+   DROP_GIANT();
+   g_topology_lock();
+   LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) {
+   sc = gp->softc;
+   if (sc == NULL)
+   continue;
+   pp = LIST_FIRST(&gp->provider);
+   KASSERT(pp != NULL, ("No provider? gp=%p (%s)", gp, gp->name));
+   if (pp->acr + pp->acw + pp->ace == 0)
+   error = g_eli_destroy(sc, 1);
+   else {
+   sc->sc_flags |= G_ELI_FLAG_RW_DETACH;
+   gp->access = g_eli_access;
+   }
+   }
+   g_topology_unlock();
+   PICKUP_GIANT();
+}
+
+static void
+g_eli_init(struct g_class *mp)
+{
+
+   g_eli_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync,
+   g_eli_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST);
+   if (g_eli_pre_sync == NULL)
+   G_ELI_DEBUG(0, "Warning! Cannot register shutdown event.");
+}
+
+static void
+g_eli_fini(struct g_class *mp)
+{
+
+   if (g_eli_pre_sync != NULL)
+   EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_eli_pre_sync);
+}
+
 DECLARE_GEOM_CLASS(g_eli_class, g_eli);
 MODULE_DEPEND(g_eli, crypto, 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: r189850 - in head: . lib/libc/nls

2009-03-16 Thread M. Warner Losh
In message: <20090315150740.gz31...@hoeg.nl>
Ed Schouten  writes:
: * Gabor Kovesdan  wrote:
: > - Create the buildworld object directories with mtree instead of various
: >   mkdir calls
: > - Remove the ugly workaroung from libc NLS, which was to create some of
: >   these directories
: 
: Thank you! I actually needed something similar for my FreeBSD+Clang
: patchset. ;-)

Thanks Gabor for following through with this!

Warner
___
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: r189902 - head/contrib/wpa/wpa_supplicant

2009-03-16 Thread Doug Barton
Author: dougb
Date: Mon Mar 16 23:56:28 2009
New Revision: 189902
URL: http://svn.freebsd.org/changeset/base/189902

Log:
  Add some notes and clarify a few sections:
  1. Add a note to double-check the man page
  2. Remove windows-specific items in the ctrl_interface section
  3. Add a note that ap_scan must be set to 1 for use with wlan
  4. Clarify the wording for scan_ssid related to APs that hide ssid
  5. Clarify the wording for the priority option

Modified:
  head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf

Modified: head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf
==
--- head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf Mon Mar 16 23:08:38 
2009(r189901)
+++ head/contrib/wpa/wpa_supplicant/wpa_supplicant.conf Mon Mar 16 23:56:28 
2009(r189902)
@@ -1,5 +1,7 @@
 # Example wpa_supplicant configuration file ###
 #
+# * Please check wpa_supplicant.conf(5) for details on these options *
+#
 # This file describes configuration file format and lists all available option.
 # Please also take a look at simpler configuration examples in 'examples'
 # subdirectory.
@@ -59,19 +61,6 @@
 # DIR=/var/run/wpa_supplicant GROUP=0
 # (group can be either group name or gid)
 #
-# For UDP connections (default on Windows): The value will be ignored. This
-# variable is just used to select that the control interface is to be created.
-# The value can be set to, e.g., udp (ctrl_interface=udp)
-#
-# For Windows Named Pipe: This value can be used to set the security descriptor
-# for controlling access to the control interface. Security descriptor can be
-# set using Security Descriptor String Format (see http://msdn.microsoft.com/
-# library/default.asp?url=/library/en-us/secauthz/security/
-# security_descriptor_string_format.asp). The descriptor string needs to be
-# prefixed with SDDL=. For example, ctrl_interface=SDDL=D: would set an empty
-# DACL (which will reject all connections). See README-Windows.txt for more
-# information about SDDL string format.
-#
 ctrl_interface=/var/run/wpa_supplicant
 
 # IEEE 802.1X/EAPOL version
@@ -102,6 +91,8 @@ eapol_version=1
 #the driver reports successful association; each network block should have
 #explicit security policy (i.e., only one option in the lists) for
 #key_mgmt, pairwise, group, proto variables
+#
+# For use in FreeBSD with the wlan module ap_scan must be set to 1.
 ap_scan=1
 
 # EAP fast re-authentication
@@ -221,7 +212,7 @@ fast_reauth=1
 # scan_ssid:
 #  0 = do not scan this SSID with specific Probe Request frames (default)
 #  1 = scan with SSID-specific Probe Request frames (this can be used to
-#  find APs that do not accept broadcast SSID or use multiple SSIDs;
+#  find APs that hide (do not broadcast) SSID or use multiple SSIDs;
 #  this will add latency to scanning, so enable this only when needed)
 #
 # bssid: BSSID (optional); if set, this network block is used only when
@@ -237,7 +228,7 @@ fast_reauth=1
 # policy, signal strength, etc.
 # Please note that AP scanning with scan_ssid=1 and ap_scan=2 mode are not
 # using this priority to select the order for scanning. Instead, they try the
-# networks in the order that used in the configuration file.
+# networks in the order that they are listed in the configuration file.
 #
 # mode: IEEE 802.11 operation mode
 # 0 = infrastructure (Managed) mode, i.e., associate with an AP (default)
___
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: r189903 - in head/sys: amd64/acpica amd64/amd64 amd64/include conf dev/acpica i386/i386 kern sys

2009-03-16 Thread Jung-uk Kim
Author: jkim
Date: Tue Mar 17 00:48:11 2009
New Revision: 189903
URL: http://svn.freebsd.org/changeset/base/189903

Log:
  Initial suspend/resume support for amd64.
  
  This code is heavily inspired by Takanori Watanabe's experimental SMP patch
  for i386 and large portion was shamelessly cut and pasted from Peter Wemm's
  AP boot code.

Added:
  head/sys/amd64/acpica/Makefile   (contents, props changed)
  head/sys/amd64/acpica/acpi_switch.S   (contents, props changed)
  head/sys/amd64/acpica/acpi_wakecode.S   (contents, props changed)
  head/sys/amd64/acpica/genwakecode.sh   (contents, props changed)
  head/sys/amd64/acpica/genwakedata.sh   (contents, props changed)
Modified:
  head/sys/amd64/acpica/acpi_machdep.c
  head/sys/amd64/acpica/acpi_wakeup.c
  head/sys/amd64/amd64/amd64_mem.c
  head/sys/amd64/amd64/apic_vector.S
  head/sys/amd64/amd64/cpu_switch.S
  head/sys/amd64/amd64/db_trace.c
  head/sys/amd64/amd64/genassym.c
  head/sys/amd64/amd64/mp_machdep.c
  head/sys/amd64/include/apicvar.h
  head/sys/amd64/include/pcb.h
  head/sys/amd64/include/smp.h
  head/sys/conf/files.amd64
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_ec.c
  head/sys/i386/i386/i686_mem.c
  head/sys/i386/i386/k6_mem.c
  head/sys/kern/subr_smp.c
  head/sys/sys/memrange.h
  head/sys/sys/smp.h

Added: head/sys/amd64/acpica/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/amd64/acpica/Makefile  Tue Mar 17 00:48:11 2009
(r189903)
@@ -0,0 +1,33 @@
+# $FreeBSD$
+
+# Correct path for kernel builds
+# Don't rely on the kernel's .depend file
+.ifdef MAKESRCPATH
+.PATH: ${MAKESRCPATH}
+DEPENDFILE=
+.else
+MAKESRCPATH= ${.CURDIR}
+CLEANFILES= acpi_wakecode.h acpi_wakedata.h acpi_wakecode.bin acpi_wakecode.o
+.endif
+.if ${CC} == "icc"
+CFLAGS+=   -restrict
+NOSTDINC=  -X
+.else
+NOSTDINC=  -nostdinc
+.endif
+CFLAGS+=   ${NOSTDINC} -include opt_global.h -I. -I${MAKESRCPATH}/../..
+
+all: acpi_wakecode.h acpi_wakedata.h
+
+acpi_wakecode.o: acpi_wakecode.S assym.s
+
+acpi_wakecode.bin: acpi_wakecode.o
+   objcopy -S -O binary acpi_wakecode.o acpi_wakecode.bin
+
+acpi_wakecode.h: acpi_wakecode.bin
+   sh ${MAKESRCPATH}/genwakecode.sh > acpi_wakecode.h
+
+acpi_wakedata.h: acpi_wakecode.bin
+   sh ${MAKESRCPATH}/genwakedata.sh > acpi_wakedata.h
+
+.include 

Modified: head/sys/amd64/acpica/acpi_machdep.c
==
--- head/sys/amd64/acpica/acpi_machdep.cMon Mar 16 23:56:28 2009
(r189902)
+++ head/sys/amd64/acpica/acpi_machdep.cTue Mar 17 00:48:11 2009
(r189903)
@@ -31,25 +31,50 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 
 #include 
 
+SYSCTL_DECL(_debug_acpi);
+
+uint32_t acpi_resume_beep;
+TUNABLE_INT("debug.acpi.resume_beep", &acpi_resume_beep);
+SYSCTL_UINT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RW, &acpi_resume_beep,
+0, "Beep the PC speaker when resuming");
+uint32_t acpi_reset_video;
+TUNABLE_INT("hw.acpi.reset_video", &acpi_reset_video);
+
 static int intr_model = ACPI_INTR_PIC;
+static struct apm_clone_data acpi_clone;
 
 int
 acpi_machdep_init(device_t dev)
 {
-   struct  acpi_softc *sc;
+   struct acpi_softc   *sc;
 
sc = devclass_get_softc(devclass_find("acpi"), 0);
+
+   /* Create a fake clone for /dev/acpi. */
+   STAILQ_INIT(&sc->apm_cdevs);
+   acpi_clone.cdev = sc->acpi_dev_t;
+   acpi_clone.acpi_sc = sc;
+   ACPI_LOCK(acpi);
+   STAILQ_INSERT_TAIL(&sc->apm_cdevs, &acpi_clone, entries);
+   ACPI_UNLOCK(acpi);
+   sc->acpi_clone = &acpi_clone;
acpi_install_wakeup_handler(sc);
 
if (intr_model != ACPI_INTR_PIC)
acpi_SetIntrModel(intr_model);
 
+   SYSCTL_ADD_UINT(&sc->acpi_sysctl_ctx,
+   SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO,
+   "reset_video", CTLFLAG_RW, &acpi_reset_video, 0,
+   "Call the VESA reset BIOS vector on the resume path");
+
return (0);
 }
 

Added: head/sys/amd64/acpica/acpi_switch.S
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/amd64/acpica/acpi_switch.S Tue Mar 17 00:48:11 2009
(r189903)
@@ -0,0 +1,177 @@
+/*-
+ * Copyright (c) 2001 Takanori Watanabe 
+ * Copyright (c) 2001 Mitsuru IWASAKI 
+ * Copyright (c) 2008-2009 Jung-uk Kim 
+ * 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 lis

Re: svn commit: r189903 - in head/sys: amd64/acpica amd64/amd64 amd64/include conf dev/acpica i386/i386 kern sys

2009-03-16 Thread Jung-uk Kim
On Monday 16 March 2009 08:48 pm, Jung-uk Kim wrote:
> Author: jkim
> Date: Tue Mar 17 00:48:11 2009
> New Revision: 189903
> URL: http://svn.freebsd.org/changeset/base/189903
>
> Log:
>   Initial suspend/resume support for amd64.
>
>   This code is heavily inspired by Takanori Watanabe's experimental
> SMP patch for i386 and large portion was shamelessly cut and pasted
> from Peter Wemm's AP boot code.

Older revision was:

Reviewed by:jhb, mav
Tested by:  mav

Jung-uk Kim
___
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: r189904 - head/sys/dev/usb

2009-03-16 Thread Andrew Thompson
Author: thompsa
Date: Tue Mar 17 01:38:51 2009
New Revision: 189904
URL: http://svn.freebsd.org/changeset/base/189904

Log:
  Add Supertop IDE adapter and Quickcam entries.

Modified:
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsTue Mar 17 00:48:11 2009(r189903)
+++ head/sys/dev/usb/usbdevsTue Mar 17 01:38:51 2009(r189904)
@@ -593,6 +593,7 @@ vendor SILICOM  0x1485  Silicom
 vendor RALINK  0x148f  Ralink Technology
 vendor IMAGINATION 0x149a  Imagination Technologies
 vendor CONCEPTRONIC2   0x14b2  Conceptronic
+vendor SUPERTOP0x14cd  Super Top
 vendor PLANEX3 0x14ea  Planex Communications
 vendor SILICONPORTALS  0x1527  Silicon Portals
 vendor UBIQUAM 0x1529  UBIQUAM Co., Ltd.
@@ -1632,6 +1633,7 @@ product LOGITECH QUICKCAMWEB  0x0801  Quic
 product LOGITECH QUICKCAMPRO   0x0810  QuickCam Pro
 product LOGITECH QUICKCAMEXP   0x0840  QuickCam Express
 product LOGITECH QUICKCAM  0x0850  QuickCam
+product LOGITECH QUICKCAMPRO3  0x0990  QuickCam Pro 9000
 product LOGITECH N43   0xc000  N43
 product LOGITECH N48   0xc001  N48 mouse
 product LOGITECH MBA47 0xc002  M-BA47 mouse
@@ -2312,6 +2314,9 @@ product SUN KEYBOARD  0x0005  Type 6 USB 
 /* XXX The above is a North American PC style keyboard possibly */
 product SUN MOUSE  0x0100  Type 6 USB mouse
 
+/* Super Top products */
+productSUPERTOP IDE0x6600  USB-IDE
+
 /* Supra products */
 product DIAMOND2 SUPRAEXPRESS56K 0x07daSupra Express 56K modem
 product DIAMOND2 SUPRA2890 0x0b4a  SupraMax 2890 56K 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"


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

2009-03-16 Thread Andrew Thompson
Author: thompsa
Date: Tue Mar 17 01:42:46 2009
New Revision: 189905
URL: http://svn.freebsd.org/changeset/base/189905

Log:
  MFp4 //depot/projects/usb 159238,159275
  
  Add umass quirks.
  
  Submitted by: Michael Gmelin

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

Modified: head/sys/dev/usb/storage/umass.c
==
--- head/sys/dev/usb/storage/umass.cTue Mar 17 01:38:51 2009
(r189904)
+++ head/sys/dev/usb/storage/umass.cTue Mar 17 01:42:46 2009
(r189905)
@@ -609,7 +609,7 @@ static const struct umass_devdescr umass
},
{USB_VENDOR_MYSON, USB_PRODUCT_MYSON_HEDEN, RID_WILDCARD,
UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
-   NO_INQUIRY | IGNORE_RESIDUE
+   NO_INQUIRY | IGNORE_RESIDUE | NO_SYNCHRONIZE_CACHE
},
{USB_VENDOR_MYSON, USB_PRODUCT_MYSON_STARREADER, RID_WILDCARD,
UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
@@ -847,6 +847,10 @@ static const struct umass_devdescr umass
UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
NO_QUIRKS
},
+   {USB_VENDOR_SUPERTOP, USB_PRODUCT_SUPERTOP_IDE, RID_WILDCARD,
+   UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+   IGNORE_RESIDUE | NO_SYNCHRONIZE_CACHE
+   },
{USB_VENDOR_TAUGA, USB_PRODUCT_TAUGA_CAMERAMATE, RID_WILDCARD,
UMASS_PROTO_SCSI,
NO_QUIRKS
@@ -2022,7 +2026,7 @@ umass_t_bbb_status_callback(struct usb2_
 
residue = UGETDW(sc->csw.dCSWDataResidue);
 
-   if (!residue) {
+   if ((!residue) || (sc->sc_quirks & IGNORE_RESIDUE)) {
residue = (sc->sc_transfer.data_len -
sc->sc_transfer.actlen);
}
___
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: r189906 - in head/sys/dev/usb: . image serial

2009-03-16 Thread Andrew Thompson
Author: thompsa
Date: Tue Mar 17 01:46:40 2009
New Revision: 189906
URL: http://svn.freebsd.org/changeset/base/189906

Log:
  MFp4 //depot/projects/usb 159225,159241,159292
  
  Fix regression issue in the USB file system interface.
   - Use cdev_privdata pointer as indicator of correct file handle.
   - Remove redundant FIFO opened flags.
  
  Don't send ZLP at close for ulpt and uscanner devices as this causes some
  models to stop working. This reverts back to the USB1 behaviour.
  
  Submitted by: Hans Petter Selasky

Modified:
  head/sys/dev/usb/image/uscanner.c
  head/sys/dev/usb/serial/ulpt.c
  head/sys/dev/usb/usb_dev.c
  head/sys/dev/usb/usb_dev.h
  head/sys/dev/usb/usb_device.h

Modified: head/sys/dev/usb/image/uscanner.c
==
--- head/sys/dev/usb/image/uscanner.c   Tue Mar 17 01:42:46 2009
(r189905)
+++ head/sys/dev/usb/image/uscanner.c   Tue Mar 17 01:46:40 2009
(r189906)
@@ -149,7 +149,7 @@ static const struct usb2_config uscanner
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.mh.bufsize = USCANNER_BSIZE,
-   .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,.proxy_buffer 
= 1,.force_short_xfer = 1,},
+   .mh.flags = {.pipe_bof = 1,.proxy_buffer = 1,},
.mh.callback = &uscanner_write_callback,
},
 

Modified: head/sys/dev/usb/serial/ulpt.c
==
--- head/sys/dev/usb/serial/ulpt.c  Tue Mar 17 01:42:46 2009
(r189905)
+++ head/sys/dev/usb/serial/ulpt.c  Tue Mar 17 01:46:40 2009
(r189906)
@@ -200,7 +200,8 @@ ulpt_write_callback(struct usb2_xfer *xf
DPRINTF("no FIFO\n");
return;
}
-   DPRINTF("state=0x%x\n", USB_GET_STATE(xfer));
+   DPRINTF("state=0x%x actlen=%u\n",
+   USB_GET_STATE(xfer), xfer->actlen);
 
switch (USB_GET_STATE(xfer)) {
case USB_ST_TRANSFERRED:
@@ -208,7 +209,6 @@ ulpt_write_callback(struct usb2_xfer *xf
 tr_setup:
if (usb2_fifo_get_data(f, xfer->frbuffers,
0, xfer->max_data_length, &actlen, 0)) {
-
xfer->frlengths[0] = actlen;
usb2_start_hardware(xfer);
}
@@ -339,7 +339,7 @@ static const struct usb2_config ulpt_con
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.mh.bufsize = ULPT_BSIZE,
-   .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,.proxy_buffer 
= 1},
+   .mh.flags = {.pipe_bof = 1,.proxy_buffer = 1},
.mh.callback = &ulpt_write_callback,
},
 

Modified: head/sys/dev/usb/usb_dev.c
==
--- head/sys/dev/usb/usb_dev.c  Tue Mar 17 01:42:46 2009(r189905)
+++ head/sys/dev/usb/usb_dev.c  Tue Mar 17 01:46:40 2009(r189906)
@@ -72,7 +72,8 @@ SYSCTL_INT(_hw_usb2_dev, OID_AUTO, debug
 
 /* prototypes */
 
-static int usb2_fifo_open(struct usb2_fifo *, int);
+static int usb2_fifo_open(struct usb2_cdev_privdata *, 
+   struct usb2_fifo *, int);
 static voidusb2_fifo_close(struct usb2_fifo *, int);
 static voidusb2_dev_init(void *);
 static voidusb2_dev_init_post(void *);
@@ -160,7 +161,6 @@ usb2_ref_device(struct usb2_cdev_privdat
 {
struct usb2_fifo **ppf;
struct usb2_fifo *f;
-   int dev_ep_index;
 
DPRINTFN(2, "usb2_ref_device, cpd=%p need uref=%d\n", cpd, need_uref);
 
@@ -180,7 +180,6 @@ usb2_ref_device(struct usb2_cdev_privdat
goto error;
}
/* check if we are doing an open */
-   dev_ep_index = cpd->ep_addr;
if (cpd->fflags == 0) {
/* set defaults */
cpd->txfifo = NULL;
@@ -200,15 +199,12 @@ usb2_ref_device(struct usb2_cdev_privdat
cpd->is_write = 1;  /* ref */
if (f == NULL || f->refcount == USB_FIFO_REF_MAX)
goto error;
+   if (f->curr_cpd != cpd)
+   goto error;
/* check if USB-FS is active */
if (f->fs_ep_max != 0) {
cpd->is_usbfs = 1;
}
-   /*
-* Get real endpoint index associated with
-* this FIFO:
-*/
-   dev_ep_index = f->dev_ep_index;
} else {
cpd->txfifo = NULL;
cpd->is_write = 0;  /* no ref */
@@ -222,15 +218,12 @@ usb2_ref_device(struct usb2_cdev_privdat
cpd->is_read = 1;   /* ref */
if (f == NULL || f->refcount == USB_FIFO_REF_MAX)

svn commit: r189907 - head/sys/net

2009-03-16 Thread Sean Farley
Author: scf
Date: Tue Mar 17 02:32:36 2009
New Revision: 189907
URL: http://svn.freebsd.org/changeset/base/189907

Log:
  Remove the splimp()/splx() calls around the setting of the MTU.  They are
  no-op's that I inadvertently added.  Even if locking is needed in general
  for the ioctl's, setting a single long will not need it due to the operation
  being atomic.
  
  Reported by:  rwatson

Modified:
  head/sys/net/if_tap.c

Modified: head/sys/net/if_tap.c
==
--- head/sys/net/if_tap.c   Tue Mar 17 01:46:40 2009(r189906)
+++ head/sys/net/if_tap.c   Tue Mar 17 02:32:36 2009(r189907)
@@ -611,9 +611,7 @@ tapifioctl(struct ifnet *ifp, u_long cmd
break;
 
case SIOCSIFMTU:
-   s = splimp();
ifp->if_mtu = ifr->ifr_mtu;
-   splx(s);
break;
 
case SIOCGIFSTATUS:
___
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: r189908 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:32:12 2009
New Revision: 189908
URL: http://svn.freebsd.org/changeset/base/189908

Log:
  Use flsl() here rather than ffsl()
  
  I discovered that we were computing page_order differently than linux.
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drm_bufs.c

Modified: head/sys/dev/drm/drm_bufs.c
==
--- head/sys/dev/drm/drm_bufs.c Tue Mar 17 02:32:36 2009(r189907)
+++ head/sys/dev/drm/drm_bufs.c Tue Mar 17 03:32:12 2009(r189908)
@@ -1106,7 +1106,7 @@ int drm_order(unsigned long size)
if (size == 0)
return 0;
 
-   order = ffsl(size) - 1;
+   order = flsl(size) - 1;
if (size & ~(1ul << order))
++order;
 
___
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: r189909 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:36:24 2009
New Revision: 189909
URL: http://svn.freebsd.org/changeset/base/189909

Log:
  Change the logic around to match ati_pcigart.
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/r600_cp.c

Modified: head/sys/dev/drm/r600_cp.c
==
--- head/sys/dev/drm/r600_cp.c  Tue Mar 17 03:32:12 2009(r189908)
+++ head/sys/dev/drm/r600_cp.c  Tue Mar 17 03:36:24 2009(r189909)
@@ -174,7 +174,6 @@ int r600_page_table_init(struct drm_devi
if (entry->busaddr[i] == 0) {
DRM_ERROR("unable to map PCIGART pages!\n");
r600_page_table_cleanup(dev, gart_info);
-   ret = -EINVAL;
goto done;
}
 #endif
@@ -193,6 +192,7 @@ int r600_page_table_init(struct drm_devi
entry_addr += ATI_PCIGART_PAGE_SIZE;
}
}
+   ret = 1;
 #ifdef __linux__
 done:
 #endif
@@ -2100,7 +2100,7 @@ int r600_do_init_cp(struct drm_device *d
  dev_priv->gart_info.addr,
  dev_priv->pcigart_offset);
 
-   if (r600_page_table_init(dev)) {
+   if (!r600_page_table_init(dev)) {
DRM_ERROR("Failed to init GART table\n");
r600_do_cleanup_cp(dev);
return -EINVAL;
___
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: r189910 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:39:09 2009
New Revision: 189910
URL: http://svn.freebsd.org/changeset/base/189910

Log:
  Cast register maps and offsets to vm_offset_t
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drmP.h

Modified: head/sys/dev/drm/drmP.h
==
--- head/sys/dev/drm/drmP.h Tue Mar 17 03:36:24 2009(r189909)
+++ head/sys/dev/drm/drmP.h Tue Mar 17 03:39:09 2009(r189910)
@@ -240,17 +240,23 @@ typedef u_int8_t u8;
 #endif
 
 #define DRM_READ8(map, offset) \
-   *(volatile u_int8_t *) (((unsigned long)(map)->handle) + (offset))
+   *(volatile u_int8_t *)(((vm_offset_t)(map)->handle) +   \
+   (vm_offset_t)(offset))
 #define DRM_READ16(map, offset)
\
-   *(volatile u_int16_t *) (((unsigned long)(map)->handle) + (offset))
+   *(volatile u_int16_t *)(((vm_offset_t)(map)->handle) +  \
+   (vm_offset_t)(offset))
 #define DRM_READ32(map, offset)
\
-   *(volatile u_int32_t *)(((unsigned long)(map)->handle) + (offset))
+   *(volatile u_int32_t *)(((vm_offset_t)(map)->handle) +  \
+   (vm_offset_t)(offset))
 #define DRM_WRITE8(map, offset, val)   \
-   *(volatile u_int8_t *) (((unsigned long)(map)->handle) + (offset)) = val
+   *(volatile u_int8_t *)(((vm_offset_t)(map)->handle) +   \
+   (vm_offset_t)(offset)) = val
 #define DRM_WRITE16(map, offset, val)  \
-   *(volatile u_int16_t *) (((unsigned long)(map)->handle) + (offset)) = 
val
+   *(volatile u_int16_t *)(((vm_offset_t)(map)->handle) +  \
+   (vm_offset_t)(offset)) = val
 #define DRM_WRITE32(map, offset, val)  \
-   *(volatile u_int32_t *)(((unsigned long)(map)->handle) + (offset)) = val
+   *(volatile u_int32_t *)(((vm_offset_t)(map)->handle) +  \
+   (vm_offset_t)(offset)) = val
 
 #define DRM_VERIFYAREA_READ( uaddr, size ) \
(!useracc(__DECONST(caddr_t, uaddr), size, VM_PROT_READ))
___
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: r189911 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:44:36 2009
New Revision: 189911
URL: http://svn.freebsd.org/changeset/base/189911

Log:
  We can have more than 3 pci resources
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drmP.h

Modified: head/sys/dev/drm/drmP.h
==
--- head/sys/dev/drm/drmP.h Tue Mar 17 03:39:09 2009(r189910)
+++ head/sys/dev/drm/drmP.h Tue Mar 17 03:44:36 2009(r189911)
@@ -613,7 +613,7 @@ struct drm_driver_info {
 };
 
 /* Length for the array of resource pointers for drm_get_resource_*. */
-#define DRM_MAX_PCI_RESOURCE   3
+#define DRM_MAX_PCI_RESOURCE   6
 
 /** 
  * DRM device functions structure
___
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: r189912 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:46:37 2009
New Revision: 189912
URL: http://svn.freebsd.org/changeset/base/189912

Log:
  Minor code cleanup
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drm_bufs.c

Modified: head/sys/dev/drm/drm_bufs.c
==
--- head/sys/dev/drm/drm_bufs.c Tue Mar 17 03:44:36 2009(r189911)
+++ head/sys/dev/drm/drm_bufs.c Tue Mar 17 03:46:37 2009(r189912)
@@ -216,7 +216,7 @@ int drm_addmap(struct drm_device * dev, 
DRM_LOCK();
return EINVAL;
}
-   map->offset = map->offset + dev->sg->handle;
+   map->offset += dev->sg->handle;
break;
case _DRM_CONSISTENT:
/* Unfortunately, we don't get any alignment specification from
___
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: r189913 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:49:24 2009
New Revision: 189913
URL: http://svn.freebsd.org/changeset/base/189913

Log:
  Add list_for_each_prev to our linux compatibility.
  
  We need this for nouveau
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drm_linux_list.h

Modified: head/sys/dev/drm/drm_linux_list.h
==
--- head/sys/dev/drm/drm_linux_list.h   Tue Mar 17 03:46:37 2009
(r189912)
+++ head/sys/dev/drm/drm_linux_list.h   Tue Mar 17 03:49:24 2009
(r189913)
@@ -67,6 +67,10 @@ list_del(struct list_head *entry) {
 #define list_for_each(entry, head) \
 for (entry = (head)->next; entry != head; entry = (entry)->next)
 
+#define list_for_each_prev(entry, head) \
+for (entry = (head)->prev; entry != (head); \
+entry = entry->prev)
+
 #define list_for_each_safe(entry, temp, head)  \
 for (entry = (head)->next, temp = (entry)->next;   \
entry != head;  \
___
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: r189914 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:50:35 2009
New Revision: 189914
URL: http://svn.freebsd.org/changeset/base/189914

Log:
  Improve the debugging output of drm_mmap
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drm_vm.c

Modified: head/sys/dev/drm/drm_vm.c
==
--- head/sys/dev/drm/drm_vm.c   Tue Mar 17 03:49:24 2009(r189913)
+++ head/sys/dev/drm/drm_vm.c   Tue Mar 17 03:50:35 2009(r189914)
@@ -86,8 +86,13 @@ int drm_mmap(struct cdev *kdev, vm_offse
}
 
if (map == NULL) {
+   DRM_DEBUG("Can't find map, requested offset = %016lx\n",
+   offset);
+   TAILQ_FOREACH(map, &dev->maplist, link) {
+   DRM_DEBUG("map offset = %016lx, handle = %016lx\n",
+   map->offset, (unsigned long)map->handle);
+   }
DRM_UNLOCK();
-   DRM_DEBUG("can't find map\n");
return -1;
}
if (((map->flags&_DRM_RESTRICTED) && !DRM_SUSER(DRM_CURPROC))) {
___
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: r189915 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 03:53:44 2009
New Revision: 189915
URL: http://svn.freebsd.org/changeset/base/189915

Log:
  Add support for matching solely on vendor id.
  
  We will use this method with nouveau
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drm_drv.c

Modified: head/sys/dev/drm/drm_drv.c
==
--- head/sys/dev/drm/drm_drv.c  Tue Mar 17 03:50:35 2009(r189914)
+++ head/sys/dev/drm/drm_drv.c  Tue Mar 17 03:53:44 2009(r189915)
@@ -182,7 +182,10 @@ int drm_probe(device_t kdev, drm_pci_id_
 
id_entry = drm_find_description(vendor, device, idlist);
if (id_entry != NULL) {
-   device_set_desc(kdev, id_entry->name);
+   if (!device_get_desc(kdev)) {
+   DRM_DEBUG("desc : %s\n", device_get_desc(kdev));
+   device_set_desc(kdev, id_entry->name);
+   }
return 0;
}
 
@@ -290,7 +293,8 @@ drm_pci_id_list_t *drm_find_description(

for (i = 0; idlist[i].vendor != 0; i++) {
if ((idlist[i].vendor == vendor) &&
-   (idlist[i].device == device)) {
+   ((idlist[i].device == device) ||
+   (idlist[i].device == 0))) {
return &idlist[i];
}
}
___
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: r189916 - head/sys/dev/drm

2009-03-16 Thread Robert Noland
Author: rnoland
Date: Tue Mar 17 05:10:12 2009
New Revision: 189916
URL: http://svn.freebsd.org/changeset/base/189916

Log:
  Cast to (unsigned long) to make printf happy on i386
  
  MFC after:3 days

Modified:
  head/sys/dev/drm/drm_vm.c

Modified: head/sys/dev/drm/drm_vm.c
==
--- head/sys/dev/drm/drm_vm.c   Tue Mar 17 03:53:44 2009(r189915)
+++ head/sys/dev/drm/drm_vm.c   Tue Mar 17 05:10:12 2009(r189916)
@@ -87,10 +87,11 @@ int drm_mmap(struct cdev *kdev, vm_offse
 
if (map == NULL) {
DRM_DEBUG("Can't find map, requested offset = %016lx\n",
-   offset);
+   (unsigned long)offset);
TAILQ_FOREACH(map, &dev->maplist, link) {
DRM_DEBUG("map offset = %016lx, handle = %016lx\n",
-   map->offset, (unsigned long)map->handle);
+   (unsigned long)map->offset,
+   (unsigned long)map->handle);
}
DRM_UNLOCK();
return -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: r189917 - head/sys/compat/ndis

2009-03-16 Thread Weongyo Jeong
Author: weongyo
Date: Tue Mar 17 05:57:43 2009
New Revision: 189917
URL: http://svn.freebsd.org/changeset/base/189917

Log:
  grab NDIS USB lock instead of HAL preemption.  This change should be
  happened in the previous.

Modified:
  head/sys/compat/ndis/subr_usbd.c

Modified: head/sys/compat/ndis/subr_usbd.c
==
--- head/sys/compat/ndis/subr_usbd.cTue Mar 17 05:10:12 2009
(r189916)
+++ head/sys/compat/ndis/subr_usbd.cTue Mar 17 05:57:43 2009
(r189917)
@@ -707,8 +707,9 @@ usbd_irpcancel(dobj, ip)
device_object   *dobj;
irp *ip;
 {
+   device_t dev = IRP_NDIS_DEV(ip);
+   struct ndis_softc *sc = device_get_softc(dev);
struct ndisusb_ep *ne = IRP_NDISUSB_EP(ip);
-   uint8_t irql;
 
if (ne == NULL) {
ip->irp_cancel = TRUE;
@@ -720,10 +721,10 @@ usbd_irpcancel(dobj, ip)
 * Make sure that the current USB transfer proxy is
 * cancelled and then restarted.
 */
-   KeRaiseIrql(DISPATCH_LEVEL, &irql);
+   NDISUSB_LOCK(sc);
usb2_transfer_stop(ne->ne_xfer[0]);
usb2_transfer_start(ne->ne_xfer[0]);
-   KeLowerIrql(irql);
+   NDISUSB_UNLOCK(sc);
 
ip->irp_cancel = TRUE;
IoReleaseCancelSpinLock(ip->irp_cancelirql);
___
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: r189918 - in stable/7: contrib/csup usr.bin/csup

2009-03-16 Thread Ulf Lilleengen
Author: lulf
Date: Tue Mar 17 06:54:41 2009
New Revision: 189918
URL: http://svn.freebsd.org/changeset/base/189918

Log:
  MFH:
  r186781
  Merge support for CVSMode (aka. mirror mode) into csup. This means csup can 
now
  fetch a complete CVS repository. Support for rsync update of regular files are
  also included, but are not yet enabled. The change should not have an impact 
on
  existing csup usage, as little of the existing code has changed.
  
  r186871
  - Update manpage now that cvs mode is supported.
  
  r188405
  - Fix an issue where file attributes were not installed correctly during a 
Touch
and SetAttrs operation.
  - SetAttrs and Touch were incorrectly switched.
  
  r188644
  - Do not free the pattern lists immediately after use, as they might be needed
again in case the connection is interrupted and csup have to reconnect. The
lists will be freed after the collection has been completely processed.
  
  r189455
  - Try to handle rcsfile write failures in the same way as cvsup, as they are 
not
necessarily fatal. If the file was incorrectly written, the checksum will
detect it and the file will be retransferred.

Added:
  stable/7/contrib/csup/lex.rcs.c
 - copied unchanged from r186781, head/contrib/csup/lex.rcs.c
  stable/7/contrib/csup/rcsfile.c
 - copied unchanged from r186781, head/contrib/csup/rcsfile.c
  stable/7/contrib/csup/rcsfile.h
 - copied unchanged from r186781, head/contrib/csup/rcsfile.h
  stable/7/contrib/csup/rcsparse.c
 - copied unchanged from r186781, head/contrib/csup/rcsparse.c
  stable/7/contrib/csup/rcsparse.h
 - copied unchanged from r186781, head/contrib/csup/rcsparse.h
  stable/7/contrib/csup/rcstokenizer.h
 - copied unchanged from r186781, head/contrib/csup/rcstokenizer.h
  stable/7/contrib/csup/rcstokenizer.l
 - copied unchanged from r186781, head/contrib/csup/rcstokenizer.l
  stable/7/contrib/csup/rsyncfile.c
 - copied unchanged from r186781, head/contrib/csup/rsyncfile.c
  stable/7/contrib/csup/rsyncfile.h
 - copied unchanged from r186781, head/contrib/csup/rsyncfile.h
Modified:
  stable/7/contrib/csup/   (props changed)
  stable/7/contrib/csup/GNUmakefile
  stable/7/contrib/csup/Makefile
  stable/7/contrib/csup/TODO
  stable/7/contrib/csup/config.c
  stable/7/contrib/csup/csup.1
  stable/7/contrib/csup/detailer.c
  stable/7/contrib/csup/diff.c
  stable/7/contrib/csup/diff.h
  stable/7/contrib/csup/fattr.c
  stable/7/contrib/csup/fattr.h
  stable/7/contrib/csup/keyword.c
  stable/7/contrib/csup/keyword.h
  stable/7/contrib/csup/lister.c
  stable/7/contrib/csup/misc.c
  stable/7/contrib/csup/misc.h
  stable/7/contrib/csup/mux.c
  stable/7/contrib/csup/proto.c
  stable/7/contrib/csup/proto.h
  stable/7/contrib/csup/status.c
  stable/7/contrib/csup/stream.c
  stable/7/contrib/csup/stream.h
  stable/7/contrib/csup/updater.c
  stable/7/usr.bin/csup/   (props changed)
  stable/7/usr.bin/csup/Makefile

Modified: stable/7/contrib/csup/GNUmakefile
==
--- stable/7/contrib/csup/GNUmakefile   Tue Mar 17 05:57:43 2009
(r189917)
+++ stable/7/contrib/csup/GNUmakefile   Tue Mar 17 06:54:41 2009
(r189918)
@@ -12,8 +12,9 @@ GROUP?=   0
 UNAME= $(shell uname -s)
 
 SRCS=  attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
-   globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c pathcomp.c \
-   parse.c proto.c status.c stream.c threads.c token.c updater.c
+   globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \
+   pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \
+   stream.c threads.c token.c updater.c
 OBJS=  $(SRCS:.c=.o)
 
 WARNS= -Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \

Modified: stable/7/contrib/csup/Makefile
==
--- stable/7/contrib/csup/Makefile  Tue Mar 17 05:57:43 2009
(r189917)
+++ stable/7/contrib/csup/Makefile  Tue Mar 17 06:54:41 2009
(r189918)
@@ -9,10 +9,11 @@ UNAME!=   /usr/bin/uname -s
 PROG=  csup
 SRCS=  attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \
globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \
-   pathcomp.c proto.c status.c stream.c threads.c token.l updater.c
+   pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \
+   rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c
 
 CFLAGS+=   -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG
-WARNS?=6
+WARNS?=1
 
 # A bit of tweaking is needed to get this Makefile working
 # with the bsd.prog.mk of all the *BSD OSes...

Modified: stable/7/contrib/csup/TODO
==
--- stable/7/contrib/csup/TODO  Tue Mar 17 05:57:43 2009(r189917)
+++ stable/7/contrib/csup/TODO