I486_CPU and I586_CPU removed from GENERIC kernel [was Re: svn commit: r205307 - head/sys/i386/conf]

2010-03-18 Thread Garrett Cooper
On Thu, Mar 18, 2010 at 6:16 PM, Xin LI  wrote:
> Author: delphij
> Date: Fri Mar 19 01:16:53 2010
> New Revision: 205307
> URL: http://svn.freebsd.org/changeset/base/205307
>
> Log:
>  SSE is enabled by default about 5 years ago so there is no point pretending
>  that we support I486 and I586 CPUs in the GENERIC kernel, users wants these
>  support would have to build a custom kernel to explicitly disable SSE
>  anyways.
>
>  MFC after:    1 month
>
> Modified:
>  head/sys/i386/conf/GENERIC
>
> Modified: head/sys/i386/conf/GENERIC
> ==
> --- head/sys/i386/conf/GENERIC  Fri Mar 19 00:51:48 2010        (r205306)
> +++ head/sys/i386/conf/GENERIC  Fri Mar 19 01:16:53 2010        (r205307)
> @@ -18,8 +18,6 @@
>  #
>  # $FreeBSD$
>
> -cpu            I486_CPU
> -cpu            I586_CPU
>  cpu            I686_CPU
>  ident          GENERIC

1. UPDATING entry ?
2. CC -current@ with the news?
Thanks,
-Garrett
___
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: r205310 - head/gnu/usr.bin/gdb/arch/arm

2010-03-18 Thread Warner Losh
Author: imp
Date: Fri Mar 19 05:40:47 2010
New Revision: 205310
URL: http://svn.freebsd.org/changeset/base/205310

Log:
  Fix typo in comment

Modified:
  head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h

Modified: head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h
==
--- head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h Fri Mar 19 03:30:19 2010
(r205309)
+++ head/gnu/usr.bin/gdb/arch/arm/nm-fbsd.h Fri Mar 19 05:40:47 2010
(r205310)
@@ -32,4 +32,4 @@
 /* We can attach and detach.  */
 #define ATTACH_DETACH
 
-#endif /* NM_NBSD_H */
+#endif /* NM_FBSD_H */
___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Julian Elischer

Julian Elischer wrote:

Matthew Jacob wrote:

On 3/18/2010 7:11 PM, Mark Linimon wrote:

On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote:
 

If I'm not mistaken this means that the install CDs will no longer even
boot on a lot of machines.
 

I wonder how much RAM most of those systems have ...

mcl
   

IIRC, my DX2 486 had 32MiB


oops premature send button pressing

___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Julian Elischer

Mark Linimon wrote:

On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote:
If I'm not mistaken this means that the install CDs will no longer even 
boot on a lot of machines.


I wonder how much RAM most of those systems have ...

mcl


CPU: Geode(TM) Integrated Processor by AMD PCS (499.91-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x5a2  Stepping = 2
  Features=0x88a93d
  AMD Features=0xc040
real memory  = 536870912 (512 MB)
avail memory = 436473856 (416 MB)

I can no longer boot my home gateway off the cd
if I need the rescue disk...

that kinda sucks

___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Julian Elischer

Matthew Jacob wrote:

On 3/18/2010 7:11 PM, Mark Linimon wrote:

On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote:
  

If I'm not mistaken this means that the install CDs will no longer even
boot on a lot of machines.
 

I wonder how much RAM most of those systems have ...

mcl
   

IIRC, my DX2 486 had 32MiB


___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Matthew Jacob

On 3/18/2010 7:11 PM, Mark Linimon wrote:

On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote:
   

If I'm not mistaken this means that the install CDs will no longer even
boot on a lot of machines.
 

I wonder how much RAM most of those systems have ...

mcl
   

IIRC, my DX2 486 had 32MiB

___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Matthew Jacob

Does anyone out there have a 486 DX4 even? Can you boot 8.0 CDs?



or not.

If I'm not mistaken this means that the install CDs will no longer 
even boot on a lot of machines.





___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Jeremy Messenger

On Thu, 18 Mar 2010 19:16:53 -0600, Xin LI  wrote:


Author: delphij
Date: Fri Mar 19 01:16:53 2010
New Revision: 205307
URL: http://svn.freebsd.org/changeset/base/205307

Log:
  SSE is enabled by default about 5 years ago so there is no point  
pretending
  that we support I486 and I586 CPUs in the GENERIC kernel, users wants  
these

  support would have to build a custom kernel to explicitly disable SSE
  anyways.
 MFC after: 1 month


Geode is i586, right? Or not matter, it still can be using i686? Soekris,  
a few small motherboards and other thin clients are still using Geode.


Cheers,
Mezz


Modified:
  head/sys/i386/conf/GENERIC

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Fri Mar 19 00:51:48 2010(r205306)
+++ head/sys/i386/conf/GENERIC  Fri Mar 19 01:16:53 2010(r205307)
@@ -18,8 +18,6 @@
 #
 # $FreeBSD$
-cpuI486_CPU
-cpuI586_CPU
 cpuI686_CPU
 ident  GENERIC



--
me...@cox.net  -  m...@freebsd.org
FreeBSD GNOME Team
http://www.FreeBSD.org/gnome/  -  gn...@freebsd.org
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r205307 - head/sys/i386/conf

2010-03-18 Thread Mark Linimon
On Thu, Mar 18, 2010 at 06:44:45PM -0700, Julian Elischer wrote:
> If I'm not mistaken this means that the install CDs will no longer even 
> boot on a lot of machines.

I wonder how much RAM most of those systems have ...

mcl
___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Matthew Jacob



And the crowd roars it's approval!


or not.

If I'm not mistaken this means that the install CDs will no longer 
even boot on a lot of machines.



If I'm not mistaken, the GENERIC kernels won't boot and run fully on a 
real i386/i486 anyway.


___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Julian Elischer

Matthew Jacob wrote:

On 3/18/2010 6:16 PM, Xin LI wrote:

Author: delphij
Date: Fri Mar 19 01:16:53 2010
New Revision: 205307
URL: http://svn.freebsd.org/changeset/base/205307

Log:
   SSE is enabled by default about 5 years ago so there is no point 
pretending
   that we support I486 and I586 CPUs in the GENERIC kernel, users 
wants these

   support would have to build a custom kernel to explicitly disable SSE
   anyways.

   


And the crowd roars it's approval!


or not.

If I'm not mistaken this means that the install CDs will no longer 
even boot on a lot of machines.



___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Steve Kargl
On Thu, Mar 18, 2010 at 06:18:23PM -0700, Matthew Jacob wrote:
> On 3/18/2010 6:16 PM, Xin LI wrote:
> >Author: delphij
> >Date: Fri Mar 19 01:16:53 2010
> >New Revision: 205307
> >URL: http://svn.freebsd.org/changeset/base/205307
> >
> >Log:
> >   SSE is enabled by default about 5 years ago so there is no point 
> >   pretending
> >   that we support I486 and I586 CPUs in the GENERIC kernel, users wants 
> >   these
> >   support would have to build a custom kernel to explicitly disable SSE
> >   anyways.
> >
> >   
> 
> And the crowd roars it's approval!
> 

Can you explain?  AFAIK, SSE including floating point
instructions.  Floating point operations aren't allowed
in the kernel.

-- 
Steve
___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Matthew Jacob

On 3/18/2010 6:16 PM, Xin LI wrote:

Author: delphij
Date: Fri Mar 19 01:16:53 2010
New Revision: 205307
URL: http://svn.freebsd.org/changeset/base/205307

Log:
   SSE is enabled by default about 5 years ago so there is no point pretending
   that we support I486 and I586 CPUs in the GENERIC kernel, users wants these
   support would have to build a custom kernel to explicitly disable SSE
   anyways.

   


And the crowd roars it's approval!

___
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: r205307 - head/sys/i386/conf

2010-03-18 Thread Xin LI
Author: delphij
Date: Fri Mar 19 01:16:53 2010
New Revision: 205307
URL: http://svn.freebsd.org/changeset/base/205307

Log:
  SSE is enabled by default about 5 years ago so there is no point pretending
  that we support I486 and I586 CPUs in the GENERIC kernel, users wants these
  support would have to build a custom kernel to explicitly disable SSE
  anyways.
  
  MFC after:1 month

Modified:
  head/sys/i386/conf/GENERIC

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Fri Mar 19 00:51:48 2010(r205306)
+++ head/sys/i386/conf/GENERIC  Fri Mar 19 01:16:53 2010(r205307)
@@ -18,8 +18,6 @@
 #
 # $FreeBSD$
 
-cpuI486_CPU
-cpuI586_CPU
 cpuI686_CPU
 ident  GENERIC
 
___
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: r205304 - stable/7/sys/dev/bce

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Fri Mar 19 00:29:52 2010
New Revision: 205304
URL: http://svn.freebsd.org/changeset/base/205304

Log:
  MFC r202717:
- Added a workaround for NC-SI management firmware that would allow
  frames to be accepted while the driver is resetting the hardware.
  This failure is generally observed when broadcast frames are received
  during driver load and will generate "Unable to write CTX memory"
  errors.
- Small changes to driver flags display.
  
  PR:   kern/135836, kern/140684

Modified:
  stable/7/sys/dev/bce/if_bce.c
  stable/7/sys/dev/bce/if_bcereg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/bce/if_bce.c
==
--- stable/7/sys/dev/bce/if_bce.c   Fri Mar 19 00:26:45 2010
(r205303)
+++ stable/7/sys/dev/bce/if_bce.c   Fri Mar 19 00:29:52 2010
(r205304)
@@ -371,6 +371,9 @@ static void bce_release_resources   (struc
 static int  bce_fw_sync(struct bce_softc *, 
u32);
 static void bce_load_rv2p_fw   (struct bce_softc *, u32 *, u32, u32);
 static void bce_load_cpu_fw(struct bce_softc *, struct 
cpu_reg *, struct fw_info *);
+static void bce_start_cpu   (struct bce_softc *, struct cpu_reg *);
+static void bce_halt_cpu(struct bce_softc *, struct cpu_reg *);
+static void bce_start_rxp_cpu   (struct bce_softc *);
 static void bce_init_rxp_cpu   (struct bce_softc *);
 static void bce_init_txp_cpu   (struct bce_softc *);
 static void bce_init_tpat_cpu  (struct bce_softc *);
@@ -603,9 +606,10 @@ bce_print_adapter_info(struct bce_softc 
printf("B/C (%s); Flags (", sc->bce_bc_ver);
 
 #ifdef BCE_JUMBO_HDRSPLIT
-   printf("SPLT ");
+   printf("SPLT");
 i++;
 #endif
+
 if (sc->bce_flags & BCE_USING_MSI_FLAG) {
 if (i > 0) printf("|");
printf("MSI"); i++;
@@ -613,7 +617,7 @@ bce_print_adapter_info(struct bce_softc 
 
 if (sc->bce_flags & BCE_USING_MSIX_FLAG) {
 if (i > 0) printf("|");
-   printf("MSI-X "); i++;
+   printf("MSI-X"); i++;
 }
 
 if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) {
@@ -2976,6 +2980,7 @@ bce_dma_map_addr(void *arg, bus_dma_segm
 /* |PG Buffers   |   none   |   none   |   none   |   none   |  */
 /* |TX Buffers   |   none   |   none   |   none   |   none   |  */
 /* |Chain Pages(1)   |   4KiB   |   4KiB   |   4KiB   |   4KiB   |  */
+/* |Context Memory   |  |  |  |  |  */
 /* +-+--+--+--+--+  */
 /*  */
 /* (1) Must align with CPU page size (BCM_PAGE_SZIE).   */
@@ -3665,15 +3670,10 @@ bce_load_cpu_fw(struct bce_softc *sc, st
struct fw_info *fw)
 {
u32 offset;
-   u32 val;
 
DBENTER(BCE_VERBOSE_RESET);
 
-   /* Halt the CPU. */
-   val = REG_RD_IND(sc, cpu_reg->mode);
-   val |= cpu_reg->mode_value_halt;
-   REG_WR_IND(sc, cpu_reg->mode, val);
-   REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear);
+bce_halt_cpu(sc, cpu_reg);
 
/* Load the Text area. */
offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base);
@@ -3726,9 +3726,28 @@ bce_load_cpu_fw(struct bce_softc *sc, st
}
}
 
-   /* Clear the pre-fetch instruction. */
-   REG_WR_IND(sc, cpu_reg->inst, 0);
-   REG_WR_IND(sc, cpu_reg->pc, fw->start_addr);
+/* Clear the pre-fetch instruction and set the FW start address. */
+REG_WR_IND(sc, cpu_reg->inst, 0);
+REG_WR_IND(sc, cpu_reg->pc, fw->start_addr);
+
+   DBEXIT(BCE_VERBOSE_RESET);
+}
+
+
+//
+/* Starts the RISC processor.   */
+/*  */
+/* Assumes the CPU starting address has already been set.   */
+/*  */
+/* Returns: */
+/*   Nothing.   */
+//
+static void
+bce_start_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg)
+{
+   u32 val;
+
+   DBENTER(BCE_VERBOSE_RESET);
 
/* Start the CPU. */
val = REG_RD_IND(sc, cpu_reg->mode);
@@ -3741,6 +3760,62 @@ bce_load_cpu_fw(struct bce_softc *sc, st
 
 
 /***

svn commit: r205303 - stable/8/sys/dev/bce

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Fri Mar 19 00:26:45 2010
New Revision: 205303
URL: http://svn.freebsd.org/changeset/base/205303

Log:
  MFC r202717:
- Added a workaround for NC-SI management firmware that would allow
  frames to be accepted while the driver is resetting the hardware.
  This failure is generally observed when broadcast frames are received
  during driver load and will generate "Unable to write CTX memory"
  errors.
- Small changes to driver flags display.
  
  PR:   kern/135836, kern/140684

Modified:
  stable/8/sys/dev/bce/if_bce.c
  stable/8/sys/dev/bce/if_bcereg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/bce/if_bce.c
==
--- stable/8/sys/dev/bce/if_bce.c   Fri Mar 19 00:19:55 2010
(r205302)
+++ stable/8/sys/dev/bce/if_bce.c   Fri Mar 19 00:26:45 2010
(r205303)
@@ -371,6 +371,9 @@ static void bce_release_resources   (struc
 static int  bce_fw_sync(struct bce_softc *, 
u32);
 static void bce_load_rv2p_fw   (struct bce_softc *, u32 *, u32, u32);
 static void bce_load_cpu_fw(struct bce_softc *, struct 
cpu_reg *, struct fw_info *);
+static void bce_start_cpu   (struct bce_softc *, struct cpu_reg *);
+static void bce_halt_cpu(struct bce_softc *, struct cpu_reg *);
+static void bce_start_rxp_cpu   (struct bce_softc *);
 static void bce_init_rxp_cpu   (struct bce_softc *);
 static void bce_init_txp_cpu   (struct bce_softc *);
 static void bce_init_tpat_cpu  (struct bce_softc *);
@@ -603,9 +606,10 @@ bce_print_adapter_info(struct bce_softc 
printf("B/C (%s); Flags (", sc->bce_bc_ver);
 
 #ifdef BCE_JUMBO_HDRSPLIT
-   printf("SPLT ");
+   printf("SPLT");
 i++;
 #endif
+
 if (sc->bce_flags & BCE_USING_MSI_FLAG) {
 if (i > 0) printf("|");
printf("MSI"); i++;
@@ -613,7 +617,7 @@ bce_print_adapter_info(struct bce_softc 
 
 if (sc->bce_flags & BCE_USING_MSIX_FLAG) {
 if (i > 0) printf("|");
-   printf("MSI-X "); i++;
+   printf("MSI-X"); i++;
 }
 
 if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) {
@@ -2976,6 +2980,7 @@ bce_dma_map_addr(void *arg, bus_dma_segm
 /* |PG Buffers   |   none   |   none   |   none   |   none   |  */
 /* |TX Buffers   |   none   |   none   |   none   |   none   |  */
 /* |Chain Pages(1)   |   4KiB   |   4KiB   |   4KiB   |   4KiB   |  */
+/* |Context Memory   |  |  |  |  |  */
 /* +-+--+--+--+--+  */
 /*  */
 /* (1) Must align with CPU page size (BCM_PAGE_SZIE).   */
@@ -3665,15 +3670,10 @@ bce_load_cpu_fw(struct bce_softc *sc, st
struct fw_info *fw)
 {
u32 offset;
-   u32 val;
 
DBENTER(BCE_VERBOSE_RESET);
 
-   /* Halt the CPU. */
-   val = REG_RD_IND(sc, cpu_reg->mode);
-   val |= cpu_reg->mode_value_halt;
-   REG_WR_IND(sc, cpu_reg->mode, val);
-   REG_WR_IND(sc, cpu_reg->state, cpu_reg->state_value_clear);
+bce_halt_cpu(sc, cpu_reg);
 
/* Load the Text area. */
offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base);
@@ -3726,9 +3726,28 @@ bce_load_cpu_fw(struct bce_softc *sc, st
}
}
 
-   /* Clear the pre-fetch instruction. */
-   REG_WR_IND(sc, cpu_reg->inst, 0);
-   REG_WR_IND(sc, cpu_reg->pc, fw->start_addr);
+/* Clear the pre-fetch instruction and set the FW start address. */
+REG_WR_IND(sc, cpu_reg->inst, 0);
+REG_WR_IND(sc, cpu_reg->pc, fw->start_addr);
+
+   DBEXIT(BCE_VERBOSE_RESET);
+}
+
+
+//
+/* Starts the RISC processor.   */
+/*  */
+/* Assumes the CPU starting address has already been set.   */
+/*  */
+/* Returns: */
+/*   Nothing.   */
+//
+static void
+bce_start_cpu(struct bce_softc *sc, struct cpu_reg *cpu_reg)
+{
+   u32 val;
+
+   DBENTER(BCE_VERBOSE_RESET);
 
/* Start the CPU. */
val = REG_RD_IND(sc, 

svn commit: r205301 - stable/7/sys/dev/bce

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Fri Mar 19 00:18:53 2010
New Revision: 205301
URL: http://svn.freebsd.org/changeset/base/205301

Log:
  MFC r194781:
- Added code to read bootcode firwmare version.
- Created dedicated shared memory access routines.

Modified:
  stable/7/sys/dev/bce/if_bce.c
  stable/7/sys/dev/bce/if_bcereg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/bce/if_bce.c
==
--- stable/7/sys/dev/bce/if_bce.c   Thu Mar 18 21:00:53 2010
(r205300)
+++ stable/7/sys/dev/bce/if_bce.c   Fri Mar 19 00:18:53 2010
(r205301)
@@ -329,6 +329,8 @@ static void bce_breakpoint  (struct bce
 //
 static u32  bce_reg_rd_ind (struct bce_softc *, u32);
 static void bce_reg_wr_ind (struct bce_softc *, u32, u32);
+static void bce_shmem_wr(struct bce_softc *, u32, u32);
+static u32  bce_shmem_rd(struct bce_softc *, u32);
 static void bce_ctx_wr (struct bce_softc *, u32, u32, 
u32);
 static int  bce_miibus_read_reg(device_t, int, int);
 static int  bce_miibus_write_reg   (device_t, int, int, int);
@@ -574,6 +576,8 @@ bce_probe(device_t dev)
 static void
 bce_print_adapter_info(struct bce_softc *sc)
 {
+int i = 0;
+
DBENTER(BCE_VERBOSE_LOAD);
 
BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid);
@@ -596,19 +600,33 @@ bce_print_adapter_info(struct bce_softc 
}
 
/* Firmware version and device features. */
-   printf("B/C (0x%08X); Flags( ", sc->bce_bc_ver);
+   printf("B/C (%s); Flags (", sc->bce_bc_ver);
+
 #ifdef BCE_JUMBO_HDRSPLIT
printf("SPLT ");
+i++;
 #endif
-   if (sc->bce_flags & BCE_MFW_ENABLE_FLAG)
-   printf("MFW ");
-   if (sc->bce_flags & BCE_USING_MSI_FLAG)
-   printf("MSI ");
-   if (sc->bce_flags & BCE_USING_MSIX_FLAG)
-   printf("MSI-X ");
-   if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)
-   printf("2.5G ");
-   printf(")\n");
+if (sc->bce_flags & BCE_USING_MSI_FLAG) {
+if (i > 0) printf("|");
+   printf("MSI"); i++;
+}
+
+if (sc->bce_flags & BCE_USING_MSIX_FLAG) {
+if (i > 0) printf("|");
+   printf("MSI-X "); i++;
+}
+
+if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) {
+if (i > 0) printf("|");
+   printf("2.5G"); i++;
+}
+
+if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) {
+if (i > 0) printf("|");
+printf("MFW); MFW (%s)\n", sc->bce_mfw_ver);
+} else {
+printf(")\n");
+}
 
DBEXIT(BCE_VERBOSE_LOAD);
 }
@@ -847,13 +865,50 @@ bce_attach(device_t dev)
__FUNCTION__, sc->bce_shmem_base);
 
