svn commit: r218548 - head/sys/dev/e1000

2011-02-11 Thread Bjoern A. Zeeb
Author: bz
Date: Fri Feb 11 09:58:38 2011
New Revision: 218548
URL: http://svn.freebsd.org/changeset/base/218548

Log:
  After r218530 export several functions which are no longer private to
  e1000_mac.c but part of the e1000_api.
  
  X-MFC with: 218530 by jfv

Modified:
  head/sys/dev/e1000/e1000_api.h
  head/sys/dev/e1000/e1000_mac.c

Modified: head/sys/dev/e1000/e1000_api.h
==
--- head/sys/dev/e1000/e1000_api.h  Fri Feb 11 07:46:54 2011
(r218547)
+++ head/sys/dev/e1000/e1000_api.h  Fri Feb 11 09:58:38 2011
(r218548)
@@ -120,6 +120,9 @@ s32  e1000_mng_write_cmd_header(struct e
 s32  e1000_mng_write_dhcp_info(struct e1000_hw * hw,
 u8 *buffer, u16 length);
 u32  e1000_translate_register_82542(u32 reg);
+s32  e1000_set_default_fc_generic(struct e1000_hw *hw);
+s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw);
+s32  e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);
 
 /*
  * TBI_ACCEPT macro definition:

Modified: head/sys/dev/e1000/e1000_mac.c
==
--- head/sys/dev/e1000/e1000_mac.c  Fri Feb 11 07:46:54 2011
(r218547)
+++ head/sys/dev/e1000/e1000_mac.c  Fri Feb 11 09:58:38 2011
(r218548)
@@ -34,9 +34,6 @@
 
 #include "e1000_api.h"
 
-static s32 e1000_set_default_fc_generic(struct e1000_hw *hw);
-static s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw);
-static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);
 static s32 e1000_validate_mdi_setting_generic(struct e1000_hw *hw);
 static void e1000_set_lan_id_multi_port_pcie(struct e1000_hw *hw);
 
@@ -1097,7 +1094,7 @@ void e1000_config_collision_dist_generic
  *  Polls for link up by reading the status register, if link fails to come
  *  up with auto-negotiation, then the link is forced if a signal is detected.
  **/
