PERFORCE change 168776 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue Sep 22 15:45:36 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=168776
Change 168776 by trasz at trasz_victim on 2009/09/22 15:45:14
IFC.
Affected files ...
.. //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/Makefile#20 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/VOP_ACCESS.9#9 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/acl.9#8 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/vaccess.9#4 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/amd64/conf/NOTES#13 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/conf/NOTES#41 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files#51 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files.amd64#19 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files.i386#21 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/ata/chipsets/ata-marvell.c#10 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/if_ndis/if_ndis.c#21 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/kbd/kbd.c#6 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/mxge/if_mxge.c#11 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/sound/pci/es137x.c#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/sound/pci/es137x.h#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/sound/pci/t4dwave.c#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/i386/conf/NOTES#16 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_nfs4.c#51 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/modules/Makefile#33 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/sys/vnode.h#34 integrate
Differences ...
==== //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/Makefile#20 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/share/man/man9/Makefile,v 1.359 2009/08/23 07:48:11 julian Exp $
+# $FreeBSD: src/share/man/man9/Makefile,v 1.360 2009/09/22 15:15:03 trasz Exp $
MAN= accept_filter.9 \
accf_data.9 \
==== //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/VOP_ACCESS.9#9 (text+ko) ====
@@ -27,9 +27,9 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/VOP_ACCESS.9,v 1.26 2009/06/01 07:48:27 trasz Exp $
+.\" $FreeBSD: src/share/man/man9/VOP_ACCESS.9,v 1.27 2009/09/22 15:15:03 trasz Exp $
.\"
-.Dd June 1, 2009
+.Dd September 18, 2009
.Os
.Dt VOP_ACCESS 9
.Sh NAME
==== //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/acl.9#8 (text+ko) ====
@@ -23,9 +23,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/acl.9,v 1.19 2009/05/24 20:34:29 trasz Exp $
+.\" $FreeBSD: src/share/man/man9/acl.9,v 1.20 2009/09/22 15:15:03 trasz Exp $
.\"
-.Dd December 23, 1999
+.Dd September 18, 2009
.Os
.Dt ACL 9
.Sh NAME
@@ -207,6 +207,7 @@
.El
.Sh SEE ALSO
.Xr acl 3 ,
+.Xr vaccess_acl_nfs4 9 ,
.Xr vaccess_acl_posix1e 9 ,
.Xr vaccess_acl_nfs4 9 ,
.Xr VFS 9 ,
==== //depot/projects/soc2008/trasz_nfs4acl/share/man/man9/vaccess.9#4 (text+ko) ====
@@ -23,9 +23,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/man/man9/vaccess.9,v 1.10 2008/10/28 13:44:11 trasz Exp $
+.\" $FreeBSD: src/share/man/man9/vaccess.9,v 1.11 2009/09/22 15:15:03 trasz Exp $
.\"
-.Dd August 22, 2001
+.Dd September 18, 2009
.Os
.Dt VACCESS 9
.Sh NAME
@@ -117,6 +117,7 @@
appropriate privileges or to the owner of a file or other resource.
.El
.Sh SEE ALSO
+.Xr vaccess_acl_nfs4 9 ,
.Xr vaccess_acl_posix1e 9 ,
.Xr vnode 9 ,
.Xr VOP_ACCESS 9
==== //depot/projects/soc2008/trasz_nfs4acl/sys/amd64/conf/NOTES#13 (text+ko) ====
@@ -4,7 +4,7 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.95 2009/09/21 07:08:20 delphij Exp $
+# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.96 2009/09/21 23:58:29 delphij Exp $
#
#
@@ -160,6 +160,11 @@
# Turn on extra debugging checks and output for VESA support.
options VESA_DEBUG
+device dpms # DPMS suspend & resume via VESA BIOS
+
+# x86 real mode BIOS emulator, required by atkbdc/dpms/vesa
+options X86BIOS
+
#
# Optional devices:
#
==== //depot/projects/soc2008/trasz_nfs4acl/sys/conf/NOTES#41 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1556 2009/09/21 08:17:57 delphij Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1557 2009/09/21 23:58:29 delphij Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -2757,5 +2757,3 @@
options BROOKTREE_ALLOC_PAGES=(217*4+1)
options MAXFILES=999
-# x86 real mode emulator
-options X86BIOS
==== //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files#51 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1468 2009/09/21 08:24:22 delphij Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1470 2009/09/22 15:15:03 trasz Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -2009,6 +2009,7 @@
kern/serdev_if.m standard
kern/stack_protector.c standard \
compile-with "${NORMAL_C:N-fstack-protector*}"
+kern/subr_acl_nfs4.c standard
kern/subr_acl_posix1e.c standard
kern/subr_acl_nfs4.c standard
kern/subr_autoconf.c standard
@@ -2829,8 +2830,3 @@
dev/xen/xenpci/xenpci.c optional xenpci
dev/xen/xenpci/evtchn.c optional xenpci
dev/xen/xenpci/machine_reboot.c optional xenpci
-dev/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa
-dev/x86bios/x86bios_alloc.c optional x86bios | atkbd | dpms | vesa
-contrib/x86emu/x86emu.c optional x86bios | atkbd | dpms | vesa
-contrib/x86emu/x86emu_util.c optional x86bios | atkbd | dpms | vesa
-
==== //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files.amd64#19 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.amd64,v 1.143 2009/09/21 07:08:20 delphij Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.144 2009/09/22 07:10:23 delphij Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -294,3 +294,11 @@
#
libkern/memmove.c standard
libkern/memset.c standard
+#
+# x86 real mode BIOS emulator, required by atkbdc/dpms/vesa
+#
+dev/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa
+dev/x86bios/x86bios_alloc.c optional x86bios | atkbd | dpms | vesa
+contrib/x86emu/x86emu.c optional x86bios | atkbd | dpms | vesa
+contrib/x86emu/x86emu_util.c optional x86bios | atkbd | dpms | vesa
+
==== //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files.i386#21 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.i386,v 1.629 2009/09/21 07:08:20 delphij Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.630 2009/09/22 07:10:23 delphij Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -378,3 +378,10 @@
i386/xbox/xboxfb.c optional xboxfb
dev/fb/boot_font.c optional xboxfb
i386/xbox/pic16l.s optional xbox
+#
+# x86 real mode BIOS emulator, required by atkbdc/dpms/vesa
+#
+dev/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa
+dev/x86bios/x86bios_alloc.c optional x86bios | atkbd | dpms | vesa
+contrib/x86emu/x86emu.c optional x86bios | atkbd | dpms | vesa
+contrib/x86emu/x86emu_util.c optional x86bios | atkbd | dpms | vesa
==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/ata/chipsets/ata-marvell.c#10 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-marvell.c,v 1.11 2009/09/08 13:19:05 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/chipsets/ata-marvell.c,v 1.12 2009/09/22 11:47:21 marius Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -227,6 +227,8 @@
work = ch->dma.work_bus;
/* clear work area */
bzero(ch->dma.work, 1024+256);
+ bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
+ BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
/* set legacy ATA resources */
for (i = ATA_DATA; i <= ATA_COMMAND; i++) {
@@ -310,7 +312,11 @@
static int
ata_marvell_edma_ch_detach(device_t dev)
{
+ struct ata_channel *ch = device_get_softc(dev);
+ if (ch->dma.work_tag && ch->dma.work_map)
+ bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
+ BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
ata_dmafini(dev);
return (0);
}
@@ -344,8 +350,6 @@
struct ata_channel *ch = device_get_softc(request->parent);
u_int32_t req_in;
u_int8_t *bytep;
- u_int16_t *wordp;
- u_int32_t *quadp;
int i;
int error, slot;
@@ -374,13 +378,14 @@
slot = (((req_in & ~0xfffffc00) >> 5) + 0) & 0x1f;
bytep = (u_int8_t *)(ch->dma.work);
bytep += (slot << 5);
- wordp = (u_int16_t *)bytep;
- quadp = (u_int32_t *)bytep;
/* fill in this request */
- quadp[0] = (long)request->dma->sg_bus & 0xffffffff;
- quadp[1] = (u_int64_t)request->dma->sg_bus >> 32;
- wordp[4] = (request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag<<1);
+ le32enc(bytep + 0 * sizeof(u_int32_t),
+ request->dma->sg_bus & 0xffffffff);
+ le32enc(bytep + 1 * sizeof(u_int32_t),
+ (u_int64_t)request->dma->sg_bus >> 32);
+ le16enc(bytep + 4 * sizeof(u_int16_t),
+ (request->flags & ATA_R_READ ? 0x01 : 0x00) | (request->tag << 1));
i = 10;
bytep[i++] = (request->u.ata.count >> 8) & 0xff;
@@ -409,6 +414,9 @@
bytep[i++] = request->u.ata.command;
bytep[i++] = 0x90 | ATA_COMMAND;
+ bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
+ BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
+
/* enable EDMA machinery if needed */
if (!(ATA_INL(ctlr->r_res1, 0x02028 + ATA_MV_EDMA_BASE(ch)) & 0x00000001)) {
ATA_OUTL(ctlr->r_res1, 0x02028 + ATA_MV_EDMA_BASE(ch), 0x00000001);
@@ -451,6 +459,8 @@
slot = (((rsp_in & ~0xffffff00) >> 3)) & 0x1f;
rsp_out &= 0xffffff00;
rsp_out += (slot << 3);
+ bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
+ BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
response = (struct ata_marvell_response *)
(ch->dma.work + 1024 + (slot << 3));
@@ -525,6 +535,7 @@
prd[i].addrlo = htole32(segs[i].ds_addr);
prd[i].count = htole32(segs[i].ds_len);
prd[i].addrhi = htole32((u_int64_t)segs[i].ds_addr >> 32);
+ prd[i].reserved = 0;
}
prd[i - 1].count |= htole32(ATA_DMA_EOT);
KASSERT(nsegs <= ATA_DMA_ENTRIES, ("too many DMA segment entries\n"));
==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/if_ndis/if_ndis.c#21 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.166 2009/07/20 23:21:19 cokane Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.167 2009/09/22 12:36:51 cokane Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1012,7 +1012,12 @@
ndis_vap_delete(struct ieee80211vap *vap)
{
struct ndis_vap *nvp = NDIS_VAP(vap);
+ struct ieee80211com *ic = vap->iv_ic;
+ struct ifnet *ifp = ic->ic_ifp;
+ struct ndis_softc *sc = ifp->if_softc;
+ ndis_stop(sc);
+ callout_drain(&sc->ndis_scan_callout);
ieee80211_vap_detach(vap);
free(nvp, M_80211_VAP);
}
==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/kbd/kbd.c#6 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/kbd/kbd.c,v 1.51 2009/09/19 17:56:26 ed Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/kbd/kbd.c,v 1.52 2009/09/22 11:29:11 ed Exp $");
#include "opt_kbd.h"
@@ -728,7 +728,7 @@
size_t len;
u_char *cp;
int mode;
- int c;
+ u_int c;
/* assert(KBD_IS_VALID(kbd)) */
sc = (genkbd_softc_t *)arg;
==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/mxge/if_mxge.c#11 (text+ko) ====
@@ -28,7 +28,7 @@
***************************************************************************/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mxge/if_mxge.c,v 1.65 2009/09/21 14:41:07 gallatin Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mxge/if_mxge.c,v 1.66 2009/09/21 20:16:10 gallatin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -144,7 +144,7 @@
static int mxge_load_firmware(mxge_softc_t *sc, int adopt);
static int mxge_send_cmd(mxge_softc_t *sc, uint32_t cmd, mxge_cmd_t *data);
-static int mxge_close(mxge_softc_t *sc);
+static int mxge_close(mxge_softc_t *sc, int down);
static int mxge_open(mxge_softc_t *sc);
static void mxge_tick(void *arg);
@@ -1309,8 +1309,7 @@
ss->lro_queued = 0;
ss->lro_flushed = 0;
if (ss->fw_stats != NULL) {
- ss->fw_stats->valid = 0;
- ss->fw_stats->send_done_count = 0;
+ bzero(ss->fw_stats, sizeof *ss->fw_stats);
}
}
sc->rdma_tags_available = 15;
@@ -1421,7 +1420,7 @@
ifp->if_capenable |= IFCAP_LRO;
sc->lro_cnt = lro_cnt;
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- mxge_close(sc);
+ mxge_close(sc, 0);
err = mxge_open(sc);
}
return err;
@@ -1537,6 +1536,10 @@
"read_write_dma_MBs",
CTLFLAG_RD, &sc->read_write_dma,
0, "DMA concurrent Read/Write speed in MB/s");
+ SYSCTL_ADD_INT(ctx, children, OID_AUTO,
+ "watchdog_resets",
+ CTLFLAG_RD, &sc->watchdog_resets,
+ 0, "Number of times NIC was reset");
/* performance related tunables */
@@ -3648,7 +3651,7 @@
}
static int
-mxge_close(mxge_softc_t *sc)
+mxge_close(mxge_softc_t *sc, int down)
{
mxge_cmd_t cmd;
int err, old_down_cnt;
@@ -3665,21 +3668,23 @@
}
#endif
sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
- old_down_cnt = sc->down_cnt;
- wmb();
- err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd);
- if (err) {
- device_printf(sc->dev, "Couldn't bring down link\n");
+ if (!down) {
+ old_down_cnt = sc->down_cnt;
+ wmb();
+ err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd);
+ if (err) {
+ device_printf(sc->dev,
+ "Couldn't bring down link\n");
+ }
+ if (old_down_cnt == sc->down_cnt) {
+ /* wait for down irq */
+ DELAY(10 * sc->intr_coal_delay);
+ }
+ wmb();
+ if (old_down_cnt == sc->down_cnt) {
+ device_printf(sc->dev, "never got down irq\n");
+ }
}
- if (old_down_cnt == sc->down_cnt) {
- /* wait for down irq */
- DELAY(10 * sc->intr_coal_delay);
- }
- wmb();
- if (old_down_cnt == sc->down_cnt) {
- device_printf(sc->dev, "never got down irq\n");
- }
-
mxge_free_mbufs(sc);
return 0;
@@ -3732,8 +3737,9 @@
mxge_watchdog_reset(mxge_softc_t *sc, int slice)
{
struct pci_devinfo *dinfo;
+ struct mxge_slice_state *ss;
mxge_tx_ring_t *tx;
- int err;
+ int err, running, s, num_tx_slices = 1;
uint32_t reboot;
uint16_t cmd;
@@ -3767,6 +3773,30 @@
reboot = mxge_read_reboot(sc);
device_printf(sc->dev, "NIC rebooted, status = 0x%x\n",
reboot);
+ running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING;
+ if (running) {
+
+ /*
+ * quiesce NIC so that TX routines will not try to
+ * xmit after restoration of BAR
+ */
+
+ /* Mark the link as down */
+ if (sc->link_state) {
+ sc->link_state = 0;
+ if_link_state_change(sc->ifp,
+ LINK_STATE_DOWN);
+ }
+#ifdef IFNET_BUF_RING
+ num_tx_slices = sc->num_slices;
+#endif
+ /* grab all TX locks to ensure no tx */
+ for (s = 0; s < num_tx_slices; s++) {
+ ss = &sc->ss[s];
+ mtx_lock(&ss->tx.mtx);
+ }
+ mxge_close(sc, 1);
+ }
/* restore PCI configuration space */
dinfo = device_get_ivars(sc->dev);
pci_cfg_restore(sc->dev, dinfo);
@@ -3774,10 +3804,22 @@
/* and redo any changes we made to our config space */
mxge_setup_cfg_space(sc);
- if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) {
- mxge_close(sc);
- err = mxge_open(sc);
+ /* reload f/w */
+ err = mxge_load_firmware(sc, 0);
+ if (err) {
+ device_printf(sc->dev,
+ "Unable to re-load f/w\n");
+ }
+ if (running) {
+ if (!err)
+ err = mxge_open(sc);
+ /* release all TX locks */
+ for (s = 0; s < num_tx_slices; s++) {
+ ss = &sc->ss[s];
+ mtx_unlock(&ss->tx.mtx);
+ }
}
+ sc->watchdog_resets++;
} else {
tx = &sc->ss[slice].tx;
device_printf(sc->dev,
@@ -3793,6 +3835,9 @@
be32toh(sc->ss->fw_stats->send_done_count));
device_printf(sc->dev, "not resetting\n");
}
+ if (err)
+ device_printf(sc->dev, "watchdog reset failed\n");
+
return (err);
}
@@ -3908,11 +3953,11 @@
old_mtu = ifp->if_mtu;
ifp->if_mtu = mtu;
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- mxge_close(sc);
+ mxge_close(sc, 0);
err = mxge_open(sc);
if (err != 0) {
ifp->if_mtu = old_mtu;
- mxge_close(sc);
+ mxge_close(sc, 0);
(void) mxge_open(sc);
}
}
@@ -3970,7 +4015,7 @@
}
} else {
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- mxge_close(sc);
+ mxge_close(sc, 0);
}
}
mtx_unlock(&sc->driver_mtx);
@@ -4700,7 +4745,7 @@
mtx_lock(&sc->driver_mtx);
sc->dying = 1;
if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING)
- mxge_close(sc);
+ mxge_close(sc, 0);
mtx_unlock(&sc->driver_mtx);
ether_ifdetach(sc->ifp);
callout_drain(&sc->co_hdl);
==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/sound/pci/es137x.c#3 (text+ko) ====
@@ -1,10 +1,33 @@
/*-
- * Support the ENSONIQ AudioPCI board and Creative Labs SoundBlaster PCI
- * boards based on the ES1370, ES1371 and ES1373 chips.
+ * Copyright (c) 1999 Russell Cattelan <cattelan at thebarn.com>
+ * Copyright (c) 1998 Joachim Kuebart <joachim.kuebart at gmx.net>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * Copyright (c) 1999 Russell Cattelan <cattelan at thebarn.com>
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
* Copyright (c) 1999 Cameron Grant <cg at freebsd.org>
- * Copyright (c) 1998 by Joachim Kuebart. All rights reserved.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,12 +63,14 @@
*/
/*
+ * Support the ENSONIQ AudioPCI board and Creative Labs SoundBlaster PCI
+ * boards based on the ES1370, ES1371 and ES1373 chips.
+ *
* Part of this code was heavily inspired by the linux driver from
* Thomas Sailer (sailer at ife.ee.ethz.ch)
* Just about everything has been touched and reworked in some way but
* the all the underlying sequences/timing/register values are from
* Thomas' code.
- *
*/
#ifdef HAVE_KERNEL_OPTION_HEADERS
@@ -63,7 +88,7 @@
#include "mixer_if.h"
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/es137x.c,v 1.72 2009/06/07 19:12:08 ariff Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/es137x.c,v 1.73 2009/09/22 13:23:59 joel Exp $");
#define MEM_MAP_REG 0x14
==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/sound/pci/es137x.h#2 (text+ko) ====
@@ -1,26 +1,21 @@
/*-
- * This supports the ENSONIQ AudioPCI board based on the ES1370.
- *
- * Copyright (c) 1998 Joachim Kuebart <joki at kuebart.stuttgart.netsurf.de>
+ * Copyright (c) 1998 Joachim Kuebart <joachim.kuebart at gmx.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice immediately at the beginning of the file, without modification,
- * this list of conditions, and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Absolutely no warranty of function or purpose is made by the author
- * Joachim Kuebart.
- * 4. Modifications may be freely made to this file if the above conditions
- * are met.
*
- * $FreeBSD: src/sys/dev/sound/pci/es137x.h,v 1.6 2005/07/31 13:19:38 netchild Exp $
+ * $FreeBSD: src/sys/dev/sound/pci/es137x.h,v 1.7 2009/09/22 13:23:59 joel Exp $
*/
+/* This supports the ENSONIQ AudioPCI board based on the ES1370. */
+
#ifndef _ES1370_REG_H
#define _ES1370_REG_H
==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/sound/pci/t4dwave.c#3 (text+ko) ====
@@ -35,7 +35,7 @@
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
-SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/t4dwave.c,v 1.55 2009/06/07 19:12:08 ariff Exp $");
+SND_DECLARE_FILE("$FreeBSD: src/sys/dev/sound/pci/t4dwave.c,v 1.56 2009/09/22 11:38:45 marius Exp $");
/* -------------------------------------------------------------------- */
@@ -45,18 +45,22 @@
#define SPA_PCI_ID 0x70181039
#define TR_DEFAULT_BUFSZ 0x1000
+/* For ALi M5451 the DMA transfer size appears to be fixed to 64k. */
+#define ALI_BUFSZ 0x10000
+#define TR_BUFALGN 0x8
#define TR_TIMEOUT_CDC 0xffff
+#define TR_MAXHWCH 64
+#define ALI_MAXHWCH 32
#define TR_MAXPLAYCH 4
+#define ALI_MAXPLAYCH 1
/*
- * Though, it's not clearly documented in trident datasheet, trident
- * audio cards can't handle DMA addresses located above 1GB. The LBA
- * (loop begin address) register which holds DMA base address is 32bits
- * register.
- * But the MSB 2bits are used for other purposes(I guess it is really
- * bad idea). This effectivly limits the DMA address space up to 1GB.
+ * Though, it's not clearly documented in the 4DWAVE datasheet, the
+ * DX and NX chips can't handle DMA addresses located above 1GB as the
+ * LBA (loop begin address) register which holds the DMA base address
+ * is 32-bit, but the two MSBs are used for other purposes.
*/
-#define TR_MAXADDR ((1 << 30) - 1)
-
+#define TR_MAXADDR ((1U << 30) - 1)
+#define ALI_MAXADDR ((1U << 31) - 1)
struct tr_info;
@@ -97,6 +101,7 @@
struct mtx *lock;
+ u_int32_t hwchns;
u_int32_t playchns;
unsigned int bufsz;
@@ -398,7 +403,10 @@
ch->ec &= 0x00000fff;
ch->alpha &= 0x00000fff;
ch->delta &= 0x0000ffff;
- ch->lba &= 0x3fffffff;
+ if (tr->type == ALI_PCI_ID)
+ ch->lba &= ALI_MAXADDR;
+ else
+ ch->lba &= TR_MAXADDR;
cr[1]=ch->lba;
cr[3]=(ch->fmc<<14) | (ch->rvol<<7) | (ch->cvol);
@@ -441,7 +449,10 @@
snd_mtxunlock(tr->lock);
- ch->lba= (cr[1] & 0x3fffffff);
+ if (tr->type == ALI_PCI_ID)
+ ch->lba=(cr[1] & ALI_MAXADDR);
+ else
+ ch->lba=(cr[1] & TR_MAXADDR);
ch->fmc= (cr[3] & 0x0000c000) >> 14;
ch->rvol= (cr[3] & 0x00003f80) >> 7;
ch->cvol= (cr[3] & 0x0000007f);
@@ -628,7 +639,6 @@
tr_wr(tr, TR_REG_SBCTRL, i, 1);
return 0;
-
}
static u_int32_t
@@ -729,7 +739,7 @@
intsrc = tr_rd(tr, TR_REG_MISCINT, 4);
if (intsrc & TR_INT_ADDR) {
chnum = 0;
- while (chnum < 64) {
+ while (chnum < tr->hwchns) {
mask = 0x00000001;
active = tr_rd(tr, (chnum < 32)? TR_REG_ADDRINTA : TR_REG_ADDRINTB, 4);
bufhalf = tr_rd(tr, (chnum < 32)? TR_REG_CSPF_A : TR_REG_CSPF_B, 4);
@@ -815,8 +825,13 @@
u_int32_t data;
struct tr_info *tr;
struct ac97_info *codec = 0;
+ bus_addr_t lowaddr;
int i, dacn;
char status[SND_STATUSLEN];
+#ifdef __sparc64__
+ device_t *children;
+ int nchildren;
+#endif
tr = malloc(sizeof(*tr), M_DEVBUF, M_WAITOK | M_ZERO);
tr->type = pci_get_devid(dev);
@@ -834,7 +849,7 @@
} else {
switch (tr->type) {
case ALI_PCI_ID:
- dacn = 1;
+ dacn = ALI_MAXPLAYCH;
break;
default:
dacn = TR_MAXPLAYCH;
@@ -859,8 +874,6 @@
goto bad;
}
- tr->bufsz = pcm_getbuffersize(dev, 4096, TR_DEFAULT_BUFSZ, 65536);
-
if (tr_init(tr) == -1) {
device_printf(dev, "unable to initialize the card\n");
goto bad;
@@ -879,12 +892,59 @@
goto bad;
}
- if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/2,
+ if (tr->type == ALI_PCI_ID) {
+ /*
+ * The M5451 generates 31 bit of DMA and in order to do
+ * 32-bit DMA, the 31st bit can be set via its accompanying
+ * ISA bridge. Note that we can't predict whether bus_dma(9)
+ * will actually supply us with a 32-bit buffer and even when
+ * using a low address of BUS_SPACE_MAXADDR_32BIT for both
+ * we might end up with the play buffer being in the 32-bit
+ * range while the record buffer isn't or vice versa. So we
+ * limit enabling the 31st bit to sparc64, where the IOMMU
+ * guarantees that we're using a 32-bit address (and in turn
+ * requires it).
+ */
+ lowaddr = ALI_MAXADDR;
+#ifdef __sparc64__
+ if (device_get_children(device_get_parent(dev), &children,
+ &nchildren) == 0) {
+ for (i = 0; i < nchildren; i++) {
+ if (pci_get_devid(children[i]) == 0x153310b9) {
+ lowaddr = BUS_SPACE_MAXADDR_32BIT;
+ data = pci_read_config(children[i],
+ 0x7e, 1);
+ if (bootverbose)
+ device_printf(dev,
+ "M1533 0x7e: 0x%x -> ",
+ data);
+ data |= 0x1;
+ if (bootverbose)
+ printf("0x%x\n", data);
+ pci_write_config(children[i], 0x7e,
+ data, 1);
+ break;
+ }
+ }
+ }
+ free(children, M_TEMP);
+#endif
+ tr->hwchns = ALI_MAXHWCH;
+ tr->bufsz = ALI_BUFSZ;
+ } else {
+ lowaddr = TR_MAXADDR;
+ tr->hwchns = TR_MAXHWCH;
+ tr->bufsz = pcm_getbuffersize(dev, 4096, TR_DEFAULT_BUFSZ,
+ 65536);
+ }
+
+ if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev),
+ /*alignment*/TR_BUFALGN,
/*boundary*/0,
- /*lowaddr*/TR_MAXADDR,
+ /*lowaddr*/lowaddr,
/*highaddr*/BUS_SPACE_MAXADDR,
/*filter*/NULL, /*filterarg*/NULL,
- /*maxsize*/tr->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff,
+ /*maxsize*/tr->bufsz, /*nsegments*/1, /*maxsegz*/tr->bufsz,
/*flags*/0, /*lockfunc*/busdma_lock_mutex,
/*lockarg*/&Giant, &tr->parent_dmat) != 0) {
device_printf(dev, "unable to create dma tag\n");
==== //depot/projects/soc2008/trasz_nfs4acl/sys/i386/conf/NOTES#16 (text+ko) ====
@@ -4,7 +4,7 @@
# This file contains machine dependent kernel configuration notes. For
# machine independent notes, look in /sys/conf/NOTES.
#
-# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1279 2009/09/21 07:08:20 delphij Exp $
+# $FreeBSD: src/sys/i386/conf/NOTES,v 1.1280 2009/09/21 23:58:29 delphij Exp $
#
#
@@ -361,6 +361,9 @@
device dpms # DPMS suspend & resume via VESA BIOS
+# x86 real mode BIOS emulator, required by atkbdc/dpms/vesa
+options X86BIOS
+
#
# The Numeric Processing eXtension driver. This is non-optional.
device npx
==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/subr_acl_nfs4.c#51 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2009 Edward Tomasz NapieraÅa <trasz at FreeBSD.org>
+ * Copyright (c) 2008-2009 Edward Tomasz NapieraÅa <trasz at FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,7 @@
#ifdef _KERNEL
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/kern/subr_acl_nfs4.c,v 1.2 2009/09/22 15:15:03 trasz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -49,7 +49,7 @@
#include <sys/stat.h>
#define KASSERT(a, b) assert(a)
#define CTASSERT(a)
-#endif
+#endif /* _KERNEL */
#ifdef _KERNEL
@@ -162,6 +162,11 @@
if (accmode & VADMIN)
must_be_owner = 1;
+ /*
+ * Ignore VSYNCHRONIZE permission.
+ */
+ accmode &= ~VSYNCHRONIZE;
+
access_mask = _access_mask_from_accmode(accmode);
if (type == VDIR)
@@ -232,9 +237,9 @@
!priv_check_cred(cred, PRIV_VFS_ADMIN, 0))
priv_granted |= VADMIN_PERMS;
- if ((accmode & (VSTAT_PERMS | VSYNCHRONIZE)) &&
+ if ((accmode & VSTAT_PERMS) &&
!priv_check_cred(cred, PRIV_VFS_STAT, 0))
- priv_granted |= (VSTAT_PERMS | VSYNCHRONIZE);
+ priv_granted |= VSTAT_PERMS;
if ((accmode & priv_granted) == accmode) {
if (privused != NULL)
@@ -248,12 +253,9 @@
else
denied = EACCES;
- /*
- * Nie wydostaniecie siÄ. Drzwi zamkniÄte.
- */
return (denied);
}
-#endif
+#endif /* _KERNEL */
static int
_acl_entry_matches(struct acl_entry *entry, acl_tag_t tag, acl_perm_t perm,
@@ -999,7 +1001,7 @@
return (trivial);
}
-#endif
+#endif /* _KERNEL */
int
acl_nfs4_check(const struct acl *aclp, int is_directory)
==== //depot/projects/soc2008/trasz_nfs4acl/sys/modules/Makefile#33 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/modules/Makefile,v 1.629 2009/09/21 08:17:57 delphij Exp $
+# $FreeBSD: src/sys/modules/Makefile,v 1.630 2009/09/21 23:58:29 delphij Exp $
.include <bsd.own.mk>
@@ -298,7 +298,7 @@
wlan_xauth \
${_wpi} \
${_wpifw} \
- x86bios \
+ ${_x86bios} \
${_xe} \
xfs \
xl \
@@ -456,6 +456,7 @@
_s3= s3
_twa= twa
_vesa= vesa
+_x86bios= x86bios
.elif ${MACHINE} == "pc98"
_canbepm= canbepm
_canbus= canbus
@@ -539,6 +540,7 @@
_tmpfs= tmpfs
_twa= twa
_vesa= vesa
+_x86bios= x86bios
_wi= wi
_wpi= wpi
_wpifw= wpifw
==== //depot/projects/soc2008/trasz_nfs4acl/sys/sys/vnode.h#34 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)vnode.h 8.7 (Berkeley) 2/4/94
- * $FreeBSD: src/sys/sys/vnode.h,v 1.360 2009/06/28 21:49:43 stas Exp $
+ * $FreeBSD: src/sys/sys/vnode.h,v 1.361 2009/09/22 15:15:03 trasz Exp $
*/
#ifndef _SYS_VNODE_H_
@@ -614,6 +614,9 @@
int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid,
gid_t file_gid, accmode_t accmode, struct ucred *cred,
int *privused);
+int vaccess_acl_nfs4(enum vtype type, uid_t file_uid, gid_t file_gid,
+ struct acl *aclp, accmode_t accmode, struct ucred *cred,
+ int *privused);
int vaccess_acl_posix1e(enum vtype type, uid_t file_uid,
gid_t file_gid, struct acl *acl, accmode_t accmode,
struct ucred *cred, int *privused);
More information about the p4-projects
mailing list