/* Fetch the bootcode revision. */
-   sc->bce_bc_ver = REG_RD_IND(sc, sc->bce_shmem_base +
-   BCE_DEV_INFO_BC_REV);
+val = bce_shmem_rd(sc, BCE_DEV_INFO_BC_REV);
+for (int i = 0, j = 0; i < 3; i++) {
+u8 num;
+
+num = (u8) (val >> (24 - (i * 8)));
+for (int k = 100, skip0 = 1; k >= 1; num %= k, k /= 10) {
+if (num >= k || !skip0 || k == 1) {
+sc->bce_bc_ver[j++] = (num / k) + '0';
+skip0 = 0;
+}
+}
+if (i != 2)
+sc->bce_bc_ver[j++] = '.';
+}
+
+/* Check if any management firwmare is running. */
+val = bce_shmem_rd(sc, BCE_PORT_FEATURE);
+if (val & BCE_PORT_FEATURE_ASF_ENABLED) {
+sc->bce_flags |= BCE_MFW_ENABLE_FLAG;
+
+/* Allow time for firmware to enter the running state. */
+for (int i = 0; i < 30; i++) {
+val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION);
+if (val & BCE_CONDITION_MFW_RUN_MASK)
+break;
+DELAY(1);
+}
+}
 
-   /* Check if any management firmware is running. */
-   val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_PORT_FEATURE);
-   if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED))
-   sc->bce_flags |= BCE_MFW_ENABLE_FLAG;
+/* Check the current bootcode state. */
+val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION);
+val &= BCE_CONDITION_MFW_RUN_MASK;
+if (val != BCE_CONDITION_MFW_RUN_UNKNOWN &&
+val != BCE_CONDITION_MFW_RUN_NONE) {
+u32 addr = bce_shmem_rd(sc, BCE_MFW_VER_PTR);
+int i = 0;
+
+for (int j = 0; j < 3; j++) {
+val = bce_reg_rd_ind(sc, addr + j * 4);
+val = bswap32(val);
+memcpy(&sc->bce_mfw_ver[i], &val, 4);
+i += 4;
+}
+}
 
/* Get PCI bus information (speed 

svn commit: r205300 - head/sys/dev/bce

2010-03-18 Thread David Christensen
Author: davidch
Date: Thu Mar 18 21:00:53 2010
New Revision: 205300
URL: http://svn.freebsd.org/changeset/base/205300

Log:
  - Added support for 5709S/5716S PHYs.
  - Update copyright to 2010.
  - Add new debug code for RV2P block.
  - Improve output formatting for various debug functions.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bce/if_bcefw.h
  head/sys/dev/bce/if_bcereg.h

Modified: head/sys/dev/bce/if_bce.c
==
--- head/sys/dev/bce/if_bce.c   Thu Mar 18 20:57:57 2010(r205299)
+++ head/sys/dev/bce/if_bce.c   Thu Mar 18 21:00:53 2010(r205300)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2006-2009 Broadcom Corporation
+ * Copyright (c) 2006-2010 Broadcom Corporation
  * David Christensen .  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$");
  *   BCM5708C B1, B2
  *   BCM5708S B1, B2
  *   BCM5709C A1, C0
+ *   BCM5709S A1, C0
  *  BCM5716C C0
+ *  BCM5716S C0
  *
  * The following controllers are not supported by this driver:
  *   BCM5706C A0, A1 (pre-production)
@@ -46,7 +48,7 @@ __FBSDID("$FreeBSD$");
  *   BCM5708C A0, B0 (pre-production)
  *   BCM5708S A0, B0 (pre-production)
  *   BCM5709C A0  B0, B1, B2 (pre-production)
- *   BCM5709S A0, A1, B0, B1, B2, C0 (pre-production)
+ *   BCM5709S A0, B0, B1, B2 (pre-production)
  */
 
 #include "opt_bce.h"
@@ -320,6 +322,7 @@ static void bce_dump_rxp_state  (struct 
 static void bce_dump_tpat_state(struct bce_softc *, int);
 static void bce_dump_cp_state  (struct bce_softc *, int);
 static void bce_dump_com_state (struct bce_softc *, int);
+static void bce_dump_rv2p_state(struct bce_softc *);
 static void bce_breakpoint (struct bce_softc *);
 #endif
 
@@ -360,6 +363,7 @@ static int  bce_nvram_write (struct bc
 /*  */
 //
 static void bce_get_media  (struct bce_softc *);
+static void bce_init_media (struct bce_softc *);
 static void bce_dma_map_addr   (void *, bus_dma_segment_t *, int, int);
 static int  bce_dma_alloc  (device_t);
 static void bce_dma_free   (struct bce_softc *);
@@ -1096,7 +1100,10 @@ bce_attach(device_t dev)
else
ifp->if_baudrate = IF_Mbps(1000);
 
-   /* Check for an MII child bus by probing the PHY. */
+/* Handle any special PHY initialization for SerDes PHYs. */
+bce_init_media(sc);
+
+   /* MII child bus by probing the PHY. */
if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd,
bce_ifmedia_sts)) {
BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n",
@@ -1504,7 +1511,17 @@ bce_miibus_read_reg(device_t dev, int ph
return(0);
}
 
-   if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) {
+/*
+ * The 5709S PHY is an IEEE Clause 45 PHY
+ * with special mappings to work with IEEE
+ * Clause 22 register accesses.
+ */
+   if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) {
+   if (reg >= MII_BMCR && reg <= MII_ANLPRNP)
+   reg += 0x10;
+   }
+
+if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) {
val = REG_RD(sc, BCE_EMAC_MDIO_MODE);
val &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL;
 
@@ -1584,6 +1601,16 @@ bce_miibus_write_reg(device_t dev, int p
 
DB_PRINT_PHY_REG(reg, val);
 
+/*
+ * The 5709S PHY is an IEEE Clause 45 PHY
+ * with special mappings to work with IEEE
+ * Clause 22 register accesses.
+ */
+   if ((sc->bce_phy_flags & BCE_PHY_IEEE_CLAUSE_45_FLAG) != 0) {
+   if (reg >= MII_BMCR && reg <= MII_ANLPRNP)
+   reg += 0x10;
+   }
+
if (sc->bce_phy_flags & BCE_PHY_INT_MODE_AUTO_POLLING_FLAG) {
val1 = REG_RD(sc, BCE_EMAC_MDIO_MODE);
val1 &= ~BCE_EMAC_MDIO_MODE_AUTO_POLL;
@@ -2647,9 +2674,11 @@ bce_get_media(struct bce_softc *sc)
DBPRINT(sc, BCE_INFO_LOAD,
"BCM5709 s/w configured for SerDes.\n");
sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG;
+break;
default:
DBPRINT(sc, BCE_INFO_LOAD,
"BCM5709 s/w configured for Copper.\n");
+break;
}
} else {
switch (strap) {
@@ -2659,9 +2688,11 @@ bce_get_media(struct bce_softc *sc)
DBPRINT(sc, BCE_INFO_LOAD,

svn commit: r205299 - head/sys/dev/mii

2010-03-18 Thread David Christensen
Author: davidch
Date: Thu Mar 18 20:57:57 2010
New Revision: 205299
URL: http://svn.freebsd.org/changeset/base/205299

Log:
  - Added support for 5709S/5716S PHYs.
  
  Submitted by: pyunyh
  MFC after:2 weeks

Modified:
  head/sys/dev/mii/brgphy.c
  head/sys/dev/mii/brgphyreg.h
  head/sys/dev/mii/miidevs

Modified: head/sys/dev/mii/brgphy.c
==
--- head/sys/dev/mii/brgphy.c   Thu Mar 18 20:30:25 2010(r205298)
+++ head/sys/dev/mii/brgphy.c   Thu Mar 18 20:57:57 2010(r205299)
@@ -75,6 +75,7 @@ struct brgphy_softc {
 #define BRGPHY_5706S   0x0001
 #define BRGPHY_5708S   0x0002
 #define BRGPHY_NOANWAIT0x0004
+#define BRGPHY_5709S   0x0008
int bce_phy_flags;  /* PHY flags transferred from the MAC driver */
 };
 
@@ -139,6 +140,7 @@ static const struct mii_phydesc brgphys[
MII_PHY_DESC(xxBROADCOM_ALT1, BCM5784),
MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709C),
MII_PHY_DESC(xxBROADCOM_ALT1, BCM5761),
+MII_PHY_DESC(xxBROADCOM_ALT1, BCM5709S),
MII_PHY_DESC(BROADCOM2, BCM5906),
MII_PHY_END
 };
@@ -216,30 +218,34 @@ brgphy_attach(device_t dev)
break;
case MII_OUI_xxBROADCOM:
switch (bsc->mii_model) {
-   case MII_MODEL_xxBROADCOM_BCM5706:
-   case MII_MODEL_xxBROADCOM_BCM5714:
-   /*
-* The 5464 PHY used in the 5706 supports both 
copper
-* and fiber interfaces over GMII.  Need to 
check the
-* shadow registers to see which mode is 
actually
-* in effect, and therefore whether we have 
5706C or
-* 5706S.
-*/
-   PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C,
-   BRGPHY_SHADOW_1C_MODE_CTRL);
-   if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) &
-   BRGPHY_SHADOW_1C_ENA_1000X) {
-   bsc->serdes_flags |= BRGPHY_5706S;
-   sc->mii_flags |= MIIF_HAVEFIBER;
-   }
-   break;
+   case MII_MODEL_xxBROADCOM_BCM5706:
+   case MII_MODEL_xxBROADCOM_BCM5714:
+   /*
+* The 5464 PHY used in the 5706 supports both copper
+* and fiber interfaces over GMII.  Need to check the
+* shadow registers to see which mode is actually
+* in effect, and therefore whether we have 5706C or
+* 5706S.
+*/
+   PHY_WRITE(sc, BRGPHY_MII_SHADOW_1C,
+   BRGPHY_SHADOW_1C_MODE_CTRL);
+   if (PHY_READ(sc, BRGPHY_MII_SHADOW_1C) &
+   BRGPHY_SHADOW_1C_ENA_1000X) {
+   bsc->serdes_flags |= BRGPHY_5706S;
+   sc->mii_flags |= MIIF_HAVEFIBER;
+   }
+   break;
} break;
case MII_OUI_xxBROADCOM_ALT1:
switch (bsc->mii_model) {
-   case MII_MODEL_xxBROADCOM_ALT1_BCM5708S:
-   bsc->serdes_flags |= BRGPHY_5708S;
-   sc->mii_flags |= MIIF_HAVEFIBER;
-   break;
+   case MII_MODEL_xxBROADCOM_ALT1_BCM5708S:
+   bsc->serdes_flags |= BRGPHY_5708S;
+   sc->mii_flags |= MIIF_HAVEFIBER;
+   break;
+case MII_MODEL_xxBROADCOM_ALT1_BCM5709S:
+bsc->serdes_flags |= BRGPHY_5709S;
+sc->mii_flags |= MIIF_HAVEFIBER;
+break;
} break;
default:
device_printf(dev, "Unrecognized OUI for PHY!\n");
@@ -631,6 +637,7 @@ brgphy_status(struct mii_softc *sc)
PHY_WRITE(sc, BRGPHY_5708S_BLOCK_ADDR, 
BRGPHY_5708S_DIG_PG0);
xstat = PHY_READ(sc, BRGPHY_5708S_PG0_1000X_STAT1);
 