-static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw)
+s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw)
 {
struct e1000_mac_info *mac = &hw->mac;
u32 i, status;
@@ -1149,7 +1146,7 @@ out:
  *  Write the flow control settings to the Transmit Config Word Register (TXCW)
  *  base on the flow control settings in e1000_mac_info.
  **/
-static s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw)
+s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw)
 {
struct e1000_mac_info *mac = &hw->mac;
u32 txcw;
@@ -1264,7 +1261,7 @@ s32 e1000_set_fc_watermarks_generic(stru
  *  Read the EEPROM for the default values for flow control and store the
  *  values.
  **/
-static s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
+s32 e1000_set_default_fc_generic(struct e1000_hw *hw)
 {
s32 ret_val = E1000_SUCCESS;
u16 nvm_data;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218550 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2011-02-11 Thread Konstantin Belousov
Author: kib
Date: Fri Feb 11 10:46:15 2011
New Revision: 218550
URL: http://svn.freebsd.org/changeset/base/218550

Log:
  For UIO_NOCOPY case of reading request on zfs vnode, which has vm object
  attached, activate the page after the successful read, and free the page
  if read was unsuccessfull.
  
  Freshly allocated page is not on any queue yet, and not activating (or
  deactivating) the page leaves it on no queue, excluding the page from
  pagedaemon scans and making the memory disappeared until the vnode
  reclaimed.
  
  Reviewed by:  avg
  MFC after:1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 
11 10:06:49 2011(r218549)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 
11 10:46:15 2011(r218550)
@@ -527,9 +527,15 @@ again:
zfs_unmap_page(sf);
}
VM_OBJECT_LOCK(obj);
-   if (error == 0)
-   m->valid = VM_PAGE_BITS_ALL;
vm_page_io_finish(m);
+   vm_page_lock(m);
+   if (error == 0) {
+   m->valid = VM_PAGE_BITS_ALL;
+   vm_page_activate(m);
+   } else
+   vm_page_free(m);
+   vm_page_unlock(m);
+
if (error == 0) {
uio->uio_resid -= bytes;
uio->uio_offset += bytes;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r217871 - head/sbin/mount

2011-02-11 Thread Bruce Evans

On Thu, 10 Feb 2011, Doug Barton wrote:


On 01/28/2011 01:06, Bruce Evans wrote:

The solaris server behaviour can't happen, except accidentally due to
races :-).  Since the FreeBSD client doesn't support the noatime flag
except to ignore it, it can't tell any server about it.


I don't mean to be a pest, but I'm confused as to why I observed what I 
observed if this is the case. I tested it a couple of times each way, so I'm 
confident that I saw a difference with and without noatime when mounting a 
solaris server.


I see no evidence of this.  You at least need to run a simple test like
the following:

%%%
#include 

#include 
#include 
#include 
#include 
#include 

int
main(void)
{
struct stat sb;
time_t now, then;
int fd;
char buf[1];

fd = open("foo", O_RDWR | O_CREAT | O_TRUNC, 0666);
assert(fd >= 0);
assert(write(fd, "", 1) == 1);
assert(fsync(fd) == 0);
assert(fstat(fd, &sb) == 0);
then = sb.st_atime;
for (;;) {
assert(lseek(fd, (off_t)0, SEEK_SET) == 0);
sleep(1);   /* increase if fs resolution is low or buggy */
assert(read(fd, buf, 1) == 1);
assert(fstat(fd, &sb) == 0);
now = sb.st_atime;
printf("now = %jd; then = %jd\n",
(intmax_t)now, (intmax_t)then);
#if 0
assert(now >= then + 1);
#else
if (!(now >= then + 1))
printf("assert(now >= then + 1) would fail\n");
#endif
fflush(stdout);
then = now;
}
}
%%%

and, if this works, report the surprising nfs RPCs that make it work.
It didn't work with FreeBSD clients and servers of course.  There were
only GetAttr RPCs for the fstat()s, and no Read RPCs at all.

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


svn commit: r218555 - head/sys/net

2011-02-11 Thread Bjoern A. Zeeb
Author: bz
Date: Fri Feb 11 12:56:05 2011
New Revision: 218555
URL: http://svn.freebsd.org/changeset/base/218555

Log:
  Mfp4 CH=177255:
  
Use __func__ rather than __FUNCTION__.
  
  MFC after:2 weeks

Modified:
  head/sys/net/vnet.h

Modified: head/sys/net/vnet.h
==
--- head/sys/net/vnet.h Fri Feb 11 12:26:23 2011(r218554)
+++ head/sys/net/vnet.h Fri Feb 11 12:56:05 2011(r218555)
@@ -124,7 +124,7 @@ void vnet_log_recursion(struct vnet *, c
 #defineVNET_ASSERT(condition)  
\
if (!(condition)) { \
printf("VNET_ASSERT @ %s:%d %s():\n",   \
-   __FILE__, __LINE__, __FUNCTION__);  \
+   __FILE__, __LINE__, __func__);  \
panic(#condition);  \
}
 
@@ -133,7 +133,7 @@ void vnet_log_recursion(struct vnet *, c
struct vnet *saved_vnet = curvnet;  \
const char *saved_vnet_lpush = curthread->td_vnet_lpush;\
curvnet = arg;  \
-   curthread->td_vnet_lpush = __FUNCTION__;
+   curthread->td_vnet_lpush = __func__;
  
 #defineCURVNET_SET_VERBOSE(arg)
\
CURVNET_SET_QUIET(arg)  \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218556 - head/sys/dev/ath

2011-02-11 Thread Adrian Chadd
Author: adrian
Date: Fri Feb 11 13:05:15 2011
New Revision: 218556
URL: http://svn.freebsd.org/changeset/base/218556

Log:
  The last parameter to ath_computedur_ht() is short-GI, not short-preamble.

Modified:
  head/sys/dev/ath/if_ath_tx_ht.c

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==
--- head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 11 12:56:05 2011
(r218555)
+++ head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 11 13:05:15 2011
(r218556)
@@ -133,7 +133,7 @@ ath_rateseries_setup(struct ath_softc *s
, txrate
, ic->ic_rxstream
, (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40)
-   , shortPreamble);
+   , series[i].rateFlags & HAL_RATESERIES_HALFGI);
} else {
series[i].PktDuration = ath_hal_computetxtime(ah,
rt, pktlen, rix[i], shortPreamble);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218557 - in head/sys/boot/pc98: . pc98boot

2011-02-11 Thread Takahashi Yoshihiro
Author: nyan
Date: Fri Feb 11 13:14:17 2011
New Revision: 218557
URL: http://svn.freebsd.org/changeset/base/218557

Log:
  Add the pc98boot image which concatenates boot0 and boot0.5.
  It's required by the gpart to write bootcode.

Added:
  head/sys/boot/pc98/pc98boot/
  head/sys/boot/pc98/pc98boot/Makefile   (contents, props changed)
Modified:
  head/sys/boot/pc98/Makefile

Modified: head/sys/boot/pc98/Makefile
==
--- head/sys/boot/pc98/Makefile Fri Feb 11 13:05:15 2011(r218556)
+++ head/sys/boot/pc98/Makefile Fri Feb 11 13:14:17 2011(r218557)
@@ -1,5 +1,5 @@
 # $FreeBSD$
 
-SUBDIR=btx boot0 boot0.5 boot2 cdboot kgzldr libpc98 loader
+SUBDIR=boot0 boot0.5 pc98boot btx boot2 cdboot kgzldr libpc98 
loader
 
 .include 

Added: head/sys/boot/pc98/pc98boot/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/pc98/pc98boot/MakefileFri Feb 11 13:14:17 2011
(r218557)
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+FILES= ${BOOT}
+SRCS=  ${BOOT0} ${BOOT05}
+CLEANFILES= ${BOOT} ${BOOT}.part
+
+BOOT=  pc98boot
+BOOT0= ${.CURDIR}/../boot0/boot0
+BOOT05=${.CURDIR}/../boot0.5/boot0.5
+
+${BOOT}: ${SRCS} ${BOOT}.part
+   cat ${BOOT0} ${BOOT}.part ${BOOT05} > ${.TARGET}
+
+${BOOT}.part:
+   dd if=/dev/zero of=${.TARGET} bs=512 count=1
+
+.include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218558 - head/sys/geom/part

2011-02-11 Thread Takahashi Yoshihiro
Author: nyan
Date: Fri Feb 11 13:18:00 2011
New Revision: 218558
URL: http://svn.freebsd.org/changeset/base/218558

Log:
  Add support to write boot menu.

Modified:
  head/sys/geom/part/g_part_pc98.c

Modified: head/sys/geom/part/g_part_pc98.c
==
--- head/sys/geom/part/g_part_pc98.cFri Feb 11 13:14:17 2011
(r218557)
+++ head/sys/geom/part/g_part_pc98.cFri Feb 11 13:18:00 2011
(r218558)
@@ -46,11 +46,14 @@ __FBSDID("$FreeBSD$");
 #include "g_part_if.h"
 
 #defineSECSIZE 512
+#defineMENUSIZE7168
+#defineBOOTSIZE8192
 
 struct g_part_pc98_table {
struct g_part_table base;
u_char  boot[SECSIZE];
u_char  table[SECSIZE];
+   u_char  menu[MENUSIZE];
 };
 
 struct g_part_pc98_entry {
@@ -105,7 +108,7 @@ static struct g_part_scheme g_part_pc98_
.gps_entrysz = sizeof(struct g_part_pc98_entry),
.gps_minent = NDOSPART,
.gps_maxent = NDOSPART,
-   .gps_bootcodesz = SECSIZE,
+   .gps_bootcodesz = BOOTSIZE,
 };
 G_PART_SCHEME_DECLARE(g_part_pc98);
 
@@ -204,14 +207,16 @@ static int
 g_part_pc98_bootcode(struct g_part_table *basetable, struct g_part_parms *gpp)
 {
struct g_part_pc98_table *table;
-   size_t codesz;
+   const u_char *codeptr;
+
+   if (gpp->gpp_codesize != BOOTSIZE)
+   return (EINVAL);
 
-   codesz = DOSMAGICOFFSET;
table = (struct g_part_pc98_table *)basetable;
-   bzero(table->boot, codesz);
-   codesz = MIN(codesz, gpp->gpp_codesize);
-   if (codesz > 0)
-   bcopy(gpp->gpp_codeptr, table->boot, codesz);
+   codeptr = gpp->gpp_codeptr;
+   bcopy(codeptr, table->boot, SECSIZE);
+   bcopy(codeptr + SECSIZE*2, table->menu, MENUSIZE);
+
return (0);
 }
 
@@ -356,7 +361,7 @@ g_part_pc98_probe(struct g_part_table *t
pp = cp->provider;
 
/* Sanity-check the provider. */
-   if (pp->sectorsize < SECSIZE || pp->mediasize < 2 * SECSIZE)
+   if (pp->sectorsize < SECSIZE || pp->mediasize < BOOTSIZE)
return (ENOSPC);
if (pp->sectorsize > SECSIZE)
return (ENXIO);
@@ -419,7 +424,7 @@ g_part_pc98_read(struct g_part_table *ba
table = (struct g_part_pc98_table *)basetable;
msize = pp->mediasize / SECSIZE;
 
-   buf = g_read_data(cp, 0L, 2 * SECSIZE, &error);
+   buf = g_read_data(cp, 0L, BOOTSIZE, &error);
if (buf == NULL)
return (error);
 
@@ -427,6 +432,7 @@ g_part_pc98_read(struct g_part_table *ba
 
bcopy(buf, table->boot, sizeof(table->boot));
bcopy(buf + SECSIZE, table->table, sizeof(table->table));
+   bcopy(buf + SECSIZE*2, table->menu, sizeof(table->menu));
 
for (index = NDOSPART - 1; index >= 0; index--) {
p = buf + SECSIZE + index * DOSPARTSIZE;
@@ -567,5 +573,7 @@ g_part_pc98_write(struct g_part_table *b
error = g_write_data(cp, 0, table->boot, SECSIZE);
if (!error)
error = g_write_data(cp, SECSIZE, table->table, SECSIZE);
+   if (!error)
+   error = g_write_data(cp, SECSIZE*2, table->menu, MENUSIZE);
return (error);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218559 - in head/sys: kern net

2011-02-11 Thread Bjoern A. Zeeb
Author: bz
Date: Fri Feb 11 13:27:00 2011
New Revision: 218559
URL: http://svn.freebsd.org/changeset/base/218559

Log:
  Mfp4 CH=177255:
  
Make VNET_ASSERT() available with either VNET_DEBUG or INVARIANTS.
  
Change the syntax to match KASSERT() to allow more flexible panic
messages rather than having a printf with hardcoded arguments
before panic.
  
Adjust the few assertions we have to the new format (and enhance
the output).
  
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
Reviewed by:jhb
  
  MFC after:2 weeks

Modified:
  head/sys/kern/uipc_socket.c
  head/sys/net/if.c
  head/sys/net/netisr.c
  head/sys/net/vnet.h

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Fri Feb 11 13:18:00 2011(r218558)
+++ head/sys/kern/uipc_socket.c Fri Feb 11 13:27:00 2011(r218559)
@@ -437,7 +437,8 @@ sonewconn(struct socket *head, int conns
if (over)
 #endif
return (NULL);
-   VNET_ASSERT(head->so_vnet);
+   VNET_ASSERT(head->so_vnet != NULL, ("%s:%d so_vnet is NULL, head=%p",
+   __func__, __LINE__, head));
so = soalloc(head->so_vnet);
if (so == NULL)
return (NULL);

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Fri Feb 11 13:18:00 2011(r218558)
+++ head/sys/net/if.c   Fri Feb 11 13:27:00 2011(r218559)
@@ -378,8 +378,10 @@ static void
 vnet_if_uninit(const void *unused __unused)
 {
 
-   VNET_ASSERT(TAILQ_EMPTY(&V_ifnet));
-   VNET_ASSERT(TAILQ_EMPTY(&V_ifg_head));
+   VNET_ASSERT(TAILQ_EMPTY(&V_ifnet), ("%s:%d tailq &V_ifnet=%p "
+   "not empty", __func__, __LINE__, &V_ifnet));
+   VNET_ASSERT(TAILQ_EMPTY(&V_ifg_head), ("%s:%d tailq &V_ifg_head=%p "
+   "not empty", __func__, __LINE__, &V_ifg_head));
 
free((caddr_t)V_ifindex_table, M_IFNET);
 }

Modified: head/sys/net/netisr.c
==
--- head/sys/net/netisr.c   Fri Feb 11 13:18:00 2011(r218558)
+++ head/sys/net/netisr.c   Fri Feb 11 13:27:00 2011(r218559)
@@ -647,7 +647,8 @@ netisr_process_workstream_proto(struct n
if (local_npw.nw_head == NULL)
local_npw.nw_tail = NULL;
local_npw.nw_len--;
-   VNET_ASSERT(m->m_pkthdr.rcvif != NULL);
+   VNET_ASSERT(m->m_pkthdr.rcvif != NULL,
+   ("%s:%d rcvif == NULL: m=%p", __func__, __LINE__, m));
CURVNET_SET(m->m_pkthdr.rcvif->if_vnet);
netisr_proto[proto].np_handler(m);
CURVNET_RESTORE();

Modified: head/sys/net/vnet.h
==
--- head/sys/net/vnet.h Fri Feb 11 13:18:00 2011(r218558)
+++ head/sys/net/vnet.h Fri Feb 11 13:27:00 2011(r218559)
@@ -118,18 +118,23 @@ void  vnet_destroy(struct vnet *vnet);
  * Various macros -- get and set the current network stack, but also
  * assertions.
  */
+#if defined(INVARIANTS) || defined(VNET_DEBUG)
+#defineVNET_ASSERT(exp, msg)   do {
\
+   if (!(exp)) \
+   panic msg;  \
+} while (0)
+#else
+#defineVNET_ASSERT(exp, msg)   do {
\
+} while (0)
+#endif
+
 #ifdef VNET_DEBUG
 void vnet_log_recursion(struct vnet *, const char *, int);
 
-#defineVNET_ASSERT(condition)  
\
-   if (!(condition)) { \
-   printf("VNET_ASSERT @ %s:%d %s():\n",   \
-   __FILE__, __LINE__, __func__);  \
-   panic(#condition);  \
-   }
-
 #defineCURVNET_SET_QUIET(arg)  
\
-   VNET_ASSERT((arg)->vnet_magic_n == VNET_MAGIC_N);   \
+   VNET_ASSERT((arg) != NULL && (arg)->vnet_magic_n == VNET_MAGIC_N, \
+   ("CURVNET_SET at %s:%d %s() curvnet=%p vnet=%p",\
+   __FILE__, __LINE__, __func__, curvnet, (arg))); \
struct vnet *saved_vnet = curvnet;  \
const char *saved_vnet_lpush = curthread->td_vnet_lpush;\
curvnet = arg;  \
@@ -143,12 +148,13 @@ void vnet_log_recursion(struct vnet *, c
 #defineCURVNET_SET(arg)CURVNET_SET_VERBOSE(arg)
  
 #defineCURVNET_RESTORE()   
\
-   VNET_ASSERT(saved_vnet == NULL ||  

Re: svn commit: r218556 - head/sys/dev/ath

2011-02-11 Thread Bjoern A. Zeeb

On Fri, 11 Feb 2011, Adrian Chadd wrote:


Author: adrian
Date: Fri Feb 11 13:05:15 2011
New Revision: 218556
URL: http://svn.freebsd.org/changeset/base/218556

Log:
 The last parameter to ath_computedur_ht() is short-GI, not short-preamble.

Modified:
 head/sys/dev/ath/if_ath_tx_ht.c

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==
--- head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 11 12:56:05 2011
(r218555)
+++ head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 11 13:05:15 2011
(r218556)
@@ -133,7 +133,7 @@ ath_rateseries_setup(struct ath_softc *s
, txrate
, ic->ic_rxstream
, (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40)
-   , shortPreamble);
+   , series[i].rateFlags & HAL_RATESERIES_HALFGI);


Should that be RateFlags with an uppercase 'R'?



} else {
series[i].PktDuration = ath_hal_computetxtime(ah,
rt, pktlen, rix[i], shortPreamble);



--
Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218566 - head/sys/dev/ath

2011-02-11 Thread Adrian Chadd
Author: adrian
Date: Fri Feb 11 14:07:27 2011
New Revision: 218566
URL: http://svn.freebsd.org/changeset/base/218566

Log:
  .. how'd this compile before I commit it and then not now?
  
  Fixed.

Modified:
  head/sys/dev/ath/if_ath_tx_ht.c

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==
--- head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 11 13:59:56 2011
(r218565)
+++ head/sys/dev/ath/if_ath_tx_ht.c Fri Feb 11 14:07:27 2011
(r218566)
@@ -133,7 +133,7 @@ ath_rateseries_setup(struct ath_softc *s
, txrate
, ic->ic_rxstream
, (ni->ni_htcap & IEEE80211_HTCAP_CHWIDTH40)
-   , series[i].rateFlags & HAL_RATESERIES_HALFGI);
+   , series[i].RateFlags & HAL_RATESERIES_HALFGI);
} else {
series[i].PktDuration = ath_hal_computetxtime(ah,
rt, pktlen, rix[i], shortPreamble);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218567 - head/sys/net

2011-02-11 Thread Bjoern A. Zeeb
Author: bz
Date: Fri Feb 11 14:17:58 2011
New Revision: 218567
URL: http://svn.freebsd.org/changeset/base/218567

Log:
  Mfp4 CH=177255:
  
Resort the CURVNET_SET* macros in the non-VNET_DEBUG case to match
the call order of the VNET_DEBUG case.
  
Add the VNET_ASSERT() to the non-VNET_DEBUG case as well so that
INVARIANTS will still catch problems.
  
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
Reviewed by:  jhb
  
  MFC after:2 weeks

Modified:
  head/sys/net/vnet.h

Modified: head/sys/net/vnet.h
==
--- head/sys/net/vnet.h Fri Feb 11 14:07:27 2011(r218566)
+++ head/sys/net/vnet.h Fri Feb 11 14:17:58 2011(r218567)
@@ -156,14 +156,23 @@ void vnet_log_recursion(struct vnet *, c
curthread->td_vnet_lpush = saved_vnet_lpush;
 #else /* !VNET_DEBUG */
 
-#defineCURVNET_SET(arg)
\
+#defineCURVNET_SET_QUIET(arg)  
\
+   VNET_ASSERT((arg) != NULL && (arg)->vnet_magic_n == VNET_MAGIC_N, \
+   ("CURVNET_SET at %s:%d %s() curvnet=%p vnet=%p",\
+   __FILE__, __LINE__, __func__, curvnet, (arg))); \
struct vnet *saved_vnet = curvnet;  \
curvnet = arg;  
  
-#defineCURVNET_SET_VERBOSE(arg)CURVNET_SET(arg)
-#defineCURVNET_SET_QUIET(arg)  CURVNET_SET(arg)
+#defineCURVNET_SET_VERBOSE(arg)
\
+   CURVNET_SET_QUIET(arg)
+
+#defineCURVNET_SET(arg)CURVNET_SET_VERBOSE(arg)
  
 #defineCURVNET_RESTORE()   
\
+   VNET_ASSERT(curvnet != NULL && (saved_vnet == NULL ||   \
+   saved_vnet->vnet_magic_n == VNET_MAGIC_N),  \
+   ("CURVNET_RESTORE at %s:%d %s() curvnet=%p saved_vnet=%p",  \
+   __FILE__, __LINE__, __func__, curvnet, saved_vnet));\
curvnet = saved_vnet;
 #endif /* VNET_DEBUG */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r218550 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2011-02-11 Thread Andriy Gapon

On 11/02/2011 05:46, Konstantin Belousov wrote:

Author: kib
Date: Fri Feb 11 10:46:15 2011
New Revision: 218550
URL: http://svn.freebsd.org/changeset/base/218550

Log:
   For UIO_NOCOPY case of reading request on zfs vnode, which has vm object
   attached, activate the page after the successful read, and free the page
   if read was unsuccessfull.

   Freshly allocated page is not on any queue yet, and not activating (or
   deactivating) the page leaves it on no queue, excluding the page from
   pagedaemon scans and making the memory disappeared until the vnode
   reclaimed.

   Reviewed by: avg


And
Pointyhat to:   avg
as well.


   MFC after:   1 week

Modified:
   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 
11 10:06:49 2011(r218549)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 
11 10:46:15 2011(r218550)
@@ -527,9 +527,15 @@ again:
zfs_unmap_page(sf);
}
VM_OBJECT_LOCK(obj);
-   if (error == 0)
-   m->valid = VM_PAGE_BITS_ALL;
vm_page_io_finish(m);
+   vm_page_lock(m);
+   if (error == 0) {
+   m->valid = VM_PAGE_BITS_ALL;
+   vm_page_activate(m);
+   } else
+   vm_page_free(m);
+   vm_page_unlock(m);
+
if (error == 0) {
uio->uio_resid -= bytes;
uio->uio_offset += bytes;



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


svn commit: r218570 - head/release/doc/en_US.ISO8859-1/relnotes

2011-02-11 Thread Martin Matuska
Author: mm
Date: Fri Feb 11 14:55:17 2011
New Revision: 218570
URL: http://svn.freebsd.org/changeset/base/218570

Log:
  Add release notes for xz update to 5.0.0.

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

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml  Fri Feb 11 
14:49:25 2011(r218569)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml  Fri Feb 11 
14:55:17 2011(r218570)
@@ -496,9 +496,8 @@
 WPA Supplicant has been
   updated from 0.5.8 to 0.5.10.
 
-A snapshot of xz as of
-  12 April 2010 has been added. More information can be found in the 
-  &man.xz.1;, &man.xzdec.1; and &man.lzmainfo.1; manual pages.
+xz has been updated
+  from snapshot as of 12 April 2010 to 5.0.0.
 
   
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218581 - head/sys/dev/e1000

2011-02-11 Thread Jack F Vogel
Author: jfv
Date: Fri Feb 11 17:18:42 2011
New Revision: 218581
URL: http://svn.freebsd.org/changeset/base/218581

Log:
  Inconsistencies in the updated igb shared code and the older
  em/lem, breaking the build, correcting that.

Modified:
  head/sys/dev/e1000/e1000_82542.c
  head/sys/dev/e1000/e1000_mac.c
  head/sys/dev/e1000/e1000_mac.h

Modified: head/sys/dev/e1000/e1000_82542.c
==
--- head/sys/dev/e1000/e1000_82542.cFri Feb 11 16:14:16 2011
(r218580)
+++ head/sys/dev/e1000/e1000_82542.cFri Feb 11 17:18:42 2011
(r218581)
@@ -51,7 +51,6 @@ static void e1000_rar_set_82542(struct e
 static void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw);
 static s32  e1000_read_mac_addr_82542(struct e1000_hw *hw);
 
-
 /**
  *  e1000_init_phy_params_82542 - Init PHY func ptrs.
  *  @hw: pointer to the HW structure
@@ -192,7 +191,7 @@ static s32 e1000_reset_hw_82542(struct e
 {
struct e1000_bus_info *bus = &hw->bus;
s32 ret_val = E1000_SUCCESS;
-   u32 ctrl, icr;
+   u32 ctrl;
 
DEBUGFUNC("e1000_reset_hw_82542");
 
@@ -223,7 +222,7 @@ static s32 e1000_reset_hw_82542(struct e
msec_delay(2);
 
E1000_WRITE_REG(hw, E1000_IMC, 0x);
-   icr = E1000_READ_REG(hw, E1000_ICR);
+   E1000_READ_REG(hw, E1000_ICR);
 
if (hw->revision_id == E1000_REVISION_2) {
if (bus->pci_cmd_word & CMD_MEM_WRT_INVALIDATE)

Modified: head/sys/dev/e1000/e1000_mac.c
==
--- head/sys/dev/e1000/e1000_mac.c  Fri Feb 11 16:14:16 2011
(r218580)
+++ head/sys/dev/e1000/e1000_mac.c  Fri Feb 11 17:18:42 2011
(r218581)
@@ -399,7 +399,10 @@ s32 e1000_check_alt_mac_addr_generic(str
if (ret_val)
goto out;
 
-   if (!(nvm_data & NVM_COMPAT_LOM))
+   /* Check for LOM (vs. NIC) or one of two valid mezzanine cards */
+   if (!((nvm_data & NVM_COMPAT_LOM) ||
+ (hw->device_id == E1000_DEV_ID_82571EB_SERDES_DUAL) ||
+ (hw->device_id == E1000_DEV_ID_82571EB_SERDES_QUAD)))
goto out;
 
ret_val = hw->nvm.ops.read(hw, NVM_ALT_MAC_ADDR_PTR, 1,

Modified: head/sys/dev/e1000/e1000_mac.h
==
--- head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 16:14:16 2011
(r218580)
+++ head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 17:18:42 2011
(r218581)
@@ -70,6 +70,7 @@ s32  e1000_led_on_generic(struct e1000_h
 s32  e1000_led_off_generic(struct e1000_hw *hw);
 void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
u8 *mc_addr_list, u32 mc_addr_count);
+s32  e1000_set_default_fc_generic(struct e1000_hw *hw);
 s32  e1000_set_fc_watermarks_generic(struct e1000_hw *hw);
 s32  e1000_setup_fiber_serdes_link_generic(struct e1000_hw *hw);
 s32  e1000_setup_led_generic(struct e1000_hw *hw);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r218581 - head/sys/dev/e1000

2011-02-11 Thread Doug Barton

On 02/11/2011 09:18, Jack F Vogel wrote:

Modified: head/sys/dev/e1000/e1000_mac.h
==
--- head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 16:14:16 2011
(r218580)
+++ head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 17:18:42 2011
(r218581)
@@ -70,6 +70,7 @@ s32  e1000_led_on_generic(struct e1000_h
  s32  e1000_led_off_generic(struct e1000_hw *hw);
  void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
 u8 *mc_addr_list, u32 mc_addr_count);
+s32  e1000_set_default_fc_generic(struct e1000_hw *hw);


This is a redundant declaration, it's already defined in _api.h. 
Commenting this out allows the build to succeed, and if you receive this 
message it seems to be working fine. :)



hth,

Doug

--

Nothin' ever doesn't change, but nothin' changes much.
-- OK Go

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

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


Re: svn commit: r218581 - head/sys/dev/e1000

2011-02-11 Thread Bjoern A. Zeeb

On Fri, 11 Feb 2011, Doug Barton wrote:


On 02/11/2011 09:18, Jack F Vogel wrote:

Modified: head/sys/dev/e1000/e1000_mac.h
==
--- head/sys/dev/e1000/e1000_mac.h	Fri Feb 11 16:14:16 2011 
(r218580)
+++ head/sys/dev/e1000/e1000_mac.h	Fri Feb 11 17:18:42 2011 
(r218581)

@@ -70,6 +70,7 @@ s32  e1000_led_on_generic(struct e1000_h
  s32  e1000_led_off_generic(struct e1000_hw *hw);
  void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
 u8 *mc_addr_list, u32 
mc_addr_count);

+s32  e1000_set_default_fc_generic(struct e1000_hw *hw);


This is a redundant declaration, it's already defined in _api.h. Commenting 
this out allows the build to succeed, and if you receive this message it 
seems to be working fine. :)


Yeah, I put it into _api.h this morning to unbreak the build.  Jack,
you may want to revert parts of my commit and adjust to your local
trees (mine had a style bug anyway;)

That was the commit:
http://svn.freebsd.org/changeset/base/218548

/bz

--
Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218582 - head/sys/dev/e1000

2011-02-11 Thread Jack F Vogel
Author: jfv
Date: Fri Feb 11 19:03:00 2011
New Revision: 218582
URL: http://svn.freebsd.org/changeset/base/218582

Log:
  Revert changes made here, they will cause a conflict
  later on with our shared code.

Modified:
  head/sys/dev/e1000/e1000_api.h

Modified: head/sys/dev/e1000/e1000_api.h
==
--- head/sys/dev/e1000/e1000_api.h  Fri Feb 11 17:18:42 2011
(r218581)
+++ head/sys/dev/e1000/e1000_api.h  Fri Feb 11 19:03:00 2011
(r218582)
@@ -120,9 +120,6 @@ s32  e1000_mng_write_cmd_header(struct e
 s32  e1000_mng_write_dhcp_info(struct e1000_hw * hw,
 u8 *buffer, u16 length);
 u32  e1000_translate_register_82542(u32 reg);
-s32  e1000_set_default_fc_generic(struct e1000_hw *hw);
-s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw);
-s32  e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);
 
 /*
  * TBI_ACCEPT macro definition:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r218581 - head/sys/dev/e1000

2011-02-11 Thread Jack Vogel
Ya, I just saw that, I think I will Bjoern, only because its gonna be a
problem the next time
I check in shared code, I don't really even own the stuff, when my internal
build runs it just
filters the defines in the stuff according to my needs, but doesn't directly
change anything.

I was gonna send email around midnight last night and say I saw the
breakage, but I couldn't
fix it til this morning, you had good intentions anyway :)

Jack


On Fri, Feb 11, 2011 at 10:42 AM, Bjoern A. Zeeb  wrote:

> On Fri, 11 Feb 2011, Doug Barton wrote:
>
>  On 02/11/2011 09:18, Jack F Vogel wrote:
>>
>>> Modified: head/sys/dev/e1000/e1000_mac.h
>>>
>>> ==
>>> --- head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 16:14:16 2011
>>> (r218580)
>>> +++ head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 17:18:42 2011
>>> (r218581)
>>> @@ -70,6 +70,7 @@ s32  e1000_led_on_generic(struct e1000_h
>>>  s32  e1000_led_off_generic(struct e1000_hw *hw);
>>>  void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
>>> u8 *mc_addr_list, u32
>>> mc_addr_count);
>>> +s32  e1000_set_default_fc_generic(struct e1000_hw *hw);
>>>
>>
>> This is a redundant declaration, it's already defined in _api.h.
>> Commenting this out allows the build to succeed, and if you receive this
>> message it seems to be working fine. :)
>>
>
> Yeah, I put it into _api.h this morning to unbreak the build.  Jack,
> you may want to revert parts of my commit and adjust to your local
> trees (mine had a style bug anyway;)
>
> That was the commit:
> http://svn.freebsd.org/changeset/base/218548
>
> /bz
>
> --
> Bjoern A. Zeeb You have to have visions!
> Stop bit received. Insert coin for new address family.
>
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r211804 - in head/sys: amd64/amd64 i386/i386

2011-02-11 Thread Chagin Dmitry
On Thu, Feb 10, 2011 at 10:06:29AM -0800, Rui Paulo wrote:
> 
> On Feb 10, 2011, at 8:13 AM, Chagin Dmitry wrote:
> 
> > On Wed, Aug 25, 2010 at 09:10:32AM +, Rui Paulo wrote:
> >> Author: rpaulo
> >> Date: Wed Aug 25 09:10:32 2010
> >> New Revision: 211804
> >> URL: http://svn.freebsd.org/changeset/base/211804
> >> 
> >> Log:
> >>  Call the necessary DTrace function pointers when we have different kinds
> >>  of traps.
> >> 
> >>  Sponsored by: The FreeBSD Foundation
> >> 
> >> Modified:
> >>  head/sys/amd64/amd64/trap.c
> >>  head/sys/i386/i386/trap.c
> >> 
> >> Modified: head/sys/amd64/amd64/trap.c
> >> ==
> >> --- head/sys/amd64/amd64/trap.cWed Aug 25 08:49:21 2010
> >> (r211803)
> >> +++ head/sys/amd64/amd64/trap.cWed Aug 25 09:10:32 2010
> >> (r211804)
> >> @@ -109,6 +109,13 @@ dtrace_doubletrap_func_t  dtrace_doubletr
> >>  * implementation opaque. 
> >>  */
> >> systrace_probe_func_t  systrace_probe_func;
> >> +
> >> +/*
> >> + * These hooks are necessary for the pid, usdt and fasttrap providers.
> >> + */
> >> +dtrace_fasttrap_probe_ptr_t   dtrace_fasttrap_probe_ptr;
> >> +dtrace_pid_probe_ptr_tdtrace_pid_probe_ptr;
> >> +dtrace_return_probe_ptr_t dtrace_return_probe_ptr;
> >> #endif
> >> 
> >> extern void trap(struct trapframe *frame);
> >> @@ -239,6 +246,55 @@ trap(struct trapframe *frame)
> >>if (dtrace_trap_func != NULL)
> >>if ((*dtrace_trap_func)(frame, type))
> >>goto out;
> >> +  if (type == T_DTRACE_PROBE || type == T_DTRACE_RET ||
> >> +  type == T_BPTFLT) {
> >> +  struct reg regs;
> >> +
> >> +  regs.r_r15 = frame->tf_r15;
> >> +  regs.r_r14 = frame->tf_r14;
> >> +  regs.r_r13 = frame->tf_r13;
> >> +  regs.r_r12 = frame->tf_r12;
> >> +  regs.r_r11 = frame->tf_r11;
> >> +  regs.r_r10 = frame->tf_r10;
> >> +  regs.r_r9  = frame->tf_r9;
> >> +  regs.r_r8  = frame->tf_r8;
> >> +  regs.r_rdi = frame->tf_rdi;
> >> +  regs.r_rsi = frame->tf_rsi;
> >> +  regs.r_rbp = frame->tf_rbp;
> >> +  regs.r_rbx = frame->tf_rbx;
> >> +  regs.r_rdx = frame->tf_rdx;
> >> +  regs.r_rcx = frame->tf_rcx;
> >> +  regs.r_rax = frame->tf_rax;
> >> +  regs.r_rip = frame->tf_rip;
> >> +  regs.r_cs = frame->tf_cs;
> >> +  regs.r_rflags = frame->tf_rflags;
> >> +  regs.r_rsp = frame->tf_rsp;
> >> +  regs.r_ss = frame->tf_ss;
> >> +  if (frame->tf_flags & TF_HASSEGS) {
> >> +  regs.r_ds = frame->tf_ds;
> >> +  regs.r_es = frame->tf_es;
> >> +  regs.r_fs = frame->tf_fs;
> >> +  regs.r_gs = frame->tf_gs;
> >> +  } else {
> >> +  regs.r_ds = 0;
> >> +  regs.r_es = 0;
> >> +  regs.r_fs = 0;
> >> +  regs.r_gs = 0;
> > 
> > 
> > hi, maybe use fill_regs() would more appropriate here?
> 
> No, fill_regs() takes a thread as an argument. I all I had was a frame.
> 

ah, can u test http://people.freebsd.org/~dchagin/fillregs.patch,
please? thnx :)

-- 
Have fun!
chd


pgp9Q6ewafxeK.pgp
Description: PGP signature


svn commit: r218583 - head/sys/dev/e1000

2011-02-11 Thread Jack F Vogel
Author: jfv
Date: Fri Feb 11 19:49:07 2011
New Revision: 218583
URL: http://svn.freebsd.org/changeset/base/218583

Log:
  Somehow the RX ring depletion fix got partially removed,
  replace the missing pieces.

Modified:
  head/sys/dev/e1000/if_igb.c

Modified: head/sys/dev/e1000/if_igb.c
==
--- head/sys/dev/e1000/if_igb.c Fri Feb 11 19:03:00 2011(r218582)
+++ head/sys/dev/e1000/if_igb.c Fri Feb 11 19:49:07 2011(r218583)
@@ -1,6 +1,6 @@
 /**
 
-  Copyright (c) 2001-2010, Intel Corporation 
+  Copyright (c) 2001-2011, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -99,7 +99,7 @@ int   igb_display_debug_stats = 0;
 /*
  *  Driver version:
  */
-char igb_driver_version[] = "version - 2.1.3";
+char igb_driver_version[] = "version - 2.1.4";
 
 
 /*
@@ -1937,6 +1937,10 @@ igb_local_timer(void *arg)
goto timeout;
 out:
callout_reset(&adapter->timer, hz, igb_local_timer, adapter);
+#ifndef DEVICE_POLLING
+   /* Fire off all queue interrupts - deadlock protection */
+   E1000_WRITE_REG(&adapter->hw, E1000_EICS, adapter->que_mask);
+#endif
return;
 
 timeout:
@@ -3616,6 +3620,7 @@ igb_refresh_mbufs(struct rx_ring *rxr, i
int i, nsegs, error, cleaned;
 
i = rxr->next_to_refresh;
+   rxr->needs_refresh = FALSE;
cleaned = -1; /* Signify no completions */
while (i != limit) {
rxbuf = &rxr->rx_buffers[i];
@@ -3624,8 +3629,10 @@ igb_refresh_mbufs(struct rx_ring *rxr, i
goto no_split;
if (rxbuf->m_head == NULL) {
mh = m_gethdr(M_DONTWAIT, MT_DATA);
-   if (mh == NULL)
+   if (mh == NULL) {
+   rxr->needs_refresh = TRUE;
goto update;
+   }
} else
mh = rxbuf->m_head;
 
@@ -3651,8 +3658,10 @@ no_split:
if (rxbuf->m_pack == NULL) {
mp = m_getjcl(M_DONTWAIT, MT_DATA,
M_PKTHDR, adapter->rx_mbuf_sz);
-   if (mp == NULL)
+   if (mp == NULL) {
+   rxr->needs_refresh = TRUE;
goto update;
+   }
} else
mp = rxbuf->m_pack;
 
@@ -4303,6 +4312,10 @@ igb_rxeof(struct igb_queue *que, int cou
bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
 
+   /* Try outstanding refresh first */
+   if (rxr->needs_refresh == TRUE)
+   igb_refresh_mbufs(rxr, rxr->next_to_check);
+
/* Main clean loop */
for (i = rxr->next_to_check; count != 0;) {
struct mbuf *sendmp, *mh, *mp;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r218582 - head/sys/dev/e1000

2011-02-11 Thread Dimitry Andric

On 2011-02-11 20:03, Jack F Vogel wrote:

Author: jfv
Date: Fri Feb 11 19:03:00 2011
New Revision: 218582
URL: http://svn.freebsd.org/changeset/base/218582

Log:
   Revert changes made here, they will cause a conflict
   later on with our shared code.

Modified:
   head/sys/dev/e1000/e1000_api.h

Modified: head/sys/dev/e1000/e1000_api.h
==
--- head/sys/dev/e1000/e1000_api.h  Fri Feb 11 17:18:42 2011
(r218581)
+++ head/sys/dev/e1000/e1000_api.h  Fri Feb 11 19:03:00 2011
(r218582)
@@ -120,9 +120,6 @@ s32  e1000_mng_write_cmd_header(struct e
  s32  e1000_mng_write_dhcp_info(struct e1000_hw * hw,
  u8 *buffer, u16 length);
  u32  e1000_translate_register_82542(u32 reg);
-s32  e1000_set_default_fc_generic(struct e1000_hw *hw);
-s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw);
-s32  e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);


This breaks the build, please put back the following two prototypes for now:

s32  e1000_commit_fc_settings_generic(struct e1000_hw *hw);
s32  e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218584 - head/sys/kern

2011-02-11 Thread Juli Mallett
Author: jmallett
Date: Fri Feb 11 22:43:10 2011
New Revision: 218584
URL: http://svn.freebsd.org/changeset/base/218584

Log:
  With smp_topo_none, set cg_mask to all_cpus rather than setting the mp_ncpus
  low bits.
  
  Submitted by: Bhanu Prakash
  Reviewed by:  jeffr

Modified:
  head/sys/kern/subr_smp.c

Modified: head/sys/kern/subr_smp.c
==
--- head/sys/kern/subr_smp.cFri Feb 11 19:49:07 2011(r218583)
+++ head/sys/kern/subr_smp.cFri Feb 11 22:43:10 2011(r218584)
@@ -476,7 +476,7 @@ smp_topo_none(void)
top = &group[0];
top->cg_parent = NULL;
top->cg_child = NULL;
-   top->cg_mask = ~0U >> (32 - mp_ncpus);
+   top->cg_mask = all_cpus;
top->cg_count = mp_ncpus;
top->cg_children = 0;
top->cg_level = CG_SHARE_NONE;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218587 - head/sys/dev/e1000

2011-02-11 Thread Doug Barton
Author: dougb
Date: Fri Feb 11 23:08:34 2011
New Revision: 218587
URL: http://svn.freebsd.org/changeset/base/218587

Log:
  Restore 2 prototypes that seem to have been mistakenly removed in r218582.
  
  I've manually twiddled the whitespace for e1000_commit_fc_settings_generic
  to match the others in the file.
  
  Submitted by: dim
  Tested by:me

Modified:
  head/sys/dev/e1000/e1000_api.h

Modified: head/sys/dev/e1000/e1000_api.h
==
--- head/sys/dev/e1000/e1000_api.h  Fri Feb 11 22:57:19 2011
(r218586)
+++ head/sys/dev/e1000/e1000_api.h  Fri Feb 11 23:08:34 2011
(r218587)
@@ -120,6 +120,8 @@ s32  e1000_mng_write_cmd_header(struct e
 s32  e1000_mng_write_dhcp_info(struct e1000_hw * hw,
 u8 *buffer, u16 length);
 u32  e1000_translate_register_82542(u32 reg);
+s32  e1000_commit_fc_settings_generic(struct e1000_hw *hw);
+s32  e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);
 
 /*
  * TBI_ACCEPT macro definition:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r218582 - head/sys/dev/e1000

2011-02-11 Thread Doug Barton

On 02/11/2011 13:28, Dimitry Andric wrote:

On 2011-02-11 20:03, Jack F Vogel wrote:

Author: jfv
Date: Fri Feb 11 19:03:00 2011
New Revision: 218582
URL: http://svn.freebsd.org/changeset/base/218582

Log:
Revert changes made here, they will cause a conflict
later on with our shared code.

Modified:
head/sys/dev/e1000/e1000_api.h

Modified: head/sys/dev/e1000/e1000_api.h
==

--- head/sys/dev/e1000/e1000_api.h Fri Feb 11 17:18:42 2011 (r218581)
+++ head/sys/dev/e1000/e1000_api.h Fri Feb 11 19:03:00 2011 (r218582)
@@ -120,9 +120,6 @@ s32 e1000_mng_write_cmd_header(struct e
s32 e1000_mng_write_dhcp_info(struct e1000_hw * hw,
u8 *buffer, u16 length);
u32 e1000_translate_register_82542(u32 reg);
-s32 e1000_set_default_fc_generic(struct e1000_hw *hw);
-s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw);
-s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);


This breaks the build, please put back the following two prototypes for
now:

s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw);
s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);


I went ahead and restored these to get the build working again. I have 
an em card in this system so I was able to confirm that it both builds 
and runs just fine.



hth,

Doug

--

Nothin' ever doesn't change, but nothin' changes much.
-- OK Go

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

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


Re: svn commit: r218587 - head/sys/dev/e1000

2011-02-11 Thread Doug Barton

On 02/11/2011 15:08, Doug Barton wrote:

Author: dougb
Date: Fri Feb 11 23:08:34 2011
New Revision: 218587
URL: http://svn.freebsd.org/changeset/base/218587

Log:
   Restore 2 prototypes that seem to have been mistakenly removed in r218582.

   I've manually twiddled the whitespace for e1000_commit_fc_settings_generic
   to match the others in the file.


Sorry, I wasn't clear on this. The bit that dim submitted was right, but 
when I diffed against r218581 I noticed that the ws was different in the 
previous version. Given that it was going to be a change either way I 
chose to be consistent rather than doing a straight "revert" to the 
previous state.



Doug



   Submitted by:dim
   Tested by:   me

Modified:
   head/sys/dev/e1000/e1000_api.h

Modified: head/sys/dev/e1000/e1000_api.h
==
--- head/sys/dev/e1000/e1000_api.h  Fri Feb 11 22:57:19 2011
(r218586)
+++ head/sys/dev/e1000/e1000_api.h  Fri Feb 11 23:08:34 2011
(r218587)
@@ -120,6 +120,8 @@ s32  e1000_mng_write_cmd_header(struct e
  s32  e1000_mng_write_dhcp_info(struct e1000_hw * hw,
  u8 *buffer, u16 length);
  u32  e1000_translate_register_82542(u32 reg);
+s32  e1000_commit_fc_settings_generic(struct e1000_hw *hw);
+s32  e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw);

  /*
   * TBI_ACCEPT macro definition:





--

Nothin' ever doesn't change, but nothin' changes much.
-- OK Go

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

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


svn commit: r218588 - head/sys/dev/e1000

2011-02-11 Thread Jack F Vogel
Author: jfv
Date: Sat Feb 12 00:07:40 2011
New Revision: 218588
URL: http://svn.freebsd.org/changeset/base/218588

Log:
  Fix the shared code to be consistent with Intel-internal,
  and now build.

Modified:
  head/sys/dev/e1000/e1000_80003es2lan.c
  head/sys/dev/e1000/e1000_80003es2lan.h
  head/sys/dev/e1000/e1000_82540.c
  head/sys/dev/e1000/e1000_82541.c
  head/sys/dev/e1000/e1000_82543.c
  head/sys/dev/e1000/e1000_82571.c
  head/sys/dev/e1000/e1000_api.h
  head/sys/dev/e1000/e1000_ich8lan.c
  head/sys/dev/e1000/e1000_ich8lan.h
  head/sys/dev/e1000/e1000_mac.h

Modified: head/sys/dev/e1000/e1000_80003es2lan.c
==
--- head/sys/dev/e1000/e1000_80003es2lan.c  Fri Feb 11 23:08:34 2011
(r218587)
+++ head/sys/dev/e1000/e1000_80003es2lan.c  Sat Feb 12 00:07:40 2011
(r218588)
@@ -82,8 +82,8 @@ static void e1000_power_down_phy_copper_
  * with a lower bound at "index" and the upper bound at
  * "index + 5".
  */
-static const u16 e1000_gg82563_cable_length_table[] =
- { 0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF };
+static const u16 e1000_gg82563_cable_length_table[] = {
+   0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF };
 #define GG82563_CABLE_LENGTH_TABLE_SIZE \
 (sizeof(e1000_gg82563_cable_length_table) / \
  sizeof(e1000_gg82563_cable_length_table[0]))
@@ -854,7 +854,7 @@ static s32 e1000_get_link_up_info_80003e
  **/
 static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
 {
-   u32 ctrl, icr;
+   u32 ctrl;
s32 ret_val;
 
DEBUGFUNC("e1000_reset_hw_80003es2lan");
@@ -890,7 +890,7 @@ static s32 e1000_reset_hw_80003es2lan(st
 
/* Clear any pending interrupt events. */
E1000_WRITE_REG(hw, E1000_IMC, 0x);
-   icr = E1000_READ_REG(hw, E1000_ICR);
+   E1000_READ_REG(hw, E1000_ICR);
 
ret_val = e1000_check_alt_mac_addr_generic(hw);
 
@@ -909,6 +909,7 @@ static s32 e1000_init_hw_80003es2lan(str
struct e1000_mac_info *mac = &hw->mac;
u32 reg_data;
s32 ret_val;
+   u16 kum_reg_data;
u16 i;
 
DEBUGFUNC("e1000_init_hw_80003es2lan");
@@ -936,6 +937,13 @@ static s32 e1000_init_hw_80003es2lan(str
/* Setup link and flow control */
ret_val = mac->ops.setup_link(hw);
 
+   /* Disable IBIST slave mode (far-end loopback) */
+   e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
+   &kum_reg_data);
+   kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+   e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
+kum_reg_data);
+
/* Set the transmit descriptor write-back policy */
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |

Modified: head/sys/dev/e1000/e1000_80003es2lan.h
==
--- head/sys/dev/e1000/e1000_80003es2lan.h  Fri Feb 11 23:08:34 2011
(r218587)
+++ head/sys/dev/e1000/e1000_80003es2lan.h  Sat Feb 12 00:07:40 2011
(r218588)
@@ -1,6 +1,6 @@
 /**
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 

Modified: head/sys/dev/e1000/e1000_82540.c
==
--- head/sys/dev/e1000/e1000_82540.cFri Feb 11 23:08:34 2011
(r218587)
+++ head/sys/dev/e1000/e1000_82540.cSat Feb 12 00:07:40 2011
(r218588)
@@ -269,7 +269,7 @@ void e1000_init_function_pointers_82540(
  **/
 static s32 e1000_reset_hw_82540(struct e1000_hw *hw)
 {
-   u32 ctrl, icr, manc;
+   u32 ctrl, manc;
s32 ret_val = E1000_SUCCESS;
 
DEBUGFUNC("e1000_reset_hw_82540");
@@ -314,7 +314,7 @@ static s32 e1000_reset_hw_82540(struct e
E1000_WRITE_REG(hw, E1000_MANC, manc);
 
E1000_WRITE_REG(hw, E1000_IMC, 0x);
-   icr = E1000_READ_REG(hw, E1000_ICR);
+   E1000_READ_REG(hw, E1000_ICR);
 
return ret_val;
 }

Modified: head/sys/dev/e1000/e1000_82541.c
==
--- head/sys/dev/e1000/e1000_82541.cFri Feb 11 23:08:34 2011
(r218587)
+++ head/sys/dev/e1000/e1000_82541.cSat Feb 12 00:07:40 2011
(r218588)
@@ -300,7 +300,7 @@ void e1000_init_function_pointers_82541(
  **/
 static s32 e1000_reset_hw_82541(struct e1000_hw *hw)
 {
-   u32 ledctl, ctrl, icr, manc;
+   u32 ledctl, ctrl, manc;
 
DEBUGFUNC("e1000_reset_hw_82541");
 
@@ -364,7 +364,7 @@ static s32 e1000_reset_hw_82541(struct e
E1000_WRITE_REG(hw, E1000_IMC, 0x);
 

svn commit: r218589 - in head/sys: kern vm

2011-02-11 Thread Alan Cox
Author: alc
Date: Sat Feb 12 01:00:00 2011
New Revision: 218589
URL: http://svn.freebsd.org/changeset/base/218589

Log:
  Retire VFS_BIO_DEBUG.  Convert those checks that were still valid into
  KASSERT()s and eliminate the rest.
  
  Replace excessive printf()s and a panic() in bufdone_finish() with a
  KASSERT() in vm_page_io_finish().
  
  Reviewed by:  kib

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/vm/vm_page.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Sat Feb 12 00:07:40 2011(r218588)
+++ head/sys/kern/vfs_bio.c Sat Feb 12 01:00:00 2011(r218589)
@@ -2830,11 +2830,6 @@ loop:
 
if (vmio) {
bp->b_flags |= B_VMIO;
-#if defined(VFS_BIO_DEBUG)
-   if (vn_canvmio(vp) != TRUE)
-   printf("getblk: VMIO on vnode type %d\n",
-   vp->v_type);
-#endif
KASSERT(vp->v_object == bp->b_bufobj->bo_object,
("ARGH! different b_bufobj->bo_object %p %p %p\n",
bp, vp->v_object, bp->b_bufobj->bo_object));
@@ -3343,36 +3338,26 @@ bufdone_finish(struct buf *bp)
buf_complete(bp);
 
if (bp->b_flags & B_VMIO) {
-   int i;
vm_ooffset_t foff;
vm_page_t m;
vm_object_t obj;
-   int bogus, iosize;
-   struct vnode *vp = bp->b_vp;
+   struct vnode *vp;
+   int bogus, i, iosize;
 
obj = bp->b_bufobj->bo_object;
-
-#if defined(VFS_BIO_DEBUG)
-   mp_fixme("usecount and vflag accessed without locks.");
-   if (vp->v_usecount == 0) {
-   panic("biodone: zero vnode ref count");
-   }
-
+   KASSERT(obj->paging_in_progress >= bp->b_npages,
+   ("biodone_finish: paging in progress(%d) < b_npages(%d)",
+   obj->paging_in_progress, bp->b_npages));
+
+   vp = bp->b_vp;
+   KASSERT(vp->v_holdcnt > 0,
+   ("biodone_finish: vnode %p has zero hold count", vp));
KASSERT(vp->v_object != NULL,
-   ("biodone: vnode %p has no vm_object", vp));
-#endif
+   ("biodone_finish: vnode %p has no vm_object", vp));
 
foff = bp->b_offset;
KASSERT(bp->b_offset != NOOFFSET,
-   ("biodone: no buffer offset"));
-
-   VM_OBJECT_LOCK(obj);
-#if defined(VFS_BIO_DEBUG)
-   if (obj->paging_in_progress < bp->b_npages) {
-   printf("biodone: paging in progress(%d) < 
bp->b_npages(%d)\n",
-   obj->paging_in_progress, bp->b_npages);
-   }
-#endif
+   ("biodone_finish: bp %p has no buffer offset", bp));
 
/*
 * Set B_CACHE if the op was a normal read and no error
@@ -3386,6 +3371,7 @@ bufdone_finish(struct buf *bp)
bp->b_flags |= B_CACHE;
}
bogus = 0;
+   VM_OBJECT_LOCK(obj);
for (i = 0; i < bp->b_npages; i++) {
int bogusflag = 0;
int resid;
@@ -3405,13 +3391,9 @@ bufdone_finish(struct buf *bp)
panic("biodone: page disappeared!");
bp->b_pages[i] = m;
}
-#if defined(VFS_BIO_DEBUG)
-   if (OFF_TO_IDX(foff) != m->pindex) {
-   printf(
-"biodone: foff(%jd)/m->pindex(%ju) mismatch\n",
-   (intmax_t)foff, (uintmax_t)m->pindex);
-   }
-#endif
+   KASSERT(OFF_TO_IDX(foff) == m->pindex,
+   ("biodone_finish: foff(%jd)/pindex(%ju) mismatch",
+   (intmax_t)foff, (uintmax_t)m->pindex));
 
/*
 * In the write case, the valid and clean bits are
@@ -3425,31 +3407,6 @@ bufdone_finish(struct buf *bp)
vfs_page_set_valid(bp, foff, m);
}
 
-   /*
-* when debugging new filesystems or buffer I/O 
methods, this
-* is the most common error that pops up.  if you see 
this, you
-* have not set the page busy flag correctly!!!
-*/
-   if (m->busy == 0) {
-   printf("biodone: page busy < 0, "
-   "pindex: %d, foff: 0x(%x,%x), "
-   "resid: %d, index: %d\n",
-   (int) m->pindex, (int)(foff >> 32),
-   

svn commit: r218590 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/dispatcher sys/co...

2011-02-11 Thread Jung-uk Kim
Author: jkim
Date: Sat Feb 12 01:03:15 2011
New Revision: 218590
URL: http://svn.freebsd.org/changeset/base/218590

Log:
  Merge ACPICA 20110211.

Added:
  head/sys/contrib/dev/acpica/compiler/aslbtypes.c
 - copied, changed from r218586, vendor-sys/acpica/dist/compiler/aslbtypes.c
  head/sys/contrib/dev/acpica/compiler/aslwalks.c
 - copied, changed from r218586, vendor-sys/acpica/dist/compiler/aslwalks.c
  head/sys/contrib/dev/acpica/compiler/dtexpress.c
 - copied, changed from r218586, vendor-sys/acpica/dist/compiler/dtexpress.c
  head/sys/contrib/dev/acpica/debugger/dbmethod.c
 - copied, changed from r218586, vendor-sys/acpica/dist/debugger/dbmethod.c
  head/sys/contrib/dev/acpica/debugger/dbnames.c
 - copied, changed from r218586, vendor-sys/acpica/dist/debugger/dbnames.c
  head/sys/contrib/dev/acpica/dispatcher/dsargs.c
 - copied, changed from r218586, vendor-sys/acpica/dist/dispatcher/dsargs.c
  head/sys/contrib/dev/acpica/dispatcher/dscontrol.c
 - copied, changed from r218586, 
vendor-sys/acpica/dist/dispatcher/dscontrol.c
  head/sys/contrib/dev/acpica/dispatcher/dswload2.c
 - copied, changed from r218586, 
vendor-sys/acpica/dist/dispatcher/dswload2.c
  head/sys/contrib/dev/acpica/utilities/utdecode.c
 - copied, changed from r218586, vendor-sys/acpica/dist/utilities/utdecode.c
Modified:
  head/sys/conf/files
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/compiler/aslanalyze.c
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/aslcompiler.l
  head/sys/contrib/dev/acpica/compiler/aslcompiler.y
  head/sys/contrib/dev/acpica/compiler/aslmessages.h
  head/sys/contrib/dev/acpica/compiler/aslpredef.c
  head/sys/contrib/dev/acpica/compiler/asltree.c
  head/sys/contrib/dev/acpica/compiler/dtcompile.c
  head/sys/contrib/dev/acpica/compiler/dtcompiler.h
  head/sys/contrib/dev/acpica/compiler/dtfield.c
  head/sys/contrib/dev/acpica/compiler/dtio.c
  head/sys/contrib/dev/acpica/compiler/dttable.c
  head/sys/contrib/dev/acpica/compiler/dtutils.c
  head/sys/contrib/dev/acpica/debugger/dbcmds.c
  head/sys/contrib/dev/acpica/debugger/dbdisply.c
  head/sys/contrib/dev/acpica/debugger/dbinput.c
  head/sys/contrib/dev/acpica/dispatcher/dsopcode.c
  head/sys/contrib/dev/acpica/dispatcher/dswload.c
  head/sys/contrib/dev/acpica/events/evgpe.c
  head/sys/contrib/dev/acpica/events/evregion.c
  head/sys/contrib/dev/acpica/events/evxfregn.c
  head/sys/contrib/dev/acpica/executer/exfldio.c
  head/sys/contrib/dev/acpica/include/acdebug.h
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/acdispat.h
  head/sys/contrib/dev/acpica/include/acglobal.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acoutput.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actbl.h
  head/sys/contrib/dev/acpica/tables/tbfadt.c
  head/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h
  head/sys/contrib/dev/acpica/utilities/utglobal.c
  head/sys/modules/acpi/acpi/Makefile
  head/usr.sbin/acpi/acpidb/Makefile
  head/usr.sbin/acpi/iasl/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sat Feb 12 01:00:00 2011(r218589)
+++ head/sys/conf/files Sat Feb 12 01:03:15 2011(r218590)
@@ -161,6 +161,8 @@ contrib/dev/acpica/debugger/dbexec.copt
 contrib/dev/acpica/debugger/dbfileio.c optional acpi acpi_debug
 contrib/dev/acpica/debugger/dbhistry.c optional acpi acpi_debug
 contrib/dev/acpica/debugger/dbinput.c  optional acpi acpi_debug
+contrib/dev/acpica/debugger/dbmethod.c optional acpi acpi_debug
+contrib/dev/acpica/debugger/dbnames.c  optional acpi acpi_debug
 contrib/dev/acpica/debugger/dbstats.c  optional acpi acpi_debug
 contrib/dev/acpica/debugger/dbutils.c  optional acpi acpi_debug
 contrib/dev/acpica/debugger/dbxface.c  optional acpi acpi_debug
@@ -173,6 +175,8 @@ contrib/dev/acpica/disassembler/dmresrcl
 contrib/dev/acpica/disassembler/dmresrcs.c optional acpi acpi_debug
 contrib/dev/acpica/disassembler/dmutils.c  optional acpi acpi_debug
 contrib/dev/acpica/disassembler/dmwalk.c   optional acpi acpi_debug
+contrib/dev/acpica/dispatcher/dsargs.c optional acpi
+contrib/dev/acpica/dispatcher/dscontrol.c  optional acpi
 contrib/dev/acpica/dispatcher/dsfield.coptional acpi
 contrib/dev/acpica/dispatcher/dsinit.c optional acpi
 contrib/dev/acpica/dispatcher/dsmethod.c   optional acpi
@@ -182,6 +186,7 @@ contrib/dev/acpica/dispatcher/dsopcode.c
 contrib/dev/acpica/dispatcher/dsutils.coptional acpi
 contrib

svn commit: r218591 - in head/sys/mips: cavium include mips rmi sibyte

2011-02-11 Thread Juli Mallett
Author: jmallett
Date: Sat Feb 12 02:08:24 2011
New Revision: 218591
URL: http://svn.freebsd.org/changeset/base/218591

Log:
  Allow the platform code to return a bitmask of running cores rather than just
  a number of cores, this allows for a sparse set of CPUs.  Implement support
  for sparse core masks on Octeon.
  
  XXX jeff@ suggests that all_cpus should include cores that are offline or
  running other applications/OSes, so the platform API should be further
  extended to allow us to set all_cpus to include all cores that are
  physically-present as opposed to only those that are running FreeBSD.
  
  Submitted by: Bhanu Prakash (with modifications)
  Reviewed by:  jchandra
  Glanced at by:kib, jeff, jhb

Modified:
  head/sys/mips/cavium/octeon_mp.c
  head/sys/mips/include/hwfunc.h
  head/sys/mips/mips/mp_machdep.c
  head/sys/mips/rmi/xlr_machdep.c
  head/sys/mips/sibyte/sb_scd.c

Modified: head/sys/mips/cavium/octeon_mp.c
==
--- head/sys/mips/cavium/octeon_mp.cSat Feb 12 01:03:15 2011
(r218590)
+++ head/sys/mips/cavium/octeon_mp.cSat Feb 12 02:08:24 2011
(r218591)
@@ -102,10 +102,10 @@ platform_init_ap(int cpuid)
mips_wbflush();
 }
 
-int
-platform_num_processors(void)
+cpumask_t
+platform_cpu_mask(void)
 {
-   return (bitcount32(octeon_bootinfo->core_mask));
+   return (octeon_bootinfo->core_mask);
 }
 
 struct cpu_group *

Modified: head/sys/mips/include/hwfunc.h
==
--- head/sys/mips/include/hwfunc.h  Sat Feb 12 01:03:15 2011
(r218590)
+++ head/sys/mips/include/hwfunc.h  Sat Feb 12 02:08:24 2011
(r218591)
@@ -89,9 +89,9 @@ void platform_ipi_clear(void);
 extern int platform_processor_id(void);
 
 /*
- * Return the number of processors available on this platform.
+ * Return the cpumask of available processors.
  */
-extern int platform_num_processors(void);
+extern cpumask_t platform_cpu_mask(void);
 
 /*
  * Return the topology of processors on this platform

Modified: head/sys/mips/mips/mp_machdep.c
==
--- head/sys/mips/mips/mp_machdep.c Sat Feb 12 01:03:15 2011
(r218590)
+++ head/sys/mips/mips/mp_machdep.c Sat Feb 12 02:08:24 2011
(r218591)
@@ -200,12 +200,14 @@ start_ap(int cpuid)
 void
 cpu_mp_setmaxid(void)
 {
+   cpumask_t cpumask;
 
-   mp_ncpus = platform_num_processors();
+   cpumask = platform_cpu_mask();
+   mp_ncpus = bitcount32(cpumask);
if (mp_ncpus <= 0)
mp_ncpus = 1;
 
-   mp_maxid = min(mp_ncpus, MAXCPU) - 1;
+   mp_maxid = min(fls(cpumask), MAXCPU) - 1;
 }
 
 void
@@ -231,24 +233,30 @@ void
 cpu_mp_start(void)
 {
int error, cpuid;
+   cpumask_t cpumask;
 
mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN);
 
-   all_cpus = 1;   /* BSP */
-   for (cpuid = 1; cpuid < platform_num_processors(); ++cpuid) {
+   all_cpus = 0;
+   cpumask = platform_cpu_mask();
+
+   while (cpumask != 0) {
+   cpuid = ffs(cpumask) - 1;
+   cpumask &= ~(1 << cpuid);
+
if (cpuid >= MAXCPU) {
printf("cpu_mp_start: ignoring AP #%d.\n", cpuid);
continue;
}
 
-   if ((error = start_ap(cpuid)) != 0) {
-   printf("AP #%d failed to start: %d\n", cpuid, error);
-   continue;
+   if (cpuid != platform_processor_id()) {
+   if ((error = start_ap(cpuid)) != 0) {
+   printf("AP #%d failed to start: %d\n", cpuid, 
error);
+   continue;
+   }
+   if (bootverbose)
+   printf("AP #%d started!\n", cpuid);
}
-   
-   if (bootverbose)
-   printf("AP #%d started!\n", cpuid);
-
all_cpus |= 1 << cpuid;
}
 

Modified: head/sys/mips/rmi/xlr_machdep.c
==
--- head/sys/mips/rmi/xlr_machdep.c Sat Feb 12 01:03:15 2011
(r218590)
+++ head/sys/mips/rmi/xlr_machdep.c Sat Feb 12 02:08:24 2011
(r218591)
@@ -614,11 +614,11 @@ platform_processor_id(void)
return (xlr_hwtid_to_cpuid[xlr_cpu_id()]);
 }
 
-int
-platform_num_processors(void)
+cpumask_t
+platform_cpu_mask(void)
 {
 
-   return (xlr_ncores * xlr_threads_per_core);
+   return (~0U >> (32 - (xlr_ncores * xlr_threads_per_core)));
 }
 
 struct cpu_group *

Modified: head/sys/mips/sibyte/sb_scd.c
==
--- head/sys/mips/sibyte/sb_scd.c   Sat Feb 12 01:03:15 2011
(r218590)
+++ h

svn commit: r218592 - head/sys/vm

2011-02-11 Thread Juli Mallett
Author: jmallett
Date: Sat Feb 12 02:10:08 2011
New Revision: 218592
URL: http://svn.freebsd.org/changeset/base/218592

Log:
  Use CPU_FOREACH rather than expecting CPUs 0 through mp_ncpus-1 to be present.
  Don't micro-optimize the uniprocessor case; use the same loop there.
  
  Submitted by: Bhanu Prakash
  Reviewed by:  kib, jhb

Modified:
  head/sys/vm/vm_meter.c

Modified: head/sys/vm/vm_meter.c
==
--- head/sys/vm/vm_meter.c  Sat Feb 12 02:08:24 2011(r218591)
+++ head/sys/vm/vm_meter.c  Sat Feb 12 02:10:08 2011(r218592)
@@ -254,16 +254,12 @@ vcnt(SYSCTL_HANDLER_ARGS)
 {
int count = *(int *)arg1;
int offset = (char *)arg1 - (char *)&cnt;
-#ifdef SMP
int i;
 
-   for (i = 0; i < mp_ncpus; ++i) {
+   CPU_FOREACH(i) {
struct pcpu *pcpu = pcpu_find(i);
count += *(int *)((char *)&pcpu->pc_cnt + offset);
}
-#else
-   count += *(int *)((char *)PCPU_PTR(cnt) + offset);
-#endif
return (SYSCTL_OUT(req, &count, sizeof(int)));
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218593 - head/sys/dev/ath

2011-02-11 Thread Adrian Chadd
Author: adrian
Date: Sat Feb 12 02:14:19 2011
New Revision: 218593
URL: http://svn.freebsd.org/changeset/base/218593

Log:
  The current code used the fields in ath_set11nratescenario()  . Use them
  correctly:
  
  * pass in whether to allow the hardware to override the duration field
in the main data frame (durupdate_en) - PS_POLL frames in particular
don't have the duration bit overriden;
  * there's no rts/cts duration here; that's done elsehwere

Modified:
  head/sys/dev/ath/if_ath_tx.c
  head/sys/dev/ath/if_ath_tx_ht.c
  head/sys/dev/ath/if_ath_tx_ht.h

Modified: head/sys/dev/ath/if_ath_tx.c
==
--- head/sys/dev/ath/if_ath_tx.cSat Feb 12 02:10:08 2011
(r218592)
+++ head/sys/dev/ath/if_ath_tx.cSat Feb 12 02:14:19 2011
(r218593)
@@ -812,7 +812,7 @@ ath_tx_start(struct ath_softc *sc, struc
 }
 
 if (ath_tx_is_11n(sc)) {
-ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, rate, 
try);
+ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == 
HAL_PKT_TYPE_PSPOLL), rate, try);
 }
 
ath_tx_handoff(sc, txq, bf);
@@ -998,7 +998,7 @@ ath_tx_raw_start(struct ath_softc *sc, s
 * notice that rix doesn't include any of the "magic" flags 
txrate
 * does for communicating "other stuff" to the HAL.
 */
-   ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, rate, try);
+   ath_buf_set_rate(sc, ni, bf, pktlen, flags, ctsrate, (atype == 
HAL_PKT_TYPE_PSPOLL), rate, try);
}
 
/* NB: no buffered multicast in power save support */

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==
--- head/sys/dev/ath/if_ath_tx_ht.c Sat Feb 12 02:10:08 2011
(r218592)
+++ head/sys/dev/ath/if_ath_tx_ht.c Sat Feb 12 02:14:19 2011
(r218593)
@@ -168,7 +168,7 @@ ath_rateseries_print(HAL_11N_RATE_SERIES
 
 void
 ath_buf_set_rate(struct ath_softc *sc, struct ieee80211_node *ni, struct 
ath_buf *bf,
-int pktlen, int flags, uint8_t ctsrate, uint8_t *rix, uint8_t *try)
+int pktlen, int flags, uint8_t ctsrate, int is_pspoll, uint8_t *rix, 
uint8_t *try)
 {
HAL_11N_RATE_SERIES series[4];
struct ath_desc *ds = bf->bf_desc;
@@ -189,8 +189,9 @@ ath_buf_set_rate(struct ath_softc *sc, s
 
/* Set rate scenario */
ath_hal_set11nratescenario(ah, ds,
+   !is_pspoll, /* whether to override the duration or not */
+   /* don't allow hardware to override the duration on 
ps-poll packets */
ctsrate,/* rts/cts rate */
-   0,  /* rts/cts duration */
series, /* 11n rate series */
4,  /* number of series */
flags);

Modified: head/sys/dev/ath/if_ath_tx_ht.h
==
--- head/sys/dev/ath/if_ath_tx_ht.h Sat Feb 12 02:10:08 2011
(r218592)
+++ head/sys/dev/ath/if_ath_tx_ht.h Sat Feb 12 02:14:19 2011
(r218593)
@@ -33,7 +33,7 @@
 
 extern voidath_buf_set_rate(struct ath_softc *sc,
struct ieee80211_node *ni, struct ath_buf *bf,
-   int pktlen, int flags, uint8_t ctsrate, uint8_t *rix,
-   uint8_t *try);
+   int pktlen, int flags, uint8_t ctsrate, int is_pspoll,
+   uint8_t *rix, uint8_t *try);
 
 #endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218594 - in head/sys/mips/cavium: . octe

2011-02-11 Thread Juli Mallett
Author: jmallett
Date: Sat Feb 12 02:41:33 2011
New Revision: 218594
URL: http://svn.freebsd.org/changeset/base/218594

Log:
  The Lanner MR-730 uses the first two MACs at its MAC base for the 10/100
  management ports, and gigabit ports start at an offset of 2 from the MAC
  base.

Modified:
  head/sys/mips/cavium/if_octm.c
  head/sys/mips/cavium/octe/ethernet-common.c

Modified: head/sys/mips/cavium/if_octm.c
==
--- head/sys/mips/cavium/if_octm.c  Sat Feb 12 02:14:19 2011
(r218593)
+++ head/sys/mips/cavium/if_octm.c  Sat Feb 12 02:41:33 2011
(r218594)
@@ -64,6 +64,8 @@
 #include 
 #include 
 
+extern cvmx_bootinfo_t *octeon_bootinfo;
+
 struct octm_softc {
struct ifnet *sc_ifp;
device_t sc_dev;
@@ -173,10 +175,27 @@ octm_attach(device_t dev)
return (ENXIO);
}
 
-   mac = cvmx_mgmt_port_get_mac(sc->sc_port);
-   if (mac == CVMX_MGMT_PORT_GET_MAC_ERROR) {
-   device_printf(dev, "unable to read MAC.\n");
-   return (ENXIO);
+   switch (cvmx_sysinfo_get()->board_type) {
+#if defined(OCTEON_VENDOR_LANNER)
+   case CVMX_BOARD_TYPE_CUST_LANNER_MR730:
+   /*
+* The MR-730 uses its first two MACs for the management
+* ports.
+*/
+   mac = 0;
+   memcpy((u_int8_t *)&mac + 2, octeon_bootinfo->mac_addr_base,
+  6);
+   mac += sc->sc_port;
+   cvmx_mgmt_port_set_mac(sc->sc_port, mac);
+   break;
+#endif
+   default:
+   mac = cvmx_mgmt_port_get_mac(sc->sc_port);
+   if (mac == CVMX_MGMT_PORT_GET_MAC_ERROR) {
+   device_printf(dev, "unable to read MAC.\n");
+   return (ENXIO);
+   }
+   break;
}
 
/* No watermark for input ring.  */

Modified: head/sys/mips/cavium/octe/ethernet-common.c
==
--- head/sys/mips/cavium/octe/ethernet-common.c Sat Feb 12 02:14:19 2011
(r218593)
+++ head/sys/mips/cavium/octe/ethernet-common.c Sat Feb 12 02:41:33 2011
(r218594)
@@ -279,6 +279,20 @@ int cvm_oct_common_init(struct ifnet *if
octeon_bootinfo->mac_addr_base[5] + count};
cvm_oct_private_t *priv = (cvm_oct_private_t *)ifp->if_softc;
 
+   switch (cvmx_sysinfo_get()->board_type) {
+#if defined(OCTEON_VENDOR_LANNER)
+   case CVMX_BOARD_TYPE_CUST_LANNER_MR730:
+   /*
+* The MR-730 uses its first two MACs for the management
+* ports.
+*/
+   mac[5] += 2;
+   break;
+#endif
+   default:
+   break;
+   }
+
ifp->if_mtu = ETHERMTU;
 
count++;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218595 - head/sys/boot/pc98/pc98boot

2011-02-11 Thread Takahashi Yoshihiro
Author: nyan
Date: Sat Feb 12 06:22:23 2011
New Revision: 218595
URL: http://svn.freebsd.org/changeset/base/218595

Log:
  Fix build.

Modified:
  head/sys/boot/pc98/pc98boot/Makefile

Modified: head/sys/boot/pc98/pc98boot/Makefile
==
--- head/sys/boot/pc98/pc98boot/MakefileSat Feb 12 02:41:33 2011
(r218594)
+++ head/sys/boot/pc98/pc98boot/MakefileSat Feb 12 06:22:23 2011
(r218595)
@@ -1,14 +1,22 @@
 # $FreeBSD$
 
 FILES= ${BOOT}
-SRCS=  ${BOOT0} ${BOOT05}
 CLEANFILES= ${BOOT} ${BOOT}.part
 
 BOOT=  pc98boot
+
+.if exists(${.OBJDIR}/../boot0)
+BOOT0= ${.OBJDIR}/../boot0/boot0
+.else
 BOOT0= ${.CURDIR}/../boot0/boot0
+.endif
+.if exists(${.OBJDIR}/../boot0.5)
+BOOT05=${.OBJDIR}/../boot0.5/boot0.5
+.else
 BOOT05=${.CURDIR}/../boot0.5/boot0.5
+.endif
 
-${BOOT}: ${SRCS} ${BOOT}.part
+${BOOT}: ${BOOT0} ${BOOT05} ${BOOT}.part
cat ${BOOT0} ${BOOT}.part ${BOOT05} > ${.TARGET}
 
 ${BOOT}.part:
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r218596 - head/sys/dev/ahci

2011-02-11 Thread Alexander Motin
Author: mav
Date: Sat Feb 12 07:06:40 2011
New Revision: 218596
URL: http://svn.freebsd.org/changeset/base/218596

Log:
  Disable NCQ for multiport Marvell 88SX61XX SATA controllers. Simultaneous
  active I/O to several disks (copying large file on ZFS) causes timeout after
  just a few seconds of run. Single port 88SX6111 seems like not affected.
  
  Skip reading transferred bytes count for these controllers. It works for
  88SX6111, but 88SX6145 always returns zero there. Haven't tested others,
  but better to be safe.

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

Modified: head/sys/dev/ahci/ahci.c
==
--- head/sys/dev/ahci/ahci.cSat Feb 12 06:22:23 2011(r218595)
+++ head/sys/dev/ahci/ahci.cSat Feb 12 07:06:40 2011(r218596)
@@ -114,6 +114,7 @@ static struct {
 #define AHCI_Q_SATA2   128
 #define AHCI_Q_NOBSYRES256
 #define AHCI_Q_NOAA512
+#define AHCI_Q_NOCOUNT 1024
 } ahci_ids[] = {
{0x43801002, 0x00, "ATI IXP600",0},
{0x43901002, 0x00, "ATI IXP700",0},
@@ -161,19 +162,19 @@ static struct {
{0x1c038086, 0x00, "Intel Cougar Point",0},
{0x1c048086, 0x00, "Intel Cougar Point",0},
{0x1c058086, 0x00, "Intel Cougar Point",0},
-   {0x23238086, 0x00, "Intel DH89xxCC",0},
-   {0x1d028086, 0x00, "Intel Patsburg",0},
-   {0x1d048086, 0x00, "Intel Patsburg",0},
-   {0x1d068086, 0x00, "Intel Patsburg",0},
{0x2361197b, 0x00, "JMicron JMB361",AHCI_Q_NOFORCE},
{0x2363197b, 0x00, "JMicron JMB363",AHCI_Q_NOFORCE},
{0x2365197b, 0x00, "JMicron JMB365",AHCI_Q_NOFORCE},
{0x2366197b, 0x00, "JMicron JMB366",AHCI_Q_NOFORCE},
{0x2368197b, 0x00, "JMicron JMB368",AHCI_Q_NOFORCE},
-   {0x61ab, 0x00, "Marvell 88SX6111",  
AHCI_Q_NOFORCE|AHCI_Q_1CH|AHCI_Q_EDGEIS},
-   {0x612111ab, 0x00, "Marvell 88SX6121",  
AHCI_Q_NOFORCE|AHCI_Q_2CH|AHCI_Q_EDGEIS},
-   {0x614111ab, 0x00, "Marvell 88SX6141",  
AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
-   {0x614511ab, 0x00, "Marvell 88SX6145",  
AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS},
+   {0x61ab, 0x00, "Marvell 88SX6111",  AHCI_Q_NOFORCE | AHCI_Q_1CH |
+   AHCI_Q_EDGEIS},
+   {0x612111ab, 0x00, "Marvell 88SX6121",  AHCI_Q_NOFORCE | AHCI_Q_2CH |
+   AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT},
+   {0x614111ab, 0x00, "Marvell 88SX6141",  AHCI_Q_NOFORCE | AHCI_Q_4CH |
+   AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT},
+   {0x614511ab, 0x00, "Marvell 88SX6145",  AHCI_Q_NOFORCE | AHCI_Q_4CH |
+   AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT},
{0x91231b4b, 0x11, "Marvell 88SE912x",  AHCI_Q_NOBSYRES},
{0x91231b4b, 0x00, "Marvell 88SE912x",  
AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES},
{0x06201103, 0x00, "HighPoint RocketRAID 620",  AHCI_Q_NOBSYRES},
@@ -1908,12 +1909,14 @@ ahci_end_transaction(struct ahci_slot *s
} else
bzero(res, sizeof(*res));
if ((ccb->ataio.cmd.flags & CAM_ATAIO_FPDMA) == 0 &&
-   (ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
+   (ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE &&
+   (ch->quirks & AHCI_Q_NOCOUNT) == 0) {
ccb->ataio.resid =
ccb->ataio.dxfer_len - le32toh(clp->bytecount);
}
} else {
-   if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
+   if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE &&
+   (ch->quirks & AHCI_Q_NOCOUNT) == 0) {
ccb->csio.resid =
ccb->csio.dxfer_len - le32toh(clp->bytecount);
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"