PERFORCE change 103866 for review
Roman Divacky
rdivacky at FreeBSD.org
Mon Aug 14 16:45:21 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103866
Change 103866 by rdivacky at rdivacky_witten on 2006/08/14 16:44:38
IFC
Affected files ...
.. //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/pmap.c#8 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/trap.c#5 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/conf/kern.post.mk#3 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/conf/kmod.mk#4 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em.c#7 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em.h#4 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp.c#5 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_pci.c#4 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/ispvar.h#3 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/dev/nfe/if_nfe.c#2 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/pmap.c#8 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_usrreq.c#8 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/modules/if_ef/Makefile#2 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/modules/if_ppp/Makefile#2 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/modules/netgraph/mppc/Makefile#2 integrate
.. //depot/projects/soc2006/rdivacky_linuxolator/modules/sound/sound/Makefile#3 integrate
Differences ...
==== //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/pmap.c#8 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.570 2006/08/11 19:22:55 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.571 2006/08/14 15:39:41 jhb Exp $");
/*
* Manages physical address maps.
@@ -2368,10 +2368,6 @@
if (pmap == kernel_pmap)
newpte |= PG_G;
- /* Preserve any caching attributes. */
- /* XXX: Should this be conditional on something? */
- newpte |= (origpte & (PG_PTE_PAT | PG_NC_PCD | PG_NC_PWT));
-
/*
* if the mapping or permission bits are different, we need
* to update the pte.
==== //depot/projects/soc2006/rdivacky_linuxolator/amd64/amd64/trap.c#5 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.308 2006/08/08 04:01:29 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.309 2006/08/14 06:15:16 alc Exp $");
/*
* AMD64 Trap and System call handling
@@ -568,11 +568,11 @@
/*
* PGEX_I is defined only if the execute disable bit capability is
- * supported and enabled; otherwise, that bit is reserved, i.e., zero.
+ * supported and enabled.
*/
if (frame->tf_err & PGEX_W)
ftype = VM_PROT_WRITE;
- else if (frame->tf_err & PGEX_I)
+ else if ((frame->tf_err & PGEX_I) && pg_nx != 0)
ftype = VM_PROT_EXECUTE;
else
ftype = VM_PROT_READ;
==== //depot/projects/soc2006/rdivacky_linuxolator/conf/kern.post.mk#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/kern.post.mk,v 1.95 2006/06/18 17:48:45 imp Exp $
+# $FreeBSD: src/sys/conf/kern.post.mk,v 1.96 2006/08/14 13:28:52 des Exp $
# Part of a unified Makefile for building kernels. This part includes all
# the definitions that need to be after all the % directives except %RULES
@@ -132,7 +132,7 @@
# in the a.out ld. For now, this works.
HACK_EXTRA_FLAGS?= -shared
hack.So: Makefile
- touch hack.c
+ :> hack.c
${CC} ${HACK_EXTRA_FLAGS} -nostdlib hack.c -o hack.So
rm -f hack.c
==== //depot/projects/soc2006/rdivacky_linuxolator/conf/kmod.mk#4 (text+ko) ====
@@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $FreeBSD: src/sys/conf/kmod.mk,v 1.209 2006/06/30 19:35:35 jkim Exp $
+# $FreeBSD: src/sys/conf/kmod.mk,v 1.210 2006/08/14 13:28:52 des Exp $
#
# The include file <bsd.kmod.mk> handles building and installing loadable
# kernel modules.
@@ -192,7 +192,7 @@
.if defined(EXPORT_SYMS)
.if ${EXPORT_SYMS} != YES
.if ${EXPORT_SYMS} == NO
- touch export_syms
+ :> export_syms
.elif !exists(${.CURDIR}/${EXPORT_SYMS})
echo ${EXPORT_SYMS} > export_syms
.else
@@ -311,7 +311,7 @@
CLEANFILES+= ${_src}
.if !target(${_src})
${_src}:
- touch ${.TARGET}
+ :> ${.TARGET}
.endif
.endfor
.endif
==== //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em.c#7 (text+ko) ====
@@ -31,7 +31,7 @@
***************************************************************************/
-/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.127 2006/08/11 10:58:23 glebius Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.131 2006/08/14 09:52:35 glebius Exp $*/
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
@@ -236,7 +236,7 @@
static void em_set_multi(struct adapter *);
static void em_print_hw_stats(struct adapter *);
static void em_update_link_status(struct adapter *);
-static int em_get_buf(int i, struct adapter *, struct mbuf *);
+static int em_get_buf(struct adapter *, int);
static void em_enable_vlans(struct adapter *);
static void em_disable_vlans(struct adapter *);
static int em_encap(struct adapter *, struct mbuf **);
@@ -1486,20 +1486,45 @@
tx_buffer = &adapter->tx_buffer_area[adapter->next_avail_tx_desc];
tx_buffer_last = tx_buffer;
map = tx_buffer->map;
- error = bus_dmamap_load_mbuf_sg(adapter->txtag, map, m_head, segs, &nsegs,
- BUS_DMA_NOWAIT);
- if (error != 0) {
+ error = bus_dmamap_load_mbuf_sg(adapter->txtag, map, *m_headp, segs,
+ &nsegs, BUS_DMA_NOWAIT);
+ if (error == EFBIG) {
+ struct mbuf *m;
+
+ m = m_defrag(*m_headp, M_DONTWAIT);
+ if (m == NULL) {
+ /* Assume m_defrag(9) used only m_get(9). */
+ adapter->mbuf_alloc_failed++;
+ m_freem(*m_headp);
+ *m_headp = NULL;
+ return (ENOBUFS);
+ }
+ *m_headp = m;
+ error = bus_dmamap_load_mbuf_sg(adapter->txtag, map, *m_headp,
+ segs, &nsegs, BUS_DMA_NOWAIT);
+ if (error != 0) {
+ adapter->no_tx_dma_setup++;
+ m_freem(*m_headp);
+ *m_headp = NULL;
+ return (error);
+ }
+ } else if (error != 0) {
adapter->no_tx_dma_setup++;
return (error);
}
- KASSERT(nsegs != 0, ("em_encap: empty packet"));
+ if (nsegs == 0) {
+ m_freem(*m_headp);
+ *m_headp = NULL;
+ return (EIO);
+ }
if (nsegs > adapter->num_tx_desc_avail) {
adapter->no_tx_desc_avail2++;
- error = ENOBUFS;
- goto encap_fail;
+ bus_dmamap_unload(adapter->txtag, map);
+ return (ENOBUFS);
}
+ m_head = *m_headp;
if (ifp->if_hwassist > 0)
em_transmit_checksum_setup(adapter, m_head, &txd_upper, &txd_lower);
else
@@ -1526,8 +1551,8 @@
if (txd_used == adapter->num_tx_desc_avail) {
adapter->next_avail_tx_desc = txd_saved;
adapter->no_tx_desc_avail2++;
- error = ENOBUFS;
- goto encap_fail;
+ bus_dmamap_unload(adapter->txtag, map);
+ return (ENOBUFS);
}
tx_buffer = &adapter->tx_buffer_area[i];
current_tx_desc = &adapter->tx_desc_base[i];
@@ -1599,10 +1624,6 @@
}
return (0);
-
-encap_fail:
- bus_dmamap_unload(adapter->txtag, map);
- return (error);
}
/*********************************************************************
@@ -2587,7 +2608,7 @@
(E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT);
if (adapter->hw.mac_type >= em_82571)
reg_tctl |= E1000_TCTL_MULR;
- if (adapter->link_duplex == 1) {
+ if (adapter->link_duplex == FULL_DUPLEX) {
reg_tctl |= E1000_FDX_COLLISION_DISTANCE << E1000_COLD_SHIFT;
} else {
reg_tctl |= E1000_HDX_COLLISION_DISTANCE << E1000_COLD_SHIFT;
@@ -2803,46 +2824,49 @@
*
**********************************************************************/
static int
-em_get_buf(int i, struct adapter *adapter, struct mbuf *mp)
+em_get_buf(struct adapter *adapter, int i)
{
- struct ifnet *ifp = adapter->ifp;
+ struct mbuf *m;
bus_dma_segment_t segs[1];
+ bus_dmamap_t map;
struct em_buffer *rx_buffer;
int error, nsegs;
- if (mp == NULL) {
- mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
- if (mp == NULL) {
- adapter->mbuf_cluster_failed++;
- return (ENOBUFS);
- }
- mp->m_len = mp->m_pkthdr.len = MCLBYTES;
- } else {
- mp->m_len = mp->m_pkthdr.len = MCLBYTES;
- mp->m_data = mp->m_ext.ext_buf;
- mp->m_next = NULL;
+ m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
+ if (m == NULL) {
+ adapter->mbuf_cluster_failed++;
+ return (ENOBUFS);
}
+ m->m_len = m->m_pkthdr.len = MCLBYTES;
+ if (adapter->hw.max_frame_size <= (MCLBYTES - ETHER_ALIGN))
+ m_adj(m, ETHER_ALIGN);
- if (ifp->if_mtu <= ETHERMTU)
- m_adj(mp, ETHER_ALIGN);
-
- rx_buffer = &adapter->rx_buffer_area[i];
-
/*
* Using memory from the mbuf cluster pool, invoke the
* bus_dma machinery to arrange the memory mapping.
*/
- error = bus_dmamap_load_mbuf_sg(adapter->rxtag, rx_buffer->map,
- mp, segs, &nsegs, 0);
+ error = bus_dmamap_load_mbuf_sg(adapter->rxtag, adapter->rx_sparemap,
+ m, segs, &nsegs, BUS_DMA_NOWAIT);
if (error != 0) {
- m_free(mp);
+ m_free(m);
return (error);
}
/* If nsegs is wrong then the stack is corrupt. */
KASSERT(nsegs == 1, ("Too many segments returned!"));
- rx_buffer->m_head = mp;
+
+ rx_buffer = &adapter->rx_buffer_area[i];
+ if (rx_buffer->m_head != NULL)
+ bus_dmamap_unload(adapter->rxtag, rx_buffer->map);
+
+ map = rx_buffer->map;
+ rx_buffer->map = adapter->rx_sparemap;
+ adapter->rx_sparemap = map;
+ bus_dmamap_sync(adapter->rxtag, rx_buffer->map, BUS_DMASYNC_PREREAD);
+ rx_buffer->m_head = m;
+
adapter->rx_desc_base[i].buffer_addr = htole64(segs[0].ds_addr);
- bus_dmamap_sync(adapter->rxtag, rx_buffer->map, BUS_DMASYNC_PREREAD);
+ /* Zero out the receive descriptors status. */
+ adapter->rx_desc_base[i].status = 0;
return (0);
}
@@ -2889,6 +2913,13 @@
goto fail;
}
+ error = bus_dmamap_create(adapter->rxtag, BUS_DMA_NOWAIT,
+ &adapter->rx_sparemap);
+ if (error) {
+ device_printf(dev, "%s: bus_dmamap_create failed: %d\n",
+ __func__, error);
+ goto fail;
+ }
rx_buffer = adapter->rx_buffer_area;
for (i = 0; i < adapter->num_rx_desc; i++, rx_buffer++) {
error = bus_dmamap_create(adapter->rxtag, BUS_DMA_NOWAIT,
@@ -2901,7 +2932,7 @@
}
for (i = 0; i < adapter->num_rx_desc; i++) {
- error = em_get_buf(i, adapter, NULL);
+ error = em_get_buf(adapter, i);
if (error)
goto fail;
}
@@ -3036,6 +3067,10 @@
INIT_DEBUGOUT("free_receive_structures: begin");
+ if (adapter->rx_sparemap) {
+ bus_dmamap_destroy(adapter->rxtag, adapter->rx_sparemap);
+ adapter->rx_sparemap = NULL;
+ }
if (adapter->rx_buffer_area != NULL) {
rx_buffer = adapter->rx_buffer_area;
for (i = 0; i < adapter->num_rx_desc; i++, rx_buffer++) {
@@ -3104,10 +3139,12 @@
struct mbuf *m = NULL;
mp = adapter->rx_buffer_area[i].m_head;
+ /*
+ * Can't defer bus_dmamap_sync(9) because TBI_ACCEPT
+ * needs to access the last received byte in the mbuf.
+ */
bus_dmamap_sync(adapter->rxtag, adapter->rx_buffer_area[i].map,
BUS_DMASYNC_POSTREAD);
- bus_dmamap_unload(adapter->rxtag,
- adapter->rx_buffer_area[i].map);
accept_frame = 1;
prev_len_adj = 0;
@@ -3146,14 +3183,9 @@
}
if (accept_frame) {
- if (em_get_buf(i, adapter, NULL) == ENOBUFS) {
- adapter->dropped_pkts++;
- em_get_buf(i, adapter, mp);
- if (adapter->fmp != NULL)
- m_freem(adapter->fmp);
- adapter->fmp = NULL;
- adapter->lmp = NULL;
- break;
+ if (em_get_buf(adapter, i) != 0) {
+ ifp->if_iqdrops++;
+ goto discard;
}
/* Assign correct length to the current fragment */
@@ -3187,7 +3219,8 @@
em_receive_checksum(adapter, current_desc,
adapter->fmp);
#ifndef __NO_STRICT_ALIGNMENT
- if (ifp->if_mtu > ETHERMTU &&
+ if (adapter->hw.max_frame_size >
+ (MCLBYTES - ETHER_ALIGN) &&
em_fixup_rx(adapter) != 0)
goto skip;
#endif
@@ -3203,16 +3236,25 @@
adapter->lmp = NULL;
}
} else {
- adapter->dropped_pkts++;
- em_get_buf(i, adapter, mp);
- if (adapter->fmp != NULL)
+ ifp->if_ierrors++;
+discard:
+ /* Reuse loaded DMA map and just update mbuf chain */
+ mp = adapter->rx_buffer_area[i].m_head;
+ mp->m_len = mp->m_pkthdr.len = MCLBYTES;
+ mp->m_data = mp->m_ext.ext_buf;
+ mp->m_next = NULL;
+ if (adapter->hw.max_frame_size <= (MCLBYTES - ETHER_ALIGN))
+ m_adj(mp, ETHER_ALIGN);
+ if (adapter->fmp != NULL) {
m_freem(adapter->fmp);
- adapter->fmp = NULL;
- adapter->lmp = NULL;
+ adapter->fmp = NULL;
+ adapter->lmp = NULL;
+ }
+ /* Zero out the receive descriptors status. */
+ adapter->rx_desc_base[i].status = 0;
+ m = NULL;
}
- /* Zero out the receive descriptors status. */
- current_desc->status = 0;
bus_dmamap_sync(adapter->rxdma.dma_tag, adapter->rxdma.dma_map,
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
@@ -3281,10 +3323,12 @@
n->m_next = m;
adapter->fmp = n;
} else {
- adapter->dropped_pkts++;
+ adapter->ifp->if_iqdrops++;
+ adapter->mbuf_alloc_failed++;
m_freem(adapter->fmp);
adapter->fmp = NULL;
- error = ENOMEM;
+ adapter->lmp = NULL;
+ error = ENOBUFS;
}
}
@@ -3556,9 +3600,9 @@
ifp->if_collisions = adapter->stats.colc;
/* Rx Errors */
- ifp->if_ierrors = adapter->dropped_pkts + adapter->stats.rxerrc +
- adapter->stats.crcerrs + adapter->stats.algnerrc + adapter->stats.ruc +
- adapter->stats.roc + adapter->stats.mpc + adapter->stats.cexterr;
+ ifp->if_ierrors = adapter->stats.rxerrc + adapter->stats.crcerrs +
+ adapter->stats.algnerrc + adapter->stats.ruc + adapter->stats.roc +
+ adapter->stats.mpc + adapter->stats.cexterr;
/* Tx Errors */
ifp->if_oerrors = adapter->stats.ecol + adapter->stats.latecol +
@@ -3611,8 +3655,6 @@
adapter->mbuf_alloc_failed);
device_printf(dev, "Std mbuf cluster failed = %ld\n",
adapter->mbuf_cluster_failed);
- device_printf(dev, "Driver dropped packets = %ld\n",
- adapter->dropped_pkts);
}
static void
==== //depot/projects/soc2006/rdivacky_linuxolator/dev/em/if_em.h#4 (text+ko) ====
@@ -31,7 +31,7 @@
***************************************************************************/
-/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.47 2006/08/03 19:05:04 pdeuskar Exp $*/
+/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.48 2006/08/14 01:50:54 yongari Exp $*/
#ifndef _EM_H_DEFINED_
#define _EM_H_DEFINED_
@@ -324,13 +324,13 @@
int rx_process_limit;
struct em_buffer *rx_buffer_area;
bus_dma_tag_t rxtag;
+ bus_dmamap_t rx_sparemap;
/* First/last mbuf pointers, for collecting multisegment RX packets. */
struct mbuf *fmp;
struct mbuf *lmp;
/* Misc stats maintained by the driver */
- unsigned long dropped_pkts;
unsigned long mbuf_alloc_failed;
unsigned long mbuf_cluster_failed;
unsigned long no_tx_desc_avail1;
==== //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp.c#5 (text+ko) ====
@@ -42,7 +42,7 @@
#endif
#ifdef __FreeBSD__
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.125 2006/08/05 04:21:20 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.126 2006/08/14 05:42:46 mjacob Exp $");
#include <dev/isp/isp_freebsd.h>
#endif
#ifdef __OpenBSD__
@@ -160,7 +160,7 @@
isp_reset(ispsoftc_t *isp)
{
mbreg_t mbs;
- uint16_t code_org;
+ uint32_t code_org;
int loops, i, dodnld = 1;
char *btype = "????";
@@ -654,36 +654,27 @@
}
/*
- * Verify that it downloaded correctly.
+ * If we're a 2322, the firmware actually comes in three chunks.
+ * We loaded the first at the code_org address. The other two
+ * chunks, which follow right after each other in memory here,
+ * get loaded at addresses specfied at offset 0x9..0xB.
*/
- MEMZERO(&mbs, sizeof (mbs));
- mbs.param[0] = MBOX_VERIFY_CHECKSUM;
- mbs.param[1] = code_org;
- isp_mboxcmd(isp, &mbs, MBLOGNONE);
- if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
- isp_prt(isp, ISP_LOGERR, "Ram Checksum Failure");
- return;
- }
-
- /*
- * If we're a 2322 or 2422, the firmware actually comes
- * in three chunks. We loaded the first at the code_org
- * address. The other two chunks, which follow right
- * after each other in memory here, get loaded at addresses
- * specfied at offset 0x9..0xB.
- */
if (IS_2322(isp)) {
+ uint32_t nxtaddr;
+ uint32_t offset;
- ptr = &ptr[ptr[3]];
+ nxtaddr = ptr[3];
+ ptr = &ptr[nxtaddr];
+ offset = ptr[5] | (((uint32_t)(ptr[4] & 0xff)) << 16);
isp->isp_mbxworkp = &ptr[1];
- isp->isp_mbxwrk0 = ptr[3] - 1;
- isp->isp_mbxwrk1 = ptr[5] + 1;
- isp->isp_mbxwrk8 = ptr[4];
+ isp->isp_mbxwrk0 = ptr[3] + 1;
+ isp->isp_mbxwrk1 = offset + 1;
+ isp->isp_mbxwrk8 = (offset + 1) >> 16;
MEMZERO(&mbs, sizeof (mbs));
mbs.param[0] = MBOX_WRITE_RAM_WORD_EXTENDED;
- mbs.param[1] = ptr[5];
+ mbs.param[1] = offset;
mbs.param[2] = ptr[0];
- mbs.param[8] = ptr[4];
+ mbs.param[8] = offset >> 16;
isp_mboxcmd(isp, &mbs, MBLOGNONE);
if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
isp_prt(isp, ISP_LOGERR,
@@ -691,24 +682,39 @@
return;
}
- ptr = &ptr[ptr[3]];
+ nxtaddr = ptr[3];
+ ptr = &ptr[nxtaddr];
+ offset = ptr[5] | (((uint32_t)(ptr[4] & 0xff)) << 16);
isp->isp_mbxworkp = &ptr[1];
isp->isp_mbxwrk0 = ptr[3] - 1;
- isp->isp_mbxwrk1 = ptr[5] + 1;
- isp->isp_mbxwrk8 = ptr[4];
+ isp->isp_mbxwrk1 = (offset + 1);
+ isp->isp_mbxwrk8 = (offset + 1) >> 16;
MEMZERO(&mbs, sizeof (mbs));
mbs.param[0] = MBOX_WRITE_RAM_WORD_EXTENDED;
- mbs.param[1] = ptr[5];
+ mbs.param[1] = offset;
mbs.param[2] = ptr[0];
- mbs.param[8] = ptr[4];
+ mbs.param[8] = offset >> 16;
isp_mboxcmd(isp, &mbs, MBLOGNONE);
if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
isp_prt(isp, ISP_LOGERR,
"Transmit Sequencer F/W Load Failed");
return;
}
+ } else {
+ /*
+ * Verify that it downloaded correctly.
+ */
+ MEMZERO(&mbs, sizeof (mbs));
+ mbs.param[0] = MBOX_VERIFY_CHECKSUM;
+ mbs.param[1] = code_org;
+ isp_mboxcmd(isp, &mbs, MBLOGNONE);
+ if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
+ isp_prt(isp, ISP_LOGERR,
+ "Downloaded RISC Code Checksum Failure");
+ return;
+ }
+
}
-
isp->isp_loaded_fw = 1;
} else {
isp->isp_loaded_fw = 0;
@@ -732,9 +738,15 @@
} else {
mbs.param[2] = 1;
}
- mbs.obits |= 2;
}
isp_mboxcmd(isp, &mbs, MBLOGNONE);
+ if (IS_2322(isp) || IS_24XX(isp)) {
+ if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
+ isp_prt(isp, ISP_LOGERR, "EXEC F/W failed: 0x%x",
+ mbs.param[0]);
+ return;
+ }
+ }
/*
* Give it a chance to start.
@@ -1547,7 +1559,7 @@
mbs.param[0] = MBOX_GET_PORT_DB;
if (IS_2KLOGIN(isp)) {
mbs.param[1] = id;
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
} else {
mbs.param[1] = id << 8;
}
@@ -1577,7 +1589,7 @@
mbs.param[0] = MBOX_GET_PORT_NAME;
if (IS_2KLOGIN(isp)) {
mbs.param[1] = loopid;
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
if (nodename) {
mbs.param[10] = 1;
}
@@ -2043,7 +2055,7 @@
mbs.param[0] = MBOX_FABRIC_LOGOUT;
if (IS_2KLOGIN(isp)) {
mbs.param[1] = lp->loopid;
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
} else {
mbs.param[1] = lp->loopid << 8;
}
@@ -2069,7 +2081,7 @@
mbs.param[0] = MBOX_FABRIC_LOGIN;
if (IS_2KLOGIN(isp)) {
mbs.param[1] = loopid;
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
} else {
mbs.param[1] = loopid << 8;
}
@@ -2195,7 +2207,7 @@
mbs.param[0] = MBOX_FABRIC_LOGOUT;
if (IS_2KLOGIN(isp)) {
mbs.param[1] = lp->loopid;
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
} else {
mbs.param[1] = lp->loopid << 8;
}
@@ -3488,7 +3500,7 @@
} else {
if (IS_2KLOGIN(isp)) {
mbs.param[1] = tgt;
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
} else {
mbs.param[1] = (tgt << 8);
}
@@ -3583,7 +3595,7 @@
if (IS_FC(isp)) {
mbs.param[0] = MBOX_INIT_LIP;
if (IS_2KLOGIN(isp)) {
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
}
isp_mboxcmd(isp, &mbs, MBLOGALL);
if (mbs.param[0] == MBOX_COMMAND_COMPLETE) {
@@ -4865,7 +4877,7 @@
MEMZERO(&mbs, sizeof (mbs));
mbs.param[0] = MBOX_INIT_LIP;
if (IS_2KLOGIN(isp)) {
- mbs.obits |= (1 << 10);
+ mbs.ibits |= (1 << 10);
}
isp_mboxcmd_qnw(isp, &mbs, 1);
}
@@ -4946,6 +4958,7 @@
{
mbreg_t mbs;
uint16_t *ptr;
+ uint32_t offset;
switch (isp->isp_lastmbxcmd) {
case MBOX_WRITE_RAM_WORD:
@@ -4974,33 +4987,37 @@
ptr = isp->isp_mbxworkp;
switch (isp->isp_lastmbxcmd) {
case MBOX_WRITE_RAM_WORD:
- mbs.param[2] = *ptr++;
- mbs.param[1] = isp->isp_mbxwrk1++;
- break;
- case MBOX_WRITE_RAM_WORD_EXTENDED:
- mbs.param[2] = *ptr++;
- mbs.param[1] = isp->isp_mbxwrk1++;
- if (isp->isp_mbxwrk1 == 0) {
- isp->isp_mbxwrk8++;
- }
- mbs.param[8] = isp->isp_mbxwrk8;
+ mbs.param[1] = isp->isp_mbxwrk1++;;
+ mbs.param[2] = *ptr++;;
break;
case MBOX_READ_RAM_WORD:
*ptr++ = isp->isp_mboxtmp[2];
mbs.param[1] = isp->isp_mbxwrk1++;
break;
+ case MBOX_WRITE_RAM_WORD_EXTENDED:
+ offset = isp->isp_mbxwrk1;
+ offset |= ((uint32_t) isp->isp_mbxwrk8 << 16);
+
+ mbs.param[2] = *ptr++;;
+ mbs.param[1] = offset;
+ mbs.param[8] = offset >> 16;
+ isp->isp_mbxwrk1 = ++offset;
+ isp->isp_mbxwrk8 = offset >> 16;
+ break;
case MBOX_READ_RAM_WORD_EXTENDED:
+ offset = isp->isp_mbxwrk1;
+ offset |= ((uint32_t) isp->isp_mbxwrk8 << 16);
+
*ptr++ = isp->isp_mboxtmp[2];
- mbs.param[1] = isp->isp_mbxwrk1++;
- if (isp->isp_mbxwrk1 == 0) {
- isp->isp_mbxwrk8++;
- }
- mbs.param[8] = isp->isp_mbxwrk8;
+ mbs.param[1] = offset;
+ mbs.param[8] = offset >> 16;
+ isp->isp_mbxwrk1 = ++offset;
+ isp->isp_mbxwrk8 = offset >> 16;
break;
}
isp->isp_mbxworkp = ptr;
+ isp->isp_mbxwrk0--;
mbs.param[0] = isp->isp_lastmbxcmd;
- isp->isp_mbxwrk0 -= 1;
isp_mboxcmd_qnw(isp, &mbs, 0);
return (0);
}
@@ -5017,7 +5034,7 @@
ISPOPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */
ISPOPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */
ISPOPMAP(0x3f, 0x3f), /* 0x06: MBOX_MAILBOX_REG_TEST */
- ISPOPMAP(0x03, 0x07), /* 0x07: MBOX_VERIFY_CHECKSUM */
+ ISPOPMAP(0x07, 0x07), /* 0x07: MBOX_VERIFY_CHECKSUM */
ISPOPMAP(0x01, 0x0f), /* 0x08: MBOX_ABOUT_FIRMWARE */
ISPOPMAP(0x00, 0x00), /* 0x09: */
ISPOPMAP(0x00, 0x00), /* 0x0a: */
@@ -5208,7 +5225,7 @@
static const uint32_t mbpfc[] = {
ISPOPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */
ISPOPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */
- ISPOPMAP(0x03, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */
+ ISPOPMAP(0x07, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */
ISPOPMAP(0xdf, 0x01), /* 0x03: MBOX_DUMP_RAM */
ISPOPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */
ISPOPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */
@@ -5219,9 +5236,9 @@
ISPOPMAP(0xdf, 0x01), /* 0x0a: DUMP RAM */
ISPOPMAP(0x00, 0x00), /* 0x0b: */
ISPOPMAP(0x00, 0x00), /* 0x0c: */
- ISPOPMAP(0x13, 0x01), /* 0x0d: MBOX_WRITE_RAM_WORD_EXTENDED) */
+ ISPOPMAP(0x10f, 0x01), /* 0x0d: MBOX_WRITE_RAM_WORD_EXTENDED) */
ISPOPMAP(0x01, 0x05), /* 0x0e: MBOX_CHECK_FIRMWARE */
- ISPOPMAP(0x13, 0x05), /* 0x0f: MBOX_READ_RAM_WORD_EXTENDED */
+ ISPOPMAP(0x10f, 0x05), /* 0x0f: MBOX_READ_RAM_WORD_EXTENDED */
ISPOPMAP(0x1f, 0x11), /* 0x10: MBOX_INIT_REQ_QUEUE */
ISPOPMAP(0x2f, 0x21), /* 0x11: MBOX_INIT_RES_QUEUE */
ISPOPMAP(0x0f, 0x01), /* 0x12: MBOX_EXECUTE_IOCB */
@@ -5511,7 +5528,7 @@
* command.
*/
if (nodelay) {
- USEC_DELAY(1000);
+ USEC_DELAY(100);
}
}
==== //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/isp_pci.c#4 (text+ko) ====
@@ -30,7 +30,7 @@
* FreeBSD Version.
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.118 2006/07/16 20:11:49 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.119 2006/08/14 05:36:26 mjacob Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1127,7 +1127,7 @@
#define IspVirt2Off(a, x) \
(((struct isp_pcisoftc *)a)->pci_poff[((x) & _BLK_REG_MASK) >> \
- _BLK_REG_SHFT] + ((x) & 0xff))
+ _BLK_REG_SHFT] + ((x) & 0xfff))
#define BXR2(pcs, off) \
bus_space_read_2(pcs->pci_st, pcs->pci_sh, off)
==== //depot/projects/soc2006/rdivacky_linuxolator/dev/isp/ispvar.h#3 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/isp/ispvar.h,v 1.76 2006/07/03 08:24:09 mjacob Exp $ */
+/* $FreeBSD: src/sys/dev/isp/ispvar.h,v 1.77 2006/08/14 05:35:41 mjacob Exp $ */
/*-
* Soft Definitions for for Qlogic ISP SCSI adapters.
*
@@ -557,7 +557,8 @@
#define IS_FC(isp) ((isp)->isp_type & ISP_HA_FC)
#define IS_2100(isp) ((isp)->isp_type == ISP_HA_FC_2100)
#define IS_2200(isp) ((isp)->isp_type == ISP_HA_FC_2200)
-#define IS_23XX(isp) ((isp)->isp_type >= ISP_HA_FC_2300)
+#define IS_23XX(isp) \
+ ((isp)->isp_type >= ISP_HA_FC_2300 && (isp)->isp_type < ISP_HA_FC_2400)
#define IS_2300(isp) ((isp)->isp_type == ISP_HA_FC_2300)
#define IS_2312(isp) ((isp)->isp_type == ISP_HA_FC_2312)
#define IS_2322(isp) ((isp)->isp_type == ISP_HA_FC_2322)
==== //depot/projects/soc2006/rdivacky_linuxolator/dev/nfe/if_nfe.c#2 (text+ko) ====
@@ -21,7 +21,7 @@
/* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.2 2006/06/26 23:41:07 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.3 2006/08/14 15:35:43 ru Exp $");
/* Uncomment the following line to enable polling. */
/* #define DEVICE_POLLING */
@@ -652,7 +652,7 @@
physaddr = jbuf->physaddr;
} else {
error = bus_dma_tag_create(sc->nfe_parent_tag,
- PAGE_SIZE, 0, /* alignment, boundary */
+ ETHER_ALIGN, 0, /* alignment, boundary */
BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
NULL, NULL, /* filter, filterarg */
@@ -681,7 +681,7 @@
error = bus_dmamap_load(data->rx_data_tag, data->rx_data_map, mtod(data->m, void *),
MCLBYTES, nfe_dma_map_segs, &data->rx_data_segs, BUS_DMA_NOWAIT);
if (error != 0) {
- printf("nfe%d: could not load rx buf DMA map", sc->nfe_unit);
+ printf("nfe%d: could not load rx buf DMA map\n", sc->nfe_unit);
goto fail;
}
==== //depot/projects/soc2006/rdivacky_linuxolator/i386/i386/pmap.c#8 (text+ko) ====
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.574 2006/08/11 19:22:56 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.575 2006/08/14 15:39:41 jhb Exp $");
/*
* Manages physical address maps.
@@ -2443,10 +2443,6 @@
if (pmap == kernel_pmap)
newpte |= pgeflag;
- /* Preserve any caching attributes. */
- /* XXX: Should this be conditional on something? */
- newpte |= (origpte & (PG_PTE_PAT | PG_NC_PCD | PG_NC_PWT));
-
/*
* if the mapping or permission bits are different, we need
* to update the pte.
==== //depot/projects/soc2006/rdivacky_linuxolator/kern/uipc_usrreq.c#8 (text+ko) ====
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.186 2006/08/07 12:02:42 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.187 2006/08/13 23:16:59 rwatson Exp $");
#include "opt_mac.h"
@@ -263,7 +263,6 @@
KASSERT(so->so_pcb == NULL, ("uipc_attach: so_pcb != NULL"));
if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
switch (so->so_type) {
-
case SOCK_STREAM:
error = soreserve(so, unpst_sendspace, unpst_recvspace);
break;
@@ -288,8 +287,8 @@
UNP_LOCK();
unp->unp_gencnt = ++unp_gencnt;
unp_count++;
- LIST_INSERT_HEAD(so->so_type == SOCK_DGRAM ? &unp_dhead
- : &unp_shead, unp, unp_link);
+ LIST_INSERT_HEAD(so->so_type == SOCK_DGRAM ? &unp_dhead : &unp_shead,
+ unp, unp_link);
UNP_UNLOCK();
return (0);
@@ -1059,7 +1058,6 @@
KASSERT(unp2 != NULL, ("unp_connect2: unp2 == NULL"));
unp->unp_conn = unp2;
switch (so->so_type) {
-
case SOCK_DGRAM:
LIST_INSERT_HEAD(&unp2->unp_refs, unp, unp_reflink);
soisconnected(so);
==== //depot/projects/soc2006/rdivacky_linuxolator/modules/if_ef/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/if_ef/Makefile,v 1.13 2006/02/24 12:27:09 yar Exp $
+# $FreeBSD: src/sys/modules/if_ef/Makefile,v 1.14 2006/08/14 13:28:52 des Exp $
.PATH: ${.CURDIR}/../../net
@@ -19,16 +19,16 @@
#ETHER_SNAP=
opt_inet.h:
- echo "#define INET 1" > opt_inet.h
+ echo "#define INET 1" > ${.TARGET}
opt_ipx.h:
- echo "#define IPX 1" > opt_ipx.h
+ echo "#define IPX 1" > ${.TARGET}
opt_ef.h:
- touch opt_ef.h
+ :> ${.TARGET}
.for frame in ETHER_II ETHER_8023 ETHER_8022 ETHER_SNAP
.if defined(${frame})
- echo "#define ${frame} 1" >> opt_ef.h
+ echo "#define ${frame} 1" >> ${.TARGET}
.endif
.endfor
.endif
==== //depot/projects/soc2006/rdivacky_linuxolator/modules/if_ppp/Makefile#2 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/if_ppp/Makefile,v 1.35 2006/02/27 16:56:22 wkoszek Exp $
+# $FreeBSD: src/sys/modules/if_ppp/Makefile,v 1.36 2006/08/14 13:28:53 des Exp $
.PATH: ${.CURDIR}/../../net
@@ -22,16 +22,16 @@
.if !defined(KERNBUILDDIR)
.if ${PPP_INET} > 0
opt_inet.h:
- echo "#define INET 1" >> ${.TARGET}
+ echo "#define INET 1" > ${.TARGET}
.endif
.if ${PPP_IPX} > 0
opt_ipx.h:
- echo "#define IPX ${PPP_IPX}" >> ${.TARGET}
+ echo "#define IPX ${PPP_IPX}" > ${.TARGET}
.endif
opt_ppp.h:
- touch ${.TARGET}
+ :> ${.TARGET}
.if ${PPP_BSDCOMP} > 0
echo "#define PPP_BSDCOMP ${PPP_BSDCOMP}" >> ${.TARGET}
.endif
==== //depot/projects/soc2006/rdivacky_linuxolator/modules/netgraph/mppc/Makefile#2 (text+ko) ====
@@ -1,5 +1,5 @@
# $Whistle: Makefile,v 1.1 1999/12/08 20:20:39 archie Exp $
-# $FreeBSD: src/sys/modules/netgraph/mppc/Makefile,v 1.13 2005/10/14 23:30:13 yar Exp $
+# $FreeBSD: src/sys/modules/netgraph/mppc/Makefile,v 1.14 2006/08/14 13:28:53 des Exp $
KMOD= ng_mppc
SRCS= ng_mppc.c opt_netgraph.h
@@ -20,7 +20,7 @@
.if !defined(KERNBUILDDIR)
opt_netgraph.h:
- touch ${.TARGET}
+ :> ${.TARGET}
.if ${NETGRAPH_MPPC_COMPRESSION} > 0
echo "#define NETGRAPH_MPPC_COMPRESSION 1" >> ${.TARGET}
.endif
==== //depot/projects/soc2006/rdivacky_linuxolator/modules/sound/sound/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/sound/sound/Makefile,v 1.18 2006/05/27 16:32:05 netchild Exp $
+# $FreeBSD: src/sys/modules/sound/sound/Makefile,v 1.19 2006/08/14 13:28:53 des Exp $
.PATH: ${.CURDIR}/../../../dev/sound/pcm
.PATH: ${.CURDIR}/../../../dev/sound/midi
@@ -22,7 +22,7 @@
# existing one from KERNBUILDDIR which possibly has DEV_ISA defined so
# sound.ko is always built without isadma support.
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list