+/* Check for MRBE auto-negotiated speed results. */
switch (xstat & 
BRGPHY_5708S_PG0_1000X_STAT1_SPEED_MASK) {
case BRGPHY_5708S_PG0_1000X_STAT1_SPEED_10:
mii->mii_media_active |= IFM_10_FL; break;
@@ -642,11 +649,40 @@ brgphy_status(struct mii_softc *sc)
mii->mii_media_active |= IFM_2500_SX; break;
}
 
+/* Check for MRBE auto-negotiated duplex results. */
if (xstat & BRGPHY_5708S_PG0_1000X_STAT1_FDX)

svn commit: r205298 - head/sys/vm

2010-03-18 Thread Kip Macy
Author: kmacy
Date: Thu Mar 18 20:30:25 2010
New Revision: 205298
URL: http://svn.freebsd.org/changeset/base/205298

Log:
  turn 205266 in to a no-op until the problem can be properly diagnosed

Modified:
  head/sys/vm/uma_int.h

Modified: head/sys/vm/uma_int.h
==
--- head/sys/vm/uma_int.h   Thu Mar 18 20:15:34 2010(r205297)
+++ head/sys/vm/uma_int.h   Thu Mar 18 20:30:25 2010(r205298)
@@ -162,7 +162,7 @@ struct uma_hash {
 /*
  * align field or structure to cache line
  */
-#define UMA_ALIGN  __aligned(CACHE_LINE_SIZE)
+#define UMA_ALIGN
 
 /*
  * Structures for per cpu queues.
___
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: r205297 - head/sys/compat/x86bios

2010-03-18 Thread Jung-uk Kim
Author: jkim
Date: Thu Mar 18 20:15:34 2010
New Revision: 205297
URL: http://svn.freebsd.org/changeset/base/205297

Log:
  Detect illegal access to unmapped memory within real mode emulator to aid
  debugging.  Update copyright date while I am here.

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==
--- head/sys/compat/x86bios/x86bios.c   Thu Mar 18 20:13:04 2010
(r205296)
+++ head/sys/compat/x86bios/x86bios.c   Thu Mar 18 20:15:34 2010
(r205297)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2009 Alex Keda 
- * Copyright (c) 2009 Jung-uk Kim 
+ * Copyright (c) 2009-2010 Jung-uk Kim 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -81,6 +81,10 @@ static vm_offset_t *x86bios_map;
 
 static vm_paddr_t x86bios_seg_phys;
 
+static int x86bios_fault;
+static uint32_t x86bios_fault_addr;
+static uint32_t x86bios_fault_inst;
+
 SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL, "x86bios debugging");
 static int x86bios_trace_call;
 TUNABLE_INT("debug.x86bios.call", &x86bios_trace_call);
@@ -91,6 +95,15 @@ TUNABLE_INT("debug.x86bios.int", &x86bio
 SYSCTL_INT(_debug_x86bios, OID_AUTO, int, CTLFLAG_RW, &x86bios_trace_int, 0,
 "Trace software interrupt handlers");
 
+static void
+x86bios_set_fault(struct x86emu *emu, uint32_t addr)
+{
+
+   x86bios_fault = 1;
+   x86bios_fault_addr = addr;
+   x86bios_fault_inst = (emu->x86.R_CS << 4) + emu->x86.R_IP;
+}
+
 static void *
 x86bios_get_pages(uint32_t offset, size_t size)
 {
@@ -123,8 +136,10 @@ x86bios_emu_rdb(struct x86emu *emu, uint
uint8_t *va;
 
va = x86bios_get_pages(addr, sizeof(*va));
-   if (va == NULL)
+   if (va == NULL) {
+   x86bios_set_fault(emu, addr);
x86emu_halt_sys(emu);
+   }
 
return (*va);
 }
@@ -135,8 +150,10 @@ x86bios_emu_rdw(struct x86emu *emu, uint
uint16_t *va;
 
va = x86bios_get_pages(addr, sizeof(*va));
-   if (va == NULL)
+   if (va == NULL) {
+   x86bios_set_fault(emu, addr);
x86emu_halt_sys(emu);
+   }
 
return (le16toh(*va));
 }
@@ -147,8 +164,10 @@ x86bios_emu_rdl(struct x86emu *emu, uint
uint32_t *va;
 
va = x86bios_get_pages(addr, sizeof(*va));
-   if (va == NULL)
+   if (va == NULL) {
+   x86bios_set_fault(emu, addr);
x86emu_halt_sys(emu);
+   }
 
return (le32toh(*va));
 }
@@ -159,8 +178,10 @@ x86bios_emu_wrb(struct x86emu *emu, uint
uint8_t *va;
 
va = x86bios_get_pages(addr, sizeof(*va));
-   if (va == NULL)
+   if (va == NULL) {
+   x86bios_set_fault(emu, addr);
x86emu_halt_sys(emu);
+   }
 
*va = val;
 }
@@ -171,8 +192,10 @@ x86bios_emu_wrw(struct x86emu *emu, uint
uint16_t *va;
 
va = x86bios_get_pages(addr, sizeof(*va));
-   if (va == NULL)
+   if (va == NULL) {
+   x86bios_set_fault(emu, addr);
x86emu_halt_sys(emu);
+   }
 
*va = htole16(val);
 }
@@ -183,8 +206,10 @@ x86bios_emu_wrl(struct x86emu *emu, uint
uint32_t *va;
 
va = x86bios_get_pages(addr, sizeof(*va));
-   if (va == NULL)
+   if (va == NULL) {
+   x86bios_set_fault(emu, addr);
x86emu_halt_sys(emu);
+   }
 
*va = htole32(val);
 }
@@ -331,15 +356,20 @@ x86bios_call(struct x86regs *regs, uint1
 
mtx_lock_spin(&x86bios_lock);
memcpy(&x86bios_emu.x86, regs, sizeof(*regs));
+   x86bios_fault = 0;
x86emu_exec_call(&x86bios_emu, seg, off);
memcpy(regs, &x86bios_emu.x86, sizeof(*regs));
mtx_unlock_spin(&x86bios_lock);
 
-   if (x86bios_trace_call)
+   if (x86bios_trace_call) {
printf("Exiting 0x%05x (ax=0x%04x bx=0x%04x "
"cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n",
(seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX,
regs->R_DX, regs->R_ES, regs->R_DI);
+   if (x86bios_fault)
+   printf("Page fault at 0x%05x from 0x%05x.\n",
+   x86bios_fault_addr, x86bios_fault_inst);
+   }
 }
 
 uint32_t
@@ -370,15 +400,20 @@ x86bios_intr(struct x86regs *regs, int i
 
mtx_lock_spin(&x86bios_lock);
memcpy(&x86bios_emu.x86, regs, sizeof(*regs));
+   x86bios_fault = 0;
x86emu_exec_intr(&x86bios_emu, intno);
memcpy(regs, &x86bios_emu.x86, sizeof(*regs));
mtx_unlock_spin(&x86bios_lock);
 
-   if (x86bios_trace_int)
+   if (x86bios_trace_int) {
printf("Exiting int 0x%x (ax=0x%04x bx=0x%04x "
"cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n",
intno, regs->R_AX, regs->R_BX, regs->R_CX,
regs->R_DX, regs->R_ES, 

svn commit: r205296 - head/usr.sbin/jls

2010-03-18 Thread Ed Schouten
Author: ed
Date: Thu Mar 18 20:13:04 2010
New Revision: 205296
URL: http://svn.freebsd.org/changeset/base/205296

Log:
  Properly progress through the list of IPv6 addresses using in6_addr size.
  
  Right now if a jail has multiple IPv6 addresses, it will print them
  shifting only 4 bytes at a time. Example:
  
2001:4dd0:ff41::b23f:a9
2001:4dd0:ff41::b23f:aa
  
  Becomes:
  
2001:4dd0:ff41::b23f:a9
ff41::b23f:a9:2001:4dd0
  
  By casting to in6_addr, it uses the correct offsets.
  
  MFC after:1 week

Modified:
  head/usr.sbin/jls/jls.c

Modified: head/usr.sbin/jls/jls.c
==
--- head/usr.sbin/jls/jls.c Thu Mar 18 19:10:03 2010(r205295)
+++ head/usr.sbin/jls/jls.c Thu Mar 18 20:13:04 2010(r205296)
@@ -355,7 +355,7 @@ print_jail(int pflags, int jflags)
count = params[7].jp_valuelen / sizeof(struct in6_addr);
for (ai = 0; ai < count; ai++)
if (inet_ntop(AF_INET6,
-   &((struct in_addr *)params[7].jp_value)[ai],
+   &((struct in6_addr 
*)params[7].jp_value)[ai],
ipbuf, sizeof(ipbuf)) == NULL)
err(1, "inet_ntop");
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: r205290 - head

2010-03-18 Thread Doug Barton
On 03/18/10 12:45, Max Laier wrote:
> On Thursday 18 March 2010 19:58:17 Doug Barton wrote:
>> Author: dougb
>> Date: Thu Mar 18 18:58:17 2010
>> New Revision: 205290
>> URL: http://svn.freebsd.org/changeset/base/205290
>>
>> Log:
>>   For those of us mere mortals who do not aspire to the lofty heights
>>   of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in
>>   the 'make universe' goodnes without using unecessary time and resources.
> 
> Could you document that in share/man/man7/build.7 ?

Sure, I'll put it right next to the docs for MAKE_JUST_KERNELS.


-- 

... and that's just a little bit of history repeating.
-- Propellerheads

Improve the effectiveness of your Internet presence with
a domain name makeover!http://SupersetSolutions.com/

___
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: r205290 - head

2010-03-18 Thread Bjoern A. Zeeb

On Thu, 18 Mar 2010, Doug Barton wrote:


Author: dougb
Date: Thu Mar 18 18:58:17 2010
New Revision: 205290
URL: http://svn.freebsd.org/changeset/base/205290

Log:
 For those of us mere mortals who do not aspire to the lofty heights
 of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in
 the 'make universe' goodnes without using unecessary time and resources.


Just FYI, you could do that with .. already:
make universe KERNCONFS=



Modified:
 head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Thu Mar 18 18:52:18 2010(r205289)
+++ head/Makefile   Thu Mar 18 18:58:17 2010(r205290)
@@ -311,6 +311,7 @@ universe_${target}:
"check _.${target}.buildworld for details" | ${MAKEFAIL}))
@echo ">> ${target} buildworld completed on `LC_ALL=C date`"
.endif
+.if !defined(MAKE_JUST_WORLDS)
.if exists(${.CURDIR}/sys/${target}/conf/NOTES)
@(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
@@ -319,6 +320,7 @@ universe_${target}:
.endif
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \
universe_kernels
+.endif
@echo ">> ${target} completed on `LC_ALL=C date`"
.endfor
universe_kernels: universe_kernconfs



--
Bjoern A. Zeeb It will not break if you know what you are doing.
___
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: r205290 - head

2010-03-18 Thread Max Laier
On Thursday 18 March 2010 19:58:17 Doug Barton wrote:
> Author: dougb
> Date: Thu Mar 18 18:58:17 2010
> New Revision: 205290
> URL: http://svn.freebsd.org/changeset/base/205290
> 
> Log:
>   For those of us mere mortals who do not aspire to the lofty heights
>   of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in
>   the 'make universe' goodnes without using unecessary time and resources.

Could you document that in share/man/man7/build.7 ?

> Modified:
>   head/Makefile
> 
> Modified: head/Makefile
> ===
> === --- head/Makefile Thu Mar 18 18:52:18 2010(r205289)
> +++ head/Makefile Thu Mar 18 18:58:17 2010(r205290)
> @@ -311,6 +311,7 @@ universe_${target}:
>   "check _.${target}.buildworld for details" | ${MAKEFAIL}))
>   @echo ">> ${target} buildworld completed on `LC_ALL=C date`"
>  .endif
> +.if !defined(MAKE_JUST_WORLDS)
>  .if exists(${.CURDIR}/sys/${target}/conf/NOTES)
>   @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
>   ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
> @@ -319,6 +320,7 @@ universe_${target}:
>  .endif
>   @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \
>   universe_kernels
> +.endif
>   @echo ">> ${target} completed on `LC_ALL=C date`"
>  .endfor
>  universe_kernels: universe_kernconfs
___
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: r205295 - stable/8/sbin/ifconfig

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 19:10:03 2010
New Revision: 205295
URL: http://svn.freebsd.org/changeset/base/205295

Log:
  MFC r204150:
Add TSO support on VLAN in fconfig(8).

Modified:
  stable/8/sbin/ifconfig/ifconfig.8
  stable/8/sbin/ifconfig/ifconfig.c
  stable/8/sbin/ifconfig/ifvlan.c
Directory Properties:
  stable/8/sbin/ifconfig/   (props changed)

Modified: stable/8/sbin/ifconfig/ifconfig.8
==
--- stable/8/sbin/ifconfig/ifconfig.8   Thu Mar 18 19:04:04 2010
(r205294)
+++ stable/8/sbin/ifconfig/ifconfig.8   Thu Mar 18 19:10:03 2010
(r205295)
@@ -28,7 +28,7 @@
 .\" From: @(#)ifconfig.8   8.3 (Berkeley) 1/5/94
 .\" $FreeBSD$
 .\"
-.Dd January 26, 2010
+.Dd February 20, 2010
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -408,20 +408,20 @@ they support in their capabilities.
 is a synonym for enabling all available WOL mechanisms.
 To disable WOL use
 .Fl wol .
-.It Cm vlanmtu , vlanhwtag, vlanhwfilter
+.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso
 If the driver offers user-configurable VLAN support, enable
-reception of extended frames, tag processing in hardware, or
-frame filtering in hardware,
+reception of extended frames, tag processing in hardware,
+frame filtering in hardware, or TSO on VLAN,
 respectively.
 Note that this must be issued on a physical interface associated with
 .Xr vlan 4 ,
 not on a
 .Xr vlan 4
 interface itself.
-.It Fl vlanmtu , vlanhwtag, vlanhwfilter
+.It Fl vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso
 If the driver offers user-configurable VLAN support, disable
-reception of extended frames, tag processing in hardware, or
-frame filtering in hardware,
+reception of extended frames, tag processing in hardware,
+frame filtering in hardware, or TSO on VLAN,
 respectively.
 .It Cm vnet Ar jail
 Move the interface to the

Modified: stable/8/sbin/ifconfig/ifconfig.c
==
--- stable/8/sbin/ifconfig/ifconfig.c   Thu Mar 18 19:04:04 2010
(r205294)
+++ stable/8/sbin/ifconfig/ifconfig.c   Thu Mar 18 19:10:03 2010
(r205295)
@@ -865,7 +865,7 @@ unsetifdescr(const char *val, int value,
 #defineIFCAPBITS \
 "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \
 "\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \
-"\21VLAN_HWFILTER"
+"\21VLAN_HWFILTER\23VLAN_HWTSO"
 
 /*
  * Print the status of the interface.  If an address family was

Modified: stable/8/sbin/ifconfig/ifvlan.c
==
--- stable/8/sbin/ifconfig/ifvlan.c Thu Mar 18 19:04:04 2010
(r205294)
+++ stable/8/sbin/ifconfig/ifvlan.c Thu Mar 18 19:10:03 2010
(r205295)
@@ -181,6 +181,8 @@ static struct cmd vlan_cmds[] = {
DEF_CMD("-vlanhwtag",   -IFCAP_VLAN_HWTAGGING,  setifcap),
DEF_CMD("vlanhwfilter", IFCAP_VLAN_HWFILTER,setifcap),
DEF_CMD("-vlanhwfilter", -IFCAP_VLAN_HWFILTER,  setifcap),
+   DEF_CMD("-vlanhwtso",   -IFCAP_VLAN_HWTSO,  setifcap),
+   DEF_CMD("vlanhwtso",IFCAP_VLAN_HWTSO,   setifcap),
 };
 static struct afswtch af_vlan = {
.af_name= "af_vlan",
___
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: r205294 - stable/8/sys/net

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 19:04:04 2010
New Revision: 205294
URL: http://svn.freebsd.org/changeset/base/205294

Log:
  MFC r204149:
Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO
from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to
TSO over VLAN without VLAN hardware tagging.
Driver changes and userland support will follow.

Modified:
  stable/8/sys/net/if.h
  stable/8/sys/net/if_vlan.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/net/if.h
==
--- stable/8/sys/net/if.h   Thu Mar 18 19:00:37 2010(r205293)
+++ stable/8/sys/net/if.h   Thu Mar 18 19:04:04 2010(r205294)
@@ -218,6 +218,7 @@ struct if_data {
 #defineIFCAP_TOE6  0x08000 /* interface can offload TCP6 */
 #defineIFCAP_VLAN_HWFILTER 0x1 /* interface hw can filter vlan 
tag */
 #defineIFCAP_POLLING_NOCOUNT   0x2 /* polling ticks cannot be 
fragmented */
+#defineIFCAP_VLAN_HWTSO0x4 /* can do IFCAP_TSO on VLANs */
 
 #define IFCAP_HWCSUM   (IFCAP_RXCSUM | IFCAP_TXCSUM)
 #defineIFCAP_TSO   (IFCAP_TSO4 | IFCAP_TSO6)

Modified: stable/8/sys/net/if_vlan.c
==
--- stable/8/sys/net/if_vlan.c  Thu Mar 18 19:00:37 2010(r205293)
+++ stable/8/sys/net/if_vlan.c  Thu Mar 18 19:04:04 2010(r205294)
@@ -1275,11 +1275,26 @@ vlan_capabilities(struct ifvlan *ifv)
if (p->if_capenable & IFCAP_VLAN_HWCSUM &&
p->if_capenable & IFCAP_VLAN_HWTAGGING) {
ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM;
-   ifp->if_hwassist = p->if_hwassist;
+   ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP |
+   CSUM_UDP | CSUM_SCTP | CSUM_IP_FRAGS | CSUM_FRAGMENT);
} else {
ifp->if_capenable = 0;
ifp->if_hwassist = 0;
}
+   /*
+* If the parent interface can do TSO on VLANs then
+* propagate the hardware-assisted flag. TSO on VLANs
+* does not necessarily require hardware VLAN tagging.
+*/
+   if (p->if_capabilities & IFCAP_VLAN_HWTSO)
+   ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO;
+   if (p->if_capenable & IFCAP_VLAN_HWTSO) {
+   ifp->if_capenable |= p->if_capenable & IFCAP_TSO;
+   ifp->if_hwassist |= p->if_hwassist & CSUM_TSO;
+   } else {
+   ifp->if_capenable &= ~(p->if_capenable & IFCAP_TSO);
+   ifp->if_hwassist &= ~(p->if_hwassist & CSUM_TSO);
+   }
 }
 
 static void
