svn commit: r192246 - head/etc/rc.d

2009-05-17 Thread Daniel Gerzo
Author: danger (doc committer)
Date: Sun May 17 08:25:02 2009
New Revision: 192246
URL: http://svn.freebsd.org/changeset/base/192246

Log:
  - do not create and mount new file systems on top of the old ones on every
invocation of this script once we already have one
(in case tmpmfs="YES").
  
  Reviewed by:  dougb

Modified:
  head/etc/rc.d/tmp

Modified: head/etc/rc.d/tmp
==
--- head/etc/rc.d/tmp   Sun May 17 06:45:30 2009(r192245)
+++ head/etc/rc.d/tmp   Sun May 17 08:25:02 2009(r192246)
@@ -43,8 +43,10 @@ load_rc_config $name
 #
 case "${tmpmfs}" in
 [Yy][Ee][Ss])
-   mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
-   chmod 01777 /tmp
+   if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then
+   mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
+   chmod 01777 /tmp
+   fi
;;
 [Nn][Oo])
;;
___
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: r192247 - head/sys/boot/forth

2009-05-17 Thread Christian Brueffer
Author: brueffer
Date: Sun May 17 10:58:50 2009
New Revision: 192247
URL: http://svn.freebsd.org/changeset/base/192247

Log:
  Improve the accf_dns_load description.

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

Modified: head/sys/boot/forth/loader.conf
==
--- head/sys/boot/forth/loader.conf Sun May 17 08:25:02 2009
(r192246)
+++ head/sys/boot/forth/loader.conf Sun May 17 10:58:50 2009
(r192247)
@@ -397,7 +397,7 @@ bktr_load="NO"  # Brooktree Bt848/Bt878
 ispfw_load="NO"# Qlogic ISP Firmware
 agp_load="NO"  # agp module
 accf_data_load="NO"# Wait for data accept filter
-accf_dns_load="NO" # Wait for data accept filter
+accf_dns_load="NO" # Wait for full DNS request accept filter
 accf_http_load="NO"# Wait for full HTTP request accept filter
 random_load="NO"   # Random device
 speaker_load="NO"  # AT speaker module
___
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: r192194 - in head/sys: boot/i386/zfsboot boot/zfs cddl/boot/zfs