___
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: r205293 - stable/7/sys/dev/msk

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 19:00:37 2010
New Revision: 205293
URL: http://svn.freebsd.org/changeset/base/205293

Log:
  MFC r202826-202827,204146
  
  r202826:
s/Mhz/MHz/g
  
Submitted by:   N.J. Mann  njm dot me dot uk >
  
  r202827:
Yukon Ultra2 has 125MHz clock.
  
  r204146:
Correct inversed programming of ethernet hardware address on
big-endian architecture.
  
Submitted by:   C. Jayachandran  
(initial version)

Modified:
  stable/7/sys/dev/msk/if_msk.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/msk/if_msk.c
==
--- stable/7/sys/dev/msk/if_msk.c   Thu Mar 18 19:00:35 2010
(r205292)
+++ stable/7/sys/dev/msk/if_msk.c   Thu Mar 18 19:00:37 2010
(r205293)
@@ -1699,15 +1699,15 @@ mskc_attach(device_t dev)
 
switch (sc->msk_hw_id) {
case CHIP_ID_YUKON_EC:
-   sc->msk_clock = 125;/* 125 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO;
break;
case CHIP_ID_YUKON_EC_U:
-   sc->msk_clock = 125;/* 125 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM;
break;
case CHIP_ID_YUKON_EX:
-   sc->msk_clock = 125;/* 125 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 |
MSK_FLAG_AUTOTX_CSUM;
/*
@@ -1725,11 +1725,11 @@ mskc_attach(device_t dev)
sc->msk_pflags |= MSK_FLAG_JUMBO_NOCSUM;
break;
case CHIP_ID_YUKON_FE:
-   sc->msk_clock = 100;/* 100 Mhz */
+   sc->msk_clock = 100;/* 100 MHz */
sc->msk_pflags |= MSK_FLAG_FASTETHER;
break;
case CHIP_ID_YUKON_FE_P:
-   sc->msk_clock = 50; /* 50 Mhz */
+   sc->msk_clock = 50; /* 50 MHz */
sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2 |
MSK_FLAG_AUTOTX_CSUM;
if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) {
@@ -1748,15 +1748,15 @@ mskc_attach(device_t dev)
}
break;
case CHIP_ID_YUKON_XL:
-   sc->msk_clock = 156;/* 156 Mhz */
+   sc->msk_clock = 156;/* 156 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO;
break;
case CHIP_ID_YUKON_UL_2:
-   sc->msk_clock = 156;/* 156 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO;
break;
default:
-   sc->msk_clock = 156;/* 156 Mhz */
+   sc->msk_clock = 156;/* 156 MHz */
break;
}
 
@@ -3715,10 +3715,10 @@ msk_init_locked(struct msk_if_softc *sc_
struct msk_softc *sc;
struct ifnet *ifp;
struct mii_data  *mii;
-   uint16_t eaddr[ETHER_ADDR_LEN / 2];
+   uint8_t *eaddr;
uint16_t gmac;
uint32_t reg;
-   int error, i;
+   int error;
 
MSK_IF_LOCK_ASSERT(sc_if);
 
@@ -3787,14 +3787,20 @@ msk_init_locked(struct msk_if_softc *sc_
GMAC_WRITE_2(sc, sc_if->msk_port, GM_SERIAL_MODE, gmac);
 
/* Set station address. */
-bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN);
-for (i = 0; i < ETHER_ADDR_LEN /2; i++)
-   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L + i * 4,
-   eaddr[i]);
-for (i = 0; i < ETHER_ADDR_LEN /2; i++)
-   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L + i * 4,
-   eaddr[i]);
-
+   eaddr = IF_LLADDR(ifp);
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L,
+   eaddr[0] | (eaddr[1] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1M,
+   eaddr[2] | (eaddr[3] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1H,
+   eaddr[4] | (eaddr[5] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L,
+   eaddr[0] | (eaddr[1] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2M,
+   eaddr[2] | (eaddr[3] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2H,
+   eaddr[4] | (eaddr[5] << 8));
+   
/* Disable interrupts for counter overflows. */
GMAC_WRITE_2(sc, sc_if->msk_port, GM_TX_IRQ_MSK, 0);
GMAC_WRITE_2(sc, sc_if->msk_port, GM_RX_IRQ_MSK, 0);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, s

svn commit: r205291 - stable/8/sys/dev/msk

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 18:58:24 2010
New Revision: 205291
URL: http://svn.freebsd.org/changeset/base/205291

Log:
  MFC r202826-202827,204146
  
  r202826:
s/Mhz/MHz/g
  
Submitted by:   N.J. Mann  njm dot me dot uk >
  
  r202827:
Yukon Ultra2 has 125MHz clock.
  
  r204146:
Correct inversed programming of ethernet hardware address on
big-endian architecture.
  
Submitted by:   C. Jayachandran  
(initial version)

Modified:
  stable/8/sys/dev/msk/if_msk.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/msk/if_msk.c
==
--- stable/8/sys/dev/msk/if_msk.c   Thu Mar 18 18:58:17 2010
(r205290)
+++ stable/8/sys/dev/msk/if_msk.c   Thu Mar 18 18:58:24 2010
(r205291)
@@ -1699,15 +1699,15 @@ mskc_attach(device_t dev)
 
switch (sc->msk_hw_id) {
case CHIP_ID_YUKON_EC:
-   sc->msk_clock = 125;/* 125 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO;
break;
case CHIP_ID_YUKON_EC_U:
-   sc->msk_clock = 125;/* 125 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM;
break;
case CHIP_ID_YUKON_EX:
-   sc->msk_clock = 125;/* 125 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 |
MSK_FLAG_AUTOTX_CSUM;
/*
@@ -1725,11 +1725,11 @@ mskc_attach(device_t dev)
sc->msk_pflags |= MSK_FLAG_JUMBO_NOCSUM;
break;
case CHIP_ID_YUKON_FE:
-   sc->msk_clock = 100;/* 100 Mhz */
+   sc->msk_clock = 100;/* 100 MHz */
sc->msk_pflags |= MSK_FLAG_FASTETHER;
break;
case CHIP_ID_YUKON_FE_P:
-   sc->msk_clock = 50; /* 50 Mhz */
+   sc->msk_clock = 50; /* 50 MHz */
sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2 |
MSK_FLAG_AUTOTX_CSUM;
if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) {
@@ -1748,15 +1748,15 @@ mskc_attach(device_t dev)
}
break;
case CHIP_ID_YUKON_XL:
-   sc->msk_clock = 156;/* 156 Mhz */
+   sc->msk_clock = 156;/* 156 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO;
break;
case CHIP_ID_YUKON_UL_2:
-   sc->msk_clock = 156;/* 156 Mhz */
+   sc->msk_clock = 125;/* 125 MHz */
sc->msk_pflags |= MSK_FLAG_JUMBO;
break;
default:
-   sc->msk_clock = 156;/* 156 Mhz */
+   sc->msk_clock = 156;/* 156 MHz */
break;
}
 
@@ -3715,10 +3715,10 @@ msk_init_locked(struct msk_if_softc *sc_
struct msk_softc *sc;
struct ifnet *ifp;
struct mii_data  *mii;
-   uint16_t eaddr[ETHER_ADDR_LEN / 2];
+   uint8_t *eaddr;
uint16_t gmac;
uint32_t reg;
-   int error, i;
+   int error;
 
MSK_IF_LOCK_ASSERT(sc_if);
 
@@ -3787,14 +3787,20 @@ msk_init_locked(struct msk_if_softc *sc_
GMAC_WRITE_2(sc, sc_if->msk_port, GM_SERIAL_MODE, gmac);
 
/* Set station address. */
-bcopy(IF_LLADDR(ifp), eaddr, ETHER_ADDR_LEN);
-for (i = 0; i < ETHER_ADDR_LEN /2; i++)
-   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L + i * 4,
-   eaddr[i]);
-for (i = 0; i < ETHER_ADDR_LEN /2; i++)
-   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L + i * 4,
-   eaddr[i]);
-
+   eaddr = IF_LLADDR(ifp);
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1L,
+   eaddr[0] | (eaddr[1] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1M,
+   eaddr[2] | (eaddr[3] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_1H,
+   eaddr[4] | (eaddr[5] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2L,
+   eaddr[0] | (eaddr[1] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2M,
+   eaddr[2] | (eaddr[3] << 8));
+   GMAC_WRITE_2(sc, sc_if->msk_port, GM_SRC_ADDR_2H,
+   eaddr[4] | (eaddr[5] << 8));
+   
/* Disable interrupts for counter overflows. */
GMAC_WRITE_2(sc, sc_if->msk_port, GM_TX_IRQ_MSK, 0);
GMAC_WRITE_2(sc, sc_if->msk_port, GM_RX_IRQ_MSK, 0);
___
svn-src

svn commit: r205290 - head

2010-03-18 Thread Doug Barton
Author: dougb
Date: Thu Mar 18 18:58:17 2010
New Revision: 205290
URL: http://svn.freebsd.org/changeset/base/205290

Log:
  For those of us mere mortals who do not aspire to the lofty heights
  of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in
  the 'make universe' goodnes without using unecessary time and resources.

Modified:
  head/Makefile

Modified: head/Makefile
==
--- head/Makefile   Thu Mar 18 18:52:18 2010(r205289)
+++ head/Makefile   Thu Mar 18 18:58:17 2010(r205290)
@@ -311,6 +311,7 @@ universe_${target}:
"check _.${target}.buildworld for details" | ${MAKEFAIL}))
@echo ">> ${target} buildworld completed on `LC_ALL=C date`"
 .endif
+.if !defined(MAKE_JUST_WORLDS)
 .if exists(${.CURDIR}/sys/${target}/conf/NOTES)
@(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
@@ -319,6 +320,7 @@ universe_${target}:
 .endif
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \
universe_kernels
+.endif
@echo ">> ${target} completed on `LC_ALL=C date`"
 .endfor
 universe_kernels: universe_kernconfs
___
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: r205289 - stable/7/sys/dev/bge

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 18:52:18 2010
New Revision: 205289
URL: http://svn.freebsd.org/changeset/base/205289

Log:
  MFC r203358,203716:
  
  r203358:
PCI express device status register has W1C feature. Writing 0 has
no effect. Make sure to clear error bits by writing 1. [1]
While I'm here use predefined value instead of hardcodig magic
vlaue.
  
Submitted by:   msaitoh at NetBSD [1]
  
  r203716:
Move device specific flag configuration to attach routine.
The softc obtained in device probe wouldn't be the same one used in
device attach. Drivers should not assume any values stored in softc
structure in probe routine will be available for its attach routine.

Modified:
  stable/7/sys/dev/bge/if_bge.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/bge/if_bge.c
==
--- stable/7/sys/dev/bge/if_bge.c   Thu Mar 18 18:50:20 2010
(r205288)
+++ stable/7/sys/dev/bge/if_bge.c   Thu Mar 18 18:52:18 2010
(r205289)
@@ -1993,10 +1993,6 @@ bge_probe(device_t dev)
snprintf(buf, 96, "%s, %sASIC rev. %#08x", model,
br != NULL ? "" : "unknown ", id);
device_set_desc_copy(dev, buf);
-   if (pci_get_subvendor(dev) == DELL_VENDORID)
-   sc->bge_flags |= BGE_FLAG_NO_3LED;
-   if (did == BCOM_DEVICEID_BCM5755M)
-   sc->bge_flags |= BGE_FLAG_ADJUST_TRIM;
return (0);
}
t++;
@@ -2607,6 +2603,10 @@ bge_attach(device_t dev)
sc->bge_flags |= BGE_FLAG_ADC_BUG;
if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0)
sc->bge_flags |= BGE_FLAG_5704_A0_BUG;
+   if (pci_get_subvendor(dev) == DELL_VENDORID)
+   sc->bge_flags |= BGE_FLAG_NO_3LED;
+   if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M)
+   sc->bge_flags |= BGE_FLAG_ADJUST_TRIM;
if (BGE_IS_5705_PLUS(sc) &&
!(sc->bge_flags & BGE_FLAG_ADJUST_TRIM)) {
if (sc->bge_asicrev == BGE_ASICREV_BCM5755 ||
@@ -3136,14 +3136,17 @@ bge_reset(struct bge_softc *sc)
devctl = pci_read_config(dev,
sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, 2);
/* Clear enable no snoop and disable relaxed ordering. */
-   devctl &= ~(0x0010 | 0x0800);
+   devctl &= ~(PCIM_EXP_CTL_RELAXED_ORD_ENABLE |
+   PCIM_EXP_CTL_NOSNOOP_ENABLE);
/* Set PCIE max payload size to 128. */
devctl &= ~PCIM_EXP_CTL_MAX_PAYLOAD;
pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL,
devctl, 2);
/* Clear error status. */
pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_STA,
-   0, 2);
+   PCIM_EXP_STA_CORRECTABLE_ERROR |
+   PCIM_EXP_STA_NON_FATAL_ERROR | PCIM_EXP_STA_FATAL_ERROR |
+   PCIM_EXP_STA_UNSUPPORTED_REQ, 2);
}
 
/* Reset some of the PCI state that got zapped by reset. */
___
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: r205288 - stable/8/sys/dev/bge

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 18:50:20 2010
New Revision: 205288
URL: http://svn.freebsd.org/changeset/base/205288

Log:
  MFC r203358,203716:
  
  r203358:
PCI express device status register has W1C feature. Writing 0 has
no effect. Make sure to clear error bits by writing 1. [1]
While I'm here use predefined value instead of hardcodig magic
vlaue.
  
Submitted by:   msaitoh at NetBSD [1]
  
  r203716:
Move device specific flag configuration to attach routine.
The softc obtained in device probe wouldn't be the same one used in
device attach. Drivers should not assume any values stored in softc
structure in probe routine will be available for its attach routine.

Modified:
  stable/8/sys/dev/bge/if_bge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/bge/if_bge.c
==
--- stable/8/sys/dev/bge/if_bge.c   Thu Mar 18 18:45:45 2010
(r205287)
+++ stable/8/sys/dev/bge/if_bge.c   Thu Mar 18 18:50:20 2010
(r205288)
@@ -1993,10 +1993,6 @@ bge_probe(device_t dev)
snprintf(buf, 96, "%s, %sASIC rev. %#08x", model,
br != NULL ? "" : "unknown ", id);
device_set_desc_copy(dev, buf);
-   if (pci_get_subvendor(dev) == DELL_VENDORID)
-   sc->bge_flags |= BGE_FLAG_NO_3LED;
-   if (did == BCOM_DEVICEID_BCM5755M)
-   sc->bge_flags |= BGE_FLAG_ADJUST_TRIM;
return (0);
}
t++;
@@ -2607,6 +2603,10 @@ bge_attach(device_t dev)
sc->bge_flags |= BGE_FLAG_ADC_BUG;
if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0)
sc->bge_flags |= BGE_FLAG_5704_A0_BUG;
+   if (pci_get_subvendor(dev) == DELL_VENDORID)
+   sc->bge_flags |= BGE_FLAG_NO_3LED;
+   if (pci_get_device(dev) == BCOM_DEVICEID_BCM5755M)
+   sc->bge_flags |= BGE_FLAG_ADJUST_TRIM;
if (BGE_IS_5705_PLUS(sc) &&
!(sc->bge_flags & BGE_FLAG_ADJUST_TRIM)) {
if (sc->bge_asicrev == BGE_ASICREV_BCM5755 ||
@@ -3136,14 +3136,17 @@ bge_reset(struct bge_softc *sc)
devctl = pci_read_config(dev,
sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL, 2);
/* Clear enable no snoop and disable relaxed ordering. */
-   devctl &= ~(0x0010 | 0x0800);
+   devctl &= ~(PCIM_EXP_CTL_RELAXED_ORD_ENABLE |
+   PCIM_EXP_CTL_NOSNOOP_ENABLE);
/* Set PCIE max payload size to 128. */
devctl &= ~PCIM_EXP_CTL_MAX_PAYLOAD;
pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_CTL,
devctl, 2);
/* Clear error status. */
pci_write_config(dev, sc->bge_expcap + PCIR_EXPRESS_DEVICE_STA,
-   0, 2);
+   PCIM_EXP_STA_CORRECTABLE_ERROR |
+   PCIM_EXP_STA_NON_FATAL_ERROR | PCIM_EXP_STA_FATAL_ERROR |
+   PCIM_EXP_STA_UNSUPPORTED_REQ, 2);
}
 
/* Reset some of the PCI state that got zapped by reset. */
___
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: r205287 - stable/7/sys/dev/pci

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 18:45:45 2010
New Revision: 205287
URL: http://svn.freebsd.org/changeset/base/205287

Log:
  MFC r203355:
Add more bit definitions to PCI express device control and device
status register.

Modified:
  stable/7/sys/dev/pci/pcireg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/pci/pcireg.h
==
--- stable/7/sys/dev/pci/pcireg.h   Thu Mar 18 18:44:08 2010
(r205286)
+++ stable/7/sys/dev/pci/pcireg.h   Thu Mar 18 18:45:45 2010
(r205287)
@@ -605,9 +605,17 @@
 #definePCIR_EXPRESS_DEVICE_CAP 0x4
 #definePCIM_EXP_CAP_MAX_PAYLOAD0x0007
 #definePCIR_EXPRESS_DEVICE_CTL 0x8
+#definePCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010
 #definePCIM_EXP_CTL_MAX_PAYLOAD0x00e0
+#definePCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800
 #definePCIM_EXP_CTL_MAX_READ_REQUEST   0x7000
 #definePCIR_EXPRESS_DEVICE_STA 0xa
+#definePCIM_EXP_STA_CORRECTABLE_ERROR  0x0001
+#definePCIM_EXP_STA_NON_FATAL_ERROR0x0002
+#definePCIM_EXP_STA_FATAL_ERROR0x0004
+#definePCIM_EXP_STA_UNSUPPORTED_REQ0x0008
+#definePCIM_EXP_STA_AUX_POWER  0x0010
+#definePCIM_EXP_STA_TRANSACTION_PND0x0020
 #definePCIR_EXPRESS_LINK_CAP   0xc
 #definePCIM_LINK_CAP_MAX_SPEED 0x000f
 #definePCIM_LINK_CAP_MAX_WIDTH 0x03f0
___
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: r205286 - stable/8/sys/dev/pci

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 18:44:08 2010
New Revision: 205286
URL: http://svn.freebsd.org/changeset/base/205286

Log:
  MFC r203355:
Add more bit definitions to PCI express device control and device
status register.

Modified:
  stable/8/sys/dev/pci/pcireg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/pci/pcireg.h
==
--- stable/8/sys/dev/pci/pcireg.h   Thu Mar 18 18:38:53 2010
(r205285)
+++ stable/8/sys/dev/pci/pcireg.h   Thu Mar 18 18:44:08 2010
(r205286)
@@ -605,9 +605,17 @@
 #definePCIR_EXPRESS_DEVICE_CAP 0x4
 #definePCIM_EXP_CAP_MAX_PAYLOAD0x0007
 #definePCIR_EXPRESS_DEVICE_CTL 0x8
+#definePCIM_EXP_CTL_RELAXED_ORD_ENABLE 0x0010
 #definePCIM_EXP_CTL_MAX_PAYLOAD0x00e0
+#definePCIM_EXP_CTL_NOSNOOP_ENABLE 0x0800
 #definePCIM_EXP_CTL_MAX_READ_REQUEST   0x7000
 #definePCIR_EXPRESS_DEVICE_STA 0xa
+#definePCIM_EXP_STA_CORRECTABLE_ERROR  0x0001
+#definePCIM_EXP_STA_NON_FATAL_ERROR0x0002
+#definePCIM_EXP_STA_FATAL_ERROR0x0004
+#definePCIM_EXP_STA_UNSUPPORTED_REQ0x0008
+#definePCIM_EXP_STA_AUX_POWER  0x0010
+#definePCIM_EXP_STA_TRANSACTION_PND0x0020
 #definePCIR_EXPRESS_LINK_CAP   0xc
 #definePCIM_LINK_CAP_MAX_SPEED 0x000f
 #definePCIM_LINK_CAP_MAX_WIDTH 0x03f0
___
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: r205285 - stable/7/sys/dev/bge

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 18:38:53 2010
New Revision: 205285
URL: http://svn.freebsd.org/changeset/base/205285

Log:
  MFC r202821-202822.
  
  r202821:
Fix a long standing ASF heartbeat sending bug. The initial
implementation of heartbeat interval was 2 but there was typo which
caused the heartbeat is sent approximately every 5 seconds. This
caused unintended controller reset by firmware because firmware
thought OS was crashed.
  
Submitted by:   Floris Bos < info <> je-eigen-domein dot nl >
Tested by:  Andrzej Tobola < ato <> iem dot pw dot edu dot pl >
  
  r202822:
Use new handshake command for BCM5750 or new controllers.

Modified:
  stable/7/sys/dev/bge/if_bge.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/bge/if_bge.c
==
--- stable/7/sys/dev/bge/if_bge.c   Thu Mar 18 18:35:28 2010
(r205284)
+++ stable/7/sys/dev/bge/if_bge.c   Thu Mar 18 18:38:53 2010
(r205285)
@@ -2744,9 +2744,8 @@ bge_attach(device_t dev)
& BGE_HWCFG_ASF) {
sc->bge_asf_mode |= ASF_ENABLE;
sc->bge_asf_mode |= ASF_STACKUP;
-   if (sc->bge_asicrev == BGE_ASICREV_BCM5750) {
+   if (BGE_IS_575X_PLUS(sc))
sc->bge_asf_mode |= ASF_NEW_HANDSHAKE;
-   }
}
}
 
@@ -3673,7 +3672,7 @@ bge_asf_driver_up(struct bge_softc *sc)
if (sc->bge_asf_count)
sc->bge_asf_count --;
else {
-   sc->bge_asf_count = 5;
+   sc->bge_asf_count = 2;
bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW,
BGE_FW_DRV_ALIVE);
bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r205284 - stable/8/sys/dev/bge