2009-05-17 Thread Pegasus Mc Cleaft
On Saturday 16 May 2009 18:47:16 Doug Rabson wrote:
> On 16 May 2009, at 19:35, Pegasus Mc Cleaft wrote:
> > On Saturday 16 May 2009 10:48:20 Doug Rabson wrote:
> >> Author: dfr
> >> Date: Sat May 16 10:48:20 2009
> >> New Revision: 192194
> >> URL: http://svn.freebsd.org/changeset/base/192194
> >>
> >> Log:
> >>  Add support for booting from raidz1 and raidz2 pools.
> >>
> >> Modified:
> >>  head/sys/boot/i386/zfsboot/zfsboot.c
> >>  head/sys/boot/zfs/zfsimpl.c
> >>  head/sys/cddl/boot/zfs/README
> >>  head/sys/cddl/boot/zfs/zfsimpl.h
> >>  head/sys/cddl/boot/zfs/zfssubr.c
> >
> > I think there may be a bug when you boot the machine from a drive
> > that is a
> > member of a zfs-mirror and you have raidz pools elsewhere.
> >
> > On reboot, I would get message saying there was no bootable kernel
> > and
> > dropped me down to the "OK" prompt. At that point, lsdev would show
> > all the
> > pools (both zfs-mirror and zraid's) and "ls" would return an error
> > saying
> > there were to many open files.
> >
> > I was able to work around the problem by pulling all the drives in
> > the zraid
> > pool into single user, attach all the drives and use atacontrol
> > attach to
> > bring them online before going to multi-user and hitting /etc/rc.d/
> > zfs start.
> >
> > The only thing I haven't tried, and may be the key to the problem is
> > reloading the boot-strap on the bootable drives. Would that make any
> > difference?
>
> I'm not sure but it can't hurt. The part of the bootstrap that runs
> before /boot/loader (e.g. gptzfsboot) also has access to all the pools
> in the system (at least the ones where the drives are visible to the
> BIOS). It should figure out which pool contains the drive that was
> actually booted and load /boot/loader from that. It should also pass
> the identity of that pool down to /boot/loader so that the process
> continues with the correct pool.
>

Naww.. Still no joy with that. I updated the boot drives with the 
latest 
gptzfsloader this morning and got the same results when I rebooted. System 
still thinks there are no loadable kernels until I remove all the zpool drives 
from the machine and reboot. Once I get the "BSD Daemon" screen and it starts 
to load the kernel, I can quicly slap the caddies back into the machine and 
they are detected when polled and everything is OK. 

I currently have the pools set up as follows:


feathers$ zpool status
  pool: PegaBackup
 state: ONLINE
 scrub: none requested
config:   

NAMESTATE READ WRITE CKSUM
PegaBackup  ONLINE   0 0 0
  ad10p4ONLINE   0 0 0

errors: No known data errors

  pool: PegaBase
 state: ONLINE
 scrub: none requested
config:

NAMESTATE READ WRITE CKSUM
PegaBaseONLINE   0 0 0
  raidz1ONLINE   0 0 0
ad26ONLINE   0 0 0
ad30ONLINE   0 0 0
ad28ONLINE   0 0 0
ad24ONLINE   0 0 0
ad22ONLINE   0 0 0
ad20ONLINE   0 0 0
cache
  ad16p4ONLINE   0 0 0
  ad14p4ONLINE   0 0 0

errors: No known data errors

  pool: PegaBoot2
 state: ONLINE
 scrub: none requested
config:

NAMESTATE READ WRITE CKSUM
PegaBoot2   ONLINE   0 0 0
  mirrorONLINE   0 0 0
ad10p3  ONLINE   0 0 0
ad14p3  ONLINE   0 0 0
ad16p3  ONLINE   0 0 0

errors: No known data errors



___
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: r192248 - stable/7/lib/libpmc

2009-05-17 Thread Fabien Thomas
Author: fabient
Date: Sun May 17 11:45:37 2009
New Revision: 192248
URL: http://svn.freebsd.org/changeset/base/192248

Log:
  MFC 190395: Allow compile from c++ for libpmc
  
  Reviewed by: jkoshy (mentor)

Modified:
  stable/7/lib/libpmc/   (props changed)
  stable/7/lib/libpmc/pmc.h
  stable/7/lib/libpmc/pmclog.h

Modified: stable/7/lib/libpmc/pmc.h
==
--- stable/7/lib/libpmc/pmc.h   Sun May 17 10:58:50 2009(r192247)
+++ stable/7/lib/libpmc/pmc.h   Sun May 17 11:45:37 2009(r192248)
@@ -29,6 +29,7 @@
 #ifndef _PMC_H_
 #define _PMC_H_
 
+#include 
 #include 
 
 /*
@@ -68,6 +69,7 @@ struct pmc_pmcinfo {
  * Prototypes
  */
 
+__BEGIN_DECLS
 intpmc_allocate(const char *_ctrspec, enum pmc_mode _mode, uint32_t _flags,
 int _cpu, pmc_id_t *_pmcid);
 intpmc_attach(pmc_id_t _pmcid, pid_t _pid);
@@ -105,5 +107,6 @@ const char  *pmc_name_of_state(enum pmc_s
 
 intpmc_event_names_of_class(enum pmc_class _cl, const char ***_eventnames,
 int *_nevents);
+__END_DECLS
 
 #endif

Modified: stable/7/lib/libpmc/pmclog.h
==
--- stable/7/lib/libpmc/pmclog.hSun May 17 10:58:50 2009
(r192247)
+++ stable/7/lib/libpmc/pmclog.hSun May 17 11:45:37 2009
(r192248)
@@ -29,6 +29,7 @@
 #ifndef_PMCLOG_H_
 #define_PMCLOG_H_
 
+#include 
 #include 
 
 enum pmclog_state {
@@ -145,10 +146,12 @@ struct pmclog_ev {
 
 #definePMCLOG_FD_NONE  (-1)
 
+__BEGIN_DECLS
 void   *pmclog_open(int _fd);
 intpmclog_feed(void *_cookie, char *_data, int _len);
 intpmclog_read(void *_cookie, struct pmclog_ev *_ev);
 void   pmclog_close(void *_cookie);
+__END_DECLS
 
 #endif
 
___
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: r192249 - head/share/man/man4

2009-05-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun May 17 12:21:11 2009
New Revision: 192249
URL: http://svn.freebsd.org/changeset/base/192249

Log:
  Fix the example.

Modified:
  head/share/man/man4/md.4

Modified: head/share/man/man4/md.4
==
--- head/share/man/man4/md.4Sun May 17 11:45:37 2009(r192248)
+++ head/share/man/man4/md.4Sun May 17 12:21:11 2009(r192249)
@@ -66,11 +66,12 @@ For more information, please see
 To create a kernel with a ramdisk or MD file system, your kernel config
 needs the following options:
 .Bd -literal -offset indent
-optionsMD_ROOT #MD is a potential root device
+optionsMD_ROOT # MD is a potential root device
 optionsMD_ROOT_SIZE=8192   # 8MB ram disk
 makeoptionsMFS_IMAGE=/h/foo/ARM-MD
-optionsROOTDEVNAME=\"ufs:md0\"
+optionsROOTDEVNAME=\\"ufs:md0\\"
 .Ed
+.Pp
 The image in
 .Pa /h/foo/ARM-MD
 will be loaded as the initial image each boot.
___
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: r192250 - head/sys/kern

2009-05-17 Thread Ed Schouten
Author: ed
Date: Sun May 17 12:30:25 2009
New Revision: 192250
URL: http://svn.freebsd.org/changeset/base/192250

Log:
  Several cleanups to tty_info(), better known as Ctrl-T.
  
  - Only pick up PROC_LOCK once, which means we can drop the PGRP_LOCK
right after picking up PROC_LOCK for the first time.
  
  - Print the process real time, making it consistent with tools like
time(1).
  
  - Use `p' and `td' to reference the process/thread we are going to
print. Only use pick-variables inside the loops. We already did this
for the threads, but not the processes.

Modified:
  head/sys/kern/tty_info.c

Modified: head/sys/kern/tty_info.c
==
--- head/sys/kern/tty_info.cSun May 17 12:21:11 2009(r192249)
+++ head/sys/kern/tty_info.cSun May 17 12:30:25 2009(r192250)
@@ -213,9 +213,9 @@ proc_compare(struct proc *p1, struct pro
 void
 tty_info(struct tty *tp)
 {
-   struct timeval utime, stime;
-   struct proc *p, *pick;
-   struct thread *td, *picktd;
+   struct timeval rtime, utime, stime;
+   struct proc *p, *ppick;
+   struct thread *td, *tdpick;
const char *stateprefix, *state;
long rss;
int load, pctcpu;
@@ -254,17 +254,17 @@ tty_info(struct tty *tp)
 * whole list. However, we're guaranteed not to reference an exited
 * thread or proc since we hold the tty locked.
 */
-   pick = NULL;
-   LIST_FOREACH(p, &tp->t_pgrp->pg_members, p_pglist)
-   if (proc_compare(pick, p))
-   pick = p;
-
-   PROC_LOCK(pick);
-   picktd = NULL;
-   FOREACH_THREAD_IN_PROC(pick, td)
-   if (thread_compare(picktd, td))
-   picktd = td;
-   td = picktd;
+   p = NULL;
+   LIST_FOREACH(ppick, &tp->t_pgrp->pg_members, p_pglist)
+   if (proc_compare(p, ppick))
+   p = ppick;
+
+   PROC_LOCK(p);
+   PGRP_UNLOCK(tp->t_pgrp);
+   td = NULL;
+   FOREACH_THREAD_IN_PROC(p, tdpick)
+   if (thread_compare(td, tdpick))
+   td = tdpick;
stateprefix = "";
thread_lock(td);
if (TD_IS_RUNNING(td))
@@ -284,28 +284,28 @@ tty_info(struct tty *tp)
state = "suspended";
else if (TD_AWAITING_INTR(td))
state = "intrwait";
-   else if (pick->p_state == PRS_ZOMBIE)
+   else if (p->p_state == PRS_ZOMBIE)
state = "zombie";
else
state = "unknown";
pctcpu = (sched_pctcpu(td) * 1 + FSCALE / 2) >> FSHIFT;
thread_unlock(td);
-   if (pick->p_state == PRS_NEW || pick->p_state == PRS_ZOMBIE)
+   if (p->p_state == PRS_NEW || p->p_state == PRS_ZOMBIE)
rss = 0;
else
-   rss = pgtok(vmspace_resident_count(pick->p_vmspace));
-   PROC_UNLOCK(pick);
-   PROC_LOCK(pick);
-   PGRP_UNLOCK(tp->t_pgrp);
-   rufetchcalc(pick, &ru, &utime, &stime);
-   pid = pick->p_pid;
-   strlcpy(comm, pick->p_comm, sizeof comm);
-   PROC_UNLOCK(pick);
+   rss = pgtok(vmspace_resident_count(p->p_vmspace));
+   microuptime(&rtime);
+   timevalsub(&rtime, &p->p_stats->p_start);
+   rufetchcalc(p, &ru, &utime, &stime);
+   pid = p->p_pid;
+   strlcpy(comm, p->p_comm, sizeof comm);
+   PROC_UNLOCK(p);
 
-   /* Print command, pid, state, utime, stime, %cpu, and rss. */
+   /* Print command, pid, state, rtime, utime, stime, %cpu, and rss. */
ttyprintf(tp,
-   " cmd: %s %d [%s%s] %ld.%02ldu %ld.%02lds %d%% %ldk\n",
+   " cmd: %s %d [%s%s] %ld.%02ldr %ld.%02ldu %ld.%02lds %d%% %ldk\n",
comm, pid, stateprefix, state,
+   (long)rtime.tv_sec, rtime.tv_usec / 1,
(long)utime.tv_sec, utime.tv_usec / 1,
(long)stime.tv_sec, stime.tv_usec / 1,
pctcpu / 100, rss);
___
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: r192251 - stable/7/lib/libc/net

2009-05-17 Thread Bruce M Simpson
Author: bms
Date: Sun May 17 15:42:41 2009
New Revision: 192251
URL: http://svn.freebsd.org/changeset/base/192251

Log:
  MFC rev 191654:
  Fix an obvious bug in getsourcefilter()'s use of struct __msfilterreq;
  the kernel will return in msfr_nsrcs the number of source filters
  in-mode for a given multicast group.
  However, the filters themselves were never copied out, as the libc
  function clobbers this field with zero, causing the kernel to assume
  the provided vector of struct sockaddr_storage has zero length.
  This bug would only affect users of SSM multicast, which is shimmed
  in 7.x.
  Picked up during mtest(8) refactoring.

Modified:
  stable/7/lib/libc/net/sourcefilter.c

Modified: stable/7/lib/libc/net/sourcefilter.c
==
--- stable/7/lib/libc/net/sourcefilter.cSun May 17 12:30:25 2009
(r192250)
+++ stable/7/lib/libc/net/sourcefilter.cSun May 17 15:42:41 2009
(r192251)
@@ -1,6 +1,6 @@
 /*-
- * Copyright (c) 2007 Bruce M. Simpson.
- * All rights reserved
+ * Copyright (c) 2007-2009 Bruce Simpson.
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -10,21 +10,18 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 4. Neither the name of Bruce M. Simpson nor the names of other
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY BRUCE M. SIMPSON AND AFFILIATES
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL BRUCE M. SIMPSON OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  */
 
 #include 
@@ -340,7 +337,7 @@ getsourcefilter(int s, uint32_t interfac
 {
struct __msfilterreq msfr;
sockunion_t *psu;
-   int  err, level, optlen, optname;
+   int  err, level, nsrcs, optlen, optname;
 
if (interface == 0 || group == NULL || numsrc == NULL ||
fmode == NULL) {
@@ -348,6 +345,7 @@ getsourcefilter(int s, uint32_t interfac
return (-1);
}
 
+   nsrcs = *numsrc;
*numsrc = 0;
*fmode = 0;
 
@@ -385,7 +383,7 @@ getsourcefilter(int s, uint32_t interfac
memset(&msfr, 0, optlen);
msfr.msfr_ifindex = interface;
msfr.msfr_fmode = 0;
-   msfr.msfr_nsrcs = *numsrc;
+   msfr.msfr_nsrcs = nsrcs;
memcpy(&msfr.msfr_group, &psu->ss, psu->ss.ss_len);
 
/*
___
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: r192033 - stable/7/sys/dev/ata

2009-05-17 Thread Bruce Simpson

Alexander Motin wrote:

Bruce Simpson wrote:
Could this commit have broken boot on my amd64 system with an ULi 
SATA controller?


This commit could change driver used for controller and so expose some 
other bug in ALI driver. As I can see, there is present 
vendor-specific driver for this chip, but without pciconf output I 
can't say if AHCI driver is also able to attach it.


...
is...@pci0:0:30:0:  class=0x060100 card=0x81561043 chip=0x157310b9 
rev=0x31 hdr=0x00

   vendor = 'Acer Labs Incorporated (ALi/ULi)'
   device = 'ALI M1573 South Bridge with Hypertransport Support'
   class  = bridge
   subclass   = PCI-ISA
no...@pci0:0:30:1:  class=0x068000 card=0x81561043 chip=0x710110b9 
rev=0x00 hdr=0x00

   vendor = 'Acer Labs Incorporated (ALi/ULi)'
   device = 'ALI M7101 Power Management Controller'
   class  = bridge
atap...@pci0:0:31:0:class=0x01018a card=0x81561043 chip=0x522910b9 
rev=0xc7 hdr=0x00

   vendor = 'Acer Labs Incorporated (ALi/ULi)'
   device = 'M5229 Southbridge EIDE Controller'
   class  = mass storage
   subclass   = ATA
atap...@pci0:0:31:1:class=0x010400 card=0x81561043 chip=0x528710b9 
rev=0x02 hdr=0x00

   vendor = 'Acer Labs Incorporated (ALi/ULi)'
   device = '52871849 ALI SATA controller'
   class  = mass storage
   subclass   = RAID

... FreeBSD boots from ad4.

anglepoise:~ % devinfo
nexus0
 apic0
 ram0
 acpi0
   cpu0
 acpi_throttle0
 cpufreq0
   pcib0
 pci0
   hostb0
   pcib1
 pci1
   vgapci0
   vgapci1
   pcib2
 pci2
   mskc0
 msk0
   miibus0
 e1000phy0
   pcib3
 pci3
   hostb1
   hostb2
   hostb3
   hostb4
   pcib4
 pci4
   ohci0
 usb0
   uhub0
   ohci1
 usb1
   uhub1
 uhub4
   ums0
   ohci2
 usb2
   uhub2
   ehci0
 usb3
   uhub3
   hdac0
 pcm0
 pcm1
 pcm2
   isab0
 isa0
   sc0
   vga0
   orm0
   atapci0
 ata0
   ad0
 subdisk0
 ata1
   acd0
   atapci1
 ata2
   ad4
 subdisk4
 ata3
 ata4
 ata5
   atpic0
   atdma0
   attimer0
   attimer1
   fpupnp0
   fdc0
 fd0
   ppc0
 ppbus0
   acpi_sysresource0
   atkbdc0
 atkbd0
   acpi_sysresource1
   sio0
   acpi_sysresource2
   acpi_sysresource3
   acpi_sysresource4
   acpi_button0
   pci_link0
   pci_link1
   pci_link2
   pci_link3
   pci_link4
   pci_link5
   pci_link6
   pci_link7
   pci_link8
   acpi_timer0




I have not fully bisected (and to be honest, who really has time to 
do this for production machines, unless


The panic I get with RELENG_7 sources as of yesterday after this 
commit is 'resource list busy'. If you need any more information let 
me know, I have transcribed the backtrace and posted it to sta...@.


Which revision was working for you before this? If, as you have said, 
reverting rev 192033 does not helped, then there should be something 
different. May be not in ATA, as there was very few merges into 
7-STABLE ATA last months.


anglepoise:~ % uname -a
FreeBSD anglepoise.lon.incunabulum.net 7.2-PRERELEASE FreeBSD 
7.2-PRERELEASE #1: Tue Apr 21 07:41:58 BST 2009 
r...@anglepoise.lon.incunabulum.net:/home/obj/usr/src/sys/ANGLEPOISE  amd64


anglepoise:~ % ident /boot/kernel/kernel | grep ata
$FreeBSD: src/sys/cam/cam_queue.c,v 1.9 2005/07/01 15:21:29 avatar 
Exp $
$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.280.2.8 2009/03/03 08:14:43 
mav Exp $
$FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.202.2.19 2009/03/25 
14:26:38 mav Exp $
$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.204.2.3 2008/04/08 
10:48:21 phk Exp $
$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.147.2.2 2008/01/09 08:54:47 
delphij Exp $
$FreeBSD: src/sys/dev/ata/ata-isa.c,v 1.31 2007/02/21 19:07:18 sos 
Exp $
$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.79.2.1 2008/01/09 
08:54:48 delphij Exp $
$FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.121.2.2 2007/11/21 21:15:00 
sos Exp $
$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.69.2.1 2009/03/03 
08:14:43 mav Exp $
$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.124.2.1 2009/03/01 
16:50:46 scottl Exp $
$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.193.2.3 2009/03/17 
19:38:40 marcel Exp $
$FreeBSD: src/sys/dev/puc/pucdata.c,v 1.59.2.6 2009/03/19 15:35:33 
jhb Exp $


Let me know if you need any more info...

cheers
BMS
___
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: r192252 - head/sys/kern

2009-05-17 Thread Ed Schouten
Author: ed
Date: Sun May 17 16:17:48 2009
New Revision: 192252
URL: http://svn.freebsd.org/changeset/base/192252

Log:
  Print an extra newline when not at the first column already.
  
  This makes siginfo output look a lot better when pressing it the first
  time when in sh(1), for example:
  
$ load: 0.00  cmd: sh 1945 [ttyin] 3.94r 0.00u 0.00s 0% 1960k
load: 0.00  cmd: sh 1945 [ttyin] 4.19r 0.00u 0.00s 0% 1960k
  
  will now become:
  
$
load: 0.00  cmd: sh 1945 [ttyin] 3.94r 0.00u 0.00s 0% 1960k
load: 0.00  cmd: sh 1945 [ttyin] 4.19r 0.00u 0.00s 0% 1960k

Modified:
  head/sys/kern/tty_info.c

Modified: head/sys/kern/tty_info.c
==
--- head/sys/kern/tty_info.cSun May 17 15:42:41 2009(r192251)
+++ head/sys/kern/tty_info.cSun May 17 16:17:48 2009(r192252)
@@ -230,7 +230,8 @@ tty_info(struct tty *tp)
 
/* Print load average. */
load = (averunnable.ldavg[0] * 100 + FSCALE / 2) >> FSHIFT;
-   ttyprintf(tp, "load: %d.%02d ", load / 100, load % 100);
+   ttyprintf(tp, "%sload: %d.%02d ", tp->t_column == 0 ? "" : "\n",
+   load / 100, load % 100);
 
if (tp->t_session == NULL) {
ttyprintf(tp, "not a controlling terminal\n");
___
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: r192255 - head/sys/fs/nfsserver

2009-05-17 Thread Rick Macklem
Author: rmacklem
Date: Sun May 17 17:54:01 2009
New Revision: 192255
URL: http://svn.freebsd.org/changeset/base/192255

Log:
  Added a SYSCTL to sys/fs/nfsserver/nfs_nfsdport.c so that the value of
  nfsrv_dolocallocks can be changed via sysctl. I also added some non-empty
  descriptor strings and reformatted some overly long lines.
  
  Approved by:  kib (mentor)

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

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==
--- head/sys/fs/nfsserver/nfs_nfsdport.cSun May 17 17:52:35 2009
(r192254)
+++ head/sys/fs/nfsserver/nfs_nfsdport.cSun May 17 17:54:01 2009
(r192255)
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-extern int nfsrv_dolocallocks;
 extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1;
 extern int nfsv4root_set;
 extern int nfsrv_useacl;
@@ -58,17 +57,26 @@ struct mtx nfs_v4root_mutex;
 struct nfsrvfh nfs_rootfh, nfs_pubfh;
 int nfs_pubfhset = 0, nfs_rootfhset = 0;
 
-static int nfssvc_srvcall(struct thread *, struct nfssvc_args *, struct ucred 
*);
+static int nfssvc_srvcall(struct thread *, struct nfssvc_args *,
+struct ucred *);
 
 static int enable_crossmntpt = 1;
 static int nfs_commit_blks;
 static int nfs_commit_miss;
 extern int nfsrv_issuedelegs;
+extern int nfsrv_dolocallocks;
+
 SYSCTL_DECL(_vfs_newnfs);
-SYSCTL_INT(_vfs_newnfs, OID_AUTO, mirrormnt, CTLFLAG_RW, &enable_crossmntpt, 
0, "");
-SYSCTL_INT(_vfs_newnfs, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks, 
0, "");
-SYSCTL_INT(_vfs_newnfs, OID_AUTO, commit_miss, CTLFLAG_RW, &nfs_commit_miss, 
0, "");
-SYSCTL_INT(_vfs_newnfs, OID_AUTO, issue_delegations, CTLFLAG_RW, 
&nfsrv_issuedelegs, 0, "");
+SYSCTL_INT(_vfs_newnfs, OID_AUTO, mirrormnt, CTLFLAG_RW, &enable_crossmntpt,
+0, "Enable nfsd to cross mount points");
+SYSCTL_INT(_vfs_newnfs, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks,
+0, "");
+SYSCTL_INT(_vfs_newnfs, OID_AUTO, commit_miss, CTLFLAG_RW, &nfs_commit_miss,
+0, "");
+SYSCTL_INT(_vfs_newnfs, OID_AUTO, issue_delegations, CTLFLAG_RW,
+&nfsrv_issuedelegs, 0, "Enable nfsd to issue delegations");
+SYSCTL_INT(_vfs_newnfs, OID_AUTO, enable_locallocks, CTLFLAG_RW,
+&nfsrv_dolocallocks, 0, "Enable nfsd to acquire local locks on files");
 
 #defineNUM_HEURISTIC   1017
 #defineNHUSE_INIT  64
___
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: r192256 - head/sys/fs/nfsserver

2009-05-17 Thread Rick Macklem
Author: rmacklem
Date: Sun May 17 19:33:48 2009
New Revision: 192256
URL: http://svn.freebsd.org/changeset/base/192256

Log:
  Fix the acquisition of local locks via VOP_ADVLOCK() by the
  experimental nfsv4 server. It was setting the a_id argument
  to a fixed value, but that wasn't sufficient for FreeBSD8.
  Instead, set l_pid and l_sysid to 0 plus set the F_REMOTE
  flag to indicate that these fields are used to check for
  same lock owner. Since, for NFSv4, a lockowner is a ClientID plus
  an up to 1024byte name, it can't be put in l_sysid easily.
  I also renamed the p variable to td, since it's a thread ptr.
  
  Approved by:  kib (mentor)

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

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==
--- head/sys/fs/nfsserver/nfs_nfsdport.cSun May 17 17:54:01 2009
(r192255)
+++ head/sys/fs/nfsserver/nfs_nfsdport.cSun May 17 19:33:48 2009
(r192256)
@@ -2749,14 +2749,13 @@ nfsvno_getvp(fhandle_t *fhp)
return (vp);
 }
 
-static int id_for_advlock;
 /*
  * Check to see it a byte range lock held by a process running
  * locally on the server conflicts with the new lock.
  */
 int
 nfsvno_localconflict(struct vnode *vp, int ftype, u_int64_t first,
-u_int64_t end, struct nfslockconflict *cfp, struct thread *p)
+u_int64_t end, struct nfslockconflict *cfp, struct thread *td)
 {
int error;
struct flock fl;
@@ -2771,11 +2770,20 @@ nfsvno_localconflict(struct vnode *vp, i
else
fl.l_len = (off_t)(end - first);
/*
-* FreeBSD8 doesn't like 0, so I'll use the address of id_for_advlock.
+* For FreeBSD8, the l_pid and l_sysid must be set to the same
+* values for all calls, so that all locks will be held by the
+* nfsd server. (The nfsd server handles conflicts between the
+* various clients.)
+* Since an NFSv4 lockowner is a ClientID plus an array of up to 1024
+* bytes, so it can't be put in l_sysid.
 */
-   NFSVOPUNLOCK(vp, 0, p);
-   error = VOP_ADVLOCK(vp, &id_for_advlock, F_GETLK, &fl, F_POSIX);
-   NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY, p);
+   fl.l_pid = (pid_t)0;
+   fl.l_sysid = 0;
+
+   NFSVOPUNLOCK(vp, 0, td);
+   error = VOP_ADVLOCK(vp, (caddr_t)td->td_proc, F_GETLK, &fl,
+   (F_POSIX | F_REMOTE));
+   NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY, td);
if (error)
return (error);
if (fl.l_type == F_UNLCK)
@@ -2804,7 +2812,7 @@ nfsvno_localconflict(struct vnode *vp, i
  */
 int
 nfsvno_advlock(struct vnode *vp, int ftype, u_int64_t first,
-u_int64_t end, struct thread *p)
+u_int64_t end, struct thread *td)
 {
int error;
struct flock fl;
@@ -2822,11 +2830,20 @@ nfsvno_advlock(struct vnode *vp, int fty
fl.l_len = (off_t)tlen;
}
/*
-* FreeBSD8 doesn't like 0, so I'll use the address of id_for_advlock.
+* For FreeBSD8, the l_pid and l_sysid must be set to the same
+* values for all calls, so that all locks will be held by the
+* nfsd server. (The nfsd server handles conflicts between the
+* various clients.)
+* Since an NFSv4 lockowner is a ClientID plus an array of up to 1024
+* bytes, so it can't be put in l_sysid.
 */
-   NFSVOPUNLOCK(vp, 0, p);
-   error = VOP_ADVLOCK(vp, &id_for_advlock, F_SETLK, &fl, F_POSIX);
-   NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY, p);
+   fl.l_pid = (pid_t)0;
+   fl.l_sysid = 0;
+
+   NFSVOPUNLOCK(vp, 0, td);
+   error = VOP_ADVLOCK(vp, (caddr_t)td->td_proc, F_SETLK, &fl,
+   (F_POSIX | F_REMOTE));
+   NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY, td);
return (error);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192257 - head/sys/dev/usb/wlan

2009-05-17 Thread Sam Leffler
Author: sam
Date: Sun May 17 19:46:50 2009
New Revision: 192257
URL: http://svn.freebsd.org/changeset/base/192257

Log:
  fix 11a channel use; mark OFDM operation correctly
  
  Submitted by: Lucius Windschuh 

Modified:
  head/sys/dev/usb/wlan/if_uath.c

Modified: head/sys/dev/usb/wlan/if_uath.c
==
--- head/sys/dev/usb/wlan/if_uath.c Sun May 17 19:33:48 2009
(r192256)
+++ head/sys/dev/usb/wlan/if_uath.c Sun May 17 19:46:50 2009
(r192257)
@@ -1492,9 +1492,9 @@ uath_set_chan(struct uath_softc *sc, str
if (IEEE80211_IS_CHAN_5GHZ(c))
reset.flags |= htobe32(UATH_CHAN_5GHZ);
/* NB: 11g =>'s 11b so don't specify both OFDM and CCK */
-   if (IEEE80211_IS_CHAN_G(c))
+   if (IEEE80211_IS_CHAN_OFDM(c))
reset.flags |= htobe32(UATH_CHAN_OFDM);
-   else if (IEEE80211_IS_CHAN_B(c))
+   else if (IEEE80211_IS_CHAN_CCK(c))
reset.flags |= htobe32(UATH_CHAN_CCK);
/* turbo can be used in either 2GHz or 5GHz */
if (c->ic_flags & IEEE80211_CHAN_TURBO)
___
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: r192258 - in head/sys/dev/usb: . wlan

2009-05-17 Thread Sam Leffler
Author: sam
Date: Sun May 17 19:51:08 2009
New Revision: 192258
URL: http://svn.freebsd.org/changeset/base/192258

Log:
  add TRENDnet TEW-504UB/EU
  
  Submitted by: Lucius Windschuh 

Modified:
  head/sys/dev/usb/usbdevs
  head/sys/dev/usb/wlan/if_uath.c

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsSun May 17 19:46:50 2009(r192257)
+++ head/sys/dev/usb/usbdevsSun May 17 19:51:08 2009(r192258)
@@ -2425,6 +2425,7 @@ product UMEDIA TEW429UBC1 0x300d  TEW-429
 product UMEDIA ALL0298V2   0x3204  ALL0298 v2
 product UMEDIA AR5523_20x3205  AR5523
 product UMEDIA AR5523_2_NF 0x3206  AR5523 (no firmware)
+product UMEDIA AR5523_30x3207  AR5523
 
 /* Universal Access products */
 product UNIACCESS PANACHE  0x0101  Panache Surf USB ISDN Adapter

Modified: head/sys/dev/usb/wlan/if_uath.c
==
--- head/sys/dev/usb/wlan/if_uath.c Sun May 17 19:46:50 2009
(r192257)
+++ head/sys/dev/usb/wlan/if_uath.c Sun May 17 19:51:08 2009
(r192258)
@@ -192,6 +192,7 @@ static const struct usb2_device_id uath_
UATH_DEV(NETGEAR3,  WPN111),
UATH_DEV(UMEDIA,TEW444UBEU),
UATH_DEV(UMEDIA,AR5523_2),
+   UATH_DEV(UMEDIA,AR5523_3),
UATH_DEV(WISTRONNEWEB,  AR5523_1),
UATH_DEV(WISTRONNEWEB,  AR5523_2),
UATH_DEV(ZCOM,  AR5523)
___
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: r192260 - in head/sys: kern sys ufs/ffs

2009-05-17 Thread Alan Cox
Author: alc
Date: Sun May 17 20:26:00 2009
New Revision: 192260
URL: http://svn.freebsd.org/changeset/base/192260

Log:
  Introduce vfs_bio_set_valid() and use it from ffs_realloccg().  This
  eliminates the misuse of vfs_bio_clrbuf() by ffs_realloccg().
  
  In collaboration with:tegge

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/sys/buf.h
  head/sys/ufs/ffs/ffs_alloc.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Sun May 17 20:16:38 2009(r192259)
+++ head/sys/kern/vfs_bio.c Sun May 17 20:26:00 2009(r192260)
@@ -3625,6 +3625,44 @@ vfs_clean_pages(struct buf *bp)
 }
 
 /*
+ * vfs_bio_set_valid:
+ *
+ * Set the range within the buffer to valid.  The range is
+ * relative to the beginning of the buffer, b_offset.  Note that
+ * b_offset itself may be offset from the beginning of the first
+ * page.
+ */
+void   
+vfs_bio_set_valid(struct buf *bp, int base, int size)
+{
+   int i, n;
+   vm_page_t m;
+
+   if (!(bp->b_flags & B_VMIO))
+   return;
+
+   /*
+* Fixup base to be relative to beginning of first page.
+* Set initial n to be the maximum number of bytes in the
+* first page that can be validated.
+*/
+   base += (bp->b_offset & PAGE_MASK);
+   n = PAGE_SIZE - (base & PAGE_MASK);
+
+   VM_OBJECT_LOCK(bp->b_bufobj->bo_object);
+   for (i = base / PAGE_SIZE; size > 0 && i < bp->b_npages; ++i) {
+   m = bp->b_pages[i];
+   if (n > size)
+   n = size;
+   vm_page_set_valid(m, base & PAGE_MASK, n);
+   base += n;
+   size -= n;
+   n = PAGE_SIZE;
+   }
+   VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object);
+}
+
+/*
  * vfs_bio_set_validclean:
  *
  * Set the range within the buffer to valid and clean.  The range is 

Modified: head/sys/sys/buf.h
==
--- head/sys/sys/buf.h  Sun May 17 20:16:38 2009(r192259)
+++ head/sys/sys/buf.h  Sun May 17 20:26:00 2009(r192260)
@@ -498,6 +498,7 @@ int cluster_read(struct vnode *, u_quad_
struct ucred *, long, int, struct buf **);
 intcluster_wbuild(struct vnode *, long, daddr_t, int);
 void   cluster_write(struct vnode *, struct buf *, u_quad_t, int);
+void   vfs_bio_set_valid(struct buf *, int base, int size);
 void   vfs_bio_set_validclean(struct buf *, int base, int size);
 void   vfs_bio_clrbuf(struct buf *);
 void   vfs_busy_pages(struct buf *, int clear_modify);

Modified: head/sys/ufs/ffs/ffs_alloc.c
==
--- head/sys/ufs/ffs/ffs_alloc.cSun May 17 20:16:38 2009
(r192259)
+++ head/sys/ufs/ffs/ffs_alloc.cSun May 17 20:26:00 2009
(r192260)
@@ -326,10 +326,9 @@ retry:
ip->i_flag |= IN_CHANGE | IN_UPDATE;
allocbuf(bp, nsize);
bp->b_flags |= B_DONE;
-   if ((bp->b_flags & (B_MALLOC | B_VMIO)) != B_VMIO)
-   bzero((char *)bp->b_data + osize, nsize - osize);
-   else
-   vfs_bio_clrbuf(bp);
+   bzero(bp->b_data + osize, nsize - osize);
+   if ((bp->b_flags & (B_MALLOC | B_VMIO)) == B_VMIO)
+   vfs_bio_set_valid(bp, osize, nsize - osize);
*bpp = bp;
return (0);
}
@@ -404,10 +403,9 @@ retry:
ip->i_flag |= IN_CHANGE | IN_UPDATE;
allocbuf(bp, nsize);
bp->b_flags |= B_DONE;
-   if ((bp->b_flags & (B_MALLOC | B_VMIO)) != B_VMIO)
-   bzero((char *)bp->b_data + osize, nsize - osize);
-   else
-   vfs_bio_clrbuf(bp);
+   bzero(bp->b_data + osize, nsize - osize);
+   if ((bp->b_flags & (B_MALLOC | B_VMIO)) == B_VMIO)
+   vfs_bio_set_valid(bp, osize, nsize - osize);
*bpp = bp;
return (0);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192261 - head/sys/vm

2009-05-17 Thread Alan Cox
Author: alc
Date: Sun May 17 20:40:41 2009
New Revision: 192261
URL: http://svn.freebsd.org/changeset/base/192261

Log:
  Eliminate a pointless call to pmap_clear_reference() from vm_pageout_scan().
  If the page belongs to an object with a reference count of zero, then it
  can't have any managed mappings on which to clear a reference bit.

Modified:
  head/sys/vm/vm_pageout.c

Modified: head/sys/vm/vm_pageout.c
==
--- head/sys/vm/vm_pageout.cSun May 17 20:26:00 2009(r192260)
+++ head/sys/vm/vm_pageout.cSun May 17 20:40:41 2009(r192261)
@@ -786,7 +786,8 @@ rescan0:
 */
if (object->ref_count == 0) {
vm_page_flag_clear(m, PG_REFERENCED);
-   pmap_clear_reference(m);
+   KASSERT(!pmap_page_is_mapped(m),
+   ("vm_pageout_scan: page %p is mapped", m));
 
/*
 * Otherwise, if the page has been referenced while in the 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r192262 - head/sys/netinet

2009-05-17 Thread Bjoern A. Zeeb
Author: bz
Date: Sun May 17 20:53:10 2009
New Revision: 192262
URL: http://svn.freebsd.org/changeset/base/192262

Log:
  Unbreak options VIMAGE builds, in a followup to r192011 which did not
  introduce INIT_VNET_NET() initializers necessary for accessing V_loif.
  
  Submitted by: zec
  Reviewed by:  julian

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Sun May 17 20:40:41 2009(r192261)
+++ head/sys/netinet/in.c   Sun May 17 20:53:10 2009(r192262)
@@ -814,6 +814,7 @@ static int
 in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia, struct sockaddr_in *sin,
 int scrub)
 {
+   INIT_VNET_NET(ifp->if_vnet);
INIT_VNET_INET(ifp->if_vnet);
register u_long i = ntohl(sin->sin_addr.s_addr);
struct sockaddr_in oldaddr;
@@ -1007,6 +1008,7 @@ extern void arp_ifscrub(struct ifnet *if
 static int
 in_scrubprefix(struct in_ifaddr *target)
 {
+   INIT_VNET_NET(curvnet);
INIT_VNET_INET(curvnet);
struct in_ifaddr *ia;
struct in_addr prefix, mask, p;
___
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: r192263 - head/sys/sys

2009-05-17 Thread Bjoern A. Zeeb
Author: bz
Date: Sun May 17 20:55:33 2009
New Revision: 192263
URL: http://svn.freebsd.org/changeset/base/192263

Log:
  Put the structs under #ifndef VIMAGE_GLOBALS as some constants are not
  defined for VIMAGE_GLOBALS and thus broke the build for that option.
  
  Reported by:  csjp

Modified:
  head/sys/sys/vimage.h

Modified: head/sys/sys/vimage.h
==
--- head/sys/sys/vimage.h   Sun May 17 20:53:10 2009(r192262)
+++ head/sys/sys/vimage.h   Sun May 17 20:55:33 2009(r192263)
@@ -160,7 +160,6 @@ voidvnet_mod_deregister_multi(const str
sizeof(vnet_ ## mod ## _0._ ## name) }
 #endif
 #defineVNET_SYMMAP_END { NULL, 0 }
-#endif /* !VIMAGE_GLOBALS */
 
 struct vimage {
LIST_ENTRY(vimage)   vi_le; /* all vimage list */
@@ -191,7 +190,6 @@ struct vprocg {
char _domainname[MAXHOSTNAMELEN];
 };
 
-#ifndef VIMAGE_GLOBALS
 #ifdef VIMAGE
 LIST_HEAD(vimage_list_head, vimage);
 extern struct vimage_list_head vimage_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: r192264 - head/sys/contrib/altq/altq

2009-05-17 Thread Bjoern A. Zeeb
Author: bz
Date: Sun May 17 20:59:09 2009
New Revision: 192264
URL: http://svn.freebsd.org/changeset/base/192264

Log:
  Add a missing INIT_VNET_NET() to get VIMAGE closer to full LINT again.

Modified:
  head/sys/contrib/altq/altq/altq_subr.c

Modified: head/sys/contrib/altq/altq/altq_subr.c
==
--- head/sys/contrib/altq/altq/altq_subr.c  Sun May 17 20:55:33 2009
(r192263)
+++ head/sys/contrib/altq/altq/altq_subr.c  Sun May 17 20:59:09 2009
(r192264)
@@ -454,6 +454,7 @@ static void
 tbr_timeout(arg)
void *arg;
 {
+   INIT_VNET_NET(curvnet);
struct ifnet *ifp;
int active, 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"


svn commit: r192265 - head/share/man/man9

2009-05-17 Thread Christian Brueffer
Author: brueffer
Date: Sun May 17 21:28:37 2009
New Revision: 192265
URL: http://svn.freebsd.org/changeset/base/192265

Log:
  Document sbuf_new_auto().
  
  While here, add a missing `-' in phk's name.
  
  MFC after:3 days

Modified:
  head/share/man/man9/sbuf.9

Modified: head/share/man/man9/sbuf.9
==
--- head/share/man/man9/sbuf.9  Sun May 17 20:59:09 2009(r192264)
+++ head/share/man/man9/sbuf.9  Sun May 17 21:28:37 2009(r192265)
@@ -1,5 +1,5 @@
 .\"-
-.\" Copyright (c) 2000 Poul Henning Kamp and Dag-Erling Co�dan Sm�rgrav
+.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Co�dan Sm�rgrav
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -25,12 +25,13 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 9, 2004
+.Dd May 17, 2009
 .Dt SBUF 9
 .Os
 .Sh NAME
 .Nm sbuf ,
 .Nm sbuf_new ,
+.Nm sbuf_new_auto ,
 .Nm sbuf_clear ,
 .Nm sbuf_setpos ,
 .Nm sbuf_bcat ,
@@ -55,6 +56,8 @@
 .In sys/sbuf.h
 .Ft struct sbuf *
 .Fn sbuf_new "struct sbuf *s" "char *buf" "int length" "int flags"
+.Ft struct sbuf *
+.Fn sbuf_new_auto
 .Ft void
 .Fn sbuf_clear "struct sbuf *s"
 .Ft int
@@ -148,6 +151,19 @@ The result of accessing that array direc
 sbuf is undefined.
 .Pp
 The
+.Fn sbuf_new_auto
+function is a shortcut for creating a completely dynamic
+.Nm .
+It is the equivalent of calling
+.Fn sbuf_new
+with values
+.Dv NULL ,
+.Dv NULL ,
+.Dv 0 ,
+and
+.Dv SBUF_AUTOEXTEND .
+.Pp
+The
 .Fn sbuf_delete
 function clears the
 .Fa sbuf
___
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: r192033 - stable/7/sys/dev/ata

2009-05-17 Thread Alexander Motin

Bruce Simpson wrote:

Alexander Motin wrote:

Bruce Simpson wrote:
Could this commit have broken boot on my amd64 system with an ULi 
SATA controller?


This commit could change driver used for controller and so expose some 
other bug in ALI driver. As I can see, there is present 
vendor-specific driver for this chip, but without pciconf output I 
can't say if AHCI driver is also able to attach it.


atap...@pci0:0:31:1:class=0x010400 card=0x81561043 chip=0x528710b9 
rev=0x02 hdr=0x00

   vendor = 'Acer Labs Incorporated (ALi/ULi)'
   device = '52871849 ALI SATA controller'
   class  = mass storage
   subclass   = RAID


This change is not anyhow related to your system. Looks like the real 
reason found by jhb@ on sta...@. Probably something become more strict 
in system resource management last time and this driver violates now.


--
Alexander Motin
___
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: r192270 - head/sys/kern

2009-05-17 Thread Alan Cox
Author: alc
Date: Sun May 17 23:25:53 2009
New Revision: 192270
URL: http://svn.freebsd.org/changeset/base/192270

Log:
  Several changes to vfs_bio_clrbuf():
  
  Provide a more descriptive comment.
  
  Eliminate dead code.  The page cannot possibly have PG_ZERO set.
  
  Eliminate unnecessary blank lines.
  
  Reviewed by:  tegge

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Sun May 17 23:17:56 2009(r192269)
+++ head/sys/kern/vfs_bio.c Sun May 17 23:25:53 2009(r192270)
@@ -3706,24 +3706,25 @@ vfs_bio_set_validclean(struct buf *bp, i
 /*
  * vfs_bio_clrbuf:
  *
- * clear a buffer.  This routine essentially fakes an I/O, so we need
- * to clear BIO_ERROR and B_INVAL.
+ * If the specified buffer is a non-VMIO buffer, clear the entire
+ * buffer.  If the specified buffer is a VMIO buffer, clear and
+ * validate only the previously invalid portions of the buffer.
+ * This routine essentially fakes an I/O, so we need to clear
+ * BIO_ERROR and B_INVAL.
  *
  * Note that while we only theoretically need to clear through b_bcount,
  * we go ahead and clear through b_bufsize.
  */
-
 void
 vfs_bio_clrbuf(struct buf *bp) 
 {
-   int i, j, mask = 0;
+   int i, j, mask;
caddr_t sa, ea;
 
if ((bp->b_flags & (B_VMIO | B_MALLOC)) != B_VMIO) {
clrbuf(bp);
return;
}
-
bp->b_flags &= ~B_INVAL;
bp->b_ioflags &= ~BIO_ERROR;
VM_OBJECT_LOCK(bp->b_bufobj->bo_object);
@@ -3735,8 +3736,7 @@ vfs_bio_clrbuf(struct buf *bp) 
VM_OBJECT_LOCK_ASSERT(bp->b_pages[0]->object, MA_OWNED);
if ((bp->b_pages[0]->valid & mask) == mask)
goto unlock;
-   if (((bp->b_pages[0]->flags & PG_ZERO) == 0) &&
-   ((bp->b_pages[0]->valid & mask) == 0)) {
+   if ((bp->b_pages[0]->valid & mask) == 0) {
bzero(bp->b_data, bp->b_bufsize);
bp->b_pages[0]->valid |= mask;
goto unlock;
@@ -3755,13 +3755,11 @@ vfs_bio_clrbuf(struct buf *bp) 
VM_OBJECT_LOCK_ASSERT(bp->b_pages[i]->object, MA_OWNED);
if ((bp->b_pages[i]->valid & mask) == mask)
continue;
-   if ((bp->b_pages[i]->valid & mask) == 0) {
-   if ((bp->b_pages[i]->flags & PG_ZERO) == 0)
-   bzero(sa, ea - sa);
-   } else {
+   if ((bp->b_pages[i]->valid & mask) == 0)
+   bzero(sa, ea - sa);
+   else {
for (; sa < ea; sa += DEV_BSIZE, j++) {
-   if (((bp->b_pages[i]->flags & PG_ZERO) == 0) &&
-   (bp->b_pages[i]->valid & (1 << j)) == 0)
+   if ((bp->b_pages[i]->valid & (1 << j)) == 0)
bzero(sa, DEV_BSIZE);
}
}
___
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: r192274 - svnadmin/conf

2009-05-17 Thread Kip Macy
Author: kmacy
Date: Sun May 17 23:40:59 2009
New Revision: 192274
URL: http://svn.freebsd.org/changeset/base/192274

Log:
  add self to list to avoid size limit

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confSun May 17 23:32:24 2009
(r192273)
+++ svnadmin/conf/sizelimit.confSun May 17 23:40:59 2009
(r192274)
@@ -27,3 +27,4 @@ sam
 rpaulo
 rwatson
 gonzo
+kmacy
___
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: r192033 - stable/7/sys/dev/ata

2009-05-17 Thread Bruce Simpson

Alexander Motin wrote:

...
This change is not anyhow related to your system. Looks like the real 
reason found by jhb@ on sta...@. Probably something become more strict 
in system resource management last time and this driver violates now.




Thanks... I reckon John is probably on the money with this but have not 
looked closely. Hopefully the fix is backportable... I will try to find 
time to test HEAD, I need to do some HEAD testing on this box anyway, 
using a USB key is possible for this with NanoBSD now :-)


cheers,
BMS
___
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: r192277 - head/sys/dev/bwi

2009-05-17 Thread Warner Losh
Author: imp
Date: Mon May 18 01:00:11 2009
New Revision: 192277
URL: http://svn.freebsd.org/changeset/base/192277

Log:
  Turns out that my BCM4318 has a PCI ID of 0x4319, which lead me to
  believe it was a BCM4319.  However, it is the a/b/g variation of the
  BCM4318.  The chip itself is labelled BCM4318EKFBG, and the board is
  BCM94318MKABG.
  
  Paradox's patch includes the type of 802.11 wireless for each card,
  but changes all the names (I don't think the latter is quite right).
  Import that part of the patch, but keep the current set of BCM names
  (with a minor tweak for the 4306 ones). I'll need to verify them via
  some other means.
  
  Obtained from:http://paradox.lissyara.su/bwi.diff (partially)

Modified:
  head/sys/dev/bwi/if_bwi_pci.c

Modified: head/sys/dev/bwi/if_bwi_pci.c
==
--- head/sys/dev/bwi/if_bwi_pci.c   Sun May 17 23:44:10 2009
(r192276)
+++ head/sys/dev/bwi/if_bwi_pci.c   Mon May 18 01:00:11 2009
(r192277)
@@ -80,16 +80,18 @@ static const struct bwi_dev {
uint16_tdid;
const char  *desc;
 } bwi_devices[] = {
-   { PCI_VENDOR_BROADCOM, 0x4301,"Broadcom BCM4301 802.11 Wireless Lan" },
-   { PCI_VENDOR_BROADCOM, 0x4307,"Broadcom BCM4307 802.11 Wireless Lan" },
-   { PCI_VENDOR_BROADCOM, 0x4311,"Broadcom BCM4311 802.11 Wireless Lan" },
-   { PCI_VENDOR_BROADCOM, 0x4312,"Broadcom BCM4312 802.11 Wireless Lan" },
-   { PCI_VENDOR_BROADCOM, 0x4320,"Broadcom BCM4306v1 802.11 Wireless Lan"},
-   { PCI_VENDOR_BROADCOM, 0x4321,"Broadcom BCM4306v2 802.11 Wireless Lan"},
-   { PCI_VENDOR_BROADCOM, 0x4325,"Broadcom BCM4306v3 802.11 Wireless Lan"},
-   { PCI_VENDOR_BROADCOM, 0x4324,"Broadcom BCM4309 802.11 Wireless Lan" },
-   { PCI_VENDOR_BROADCOM, 0x4318,"Broadcom BCM4318 802.11 Wireless Lan" },
-   { PCI_VENDOR_BROADCOM, 0x4319,"Broadcom BCM4319 802.11 Wireless Lan" }
+   { PCI_VENDOR_BROADCOM, 0x4301,"Broadcom BCM4301 802.11b Wireless Lan" },
+   { PCI_VENDOR_BROADCOM, 0x4307,"Broadcom BCM4307 802.11b Wireless Lan" },
+   { PCI_VENDOR_BROADCOM, 0x4311,"Broadcom BCM4311 802.11b/g Wireless Lan" 
},
+   { PCI_VENDOR_BROADCOM, 0x4312,"Broadcom BCM4312 802.11a/b/g Wireless 
Lan" },
+   { PCI_VENDOR_BROADCOM, 0x4313,"Broadcom BCM4312 802.11a Wireless Lan" },
+   { PCI_VENDOR_BROADCOM, 0x4320,"Broadcom BCM4306 802.11b/g Wireless 
Lan"},
+   { PCI_VENDOR_BROADCOM, 0x4321,"Broadcom BCM4306 802.11a Wireless Lan"},
+   { PCI_VENDOR_BROADCOM, 0x4325,"Broadcom BCM4306 802.11b/g Wireless 
Lan"},
+   { PCI_VENDOR_BROADCOM, 0x4324,"Broadcom BCM4309 802.11a/b/g Wireless 
Lan" },
+   { PCI_VENDOR_BROADCOM, 0x4318,"Broadcom BCM4318 802.11b/g Wireless Lan" 
},
+   { PCI_VENDOR_BROADCOM, 0x4319,"Broadcom BCM4318 802.11a/b/g Wireless 
Lan" },
+   { PCI_VENDOR_BROADCOM, 0x431a,"Broadcom BCM4318 802.11a Wireless Lan" }
 };
 
 static int
___
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: r192278 - head/sys/contrib/altq/altq

2009-05-17 Thread Bjoern A. Zeeb
Author: bz
Date: Mon May 18 01:05:09 2009
New Revision: 192278
URL: http://svn.freebsd.org/changeset/base/192278

Log:
  tbr_timeout() is a timer driven function[1]. While the previous commit
  made LINT happy this does the proper looping over all vnets as we are
  only called `globally' and not once per vnet instance.
  
  Reported by:  zec [1]
  Missed by:bz  [1] in r192264
  Reviewed by:  zec

Modified:
  head/sys/contrib/altq/altq/altq_subr.c

Modified: head/sys/contrib/altq/altq/altq_subr.c
==
--- head/sys/contrib/altq/altq/altq_subr.c  Mon May 18 01:00:11 2009
(r192277)
+++ head/sys/contrib/altq/altq/altq_subr.c  Mon May 18 01:05:09 2009
(r192278)
@@ -454,7 +454,9 @@ static void
 tbr_timeout(arg)
void *arg;
 {
-   INIT_VNET_NET(curvnet);
+#if defined(__FreeBSD__)
+   VNET_ITERATOR_DECL(vnet_iter);
+#endif
struct ifnet *ifp;
int active, s;
 
@@ -466,16 +468,25 @@ tbr_timeout(arg)
 #endif
 #if defined(__FreeBSD__) && (__FreeBSD_version >= 50)
IFNET_RLOCK();
-#endif
-   for (ifp = TAILQ_FIRST(&V_ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) {
-   /* read from if_snd unlocked */
-   if (!TBR_IS_ENABLED(&ifp->if_snd))
-   continue;
-   active++;
-   if (!IFQ_IS_EMPTY(&ifp->if_snd) && ifp->if_start != NULL)
-   (*ifp->if_start)(ifp);
-   }
+   VNET_LIST_RLOCK();
+   VNET_FOREACH(vnet_iter) {
+   CURVNET_SET(vnet_iter);
+   INIT_VNET_NET(vnet_iter);
+#endif
+   for (ifp = TAILQ_FIRST(&V_ifnet); ifp;
+   ifp = TAILQ_NEXT(ifp, if_list)) {
+   /* read from if_snd unlocked */
+   if (!TBR_IS_ENABLED(&ifp->if_snd))
+   continue;
+   active++;
+   if (!IFQ_IS_EMPTY(&ifp->if_snd) &&
+   ifp->if_start != NULL)
+   (*ifp->if_start)(ifp);
+   }
 #if defined(__FreeBSD__) && (__FreeBSD_version >= 50)
+   CURVNET_RESTORE();
+   }
+   VNET_LIST_RUNLOCK();
IFNET_RUNLOCK();
 #endif
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"


svn commit: r192279 - head/sys/dev/bwi

2009-05-17 Thread Warner Losh
Author: imp
Date: Mon May 18 01:07:38 2009
New Revision: 192279
URL: http://svn.freebsd.org/changeset/base/192279

Log:
  Correct types of PHY, per http://bcm-specs.sipsolutions.net/PHYVersioning
  
  # Note: The driver doesn't support either these PHY types, so this is
  # effectively a nop.
  
  Submitted by: "ddk"
  Obtained from:http://paradox.lissyara.su/bwi.diff

Modified:
  head/sys/dev/bwi/if_bwireg.h

Modified: head/sys/dev/bwi/if_bwireg.h
==
--- head/sys/dev/bwi/if_bwireg.hMon May 18 01:05:09 2009
(r192278)
+++ head/sys/dev/bwi/if_bwireg.hMon May 18 01:07:38 2009
(r192279)
@@ -275,7 +275,8 @@
 #define BWI_PHYINFO_TYPE_11A   0
 #define BWI_PHYINFO_TYPE_11B   1
 #define BWI_PHYINFO_TYPE_11G   2
-#define BWI_PHYINFO_TYPE_11N   5
+#define BWI_PHYINFO_TYPE_11N   4
+#define BWI_PHYINFO_TYPE_11LP  5
 #define BWI_PHYINFO_VER_MASK   __BITS(15, 12)
 
 #define BWI_RF_ANTDIV  0x3e2   /* Antenna Diversity?? */
___
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: r191902 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2009-05-17 Thread Adam McDougall
On Thu, May 07, 2009 at 08:57:06PM +, Kip Macy wrote:

  Author: kmacy
  Date: Thu May  7 20:57:06 2009
  New Revision: 191902
  URL: http://svn.freebsd.org/changeset/base/191902
  
  Log:
Allow the VM to provide backpressure on the ARC cache as it does
on Solaris.
  
  Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  
  Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  ==
  --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu May  7 
20:39:23 2009(r191901)
  +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu May  7 
20:57:06 2009(r191902)
  @@ -131,6 +131,8 @@
   #include 
   #include 
   
  +#include 
  +
   static kmutex_t  arc_reclaim_thr_lock;
   static kcondvar_tarc_reclaim_thr_cv; /* used to signal reclaim thr */
   static uint8_t   arc_thread_exit;
  @@ -1809,6 +1811,13 @@ arc_reclaim_needed(void)
   
   #ifdef _KERNEL
   
  + /*
  +  * If pages are needed or we're within 2048 pages 
  +  * of needing to page need to reclaim
  +  */
  + if (vm_pages_needed || (vm_paging_target() > -2048))
  + return (1);
  +
if (needfree)
return (1);
   
This seems to cause a problem for me because it appears to put undue pressure 
on the arc when I think it shouldn't, and it seems the shrunk arc causes my 
performance to degrade severely.  I have an amd64 server with 20G of ram that 
runs ftp, cvsupd, rsyncd, two http daemons, etc and I have 
vfs.zfs.arc_max=1024M for now.  I ran "top | grep Mem" and sysctl 
kstat.zfs.misc.arcstats.size every 10 seconds shortly after the system came up 
and watched the Free column slowly drop over the next few hours.  The 
arcstats.size will generally stay quite close to 1024M.  What I see is at this 
point:

Mem: 610M Active, 16G Inact, 2226M Wired, 48M Cache, 144K Buf, 1043M Free
kstat.zfs.misc.arcstats.size: 1073922176

Free will temporarily cease to decrease while arcstats.size starts to decrease 
over the next few minutes at about the same rate Free used to decrease, until 
it hits:

Mem: 613M Active, 16G Inact, 1819M Wired, 50M Cache, 144K Buf, 1023M Free 
kstat.zfs.misc.arcstats.size: 458326208

then the arcstats.size stays around this depressed size while Free continues 
to float down towards ~650M and Wired down to ~1796M where they stabilize. 
When I revert this svn rev, arcstats.size remains around 1024M the entire 
time, and performance is fine. None of my services seem to be putting any real 
pressure on the system and it is not swapping, my novice conclusion is this 
svn change allows the lack of "Free" memory to put undue pressure on the arc 
ignoring Inact etc.  I also tried setting vfs.zfs.arc_min=950M which I think 
was helpful but perhaps not 100%, but I don't have detailed stats on that; in 
any case it would be a new workaround to add, and I'm trying hard at this 
point to be rid of workarounds so I can help test "bare" ZFS and any 
experimental patches that come up.

Thanks for your help and any input on this issue.  
___
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: r192280 - head/bin/ps

2009-05-17 Thread Brian Somers
Author: brian
Date: Mon May 18 01:45:52 2009
New Revision: 192280
URL: http://svn.freebsd.org/changeset/base/192280

Log:
  Remove redundant whitespace

Modified:
  head/bin/ps/ps.c

Modified: head/bin/ps/ps.c
==
--- head/bin/ps/ps.cMon May 18 01:07:38 2009(r192279)
+++ head/bin/ps/ps.cMon May 18 01:45:52 2009(r192280)
@@ -764,7 +764,7 @@ addelem_tty(struct listinfo *inf, const 
strlcat(pathbuf2, elem, sizeof(pathbuf2));
if (stat(pathbuf2, &sb) == 0 && S_ISCHR(sb.st_mode)) {
/* No need to repeat stat() && S_ISCHR() checks */
-   ttypath = NULL; 
+   ttypath = NULL;
break;
}
/* Check to see if /dev/pts/${elem} exists */
@@ -772,7 +772,7 @@ addelem_tty(struct listinfo *inf, const 
strlcat(pathbuf3, elem, sizeof(pathbuf3));
if (stat(pathbuf3, &sb) == 0 && S_ISCHR(sb.st_mode)) {
/* No need to repeat stat() && S_ISCHR() checks */
-   ttypath = NULL; 
+   ttypath = NULL;
break;
}
break;
@@ -992,7 +992,6 @@ descendant_sort(KINFO *ki, int items)
ki[src].ki_d.prefix[n * 2] =
path[n / 8] & 1 << (n % 8) ? '|' : ' ';
ki[src].ki_d.prefix[n * 2 + 1] = ' ';
-   
}
if (n == lvl - 2) {
/* Have I any more siblings? */
___
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: r192281 - head/sys/dev/bce

2009-05-17 Thread Xin LI
Author: delphij
Date: Mon May 18 01:51:52 2009
New Revision: 192281
URL: http://svn.freebsd.org/changeset/base/192281

Log:
  DMA synchronization fixes:
  
   - In bce_rx_intr(), use BUS_DMASYNC_POSTREAD instead of
 BUS_DMASYNC_POSTWRITE, as we want to "read" from the
 rx page chain pages.
   - Document why we need to do PREWRITE after we have updated
 the rx page chain pages.
   - In bce_intr(), use BUS_DMASYNC_POSTREAD and
 BUS_DMASYNC_PREREAD when before and after CPU "reading"
 the status block.
   - Adjust some nearby style mismatches/etc.
  
  Pointed out by:   yongari
  Approved by:  davidch (no objection) but bugs are mine :)

Modified:
  head/sys/dev/bce/if_bce.c

Modified: head/sys/dev/bce/if_bce.c
==
--- head/sys/dev/bce/if_bce.c   Mon May 18 01:45:52 2009(r192280)
+++ head/sys/dev/bce/if_bce.c   Mon May 18 01:51:52 2009(r192281)
@@ -4884,7 +4884,7 @@ bce_get_rx_buf(struct bce_softc *sc, str
KASSERT(nsegs == 1, ("%s(): Too many segments returned (%d)!",
 __FUNCTION__, nsegs));
 
-   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREWRITE) here? */
+   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREREAD) here? */
 
/* Setup the rx_bd for the segment. */
rxbd = &sc->rx_bd_chain[RX_PAGE(*chain_prod)][RX_IDX(*chain_prod)];
@@ -4993,7 +4993,7 @@ bce_get_pg_buf(struct bce_softc *sc, str
goto bce_get_pg_buf_exit;
}
 
-   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREWRITE) here? */
+   /* ToDo: Do we need bus_dmamap_sync(,,BUS_DMASYNC_PREREAD) here? */
 
/*
 * The page chain uses the same rx_bd data structure
@@ -5270,13 +5270,11 @@ bce_init_rx_chain(struct bce_softc *sc)
rxbd->rx_bd_haddr_lo = 
htole32(BCE_ADDR_LO(sc->rx_bd_chain_paddr[j]));
}
 
-/* Fill up the RX chain. */
+   /* Fill up the RX chain. */
bce_fill_rx_chain(sc);
 
for (i = 0; i < RX_PAGES; i++) {
-   bus_dmamap_sync(
-   sc->rx_bd_chain_tag,
-   sc->rx_bd_chain_map[i],
+   bus_dmamap_sync(sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i],
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
}
 
@@ -5447,9 +5445,7 @@ bce_init_pg_chain(struct bce_softc *sc)
bce_fill_pg_chain(sc);
 
for (i = 0; i < PG_PAGES; i++) {
-   bus_dmamap_sync(
-   sc->pg_bd_chain_tag,
-   sc->pg_bd_chain_map[i],
+   bus_dmamap_sync(sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i],
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
}
 
@@ -5732,13 +5728,13 @@ bce_rx_intr(struct bce_softc *sc)
/* Prepare the RX chain pages to be accessed by the host CPU. */
for (int i = 0; i < RX_PAGES; i++)
bus_dmamap_sync(sc->rx_bd_chain_tag,
-   sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTWRITE);
+   sc->rx_bd_chain_map[i], BUS_DMASYNC_POSTREAD);
 
 #ifdef ZERO_COPY_SOCKETS
/* Prepare the page chain pages to be accessed by the host CPU. */
for (int i = 0; i < PG_PAGES; i++)
bus_dmamap_sync(sc->pg_bd_chain_tag,
-   sc->pg_bd_chain_map[i], BUS_DMASYNC_POSTWRITE);
+   sc->pg_bd_chain_map[i], BUS_DMASYNC_POSTREAD);
 #endif
 
/* Get the hardware's view of the RX consumer index. */
@@ -5765,9 +5761,8 @@ bce_rx_intr(struct bce_softc *sc)
sw_rx_cons_idx = RX_CHAIN_IDX(sw_rx_cons);
 
/* Unmap the mbuf from DMA space. */
-   bus_dmamap_sync(sc->rx_mbuf_tag,
-   sc->rx_mbuf_map[sw_rx_cons_idx],
-   BUS_DMASYNC_POSTREAD);
+   bus_dmamap_sync(sc->rx_mbuf_tag, 
sc->rx_mbuf_map[sw_rx_cons_idx],
+   BUS_DMASYNC_POSTREAD);
bus_dmamap_unload(sc->rx_mbuf_tag,
sc->rx_mbuf_map[sw_rx_cons_idx]);
 
@@ -6011,6 +6006,7 @@ bce_rx_int_next_rx:
sc->rx_cons = sw_rx_cons;
bce_fill_rx_chain(sc);
 
+   /* Prepare the page chain pages to be accessed by the NIC. */
for (int i = 0; i < RX_PAGES; i++)
bus_dmamap_sync(sc->rx_bd_chain_tag,
sc->rx_bd_chain_map[i], BUS_DMASYNC_PREWRITE);
@@ -7023,8 +7019,9 @@ bce_intr(void *xsc)
 
DBRUN(sc->interrupts_generated++);
 
+   /* Synchnorize before we read from interface's status block */
bus_dmamap_sync(sc->status_tag, sc->status_map,
-   BUS_DMASYNC_POSTWRITE);
+   BUS_DMASYNC_POSTREAD);
 
/*
 * If the hardware status block index
@@ -7112,7 +7109,7 @@ bce_intr(void *xsc)
}
 
bus_dmamap_sync(sc->status_tag, sc->status_map,
-   BUS_DMASYNC_PREWRITE);
+   BUS_DMASYNC_PREREAD);
 
/* Re-enable interrupts. */
bce_enable_intr(sc, 0)

svn commit: r192284 - head/sys/compat/linux

2009-05-17 Thread Dmitry Chagin
Author: dchagin
Date: Mon May 18 04:07:46 2009
New Revision: 192284
URL: http://svn.freebsd.org/changeset/base/192284

Log:
  Implement MSG_CMSG_CLOEXEC flag for linux_recvmsg().
  
  Approved by:  kib (mentor)
  MFC after:1 month

Modified:
  head/sys/compat/linux/linux_socket.c
  head/sys/compat/linux/linux_socket.h

Modified: head/sys/compat/linux/linux_socket.c
==
--- head/sys/compat/linux/linux_socket.cMon May 18 02:40:11 2009
(r192283)
+++ head/sys/compat/linux/linux_socket.cMon May 18 04:07:46 2009
(r192284)
@@ -1148,7 +1148,7 @@ linux_recvmsg(struct thread *td, struct 
struct mbuf **controlp;
caddr_t outbuf;
void *data;
-   int error;
+   int error, i, fd, fds, *fdp;
 
error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg));
if (error)
@@ -1217,15 +1217,30 @@ linux_recvmsg(struct thread *td, struct 
data = CMSG_DATA(cm);
datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data;
 
-   if (outlen + LINUX_CMSG_LEN(datalen) >
-   linux_msg.msg_controllen) {
-   if (outlen == 0) {
-   error = EMSGSIZE;
-   goto bad;
-   } else {
-   linux_msg.msg_flags |= LINUX_MSG_CTRUNC;
-   goto out;
+   switch (linux_cmsg->cmsg_type)
+   {
+   case LINUX_SCM_RIGHTS:
+   if (outlen + LINUX_CMSG_LEN(datalen) >
+   linux_msg.msg_controllen) {
+   if (outlen == 0) {
+   error = EMSGSIZE;
+   goto bad;
+   } else {
+   linux_msg.msg_flags |=
+   LINUX_MSG_CTRUNC;
+   goto out;
+   }
+   }
+   if (args->flags & LINUX_MSG_CMSG_CLOEXEC) {
+   fds = datalen / sizeof(int);
+   fdp = data;
+   for (i = 0; i < fds; i++) {
+   fd = *fdp++;
+   (void)kern_fcntl(td, fd,
+   F_SETFD, FD_CLOEXEC);
+   }
}
+   break;
}
 
linux_cmsg->cmsg_len = LINUX_CMSG_LEN(datalen);

Modified: head/sys/compat/linux/linux_socket.h
==
--- head/sys/compat/linux/linux_socket.hMon May 18 02:40:11 2009
(r192283)
+++ head/sys/compat/linux/linux_socket.hMon May 18 04:07:46 2009
(r192284)
@@ -48,6 +48,7 @@
 #define LINUX_MSG_RST  0x1000
 #define LINUX_MSG_ERRQUEUE 0x2000
 #define LINUX_MSG_NOSIGNAL 0x4000
+#define LINUX_MSG_CMSG_CLOEXEC 0x4000
 
 /* Socket-level control message types */
 
___
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: r192282 - head/sys/netinet6

2009-05-17 Thread Bjoern A. Zeeb

On Mon, 18 May 2009, Qing Li wrote:


Author: qingli
Date: Mon May 18 02:25:45 2009
New Revision: 192282
URL: http://svn.freebsd.org/changeset/base/192282

Log:
 This patch resolves the following issues:

 -- A routing socket message is not generated when an IPv6 address is
either inserted or deleted from an interface. The missing routing
message problem was discovered by Randall Stewart and Michael Tuxen
during SCTP testing.

 -- Previously when an IPv6 address is configured on an interface, if the
prefix length is /128, then a host route is instaleld in the kernel
for this address. But this host route is not deleted when that IPv6
address is removed from the interface.

 -- Routes to the link-local all-nodes multicast address and the
interface-local all-nodes multicast address are not removed when
the last IPv6 address is removed from an interface.

 Reviewed by:   bz, gnn


I guess that should have been:

Discussed with: gnn, rrs, bz, tuexen
Tested by:  tuexen


And thanks a lot for fixing all this!



Modified:
 head/sys/netinet6/in6.c

--
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: r192282 - head/sys/netinet6

2009-05-17 Thread Qing Li
Author: qingli
Date: Mon May 18 02:25:45 2009
New Revision: 192282
URL: http://svn.freebsd.org/changeset/base/192282

Log:
  This patch resolves the following issues:
  
  -- A routing socket message is not generated when an IPv6 address is
 either inserted or deleted from an interface. The missing routing
 message problem was discovered by Randall Stewart and Michael Tuxen
 during SCTP testing.
  
  -- Previously when an IPv6 address is configured on an interface, if the
 prefix length is /128, then a host route is instaleld in the kernel
 for this address. But this host route is not deleted when that IPv6
 address is removed from the interface.
  
  -- Routes to the link-local all-nodes multicast address and the
 interface-local all-nodes multicast address are not removed when
 the last IPv6 address is removed from an interface.
  
  Reviewed by:  bz, gnn

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Mon May 18 01:51:52 2009(r192281)
+++ head/sys/netinet6/in6.c Mon May 18 02:25:45 2009(r192282)
@@ -1151,6 +1151,28 @@ in6_purgeaddr(struct ifaddr *ifa)
struct ifnet *ifp = ifa->ifa_ifp;
struct in6_ifaddr *ia = (struct in6_ifaddr *) ifa;
struct in6_multi_mship *imm;
+   struct sockaddr_in6 mltaddr, mltmask;
+   struct rtentry rt0;
+   struct sockaddr_dl gateway;
+   struct sockaddr_in6 mask, addr;
+   int plen, error;
+   struct rtentry *rt;
+   struct ifaddr *ifa0, *nifa;
+
+   /*
+* find another IPv6 address as the gateway for the
+* link-local and node-local all-nodes multicast
+* address routes
+*/
+   TAILQ_FOREACH_SAFE(ifa0, &ifp->if_addrhead, ifa_link, nifa) {
+   if ((ifa0->ifa_addr->sa_family != AF_INET6) ||
+   memcmp(&satosin6(ifa0->ifa_addr)->sin6_addr,
+  &ia->ia_addr.sin6_addr, 
+  sizeof(struct in6_addr)) == 0)
+   continue;
+   else
+   break;
+   }
 
/* stop DAD processing */
nd6_dad_stop(ifa);
@@ -1159,7 +1181,25 @@ in6_purgeaddr(struct ifaddr *ifa)
lla_lookup(LLTABLE6(ifp), (LLE_DELETE | LLE_IFADDR),
(struct sockaddr *)&ia->ia_addr);
IF_AFDATA_UNLOCK(ifp);
-   
+
+   /*
+* initialize for rtmsg generation
+*/
+   bzero(&gateway, sizeof(gateway));
+   gateway.sdl_len = sizeof(gateway);
+   gateway.sdl_family = AF_LINK;
+   gateway.sdl_nlen = 0;
+   gateway.sdl_alen = ifp->if_addrlen;
+   /* */
+   bzero(&rt0, sizeof(rt0));
+   rt0.rt_gateway = (struct sockaddr *)&gateway;
+   memcpy(&mask, &ia->ia_prefixmask, sizeof(ia->ia_prefixmask));
+   memcpy(&addr, &ia->ia_addr, sizeof(ia->ia_addr));
+   rt_mask(&rt0) = (struct sockaddr *)&mask;
+   rt_key(&rt0) = (struct sockaddr *)&addr;
+   rt0.rt_flags = RTF_HOST | RTF_STATIC;
+   rt_newaddrmsg(RTM_DELETE, ifa, 0, &rt0);
+
/*
 * leave from multicast groups we have joined for the interface
 */
@@ -1168,6 +1208,139 @@ in6_purgeaddr(struct ifaddr *ifa)
in6_leavegroup(imm);
}
 
+   /*
+* remove the link-local all-nodes address
+*/
+   bzero(&mltmask, sizeof(mltmask));
+   mltmask.sin6_len = sizeof(struct sockaddr_in6);
+   mltmask.sin6_family = AF_INET6;
+   mltmask.sin6_addr = in6mask32;
+
+   bzero(&mltaddr, sizeof(mltaddr));
+   mltaddr.sin6_len = sizeof(struct sockaddr_in6);
+   mltaddr.sin6_family = AF_INET6;
+   mltaddr.sin6_addr = in6addr_linklocal_allnodes;
+
+   if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) !=
+   0)
+   goto cleanup; 
+
+   rt = rtalloc1((struct sockaddr *)&mltaddr, 0, 0UL);
+   if (rt != NULL && rt->rt_gateway != NULL &&
+   (memcmp(&satosin6(rt->rt_gateway)->sin6_addr, 
+   &ia->ia_addr.sin6_addr,
+   sizeof(ia->ia_addr.sin6_addr)) == 0)) {
+   /* 
+* if no more IPv6 address exists on this interface
+* then remove the multicast address route
+*/
+   if (ifa0 == NULL) {
+   memcpy(&mltaddr.sin6_addr, 
&satosin6(rt_key(rt))->sin6_addr, 
+  sizeof(mltaddr.sin6_addr));
+   RTFREE_LOCKED(rt);
+   error = rtrequest(RTM_DELETE, (struct sockaddr 
*)&mltaddr,
+ (struct sockaddr *)&ia->ia_addr,
+ (struct sockaddr *)&mltmask, RTF_UP,
+ (struct rtentry **)0);
+   if (error)
+   log(LOG_INFO, "in6_purgeaddr:

svn commit: r192285 - head/sys/dev/xen/console

2009-05-17 Thread Adrian Chadd
Author: adrian
Date: Mon May 18 04:50:31 2009
New Revision: 192285
URL: http://svn.freebsd.org/changeset/base/192285

Log:
  Disable some un-needed console debugging.

Modified:
  head/sys/dev/xen/console/console.c

Modified: head/sys/dev/xen/console/console.c
==
--- head/sys/dev/xen/console/console.c  Mon May 18 04:07:46 2009
(r192284)
+++ head/sys/dev/xen/console/console.c  Mon May 18 04:50:31 2009
(r192285)
@@ -152,7 +152,7 @@ xccncheckc(struct consdev *dev)

CN_LOCK(cn_mtx);
if ((rp - rc)) {
-   if (kdb_active) printf("%s:%d\n", __func__, __LINE__);
+   /* if (kdb_active) printf("%s:%d\n", __func__, __LINE__); */
/* we need to return only one char */
ret = (int)rbuf[RBUF_MASK(rc)];
rc++;
___
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: r192286 - head/sys/dev/xen/netfront

2009-05-17 Thread Adrian Chadd
Author: adrian
Date: Mon May 18 04:56:37 2009
New Revision: 192286
URL: http://svn.freebsd.org/changeset/base/192286

Log:
  The merge in r189699 reverted part of the work done in a previous commit
  (r188036.)
  
  Re-revert that change so the Xen networking functions again.

Modified:
  head/sys/dev/xen/netfront/netfront.c

Modified: head/sys/dev/xen/netfront/netfront.c
==
--- head/sys/dev/xen/netfront/netfront.cMon May 18 04:50:31 2009
(r192285)
+++ head/sys/dev/xen/netfront/netfront.cMon May 18 04:56:37 2009
(r192286)
@@ -1297,11 +1297,12 @@ xennet_get_responses(struct netfront_inf
gnttab_release_grant_reference(&np->gref_rx_head, ref);
 
 next:
-   if (m != NULL) {
-   m->m_len = rx->status;
-   m->m_data += rx->offset;
-   m0->m_pkthdr.len += rx->status;
-   }
+   if (m == NULL)
+   break;
+
+   m->m_len = rx->status;
+   m->m_data += rx->offset;
+   m0->m_pkthdr.len += rx->status;

if (!(rx->flags & NETRXF_more_data))
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: r192288 - head/sys/dev/nge

2009-05-17 Thread Pyun YongHyeon
Author: yongari
Date: Mon May 18 06:02:54 2009
New Revision: 192288
URL: http://svn.freebsd.org/changeset/base/192288

Log:
  Use ANSI C declarations for all functions.

Modified:
  head/sys/dev/nge/if_nge.c

Modified: head/sys/dev/nge/if_nge.c
==
--- head/sys/dev/nge/if_nge.c   Mon May 18 05:47:58 2009(r192287)
+++ head/sys/dev/nge/if_nge.c   Mon May 18 06:02:54 2009(r192288)
@@ -244,8 +244,7 @@ DRIVER_MODULE(miibus, nge, miibus_driver
CSR_WRITE_4(sc, NGE_MEAR, CSR_READ_4(sc, NGE_MEAR) & ~(x))
 
 static void
-nge_delay(sc)
-   struct nge_softc*sc;
+nge_delay(struct nge_softc *sc)
 {
int idx;
 
@@ -256,8 +255,7 @@ nge_delay(sc)
 }
 
 static void
-nge_eeprom_idle(sc)
-   struct nge_softc*sc;
+nge_eeprom_idle(struct nge_softc *sc)
 {
register inti;
 
@@ -286,9 +284,7 @@ nge_eeprom_idle(sc)
  * Send a read command and address to the EEPROM, check for ACK.
  */
 static void
-nge_eeprom_putbyte(sc, addr)
-   struct nge_softc*sc;
-   int addr;
+nge_eeprom_putbyte(struct nge_softc *sc, int addr)
 {
register intd, i;
 
@@ -317,10 +313,7 @@ nge_eeprom_putbyte(sc, addr)
  * Read a word of data stored in the EEPROM at address 'addr.'
  */
 static void
-nge_eeprom_getword(sc, addr, dest)
-   struct nge_softc*sc;
-   int addr;
-   u_int16_t   *dest;
+nge_eeprom_getword(struct nge_softc *sc, int addr, u_int16_t *dest)
 {
register inti;
u_int16_t   word = 0;
@@ -365,12 +358,7 @@ nge_eeprom_getword(sc, addr, dest)
  * Read a sequence of words from the EEPROM.
  */
 static void
-nge_read_eeprom(sc, dest, off, cnt, swap)
-   struct nge_softc*sc;
-   caddr_t dest;
-   int off;
-   int cnt;
-   int swap;
+nge_read_eeprom(struct nge_softc *sc, caddr_t dest, int off, int cnt, int swap)
 {
int i;
u_int16_t   word = 0, *ptr;
@@ -391,8 +379,7 @@ nge_read_eeprom(sc, dest, off, cnt, swap
  * Sync the PHYs by setting data bit and strobing the clock 32 times.
  */
 static void
-nge_mii_sync(sc)
-   struct nge_softc*sc;
+nge_mii_sync(struct nge_softc *sc)
 {
register inti;
 
@@ -412,10 +399,7 @@ nge_mii_sync(sc)
  * Clock a series of bits through the MII.
  */
 static void
-nge_mii_send(sc, bits, cnt)
-   struct nge_softc*sc;
-   u_int32_t   bits;
-   int cnt;
+nge_mii_send(struct nge_softc *sc, u_int32_t bits, int cnt)
 {
int i;
 
@@ -438,10 +422,7 @@ nge_mii_send(sc, bits, cnt)
  * Read an PHY register through the MII.
  */
 static int
-nge_mii_readreg(sc, frame)
-   struct nge_softc*sc;
-   struct nge_mii_frame*frame;
-   
+nge_mii_readreg(struct nge_softc *sc, struct nge_mii_frame *frame)
 {
int i, ack;
 
@@ -527,10 +508,7 @@ fail:
  * Write to a PHY register through the MII.
  */
 static int
-nge_mii_writereg(sc, frame)
-   struct nge_softc*sc;
-   struct nge_mii_frame*frame;
-   
+nge_mii_writereg(struct nge_softc *sc, struct nge_mii_frame *frame)
 {
 
/*
@@ -570,9 +548,7 @@ nge_mii_writereg(sc, frame)
 }
 
 static int
-nge_miibus_readreg(dev, phy, reg)
-   device_tdev;
-   int phy, reg;
+nge_miibus_readreg(device_t dev, int phy, int reg)
 {
struct nge_softc*sc;
struct nge_mii_frameframe;
@@ -589,9 +565,7 @@ nge_miibus_readreg(dev, phy, reg)
 }
 
 static int
-nge_miibus_writereg(dev, phy, reg, data)
-   device_tdev;
-   int phy, reg, data;
+nge_miibus_writereg(device_t dev, int phy, int reg, int data)
 {
struct nge_softc*sc;
struct nge_mii_frameframe;
@@ -609,8 +583,7 @@ nge_miibus_writereg(dev, phy, reg, data)
 }
 
 static void
-nge_miibus_statchg(dev)
-   device_tdev;
+nge_miibus_statchg(device_t dev)
 {
int status; 
struct nge_softc*sc;
@@ -666,8 +639,7 @@ nge_miibus_statchg(dev)
 }
 
 static void
-nge_setmulti(sc)
-   struct nge_softc*sc;
+nge_setmulti(struct nge_softc *sc)
 {
struct ifnet*ifp;
struct ifmultiaddr  *ifma;
@@ -728,8 +700,7 @@ nge_setmulti(sc)
 }
 
 static void
-nge_reset(sc)
-   struct nge_softc*sc;
+nge_reset(struct nge_softc *sc)
 {
register inti;
 
@@ -761,8 +732,7 @@ nge_reset(sc)
  * IDs against our list and return a device name if we find a match.
  */
 static int
-nge_probe(dev)
-   device_tdev;
+nge_probe(device_t dev)

svn commit: r192289 - head/sys/dev/nge

2009-05-17 Thread Pyun YongHyeon
Author: yongari
Date: Mon May 18 06:05:50 2009
New Revision: 192289
URL: http://svn.freebsd.org/changeset/base/192289

Log:
  Remove register keyword.

Modified:
  head/sys/dev/nge/if_nge.c

Modified: head/sys/dev/nge/if_nge.c
==
--- head/sys/dev/nge/if_nge.c   Mon May 18 06:02:54 2009(r192288)
+++ head/sys/dev/nge/if_nge.c   Mon May 18 06:05:50 2009(r192289)
@@ -257,7 +257,7 @@ nge_delay(struct nge_softc *sc)
 static void
 nge_eeprom_idle(struct nge_softc *sc)
 {
-   register inti;
+   int i;
 
SIO_SET(NGE_MEAR_EE_CSEL);
nge_delay(sc);
@@ -286,7 +286,7 @@ nge_eeprom_idle(struct nge_softc *sc)
 static void
 nge_eeprom_putbyte(struct nge_softc *sc, int addr)
 {
-   register intd, i;
+   int d, i;
 
d = addr | NGE_EECMD_READ;
 
@@ -315,7 +315,7 @@ nge_eeprom_putbyte(struct nge_softc *sc,
 static void
 nge_eeprom_getword(struct nge_softc *sc, int addr, u_int16_t *dest)
 {
-   register inti;
+   int i;
u_int16_t   word = 0;
 
/* Force EEPROM to idle state. */
@@ -381,7 +381,7 @@ nge_read_eeprom(struct nge_softc *sc, ca
 static void
 nge_mii_sync(struct nge_softc *sc)
 {
-   register inti;
+   int i;
 
SIO_SET(NGE_MEAR_MII_DIR|NGE_MEAR_MII_DATA);
 
@@ -702,7 +702,7 @@ nge_setmulti(struct nge_softc *sc)
 static void
 nge_reset(struct nge_softc *sc)
 {
-   register inti;
+   int i;
 
NGE_SETBIT(sc, NGE_CSR, NGE_CSR_RESET);
 
@@ -2043,7 +2043,7 @@ nge_watchdog(struct ifnet *ifp)
 static void
 nge_stop(struct nge_softc *sc)
 {
-   register inti;
+   int i;
struct ifnet*ifp;
struct mii_data *mii;
 
___
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: r192290 - head/sys/dev/nge

2009-05-17 Thread Pyun YongHyeon
Author: yongari
Date: Mon May 18 06:09:10 2009
New Revision: 192290
URL: http://svn.freebsd.org/changeset/base/192290

Log:
  Remove trailling whitespaces.

Modified:
  head/sys/dev/nge/if_nge.c
  head/sys/dev/nge/if_ngereg.h

Modified: head/sys/dev/nge/if_nge.c
==
--- head/sys/dev/nge/if_nge.c   Mon May 18 06:05:50 2009(r192289)
+++ head/sys/dev/nge/if_nge.c   Mon May 18 06:09:10 2009(r192290)
@@ -433,7 +433,7 @@ nge_mii_readreg(struct nge_softc *sc, st
frame->mii_opcode = NGE_MII_READOP;
frame->mii_turnaround = 0;
frame->mii_data = 0;
-   
+
CSR_WRITE_4(sc, NGE_MEAR, 0);
 
/*
@@ -518,7 +518,7 @@ nge_mii_writereg(struct nge_softc *sc, s
frame->mii_stdelim = NGE_MII_STARTDELIM;
frame->mii_opcode = NGE_MII_WRITEOP;
frame->mii_turnaround = NGE_MII_TURNAROUND;
-   
+
/*
 * Turn on data output.
 */
@@ -585,7 +585,7 @@ nge_miibus_writereg(device_t dev, int ph
 static void
 nge_miibus_statchg(device_t dev)
 {
-   int status; 
+   int status;
struct nge_softc*sc;
struct mii_data *mii;
 
@@ -604,7 +604,7 @@ nge_miibus_statchg(device_t dev)
NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX);
}
 
-   } else if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK) 
+   } else if ((sc->nge_ifmedia.ifm_cur->ifm_media & IFM_GMASK)
!= IFM_FDX) {
NGE_CLRBIT(sc, NGE_TX_CFG,
(NGE_TXCFG_IGN_HBEAT|NGE_TXCFG_IGN_CARR));
@@ -846,10 +846,10 @@ nge_attach(device_t dev)
if (CSR_READ_4(sc, NGE_CFG) & NGE_CFG_TBI_EN) {
sc->nge_tbi = 1;
device_printf(dev, "Using TBI\n");
-   
+
sc->nge_miibus = dev;
 
-   ifmedia_init(&sc->nge_ifmedia, 0, nge_ifmedia_upd, 
+   ifmedia_init(&sc->nge_ifmedia, 0, nge_ifmedia_upd,
nge_ifmedia_sts);
 #defineADD(m, c)   ifmedia_add(&sc->nge_ifmedia, (m), (c), NULL)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, 0), 0);
@@ -858,16 +858,16 @@ nge_attach(device_t dev)
ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0), 0);
 #undef ADD
device_printf(dev, " 1000baseSX, 1000baseSX-FDX, 
auto\n");
-   
-   ifmedia_set(&sc->nge_ifmedia, 
+
+   ifmedia_set(&sc->nge_ifmedia,
IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0));
-   
+
CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO)
-   | NGE_GPIO_GP4_OUT 
-   | NGE_GPIO_GP1_OUTENB | NGE_GPIO_GP2_OUTENB 
+   | NGE_GPIO_GP4_OUT
+   | NGE_GPIO_GP1_OUTENB | NGE_GPIO_GP2_OUTENB
| NGE_GPIO_GP3_OUTENB
| NGE_GPIO_GP3_IN | NGE_GPIO_GP4_IN);
-   
+
} else {
device_printf(dev, "MII without any PHY!\n");
error = ENXIO;
@@ -1044,20 +1044,20 @@ nge_newbuf(struct nge_softc *sc, struct 
 #ifdef NGE_FIXUP_RX
 static __inline void
 nge_fixup_rx(struct mbuf *m)
-{  
+{
 inti;
 uint16_t   *src, *dst;
-   
+
src = mtod(m, uint16_t *);
dst = src - 1;
-   
+
for (i = 0; i < (m->m_len / sizeof(uint16_t) + 1); i++)
*dst++ = *src++;
-   
+
m->m_data -= ETHER_ALIGN;
-   
+
return;
-}  
+}
 #endif
 
 /*
@@ -1277,10 +1277,10 @@ nge_tick(void *xsc)
 
if (sc->nge_tbi) {
if (!sc->nge_link) {
-   if (CSR_READ_4(sc, NGE_TBI_BMSR) 
+   if (CSR_READ_4(sc, NGE_TBI_BMSR)
& NGE_TBIBMSR_ANEG_DONE) {
if (bootverbose)
-   device_printf(sc->nge_dev, 
+   device_printf(sc->nge_dev,
"gigabit link up\n");
nge_miibus_statchg(sc->nge_miibus);
sc->nge_link++;
@@ -1296,9 +1296,9 @@ nge_tick(void *xsc)
if (mii->mii_media_status & IFM_ACTIVE &&
IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
sc->nge_link++;
-   if (IFM_SUBTYPE(mii->mii_media_active) 
+   if (IFM_SUBTYPE(mii->mii_media_active)
== IFM_1000_T && bootverbose)
-   

svn commit: r192291 - head/sys/dev/nge

2009-05-17 Thread Pyun YongHyeon
Author: yongari
Date: Mon May 18 06:13:56 2009
New Revision: 192291
URL: http://svn.freebsd.org/changeset/base/192291

Log:
  Remove return statement at the end of functions that return void.

Modified:
  head/sys/dev/nge/if_nge.c

Modified: head/sys/dev/nge/if_nge.c
==
--- head/sys/dev/nge/if_nge.c   Mon May 18 06:09:10 2009(r192290)
+++ head/sys/dev/nge/if_nge.c   Mon May 18 06:13:56 2009(r192291)
@@ -250,8 +250,6 @@ nge_delay(struct nge_softc *sc)
 
for (idx = (300 / 33) + 1; idx > 0; idx--)
CSR_READ_4(sc, NGE_CSR);
-
-   return;
 }
 
 static void
@@ -276,8 +274,6 @@ nge_eeprom_idle(struct nge_softc *sc)
SIO_CLR(NGE_MEAR_EE_CSEL);
nge_delay(sc);
CSR_WRITE_4(sc, NGE_MEAR, 0x);
-
-   return;
 }
 
 /*
@@ -305,8 +301,6 @@ nge_eeprom_putbyte(struct nge_softc *sc,
SIO_CLR(NGE_MEAR_EE_CLK);
nge_delay(sc);
}
-
-   return;
 }
 
 /*
@@ -350,8 +344,6 @@ nge_eeprom_getword(struct nge_softc *sc,
nge_eeprom_idle(sc);
 
*dest = word;
-
-   return;
 }
 
 /*
@@ -371,8 +363,6 @@ nge_read_eeprom(struct nge_softc *sc, ca
else
*ptr = word;
}
-
-   return;
 }
 
 /*
@@ -391,8 +381,6 @@ nge_mii_sync(struct nge_softc *sc)
SIO_CLR(NGE_MEAR_MII_CLK);
DELAY(1);
}
-
-   return;
 }
 
 /*
@@ -635,7 +623,6 @@ nge_miibus_statchg(device_t dev)
NGE_CLRBIT(sc, NGE_CFG, NGE_CFG_MODE_1000);
}
}
-   return;
 }
 
 static void
@@ -695,8 +682,6 @@ nge_setmulti(struct nge_softc *sc)
IF_ADDR_UNLOCK(ifp);
 
CSR_WRITE_4(sc, NGE_RXFILT_CTL, filtsave);
-
-   return;
 }
 
 static void
@@ -723,8 +708,6 @@ nge_reset(struct nge_softc *sc)
 */
CSR_WRITE_4(sc, NGE_CLKRUN, NGE_CLKRUN_PMESTS);
CSR_WRITE_4(sc, NGE_CLKRUN, 0);
-
-return;
 }
 
 /*
@@ -1198,8 +1181,6 @@ nge_rxeof(struct nge_softc *sc)
}
 
sc->nge_cdata.nge_rx_prod = i;
-
-   return;
 }
 
 /*
@@ -1260,8 +1241,6 @@ nge_txeof(struct nge_softc *sc)
 
if (idx == sc->nge_cdata.nge_tx_prod)
ifp->if_timer = 0;
-
-   return;
 }
 
 static void
@@ -1306,8 +1285,6 @@ nge_tick(void *xsc)
}
}
callout_reset(&sc->nge_stat_ch, hz, nge_tick, sc);
-
-   return;
 }
 
 #ifdef DEVICE_POLLING
@@ -1447,8 +1424,6 @@ nge_intr(void *arg)
& ~NGE_GPIO_GP3_OUT);
 
NGE_UNLOCK(sc);
-
-   return;
 }
 
 /*
@@ -1578,8 +1553,6 @@ nge_start_locked(struct ifnet *ifp)
 * Set a timeout in case the chip goes out to lunch.
 */
ifp->if_timer = 5;
-
-   return;
 }
 
 static void
@@ -1775,8 +1748,6 @@ nge_init_locked(struct nge_softc *sc)
 
ifp->if_drv_flags |= IFF_DRV_RUNNING;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
-
-   return;
 }
 
 /*
@@ -1896,8 +1867,6 @@ nge_ifmedia_sts(struct ifnet *ifp, struc
ifmr->ifm_status = mii->mii_media_status;
}
NGE_UNLOCK(sc);
-
-   return;
 }
 
 static int
@@ -2032,8 +2001,6 @@ nge_watchdog(struct ifnet *ifp)
nge_start_locked(ifp);
 
NGE_UNLOCK(sc);
-
-   return;
 }
 
 /*
@@ -2095,8 +2062,6 @@ nge_stop(struct nge_softc *sc)
sizeof(sc->nge_ldata->nge_tx_list));
 
ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
-
-   return;
 }
 
 /*
___
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: r192292 - head/sys/dev/nge

2009-05-17 Thread Pyun YongHyeon
Author: yongari
Date: Mon May 18 06:19:17 2009
New Revision: 192292
URL: http://svn.freebsd.org/changeset/base/192292

Log:
  style(9) - space after keyword.

Modified:
  head/sys/dev/nge/if_nge.c

Modified: head/sys/dev/nge/if_nge.c
==
--- head/sys/dev/nge/if_nge.c   Mon May 18 06:13:56 2009(r192291)
+++ head/sys/dev/nge/if_nge.c   Mon May 18 06:19:17 2009(r192292)
@@ -459,7 +459,7 @@ nge_mii_readreg(struct nge_softc *sc, st
 * need to clock through 16 cycles to keep the PHY(s) in sync.
 */
if (ack) {
-   for(i = 0; i < 16; i++) {
+   for (i = 0; i < 16; i++) {
SIO_CLR(NGE_MEAR_MII_CLK);
DELAY(1);
SIO_SET(NGE_MEAR_MII_CLK);
@@ -488,8 +488,8 @@ fail:
DELAY(1);
 
if (ack)
-   return(1);
-   return(0);
+   return (1);
+   return (0);
 }
 
 /*
@@ -532,7 +532,7 @@ nge_mii_writereg(struct nge_softc *sc, s
 */
SIO_CLR(NGE_MEAR_MII_DIR);
 
-   return(0);
+   return (0);
 }
 
 static int
@@ -549,7 +549,7 @@ nge_miibus_readreg(device_t dev, int phy
frame.mii_regaddr = reg;
nge_mii_readreg(sc, &frame);
 
-   return(frame.mii_data);
+   return (frame.mii_data);
 }
 
 static int
@@ -567,7 +567,7 @@ nge_miibus_writereg(device_t dev, int ph
frame.mii_data = data;
nge_mii_writereg(sc, &frame);
 
-   return(0);
+   return (0);
 }
 
 static void
@@ -721,16 +721,16 @@ nge_probe(device_t dev)
 
t = nge_devs;
 
-   while(t->nge_name != NULL) {
+   while (t->nge_name != NULL) {
if ((pci_get_vendor(dev) == t->nge_vid) &&
(pci_get_device(dev) == t->nge_did)) {
device_set_desc(dev, t->nge_name);
-   return(BUS_PROBE_DEFAULT);
+   return (BUS_PROBE_DEFAULT);
}
t++;
}
 
-   return(ENXIO);
+   return (ENXIO);
 }
 
 /*
@@ -886,7 +886,7 @@ fail:
if (sc->nge_res)
bus_release_resource(dev, NGE_RES, NGE_RID, sc->nge_res);
NGE_LOCK_DESTROY(sc);
-   return(error);
+   return (error);
 }
 
 static int
@@ -922,7 +922,7 @@ nge_detach(device_t dev)
 
NGE_LOCK_DESTROY(sc);
 
-   return(0);
+   return (0);
 }
 
 /*
@@ -957,7 +957,7 @@ nge_list_tx_init(struct nge_softc *sc)
 
cd->nge_tx_prod = cd->nge_tx_cons = cd->nge_tx_cnt = 0;
 
-   return(0);
+   return (0);
 }
 
 
@@ -978,7 +978,7 @@ nge_list_rx_init(struct nge_softc *sc)
 
for (i = 0; i < NGE_RX_LIST_CNT; i++) {
if (nge_newbuf(sc, &ld->nge_rx_list[i], NULL) == ENOBUFS)
-   return(ENOBUFS);
+   return (ENOBUFS);
if (i == (NGE_RX_LIST_CNT - 1)) {
ld->nge_rx_list[i].nge_nextdesc =
&ld->nge_rx_list[0];
@@ -995,7 +995,7 @@ nge_list_rx_init(struct nge_softc *sc)
cd->nge_rx_prod = 0;
sc->nge_head = sc->nge_tail = NULL;
 
-   return(0);
+   return (0);
 }
 
 /*
@@ -1021,7 +1021,7 @@ nge_newbuf(struct nge_softc *sc, struct 
c->nge_ctl = m->m_len;
c->nge_extsts = 0;
 
-   return(0);
+   return (0);
 }
 
 #ifdef NGE_FIXUP_RX
@@ -1060,7 +1060,7 @@ nge_rxeof(struct nge_softc *sc)
ifp = sc->nge_ifp;
i = sc->nge_cdata.nge_rx_prod;
 
-   while(NGE_OWNDESC(&sc->nge_ldata->nge_rx_list[i])) {
+   while (NGE_OWNDESC(&sc->nge_ldata->nge_rx_list[i])) {
u_int32_t   extsts;
 
 #ifdef DEVICE_POLLING
@@ -1364,7 +1364,7 @@ nge_intr(void *arg)
CSR_WRITE_4(sc, NGE_IER, 0);
 
/* Data LED on for TBI mode */
-   if(sc->nge_tbi)
+   if (sc->nge_tbi)
 CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO)
 | NGE_GPIO_GP3_OUT);
 
@@ -1419,7 +1419,7 @@ nge_intr(void *arg)
 
/* Data LED off for TBI mode */
 
-   if(sc->nge_tbi)
+   if (sc->nge_tbi)
CSR_WRITE_4(sc, NGE_GPIO, CSR_READ_4(sc, NGE_GPIO)
& ~NGE_GPIO_GP3_OUT);
 
@@ -1449,7 +1449,7 @@ nge_encap(struct nge_softc *sc, struct m
if (m->m_len != 0) {
if ((NGE_TX_LIST_CNT -
(sc->nge_cdata.nge_tx_cnt + cnt)) < 2)
-   return(ENOBUFS);
+   return (ENOBUFS);
f = &sc->nge_ldata->nge_tx_list[frag];
f->nge_ctl = NGE_CMDSTS_MORE | m->m_len;
f->nge_ptr = vtophys(mtod(m, vm_offset_t));
@@ -1462,7 +1462,7 @@ nge_encap(struct nge_softc *sc, struct m
}
 
if (m != NULL)
-   return(ENOBUFS);
+   return (ENOBUFS);
 
sc->nge_ldata->nge_tx_list[

svn commit: r192294 - head/sys/dev/nge

2009-05-17 Thread Pyun YongHyeon
Author: yongari
Date: Mon May 18 06:32:38 2009
New Revision: 192294
URL: http://svn.freebsd.org/changeset/base/192294

Log:
  s/u_int8_t/uint8_t/g
  s/u_int16_t/uint16_t/g
  s/u_int32_t/uint32_t/g

Modified:
  head/sys/dev/nge/if_nge.c
  head/sys/dev/nge/if_ngereg.h

Modified: head/sys/dev/nge/if_nge.c
==
--- head/sys/dev/nge/if_nge.c   Mon May 18 06:20:37 2009(r192293)
+++ head/sys/dev/nge/if_nge.c   Mon May 18 06:32:38 2009(r192294)
@@ -151,7 +151,7 @@ static int nge_attach(device_t);
 static int nge_detach(device_t);
 
 static int nge_newbuf(struct nge_softc *, struct nge_desc *, struct mbuf *);
-static int nge_encap(struct nge_softc *, struct mbuf *, u_int32_t *);
+static int nge_encap(struct nge_softc *, struct mbuf *, uint32_t *);
 #ifdef NGE_FIXUP_RX
 static __inline void nge_fixup_rx (struct mbuf *);
 #endif
@@ -174,11 +174,11 @@ static void nge_ifmedia_sts(struct ifnet
 static void nge_delay(struct nge_softc *);
 static void nge_eeprom_idle(struct nge_softc *);
 static void nge_eeprom_putbyte(struct nge_softc *, int);
-static void nge_eeprom_getword(struct nge_softc *, int, u_int16_t *);
+static void nge_eeprom_getword(struct nge_softc *, int, uint16_t *);
 static void nge_read_eeprom(struct nge_softc *, caddr_t, int, int, int);
 
 static void nge_mii_sync(struct nge_softc *);
-static void nge_mii_send(struct nge_softc *, u_int32_t, int);
+static void nge_mii_send(struct nge_softc *, uint32_t, int);
 static int nge_mii_readreg(struct nge_softc *, struct nge_mii_frame *);
 static int nge_mii_writereg(struct nge_softc *, struct nge_mii_frame *);
 
@@ -307,10 +307,10 @@ nge_eeprom_putbyte(struct nge_softc *sc,
  * Read a word of data stored in the EEPROM at address 'addr.'
  */
 static void
-nge_eeprom_getword(struct nge_softc *sc, int addr, u_int16_t *dest)
+nge_eeprom_getword(struct nge_softc *sc, int addr, uint16_t *dest)
 {
int i;
-   u_int16_t   word = 0;
+   uint16_tword = 0;
 
/* Force EEPROM to idle state. */
nge_eeprom_idle(sc);
@@ -353,11 +353,11 @@ static void
 nge_read_eeprom(struct nge_softc *sc, caddr_t dest, int off, int cnt, int swap)
 {
int i;
-   u_int16_t   word = 0, *ptr;
+   uint16_tword = 0, *ptr;
 
for (i = 0; i < cnt; i++) {
nge_eeprom_getword(sc, off + i, &word);
-   ptr = (u_int16_t *)(dest + (i * 2));
+   ptr = (uint16_t *)(dest + (i * 2));
if (swap)
*ptr = ntohs(word);
else
@@ -387,7 +387,7 @@ nge_mii_sync(struct nge_softc *sc)
  * Clock a series of bits through the MII.
  */
 static void
-nge_mii_send(struct nge_softc *sc, u_int32_t bits, int cnt)
+nge_mii_send(struct nge_softc *sc, uint32_t bits, int cnt)
 {
int i;
 
@@ -630,7 +630,7 @@ nge_setmulti(struct nge_softc *sc)
 {
struct ifnet*ifp;
struct ifmultiaddr  *ifma;
-   u_int32_t   h = 0, i, filtsave;
+   uint32_th = 0, i, filtsave;
int bit, index;
 
NGE_LOCK_ASSERT(sc);
@@ -1014,7 +1014,7 @@ nge_newbuf(struct nge_softc *sc, struct 
 
m->m_len = m->m_pkthdr.len = MCLBYTES;
 
-   m_adj(m, sizeof(u_int64_t));
+   m_adj(m, sizeof(uint64_t));
 
c->nge_mbuf = m;
c->nge_ptr = vtophys(mtod(m, caddr_t));
@@ -1054,14 +1054,14 @@ nge_rxeof(struct nge_softc *sc)
 struct ifnet   *ifp;
struct nge_desc *cur_rx;
int i, total_len = 0;
-   u_int32_t   rxstat;
+   uint32_trxstat;
 
NGE_LOCK_ASSERT(sc);
ifp = sc->nge_ifp;
i = sc->nge_cdata.nge_rx_prod;
 
while (NGE_OWNDESC(&sc->nge_ldata->nge_rx_list[i])) {
-   u_int32_t   extsts;
+   uint32_textsts;
 
 #ifdef DEVICE_POLLING
if (ifp->if_capenable & IFCAP_POLLING) {
@@ -1193,7 +1193,7 @@ nge_txeof(struct nge_softc *sc)
 {
struct nge_desc *cur_tx;
struct ifnet*ifp;
-   u_int32_t   idx;
+   uint32_tidx;
 
NGE_LOCK_ASSERT(sc);
ifp = sc->nge_ifp;
@@ -1315,7 +1315,7 @@ nge_poll(struct ifnet *ifp, enum poll_cm
nge_start_locked(ifp);
 
if (sc->rxcycles > 0 || cmd == POLL_AND_CHECK_STATUS) {
-   u_int32_t   status;
+   uint32_tstatus;
 
/* Reading the ISR register clears all interrupts. */
status = CSR_READ_4(sc, NGE_ISR);
@@ -1340,7 +1340,7 @@ nge_intr(void *arg)
 {
struct nge_softc*sc;
struct ifnet*ifp;
-   u_int32_t   status;
+   uint32_tstatus;
 
sc =