2010-03-18 Thread Pyun YongHyeon
Author: yongari
Date: Thu Mar 18 18:35:28 2010
New Revision: 205284
URL: http://svn.freebsd.org/changeset/base/205284

Log:
  MFC r202821-202822.
  
  r202821:
Fix a long standing ASF heartbeat sending bug. The initial
implementation of heartbeat interval was 2 but there was typo which
caused the heartbeat is sent approximately every 5 seconds. This
caused unintended controller reset by firmware because firmware
thought OS was crashed.
  
Submitted by:   Floris Bos < info <> je-eigen-domein dot nl >
Tested by:  Andrzej Tobola < ato <> iem dot pw dot edu dot pl >
  
  r202822:
Use new handshake command for BCM5750 or new controllers.

Modified:
  stable/8/sys/dev/bge/if_bge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/bge/if_bge.c
==
--- stable/8/sys/dev/bge/if_bge.c   Thu Mar 18 17:00:44 2010
(r205283)
+++ stable/8/sys/dev/bge/if_bge.c   Thu Mar 18 18:35:28 2010
(r205284)
@@ -2744,9 +2744,8 @@ bge_attach(device_t dev)
& BGE_HWCFG_ASF) {
sc->bge_asf_mode |= ASF_ENABLE;
sc->bge_asf_mode |= ASF_STACKUP;
-   if (sc->bge_asicrev == BGE_ASICREV_BCM5750) {
+   if (BGE_IS_575X_PLUS(sc))
sc->bge_asf_mode |= ASF_NEW_HANDSHAKE;
-   }
}
}
 
@@ -3677,7 +3676,7 @@ bge_asf_driver_up(struct bge_softc *sc)
if (sc->bge_asf_count)
sc->bge_asf_count --;
else {
-   sc->bge_asf_count = 5;
+   sc->bge_asf_count = 2;
bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW,
BGE_FW_DRV_ALIVE);
bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r205283 - in stable/8/sys: dev/cxgb dev/e1000 dev/ixgbe dev/mxge net

2010-03-18 Thread Max Laier
Author: mlaier
Date: Thu Mar 18 17:00:44 2010
New Revision: 205283
URL: http://svn.freebsd.org/changeset/base/205283

Log:
  MFC r203834 and r205197: Make ALTQ work for drbr consumers.

Modified:
  stable/8/sys/dev/cxgb/cxgb_sge.c
  stable/8/sys/dev/e1000/if_em.c
  stable/8/sys/dev/e1000/if_igb.c
  stable/8/sys/dev/ixgbe/ixgbe.c
  stable/8/sys/dev/mxge/if_mxge.c
  stable/8/sys/net/if_var.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/cxgb/cxgb_sge.c
==
--- stable/8/sys/dev/cxgb/cxgb_sge.cThu Mar 18 16:55:47 2010
(r205282)
+++ stable/8/sys/dev/cxgb/cxgb_sge.cThu Mar 18 17:00:44 2010
(r205283)
@@ -228,6 +228,8 @@ static uint8_t flit_desc_map[] = {
 #defineTXQ_LOCK(qs)mtx_lock(&(qs)->lock)   
 #defineTXQ_UNLOCK(qs)  mtx_unlock(&(qs)->lock) 
 #defineTXQ_RING_EMPTY(qs)  drbr_empty((qs)->port->ifp, 
(qs)->txq[TXQ_ETH].txq_mr)
+#defineTXQ_RING_NEEDS_ENQUEUE(qs)  
\
+   drbr_needs_enqueue((qs)->port->ifp, (qs)->txq[TXQ_ETH].txq_mr)
 #defineTXQ_RING_FLUSH(qs)  drbr_flush((qs)->port->ifp, 
(qs)->txq[TXQ_ETH].txq_mr)
 #defineTXQ_RING_DEQUEUE_COND(qs, func, arg)
\
drbr_dequeue_cond((qs)->port->ifp, (qs)->txq[TXQ_ETH].txq_mr, func, arg)
@@ -1712,7 +1714,7 @@ cxgb_transmit_locked(struct ifnet *ifp, 
 * - there is space in hardware transmit queue 
 */
if (check_pkt_coalesce(qs) == 0 &&
-   TXQ_RING_EMPTY(qs) && avail > 4) {
+   !TXQ_RING_NEEDS_ENQUEUE(qs) && avail > 4) {
if (t3_encap(qs, &m)) {
if (m != NULL &&
(error = drbr_enqueue(ifp, br, m)) != 0) 

Modified: stable/8/sys/dev/e1000/if_em.c
==
--- stable/8/sys/dev/e1000/if_em.c  Thu Mar 18 16:55:47 2010
(r205282)
+++ stable/8/sys/dev/e1000/if_em.c  Thu Mar 18 17:00:44 2010
(r205283)
@@ -1032,7 +1032,7 @@ em_mq_start_locked(struct ifnet *ifp, st
|| (!adapter->link_active)) {
error = drbr_enqueue(ifp, adapter->br, m);
return (error);
-   } else if (drbr_empty(ifp, adapter->br) &&
+   } else if (!drbr_needs_enqueue(ifp, adapter->br) &&
(adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) {
if ((error = em_xmit(adapter, &m)) != 0) {
if (m != NULL)

Modified: stable/8/sys/dev/e1000/if_igb.c
==
--- stable/8/sys/dev/e1000/if_igb.c Thu Mar 18 16:55:47 2010
(r205282)
+++ stable/8/sys/dev/e1000/if_igb.c Thu Mar 18 17:00:44 2010
(r205283)
@@ -853,7 +853,7 @@ igb_mq_start_locked(struct ifnet *ifp, s
goto process;
 
/* If nothing queued go right to xmit */
-   if (drbr_empty(ifp, txr->br)) {
+   if (!drbr_needs_enqueue(ifp, txr->br)) {
if ((err = igb_xmit(txr, &m)) != 0) {
if (m != NULL)
err = drbr_enqueue(ifp, txr->br, m);

Modified: stable/8/sys/dev/ixgbe/ixgbe.c
==
--- stable/8/sys/dev/ixgbe/ixgbe.c  Thu Mar 18 16:55:47 2010
(r205282)
+++ stable/8/sys/dev/ixgbe/ixgbe.c  Thu Mar 18 17:00:44 2010
(r205283)
@@ -768,7 +768,7 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
goto process;
 
/* If nothing queued go right to xmit */
-   if (drbr_empty(ifp, txr->br)) {
+   if (!drbr_needs_enqueue(ifp, txr->br)) {
if (ixgbe_xmit(txr, &m)) {
if (m && (err = drbr_enqueue(ifp, txr->br, m)) != 0)
 return (err);

Modified: stable/8/sys/dev/mxge/if_mxge.c
==
--- stable/8/sys/dev/mxge/if_mxge.c Thu Mar 18 16:55:47 2010
(r205282)
+++ stable/8/sys/dev/mxge/if_mxge.c Thu Mar 18 17:00:44 2010
(r205283)
@@ -2249,7 +2249,7 @@ mxge_transmit_locked(struct mxge_slice_s
return (err);
}
 
-   if (drbr_empty(ifp, tx->br) &&
+   if (!drbr_needs_enqueue(ifp, tx->br) &&
((tx->mask - (tx->req - tx->done)) > tx->max_desc)) {
/* let BPF see it */
BPF_MTAP(ifp, m);

Modified: stable/8/sys/net/if_var.h
==
--- stable/8/sys/net/if_

svn commit: r205282 - stable/7/sys/net80211

2010-03-18 Thread Rui Paulo
Author: rpaulo
Date: Thu Mar 18 16:55:47 2010
New Revision: 205282
URL: http://svn.freebsd.org/changeset/base/205282

Log:
  Fix HTCAP's SM power save bits to match the ones in HEAD.
  
  PR:   144476
  Submitted by: Alexander Egorenkov 

Modified:
  stable/7/sys/net80211/ieee80211.h

Modified: stable/7/sys/net80211/ieee80211.h
==
--- stable/7/sys/net80211/ieee80211.h   Thu Mar 18 15:28:17 2010
(r205281)
+++ stable/7/sys/net80211/ieee80211.h   Thu Mar 18 16:55:47 2010
(r205282)
@@ -531,10 +531,10 @@ struct ieee80211_ie_htcap {
 #defineIEEE80211_HTCAP_LDPC0x0001  /* LDPC supported */
 #defineIEEE80211_HTCAP_CHWIDTH40   0x0002  /* 20/40 supported */
 #defineIEEE80211_HTCAP_SMPS0x000c  /* SM Power Save mode */
-#defineIEEE80211_HTCAP_SMPS_OFF0x  /* none (static mode) */
+#defineIEEE80211_HTCAP_SMPS_OFF0x000c  /* disabled */
 #defineIEEE80211_HTCAP_SMPS_DYNAMIC0x0004  /* send RTS first */
 /* NB: SMPS value 2 is reserved */
-#defineIEEE80211_HTCAP_SMPS_ENA0x000c  /* enabled */
+#defineIEEE80211_HTCAP_SMPS_ENA0x  /* enabled (static 
mode) */
 #defineIEEE80211_HTCAP_GREENFIELD  0x0010  /* Greenfield supported 
*/
 #defineIEEE80211_HTCAP_SHORTGI20   0x0020  /* Short GI in 20MHz */
 #defineIEEE80211_HTCAP_SHORTGI40   0x0040  /* Short GI in 40MHz */
___
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: r205281 - head/sys/net80211

2010-03-18 Thread Rui Paulo
Author: rpaulo
Date: Thu Mar 18 15:28:17 2010
New Revision: 205281
URL: http://svn.freebsd.org/changeset/base/205281

Log:
  Unbreak build by removing a code bit that is only related to other code
  in my branch.

Modified:
  head/sys/net80211/ieee80211_ht.c

Modified: head/sys/net80211/ieee80211_ht.c
==
--- head/sys/net80211/ieee80211_ht.cThu Mar 18 14:54:31 2010
(r205280)
+++ head/sys/net80211/ieee80211_ht.cThu Mar 18 15:28:17 2010
(r205281)
@@ -288,7 +288,7 @@ ht_announce(struct ieee80211com *ic, int
const struct ieee80211_htrateset *rs)
 {
struct ifnet *ifp = ic->ic_ifp;
-   int maxmcs = ic->ic_rxstream * 8;
+   int maxmcs = 2 * 8;
const char *modestr = ieee80211_phymode_name[mode];

KASSERT(maxmcs <= 16, ("maxmcs > 16"));
___
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: r205280 - head/usr.sbin/bsnmpd/modules/snmp_pf

2010-03-18 Thread Shteryana Shopova
Author: syrinx
Date: Thu Mar 18 14:54:31 2010
New Revision: 205280
URL: http://svn.freebsd.org/changeset/base/205280

Log:
  Add support for retrieving labeled pf filter rule counters.
  
  PR:   bin/132847
  Submitted by: Szalai Andras 

Modified:
  head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
  head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
  head/usr.sbin/bsnmpd/modules/snmp_pf/pf_tree.def

Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt
==
--- head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt Thu Mar 18 
13:11:43 2010(r205279)
+++ head/usr.sbin/bsnmpd/modules/snmp_pf/BEGEMOT-PF-MIB.txt Thu Mar 18 
14:54:31 2010(r205280)
@@ -21,7 +21,7 @@ IMPORTS
FROM BEGEMOT-MIB;
 
 begemotPf MODULE-IDENTITY
-LAST-UPDATED "20050124Z"
+LAST-UPDATED "20100317Z"
 ORGANIZATION "NixSys BVBA"
 CONTACT-INFO
"   Philip Paeps
@@ -34,6 +34,13 @@ begemotPf MODULE-IDENTITY
 E-Mail:phi...@freebsd.org"
 DESCRIPTION
"The Begemot MIB for the pf packet filter."
+REVISION   "20091205Z"
+DESCRIPTION
+   "Added support for retrieving counters of labeled
+   pf filter rules via pfLabelspfLabels subtree."
+REVISION   "20050124Z"
+DESCRIPTION
+   "Initial revision."
 
 ::= { begemot 200 }
 
@@ -51,6 +58,7 @@ pfLogInterfaceOBJECT IDENTIFIER ::= { 
 pfInterfaces   OBJECT IDENTIFIER ::= { begemotPfObjects 8 }
 pfTables   OBJECT IDENTIFIER ::= { begemotPfObjects 9 }
 pfAltq OBJECT IDENTIFIER ::= { begemotPfObjects 10 }
+pfLabels   OBJECT IDENTIFIER ::= { begemotPfObjects 11 }
 
 -- --
 
@@ -1227,4 +1235,96 @@ pfAltqQueueLimit OBJECT-TYPE
"Maximum number of packets in the queue."
 ::= { pfAltqQueueEntry 7 }
 
+pfLabelsLblNumber OBJECT-TYPE
+SYNTAX Integer32
+MAX-ACCESS read-only
+STATUS current
+DESCRIPTION
+   "The number of labeled filter rules on this system."
+::= { pfLabels 1 }
+
+pfLabelsLblTable OBJECT-TYPE
+SYNTAX SEQUENCE OF PfLabelsLblEntry
+MAX-ACCESS not-accessible
+STATUS current
+DESCRIPTION
+   "Table of filter rules, index on pfLabelsLblIndex."
+::= { pfLabels 2 }
+
+pfLabelsLblEntry OBJECT-TYPE
+SYNTAX PfLabelsLblEntry
+MAX-ACCESS not-accessible
+STATUS current
+DESCRIPTION
+   "Any entry in the pfLabelsLblTable containing information
+   about a particular filter rule on the system."
+INDEX  { pfLabelsLblIndex }
+::= { pfLabelsLblTable 1 }
+
+PfLabelsLblEntry ::= SEQUENCE {
+pfLabelsLblIndex   Integer32,
+pfLabelsLblNameOCTET STRING,
+pfLabelsLblEvals   Counter64,
+pfLabelsLblBytesIn Counter64,
+pfLabelsLblBytesOutCounter64,
+pfLabelsLblPktsIn  Counter64,
+pfLabelsLblPktsOut Counter64
+}
+
+pfLabelsLblIndex OBJECT-TYPE
+SYNTAX Integer32 (1..2147483647)
+MAX-ACCESS not-accessible
+STATUS current
+DESCRIPTION
+   "A unique value, greater than zero, for each label."
+::= { pfLabelsLblEntry 1 } 
+
+pfLabelsLblName OBJECT-TYPE
+SYNTAX OCTET STRING
+MAX-ACCESS read-only
+STATUS current
+DESCRIPTION
+   "The name of the rule label."
+::= { pfLabelsLblEntry 2 }
+
+pfLabelsLblEvals OBJECT-TYPE
+SYNTAX Counter64
+MAX-ACCESS read-only
+STATUS current
+DESCRIPTION
+   "The number of rule evaluations."
+::= { pfLabelsLblEntry 3 }
+
+pfLabelsLblBytesIn OBJECT-TYPE
+SYNTAX Counter64
+MAX-ACCESS read-only
+STATUS current
+DESCRIPTION
+   "The number of incoming bytes matched by the rule."
+::= { pfLabelsLblEntry 4 }
+
+pfLabelsLblBytesOut OBJECT-TYPE
+SYNTAX Counter64
+MAX-ACCESS read-only
+STATUS current
+DESCRIPTION
+   "The number of outgoing bytes matched by the rule."
+::= { pfLabelsLblEntry 5 }
+
+pfLabelsLblPktsIn OBJECT-TYPE
+SYNTAX Counter64
+MAX-ACCESS read-only
+STATUS current
+DESCRIPTION
+   "The number of incoming packets matched by the rule."
+::= { pfLabelsLblEntry 6 }
+
+pfLabelsLblPktsOut OBJECT-TYPE
+SYNTAX Counter64
+MAX-ACCESS read-only
+STATUS current
+DESCRIPTION
+   "The number of outgoing packets matched by the rule."
+::= { pfLabelsLblEntry 7 }
+
 END

Modified: head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c
==
--- head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c  Thu Mar 18 13:11:43 
2010(r205279)
+++ head/usr.sbin/bsnmpd/modules/snmp_pf/pf_snmp.c  Thu Mar 18 14:54:31 
2010(r205280)

Re: svn commit: r205165 - head/lib/libc/gen

2010-03-18 Thread Dag-Erling Smørgrav
Bruce Evans  writes:
> The above is missing purging of stdout and stderr.  Someone may have
> freopen()ed these in "rw" mode.

If you did that, you're on your own...  :)

I didn't notice that fpurge() is actually a superset of fflush().

> Callers of daemon() shouldn't do this,
> but if fpurge(NULL) worked right then it would be easy to purge stdout
> and stderr when purging stdin and all other streams (if this is what
> we want to do).

I agree that fpurge(NULL) would be nice, but nothing outside the base
system would use it, since it wouldn't work on older or non-FreeBSD
systems - and I don't mean "wouldn't work" as in "would have no effect
whatsoever", I mean "wouldn't work" as in "immediate SIGSEGV" since our
fpurge() does not check for fp == NULL.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r205165 - head/lib/libc/gen

2010-03-18 Thread Bruce Evans

On Wed, 17 Mar 2010, [utf-8] Dag-Erling Sm??rgrav wrote:


Bruce Evans  writes:

Even if the child causes the flush, the content of stdout and stderr
is not flushed normally since it is redirected to /dev/null.  Unflushed
input in stdin is handled more brokenly: although stdin is redirected
to /dev/null, input on it can still be read via stdin's buffer.
Inheriting unflushed input on other streams is a feature (unless these
streams are open on fd's 0-2; then these streams will have the same
corruption as std* streams open on their normal fd's 0-2).


how about

Index: gen/daemon.c
===
--- gen/daemon.c(revision 204870)
+++ gen/daemon.c(working copy)
@@ -37,6 +37,7 @@
#include 
#include 
#include 
+#include 
#include 
#include 
#include 
@@ -81,6 +82,9 @@
(void)chdir("/");

if (!noclose && (fd = _open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
+   fpurge(stdin);
+   fflush(stdout);
+   fflush(stderr);
(void)_dup2(fd, STDIN_FILENO);
(void)_dup2(fd, STDOUT_FILENO);
(void)_dup2(fd, STDERR_FILENO);

?


That seems like a reasonable start.  I wanted to flush/purge all streams
but that is more dangerous of course.

I misread the man page about fflush(NULL) purging anything.  It is
only fpurge() that purges, but I didn't notice that fflush()'s man
page is also about fpurge().  fpurge() hasn't caught up with the 1980's
developments that made fflush(NULL) operate on all streams, so there
is no way to purge all streams without using stdio internals (_fwalk()).

The above is missing purging of stdout and stderr.  Someone may have
freopen()ed these in "rw" mode.  Callers of daemon() shouldn't do this,
but if fpurge(NULL) worked right then it would be easy to purge stdout
and stderr when purging stdin and all other streams (if this is what
we want to do).

Bruce___
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: r205279 - head/sys/geom/gate

2010-03-18 Thread Pawel Jakub Dawidek
Author: pjd
Date: Thu Mar 18 13:11:43 2010
New Revision: 205279
URL: http://svn.freebsd.org/changeset/base/205279

Log:
  Simplify loops.

Modified:
  head/sys/geom/gate/g_gate.c

Modified: head/sys/geom/gate/g_gate.c
==
--- head/sys/geom/gate/g_gate.c Thu Mar 18 11:53:32 2010(r205278)
+++ head/sys/geom/gate/g_gate.c Thu Mar 18 13:11:43 2010(r205279)
@@ -109,27 +109,17 @@ g_gate_destroy(struct g_gate_softc *sc, 
g_orphan_provider(pp, ENXIO);
callout_drain(&sc->sc_callout);
mtx_lock(&sc->sc_queue_mtx);
-   for (;;) {
-   bp = bioq_first(&sc->sc_inqueue);
-   if (bp != NULL) {
-   bioq_remove(&sc->sc_inqueue, bp);
-   sc->sc_queue_count--;
-   G_GATE_LOGREQ(1, bp, "Request canceled.");
-   g_io_deliver(bp, ENXIO);
-   } else {
-   break;
-   }
+   while ((bp = bioq_first(&sc->sc_inqueue)) != NULL) {
+   bioq_remove(&sc->sc_inqueue, bp);
+   sc->sc_queue_count--;
+   G_GATE_LOGREQ(1, bp, "Request canceled.");
+   g_io_deliver(bp, ENXIO);
}
-   for (;;) {
-   bp = bioq_first(&sc->sc_outqueue);
-   if (bp != NULL) {
-   bioq_remove(&sc->sc_outqueue, bp);
-   sc->sc_queue_count--;
-   G_GATE_LOGREQ(1, bp, "Request canceled.");
-   g_io_deliver(bp, ENXIO);
-   } else {
-   break;
-   }
+   while ((bp = bioq_first(&sc->sc_outqueue)) != NULL) {
+   bioq_remove(&sc->sc_outqueue, bp);
+   sc->sc_queue_count--;
+   G_GATE_LOGREQ(1, bp, "Request canceled.");
+   g_io_deliver(bp, ENXIO);
}
mtx_unlock(&sc->sc_queue_mtx);
g_topology_unlock();
___
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: r205278 - stable/8/sys/arm/arm

2010-03-18 Thread Rafal Jaworowski
Author: raj
Date: Thu Mar 18 11:53:32 2010
New Revision: 205278
URL: http://svn.freebsd.org/changeset/base/205278

Log:
  MFC r205027
  
  Let detailed info about CPU features print on Marvell Sheeva CPU as well.
  
  Provide missing entry in the cpu_classes[].
  
  Reported by:  Maks Verver

Modified:
  stable/8/sys/arm/arm/identcpu.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/arm/arm/identcpu.c
==
--- stable/8/sys/arm/arm/identcpu.c Thu Mar 18 11:06:38 2010
(r205277)
+++ stable/8/sys/arm/arm/identcpu.c Thu Mar 18 11:53:32 2010
(r205278)
@@ -343,6 +343,7 @@ const struct cpu_classtab cpu_classes[] 
{ "SA-1",   "CPU_SA110" },  /* CPU_CLASS_SA1 */
{ "XScale", "CPU_XSCALE_..." }, /* CPU_CLASS_XSCALE */
{ "ARM11J", "CPU_ARM11" },  /* CPU_CLASS_ARM11J */
+   { "Marvell","CPU_MARVELL" },/* CPU_CLASS_MARVELL */
 };
 
 /*
@@ -418,6 +419,7 @@ identify_arm_cpu(void)
case CPU_CLASS_SA1:
case CPU_CLASS_XSCALE:
case CPU_CLASS_ARM11J:
+   case CPU_CLASS_MARVELL:
if ((ctrl & CPU_CONTROL_DC_ENABLE) == 0)
printf(" DC disabled");
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: r205277 - head/sys/net80211

2010-03-18 Thread Rui Paulo
Author: rpaulo
Date: Thu Mar 18 11:06:38 2010
New Revision: 205277
URL: http://svn.freebsd.org/changeset/base/205277

Log:
  Fix a couple of bugs with 802.11n:
  o Process the BAR frame on the adhoc, mesh and sta modes
  o Fix the format of the ADDBA reply frame
  o Fix references to the spec section numbers
  
  Also, print the all the MCS rates in bootverbose.
  
  Sponsored by: iXsystems, Inc.
  Obtained from://depot/user/rpaulo/80211n/...

Modified:
  head/sys/net80211/ieee80211_adhoc.c
  head/sys/net80211/ieee80211_ht.c
  head/sys/net80211/ieee80211_mesh.c
  head/sys/net80211/ieee80211_sta.c

Modified: head/sys/net80211/ieee80211_adhoc.c
==
--- head/sys/net80211/ieee80211_adhoc.c Thu Mar 18 09:09:59 2010
(r205276)
+++ head/sys/net80211/ieee80211_adhoc.c Thu Mar 18 11:06:38 2010
(r205277)
@@ -922,6 +922,12 @@ ahdemo_recv_mgmt(struct ieee80211_node *
 }
 
 static void
-adhoc_recv_ctl(struct ieee80211_node *ni, struct mbuf *m0, int subtype)
+adhoc_recv_ctl(struct ieee80211_node *ni, struct mbuf *m, int subtype)
 {
+
+   switch (subtype) {
+   case IEEE80211_FC0_SUBTYPE_BAR:
+   ieee80211_recv_bar(ni, m);
+   break;
+   }
 }

Modified: head/sys/net80211/ieee80211_ht.c
==
--- head/sys/net80211/ieee80211_ht.cThu Mar 18 09:09:59 2010
(r205276)
+++ head/sys/net80211/ieee80211_ht.cThu Mar 18 11:06:38 2010
(r205277)
@@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$");
 #defineSM(_v, _f)  (((_v) << _f##_S) & _f)
 
 const struct ieee80211_mcs_rates ieee80211_htrates[16] = {
+/*  20Mhz  SGI 40Mhz  SGI */
{  13,  14,  27,  30 }, /* MCS 0 */
{  26,  29,  54,  60 }, /* MCS 1 */
{  39,  43,  81,  90 }, /* MCS 2 */
@@ -248,25 +249,60 @@ ieee80211_ht_vdetach(struct ieee80211vap
 }
 
 static void
-ht_announce(struct ieee80211com *ic, int mode,
-   const struct ieee80211_htrateset *rs)
+ht_rateprint(struct ieee80211com *ic, int mode,
+   const struct ieee80211_htrateset *rs, int maxmcs, int ratetype)
 {
-   struct ifnet *ifp = ic->ic_ifp;
int i, rate, mword;
 
-   if_printf(ifp, "%s MCS: ", ieee80211_phymode_name[mode]);
-   for (i = 0; i < rs->rs_nrates; i++) {
+   for (i = 0; i < rs->rs_nrates && i < maxmcs; i++) {
mword = ieee80211_rate2media(ic,
rs->rs_rates[i] | IEEE80211_RATE_MCS, mode);
if (IFM_SUBTYPE(mword) != IFM_IEEE80211_MCS)
continue;
-   rate = ieee80211_htrates[rs->rs_rates[i]].ht40_rate_400ns;
+   switch (ratetype) {
+   case 0:
+   rate = ieee80211_htrates[
+   rs->rs_rates[i]].ht20_rate_800ns;
+   break;
+   case 1:
+   rate = ieee80211_htrates[
+   rs->rs_rates[i]].ht20_rate_400ns;
+   break;
+   case 2:
+   rate = ieee80211_htrates[
+   rs->rs_rates[i]].ht40_rate_800ns;
+   break;
+   default:
+   rate = ieee80211_htrates[
+   rs->rs_rates[i]].ht40_rate_400ns;
+   break;
+   }
printf("%s%d%sMbps", (i != 0 ? " " : ""),
rate / 2, ((rate & 0x1) != 0 ? ".5" : ""));
}
printf("\n");
 }
 
+static void
+ht_announce(struct ieee80211com *ic, int mode,
+   const struct ieee80211_htrateset *rs)
+{
+   struct ifnet *ifp = ic->ic_ifp;
+   int maxmcs = ic->ic_rxstream * 8;
+   const char *modestr = ieee80211_phymode_name[mode];
+   
+   KASSERT(maxmcs <= 16, ("maxmcs > 16"));
+   if_printf(ifp, "%d MCS rates\n", maxmcs);
+   if_printf(ifp, "%s MCS 20Mhz: ", modestr);
+   ht_rateprint(ic, mode, rs, maxmcs, 0);
+   if_printf(ifp, "%s MCS 20Mhz SGI: ", modestr);
+   ht_rateprint(ic, mode, rs, maxmcs, 1);
+   if_printf(ifp, "%s MCS 40Mhz: ", modestr);
+   ht_rateprint(ic, mode, rs, maxmcs, 2);
+   if_printf(ifp, "%s MCS 40Mhz SGI: ", modestr);
+   ht_rateprint(ic, mode, rs, maxmcs, 3);
+}
+
 void
 ieee80211_ht_announce(struct ieee80211com *ic)
 {
@@ -396,6 +432,7 @@ ampdu_rx_start(struct ieee80211_node *ni
 static void
 ampdu_rx_stop(struct ieee80211_node *ni, struct ieee80211_rx_ampdu *rap)
 {
+
ampdu_rx_purge(rap);
rap->rxa_flags &= ~(IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND);
 }
@@ -656,7 +693,7 @@ again:
if (off < rap->rxa_wnd) {
/*
 * Common case (hopefully): in the BA window.
-* Sec 9.10.7.6 a) (D2.04 p.118 line 47)
+* Sec 9.10.7.6.2 a) (p.137)
 */
 #ifdef IEEE80211_AMPDU_AGE
/* 
@

Re: svn commit: r205266 - head/sys/vm

2010-03-18 Thread Bjoern A. Zeeb

On Wed, 17 Mar 2010, Kip Macy wrote:


Author: kmacy
Date: Wed Mar 17 21:18:28 2010
New Revision: 205266
URL: http://svn.freebsd.org/changeset/base/205266

Log:
 Cache line align various structures and move volatile counters to
 not share a cache line with (mostly) immutable state

 Reviewed by:   jeff@
 MFC after: 7 days



I think that this would require a rebuild of some user space parts
query uma statistics and in general, though we try to hide everything
with accessor functions, there might be modules directly accessing
uma_zone_t * fileds.  I think this at least needs an entry in
UPDATING, if not a __FreeBSD_version bump.





Modified:
 head/sys/vm/uma_int.h

Modified: head/sys/vm/uma_int.h
==
--- head/sys/vm/uma_int.h   Wed Mar 17 21:11:48 2010(r205265)
+++ head/sys/vm/uma_int.h   Wed Mar 17 21:18:28 2010(r205266)
@@ -160,6 +160,11 @@ struct uma_hash {
};

/*
+ * align field or structure to cache line
+ */
+#define UMA_ALIGN  __aligned(CACHE_LINE_SIZE)
+
+/*
 * Structures for per cpu queues.
 */

@@ -168,7 +173,7 @@ struct uma_bucket {
int16_t ub_cnt; /* Count of free items. */
int16_t ub_entries; /* Max items. */
void*ub_bucket[];   /* actual allocation storage */
-};
+} UMA_ALIGN;

typedef struct uma_bucket * uma_bucket_t;

@@ -177,7 +182,7 @@ struct uma_cache {
uma_bucket_tuc_allocbucket; /* Bucket to allocate from */
u_int64_t   uc_allocs;  /* Count of allocations */
u_int64_t   uc_frees;   /* Count of frees */
-};
+} UMA_ALIGN;

typedef struct uma_cache * uma_cache_t;

@@ -312,11 +317,12 @@ struct uma_zone {
uma_inituz_init;/* Initializer for each item */
uma_finiuz_fini;/* Discards memory */

-   u_int64_t   uz_allocs;  /* Total number of allocations */
-   u_int64_t   uz_frees;   /* Total number of frees */
-   u_int64_t   uz_fails;   /* Total number of alloc failures */
u_int32_t   uz_flags;   /* Flags inherited from kegs */
u_int32_t   uz_size;/* Size inherited from kegs */
+
+   u_int64_t   uz_allocs UMA_ALIGN; /* Total number of allocations */
+   u_int64_t   uz_frees;   /* Total number of frees */
+   u_int64_t   uz_fails;   /* Total number of alloc failures */
uint16_tuz_fills;   /* Outstanding bucket fills */
uint16_tuz_count;   /* Highest value ub_ptr can have */

@@ -324,7 +330,7 @@ struct uma_zone {
 * This HAS to be the last item because we adjust the zone size
 * based on NCPU and then allocate the space for the zones.
 */
-   struct uma_cacheuz_cpu[1];  /* Per cpu caches */
+   struct uma_cacheuz_cpu[1] UMA_ALIGN; /* Per cpu caches */
};

/*
@@ -341,6 +347,8 @@ struct uma_zone {
#define UMA_ZFLAG_INHERIT   (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY | \
UMA_ZFLAG_BUCKET)

+#undef UMA_ALIGN
+
#ifdef _KERNEL
/* Internal prototypes */
static __inline uma_slab_t hash_sfind(struct uma_hash *hash, u_int8_t *data);



--
Bjoern A. Zeeb It will not break if you know what you are doing.
___
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: r205276 - head/sys/net

2010-03-18 Thread Bjoern A. Zeeb
Author: bz
Date: Thu Mar 18 09:09:59 2010
New Revision: 205276
URL: http://svn.freebsd.org/changeset/base/205276

Log:
  Add ddb support to the "new" link layer code ("new-arp"):
   - show all lltables [1] (optional flag to also show the llentries as well)
   - show lltable 
   - show llentry 
  
  MFC after:6 days

Modified:
  head/sys/net/if_llatbl.c

Modified: head/sys/net/if_llatbl.c
==
--- head/sys/net/if_llatbl.cThu Mar 18 07:35:20 2010(r205275)
+++ head/sys/net/if_llatbl.cThu Mar 18 09:09:59 2010(r205276)
@@ -27,6 +27,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_ddb.h"
 #include "opt_inet.h"
 #include "opt_inet6.h"
 
@@ -42,6 +43,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef DDB
+#include 
+#endif
+
 #include 
 
 #include 
@@ -382,3 +387,134 @@ vnet_lltable_init()
 VNET_SYSINIT(vnet_lltable_init, SI_SUB_PSEUDO, SI_ORDER_FIRST,
 vnet_lltable_init, NULL);
 
+#ifdef DDB
+struct llentry_sa {
+   struct llentry  base;
+   struct sockaddr l3_addr;
+};
+
+static void
+llatbl_lle_show(struct llentry_sa *la)
+{
+   struct llentry *lle;
+   uint8_t octet[6];
+
+   lle = &la->base;
+   db_printf("lle=%p\n", lle);
+   db_printf(" lle_next=%p\n", lle->lle_next.le_next);
+   db_printf(" lle_lock=%p\n", &lle->lle_lock);
+   db_printf(" lle_tbl=%p\n", lle->lle_tbl);
+   db_printf(" lle_head=%p\n", lle->lle_head);
+   db_printf(" la_hold=%p\n", lle->la_hold);
+   db_printf(" la_expire=%ju\n", (uintmax_t)lle->la_expire);
+   db_printf(" la_flags=0x%04x\n", lle->la_flags);
+   db_printf(" la_asked=%u\n", lle->la_asked);
+   db_printf(" la_preempt=%u\n", lle->la_preempt);
+   db_printf(" ln_byhint=%u\n", lle->ln_byhint);
+   db_printf(" ln_state=%d\n", lle->ln_state);
+   db_printf(" ln_router=%u\n", lle->ln_router);
+   db_printf(" ln_ntick=%ju\n", (uintmax_t)lle->ln_ntick);
+   db_printf(" lle_refcnt=%d\n", lle->lle_refcnt);
+   bcopy(&lle->ll_addr.mac16, octet, sizeof(octet));
+   db_printf(" ll_addr=%02x:%02x:%02x:%02x:%02x:%02x\n",
+   octet[0], octet[1], octet[2], octet[3], octet[4], octet[5]);
+   db_printf(" la_timer=%p\n", &lle->la_timer);
+
+   switch (la->l3_addr.sa_family) {
+#ifdef INET
+   case AF_INET:
+   {
+   struct sockaddr_in *sin;
+   char l3s[INET_ADDRSTRLEN];
+
+   sin = (struct sockaddr_in *)&la->l3_addr;
+   inet_ntoa_r(sin->sin_addr, l3s);
+   db_printf(" l3_addr=%s\n", l3s);
+   break;
+   }
+#endif
+#ifdef INET6
+   case AF_INET6:
+   {
+   struct sockaddr_in6 *sin6;
+   char l3s[INET6_ADDRSTRLEN];
+
+   sin6 = (struct sockaddr_in6 *)&la->l3_addr;
+   ip6_sprintf(l3s, &sin6->sin6_addr);
+   db_printf(" l3_addr=%s\n", l3s);
+   break;
+   }
+#endif
+   default:
+   db_printf(" l3_addr=N/A (af=%d)\n", la->l3_addr.sa_family);
+   break;
+   }
+}
+
+DB_SHOW_COMMAND(llentry, db_show_llentry)
+{
+
+   if (!have_addr) {
+   db_printf("usage: show llentry \n");
+   return;
+   }
+
+   llatbl_lle_show((struct llentry_sa *)addr);
+}
+
+static void
+llatbl_llt_show(struct lltable *llt)
+{
+   int i;
+   struct llentry *lle;
+
+   db_printf("llt=%p llt_af=%d llt_ifp=%p\n",
+   llt, llt->llt_af, llt->llt_ifp);
+
+   for (i = 0; i < LLTBL_HASHTBL_SIZE; i++) {
+   LIST_FOREACH(lle, &llt->lle_head[i], lle_next) {
+
+   llatbl_lle_show((struct llentry_sa *)lle);
+   if (db_pager_quit)
+   return;
+   }
+   }
+}
+
+DB_SHOW_COMMAND(lltable, db_show_lltable)
+{
+
+   if (!have_addr) {
+   db_printf("usage: show lltable \n");
+   return;
+   }
+
+   llatbl_llt_show((struct lltable *)addr);
+}
+
+DB_SHOW_ALL_COMMAND(lltables, db_show_all_lltables)
+{
+   VNET_ITERATOR_DECL(vnet_iter);
+   struct lltable *llt;
+
+   VNET_FOREACH(vnet_iter) {
+   CURVNET_SET_QUIET(vnet_iter);
+#ifdef VIMAGE
+   db_printf("vnet=%p\n", curvnet);
+#endif
+   SLIST_FOREACH(llt, &V_lltables, llt_link) {
+   db_printf("llt=%p llt_af=%d llt_ifp=%p(%s)\n",
+   llt, llt->llt_af, llt->llt_ifp,
+   (llt->llt_ifp != NULL) ?
+   llt->llt_ifp->if_xname : "?");
+   if (have_addr && addr != 0) /* verbose */
+   llatbl_llt_show(llt);
+   if (db_pager_quit) {
+   CURVNET_RESTORE();
+   return;
+   }
+   }

svn commit: r205275 - head/sys/dev/mii

2010-03-18 Thread Ed Schouten
Author: ed
Date: Thu Mar 18 07:35:20 2010
New Revision: 205275
URL: http://svn.freebsd.org/changeset/base/205275

Log:
  Remove an unneeded variable.
  
  Reported by:  tinderbox

Modified:
  head/sys/dev/mii/mii.c

Modified: head/sys/dev/mii/mii.c
==
--- head/sys/dev/mii/mii.c  Thu Mar 18 07:28:02 2010(r205274)
+++ head/sys/dev/mii/mii.c  Thu Mar 18 07:35:20 2010(r205275)
@@ -253,7 +253,6 @@ miibus_statchg(device_t dev)
 {
device_tparent;
struct mii_data *mii;
-   struct ifnet*ifp;
 
parent = device_get_parent(dev);
MIIBUS_STATCHG(parent);
___
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: r205274 - releng/7.3/release/doc/en_US.ISO8859-1/relnotes

2010-03-18 Thread Hiroki Sato
Author: hrs
Date: Thu Mar 18 07:28:02 2010
New Revision: 205274
URL: http://svn.freebsd.org/changeset/base/205274

Log:
  Update relnotes for 7.3R (first round):
ddb(8) pager support for show_geom*,
deadlock involving malloc(3) and fork(2) fixed,
gptzfsboot added,
zfsboot # of fd increased,
hwpmc added,
s/k8temp/amdtemp/,
pci(4) improvement,
bge(4) panic on shutdown fixed,
cxgb upgraded,
fxp(4)+TSO IP length issue fixed,
nfe(4) improved,
nge(4) improved,
net.inet.ip.fw.default_to_accept added,
NFS client negative pathname lookup cache added,
vfs.flushbufqtarget added,
Bluetooth(3) HCI API support,
btpand(8) -d device name support,
chflags(1) -h bugfix,
cpuset -x option,
dhclient NUL-terminated text bugfix,
fdisk(8) size qualifiers support,
fetch(1) *_TIMEOUT and HTTPS parameters bugfix,
find(1) -L + -delete bugfix,
ktrace(1) new record for  sysctl,
fdopendir(3) added,
feature_present(3) added,
man(1) UTF-8 support,
mergemaster now passes -L to mtree(8),
newfs_msdos(8) non-CHS media support,
pkill now ignores itself and ancestors, -a option added,
ps -p option added,
pwd_mkdb -C now checks MAXLOGNAME,
rtld(1) LD_ELF_HINTS_PATH support,
sysinstall(8) comma-separated list of interfaces in netDev,
tzdata2009i,
sendmail 8.14.4, and
pkg_info(1) segfault fix.
  
  Approved by:  re (implicitly)

Modified:
  releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml

Modified: releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgml
==
--- releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgmlThu Mar 
18 00:27:17 2010(r205273)
+++ releng/7.3/release/doc/en_US.ISO8859-1/relnotes/article.sgmlThu Mar 
18 07:28:02 2010(r205274)
@@ -115,23 +115,95 @@
 
   Security Advisories
 
-  
+  Problems described in the following security advisories have
+   been fixed.  For more information, consult the individual
+   advisories available from
+   http://security.FreeBSD.org/";>.
+
+
 
 
 
   Kernel Changes
 
-  
+  The &man.ddb.8; subcommands for &man.geom.8; now supports
+   pagination.
+
+  &os; Linux emulation layer now supports robust futex, and
+   futex has been reimplemented by using &man.sx.9; lock.
+   Initial support of &man.ktr.4; tracing has also been
+   added.
+
+  A lock handling error has been fixed in interaction
+   between &man.malloc.3; implementation and threading library.
+   When a multi-threaded process calls the &man.fork.2; system
+   call in a thread and the &man.malloc.3; function in another
+   thread, it caused a deadlock in the child process.
 
   
Boot Loader Changes
 
-   
+   A new boot loader gptzfsboot, which
+ support GPT and ZFS has been added.
+
+   The boot loader zfsboot now supports
+ more than sevevn drives in the ZFS pools.
   
 
   
Hardware Support
 
+   The &man.hwpmc.4; driver for Hardware
+ Performance Monitoring Counter support has been added.  This
+ consists of the kernel driver, &man.pmc.3; interface
+ library, and userland utilities &man.pmcannotate.8;,
+ pmccontrol.8;, and &man.pmcstat.8;, and allows applications
+ to use hardware performance counters to gather performance
+ data about specific processes or for the system as a
+ whole.
+
+   The &man.k8temp.4; driver has been renamed with
+ &man.amdtemp.4;.  The new driver supports AMD K10 and K11 as
+ well as K8.
+
+   The &man.pci.4; subsystem now supports proxying of PCI
+ Express MSI/MSI-X (Message Signaled Interrupt) requests and
+ bus interrupt requests for child devices.  This allows child
+ devices to use MSI/MSI-X interrupts.
+
+   PCI Express memory-mapped configuration space access,
+ ACPI MCFG table support, and BAR (Base Address Register)
+ handling in the &man.pci.4; subsystem has been improved.
+ This is disabled by default and can be enabled by setting a
+ loader tunable hw.pci.mcfg to
+ 1.  This value can be queried via a
+ sysctl variable of the same name.
+

  Multimedia Support
 
@@ -141,16 +213,46 @@

  Network Interface Support
 
- 
-
+ A bug in the &man.bge.4; driver has been fixed.  It
+   caused a panic when a lot of traffic is being handled on
+   the interface while the system is shutting down.
+
+ The &man.cxgb.4; driver has been upgraded to the
+   latest version.  The firmware version is 7.1.0.
+
+ A bu