Re: svn commit: r259280 - head/sbin/growfs

2013-12-13 Thread Gleb Smirnoff
On Fri, Dec 13, 2013 at 11:55:59AM +0400, Sergey Kandaurov wrote:
S> On 13 December 2013 02:33, Gleb Smirnoff  wrote:
S> > Author: glebius
S> > Date: Thu Dec 12 22:33:32 2013
S> > New Revision: 259280
S> > URL: http://svnweb.freebsd.org/changeset/base/259280
S> >
S> > Log:
S> >   Somehow stable/10 branch contains correct version, but head doesn't.
S> >
S> > Modified:
S> >   head/sbin/growfs/growfs.8
S> >
S> > Modified: head/sbin/growfs/growfs.8
S> > 
==
S> > --- head/sbin/growfs/growfs.8   Thu Dec 12 22:04:47 2013(r259279)
S> > +++ head/sbin/growfs/growfs.8   Thu Dec 12 22:33:32 2013(r259280)
S> > @@ -116,7 +116,7 @@ The
S> >  utility first appeared in
S> >  .Fx 4.4 .
S> >  The ability to resize mounted filesystems was added in
S> > -.Fx 9.2 .
S> > +.Fx 10.0 .
S> >  .Sh AUTHORS
S> >  .An Christoph Herrmann Aq c...@freebsd.org
S> >  .An Thomas-Henning von Kamptz Aq toms...@freebsd.org
S> 
S> It was merged in stable/9 before 9.2 in r246235.

After 9.2:

http://svnweb.freebsd.org/base/release/9.2.0/sbin/growfs/

Thus, it first appeared in 10.0.

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


svn commit: r259302 - head/usr.sbin/bhyve

2013-12-13 Thread Peter Grehan
Author: grehan
Date: Fri Dec 13 08:31:13 2013
New Revision: 259302
URL: http://svnweb.freebsd.org/changeset/base/259302

Log:
  bhyve(8) man page.
  
  mdoc formatting and much input and review from Warren Block (wblock@).
  
  Reviewed by:  many
  MFC after:3 days

Added:
  head/usr.sbin/bhyve/bhyve.8   (contents, props changed)
Modified:
  head/usr.sbin/bhyve/Makefile

Modified: head/usr.sbin/bhyve/Makefile
==
--- head/usr.sbin/bhyve/MakefileFri Dec 13 06:59:18 2013
(r259301)
+++ head/usr.sbin/bhyve/MakefileFri Dec 13 08:31:13 2013
(r259302)
@@ -6,6 +6,7 @@ PROG=   bhyve
 
 DEBUG_FLAGS= -g -O0 
 
+MAN=   bhyve.8
 SRCS=  acpi.c atpic.c bhyverun.c block_if.c consport.c dbgport.c elcr.c
 SRCS+=  inout.c legacy_irq.c mem.c mevent.c mptbl.c pci_ahci.c
 SRCS+= pci_emul.c pci_hostbridge.c pci_lpc.c pci_passthru.c pci_virtio_block.c
@@ -15,8 +16,6 @@ SRCS+=uart_emul.c virtio.c xmsr.c spinu
 .PATH: ${.CURDIR}/../../sys/amd64/vmm
 SRCS+= vmm_instruction_emul.c
 
-NO_MAN=
-
 DPADD= ${LIBVMMAPI} ${LIBMD} ${LIBUTIL} ${LIBPTHREAD}
 LDADD= -lvmmapi -lmd -lutil -lpthread
 

Added: head/usr.sbin/bhyve/bhyve.8
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.sbin/bhyve/bhyve.8 Fri Dec 13 08:31:13 2013(r259302)
@@ -0,0 +1,299 @@
+.\" Copyright (c) 2013 Peter Grehan
+.\" 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.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd December 12, 2013
+.Dt BHYVE 8
+.Os
+.Sh NAME
+.Nm bhyve
+.Nd "run a guest operating system inside a virtual machine"
+.Sh SYNOPSIS
+.Nm
+.Op Fl aehAHPW
+.Op Fl c Ar numcpus
+.Op Fl g Ar gdbport
+.Op Fl p Ar pinnedcpu
+.Op Fl s Ar slot,emulation Ns Op , Ns Ar conf
+.Op Fl S Ar slot,emulation Ns Op , Ns Ar conf
+.Op Fl l Ar lpcdev Ns Op , Ns Ar conf
+.Ar vmname
+.Sh DESCRIPTION
+.Nm
+is an experimental hypervisor that runs guest operating systems inside a
+virtual machine.
+.Pp
+Parameters such as the number of virtual CPUs, amount of guest memory, and
+I/O connectivity can be specified with command-line parameters.
+.Pp
+The guest operating system must be loaded with
+.Xr bhyveload 4
+or a similar boot loader before running
+.Nm .
+.Pp
+.Nm
+runs until the guest operating system reboots or an unhandled hypervisor
+exit is detected.
+.Sh OPTIONS
+.Bl -tag -width 10n
+.It Fl a
+Disallow use of the local APIC in X2APIC mode.
+.It Fl A
+Generate ACPI tables.
+Required for
+.Fx Ns /amd64
+guests.
+.It Fl c Ar numcpus
+Number of guest virtual CPUs.
+The default is 1 and the maximum is 16.
+.It Fl H
+Yield the virtual CPU thread when a HLT instruction is detected.
+If this option is not specified, virtual CPUs will use 100% of a host CPU.
+.It Fl g Ar gdbport
+For
+.Fx Ns /amd64 kernels compiled with
+.Cd "option bvmdebug" ,
+allow a remote kernel kgdb to be relayed to the guest kernel gdb stub
+via a local IPv4 address and this port.
+This option will be deprecated in a future version.
+.It Fl p Ar pinnedcpu
+Force guest virtual CPUs to be pinned to host CPUs.
+Virtual CPU
+.Em n
+is pinned to host CPU
+.Em pinnedcpu+n .
+.It Fl P
+Force the guest virtual CPU to exit when a PAUSE instruction is detected.
+.It Fl W
+Force virtio PCI device emulations to use MSI interrupts instead of MSI-X
+interrupts.
+.It Fl s Ar slot,emulation Ns Op , Ns Ar conf
+Configure a virtual PCI slot and function.
+.Pp
+.Nm bhyve
+provides PCI bus emulation and virtual devices that can be attached to
+slots on the bus.
+There are 32 available slots, with the option of providing up to 8 functions
+

Re: svn commit: r259010 - in head/sys: conf powerpc/fpu

2013-12-13 Thread Dag-Erling Smørgrav
> LINT64 is yet another kernel config covered by 'make tinderbox', but not by
> the periodic tinderbox.  It is probably worth adding to the periodic 
> tinderbox 
> (someday it'd be nice if the two tinderboxes built the same set of things).

Some day it would be nice if people talked to me directly instead of
sniping from the sidelines.

The root issue here is that "make LINT" is poorly implemented, so under
some circumstances (including the tinderbox and, if I read the code
correctly, 'make universe'), the LINT64 config is never generated.

Oh, and 'make tinderbox' should die.

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

svn commit: r259303 - stable/10/sys/dev/drm2/radeon

2013-12-13 Thread Robert Millan
Author: rmh
Date: Fri Dec 13 13:17:59 2013
New Revision: 259303
URL: http://svnweb.freebsd.org/changeset/base/259303

Log:
  MFC r259003:
  Initialize modesetting sysctls in radeonkms.

Modified:
  stable/10/sys/dev/drm2/radeon/radeon_drv.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/drm2/radeon/radeon_drv.c
==
--- stable/10/sys/dev/drm2/radeon/radeon_drv.c  Fri Dec 13 08:31:13 2013
(r259302)
+++ stable/10/sys/dev/drm2/radeon/radeon_drv.c  Fri Dec 13 13:17:59 2013
(r259303)
@@ -338,6 +338,12 @@ static const struct file_operations rade
 };
 #endif /* DUMBBELL_WIP */
 
+static int radeon_sysctl_init(struct drm_device *dev, struct sysctl_ctx_list 
*ctx,
+ struct sysctl_oid *top)
+{
+   return drm_add_busid_modesetting(dev, ctx, top);
+}
+
 static struct drm_driver_info kms_driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_PCI_DMA | DRIVER_SG |
@@ -367,6 +373,7 @@ static struct drm_driver_info kms_driver
.irq_postinstall = radeon_driver_irq_postinstall_kms,
.irq_uninstall = radeon_driver_irq_uninstall_kms,
.irq_handler = radeon_driver_irq_handler_kms,
+   .sysctl_init = radeon_sysctl_init,
.ioctls = radeon_ioctls_kms,
.gem_init_object = radeon_gem_object_init,
.gem_free_object = radeon_gem_object_free,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259304 - stable/10/sys/cam/ctl

2013-12-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 13 15:19:37 2013
New Revision: 259304
URL: http://svnweb.freebsd.org/changeset/base/259304

Log:
  MFC r258871:
  
  Properly report an error instead of panicing when user tries to create
  LUN backed by non-disk device, e.g. /dev/null.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cam/ctl/ctl_backend_block.c
==
--- stable/10/sys/cam/ctl/ctl_backend_block.c   Fri Dec 13 13:17:59 2013
(r259303)
+++ stable/10/sys/cam/ctl/ctl_backend_block.c   Fri Dec 13 15:19:37 2013
(r259304)
@@ -1485,6 +1485,7 @@ ctl_be_block_close(struct ctl_be_block_l
case CTL_BE_BLOCK_FILE:
break;
case CTL_BE_BLOCK_NONE:
+   break;
default:
panic("Unexpected backend type.");
break;
@@ -1503,6 +1504,7 @@ ctl_be_block_close(struct ctl_be_block_l
}
break;
case CTL_BE_BLOCK_NONE:
+   break;
default:
panic("Unexpected backend type.");
break;
@@ -1589,7 +1591,7 @@ ctl_be_block_open(struct ctl_be_block_so
} else {
error = EINVAL;
snprintf(req->error_str, sizeof(req->error_str),
-"%s is not a disk or file", be_lun->dev_path);
+"%s is not a disk or plain file", be_lun->dev_path);
}
VOP_UNLOCK(be_lun->vn, 0);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259305 - stable/10/usr.sbin/ctld

2013-12-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 13 15:23:07 2013
New Revision: 259305
URL: http://svnweb.freebsd.org/changeset/base/259305

Log:
  MFC r259182:
  
  Fix handling for empty auth-groups.  Without it, ctld child process
  would either exit on assertion, or, if assertions are not enabled,
  fail to authenticate the target.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/usr.sbin/ctld/login.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/ctld/login.c
==
--- stable/10/usr.sbin/ctld/login.c Fri Dec 13 15:19:37 2013
(r259304)
+++ stable/10/usr.sbin/ctld/login.c Fri Dec 13 15:23:07 2013
(r259305)
@@ -1007,6 +1007,14 @@ login(struct connection *conn)
return;
}
 
+   if (ag->ag_type == AG_TYPE_UNKNOWN) {
+   /*
+* This can happen with empty auth-group.
+*/
+   login_send_error(request, 0x02, 0x01);
+   log_errx(1, "auth-group type not set, denying access");
+   }
+
log_debugx("CHAP authentication required");
 
auth_method = keys_find(request_keys, "AuthMethod");
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259306 - stable/10/sys/dev/iscsi

2013-12-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 13 15:25:51 2013
New Revision: 259306
URL: http://svnweb.freebsd.org/changeset/base/259306

Log:
  MFC r259183:
  
  Properly refuse handoff requests on already connected sessions.  Previously
  this would result in dropping the session.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/dev/iscsi/iscsi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/iscsi/iscsi.c
==
--- stable/10/sys/dev/iscsi/iscsi.c Fri Dec 13 15:23:07 2013
(r259305)
+++ stable/10/sys/dev/iscsi/iscsi.c Fri Dec 13 15:25:51 2013
(r259306)
@@ -1247,6 +1247,18 @@ iscsi_ioctl_daemon_handoff(struct iscsi_
sx_sunlock(&sc->sc_lock);
return (EINVAL);
}
+   if (is->is_connected) {
+   /*
+* This might have happened because another iscsid(8)
+* instance handed off the connection in the meantime.
+* Just return.
+*/
+   ISCSI_SESSION_WARN(is, "handoff on already connected "
+   "session");
+   ISCSI_SESSION_UNLOCK(is);
+   sx_sunlock(&sc->sc_lock);
+   return (EBUSY);
+   }
 
strlcpy(is->is_target_alias, handoff->idh_target_alias,
sizeof(is->is_target_alias));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259307 - stable/10/sys/conf

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 16:09:07 2013
New Revision: 259307
URL: http://svnweb.freebsd.org/changeset/base/259307

Log:
  MFC r256492:
  
  Add the long-missing spibus_if.m to the MFILES list.

Modified:
  stable/10/sys/conf/kmod.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/conf/kmod.mk
==
--- stable/10/sys/conf/kmod.mk  Fri Dec 13 15:25:51 2013(r259306)
+++ stable/10/sys/conf/kmod.mk  Fri Dec 13 16:09:07 2013(r259307)
@@ -346,7 +346,7 @@ MFILES?= dev/acpica/acpi_if.m dev/acpi_s
dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \
dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \
dev/pci/pcib_if.m dev/ppbus/ppbus_if.m \
-   dev/sdhci/sdhci_if.m dev/smbus/smbus_if.m \
+   dev/sdhci/sdhci_if.m dev/smbus/smbus_if.m dev/spibus/spibus_if.m \
dev/sound/pci/hda/hdac_if.m \
dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \
dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259308 - stable/10/sys/arm/arm

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 16:14:08 2013
New Revision: 259308
URL: http://svnweb.freebsd.org/changeset/base/259308

Log:
  MFC r256628:
Fix a register name typo.  The effect was that CPU_CONTROL_AFLT_ENABLE
wasn't being set, but it was almost assuredly already turned on anyway
by the bootloader.

Modified:
  stable/10/sys/arm/arm/locore.S
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/locore.S
==
--- stable/10/sys/arm/arm/locore.S  Fri Dec 13 16:09:07 2013
(r259307)
+++ stable/10/sys/arm/arm/locore.S  Fri Dec 13 16:14:08 2013
(r259308)
@@ -187,7 +187,7 @@ Lunmapped:
mrc p15, 0, r0, c1, c0, 0
 #ifdef _ARM_ARCH_6
orr r0, r0, #(CPU_CONTROL_V6_EXTPAGE | CPU_CONTROL_UNAL_ENABLE)
-   orr r2, r2, #(CPU_CONTROL_AFLT_ENABLE)
+   orr r0, r0, #(CPU_CONTROL_AFLT_ENABLE)
orr r0, r0, #(CPU_CONTROL_AF_ENABLE)
 #endif
orr r0, r0, #(CPU_CONTROL_MMU_ENABLE)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259309 - stable/10/sys/arm/arm

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 16:38:21 2013
New Revision: 259309
URL: http://svnweb.freebsd.org/changeset/base/259309

Log:
  MFC r256637:
  
When calculating the number of bounce pages needed, round the maxsize
up to a multiple of PAGE_SIZE, and add one page because there can always
be one more boundary crossing than the number of pages in the transfer.

Modified:
  stable/10/sys/arm/arm/busdma_machdep-v6.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c
==
--- stable/10/sys/arm/arm/busdma_machdep-v6.c   Fri Dec 13 16:14:08 2013
(r259308)
+++ stable/10/sys/arm/arm/busdma_machdep-v6.c   Fri Dec 13 16:38:21 2013
(r259309)
@@ -425,14 +425,21 @@ bus_dma_tag_create(bus_dma_tag_t parent,
if (_bus_dma_can_bounce(newtag->lowaddr, newtag->highaddr)
 || newtag->alignment > 1)
newtag->flags |= BUS_DMA_COULD_BOUNCE;
-   else
-   maxsize = 2; /* Need at most 2 bounce pages for unaligned 
access on cache line boundaries */
 
+   /*
+* Any request can auto-bounce due to cacheline alignment, in addition
+* to any alignment or boundary specifications in the tag, so if the
+* ALLOCNOW flag is set, there's always work to do.
+*/
if ((flags & BUS_DMA_ALLOCNOW) != 0) {
struct bounce_zone *bz;
-
-   /* Must bounce */
-
+   /*
+* Round size up to a full page, and add one more page because
+* there can always be one more boundary crossing than the
+* number of pages in a transfer.
+*/
+   maxsize = roundup2(maxsize, PAGE_SIZE) + PAGE_SIZE;
+   
if ((error = alloc_bounce_zone(newtag)) != 0) {
free(newtag, M_DEVBUF);
return (error);
@@ -518,20 +525,22 @@ static int allocate_bz_and_pages(bus_dma
STAILQ_INIT(&(mapp->bpages));
 
/*
-* Attempt to add pages to our pool on a per-instance
-* basis up to a sane limit.
+* Attempt to add pages to our pool on a per-instance basis up to a sane
+* limit.  Even if the tag isn't flagged as COULD_BOUNCE due to
+* alignment and boundary constraints, it could still auto-bounce due to
+* cacheline alignment, which requires at most two bounce pages.
 */
if (dmat->flags & BUS_DMA_COULD_BOUNCE)
maxpages = MAX_BPAGES;
else
-   maxpages = 2 * bz->map_count; /* Only need at most 2 pages for 
buffers unaligned on cache line boundaries */
+   maxpages = 2 * bz->map_count;
if ((dmat->flags & BUS_DMA_MIN_ALLOC_COMP) == 0
|| (bz->map_count > 0 && bz->total_bpages < maxpages)) {
int pages;

-   pages = MAX(atop(dmat->maxsize), 1);
+   pages = atop(roundup2(dmat->maxsize, PAGE_SIZE)) + 1;
pages = MIN(maxpages - bz->total_bpages, pages);
-   pages = MAX(pages, 1);
+   pages = MAX(pages, 2);
if (alloc_bounce_pages(dmat, pages) < pages)
return (ENOMEM);

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


svn commit: r259310 - stable/10/sys/arm/arm

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 16:41:04 2013
New Revision: 259310
URL: http://svnweb.freebsd.org/changeset/base/259310

Log:
  MFC r256638:
  
Add cases for the combinations of busdma sync op flags that we handle
correctly by doing nothing, then add a panic for the default case, because
that implies that some driver asked for a sync (probably incorrectly) and
nothing was done.

Modified:
  stable/10/sys/arm/arm/busdma_machdep-v6.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c
==
--- stable/10/sys/arm/arm/busdma_machdep-v6.c   Fri Dec 13 16:38:21 2013
(r259309)
+++ stable/10/sys/arm/arm/busdma_machdep-v6.c   Fri Dec 13 16:41:04 2013
(r259310)
@@ -1282,7 +1282,12 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus
}
break;
 
+   case BUS_DMASYNC_POSTREAD:
+   case BUS_DMASYNC_POSTWRITE:
+   case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE:
+   break;
default:
+   panic("unsupported combination of sync operations: 
0x%08x\n", op);
break;
}
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259311 - stable/10/sbin/geom/class/part

2013-12-13 Thread Alan Somers
Author: asomers
Date: Fri Dec 13 16:55:39 2013
New Revision: 259311
URL: http://svnweb.freebsd.org/changeset/base/259311

Log:
  MFC 257006
  
  sbin/geom/class/part/geom_part.c
  Always validate the return of find_geomcfg().  It could be NULL, for
  example when the geom is withering.
  
  Approved by:ken (mentor)
  Sponsored by:   Spectra Logic Corporation

Modified:
  stable/10/sbin/geom/class/part/geom_part.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/geom/class/part/geom_part.c
==
--- stable/10/sbin/geom/class/part/geom_part.c  Fri Dec 13 16:41:04 2013
(r259310)
+++ stable/10/sbin/geom/class/part/geom_part.c  Fri Dec 13 16:55:39 2013
(r259311)
@@ -364,7 +364,11 @@ gpart_autofill_resize(struct gctl_req *r
}
 
offset = (pp->lg_stripeoffset / pp->lg_sectorsize) % alignment;
-   last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
+   s = find_geomcfg(gp, "last");
+   if (s == NULL)
+   errx(EXIT_FAILURE, "Final block not found for geom %s",
+   gp->lg_name);
+   last = (off_t)strtoimax(s, NULL, 0);
LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
s = find_provcfg(pp, "index");
if (s == NULL)
@@ -502,8 +506,16 @@ gpart_autofill(struct gctl_req *req)
if (size > alignment)
size = ALIGNDOWN(size, alignment);
 
-   first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0);
-   last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
+   s = find_geomcfg(gp, "first");
+   if (s == NULL)
+   errx(EXIT_FAILURE, "Starting block not found for geom %s",
+   gp->lg_name);
+   first = (off_t)strtoimax(s, NULL, 0);
+   s = find_geomcfg(gp, "last");
+   if (s == NULL)
+   errx(EXIT_FAILURE, "Final block not found for geom %s",
+   gp->lg_name);
+   last = (off_t)strtoimax(s, NULL, 0);
grade = ~0ULL;
a_first = ALIGNUP(first + offset, alignment);
last = ALIGNDOWN(last + offset, alignment);
@@ -587,12 +599,22 @@ gpart_show_geom(struct ggeom *gp, const 
int idx, wblocks, wname, wmax;
 
scheme = find_geomcfg(gp, "scheme");
+   if (scheme == NULL)
+   errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name);
s = find_geomcfg(gp, "first");
+   if (s == NULL)
+   errx(EXIT_FAILURE, "Starting block not found for geom %s",
+   gp->lg_name);
first = (off_t)strtoimax(s, NULL, 0);
s = find_geomcfg(gp, "last");
+   if (s == NULL)
+   errx(EXIT_FAILURE, "Final block not found for geom %s",
+   gp->lg_name);
last = (off_t)strtoimax(s, NULL, 0);
wblocks = strlen(s);
s = find_geomcfg(gp, "state");
+   if (s == NULL)
+   errx(EXIT_FAILURE, "State not found for geom %s", gp->lg_name);
if (s != NULL && *s != 'C')
s = NULL;
wmax = strlen(gp->lg_name);
@@ -748,6 +770,8 @@ gpart_backup(struct gctl_req *req, unsig
abort();
pp = LIST_FIRST(&gp->lg_consumer)->lg_provider;
s = find_geomcfg(gp, "last");
+   if (s == NULL)
+   abort();
wblocks = strlen(s);
wtype = 0;
LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
@@ -757,6 +781,8 @@ gpart_backup(struct gctl_req *req, unsig
wtype = i;
}
s = find_geomcfg(gp, "entries");
+   if (s == NULL)
+   abort();
windex = strlen(s);
printf("%s %s\n", scheme, s);
LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
@@ -1177,6 +1203,8 @@ gpart_bootcode(struct gctl_req *req, uns
if (gp == NULL)
errx(EXIT_FAILURE, "No such geom: %s.", s);
s = find_geomcfg(gp, "scheme");
+   if (s == NULL)
+   errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name);
vtoc8 = 0;
if (strcmp(s, "VTOC8") == 0)
vtoc8 = 1;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259312 - stable/10

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 17:00:25 2013
New Revision: 259312
URL: http://svnweb.freebsd.org/changeset/base/259312

Log:
  MFC 256640:  Allow 'make xdev' to work when DESTDIR is set.

Modified:
  stable/10/Makefile.inc1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==
--- stable/10/Makefile.inc1 Fri Dec 13 16:55:39 2013(r259311)
+++ stable/10/Makefile.inc1 Fri Dec 13 17:00:25 2013(r259312)
@@ -1857,7 +1857,7 @@ NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOU
CPUTYPE=${XDEV_CPUTYPE}
 
 XDDIR=${XDEV_ARCH}-freebsd
-XDTP=/usr/${XDDIR}
+XDTP=usr/${XDDIR}
 CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \
INSTALL="sh ${.CURDIR}/tools/install.sh"
 CDENV= ${CDBENV} \
@@ -1870,8 +1870,8 @@ CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" 
 
 CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp
 CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN}
-CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} 
${NOFUN}
-XDDESTDIR=${DESTDIR}${XDTP}
+CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} 
${NOFUN}
+XDDESTDIR=${DESTDIR}/${XDTP}
 .if !defined(OSREL)
 OSREL!= uname -r | sed -e 's/[-(].*//'
 .endif
@@ -1951,6 +1951,7 @@ _xi-libraries:
 
 _xi-links:
${_+_}cd ${XDDESTDIR}/usr/bin; \
+   mkdir -p ../../../../usr/bin; \
for i in *; do \
ln -sf ../../${XDTP}/usr/bin/$$i \
../../../../usr/bin/${XDDIR}-$$i; \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259313 - stable/10/sys/arm/arm

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 17:02:09 2013
New Revision: 259313
URL: http://svnweb.freebsd.org/changeset/base/259313

Log:
  MFC r256647:
  
Invalidate the entire L2 cache before enabling it.  Say whether it
has been enabled or disabled.

Modified:
  stable/10/sys/arm/arm/pl310.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/pl310.c
==
--- stable/10/sys/arm/arm/pl310.c   Fri Dec 13 17:00:25 2013
(r259312)
+++ stable/10/sys/arm/arm/pl310.c   Fri Dec 13 17:02:09 2013
(r259313)
@@ -341,8 +341,13 @@ pl310_attach(device_t dev)
ctrl_value = pl310_read4(sc, PL310_CTRL);
 
if (sc->sc_enabled && !(ctrl_value & CTRL_ENABLED)) {
+   /* invalidate current content */
+   pl310_write4(pl310_softc, PL310_INV_WAY, 0x);
+   pl310_wait_background_op(PL310_INV_WAY, 0x);
+
/* Enable the L2 cache if disabled */
platform_pl310_write_ctrl(sc, CTRL_ENABLED);
+   device_printf(dev, "L2 Cache enabled\n");
} 
 
if (!sc->sc_enabled && (ctrl_value & CTRL_ENABLED)) {
@@ -375,6 +380,7 @@ pl310_attach(device_t dev)
EVENT_COUNTER_CTRL_C0_RESET | 
EVENT_COUNTER_CTRL_C1_RESET);
 
+   device_printf(dev, "L2 Cache disabled\n");
}
 
if (sc->sc_enabled)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259314 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 17:03:32 2013
New Revision: 259314
URL: http://svnweb.freebsd.org/changeset/base/259314

Log:
  MFC r256774:
  
Clock divisors 0-3 correspond to dividing by 1-4, so add 1 before dividing.

Modified:
  stable/10/sys/arm/freescale/imx/imx51_ccm.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx51_ccm.c
==
--- stable/10/sys/arm/freescale/imx/imx51_ccm.c Fri Dec 13 17:02:09 2013
(r259313)
+++ stable/10/sys/arm/freescale/imx/imx51_ccm.c Fri Dec 13 17:03:32 2013
(r259314)
@@ -278,8 +278,8 @@ imx51_get_clock(enum imx51_clock clk)
case IMX51CLK_MAIN_BUS_CLK:
freq = imx51_get_clock(IMX51CLK_MAIN_BUS_CLK_SRC);
cdcr = bus_read_4(ccm_softc->res[0], CCMC_CDCR);
-   return freq / (cdcr & CDCR_PERIPH_CLK_DVFS_PODF_MASK) >>
-   CDCR_PERIPH_CLK_DVFS_PODF_SHIFT;
+   return freq / (1 + ((cdcr & CDCR_PERIPH_CLK_DVFS_PODF_MASK) >>
+   CDCR_PERIPH_CLK_DVFS_PODF_SHIFT));
case IMX51CLK_AHB_CLK_ROOT:
freq = imx51_get_clock(IMX51CLK_MAIN_BUS_CLK);
cbcdr = bus_read_4(ccm_softc->res[0], CCMC_CBCDR);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259315 - in stable/10/sys: arm/freescale/imx boot/fdt/dts

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 17:10:23 2013
New Revision: 259315
URL: http://svnweb.freebsd.org/changeset/base/259315

Log:
  MFC r256804:
  
Switch to using the standard uart console driver instead of the special
driver for early boot debugging.

Modified:
  stable/10/sys/arm/freescale/imx/files.imx53
  stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/files.imx53
==
--- stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 17:03:32 2013
(r259314)
+++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 17:10:23 2013
(r259315)
@@ -12,8 +12,11 @@ arm/freescale/imx/imx53_machdep.cstanda
 arm/freescale/imx/common.c standard
 arm/freescale/imx/bus_space.c  standard
 
-# Dummy serial console
-arm/freescale/imx/console.cstandard
+# Special serial console for debuging early boot code
+#arm/freescale/imx/console.c   standard
+
+# UART driver (includes serial console support)
+dev/uart/uart_dev_imx.coptional uart
 
 # TrustZone Interrupt Controller
 arm/freescale/imx/tzic.c   standard
@@ -33,9 +36,6 @@ arm/freescale/imx/imx51_ccm.c standard
 # i.MX5xx PATA controller
 dev/ata/chipsets/ata-fsl.c optional imxata
 
-# UART driver
-#dev/uart/uart_dev_imx.c   optional uart
-
 # USB join controller (1 OTG, 3 EHCI)
 dev/usb/controller/ehci_imx.c  optional ehci
 

Modified: stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts
==
--- stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts Fri Dec 13 17:03:32 2013
(r259314)
+++ stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts Fri Dec 13 17:10:23 2013
(r259315)
@@ -70,9 +70,9 @@
};
 
/* UART1, console */
-   UART1: serial@53fbc000 {
+   console: serial@53fbc000 {
status = "okay";
-   clock-frequency = <300>; /* XXX */
+   clock-frequency = <0>; /* won't load w/o this */
};
 
clock@53fd4000 {
@@ -111,13 +111,12 @@
};
 
aliases {
-   UART1 = &UART1;
SSI2 = &SSI2;
};
 
chosen {
bootargs = "-v";
-   stdin = "UART1";
-   stdout = "UART1";
+   stdin  = &console;
+   stdout = &console;
};
 };
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259316 - stable/10/sys/dev/ofw

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 17:23:47 2013
New Revision: 259316
URL: http://svnweb.freebsd.org/changeset/base/259316

Log:
  MFC r257130:
  
Add a helper routine to search for a compat string in a table that
associates compat strings with arbitrary values that mean something to
the driver.  This is handy for drivers that support several variations
of similar hardware and need to know which one matched.

Modified:
  stable/10/sys/dev/ofw/ofw_bus_subr.c
  stable/10/sys/dev/ofw/ofw_bus_subr.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/ofw/ofw_bus_subr.c
==
--- stable/10/sys/dev/ofw/ofw_bus_subr.cFri Dec 13 17:10:23 2013
(r259315)
+++ stable/10/sys/dev/ofw/ofw_bus_subr.cFri Dec 13 17:23:47 2013
(r259316)
@@ -197,6 +197,21 @@ ofw_bus_is_compatible_strict(device_t de
return (0);
 }
 
+const struct ofw_compat_data *
+ofw_bus_search_compatible(device_t dev, const struct ofw_compat_data *compat)
+{
+
+   if (compat == NULL)
+   return NULL;
+
+   for (; compat->ocd_str != NULL; ++compat) {
+   if (ofw_bus_is_compatible(dev, compat->ocd_str))
+   break;
+   }
+
+   return (compat);
+}
+
 int
 ofw_bus_has_prop(device_t dev, const char *propname)
 {

Modified: stable/10/sys/dev/ofw/ofw_bus_subr.h
==
--- stable/10/sys/dev/ofw/ofw_bus_subr.hFri Dec 13 17:10:23 2013
(r259315)
+++ stable/10/sys/dev/ofw/ofw_bus_subr.hFri Dec 13 17:23:47 2013
(r259316)
@@ -47,6 +47,11 @@ struct ofw_bus_iinfo {
pcell_t opi_addrc;
 };
 
+struct ofw_compat_data {
+   const char  *ocd_str;
+   uintptr_tocd_data;
+};
+
 /* Generic implementation of ofw_bus_if.m methods and helper routines */
 intofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t);
 void   ofw_bus_gen_destroy_devinfo(struct ofw_bus_devinfo *);
@@ -74,6 +79,16 @@ void ofw_bus_find_iparent(phandle_t);
 int ofw_bus_is_compatible(device_t, const char *);
 int ofw_bus_is_compatible_strict(device_t, const char *);
 
+/* 
+ * Helper routine to search a list of compat properties.  The table is
+ * terminated by an entry with a NULL compat-string pointer; a pointer to that
+ * table entry is returned if none of the compat strings match for the device,
+ * giving you control over the not-found value.  Will not return NULL unless 
the
+ * provided table pointer is NULL.
+ */
+const struct ofw_compat_data *
+ofw_bus_search_compatible(device_t, const struct ofw_compat_data *);
+
 /* Helper routine for checking existence of a prop */
 int ofw_bus_has_prop(device_t, const char *);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259317 - in stable/10/sys: arm/freescale/imx dev/ffec

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 17:28:08 2013
New Revision: 259317
URL: http://svnweb.freebsd.org/changeset/base/259317

Log:
  MFC r256806, r256919, r257167:
  
Add a driver for the Freescale Fast Ethernet Controller found on various
Freescale SoCs including the i.MX series.  This also works for the newer
SoCs with the ENET gigabit controller, but doesn't use any of the new
hardware features other than enabling gigabit speed.
  
Mask out non-address bits in the mac address register, for proper
detection of an all-zeroes address.  Also remove a misplaced return.
  
Switch to using ofw_bus_search_compatible() table-driven compat lookup.
Add compat strings for Freescale Vybrid family SoCs.

Added:
  stable/10/sys/dev/ffec/
 - copied from r256806, head/sys/dev/ffec/
Modified:
  stable/10/sys/arm/freescale/imx/files.imx53
  stable/10/sys/dev/ffec/if_ffec.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/files.imx53
==
--- stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 17:23:47 2013
(r259316)
+++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 17:28:08 2013
(r259317)
@@ -49,3 +49,6 @@ dev/ofw/ofw_iicbus.c  optional fsliic
 # IPU - Image Processing Unit (frame buffer also)
 arm/freescale/imx/imx51_ipuv3.coptional sc
 
+# Fast Ethernet Controller
+dev/ffec/if_ffec.c optional ffec
+

Modified: stable/10/sys/dev/ffec/if_ffec.c
==
--- head/sys/dev/ffec/if_ffec.c Sun Oct 20 21:07:38 2013(r256806)
+++ stable/10/sys/dev/ffec/if_ffec.cFri Dec 13 17:28:08 2013
(r259317)
@@ -86,6 +86,38 @@ __FBSDID("$FreeBSD$");
 #include "miibus_if.h"
 
 /*
+ * There are small differences in the hardware on various SoCs.  Not every SoC
+ * we support has its own FECTYPE; most work as GENERIC and only the ones that
+ * need different handling get their own entry.  In addition to the types in
+ * this list, there are some flags below that can be ORed into the upper bits.
+ */
+enum {
+   FECTYPE_NONE,
+   FECTYPE_GENERIC,
+   FECTYPE_IMX53,
+   FECTYPE_IMX6,
+};
+
+/*
+ * Flags that describe general differences between the FEC hardware in various
+ * SoCs.  These are ORed into the FECTYPE enum values.
+ */
+#defineFECTYPE_MASK0x
+#defineFECFLAG_GBE (0x0001 << 16)
+
+/*
+ * Table of supported FDT compat strings and their associated FECTYPE values.
+ */
+static struct ofw_compat_data compat_data[] = {
+   {"fsl,imx51-fec",   FECTYPE_GENERIC},
+   {"fsl,imx53-fec",   FECTYPE_IMX53},
+   {"fsl,imx6q-fec",   FECTYPE_IMX6 | FECFLAG_GBE},
+   {"fsl,mvf600-fec",  FECTYPE_GENERIC},
+   {"fsl,vf-fec",  FECTYPE_GENERIC},
+   {NULL,  FECTYPE_NONE},
+};
+
+/*
  * Driver data and defines.
  */
 #defineRX_DESC_COUNT   64
@@ -108,13 +140,6 @@ enum {
PHY_CONN_RGMII
 };
 
-enum {
-   FECTYPE_GENERIC,
-   FECTYPE_IMX51,
-   FECTYPE_IMX53,
-   FECTYPE_IMX6,
-};
-
 struct ffec_softc {
device_tdev;
device_tmiibus;
@@ -226,7 +251,7 @@ ffec_miigasket_setup(struct ffec_softc *
 * We only need the gasket for MII and RMII connections on certain SoCs.
 */
 
-   switch (sc->fectype)
+   switch (sc->fectype & FECTYPE_MASK)
{
case FECTYPE_IMX53:
break;
@@ -883,7 +908,7 @@ ffec_get_hwaddr(struct ffec_softc *sc, u
 * assigned bit set, and the broadcast/multicast bit clear.
 */
palr = RD4(sc, FEC_PALR_REG);
-   paur = RD4(sc, FEC_PAUR_REG);
+   paur = RD4(sc, FEC_PAUR_REG) & FEC_PAUR_PADDR2_MASK;
if ((palr | paur) != 0) {
hwaddr[0] = palr >> 24;
hwaddr[1] = palr >> 16;
@@ -891,7 +916,6 @@ ffec_get_hwaddr(struct ffec_softc *sc, u
hwaddr[3] = palr >>  0;
hwaddr[4] = paur >> 24;
hwaddr[5] = paur >> 16;
-   return;
} else {
rnd = arc4random() & 0x00ff;
hwaddr[0] = 'b';
@@ -1405,14 +1429,7 @@ ffec_attach(device_t dev)
 * There are differences in the implementation and features of the FEC
 * hardware on different SoCs, so figure out what type we are.
 */
-   if (ofw_bus_is_compatible(dev, "fsl,imx51-fec"))
-   sc->fectype = FECTYPE_IMX51;
-   else if (ofw_bus_is_compatible(dev, "fsl,imx53-fec"))
-   sc->fectype = FECTYPE_IMX53;
-   else if (ofw_bus_is_compatible(dev, "fsl,imx6q-fec"))
-   sc->fectype = FECTYPE_IMX6;
-   else
-   sc->fectype = FECTYPE_GENERIC;
+   sc->fectype = ofw_bus_search_compatible(dev, compat_data)->ocd_da

svn commit: r259318 - in stable/10/sys: arm/conf boot/fdt/dts

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 17:29:31 2013
New Revision: 259318
URL: http://svnweb.freebsd.org/changeset/base/259318

Log:
  MFC r256809: Add configuration for the Freescale i.MX53 Quick Start Board.

Added:
  stable/10/sys/arm/conf/IMX53-QSB
 - copied unchanged from r256809, head/sys/arm/conf/IMX53-QSB
  stable/10/sys/boot/fdt/dts/imx53-qsb.dts
 - copied unchanged from r256809, head/sys/boot/fdt/dts/imx53-qsb.dts
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/arm/conf/IMX53-QSB (from r256809, 
head/sys/arm/conf/IMX53-QSB)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/arm/conf/IMX53-QSBFri Dec 13 17:29:31 2013
(r259318, copy of r256809, head/sys/arm/conf/IMX53-QSB)
@@ -0,0 +1,179 @@
+# Kernel configuration for Freescale i.MX53 Quick Start Board
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+ident  IMX53-QSB
+
+include"../freescale/imx/std.imx53"
+
+makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols
+#options   DEBUG
+
+optionsHZ=250  # 4ms scheduling quantum
+optionsSCHED_4BSD  # 4BSD scheduler
+#options   PREEMPTION  # Enable kernel thread preemption
+optionsINET# InterNETworking
+optionsINET6   # IPv6 communications protocols
+#options   SCTP# Stream Control Transmission Protocol
+optionsFFS # Berkeley Fast Filesystem
+optionsSOFTUPDATES # Enable FFS soft updates support
+optionsUFS_ACL # Support for access control lists
+optionsUFS_DIRHASH # Improve performance on big directories
+optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+#options   MD_ROOT # MD is a potential root device
+optionsNFSCL   # New Network Filesystem Client
+#options   NFSD# New Network Filesystem Server
+optionsNFSLOCKD# Network Lock Manager
+optionsNFS_ROOT# NFS usable as /, requires NFSCL
+optionsMSDOSFS # MSDOS Filesystem
+optionsCD9660  # ISO 9660 Filesystem
+#options   PROCFS  # Process filesystem (requires PSEUDOFS)
+optionsPSEUDOFS# Pseudo-filesystem framework
+optionsTMPFS   # TMP Memory Filesystem
+optionsGEOM_PART_GPT   # GUID Partition Tables.
+optionsGEOM_LABEL  # Provides labelization
+#options   COMPAT_FREEBSD5 # Compatible with FreeBSD5
+#options   COMPAT_FREEBSD6 # Compatible with FreeBSD6
+#options   COMPAT_FREEBSD7 # Compatible with FreeBSD7
+optionsSCSI_DELAY=5000 # Delay (in ms) before probing SCSI
+optionsKTRACE  # ktrace(1) support
+optionsSYSVSHM # SYSV-style shared memory
+optionsSYSVMSG # SYSV-style message queues
+optionsSYSVSEM # SYSV-style semaphores
+options_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time 
extensions
+optionsINCLUDE_CONFIG_FILE # Include this file in kernel
+optionsVFP # vfp/neon
+
+# required for netbooting
+#options   BOOTP
+#options   BOOTP_COMPAT
+#options   BOOTP_NFSROOT
+#options   BOOTP_NFSV3
+#options   BOOTP_WIRED_TO=ue0
+
+#options   ROOTDEVNAME=\"ufs:ada0s2a\"
+
+
+# kernel/memory size reduction
+#options   MUTEX_NOINLINE
+#options   NO_FFS_SNAPSHOT
+#options   NO_SWAPPING
+#options   NO_SYSCTL_DESCR
+#options   RWLOCK_NOINLINE
+
+# Debugging support.  Always need this:
+optionsKDB # Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options   KDB_TRACE   # Print a stack trace for a panic.
+# For full debugger support use this instead:
+optionsDDB # Support DDB.
+#options   GDB # Support remote GDB.
+#opt

svn commit: r259319 - stable/10/sys/dev/uart

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 18:21:27 2013
New Revision: 259319
URL: http://svnweb.freebsd.org/changeset/base/259319

Log:
  MFC r256815:
  
Calculate the baud rate divisor rather than using a hard-coded value.

Modified:
  stable/10/sys/dev/uart/uart_dev_pl011.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/uart/uart_dev_pl011.c
==
--- stable/10/sys/dev/uart/uart_dev_pl011.c Fri Dec 13 17:29:31 2013
(r259318)
+++ stable/10/sys/dev/uart/uart_dev_pl011.c Fri Dec 13 18:21:27 2013
(r259319)
@@ -147,9 +147,6 @@ uart_pl011_param(struct uart_bas *bas, i
break;
}
 
-   /* TODO: Calculate divisors */
-   baud = (0x1 << 16) | 0x28;
-
if (stopbits == 2)
line |= LCR_H_STP2;
else
@@ -164,8 +161,11 @@ uart_pl011_param(struct uart_bas *bas, i
line &=  ~LCR_H_FEN;
ctrl |= (CR_RXE | CR_TXE | CR_UARTEN);
 
-   __uart_setreg(bas, UART_IBRD, ((uint32_t)(baud >> 16)) & IBRD_BDIVINT);
-   __uart_setreg(bas, UART_FBRD, (uint32_t)(baud) & FBRD_BDIVFRAC);
+   if (bas->rclk != 0 && baudrate != 0) {
+   baud = bas->rclk * 4 / baudrate;
+   __uart_setreg(bas, UART_IBRD, ((uint32_t)(baud >> 6)) & 
IBRD_BDIVINT);
+   __uart_setreg(bas, UART_FBRD, (uint32_t)(baud & 0x3F) & 
FBRD_BDIVFRAC);
+   }
 
/* Add config. to line before reenabling UART */
__uart_setreg(bas, UART_LCR_H, (__uart_getreg(bas, UART_LCR_H) &
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259320 - stable/10/contrib/gperf/src

2013-12-13 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Dec 13 18:23:14 2013
New Revision: 259320
URL: http://svnweb.freebsd.org/changeset/base/259320

Log:
  MFC   r258115 (partial);
  
  gperf: bring a small update from Apple Developers tools 4.4
  
  From [1]
  
  offset.patch
  Makes use the C offsetof() macro.
  
  We are not merging the size_type.patch as it raises some
  (apparently) bogus warnings and is not really used.
  
  [1] http://opensource.apple.com/source/gperf/gperf-9/patches/

Modified:
  stable/10/contrib/gperf/src/output.cc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/contrib/gperf/src/output.cc
==
--- stable/10/contrib/gperf/src/output.cc   Fri Dec 13 18:21:27 2013
(r259319)
+++ stable/10/contrib/gperf/src/output.cc   Fri Dec 13 18:23:14 2013
(r259320)
@@ -1106,9 +1106,7 @@ output_keyword_entry (KeywordExt *temp, 
   if (option[TYPE])
 printf ("{");
   if (option[SHAREDLIB])
-printf ("(int)(long)&((struct %s_t *)0)->%s_str%d",
-option.get_stringpool_name (), option.get_stringpool_name (),
-stringpool_index);
+printf("offsetof(struct %s_t, %s_str%d)", option.get_stringpool_name (), 
option.get_stringpool_name (), stringpool_index);
   else
 output_string (temp->_allchars, temp->_allchars_length);
   if (option[TYPE])
@@ -2035,8 +2033,11 @@ Output::output ()
   printf ("%s\n", _struct_decl);
 }
 
-  if (option[INCLUDE])
+  if (option[INCLUDE]) {
 printf ("#include \n"); /* Declare strlen(), strcmp(), 
strncmp(). */
+if (option[SHAREDLIB])
+  printf("#include \n"); /* Declare offsetof() */
+  }
 
   if (!option[ENUM])
 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259321 - stable/9/contrib/gperf/src

2013-12-13 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Dec 13 18:24:36 2013
New Revision: 259321
URL: http://svnweb.freebsd.org/changeset/base/259321

Log:
  MFC   r258115 (partial);
  
  gperf: bring a small update from Apple Developers tools 4.4
  
  From [1]
  
  offset.patch
  Makes use the C offsetof() macro.
  
  We are not merging the size_type.patch as it raises some
  (apparently) bogus warnings and is not really used.
  
  [1] http://opensource.apple.com/source/gperf/gperf-9/patches/

Modified:
  stable/9/contrib/gperf/src/output.cc
Directory Properties:
  stable/9/   (props changed)
  stable/9/contrib/gperf/   (props changed)

Modified: stable/9/contrib/gperf/src/output.cc
==
--- stable/9/contrib/gperf/src/output.ccFri Dec 13 18:23:14 2013
(r259320)
+++ stable/9/contrib/gperf/src/output.ccFri Dec 13 18:24:36 2013
(r259321)
@@ -1106,9 +1106,7 @@ output_keyword_entry (KeywordExt *temp, 
   if (option[TYPE])
 printf ("{");
   if (option[SHAREDLIB])
-printf ("(int)(long)&((struct %s_t *)0)->%s_str%d",
-option.get_stringpool_name (), option.get_stringpool_name (),
-stringpool_index);
+printf("offsetof(struct %s_t, %s_str%d)", option.get_stringpool_name (), 
option.get_stringpool_name (), stringpool_index);
   else
 output_string (temp->_allchars, temp->_allchars_length);
   if (option[TYPE])
@@ -2035,8 +2033,11 @@ Output::output ()
   printf ("%s\n", _struct_decl);
 }
 
-  if (option[INCLUDE])
+  if (option[INCLUDE]) {
 printf ("#include \n"); /* Declare strlen(), strcmp(), 
strncmp(). */
+if (option[SHAREDLIB])
+  printf("#include \n"); /* Declare offsetof() */
+  }
 
   if (!option[ENUM])
 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259322 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 18:26:22 2013
New Revision: 259322
URL: http://svnweb.freebsd.org/changeset/base/259322

Log:
  MFC r257197:
  
Maximize available kva space by doing static device mapping from the top
of the address space downwards, and then returning the lowest mapped
device address from initarm_lastaddr().  Premap most of the device's
on-chip peripherals.

Added:
  stable/10/sys/arm/freescale/imx/imx_machdep.c
 - copied unchanged from r257197, head/sys/arm/freescale/imx/imx_machdep.c
  stable/10/sys/arm/freescale/imx/imx_machdep.h
 - copied unchanged from r257197, head/sys/arm/freescale/imx/imx_machdep.h
Modified:
  stable/10/sys/arm/freescale/imx/files.imx51
  stable/10/sys/arm/freescale/imx/files.imx53
  stable/10/sys/arm/freescale/imx/imx51_machdep.c
  stable/10/sys/arm/freescale/imx/imx53_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/files.imx51
==
--- stable/10/sys/arm/freescale/imx/files.imx51 Fri Dec 13 18:24:36 2013
(r259321)
+++ stable/10/sys/arm/freescale/imx/files.imx51 Fri Dec 13 18:26:22 2013
(r259322)
@@ -8,6 +8,7 @@ arm/arm/irq_dispatch.S  standard
 kern/kern_clocksource.cstandard
 
 # Init
+arm/freescale/imx/imx_machdep.cstandard
 arm/freescale/imx/imx51_machdep.c  standard
 arm/freescale/imx/common.c standard
 arm/freescale/imx/bus_space.c  standard

Modified: stable/10/sys/arm/freescale/imx/files.imx53
==
--- stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 18:24:36 2013
(r259321)
+++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 18:26:22 2013
(r259322)
@@ -8,6 +8,7 @@ arm/arm/irq_dispatch.S  standard
 kern/kern_clocksource.cstandard
 
 # Init
+arm/freescale/imx/imx_machdep.cstandard
 arm/freescale/imx/imx53_machdep.c  standard
 arm/freescale/imx/common.c standard
 arm/freescale/imx/bus_space.c  standard

Modified: stable/10/sys/arm/freescale/imx/imx51_machdep.c
==
--- stable/10/sys/arm/freescale/imx/imx51_machdep.c Fri Dec 13 18:24:36 
2013(r259321)
+++ stable/10/sys/arm/freescale/imx/imx51_machdep.c Fri Dec 13 18:26:22 
2013(r259322)
@@ -1,14 +1,7 @@
 /*-
- * Copyright (c) 1994-1998 Mark Brinicombe.
- * Copyright (c) 1994 Brini.
- * Copyright (c) 2012, 2013 The FreeBSD Foundation
+ * Copyright (c) 2013 Ian Lepore 
  * All rights reserved.
  *
- *
- * This code is derived from software written for Brini by Mark Brinicombe
- * Portions of this software were developed by Oleksandr Rybalko
- * under sponsorship from the FreeBSD Foundation.
- *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -17,26 +10,18 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *  This product includes software developed by Brini.
- * 4. The name of the company nor the name of the author may be used to
- *endorse or promote products derived from this software without specific
- *prior written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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)
+ * 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 POSSIBIL

Re: svn commit: r258139 - head/contrib/gperf/src

2013-12-13 Thread Pedro Giffuni

Hello;

Sorry for the delay in looking into this issue.

On 15.11.2013 00:06, Bruce Evans wrote:

On Thu, 14 Nov 2013, Sean Bruno wrote:


Log:
 Repair build after svn r258115

 options.get_size_type() appears to return a const char *, so assume 
that
 its a string as oppose to *nothing*.  I have no idea what apple's 
code is

 trying to do here:

 http://opensource.apple.com/source/gperf/gperf-9/patches/size_type.patch 



It is trying to add an arg to a printf, while retaining the old behaviour
of printing nothing (now including the new arg) in some cases. The
compiler doesn't like this, since the new arg is unconditional while
the format is conditional.  I think it is a compiler bug to warn in
this case.

This commit replaces the warning (which is really about the compiler bug)
by a bug in gperf.  But I think the bug is harmless because it is in
unreachable code.  But then why have the unreachable code?  (It is for
a default case which I think is unreacheable because all possible cases
that occur are handled individually.)



I decided not to merge that patch from Apple, after all it has
limited (no) use at this time.

For the code in current, I agree the warning is bogus and I think
it would be better to revert Sean's workaround and set the
WARNS level to zero.

This code is unlikely to evolve further before it is removed from
the tree and we won't really need extra warnings for it.

Does that sound acceptable? The alternative would be, of course,
just reverting the Apple patch.

Regards,

Pedro.




Modified: head/contrib/gperf/src/output.cc
== 

--- head/contrib/gperf/src/output.ccThu Nov 14 16:10:21 2013
(r258138)
+++ head/contrib/gperf/src/output.ccThu Nov 14 18:41:58 2013
(r258139)

@@ -779,7 +779,7 @@ Output::output_hash_function () const
" register %s len;\n" :
  option[ANSIC] | option[CPLUSPLUS] ?
 "(register const char *str, register %s len)\n" :
-  "", option.get_size_type());
+  "%s", option.get_size_type());

  /* Note that when the hash function is called, it has already been 
verified

 that  min_key_len <= len <= max_key_len.  */
...


The old code hard-coded the type of the integer arg as "unsigned 
int".  This

is now spelled "%s" with a new arg.  When there is no declaration at all,
then there is no integer arg and the declaration was spelled "". This is
still the correct spelling.  Changing it to "%s" gives a syntax error 
like

a bare "unsigned int" in the output.  However, this case seems to be
unreachable.

The printf() is rather complicated and fancily formatted, with the fancy
format partly destroyed by the svn mail bug of not quoting patches and 
mail

programs then sometimes removing leading whitespace.  It uses a nice
conditional ladder of the following form:

printf(
case1 ?  "decl1 %s len" :
case2 ?  "decl2 %s len" :
case3 ?  "decl3 %s len" :
/* default (unreachable?) */ "", typestr);

where the formatting is much fancier than this (but is perfectly 
consistent

except for the default case and now for the option at the end (the option
should be on a line by itself and not grouped with the complicated
conditional ladder, especially not with its unreachable part).

The cases are:

case1: K&R C
case2: plain C
case3: ANSI (sic) C or C++
default: unreachable?

and the generated code is now:

K&R C:"register  len'\n"
plain C:  "register  len;\n"
ANSI (sic) C or C++:  "register  len;\n"
unreachable?: ""  /* syntax error */

Before this commit, the generated code was:

K&R C:"register  len'\n"
plain C:  "register  len;\n"
ANSI (sic) C or C++:  "register  len;\n"
unreachable?: ""/* no syntax error */

and a few days ago it was:

K&R C:"register unsigned len'\n"
plain C:  "register unsigned len;\n"
ANSI (sic) C or C++:  "register unsigned len;\n"
unreachable?: ""/* no syntax error */

This particular declaration doesn't even depend on the language. The
printf() just groups it with another one for a pointer because this used
to be convenient.

The supported languages are sort of documented in the man page. ANSI C
doesn't exist, and there have been several versions of Standard C since
it existed, but there is no special version-dependent support.  It is
even less clear what plain C is.  It seems to be for a 1980's C that
is not quite as old as K&R C -- according to the generated code, plain C
has const but not signed char, while K&R C has neither.  I get the lack
of signed char from smallest_integral_type(). smallest_integral_type()
is fundamentally wrong since it uses the host SCHAR_MIN for building
K&R and plain C targets that don't have SCHAR_MIN and might even have
a d

svn commit: r259323 - stable/10/sys/dev/uart

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 19:01:50 2013
New Revision: 259323
URL: http://svnweb.freebsd.org/changeset/base/259323

Log:
  MFC r257480:
  
Convert the if/else list of compatible devices to the table-driven
ofw_bus_search_compatible() routine.  In addition to converting existing
strings to table entries, also add compat strings for the whole imx family.

Modified:
  stable/10/sys/dev/uart/uart_bus_fdt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/uart/uart_bus_fdt.c
==
--- stable/10/sys/dev/uart/uart_bus_fdt.c   Fri Dec 13 18:26:22 2013
(r259322)
+++ stable/10/sys/dev/uart/uart_bus_fdt.c   Fri Dec 13 19:01:50 2013
(r259323)
@@ -61,6 +61,30 @@ static driver_t uart_fdt_driver = {
sizeof(struct uart_softc),
 };
 
+/*
+ * Compatible devices.  Keep this sorted in most- to least-specific order 
first,
+ * alphabetical second.  That is, "zwie,ns16550" should appear before "ns16550"
+ * on the theory that the zwie driver knows how to make better use of the
+ * hardware than the generic driver.  Likewise with chips within a family, the
+ * highest-numbers / most recent models should probably appear earlier.
+ */
+static struct ofw_compat_data compat_data[] = {
+   {"arm,pl011",   (uintptr_t)&uart_pl011_class},
+   {"cadence,uart",(uintptr_t)&uart_cdnc_class},
+   {"exynos",  (uintptr_t)&uart_s3c2410_class},
+   {"fsl,imx6q-uart",  (uintptr_t)&uart_imx_class},
+   {"fsl,imx53-uart",  (uintptr_t)&uart_imx_class},
+   {"fsl,imx51-uart",  (uintptr_t)&uart_imx_class},
+   {"fsl,imx31-uart",  (uintptr_t)&uart_imx_class},
+   {"fsl,imx27-uart",  (uintptr_t)&uart_imx_class},
+   {"fsl,imx25-uart",  (uintptr_t)&uart_imx_class},
+   {"fsl,imx21-uart",  (uintptr_t)&uart_imx_class},
+   {"lpc,uart",(uintptr_t)&uart_lpc_class},
+   {"ti,ns16550",  (uintptr_t)&uart_ti8250_class},
+   {"ns16550", (uintptr_t)&uart_ns8250_class},
+   {NULL,  (uintptr_t)NULL},
+};
+
 static int
 uart_fdt_get_clock(phandle_t node, pcell_t *cell)
 {
@@ -99,25 +123,16 @@ uart_fdt_probe(device_t dev)
phandle_t node;
pcell_t clock, shift;
int err;
+   const struct ofw_compat_data * cd;
 
sc = device_get_softc(dev);
-   if (ofw_bus_is_compatible(dev, "lpc,uart"))
-   sc->sc_class = &uart_lpc_class;
-   else if (ofw_bus_is_compatible(dev, "fsl,imx-uart"))
-   sc->sc_class = &uart_imx_class;
-   else if (ofw_bus_is_compatible(dev, "arm,pl011"))
-   sc->sc_class = &uart_pl011_class;
-   else if (ofw_bus_is_compatible(dev, "exynos"))
-   sc->sc_class = &uart_s3c2410_class;
-   else if (ofw_bus_is_compatible(dev, "cadence,uart"))
-   sc->sc_class = &uart_cdnc_class;
-   else if (ofw_bus_is_compatible(dev, "ti,ns16550"))
-   sc->sc_class = &uart_ti8250_class;
-   else if (ofw_bus_is_compatible(dev, "ns16550"))
-   sc->sc_class = &uart_ns8250_class;
-   else
+
+   cd = ofw_bus_search_compatible(dev, compat_data);
+   if (cd->ocd_data == (uintptr_t)NULL)
return (ENXIO);
 
+   sc->sc_class = (struct uart_class *)cd->ocd_data;
+
node = ofw_bus_get_node(dev);
 
if ((err = uart_fdt_get_clock(node, &clock)) != 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259324 - stable/10/sys/arm/rockchip

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 19:17:09 2013
New Revision: 259324
URL: http://svnweb.freebsd.org/changeset/base/259324

Log:
  MFC r256949:  Import basic support for Rockchip RK3188 SoC.

Added:
  stable/10/sys/arm/rockchip/
 - copied from r256949, head/sys/arm/rockchip/
Modified:
Directory Properties:
  stable/10/   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259325 - in stable/10/sys: arm/broadcom/bcm2835 arm/conf boot/fdt/dts

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 19:27:23 2013
New Revision: 259325
URL: http://svnweb.freebsd.org/changeset/base/259325

Log:
  MFC r257062: Add the Raspberry Pi SPI controller driver.

Added:
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.c
 - copied unchanged from r257062, 
head/sys/arm/broadcom/bcm2835/bcm2835_spi.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_spireg.h
 - copied unchanged from r257062, 
head/sys/arm/broadcom/bcm2835/bcm2835_spireg.h
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_spivar.h
 - copied unchanged from r257062, 
head/sys/arm/broadcom/bcm2835/bcm2835_spivar.h
Modified:
  stable/10/sys/arm/broadcom/bcm2835/files.bcm2835
  stable/10/sys/arm/conf/RPI-B
  stable/10/sys/boot/fdt/dts/bcm2835.dtsi
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.c (from r257062, 
head/sys/arm/broadcom/bcm2835/bcm2835_spi.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.cFri Dec 13 19:27:23 
2013(r259325, copy of r257062, 
head/sys/arm/broadcom/bcm2835/bcm2835_spi.c)
@@ -0,0 +1,521 @@
+/*-
+ * Copyright (c) 2012 Oleksandr Tymoshenko 
+ * Copyright (c) 2013 Luiz Otavio O Souza 
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include "spibus_if.h"
+
+static void bcm_spi_intr(void *);
+
+#ifdef BCM_SPI_DEBUG
+static void
+bcm_spi_printr(device_t dev)
+{
+   struct bcm_spi_softc *sc;
+   uint32_t reg;
+
+   sc = device_get_softc(dev);
+   reg = BCM_SPI_READ(sc, SPI_CS);
+   device_printf(dev, "CS=%b\n", reg,
+   "\20\1CS0\2CS1\3CPHA\4CPOL\7CSPOL"
+   "\10TA\11DMAEN\12INTD\13INTR\14ADCS\15REN\16LEN"
+   "\21DONE\22RXD\23TXD\24RXR\25RXF\26CSPOL0\27CSPOL1"
+   "\30CSPOL2\31DMA_LEN\32LEN_LONG");
+   reg = BCM_SPI_READ(sc, SPI_CLK) & SPI_CLK_MASK;
+   if (reg % 2)
+   reg--;
+   if (reg == 0)
+   reg = 65536;
+   device_printf(dev, "CLK=%uMhz/%d=%luhz\n",
+   SPI_CORE_CLK / 100, reg, SPI_CORE_CLK / reg);
+   reg = BCM_SPI_READ(sc, SPI_DLEN) & SPI_DLEN_MASK;
+   device_printf(dev, "DLEN=%d\n", reg);
+   reg = BCM_SPI_READ(sc, SPI_LTOH) & SPI_LTOH_MASK;
+   device_printf(dev, "LTOH=%d\n", reg);
+   reg = BCM_SPI_READ(sc, SPI_DC);
+   device_printf(dev, "DC=RPANIC=%#x RDREQ=%#x TPANIC=%#x TDREQ=%#x\n",
+   (reg & SPI_DC_RPANIC_MASK) >> SPI_DC_RPANIC_SHIFT,
+   (reg & SPI_DC_RDREQ_MASK) >> SPI_DC_RDREQ_SHIFT,
+   (reg & SPI_DC_TPANIC_MASK) >> SPI_DC_TPANIC_SHIFT,
+   (reg & SPI_DC_TDREQ_MASK) >> SPI_DC_TDREQ_SHIFT);
+}
+#endif
+
+static void
+bcm_spi_modifyreg(struct bcm_spi_softc *sc, uint32_t off, uint32_t mask,
+   uint32_t value)
+{
+   uint32_t reg;
+
+   mtx_assert(&sc->sc_mtx, MA_OWNED);
+   reg = BCM_SPI_READ(sc, off);
+   reg &= ~mask;
+   reg |= value;
+   BCM_SPI_WRITE(sc, off, reg);
+}
+
+static int
+bcm_spi_clock_proc(SYSCTL_HANDLER_ARGS)
+{
+   struct bcm_spi_softc *sc;
+   uint32_t clk;
+   int error;
+
+   sc = (struct bcm_spi_softc *)arg1;
+
+   BCM_SPI_LOCK(sc);
+   clk = BCM_SPI_READ(sc, SPI_CLK);
+   BCM_SPI_UNLOCK(sc);
+   clk &= 0x;
+   if (clk == 0)
+   

svn commit: r259326 - stable/10/contrib/tcpdump

2013-12-13 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Dec 13 19:32:02 2013
New Revision: 259326
URL: http://svnweb.freebsd.org/changeset/base/259326

Log:
  MFV r258571:
  
  Removes strict-aliasing warnings from newer GCC in tcpdump.
  
  Corresponds to MFC r258573, but for some reason our new pre-commit hooks
  will not let us merge it from there.

Modified:
  stable/10/contrib/tcpdump/extract.h

Modified: stable/10/contrib/tcpdump/extract.h
==
--- stable/10/contrib/tcpdump/extract.h Fri Dec 13 19:27:23 2013
(r259325)
+++ stable/10/contrib/tcpdump/extract.h Fri Dec 13 19:32:02 2013
(r259326)
@@ -51,13 +51,25 @@ typedef struct {
u_int32_t   val;
 } __attribute__((packed)) unaligned_u_int32_t;
 
-#define EXTRACT_16BITS(p) \
-   ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val))
-#define EXTRACT_32BITS(p) \
-   ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val))
-#define EXTRACT_64BITS(p) \
-   ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 
0)->val)) << 32 | \
-((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 
1)->val)) << 0))
+static inline u_int16_t
+EXTRACT_16BITS(const void *p)
+{
+   return ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val));
+}
+
+static inline u_int32_t
+EXTRACT_32BITS(const void *p)
+{
+   return ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val));
+}
+
+static inline u_int64_t
+EXTRACT_64BITS(const void *p)
+{
+   return ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) 
+ 0)->val)) << 32 | \
+   ((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 1)->val)) 
<< 0));
+
+}
 
 #else /* HAVE___ATTRIBUTE__ */
 /*
@@ -88,13 +100,26 @@ typedef struct {
  * The processor natively handles unaligned loads, so we can just
  * cast the pointer and fetch through it.
  */
-#define EXTRACT_16BITS(p) \
-   ((u_int16_t)ntohs(*(const u_int16_t *)(p)))
-#define EXTRACT_32BITS(p) \
-   ((u_int32_t)ntohl(*(const u_int32_t *)(p)))
-#define EXTRACT_64BITS(p) \
-   ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) << 32 | \
-((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0))
+static inline u_int16_t
+EXTRACT_16BITS(const void *p)
+{
+   return ((u_int16_t)ntohs(*(const u_int16_t *)(p)));
+}
+
+static inline u_int32_t
+EXTRACT_32BITS(const void *p)
+{
+   return ((u_int32_t)ntohl(*(const u_int32_t *)(p)));
+}
+
+static inline u_int64_t
+EXTRACT_64BITS(const void *p)
+{
+   return ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) 
<< 32 | \
+   ((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0));
+
+}
+
 #endif /* LBL_ALIGN */
 
 #define EXTRACT_24BITS(p) \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259327 - stable/9/contrib/tcpdump

2013-12-13 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Dec 13 19:38:05 2013
New Revision: 259327
URL: http://svnweb.freebsd.org/changeset/base/259327

Log:
  MFV r258571:
  
  Removes strict-aliasing warnings from newer GCC in tcpdump.
  
  Corresponds to MFC r258573, but for some reason our new pre-commit
  hooks will not let us merge it from there.

Modified:
  stable/9/contrib/tcpdump/extract.h

Modified: stable/9/contrib/tcpdump/extract.h
==
--- stable/9/contrib/tcpdump/extract.h  Fri Dec 13 19:32:02 2013
(r259326)
+++ stable/9/contrib/tcpdump/extract.h  Fri Dec 13 19:38:05 2013
(r259327)
@@ -51,13 +51,25 @@ typedef struct {
u_int32_t   val;
 } __attribute__((packed)) unaligned_u_int32_t;
 
-#define EXTRACT_16BITS(p) \
-   ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val))
-#define EXTRACT_32BITS(p) \
-   ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val))
-#define EXTRACT_64BITS(p) \
-   ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 
0)->val)) << 32 | \
-((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 
1)->val)) << 0))
+static inline u_int16_t
+EXTRACT_16BITS(const void *p)
+{
+   return ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val));
+}
+
+static inline u_int32_t
+EXTRACT_32BITS(const void *p)
+{
+   return ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val));
+}
+
+static inline u_int64_t
+EXTRACT_64BITS(const void *p)
+{
+   return ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) 
+ 0)->val)) << 32 | \
+   ((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 1)->val)) 
<< 0));
+
+}
 
 #else /* HAVE___ATTRIBUTE__ */
 /*
@@ -88,13 +100,26 @@ typedef struct {
  * The processor natively handles unaligned loads, so we can just
  * cast the pointer and fetch through it.
  */
-#define EXTRACT_16BITS(p) \
-   ((u_int16_t)ntohs(*(const u_int16_t *)(p)))
-#define EXTRACT_32BITS(p) \
-   ((u_int32_t)ntohl(*(const u_int32_t *)(p)))
-#define EXTRACT_64BITS(p) \
-   ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) << 32 | \
-((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0))
+static inline u_int16_t
+EXTRACT_16BITS(const void *p)
+{
+   return ((u_int16_t)ntohs(*(const u_int16_t *)(p)));
+}
+
+static inline u_int32_t
+EXTRACT_32BITS(const void *p)
+{
+   return ((u_int32_t)ntohl(*(const u_int32_t *)(p)));
+}
+
+static inline u_int64_t
+EXTRACT_64BITS(const void *p)
+{
+   return ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) 
<< 32 | \
+   ((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0));
+
+}
+
 #endif /* LBL_ALIGN */
 
 #define EXTRACT_24BITS(p) \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r259326 - stable/10/contrib/tcpdump

2013-12-13 Thread Eitan Adler
On Fri, Dec 13, 2013 at 2:32 PM, Pedro F. Giffuni  wrote:
> Author: pfg
> Date: Fri Dec 13 19:32:02 2013
> New Revision: 259326
> URL: http://svnweb.freebsd.org/changeset/base/259326
>
> Log:
>   MFV r258571:
>
>   Removes strict-aliasing warnings from newer GCC in tcpdump.
>
>   Corresponds to MFC r258573, but for some reason our new pre-commit hooks
>   will not let us merge it from there.

How did you attempt to do this merge?  What were the exact commands?
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r259326 - stable/10/contrib/tcpdump

2013-12-13 Thread Pedro Giffuni

On 13.12.2013 14:43, Eitan Adler wrote:

On Fri, Dec 13, 2013 at 2:32 PM, Pedro F. Giffuni  wrote:

Author: pfg
Date: Fri Dec 13 19:32:02 2013
New Revision: 259326
URL: http://svnweb.freebsd.org/changeset/base/259326

Log:
   MFV r258571:

   Removes strict-aliasing warnings from newer GCC in tcpdump.

   Corresponds to MFC r258573, but for some reason our new pre-commit hooks
   will not let us merge it from there.

How did you attempt to do this merge?  What were the exact commands?


(Standing on my local stable/10 dir)

svn merge -c r258573 ^/head .

Attempt to commit there fired the pre-commit hook.
I then tried:

svn merge  --ignore-ancestry -c r258573 ^/head .

(failed)

Next attempt was:
svn merge -c r258571 ^/vendor/tcpdump/dist contrib/tcpdump

(also failed)

finally this worked:

svn merge --ignore-ancestry -c r258571 ^/vendor/tcpdump/dist contrib/tcpdump

Hope that helps someone with the same issue ;).

Pedro.

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


svn commit: r259328 - in stable/10/sys/geom: . label

2013-12-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 13 20:33:59 2013
New Revision: 259328
URL: http://svnweb.freebsd.org/changeset/base/259328

Log:
  MFC r256724:
  
  Make geom_label(4) resize-aware.  This fixes a situation when "gpart resize"
  would resize a partition, but label providers - e.g. /dev/gptid/XXX - would
  stay the same size.
  
  MFC r256766:
  
  Fix build with gcc by spelling unused format string as "unused" instead of 
NULL.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/geom/geom_slice.c
  stable/10/sys/geom/label/g_label.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/geom_slice.c
==
--- stable/10/sys/geom/geom_slice.c Fri Dec 13 19:38:05 2013
(r259327)
+++ stable/10/sys/geom/geom_slice.c Fri Dec 13 20:33:59 2013
(r259328)
@@ -382,7 +382,7 @@ g_slice_config(struct g_geom *gp, u_int 
printf("GEOM: Reconfigure %s, start %jd length %jd end 
%jd\n",
pp->name, (intmax_t)offset, (intmax_t)length,
(intmax_t)(offset + length - 1));
-   pp->mediasize = gsl->length;
+   g_resize_provider(pp, gsl->length);
return (0);
}
sb = sbuf_new_auto();

Modified: stable/10/sys/geom/label/g_label.c
==
--- stable/10/sys/geom/label/g_label.c  Fri Dec 13 19:38:05 2013
(r259327)
+++ stable/10/sys/geom/label/g_label.c  Fri Dec 13 20:33:59 2013
(r259328)
@@ -124,6 +124,17 @@ g_label_spoiled(struct g_consumer *cp)
g_slice_spoiled(cp);
 }
 
+static void
+g_label_resize(struct g_consumer *cp)
+{
+
+   G_LABEL_DEBUG(1, "Label %s resized.",
+   LIST_FIRST(&cp->geom->provider)->name);
+
+   g_slice_config(cp->geom, 0, G_SLICE_CONFIG_FORCE, (off_t)0,
+   cp->provider->mediasize, cp->provider->sectorsize, "notused");
+}
+
 static int
 g_label_is_name_ok(const char *label)
 {
@@ -208,6 +219,7 @@ g_label_create(struct gctl_req *req, str
}
gp->orphan = g_label_orphan;
gp->spoiled = g_label_spoiled;
+   gp->resize = g_label_resize;
g_access(cp, -1, 0, 0);
g_slice_config(gp, 0, G_SLICE_CONFIG_SET, (off_t)0, mediasize,
pp->sectorsize, "%s", name);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259329 - in stable/10/sys/arm: allwinner allwinner/a20 arm at91 broadcom/bcm2835 econa freescale/imx include lpc mv mv/orion rockchip sa11x0 samsung/exynos tegra ti ti/am335x ti/omap4 ...

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 20:43:11 2013
New Revision: 259329
URL: http://svnweb.freebsd.org/changeset/base/259329

Log:
  MFC r257199, r257200, r257217:
  
Remove all #include  from arm code.  It's already
included by vm/pmap.h, which is a prerequisite for arm/machine/pmap.h
so there's no reason to ever include it directly.
  
Remove #include  from all the arm code that doesn't
really need it.  That would be almost everywhere it was included.  Add
it in a couple files that really do need it and were previously getting
it by accident via another header.
  
Remove the last dregs of trapframe_t.  It turns out only arm was using
this type, so remove it to make arm code more consistant with other
platforms.

Modified:
  stable/10/sys/arm/allwinner/a10_clk.c
  stable/10/sys/arm/allwinner/a10_gpio.c
  stable/10/sys/arm/allwinner/a10_machdep.c
  stable/10/sys/arm/allwinner/a20/a20_cpu_cfg.c
  stable/10/sys/arm/allwinner/timer.c
  stable/10/sys/arm/arm/cpufunc.c
  stable/10/sys/arm/arm/genassym.c
  stable/10/sys/arm/arm/generic_timer.c
  stable/10/sys/arm/arm/machdep.c
  stable/10/sys/arm/arm/minidump_machdep.c
  stable/10/sys/arm/arm/mpcore_timer.c
  stable/10/sys/arm/arm/nexus.c
  stable/10/sys/arm/arm/trap.c
  stable/10/sys/arm/arm/undefined.c
  stable/10/sys/arm/arm/vfp.c
  stable/10/sys/arm/arm/vm_machdep.c
  stable/10/sys/arm/at91/at91_mci.c
  stable/10/sys/arm/at91/at91_pmc.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_dma.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_fb.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_spi.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
  stable/10/sys/arm/econa/timer.c
  stable/10/sys/arm/freescale/imx/imx51_ipuv3.c
  stable/10/sys/arm/freescale/imx/imx_gpt.c
  stable/10/sys/arm/freescale/imx/imx_machdep.c
  stable/10/sys/arm/include/cpu.h
  stable/10/sys/arm/include/fdt.h
  stable/10/sys/arm/include/frame.h
  stable/10/sys/arm/include/pcb.h
  stable/10/sys/arm/include/pcpu.h
  stable/10/sys/arm/include/undefined.h
  stable/10/sys/arm/lpc/lpc_fb.c
  stable/10/sys/arm/lpc/lpc_gpio.c
  stable/10/sys/arm/lpc/lpc_machdep.c
  stable/10/sys/arm/lpc/lpc_mmc.c
  stable/10/sys/arm/lpc/lpc_spi.c
  stable/10/sys/arm/lpc/lpc_timer.c
  stable/10/sys/arm/mv/mv_machdep.c
  stable/10/sys/arm/mv/mvvar.h
  stable/10/sys/arm/mv/orion/db88f5xxx.c
  stable/10/sys/arm/mv/timer.c
  stable/10/sys/arm/rockchip/rk30xx_gpio.c
  stable/10/sys/arm/rockchip/rk30xx_grf.c
  stable/10/sys/arm/rockchip/rk30xx_machdep.c
  stable/10/sys/arm/rockchip/rk30xx_pmu.c
  stable/10/sys/arm/sa11x0/sa11x0_io.c
  stable/10/sys/arm/samsung/exynos/arch_timer.c
  stable/10/sys/arm/samsung/exynos/exynos5_machdep.c
  stable/10/sys/arm/tegra/tegra2_machdep.c
  stable/10/sys/arm/ti/am335x/am335x_dmtimer.c
  stable/10/sys/arm/ti/am335x/am335x_lcd_syscons.c
  stable/10/sys/arm/ti/am335x/am335x_prcm.c
  stable/10/sys/arm/ti/am335x/am335x_scm_padconf.c
  stable/10/sys/arm/ti/omap4/omap4_prcm_clks.c
  stable/10/sys/arm/ti/omap4/omap4_scm_padconf.c
  stable/10/sys/arm/ti/omap4/pandaboard/pandaboard.c
  stable/10/sys/arm/ti/ti_cpuid.c
  stable/10/sys/arm/ti/ti_machdep.c
  stable/10/sys/arm/ti/ti_mmchs.c
  stable/10/sys/arm/ti/ti_prcm.c
  stable/10/sys/arm/ti/ti_scm.c
  stable/10/sys/arm/ti/twl/twl.c
  stable/10/sys/arm/ti/twl/twl_clks.c
  stable/10/sys/arm/ti/twl/twl_vreg.c
  stable/10/sys/arm/versatile/pl050.c
  stable/10/sys/arm/versatile/sp804.c
  stable/10/sys/arm/versatile/versatile_clcd.c
  stable/10/sys/arm/versatile/versatile_machdep.c
  stable/10/sys/arm/versatile/versatile_pci.c
  stable/10/sys/arm/versatile/versatile_timer.c
  stable/10/sys/arm/xilinx/zy7_machdep.c
  stable/10/sys/arm/xscale/i80321/i80321_pci.c
  stable/10/sys/arm/xscale/i8134x/i81342_pci.c
  stable/10/sys/arm/xscale/ixp425/ixp425_pci.c
  stable/10/sys/arm/xscale/ixp425/ixp425_wdog.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/allwinner/a10_clk.c
==
--- stable/10/sys/arm/allwinner/a10_clk.c   Fri Dec 13 20:33:59 2013
(r259328)
+++ stable/10/sys/arm/allwinner/a10_clk.c   Fri Dec 13 20:43:11 2013
(r259329)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 

Modified: stable/10/sys/arm/allwinner/a10_gpio.c
==
--- stable/10/sys/arm/allwinner/a10_gpio.c  Fri Dec 13 20:33:59 2013
(r259328)
+++ stable/10/sys/arm/allwinner/a10_gpio.c  Fri Dec 13 20:43:11 2013
(r259329)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 

Modified: stable/10/sys/arm/allwinner

svn commit: r259330 - head/sys/kern

2013-12-13 Thread Mateusz Guzik
Author: mjg
Date: Fri Dec 13 20:53:31 2013
New Revision: 259330
URL: http://svnweb.freebsd.org/changeset/base/259330

Log:
  rlimit: add and utilize lim_shared
  
  MFC after:2 weeks

Modified:
  head/sys/kern/kern_resource.c

Modified: head/sys/kern/kern_resource.c
==
--- head/sys/kern/kern_resource.c   Fri Dec 13 20:43:11 2013
(r259329)
+++ head/sys/kern/kern_resource.c   Fri Dec 13 20:53:31 2013
(r259330)
@@ -80,6 +80,8 @@ static intdonice(struct thread *td, str
 static struct uidinfo *uilookup(uid_t uid);
 static voidruxagg_locked(struct rusage_ext *rux, struct thread *td);
 
+static __inline intlim_shared(struct plimit *limp);
+
 /*
  * Resource controls and accounting.
  */
@@ -1129,6 +1131,14 @@ lim_hold(limp)
return (limp);
 }
 
+static __inline int
+lim_shared(limp)
+   struct plimit *limp;
+{
+
+   return (limp->pl_refcnt > 1);
+}
+
 void
 lim_fork(struct proc *p1, struct proc *p2)
 {
@@ -1162,7 +1172,7 @@ lim_copy(dst, src)
struct plimit *dst, *src;
 {
 
-   KASSERT(dst->pl_refcnt == 1, ("lim_copy to shared limit"));
+   KASSERT(!lim_shared(dst), ("lim_copy to shared limit"));
bcopy(src->pl_rlimit, dst->pl_rlimit, sizeof(src->pl_rlimit));
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259331 - head/sys/kern

2013-12-13 Thread Mateusz Guzik
Author: mjg
Date: Fri Dec 13 20:54:45 2013
New Revision: 259331
URL: http://svnweb.freebsd.org/changeset/base/259331

Log:
  rlimit: avoid unnecessary copying of rlimits
  
  If refcount is 1 just modify rlimits in place.
  
  MFC after:2 weeks

Modified:
  head/sys/kern/kern_resource.c

Modified: head/sys/kern/kern_resource.c
==
--- head/sys/kern/kern_resource.c   Fri Dec 13 20:53:31 2013
(r259330)
+++ head/sys/kern/kern_resource.c   Fri Dec 13 20:54:45 2013
(r259331)
@@ -679,21 +679,29 @@ kern_proc_setrlimit(struct thread *td, s
limp->rlim_max = RLIM_INFINITY;
 
oldssiz.rlim_cur = 0;
-   newlim = lim_alloc();
+   newlim = NULL;
PROC_LOCK(p);
+   if (lim_shared(p->p_limit)) {
+   PROC_UNLOCK(p);
+   newlim = lim_alloc();
+   PROC_LOCK(p);
+   }
oldlim = p->p_limit;
alimp = &oldlim->pl_rlimit[which];
if (limp->rlim_cur > alimp->rlim_max ||
limp->rlim_max > alimp->rlim_max)
if ((error = priv_check(td, PRIV_PROC_SETRLIMIT))) {
PROC_UNLOCK(p);
-   lim_free(newlim);
+   if (newlim != NULL)
+   lim_free(newlim);
return (error);
}
if (limp->rlim_cur > limp->rlim_max)
limp->rlim_cur = limp->rlim_max;
-   lim_copy(newlim, oldlim);
-   alimp = &newlim->pl_rlimit[which];
+   if (newlim != NULL) {
+   lim_copy(newlim, oldlim);
+   alimp = &newlim->pl_rlimit[which];
+   }
 
switch (which) {
 
@@ -743,9 +751,11 @@ kern_proc_setrlimit(struct thread *td, s
if (p->p_sysent->sv_fixlimit != NULL)
p->p_sysent->sv_fixlimit(limp, which);
*alimp = *limp;
-   p->p_limit = newlim;
+   if (newlim != NULL)
+   p->p_limit = newlim;
PROC_UNLOCK(p);
-   lim_free(oldlim);
+   if (newlim != NULL)
+   lim_free(oldlim);
 
if (which == RLIMIT_STACK) {
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r259010 - in head/sys: conf powerpc/fpu

2013-12-13 Thread John Baldwin
On Friday, December 13, 2013 3:48:12 am Dag-Erling Smørgrav wrote:
> > LINT64 is yet another kernel config covered by 'make tinderbox', but not by
> > the periodic tinderbox.  It is probably worth adding to the periodic 
> > tinderbox 
> > (someday it'd be nice if the two tinderboxes built the same set of things).
> 
> Some day it would be nice if people talked to me directly instead of
> sniping from the sidelines.

Ah, but when people have raised this exact issue before (that tcbuild and
'make tinderbox' build different things), you have blown them off repeatedly.

> The root issue here is that "make LINT" is poorly implemented, so under
> some circumstances (including the tinderbox and, if I read the code
> correctly, 'make universe'), the LINT64 config is never generated.

Agreed on that front.

> Oh, and 'make tinderbox' should die.

No, it is very developer friendly as it Just Works(tm) as a single command
from an existing source tree checkout.  It also happens to build more of
the tree than the periodic tinderbox (by building more kernel configs,
albeit doing quite a bit of duplicate work for platforms like arm in the
process).

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

svn commit: r259332 - releng/10.0/sys/cam/ctl

2013-12-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 13 21:22:12 2013
New Revision: 259332
URL: http://svnweb.freebsd.org/changeset/base/259332

Log:
  MFC r258871:
  
  Properly report an error instead of panicing when user tries to create
  LUN backed by non-disk device, e.g. /dev/null.
  
  Approved by:  re (glebius)
  Sponsored by: The FreeBSD Foundation

Modified:
  releng/10.0/sys/cam/ctl/ctl_backend_block.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/cam/ctl/ctl_backend_block.c
==
--- releng/10.0/sys/cam/ctl/ctl_backend_block.c Fri Dec 13 20:54:45 2013
(r259331)
+++ releng/10.0/sys/cam/ctl/ctl_backend_block.c Fri Dec 13 21:22:12 2013
(r259332)
@@ -1485,6 +1485,7 @@ ctl_be_block_close(struct ctl_be_block_l
case CTL_BE_BLOCK_FILE:
break;
case CTL_BE_BLOCK_NONE:
+   break;
default:
panic("Unexpected backend type.");
break;
@@ -1503,6 +1504,7 @@ ctl_be_block_close(struct ctl_be_block_l
}
break;
case CTL_BE_BLOCK_NONE:
+   break;
default:
panic("Unexpected backend type.");
break;
@@ -1589,7 +1591,7 @@ ctl_be_block_open(struct ctl_be_block_so
} else {
error = EINVAL;
snprintf(req->error_str, sizeof(req->error_str),
-"%s is not a disk or file", be_lun->dev_path);
+"%s is not a disk or plain file", be_lun->dev_path);
}
VOP_UNLOCK(be_lun->vn, 0);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259333 - releng/10.0/usr.sbin/ctld

2013-12-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 13 21:27:16 2013
New Revision: 259333
URL: http://svnweb.freebsd.org/changeset/base/259333

Log:
  MFC r259182:
  
  Fix handling for empty auth-groups.  Without it, ctld child process
  would either exit on assertion, or, if assertions are not enabled,
  fail to authenticate the target.
  
  Approved by:  re (gjb)
  Sponsored by: The FreeBSD Foundation

Modified:
  releng/10.0/usr.sbin/ctld/login.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/usr.sbin/ctld/login.c
==
--- releng/10.0/usr.sbin/ctld/login.c   Fri Dec 13 21:22:12 2013
(r259332)
+++ releng/10.0/usr.sbin/ctld/login.c   Fri Dec 13 21:27:16 2013
(r259333)
@@ -1007,6 +1007,14 @@ login(struct connection *conn)
return;
}
 
+   if (ag->ag_type == AG_TYPE_UNKNOWN) {
+   /*
+* This can happen with empty auth-group.
+*/
+   login_send_error(request, 0x02, 0x01);
+   log_errx(1, "auth-group type not set, denying access");
+   }
+
log_debugx("CHAP authentication required");
 
auth_method = keys_find(request_keys, "AuthMethod");
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259334 - stable/10

2013-12-13 Thread Tijl Coosemans
Author: tijl
Date: Fri Dec 13 21:28:45 2013
New Revision: 259334
URL: http://svnweb.freebsd.org/changeset/base/259334

Log:
  Add mergeinfo for the MFC of r258573 done in r259326.

Modified:
Directory Properties:
  stable/10/   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r259326 - stable/10/contrib/tcpdump

2013-12-13 Thread Tijl Coosemans
On Fri, 13 Dec 2013 15:04:21 -0500 Pedro Giffuni wrote:
> On 13.12.2013 14:43, Eitan Adler wrote:
>> On Fri, Dec 13, 2013 at 2:32 PM, Pedro F. Giffuni  wrote:
>>> Author: pfg
>>> Date: Fri Dec 13 19:32:02 2013
>>> New Revision: 259326
>>> URL: http://svnweb.freebsd.org/changeset/base/259326
>>>
>>> Log:
>>>MFV r258571:
>>>
>>>Removes strict-aliasing warnings from newer GCC in tcpdump.
>>>
>>>Corresponds to MFC r258573, but for some reason our new pre-commit hooks
>>>will not let us merge it from there.
>> How did you attempt to do this merge?  What were the exact commands?
> 
> (Standing on my local stable/10 dir)
> 
> svn merge -c r258573 ^/head .
> 
> Attempt to commit there fired the pre-commit hook.

This also copies the svn:mergeinfo property on head/contrib/tcpdump
to stable/10/contrib/tcpdump, but this property is only allowed on
stable/10 at the moment.  I think you can just delete the property
before committing:

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


svn commit: r259335 - in stable/10/sys/arm: allwinner arm broadcom/bcm2835 include lpc mv rockchip samsung/exynos tegra ti versatile xilinx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 21:40:12 2013
New Revision: 259335
URL: http://svnweb.freebsd.org/changeset/base/259335

Log:
  MFC r257201, r257202
  
Retire arm_remap_nocache() and the data and constants associated with it.

Modified:
  stable/10/sys/arm/allwinner/a10_machdep.c
  stable/10/sys/arm/arm/busdma_machdep.c
  stable/10/sys/arm/arm/pmap-v6.c
  stable/10/sys/arm/arm/pmap.c
  stable/10/sys/arm/arm/vm_machdep.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  stable/10/sys/arm/include/pmap.h
  stable/10/sys/arm/lpc/lpc_machdep.c
  stable/10/sys/arm/mv/mv_machdep.c
  stable/10/sys/arm/rockchip/rk30xx_machdep.c
  stable/10/sys/arm/samsung/exynos/exynos5_machdep.c
  stable/10/sys/arm/tegra/tegra2_machdep.c
  stable/10/sys/arm/ti/ti_machdep.c
  stable/10/sys/arm/versatile/versatile_machdep.c
  stable/10/sys/arm/xilinx/zy7_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/allwinner/a10_machdep.c
==
--- stable/10/sys/arm/allwinner/a10_machdep.c   Fri Dec 13 21:28:45 2013
(r259334)
+++ stable/10/sys/arm/allwinner/a10_machdep.c   Fri Dec 13 21:40:12 2013
(r259335)
@@ -57,7 +57,7 @@ vm_offset_t
 initarm_lastaddr(void)
 {
 
-   return (DEVMAP_BOOTSTRAP_MAP_START - ARM_NOCACHE_KVA_SIZE);
+   return (DEVMAP_BOOTSTRAP_MAP_START);
 }
 
 void

Modified: stable/10/sys/arm/arm/busdma_machdep.c
==
--- stable/10/sys/arm/arm/busdma_machdep.c  Fri Dec 13 21:28:45 2013
(r259334)
+++ stable/10/sys/arm/arm/busdma_machdep.c  Fri Dec 13 21:40:12 2013
(r259335)
@@ -122,7 +122,6 @@ struct bus_dma_tag {
 
 struct bounce_page {
vm_offset_t vaddr;  /* kva of bounce buffer */
-   vm_offset_t vaddr_nocache;  /* kva of bounce buffer uncached */
bus_addr_t  busaddr;/* Physical address */
vm_offset_t datavaddr;  /* kva of client data */
bus_addr_t  dataaddr;   /* client physical address */
@@ -1196,39 +1195,23 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat, 
STAILQ_FOREACH(bpage, &map->bpages, links) {
if (op & BUS_DMASYNC_PREWRITE) {
if (bpage->datavaddr != 0)
-   bcopy((void *)bpage->datavaddr,
-   (void *)(bpage->vaddr_nocache != 0 ?
-bpage->vaddr_nocache :
-bpage->vaddr),
-   bpage->datacount);
+   bcopy((void *)bpage->datavaddr, 
+   (void *)bpage->vaddr, bpage->datacount);
else
physcopyout(bpage->dataaddr,
-   (void *)(bpage->vaddr_nocache != 0 ?
-bpage->vaddr_nocache :
-bpage->vaddr),
-   bpage->datacount);
-   if (bpage->vaddr_nocache == 0) {
-   cpu_dcache_wb_range(bpage->vaddr,
-   bpage->datacount);
-   cpu_l2cache_wb_range(bpage->vaddr,
-   bpage->datacount);
-   }
+   (void *)bpage->vaddr,bpage->datacount);
+   cpu_dcache_wb_range(bpage->vaddr, bpage->datacount);
+   cpu_l2cache_wb_range(bpage->vaddr, bpage->datacount);
dmat->bounce_zone->total_bounced++;
}
if (op & BUS_DMASYNC_POSTREAD) {
-   if (bpage->vaddr_nocache == 0) {
-   cpu_dcache_inv_range(bpage->vaddr,
-   bpage->datacount);
-   cpu_l2cache_inv_range(bpage->vaddr,
-   bpage->datacount);
-   }
+   cpu_dcache_inv_range(bpage->vaddr, bpage->datacount);
+   cpu_l2cache_inv_range(bpage->vaddr, bpage->datacount);
if (bpage->datavaddr != 0)
-   bcopy((void *)(bpage->vaddr_nocache != 0 ?
-   bpage->vaddr_nocache : bpage->vaddr),
+   bcopy((void *)bpage->vaddr,
(void *)bpage->datavaddr, bpage->datacount);
else
-   physcopyin((void *)(bpage->vaddr_nocache != 0 ?
-   bpage->vaddr_nocache : bpage->vaddr),
+   physcopyin((void *)bpage->vaddr,
bpage->dataaddr, bpage->datacount);
  

svn commit: r259337 - stable/10/sys/arm/arm

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 21:41:40 2013
New Revision: 259337
URL: http://svnweb.freebsd.org/changeset/base/259337

Log:
  MFC r257203: Eliminate a compiler warning about extraneous parens.

Modified:
  stable/10/sys/arm/arm/busdma_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/busdma_machdep.c
==
--- stable/10/sys/arm/arm/busdma_machdep.c  Fri Dec 13 21:41:23 2013
(r259336)
+++ stable/10/sys/arm/arm/busdma_machdep.c  Fri Dec 13 21:41:40 2013
(r259337)
@@ -807,7 +807,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma
bus_addr_t curaddr;
bus_size_t sgsize;
 
-   if ((map->pagesneeded == 0)) {
+   if (map->pagesneeded == 0) {
CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
dmat->lowaddr, dmat->boundary, dmat->alignment);
CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
@@ -838,7 +838,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm
vm_offset_t vendaddr;
bus_addr_t paddr;
 
-   if ((map->pagesneeded == 0)) {
+   if (map->pagesneeded == 0) {
CTR3(KTR_BUSDMA, "lowaddr= %d, boundary= %d, alignment= %d",
dmat->lowaddr, dmat->boundary, dmat->alignment);
CTR2(KTR_BUSDMA, "map= %p, pagesneeded= %d",
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259336 - releng/10.0/sys/dev/iscsi

2013-12-13 Thread Edward Tomasz Napierala
Author: trasz
Date: Fri Dec 13 21:41:23 2013
New Revision: 259336
URL: http://svnweb.freebsd.org/changeset/base/259336

Log:
  MFC r259183:
  
  Properly refuse handoff requests on already connected sessions.  Previously
  this would result in dropping the session.
  
  Approved by:  re (gjb)
  Sponsored by: The FreeBSD Foundation

Modified:
  releng/10.0/sys/dev/iscsi/iscsi.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/dev/iscsi/iscsi.c
==
--- releng/10.0/sys/dev/iscsi/iscsi.c   Fri Dec 13 21:40:12 2013
(r259335)
+++ releng/10.0/sys/dev/iscsi/iscsi.c   Fri Dec 13 21:41:23 2013
(r259336)
@@ -1247,6 +1247,18 @@ iscsi_ioctl_daemon_handoff(struct iscsi_
sx_sunlock(&sc->sc_lock);
return (EINVAL);
}
+   if (is->is_connected) {
+   /*
+* This might have happened because another iscsid(8)
+* instance handed off the connection in the meantime.
+* Just return.
+*/
+   ISCSI_SESSION_WARN(is, "handoff on already connected "
+   "session");
+   ISCSI_SESSION_UNLOCK(is);
+   sx_sunlock(&sc->sc_lock);
+   return (EBUSY);
+   }
 
strlcpy(is->is_target_alias, handoff->idh_target_alias,
sizeof(is->is_target_alias));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r259326 - stable/10/contrib/tcpdump

2013-12-13 Thread Eitan Adler
On Fri, Dec 13, 2013 at 4:32 PM, Tijl Coosemans  wrote:
> On Fri, 13 Dec 2013 15:04:21 -0500 Pedro Giffuni wrote:
>> On 13.12.2013 14:43, Eitan Adler wrote:
>>> On Fri, Dec 13, 2013 at 2:32 PM, Pedro F. Giffuni  wrote:
 Author: pfg
 Date: Fri Dec 13 19:32:02 2013
 New Revision: 259326
 URL: http://svnweb.freebsd.org/changeset/base/259326

 Log:
MFV r258571:

Removes strict-aliasing warnings from newer GCC in tcpdump.

Corresponds to MFC r258573, but for some reason our new pre-commit hooks
will not let us merge it from there.
>>> How did you attempt to do this merge?  What were the exact commands?
>>
>> (Standing on my local stable/10 dir)
>>
>> svn merge -c r258573 ^/head .
>>
>> Attempt to commit there fired the pre-commit hook.
>
> This also copies the svn:mergeinfo property on head/contrib/tcpdump
> to stable/10/contrib/tcpdump, but this property is only allowed on
> stable/10 at the moment.  I think you can just delete the property
> before committing:
>
> svn propdel svn:mergeinfo contrib/tcpdump

I think this should still be done, along with a --record-only merge.


-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259338 - svnadmin/conf

2013-12-13 Thread Kenneth D. Merry
Author: ken
Date: Fri Dec 13 21:46:53 2013
New Revision: 259338
URL: http://svnweb.freebsd.org/changeset/base/259338

Log:
  Release Alan Somers (asomers) from mentorship.

Modified:
  svnadmin/conf/mentors

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Fri Dec 13 21:41:40 2013(r259337)
+++ svnadmin/conf/mentors   Fri Dec 13 21:46:53 2013(r259338)
@@ -12,7 +12,6 @@
 # Mentee   Mentor  Optional comment
 achim  scottl  Co-mentor: emaste
 agcscottl  Co-mentor: emax
-asomersken Co-mentor: gibbs, will
 benl   philip  Co-mentor: simon
 carl   jimharris
 cy andre   Co-mentor: glebius
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259339 - head/sbin/devd

2013-12-13 Thread Alan Somers
Author: asomers
Date: Fri Dec 13 21:49:41 2013
New Revision: 259339
URL: http://svnweb.freebsd.org/changeset/base/259339

Log:
  sbin/devd/devd.cc
Increase the size of devd's client socket's send buffer from the
default (8k) to 128k.  This prevents clients from getting
POLLHUPped during event storms.  For example, during zpool creation,
the kernel emits a resource.fs.zfs.statechange event for every vdev
in the pool.  A 128k buffer is large enough to hold the statechange
events for a pool with nearly 800 drives.
  
  Reviewed by:  ian, imp
  Approved by:  ken (mentor)
  Sponsored by: Spectra Logic Corp
  MFC after:4 weeks

Modified:
  head/sbin/devd/devd.cc

Modified: head/sbin/devd/devd.cc
==
--- head/sbin/devd/devd.cc  Fri Dec 13 21:46:53 2013(r259338)
+++ head/sbin/devd/devd.cc  Fri Dec 13 21:49:41 2013(r259339)
@@ -104,6 +104,19 @@ __FBSDID("$FreeBSD$");
 #define CF "/etc/devd.conf"
 #define SYSCTL "hw.bus.devctl_disable"
 
+/*
+ * Since the client socket is nonblocking, we must increase its send buffer to
+ * handle brief event storms.  On FreeBSD, AF_UNIX sockets don't have a receive
+ * buffer, so the client can't increate the buffersize by itself.
+ *
+ * For example, when creating a ZFS pool, devd emits one 165 character
+ * resource.fs.zfs.statechange message for each vdev in the pool.  A 64k
+ * buffer has enough space for almost 400 drives, which would be very large but
+ * not impossibly large pool.  A 128k buffer has enough space for 794 drives,
+ * which is more than can fit in a rack with modern technology.
+ */
+#define CLIENT_BUFSIZE 131072
+
 using namespace std;
 
 extern FILE *yyin;
@@ -892,6 +905,7 @@ void
 new_client(int fd)
 {
int s;
+   int sndbuf_size;
 
/*
 * First go reap any zombie clients, then accept the connection, and
@@ -901,10 +915,15 @@ new_client(int fd)
check_clients();
s = accept(fd, NULL, NULL);
if (s != -1) {
+   sndbuf_size = CLIENT_BUFSIZE;
+   if (setsockopt(s, SOL_SOCKET, SO_SNDBUF, &sndbuf_size,
+   sizeof(sndbuf_size)))
+   err(1, "setsockopt");
shutdown(s, SHUT_RD);
clients.push_back(s);
++num_clients;
-   }
+   } else
+   err(1, "accept");
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259340 - head/lib/libc/stdlib

2013-12-13 Thread Eitan Adler
Author: eadler
Date: Fri Dec 13 21:50:03 2013
New Revision: 259340
URL: http://svnweb.freebsd.org/changeset/base/259340

Log:
  getopt_long.3: wording quibbles
  
  - Make wording more clear: "is expect" vs "is expected" [1]
  - Remove extraneous trailing period..
  
  Reported by:  dim [1]

Modified:
  head/lib/libc/stdlib/getopt_long.3

Modified: head/lib/libc/stdlib/getopt_long.3
==
--- head/lib/libc/stdlib/getopt_long.3  Fri Dec 13 21:49:41 2013
(r259339)
+++ head/lib/libc/stdlib/getopt_long.3  Fri Dec 13 21:50:03 2013
(r259340)
@@ -130,11 +130,11 @@ field should be one of:
 .Pp
 .Bl -tag -width ".Dv optional_argument" -offset indent -compact
 .It Dv no_argument
-no argument to the option is expect
+no argument to the option is expected
 .It Dv required_argument
 an argument to the option is required
 .It Dv optional_argument
-an argument to the option may be presented.
+an argument to the option may be presented
 .El
 .Pp
 If
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259341 - stable/10/sys/dev/ath

2013-12-13 Thread Rui Paulo
Author: rpaulo
Date: Fri Dec 13 21:57:44 2013
New Revision: 259341
URL: http://svnweb.freebsd.org/changeset/base/259341

Log:
  MFC r256658, r25:
  
  Move a lot of debugging printf's to DPRINTF.

Modified:
  stable/10/sys/dev/ath/if_ath.c
  stable/10/sys/dev/ath/if_ath_tx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/ath/if_ath.c
==
--- stable/10/sys/dev/ath/if_ath.c  Fri Dec 13 21:50:03 2013
(r259340)
+++ stable/10/sys/dev/ath/if_ath.c  Fri Dec 13 21:57:44 2013
(r259341)
@@ -2725,7 +2725,7 @@ ath_transmit(struct ifnet *ifp, struct m
 */
ATH_PCU_LOCK(sc);
if (sc->sc_inreset_cnt > 0) {
-   device_printf(sc->sc_dev,
+   DPRINTF(sc, ATH_DEBUG_XMIT,
"%s: sc_inreset_cnt > 0; bailing\n", __func__);
ATH_PCU_UNLOCK(sc);
IF_LOCK(&ifp->if_snd);
@@ -6430,7 +6430,7 @@ ath_node_recv_pspoll(struct ieee80211_no
 * Immediately punt.
 */
if (! an->an_is_powersave) {
-   device_printf(sc->sc_dev,
+   DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
"%s: %6D: not in powersave?\n",
__func__,
ni->ni_macaddr,
@@ -6498,7 +6498,8 @@ ath_node_recv_pspoll(struct ieee80211_no
/*
 * XXX nothing in the TIDs at this point? Eek.
 */
-   device_printf(sc->sc_dev, "%s: %6D: TIDs empty, but ath_node showed 
traffic?!\n",
+   DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE,
+   "%s: %6D: TIDs empty, but ath_node showed traffic?!\n",
__func__,
ni->ni_macaddr,
":");

Modified: stable/10/sys/dev/ath/if_ath_tx.c
==
--- stable/10/sys/dev/ath/if_ath_tx.c   Fri Dec 13 21:50:03 2013
(r259340)
+++ stable/10/sys/dev/ath/if_ath_tx.c   Fri Dec 13 21:57:44 2013
(r259341)
@@ -268,7 +268,7 @@ ath_txfrag_setup(struct ath_softc *sc, a
/* XXX non-management? */
bf = _ath_getbuf_locked(sc, ATH_BUFTYPE_NORMAL);
if (bf == NULL) {   /* out of buffers, cleanup */
-   device_printf(sc->sc_dev, "%s: no buffer?\n",
+   DPRINTF(sc, ATH_DEBUG_XMIT, "%s: no buffer?\n",
__func__);
ath_txfrag_cleanup(sc, frags, ni);
break;
@@ -560,10 +560,10 @@ ath_tx_setds_11n(struct ath_softc *sc, s
bf = bf_first;
 
if (bf->bf_state.bfs_txrate0 == 0)
-   device_printf(sc->sc_dev, "%s: bf=%p, txrate0=%d\n",
+   DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: bf=%p, txrate0=%d\n",
__func__, bf, 0);
if (bf->bf_state.bfs_rc[0].ratecode == 0)
-   device_printf(sc->sc_dev, "%s: bf=%p, rix0=%d\n",
+   DPRINTF(sc, ATH_DEBUG_SW_TX_AGGR, "%s: bf=%p, rix0=%d\n",
__func__, bf, 0);
 
/*
@@ -708,11 +708,9 @@ ath_tx_handoff_mcast(struct ath_softc *s
 * mapped correctly.
 */
if (bf->bf_state.bfs_tx_queue != sc->sc_cabq->axq_qnum) {
-   device_printf(sc->sc_dev,
+   DPRINTF(sc, ATH_DEBUG_XMIT,
"%s: bf=%p, bfs_tx_queue=%d, axq_qnum=%d\n",
-   __func__,
-   bf,
-   bf->bf_state.bfs_tx_queue,
+   __func__, bf, bf->bf_state.bfs_tx_queue,
txq->axq_qnum);
}
 
@@ -881,11 +879,9 @@ ath_tx_handoff_hw(struct ath_softc *sc, 
 * checking and holding buffer manipulation is sane.
 */
if (bf->bf_state.bfs_tx_queue != txq->axq_qnum) {
-   device_printf(sc->sc_dev,
+   DPRINTF(sc, ATH_DEBUG_XMIT,
"%s: bf=%p, bfs_tx_queue=%d, axq_qnum=%d\n",
-   __func__,
-   bf,
-   bf->bf_state.bfs_tx_queue,
+   __func__, bf, bf->bf_state.bfs_tx_queue,
txq->axq_qnum);
}
 
@@ -1343,8 +1339,8 @@ ath_tx_setds(struct ath_softc *sc, struc
struct ath_hal *ah = sc->sc_ah;
 
if (bf->bf_state.bfs_txrate0 == 0)
-   device_printf(sc->sc_dev, "%s: bf=%p, txrate0=%d\n",
-   __func__, bf, 0);
+   DPRINTF(sc, ATH_DEBUG_XMIT, 
+   "%s: bf=%p, txrate0=%d\n", __func__, bf, 0);
 
ath_hal_setuptxdesc(ah, ds
, bf->bf_state.bfs_pktlen   /* packet length */
@@ -1481,14 +1477,10 @@ ath_tx_should_swq_frame(struct ath_softc
 * Other control/mgmt frame; bypass software queuing
 * for now!
 */
-   device_printf(sc->sc_dev,
+   DPRINTF(sc, ATH_DEBUG_XMIT, 
"%s: %6D: Node is asleep; sending mgmt "
   

Re: svn commit: r259326 - stable/10/contrib/tcpdump

2013-12-13 Thread Tijl Coosemans
On Fri, 13 Dec 2013 16:41:44 -0500 Eitan Adler wrote:
> On Fri, Dec 13, 2013 at 4:32 PM, Tijl Coosemans  wrote:
>> On Fri, 13 Dec 2013 15:04:21 -0500 Pedro Giffuni wrote:
>>> On 13.12.2013 14:43, Eitan Adler wrote:
 On Fri, Dec 13, 2013 at 2:32 PM, Pedro F. Giffuni  wrote:
> Author: pfg
> Date: Fri Dec 13 19:32:02 2013
> New Revision: 259326
> URL: http://svnweb.freebsd.org/changeset/base/259326
>
> Log:
>MFV r258571:
>
>Removes strict-aliasing warnings from newer GCC in tcpdump.
>
>Corresponds to MFC r258573, but for some reason our new pre-commit 
> hooks
>will not let us merge it from there.
 How did you attempt to do this merge?  What were the exact commands?
>>>
>>> (Standing on my local stable/10 dir)
>>>
>>> svn merge -c r258573 ^/head .
>>>
>>> Attempt to commit there fired the pre-commit hook.
>>
>> This also copies the svn:mergeinfo property on head/contrib/tcpdump
>> to stable/10/contrib/tcpdump, but this property is only allowed on
>> stable/10 at the moment.  I think you can just delete the property
>> before committing:
>>
>> svn propdel svn:mergeinfo contrib/tcpdump
> 
> I think this should still be done, along with a --record-only merge.

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


svn commit: r259342 - in stable/10/sys/arm: at91 econa lpc ti/cpsw versatile xscale/ixp425 xscale/pxa

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:08:31 2013
New Revision: 259342
URL: http://svnweb.freebsd.org/changeset/base/259342

Log:
  MFC r257258, r257265: Include headers (if_var.h and others) where needed.
  
  The change that triggered the need for this on head was r257244.  That
  hasn't been MFC'd yet, but there's no harm in paving the way for it with
  this MFC.

Modified:
  stable/10/sys/arm/at91/if_ate.c
  stable/10/sys/arm/econa/if_ece.c
  stable/10/sys/arm/lpc/if_lpe.c
  stable/10/sys/arm/ti/cpsw/if_cpsw.c
  stable/10/sys/arm/versatile/if_smc_fdt.c
  stable/10/sys/arm/xscale/ixp425/if_npe.c
  stable/10/sys/arm/xscale/pxa/if_smc_smi.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/at91/if_ate.c
==
--- stable/10/sys/arm/at91/if_ate.c Fri Dec 13 21:57:44 2013
(r259341)
+++ stable/10/sys/arm/at91/if_ate.c Fri Dec 13 22:08:31 2013
(r259342)
@@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #ifdef INET
 #include 

Modified: stable/10/sys/arm/econa/if_ece.c
==
--- stable/10/sys/arm/econa/if_ece.cFri Dec 13 21:57:44 2013
(r259341)
+++ stable/10/sys/arm/econa/if_ece.cFri Dec 13 22:08:31 2013
(r259342)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #ifdef INET

Modified: stable/10/sys/arm/lpc/if_lpe.c
==
--- stable/10/sys/arm/lpc/if_lpe.c  Fri Dec 13 21:57:44 2013
(r259341)
+++ stable/10/sys/arm/lpc/if_lpe.c  Fri Dec 13 22:08:31 2013
(r259342)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 

Modified: stable/10/sys/arm/ti/cpsw/if_cpsw.c
==
--- stable/10/sys/arm/ti/cpsw/if_cpsw.c Fri Dec 13 21:57:44 2013
(r259341)
+++ stable/10/sys/arm/ti/cpsw/if_cpsw.c Fri Dec 13 22:08:31 2013
(r259342)
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 

Modified: stable/10/sys/arm/versatile/if_smc_fdt.c
==
--- stable/10/sys/arm/versatile/if_smc_fdt.cFri Dec 13 21:57:44 2013
(r259341)
+++ stable/10/sys/arm/versatile/if_smc_fdt.cFri Dec 13 22:08:31 2013
(r259342)
@@ -28,11 +28,12 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
-#include 
-
 #include 
-#include 
+#include 
+#include 
+#include 
 
 #include 
 #include 

Modified: stable/10/sys/arm/xscale/ixp425/if_npe.c
==
--- stable/10/sys/arm/xscale/ixp425/if_npe.cFri Dec 13 21:57:44 2013
(r259341)
+++ stable/10/sys/arm/xscale/ixp425/if_npe.cFri Dec 13 22:08:31 2013
(r259342)
@@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #ifdef INET
 #include 

Modified: stable/10/sys/arm/xscale/pxa/if_smc_smi.c
==
--- stable/10/sys/arm/xscale/pxa/if_smc_smi.c   Fri Dec 13 21:57:44 2013
(r259341)
+++ stable/10/sys/arm/xscale/pxa/if_smc_smi.c   Fri Dec 13 22:08:31 2013
(r259342)
@@ -28,11 +28,12 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
-#include 
-
 #include 
-#include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r259261 - head/sys/dev/drm2

2013-12-13 Thread Aleksandr Rybalko
Konstantin Belousov  написав(ла):
>On Thu, Dec 12, 2013 at 02:49:27PM +, Aleksandr Rybalko wrote:
>> Author: ray
>> Date: Thu Dec 12 14:49:26 2013
>> New Revision: 259261
>> URL: http://svnweb.freebsd.org/changeset/base/259261
>> 
>> Log:
>>   Do not try to probe/attach if attempt to add fbd child are failed.
>>   
>>   Sponsored by:  The FreeBSD Foundation
>> 
>> Modified:
>>   head/sys/dev/drm2/drm_fb_helper.c
>> 
>> Modified: head/sys/dev/drm2/drm_fb_helper.c
>>
>==
>> --- head/sys/dev/drm2/drm_fb_helper.cThu Dec 12 14:37:25
>2013   (r259260)
>> +++ head/sys/dev/drm2/drm_fb_helper.cThu Dec 12 14:49:26
>2013   (r259261)
>> @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct
>>  
>>  kdev = fb_helper->dev->device;
>>  fbd = device_add_child(kdev, "fbd", device_get_unit(kdev));
>> -ret = device_probe_and_attach(fbd);
>> +if (fbd != NULL) 
>> +ret = device_probe_and_attach(fbd);
>> +else
>> +ret = ENODEV;
>This must be -ENODEV, since linux layer operates on negative values for
>error.  The error is negated in the drm layer, which would result in
>non-existent errno returned to FreeBSD code.

It is not actually return code, but only value to show in error message few 
lines later. ENODEV just value for case no device attached.
That error message appear only if kernel configuration include device vt. 
(planning for syscons too, maybe).

>
>Also, the #ifdef __FreeBSD braces in the file are not useful, please
>remove them.
>>  #ifdef DEV_VT
>>  if (ret != 0)
>>  DRM_ERROR("Failed to attach fbd device: %d\n", ret);

Should we with Jean have to remove all #ifdef __FreeBSD and __Linux over whole 
DRM2 code, to reduce differences with linux code?

Thanks!

WBW
--
Aleksandr Rybalko 


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

svn commit: r259343 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:12:37 2013
New Revision: 259343
URL: http://svnweb.freebsd.org/changeset/base/259343

Log:
  MFC r257383, r257384:
  
  Add some bare-bones support for enabling usb and usbphy clocks.
  
  Add a "no-op" USB PHY driver for imx-family SoCs.

Added:
  stable/10/sys/arm/freescale/imx/imx_nop_usbphy.c
 - copied unchanged from r257384, 
head/sys/arm/freescale/imx/imx_nop_usbphy.c
Modified:
  stable/10/sys/arm/freescale/imx/files.imx51
  stable/10/sys/arm/freescale/imx/files.imx53
  stable/10/sys/arm/freescale/imx/imx51_ccm.c
  stable/10/sys/arm/freescale/imx/imx51_ccmreg.h
  stable/10/sys/arm/freescale/imx/imx_machdep.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/files.imx51
==
--- stable/10/sys/arm/freescale/imx/files.imx51 Fri Dec 13 22:08:31 2013
(r259342)
+++ stable/10/sys/arm/freescale/imx/files.imx51 Fri Dec 13 22:12:37 2013
(r259343)
@@ -37,7 +37,8 @@ dev/ata/chipsets/ata-fsl.coptional imx
 # UART driver
 dev/uart/uart_dev_imx.coptional uart
 
-# USB join controller (1 OTG, 3 EHCI)
+# USB OH3 controller (1 OTG, 3 EHCI)
+arm/freescale/imx/imx_nop_usbphy.c optional echi
 dev/usb/controller/ehci_imx.c  optional ehci
 
 # Watchdog

Modified: stable/10/sys/arm/freescale/imx/files.imx53
==
--- stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 22:08:31 2013
(r259342)
+++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Dec 13 22:12:37 2013
(r259343)
@@ -37,7 +37,8 @@ arm/freescale/imx/imx51_ccm.c standard
 # i.MX5xx PATA controller
 dev/ata/chipsets/ata-fsl.c optional imxata
 
-# USB join controller (1 OTG, 3 EHCI)
+# USB OH3 controller (1 OTG, 3 EHCI)
+arm/freescale/imx/imx_nop_usbphy.c optional ehci
 dev/usb/controller/ehci_imx.c  optional ehci
 
 # Watchdog

Modified: stable/10/sys/arm/freescale/imx/imx51_ccm.c
==
--- stable/10/sys/arm/freescale/imx/imx51_ccm.c Fri Dec 13 22:08:31 2013
(r259342)
+++ stable/10/sys/arm/freescale/imx/imx51_ccm.c Fri Dec 13 22:12:37 2013
(r259343)
@@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #defineIMXCCMDEBUG
 #undef IMXCCMDEBUG
@@ -473,3 +474,78 @@ imx51_get_clk_gating(int clk_src)
return ((reg >> (clk_src % CCMR_CCGR_NSOURCE) * 2) & 0x03);
 }
 
+/*
+ * Code from here down is temporary, in lieu of a SoC-independent clock API.
+ */
+
+void
+imx_ccm_usb_enable(device_t dev)
+{
+   uint32_t regval;
+
+   /*
+* Select PLL2 as the source for the USB clock.
+* The default is PLL3, but U-boot changes it to PLL2.
+*/
+   regval = bus_read_4(ccm_softc->res[0], CCMC_CSCMR1);
+   regval &= ~CSCMR1_USBOH3_CLK_SEL_MASK;
+   regval |= 1 << CSCMR1_USBOH3_CLK_SEL_SHIFT;
+   bus_write_4(ccm_softc->res[0], CCMC_CSCMR1, regval);
+
+   /*
+* Set the USB clock pre-divider to div-by-5, post-divider to div-by-2.
+*/
+   regval = bus_read_4(ccm_softc->res[0], CCMC_CSCDR1);
+   regval &= ~CSCDR1_USBOH3_CLK_PODF_MASK;
+   regval &= ~CSCDR1_USBOH3_CLK_PRED_MASK;
+   regval |= 4 << CSCDR1_USBOH3_CLK_PRED_SHIFT;
+   regval |= 1 << CSCDR1_USBOH3_CLK_PODF_SHIFT;
+   bus_write_4(ccm_softc->res[0], CCMC_CSCDR1, regval);
+
+   /*
+* The same two clocks gates are used on imx51 and imx53.
+*/
+   imx51_clk_gating(CCGR_USBOH3_IPG_AHB_CLK, CCGR_CLK_MODE_ALWAYS);
+   imx51_clk_gating(CCGR_USBOH3_60M_CLK, CCGR_CLK_MODE_ALWAYS);
+}
+
+void
+imx_ccm_usbphy_enable(device_t dev)
+{
+   uint32_t regval;
+
+   /*
+* Select PLL3 as the source for the USBPHY clock.  U-boot does this 
+* only for imx53, but the bit exists on imx51.  That seems a bit
+* strange, but we'll go with it until more is known.
+*/
+   if (imx_soc_type() == IMXSOC_53) {
+   regval = bus_read_4(ccm_softc->res[0], CCMC_CSCMR1);
+   regval |= 1 << CSCMR1_USBPHY_CLK_SEL_SHIFT;
+   bus_write_4(ccm_softc->res[0], CCMC_CSCMR1, regval);
+   }
+
+   /*
+* For the imx51 there's just one phy gate control, enable it.
+*/
+   if (imx_soc_type() == IMXSOC_51) {
+   imx51_clk_gating(CCGR_USB_PHY_CLK, CCGR_CLK_MODE_ALWAYS);
+   return;
+   }
+
+   /*
+* For imx53 we don't have a full set of clock defines yet, but the
+* datasheet says:
+*   gate reg 4, bits 13-12 usb ph2 clock (usb_phy2_clk_enable)
+*   gate reg 4, bits 11-10 usb ph1 clock (usb_phy1_clk_enable)
+*
+* We should use the fdt data for the device to figure out which of
+* the two we're working on, 

svn commit: r259344 - stable/10/sys/dev/usb

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:15:24 2013
New Revision: 259344
URL: http://svnweb.freebsd.org/changeset/base/259344

Log:
  MFC r257390:  Add a vendor entry for Freescale Semiconductor.

Modified:
  stable/10/sys/dev/usb/usbdevs
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/usbdevs
==
--- stable/10/sys/dev/usb/usbdevs   Fri Dec 13 22:12:37 2013
(r259343)
+++ stable/10/sys/dev/usb/usbdevs   Fri Dec 13 22:15:24 2013
(r259344)
@@ -654,6 +654,7 @@ vendor OWEN 0x1555  Owen
 vendor OQO 0x1557  OQO
 vendor UMEDIA  0x157e  U-MEDIA Communications
 vendor FIBERLINE   0x1582  Fiberline
+vendor FREESCALE   0x15a2  Freescale Semiconductor, Inc.
 vendor AFATECH 0x15a4  Afatech Technologies, Inc.
 vendor SPARKLAN0x15a9  SparkLAN
 vendor OLIMEX  0x15ba  Olimex
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259345 - in stable/10/sys: boot/fdt/dts dev/usb/controller

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:19:21 2013
New Revision: 259345
URL: http://svnweb.freebsd.org/changeset/base/259345

Log:
  MFC r257393:
  
Rework the imx ehci driver so that it's four separate ehci units rather
than one unit with four busses attached to it.  This allows us to use
existing fdt data which describes separate devices with separate resources.
It also allows any combination of the units to be en/disabled in the
board dts files.
  
Adjust our dts code to match what's used by linux and u-boot now that
we're structured to do so.

Modified:
  stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts
  stable/10/sys/boot/fdt/dts/efikamx.dts
  stable/10/sys/boot/fdt/dts/imx51x.dtsi
  stable/10/sys/boot/fdt/dts/imx53-qsb.dts
  stable/10/sys/boot/fdt/dts/imx53x.dtsi
  stable/10/sys/dev/usb/controller/ehci_imx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts
==
--- stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts Fri Dec 13 22:15:24 2013
(r259344)
+++ stable/10/sys/boot/fdt/dts/digi-ccwmx53.dts Fri Dec 13 22:19:21 2013
(r259345)
@@ -90,6 +90,12 @@
gpio@53f9 {
status = "okay";
};
+   usb@53f8 /* OTG */ {
+   status = "okay";
+   };
+   usb@53f80200 /* Host 1 */ {
+   status = "okay";
+   };
wdog@53f98000 {
status = "okay";
};

Modified: stable/10/sys/boot/fdt/dts/efikamx.dts
==
--- stable/10/sys/boot/fdt/dts/efikamx.dts  Fri Dec 13 22:15:24 2013
(r259344)
+++ stable/10/sys/boot/fdt/dts/efikamx.dts  Fri Dec 13 22:19:21 2013
(r259345)
@@ -89,6 +89,12 @@
gpio@73f9 {
status = "okay";
};
+   usb@73f8 /* OTG */ {
+   status = "okay";
+   };
+   usb@73f80200 /* Host 1 */ {
+   status = "okay";
+   };
wdog@73f98000 {
status = "okay";
};

Modified: stable/10/sys/boot/fdt/dts/imx51x.dtsi
==
--- stable/10/sys/boot/fdt/dts/imx51x.dtsi  Fri Dec 13 22:15:24 2013
(r259344)
+++ stable/10/sys/boot/fdt/dts/imx51x.dtsi  Fri Dec 13 22:19:21 2013
(r259345)
@@ -246,16 +246,48 @@
/* 7003C000 0x4000 SPBA */
};
 
-   /* 73F8 0x4000 USBOH3 */
-   /* irq14 USBOH3 USB Host 1 */
-   /* irq16 USBOH3 USB Host 2 */
-   /* irq17 USBOH3 USB Host 3 */
-   /* irq18 USBOH3 USB OTG */
-   usb1: usb@73F8 {
-   compatible = "fsl,usb-4core";
-   reg = <0x73f8 0x4000>;
-   interrupt-parent = <&tzic>;
-   interrupts = <18 14 16 17>;
+   usbphy0: usbphy@0 {
+   compatible = "usb-nop-xceiv";
+   status = "okay";
+   };
+
+   usbotg: usb@73f8 {
+   compatible = "fsl,imx51-usb", "fsl,imx27-usb";
+   reg = <0x73f8 0x0200>;
+   interrupts = <18>;
+   fsl,usbmisc = <&usbmisc 0>;
+   fsl,usbphy = <&usbphy0>;
+   status = "disabled";
+   };
+
+   usbh1: usb@73f80200 {
+   compatible = "fsl,imx51-usb", "fsl,imx27-usb";
+   reg = <0x73f80200 0x0200>;
+   interrupts = <14>;
+   fsl,usbmisc = <&usbmisc 1>;
+   status = "disabled";
+   };
+
+   usbh2: usb@73f80400 {
+   compatible = "fsl,imx51-usb", "fsl,imx27-usb";
+   reg = <0x73f80400 0x0200>;
+   interrupts = <16>;
+   fsl,usbmisc = <&usbmisc 2>;
+   status = "disabled";
+   };
+
+   usbh3: usb@73f80600 {
+   compatible = "fsl,imx51-usb", "fsl,imx27-usb"

svn commit: r259346 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:21:04 2013
New Revision: 259346
URL: http://svnweb.freebsd.org/changeset/base/259346

Log:
  MFC r257407:
  
Expand the list of compatible devices this driver works with.  Increase
the target frequency from 1 to 10 MHz because these SoCs are plenty fast
enough to benefit from the extra event timer resolution.

Modified:
  stable/10/sys/arm/freescale/imx/imx_gpt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx_gpt.c
==
--- stable/10/sys/arm/freescale/imx/imx_gpt.c   Fri Dec 13 22:19:21 2013
(r259345)
+++ stable/10/sys/arm/freescale/imx/imx_gpt.c   Fri Dec 13 22:21:04 2013
(r259346)
@@ -95,7 +95,7 @@ struct imx_gpt_softc *imx_gpt_sc = NULL;
 static const int imx_gpt_delay_count = 78;
 
 /* Try to divide down an available fast clock to this frequency. */
-#defineTARGET_FREQUENCY100
+#defineTARGET_FREQUENCY1000
 
 /* Don't try to set an event timer period smaller than this. */
 #defineMIN_ET_PERIOD   10LLU
@@ -107,16 +107,26 @@ static struct resource_spec imx_gpt_spec
{ -1, 0 }
 };
 
+static struct ofw_compat_data compat_data[] = {
+   {"fsl,imx6q-gpt",  1},
+   {"fsl,imx53-gpt",  1},
+   {"fsl,imx51-gpt",  1},
+   {"fsl,imx31-gpt",  1},
+   {"fsl,imx27-gpt",  1},
+   {"fsl,imx25-gpt",  1},
+   {NULL, 0}
+};
+
 static int
 imx_gpt_probe(device_t dev)
 {
 
-   if (!ofw_bus_is_compatible(dev, "fsl,imx51-gpt") &&
-   !ofw_bus_is_compatible(dev, "fsl,imx53-gpt"))
-   return (ENXIO);
+   if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) {
+   device_set_desc(dev, "Freescale i.MX GPT timer");
+   return (BUS_PROBE_DEFAULT);
+   }
 
-   device_set_desc(dev, "Freescale i.MX GPT timer");
-   return (BUS_PROBE_DEFAULT);
+   return (ENXIO);
 }
 
 static int
@@ -142,10 +152,7 @@ imx_gpt_attach(device_t dev)
 * we're running on.  Eventually we could allow selection from the fdt;
 * the code in this driver will cope with any clock frequency.
 */
-   if (ofw_bus_is_compatible(dev, "fsl,imx6-gpt"))
-   sc->sc_clksrc = GPT_CR_CLKSRC_24M;
-   else
-   sc->sc_clksrc = GPT_CR_CLKSRC_IPG;
+   sc->sc_clksrc = GPT_CR_CLKSRC_IPG;
 
ctlreg = 0;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259347 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:21:49 2013
New Revision: 259347
URL: http://svnweb.freebsd.org/changeset/base/259347

Log:
  MFC r257413:
  
Reset the timer interrupt status register at the top rather than bottom of
the interrupt handler.  If the event callback starts a new short timeout,
the timer can fire before returning from the event callback, and clearing
the interrupt status after that loses the interrupt and hangs until the
counter wraps.  Fixing all of this removes the need for the do-nothing
loop at the top of the handler which really just waited for the counter to
roll over and reach the one-shot count again.
  
Also add a missing return(0) in the periodic timer start case.

Modified:
  stable/10/sys/arm/freescale/imx/imx_gpt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx_gpt.c
==
--- stable/10/sys/arm/freescale/imx/imx_gpt.c   Fri Dec 13 22:21:04 2013
(r259346)
+++ stable/10/sys/arm/freescale/imx/imx_gpt.c   Fri Dec 13 22:21:49 2013
(r259347)
@@ -277,14 +277,9 @@ imx_gpt_timer_start(struct eventtimer *e
WRITE4(sc, IMX_GPT_OCR2, READ4(sc, IMX_GPT_CNT) + 
sc->sc_period);
/* Enable compare register 2 Interrupt */
SET4(sc, IMX_GPT_IR, GPT_IR_OF2);
+   return (0);
} else if (first != 0) {
ticks = ((uint32_t)et->et_frequency * first) >> 32;
-
-   /*
-* TODO: setupt second compare reg with time which will save
-* us in case correct one lost, f.e. if period to short and
-* setup done later than counter reach target value.
-*/
/* Do not disturb, otherwise event will be lost */
spinlock_enter();
/* Set expected value */
@@ -293,7 +288,6 @@ imx_gpt_timer_start(struct eventtimer *e
SET4(sc, IMX_GPT_IR, GPT_IR_OF1);
/* Now everybody can relax */
spinlock_exit();
-
return (0);
}
 
@@ -341,27 +335,32 @@ imx_gpt_intr(void *arg)
 
sc = (struct imx_gpt_softc *)arg;
 
-   /* Sometime we not get staus bit when interrupt arrive.  Cache? */
-   while (!(status = READ4(sc, IMX_GPT_SR)))
-   ;
+   status = READ4(sc, IMX_GPT_SR);
+
+   /*
+   * Clear interrupt status before invoking event callbacks.  The callback
+   * often sets up a new one-shot timer event and if the interval is short
+   * enough it can fire before we get out of this function.  If we cleared
+   * at the bottom we'd miss the interrupt and hang until the clock wraps.
+   */
+   WRITE4(sc, IMX_GPT_SR, status);
 
+   /* Handle one-shot timer events. */
if (status & GPT_IR_OF1) {
if (sc->et.et_active) {
sc->et.et_event_cb(&sc->et, sc->et.et_arg);
}
}
+
+   /* Handle periodic timer events. */
if (status & GPT_IR_OF2) {
-   if (sc->et.et_active) {
+   if (sc->et.et_active)
sc->et.et_event_cb(&sc->et, sc->et.et_arg);
-   /* Set expected value */
+   if (sc->sc_period != 0)
WRITE4(sc, IMX_GPT_OCR2, READ4(sc, IMX_GPT_CNT) +
sc->sc_period);
-   }
}
 
-   /* ACK */
-   WRITE4(sc, IMX_GPT_SR, status);
-
return (FILTER_HANDLED);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259348 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:22:54 2013
New Revision: 259348
URL: http://svnweb.freebsd.org/changeset/base/259348

Log:
  MFC r257418:
  
Don't iterate through the bits of the pending interrupt register if the
whole register is zero.  Most of the registers will be zero most of the 
time.

Modified:
  stable/10/sys/arm/freescale/imx/tzic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/tzic.c
==
--- stable/10/sys/arm/freescale/imx/tzic.c  Fri Dec 13 22:21:49 2013
(r259347)
+++ stable/10/sys/arm/freescale/imx/tzic.c  Fri Dec 13 22:22:54 2013
(r259348)
@@ -163,7 +163,7 @@ arm_get_next_irq(int last_irq)
 
for (i = 0; i < 4; i++) {
pending = tzic_read_4(TZIC_PND(i));
-   for (b = 0; b < 32; b++)
+   for (b = 0; pending != 0 && b < 32; b++)
if (pending & (1 << b)) {
return (i * 32 + b);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259349 - stable/10/sys/arm/arm

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:24:00 2013
New Revision: 259349
URL: http://svnweb.freebsd.org/changeset/base/259349

Log:
  MFC r257419:
  
Do not EOI an interrupt until the point after the filter handlers / before
threaded handlers.

Modified:
  stable/10/sys/arm/arm/gic.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/gic.c
==
--- stable/10/sys/arm/arm/gic.c Fri Dec 13 22:22:54 2013(r259348)
+++ stable/10/sys/arm/arm/gic.c Fri Dec 13 22:24:00 2013(r259349)
@@ -271,7 +271,6 @@ arm_get_next_irq(int last_irq)
printf("Spurious interrupt detected [0x%08x]\n", 
active_irq);
return -1;
}
-   gic_c_write_4(GICC_EOIR, active_irq);
 
return active_irq;
 }
@@ -279,14 +278,15 @@ arm_get_next_irq(int last_irq)
 void
 arm_mask_irq(uintptr_t nb)
 {
+
gic_d_write_4(GICD_ICENABLER(nb >> 5), (1UL << (nb & 0x1F)));
+   gic_c_write_4(GICC_EOIR, nb);
 }
 
 void
 arm_unmask_irq(uintptr_t nb)
 {
 
-   gic_c_write_4(GICC_EOIR, nb);
gic_d_write_4(GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F)));
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259350 - svnadmin/conf

2013-12-13 Thread Justin T. Gibbs
Author: gibbs
Date: Fri Dec 13 22:25:20 2013
New Revision: 259350
URL: http://svnweb.freebsd.org/changeset/base/259350

Log:
  Officially record my mentees.

Modified:
  svnadmin/conf/mentors

Modified: svnadmin/conf/mentors
==
--- svnadmin/conf/mentors   Fri Dec 13 22:24:00 2013(r259349)
+++ svnadmin/conf/mentors   Fri Dec 13 22:25:20 2013(r259350)
@@ -14,6 +14,7 @@ achim scottl  Co-mentor: emaste
 agcscottl  Co-mentor: emax
 benl   philip  Co-mentor: simon
 carl   jimharris
+cherry gibbs
 cy andre   Co-mentor: glebius
 edavis davidch 
 erimlaier  Co-mentor: thompsa
@@ -28,5 +29,6 @@ miwi  rwatson
 monthadar  adrian
 odeds  jhb Co-mentor: alfred
 peterj jhb Co-mentor: grog
+royger gibbs
 snbdwmalone
 versus gavin   Co-mentor: fjoe
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259351 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:26:10 2013
New Revision: 259351
URL: http://svnweb.freebsd.org/changeset/base/259351

Log:
  MFC r257452:  Add support for the USB PHY on imx6 SoCs.

Added:
  stable/10/sys/arm/freescale/imx/imx6_usbphy.c
 - copied unchanged from r257452, head/sys/arm/freescale/imx/imx6_usbphy.c
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/arm/freescale/imx/imx6_usbphy.c (from r257452, 
head/sys/arm/freescale/imx/imx6_usbphy.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/arm/freescale/imx/imx6_usbphy.c   Fri Dec 13 22:26:10 
2013(r259351, copy of r257452, head/sys/arm/freescale/imx/imx6_usbphy.c)
@@ -0,0 +1,189 @@
+/*-
+ * Copyright (c) 2013 Ian Lepore 
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+/*
+ * USBPHY driver for Freescale i.MX6 family of SoCs.
+ */
+
+#include "opt_bus.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+
+/*
+ * Hardware register defines.
+ */
+#definePWD_REG 0x
+#defineCTRL_STATUS_REG 0x0030
+#defineCTRL_SET_REG0x0034
+#defineCTRL_CLR_REG0x0038
+#defineCTRL_TOGGLE_REG 0x003c
+#define  CTRL_SFTRST (1 << 31)
+#define  CTRL_CLKGATE(1 << 30)
+#define  CTRL_ENUTMILEVEL3   (1 << 15)
+#define  CTRL_ENUTMILEVEL2   (1 << 14)
+
+struct usbphy_softc {
+   device_tdev;
+   struct resource *mem_res;
+   u_int   phy_num;
+};
+
+static int
+usbphy_detach(device_t dev)
+{
+   struct usbphy_softc *sc;
+
+   sc = device_get_softc(dev);
+
+   if (sc->mem_res != NULL)
+   bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res);
+
+   return (0);
+}
+
+static int
+usbphy_attach(device_t dev)
+{
+   struct usbphy_softc *sc;
+   int err, regoff, rid;
+
+   sc = device_get_softc(dev);
+   err = 0;
+
+   /* Allocate bus_space resources. */
+   rid = 0;
+   sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+   RF_ACTIVE);
+   if (sc->mem_res == NULL) {
+   device_printf(dev, "Cannot allocate memory resources\n");
+   err = ENXIO;
+   goto out;
+   }
+
+   /*
+* XXX Totally lame way to get the unit number (but not quite as lame as
+* adding an ad-hoc property to the fdt data).  This works as long as
+* this driver is used for imx6 only.
+*/
+   const uint32_t PWD_PHY1_REG_PHYSADDR = 0x020c9000;
+   if (BUS_SPACE_PHYSADDR(sc->mem_res, 0) == PWD_PHY1_REG_PHYSADDR) {
+   sc->phy_num = 0;
+   regoff = 0;
+   } else {
+   sc->phy_num = 1;
+   regoff = 0x60;
+   }
+
+   /*
+* Based on a note in the u-boot source code, disable charger detection
+* to avoid degrading the differential signaling on the DP line.  Note
+* that this disables (by design) both charger detection and contact
+* detection, because of the screwball mix of active-high and active-low
+* bits in this register.
+*/
+   imx6_anatop_write_4(IMX6_ANALOG_USB1_CHRG_DETECT + regoff, 
+   IMX6_ANALOG_USB_CHRG_DETECT_N_ENABLE | 
+   IMX6_ANALOG_USB_CHRG_DETECT_N_CHK_CHRG);
+
+   imx6_anatop_write_4(IMX6_ANALOG_U

svn commit: r259353 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:28:19 2013
New Revision: 259353
URL: http://svnweb.freebsd.org/changeset/base/259353

Log:
  MFC r257454:  Add sdhci driver glue for imx family SoCs.

Added:
  stable/10/sys/arm/freescale/imx/imx_sdhci.c
 - copied unchanged from r257454, head/sys/arm/freescale/imx/imx_sdhci.c
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/arm/freescale/imx/imx_sdhci.c (from r257454, 
head/sys/arm/freescale/imx/imx_sdhci.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Fri Dec 13 22:28:19 2013
(r259353, copy of r257454, head/sys/arm/freescale/imx/imx_sdhci.c)
@@ -0,0 +1,704 @@
+/*-
+ * Copyright (c) 2013 Ian Lepore 
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+#include 
+__FBSDID("$FreeBSD$");
+
+/*
+ * SDHCI driver glue for Freescale i.MX SoC family.
+ *
+ * This supports both eSDHC (earlier SoCs) and uSDHC (more recent SoCs).
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include "sdhci_if.h"
+
+struct imx_sdhci_softc {
+   device_tdev;
+   struct resource *   mem_res;
+   struct resource *   irq_res;
+   void *  intr_cookie;
+   struct sdhci_slot   slot;
+   uint32_tbaseclk_hz;
+   uint32_tsdclockreg_freq_bits;
+   uint32_tcmd_and_mode;
+   uint32_tr1bfix_intmask;
+   uint8_t r1bfix_type;
+   uint8_t hwtype;
+};
+
+#defineR1BFIX_NONE 0   /* No fix needed at next interrupt. */
+#defineR1BFIX_NODATA   1   /* Synthesize DATA_END for R1B w/o 
data. */
+#defineR1BFIX_AC12 2   /* Wait for busy after auto command 12. 
*/
+
+#defineHWTYPE_NONE 0   /* Hardware not recognized/supported. */
+#defineHWTYPE_ESDHC1   /* imx5x and earlier. */
+#defineHWTYPE_USDHC2   /* imx6. */
+
+#defineSDHC_WTMK_LVL   0x44/* Watermark Level register. */
+#defineUSDHC_MIX_CONTROL   0x48/* Mix(ed) Control register. */
+#defineSDHC_VEND_SPEC  0xC0/* Vendor-specific register. */
+#define SDHC_VEND_FRC_SDCLK_ON (1 <<  8)
+#define SDHC_VEND_IPGEN(1 << 11)
+#define SDHC_VEND_HCKEN(1 << 12)
+#define SDHC_VEND_PEREN(1 << 13)
+
+#defineSDHC_PROT_CTRL  0x28
+#define SDHC_PROT_LED  (1 << 0)
+#define SDHC_PROT_WIDTH_1BIT   (0 << 1)
+#define SDHC_PROT_WIDTH_4BIT   (1 << 1)
+#define SDHC_PROT_WIDTH_8BIT   (2 << 1)
+#define SDHC_PROT_WIDTH_MASK   (3 << 1)
+#define SDHC_PROT_D3CD (1 << 3)
+#define SDHC_PROT_EMODE_BIG(0 << 4)
+#define SDHC_PROT_EMODE_HALF   (1 << 4)
+#define SDHC_PROT_EMODE_LITTLE (2 << 4)
+#define SDHC_PROT_EMODE_MASK   (3 << 4)
+#define SDHC_PROT_SDMA (0 << 8)
+#define SDHC_PROT_ADMA1(1 << 8)
+#define SDHC_PROT_ADMA2(2 << 8)
+#define SDHC_PROT_ADMA264  (3 << 8)
+#define SDHC_PROT_DMA_MASK (3 << 8)
+#define SDHC_PROT_CDTL (1 << 6)
+#define SDHC_PROT_CDSS (1 << 7)
+
+#defineSDHC_CLK_IPGEN  (1 << 0)
+#defineSDHC_CLK_HCKEN  (1 << 1)
+#define  

svn commit: r259352 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:27:26 2013
New Revision: 259352
URL: http://svnweb.freebsd.org/changeset/base/259352

Log:
  MFC r257453:  Add stubbed-out imx6 support for clocks and power management.

Added:
  stable/10/sys/arm/freescale/imx/imx6_anatop.c
 - copied unchanged from r257453, head/sys/arm/freescale/imx/imx6_anatop.c
  stable/10/sys/arm/freescale/imx/imx6_anatopreg.h
 - copied unchanged from r257453, 
head/sys/arm/freescale/imx/imx6_anatopreg.h
  stable/10/sys/arm/freescale/imx/imx6_anatopvar.h
 - copied unchanged from r257453, 
head/sys/arm/freescale/imx/imx6_anatopvar.h
  stable/10/sys/arm/freescale/imx/imx6_ccm.c
 - copied unchanged from r257453, head/sys/arm/freescale/imx/imx6_ccm.c
  stable/10/sys/arm/freescale/imx/imx6_ccmreg.h
 - copied unchanged from r257453, head/sys/arm/freescale/imx/imx6_ccmreg.h
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/arm/freescale/imx/imx6_anatop.c (from r257453, 
head/sys/arm/freescale/imx/imx6_anatop.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/arm/freescale/imx/imx6_anatop.c   Fri Dec 13 22:27:26 
2013(r259352, copy of r257453, head/sys/arm/freescale/imx/imx6_anatop.c)
@@ -0,0 +1,155 @@
+/*-
+ * Copyright (c) 2013 Ian Lepore 
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+/*
+ * Analog PLL and power regulator driver for Freescale i.MX6 family of SoCs.
+ *
+ * We don't really do anything with analog PLLs, but the registers for
+ * controlling them belong to the same block as the power regulator registers.
+ * Since the newbus hierarchy makes it hard for anyone other than us to get at
+ * them, we just export a couple public functions to allow the imx6 CCM clock
+ * driver to read and write those registers.
+ *
+ * We also don't do anything about power regulation yet, but when the need
+ * arises, this would be the place for that code to live.
+ *
+ * I have no idea where the "anatop" name comes from.  It's in the standard DTS
+ * source describing i.MX6 SoCs, and in the linux and u-boot code which comes
+ * from Freescale, but it's not in the SoC manual.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+struct imx6_anatop_softc {
+   device_tdev;
+   struct resource *mem_res;
+};
+
+static struct imx6_anatop_softc *imx6_anatop_sc;
+
+uint32_t
+imx6_anatop_read_4(bus_size_t offset)
+{
+
+   return (bus_read_4(imx6_anatop_sc->mem_res, offset));
+}
+
+void
+imx6_anatop_write_4(bus_size_t offset, uint32_t value)
+{
+
+   bus_write_4(imx6_anatop_sc->mem_res, offset, value);
+}
+
+static int
+imx6_anatop_detach(device_t dev)
+{
+   struct imx6_anatop_softc *sc;
+
+   sc = device_get_softc(dev);
+
+   if (sc->mem_res != NULL)
+   bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res);
+
+   return (0);
+}
+
+static int
+imx6_anatop_attach(device_t dev)
+{
+   struct imx6_anatop_softc *sc;
+   int err, rid;
+
+   sc = device_get_softc(dev);
+
+   /* Allocate bus_space resources. */
+   rid = 0;
+   sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
+   RF_ACTIVE);
+   if (sc->mem_res == NULL) {
+   device_printf(dev, "Cannot allocate memory resources\n");
+   err = ENXIO;
+   goto out;
+   }
+
+   imx6_anatop_sc = sc;
+   err = 0;
+
+out:
+
+   if (err != 0)
+   imx6_anatop_detach(dev);
+
+   return (err);
+}
+
+

svn commit: r259354 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:30:21 2013
New Revision: 259354
URL: http://svnweb.freebsd.org/changeset/base/259354

Log:
  MFC r257476, r257478:
  
Revamp the SoC identity numbering scheme to be more in line with the way
Freescale numbers the chips in the ID registers.
  
Add definitions for the register and data that describes the SoC type.

Modified:
  stable/10/sys/arm/freescale/imx/imx6_anatopreg.h
  stable/10/sys/arm/freescale/imx/imx_machdep.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx6_anatopreg.h
==
--- stable/10/sys/arm/freescale/imx/imx6_anatopreg.hFri Dec 13 22:28:19 
2013(r259353)
+++ stable/10/sys/arm/freescale/imx/imx6_anatopreg.hFri Dec 13 22:30:21 
2013(r259354)
@@ -122,7 +122,9 @@
 #defineIMX6_ANALOG_USB2_MISC_CLR   0x258
 #defineIMX6_ANALOG_USB2_MISC_TOG   0x25C
 #defineIMX6_ANALOG_DIGPROG 0x260
-
-
+#defineIMX6_ANALOG_DIGPROG_SL  0x280
+#define  IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT   16
+#define  IMX6_ANALOG_DIGPROG_SOCTYPE_MASK\
+(0xff << IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT)
 
 #endif

Modified: stable/10/sys/arm/freescale/imx/imx_machdep.h
==
--- stable/10/sys/arm/freescale/imx/imx_machdep.h   Fri Dec 13 22:28:19 
2013(r259353)
+++ stable/10/sys/arm/freescale/imx/imx_machdep.h   Fri Dec 13 22:30:21 
2013(r259354)
@@ -36,24 +36,27 @@
 void imx_devmap_addentry(vm_paddr_t _pa, vm_size_t _sz);
 void imx_wdog_cpu_reset(vm_offset_t _wdcr_phys)  __attribute__((__noreturn__));
 
+/* From here down, routines are implemented in imxNN_machdep.c. */
+
 /*
  * SoC identity.
+ * According to the documentation, there is such a thing as an i.MX6 Dual
+ * (non-lite flavor).  However, Freescale doesn't seem to have assigned it a
+ * number in their code for determining the SoC type in u-boot.
+ *
+ * To-do: put silicon revision numbers into the low-order bits somewhere.
  */
-#defineIMXSOC_51   0x05000100
-#defineIMXSOC_53   0x05000300
-#defineIMXSOC_6S   0x0610
-#defineIMXSOC_6SL  0x0611
-#defineIMXSOC_6D   0x0620
-#defineIMXSOC_6DL  0x0621
-#defineIMXSOC_6Q   0x0640
-#defineIMXSOC_6QL  0x0641
-#defineIMXSOC_FAMSHIFT 24
+#defineIMXSOC_51   0x5100
+#defineIMXSOC_53   0x5300
+#defineIMXSOC_6SL  0x6000
+#defineIMXSOC_6DL  0x6100
+#defineIMXSOC_6S   0x6200
+#defineIMXSOC_6Q   0x6300
+#defineIMXSOC_FAMSHIFT 28
 
 u_int imx_soc_type(void);
 u_int imx_soc_family(void);
 
-/* From here down, routines are implemented in imxNN_machdep.c. */
-
 void imx_devmap_init(void);
 
 /*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259355 - in stable/10/sys: arm/conf arm/freescale/imx boot/fdt/dts

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:41:57 2013
New Revision: 259355
URL: http://svnweb.freebsd.org/changeset/base/259355

Log:
  MFC r257483, r257486, r257489:
  
Add the Soc- / machine-dependent parts of imx6 support.
Add dts source for imx6 SoCs and for Wandboard boards.
Add kernel config for Wandboard.

Added:
  stable/10/sys/arm/conf/WANDBOARD-COMMON
 - copied unchanged from r257489, head/sys/arm/conf/WANDBOARD-COMMON
  stable/10/sys/arm/conf/WANDBOARD-DUAL
 - copied unchanged from r257489, head/sys/arm/conf/WANDBOARD-DUAL
  stable/10/sys/arm/conf/WANDBOARD-QUAD
 - copied unchanged from r257489, head/sys/arm/conf/WANDBOARD-QUAD
  stable/10/sys/arm/conf/WANDBOARD-SOLO
 - copied unchanged from r257489, head/sys/arm/conf/WANDBOARD-SOLO
  stable/10/sys/arm/freescale/imx/files.imx6
 - copied unchanged from r257483, head/sys/arm/freescale/imx/files.imx6
  stable/10/sys/arm/freescale/imx/imx6_machdep.c
 - copied unchanged from r257483, head/sys/arm/freescale/imx/imx6_machdep.c
  stable/10/sys/arm/freescale/imx/imx6_pl310.c
 - copied unchanged from r257483, head/sys/arm/freescale/imx/imx6_pl310.c
  stable/10/sys/arm/freescale/imx/std.imx6
 - copied unchanged from r257483, head/sys/arm/freescale/imx/std.imx6
  stable/10/sys/boot/fdt/dts/imx6.dtsi
 - copied unchanged from r257486, head/sys/boot/fdt/dts/imx6.dtsi
  stable/10/sys/boot/fdt/dts/wandboard-dual.dts
 - copied unchanged from r257486, head/sys/boot/fdt/dts/wandboard-dual.dts
  stable/10/sys/boot/fdt/dts/wandboard-quad.dts
 - copied unchanged from r257486, head/sys/boot/fdt/dts/wandboard-quad.dts
  stable/10/sys/boot/fdt/dts/wandboard-solo.dts
 - copied unchanged from r257486, head/sys/boot/fdt/dts/wandboard-solo.dts
Modified:
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/arm/conf/WANDBOARD-COMMON (from r257489, 
head/sys/arm/conf/WANDBOARD-COMMON)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/arm/conf/WANDBOARD-COMMON Fri Dec 13 22:41:57 2013
(r259355, copy of r257489, head/sys/arm/conf/WANDBOARD-COMMON)
@@ -0,0 +1,155 @@
+# Kernel configuration for Wandboard
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+include"../freescale/imx/std.imx6"
+
+optionsHZ=250  # Scheduling quantum is 4 milliseconds.
+optionsSCHED_4BSD  # 4BSD scheduler
+optionsPREEMPTION  # Enable kernel thread preemption
+optionsINET# InterNETworking
+optionsINET6   # IPv6 communications protocols
+#options   SCTP# Stream Control Transmission Protocol
+optionsFFS # Berkeley Fast Filesystem
+optionsSOFTUPDATES # Enable FFS soft updates support
+optionsUFS_ACL # Support for access control lists
+optionsUFS_DIRHASH # Improve performance on big directories
+optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+#options   MD_ROOT # MD is a potential root device
+optionsNFSCL   # New Network Filesystem Client
+#options   NFSD# New Network Filesystem Server
+optionsNFSLOCKD# Network Lock Manager
+optionsNFS_ROOT# NFS usable as /, requires NFSCL
+optionsMSDOSFS # MSDOS Filesystem
+optionsCD9660  # ISO 9660 Filesystem
+#options   PROCFS  # Process filesystem (requires PSEUDOFS)
+optionsPSEUDOFS# Pseudo-filesystem framework
+optionsTMPFS   # TMP Memory Filesystem
+optionsGEOM_PART_GPT   # GUID Partition Tables.
+optionsGEOM_LABEL  # Provides labelization
+optionsKTRACE  # ktrace(1) support
+optionsSYSVSHM # SYSV-style shared memory
+optionsSYSVMSG # SYSV-style message queues
+optionsSYSVSEM # SYSV-style semaphores
+options_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time 
extensions
+options  

svn commit: r259356 - in stable/10/sys: arm/ti boot/fdt/dts

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:46:10 2013
New Revision: 259356
URL: http://svnweb.freebsd.org/changeset/base/259356

Log:
  MFC r257518, r257519:
  
TI sdhci driver improvements, mostly related to fdt data...
  
Use the published compatible strings (our own invention, "ti,mmchs" is
still accepted as well, for now).
  
Don't blindly turn on 8-bit bus mode, because even though the controller
supports it, the board has to be wired appropriately as well.  Use the
published property (bus-width=) and honor all the valid values (1,4,8).
  
The eMMC device on a Beaglebone Black is wired for 8-bit, update the dts.
  
The mmchs controller can inherently do both 1.8v and 3.0v on the first
device and 1.8v only on other devices, unless an external transceiver is
used.  Set the voltage automatically for the first device and honor
the published fdt property (ti,dualvolt) for other devices.

Modified:
  stable/10/sys/arm/ti/ti_sdhci.c
  stable/10/sys/boot/fdt/dts/am335x.dtsi
  stable/10/sys/boot/fdt/dts/beaglebone-black.dts
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/ti/ti_sdhci.c
==
--- stable/10/sys/arm/ti/ti_sdhci.c Fri Dec 13 22:41:57 2013
(r259355)
+++ stable/10/sys/arm/ti/ti_sdhci.c Fri Dec 13 22:46:10 2013
(r259356)
@@ -75,6 +75,21 @@ struct ti_sdhci_softc {
 };
 
 /*
+ * Table of supported FDT compat strings.
+ *
+ * Note that "ti,mmchs" is our own invention, and should be phased out in favor
+ * of the documented names.
+ *
+ * Note that vendor Beaglebone dtsi files use "ti,omap3-hsmmc" for the am335x.
+ */
+static struct ofw_compat_data compat_data[] = {
+   {"ti,omap3-hsmmc",  1},
+   {"ti,omap4-hsmmc",  1},
+   {"ti,mmchs",1},
+   {NULL,  0},
+};
+
+/*
  * The MMCHS hardware has a few control and status registers at the beginning 
of
  * the device's memory map, followed by the standard sdhci register block.
  * Different SoCs have the register blocks at different offsets from the
@@ -93,6 +108,10 @@ struct ti_sdhci_softc {
 #defineMMCHS_CON   0x02C
 #define  MMCHS_CON_DW8   (1 << 5)
 #define  MMCHS_CON_DVAL_8_4MS(3 << 9)
+#defineMMCHS_SD_CAPA   0x240
+#define  MMCHS_SD_CAPA_VS18  (1 << 26)
+#define  MMCHS_SD_CAPA_VS30  (1 << 25)
+#define  MMCHS_SD_CAPA_VS33  (1 << 24)
 
 static inline uint32_t
 ti_mmchs_read_4(struct ti_sdhci_softc *sc, bus_size_t off)
@@ -320,6 +339,7 @@ ti_sdhci_hw_init(device_t dev)
 {
struct ti_sdhci_softc *sc = device_get_softc(dev);
clk_ident_t clk;
+   uint32_t regval;
unsigned long timeout;
 
/* Enable the controller and interface/functional clocks */
@@ -357,6 +377,21 @@ ti_sdhci_hw_init(device_t dev)
DELAY(100);
}
 
+   /*
+* The attach() routine has examined fdt data and set flags in
+* slot.host.caps to reflect what voltages we can handle.  Set those
+* values in the CAPA register.  The manual says that these values can
+* only be set once, "before initialization" whatever that means, and
+* that they survive a reset.  So maybe doing this will be a no-op if
+* u-boot has already initialized the hardware.
+*/
+   regval = ti_mmchs_read_4(sc, MMCHS_SD_CAPA);
+   if (sc->slot.host.caps & MMC_OCR_LOW_VOLTAGE)
+   regval |= MMCHS_SD_CAPA_VS18;
+   if (sc->slot.host.caps & (MMC_OCR_290_300 | MMC_OCR_300_310))
+   regval |= MMCHS_SD_CAPA_VS30;
+   ti_mmchs_write_4(sc, MMCHS_SD_CAPA, regval);
+
/* Set initial host configuration (1-bit, std speed, pwr off). */
ti_sdhci_write_1(dev, NULL, SDHCI_HOST_CONTROL, 0);
ti_sdhci_write_1(dev, NULL, SDHCI_POWER_CONTROL, 0);
@@ -378,7 +413,8 @@ ti_sdhci_attach(device_t dev)
/*
 * Get the MMCHS device id from FDT.  If it's not there use the newbus
 * unit number (which will work as long as the devices are in order and
-* none are skipped in the fdt).
+* none are skipped in the fdt).  Note that this is a property we made
+* up and added in freebsd, it doesn't exist in the published bindings.
 */
node = ofw_bus_get_node(dev);
if ((OF_getprop(node, "mmchs-device-id", &prop, sizeof(prop))) <= 0) {
@@ -388,7 +424,23 @@ ti_sdhci_attach(device_t dev)
} else
sc->mmchs_device_id = fdt32_to_cpu(prop);
 
-   /* See if we've got a GPIO-based write detect pin. */
+   /*
+* The hardware can inherently do dual-voltage (1p8v, 3p0v) on the first
+* device, and only 1p8v on other devices unless an external transceiver
+* is used.  The only way we could know about a transceiver is 

svn commit: r259357 - stable/10/sys/dev/uart

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:48:01 2013
New Revision: 259357
URL: http://svnweb.freebsd.org/changeset/base/259357

Log:
  MFC r257556:
  
Arrange for uart_cpu_fdt's probe() routine to use the same table of compat
strings as uart_bus_fdt's probe().

Modified:
  stable/10/sys/dev/uart/uart.h
  stable/10/sys/dev/uart/uart_bus_fdt.c
  stable/10/sys/dev/uart/uart_cpu_fdt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/uart/uart.h
==
--- stable/10/sys/dev/uart/uart.h   Fri Dec 13 22:46:10 2013
(r259356)
+++ stable/10/sys/dev/uart/uart.h   Fri Dec 13 22:48:01 2013
(r259357)
@@ -76,6 +76,11 @@ extern struct uart_class uart_pl011_clas
 extern struct uart_class uart_cdnc_class __attribute__((weak));
 extern struct uart_class uart_ti8250_class __attribute__((weak));
 
+#ifdef FDT
+struct ofw_compat_data;
+extern const struct ofw_compat_data *uart_fdt_compat_data;
+#endif
+
 #ifdef PC98
 struct uart_class *uart_pc98_getdev(u_long port);
 #endif

Modified: stable/10/sys/dev/uart/uart_bus_fdt.c
==
--- stable/10/sys/dev/uart/uart_bus_fdt.c   Fri Dec 13 22:46:10 2013
(r259356)
+++ stable/10/sys/dev/uart/uart_bus_fdt.c   Fri Dec 13 22:48:01 2013
(r259357)
@@ -30,6 +30,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_platform.h"
+
 #include 
 #include 
 #include 
@@ -85,6 +87,9 @@ static struct ofw_compat_data compat_dat
{NULL,  (uintptr_t)NULL},
 };
 
+/* Export the compat_data table for use by the uart_cpu_fdt.c probe routine. */
+const struct ofw_compat_data *uart_fdt_compat_data = compat_data;
+
 static int
 uart_fdt_get_clock(phandle_t node, pcell_t *cell)
 {

Modified: stable/10/sys/dev/uart/uart_cpu_fdt.c
==
--- stable/10/sys/dev/uart/uart_cpu_fdt.c   Fri Dec 13 22:46:10 2013
(r259356)
+++ stable/10/sys/dev/uart/uart_cpu_fdt.c   Fri Dec 13 22:48:01 2013
(r259357)
@@ -30,6 +30,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_platform.h"
+
 #include 
 #include 
 #include 
@@ -93,6 +95,7 @@ int
 uart_cpu_getdev(int devtype, struct uart_devinfo *di)
 {
char buf[64];
+   const struct ofw_compat_data *cd;
struct uart_class *class;
phandle_t node, chosen;
pcell_t shift, br, rclk;
@@ -139,22 +142,13 @@ uart_cpu_getdev(int devtype, struct uart
/*
 * Finalize configuration.
 */
-   if (fdt_is_compatible(node, "fsl,imx-uart"))
-   class = &uart_imx_class;
-   else if (fdt_is_compatible(node, "quicc"))
-   class = &uart_quicc_class;
-   else if (fdt_is_compatible(node, "lpc"))
-   class = &uart_lpc_class;
-   else if (fdt_is_compatible(node, "arm,pl011"))
-   class = &uart_pl011_class;
-   else if (fdt_is_compatible(node, "exynos"))
-   class = &uart_s3c2410_class;
-   else if (fdt_is_compatible(node, "cadence,uart"))
-   class = &uart_cdnc_class;
-   else if (fdt_is_compatible(node, "ti,ns16550"))
-   class = &uart_ti8250_class;
-   else if (fdt_is_compatible(node, "ns16550"))
-   class = &uart_ns8250_class;
+   for (cd = uart_fdt_compat_data; cd->ocd_str != NULL; ++cd) {
+   if (fdt_is_compatible(node, cd->ocd_str))
+   break;
+   }
+   if (cd->ocd_str == NULL)
+   return (ENXIO);
+   class = (struct uart_class *)cd->ocd_data;
 
di->bas.chan = 0;
di->bas.regshft = (u_int)shift;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259358 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:49:18 2013
New Revision: 259358
URL: http://svnweb.freebsd.org/changeset/base/259358

Log:
  MFC r257557:  Add a missing register definition.

Modified:
  stable/10/sys/arm/freescale/imx/imx6_anatopreg.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx6_anatopreg.h
==
--- stable/10/sys/arm/freescale/imx/imx6_anatopreg.hFri Dec 13 22:48:01 
2013(r259357)
+++ stable/10/sys/arm/freescale/imx/imx6_anatopreg.hFri Dec 13 22:49:18 
2013(r259358)
@@ -81,6 +81,17 @@
 #defineIMX6_ANALOG_CCM_PFD_528_SET 0x104
 #defineIMX6_ANALOG_CCM_PFD_528_CLR 0x108
 #defineIMX6_ANALOG_CCM_PFD_528_TOG 0x10C
+#defineIMX6_ANALOG_PMU_REG_CORE0x140
+#define  IMX6_ANALOG_PMU_REG2_TARG_SHIFT 18
+#define  IMX6_ANALOG_PMU_REG2_TARG_MASK   \
+(0x1f << IMX6_ANALOG_PMU_REG2_TARG_SHIFT)
+#define  IMX6_ANALOG_PMU_REG1_TARG_SHIFT  9
+#define  IMX6_ANALOG_PMU_REG1_TARG_MASK   \
+(0x1f << IMX6_ANALOG_PMU_REG1_TARG_SHIFT)
+#define  IMX6_ANALOG_PMU_REG0_TARG_SHIFT  0
+#define  IMX6_ANALOG_PMU_REG0_TARG_MASK   \
+(0x1f << IMX6_ANALOG_PMU_REG0_TARG_SHIFT)
+
 #defineIMX6_ANALOG_CCM_MISC0   0x150
 #defineIMX6_ANALOG_CCM_MISC0_SET   0x154
 #defineIMX6_ANALOG_CCM_MISC0_CLR   0x158
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259359 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:50:12 2013
New Revision: 259359
URL: http://svnweb.freebsd.org/changeset/base/259359

Log:
  MFC r257561:
  
Bugfix:  the attach routine needs to use the same table of fdt compat
strings that the probe routine used.

Modified:
  stable/10/sys/arm/freescale/imx/imx_sdhci.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c
==
--- stable/10/sys/arm/freescale/imx/imx_sdhci.c Fri Dec 13 22:49:18 2013
(r259358)
+++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Fri Dec 13 22:50:12 2013
(r259359)
@@ -558,13 +558,9 @@ imx_sdhci_attach(device_t dev)
 
sc->dev = dev;
 
-   if (ofw_bus_is_compatible(dev, "fsl,imx51-esdhc")) {
-   sc->hwtype = HWTYPE_ESDHC;
-   } else if (ofw_bus_is_compatible(dev, "fsl,imx-usdhc")) {
-   sc->hwtype = HWTYPE_USDHC;
-   } else {
+   sc->hwtype = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+   if (sc->hwtype == HWTYPE_NONE)
panic("Impossible: not compatible in imx_sdhci_attach()");
-   }
 
rid = 0;
sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259360 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:51:09 2013
New Revision: 259360
URL: http://svnweb.freebsd.org/changeset/base/259360

Log:
  MFC r257595:  Comments and style(9) only, no functional changes.

Modified:
  stable/10/sys/arm/freescale/imx/imx_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx_machdep.c
==
--- stable/10/sys/arm/freescale/imx/imx_machdep.c   Fri Dec 13 22:50:12 
2013(r259359)
+++ stable/10/sys/arm/freescale/imx/imx_machdep.c   Fri Dec 13 22:51:09 
2013(r259360)
@@ -158,34 +158,33 @@ bus_dma_get_range_nb(void)
return (0);
 }
 
+/*
+ * This code which manipulates the watchdog hardware is here to implement
+ * cpu_reset() because the watchdog is the only way for software to reset the
+ * chip.  Why here and not in imx_wdog.c?  Because there's no requirement that
+ * the watchdog driver be compiled in, but it's nice to be able to reboot even
+ * if it's not.
+ */
 void
 imx_wdog_cpu_reset(vm_offset_t wdcr_physaddr)
 {
+   const struct pmap_devmap *pd;
+   volatile uint16_t * pcr;
 
/*
-* This code which manipulates the watchdog hardware is here to
-* implement cpu_reset() because the watchdog is the only way for
-* software to reset the chip.  Why here and not in imx_wdog.c?  Because
-* there's no requirement that the watchdog driver be compiled in, but
-* it's nice to be able to reboot even if it's not.
+* The deceptively simple write of WDOG_CR_WDE enables the watchdog,
+* sets the timeout to its minimum value (half a second), and also
+* clears the SRS bit which results in the SFTW (software-requested
+* reset) bit being set in the watchdog status register after the reset.
+* This is how software can distinguish a reset from a wdog timeout.
 */
-   volatile uint16_t * pcr;
-   const struct pmap_devmap *pd;
-
if ((pd = pmap_devmap_find_pa(wdcr_physaddr, 2)) == NULL) {
printf("cpu_reset() can't find its control register... locking 
up now.");
} else {
pcr = (uint16_t *)(pd->pd_va + (wdcr_physaddr - pd->pd_pa));
-   /*
-* This deceptively simple write enables the watchdog, sets the 
timeout
-* to its minimum value (half a second), and also clears the 
SRS bit
-* which results in the SFTW (software-requested reset) bit 
being set in
-* the watchdog status register after the reset. This is how 
software
-* can distinguish a requested reset from a wdog timeout.
-*/
*pcr = WDOG_CR_WDE;
}
-   while (1)
+   for (;;)
continue;
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259361 - stable/10/sys/arm/conf

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 22:52:59 2013
New Revision: 259361
URL: http://svnweb.freebsd.org/changeset/base/259361

Log:
  MFC r257603, r257604:
  
Rename WANDBOARD-COMMON to WANDBOARD.common and adjust the configs that
include it accordingly.  The build machinery for universe and tinderbox
tries to build every kernel config whose name begins and ends with [A-Z0-9]
and the common include file that has most of the options isn't buildable
by itself, so the new lowercase .common will avoid building it.

Added:
  stable/10/sys/arm/conf/WANDBOARD.common
 - copied unchanged from r257603, head/sys/arm/conf/WANDBOARD.common
Deleted:
  stable/10/sys/arm/conf/WANDBOARD-COMMON
Modified:
  stable/10/sys/arm/conf/WANDBOARD-DUAL
  stable/10/sys/arm/conf/WANDBOARD-QUAD
  stable/10/sys/arm/conf/WANDBOARD-SOLO
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/conf/WANDBOARD-DUAL
==
--- stable/10/sys/arm/conf/WANDBOARD-DUAL   Fri Dec 13 22:51:09 2013
(r259360)
+++ stable/10/sys/arm/conf/WANDBOARD-DUAL   Fri Dec 13 22:52:59 2013
(r259361)
@@ -17,7 +17,7 @@
 #
 # $FreeBSD$
 
-includeWANDBOARD-COMMON
+include"WANDBOARD.common"
 ident  WANDBOARD-DUAL
 
 # Flattened Device Tree

Modified: stable/10/sys/arm/conf/WANDBOARD-QUAD
==
--- stable/10/sys/arm/conf/WANDBOARD-QUAD   Fri Dec 13 22:51:09 2013
(r259360)
+++ stable/10/sys/arm/conf/WANDBOARD-QUAD   Fri Dec 13 22:52:59 2013
(r259361)
@@ -17,7 +17,7 @@
 #
 # $FreeBSD$
 
-includeWANDBOARD-COMMON
+include"WANDBOARD.common"
 ident  WANDBOARD-QUAD
 
 # Flattened Device Tree

Modified: stable/10/sys/arm/conf/WANDBOARD-SOLO
==
--- stable/10/sys/arm/conf/WANDBOARD-SOLO   Fri Dec 13 22:51:09 2013
(r259360)
+++ stable/10/sys/arm/conf/WANDBOARD-SOLO   Fri Dec 13 22:52:59 2013
(r259361)
@@ -17,7 +17,7 @@
 #
 # $FreeBSD$
 
-includeWANDBOARD-COMMON
+include"WANDBOARD.common"
 ident  WANDBOARD-SOLO
 
 # Flattened Device Tree

Copied: stable/10/sys/arm/conf/WANDBOARD.common (from r257603, 
head/sys/arm/conf/WANDBOARD.common)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/arm/conf/WANDBOARD.common Fri Dec 13 22:52:59 2013
(r259361, copy of r257603, head/sys/arm/conf/WANDBOARD.common)
@@ -0,0 +1,155 @@
+# Kernel configuration for Wandboard
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+include"../freescale/imx/std.imx6"
+
+optionsHZ=250  # Scheduling quantum is 4 milliseconds.
+optionsSCHED_4BSD  # 4BSD scheduler
+optionsPREEMPTION  # Enable kernel thread preemption
+optionsINET# InterNETworking
+optionsINET6   # IPv6 communications protocols
+#options   SCTP# Stream Control Transmission Protocol
+optionsFFS # Berkeley Fast Filesystem
+optionsSOFTUPDATES # Enable FFS soft updates support
+optionsUFS_ACL # Support for access control lists
+optionsUFS_DIRHASH # Improve performance on big directories
+optionsUFS_GJOURNAL# Enable gjournal-based UFS journaling
+#options   MD_ROOT # MD is a potential root device
+optionsNFSCL   # New Network Filesystem Client
+#options   NFSD# New Network Filesystem Server
+optionsNFSLOCKD# Network Lock Manager
+optionsNFS_ROOT# NFS usable as /, requires NFSCL
+optionsMSDOSFS # MSDOS Filesystem
+optionsCD9660  # ISO 9660 Filesystem
+#options   PROCFS  # Process filesystem (requires PSEUDOFS)
+optionsPSEUDOFS# Pseudo-filesystem framework
+optionsTMPFS   # TMP Memory Filesyst

svn commit: r259362 - in head: etc sbin/devd

2013-12-13 Thread Alan Somers
Author: asomers
Date: Fri Dec 13 22:58:57 2013
New Revision: 259362
URL: http://svnweb.freebsd.org/changeset/base/259362

Log:
  sbin/devd/devd.cc
Promoting the SIGINFO handler's log message from LOG_INFO to
LOG_NOTICE, and promoting the "Processing event ..." message from
LOG_DEBUG to LOG_INFO.  Setting the logfile to LOG_NOTICE with this
change will have the same result as setting it to LOG_INFO without
this change.  Setting it to LOG_INFO with this change will include
the useful "Processing event ..." messages that were previously at
LOG_DEBUG, without including useless messages like "Pushing table".
  
The intent of this change is that one can log "Processing event ..."
without logging "Pushing table" and related messages that are sent
for every event.  The number of lines actually logged is reduced by
about 75% by making this change and setting syslog to LOG_INFO vs
setting syslog to LOG_DEBUG.
  
  etc/syslog.conf
Changing the recommended loglevel to notice instead of info.
  
  Sponsored by: Spectra Logic Corp
  MFC after:4 weeks

Modified:
  head/etc/syslog.conf
  head/sbin/devd/devd.cc

Modified: head/etc/syslog.conf
==
--- head/etc/syslog.confFri Dec 13 22:52:59 2013(r259361)
+++ head/etc/syslog.confFri Dec 13 22:58:57 2013(r259362)
@@ -30,7 +30,7 @@ cron.*
/var/log/cron
 # news.notice  /var/log/news/news.notice
 # Uncomment this if you wish to see messages produced by devd
 # !devd
-# *.>=info   /var/log/devd.log
+# *.>=notice   /var/log/devd.log
 !ppp
 *.*/var/log/ppp.log
 !*

Modified: head/sbin/devd/devd.cc
==
--- head/sbin/devd/devd.cc  Fri Dec 13 22:52:59 2013(r259361)
+++ head/sbin/devd/devd.cc  Fri Dec 13 22:58:57 2013(r259362)
@@ -772,7 +772,7 @@ process_event(char *buffer)
char *sp;
 
sp = buffer + 1;
-   devdlog(LOG_DEBUG, "Processing event '%s'\n", buffer);
+   devdlog(LOG_INFO, "Processing event '%s'\n", buffer);
type = *buffer++;
cfg.push_var_table();
// No match doesn't have a device, and the format is a little
@@ -989,7 +989,7 @@ event_loop(void)
}
rv = select(max_fd, &fds, NULL, NULL, &tv);
if (got_siginfo) {
-   devdlog(LOG_INFO, "Events received so far=%u\n",
+   devdlog(LOG_NOTICE, "Events received so far=%u\n",
total_events);
got_siginfo = 0;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259363 - stable/10/sys/arm/s3c2xx0

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 23:07:22 2013
New Revision: 259363
URL: http://svnweb.freebsd.org/changeset/base/259363

Log:
  MFC r257639:
  
Remove the duplicated implementations of some bus_space functions and use
the essentially identical generic implementations instead.  The generic
implementations differ only in the spelling of a couple variable names
and some formatting differences.

Modified:
  stable/10/sys/arm/s3c2xx0/files.s3c2xx0
  stable/10/sys/arm/s3c2xx0/s3c2xx0_space.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/s3c2xx0/files.s3c2xx0
==
--- stable/10/sys/arm/s3c2xx0/files.s3c2xx0 Fri Dec 13 22:58:57 2013
(r259362)
+++ stable/10/sys/arm/s3c2xx0/files.s3c2xx0 Fri Dec 13 23:07:22 2013
(r259363)
@@ -1,4 +1,6 @@
 # $FreeBSD$
+arm/arm/bus_space_asm_generic.Sstandard
+arm/arm/bus_space_generic.cstandard
 arm/arm/cpufunc_asm_arm9.S standard
 arm/arm/irq_dispatch.S standard
 arm/s3c2xx0/board_ln2410sbc.c  optionalboard_ln2410sbc

Modified: stable/10/sys/arm/s3c2xx0/s3c2xx0_space.c
==
--- stable/10/sys/arm/s3c2xx0/s3c2xx0_space.c   Fri Dec 13 22:58:57 2013
(r259362)
+++ stable/10/sys/arm/s3c2xx0/s3c2xx0_space.c   Fri Dec 13 23:07:22 2013
(r259363)
@@ -89,7 +89,6 @@ __FBSDID("$FreeBSD$");
 #include 
 
 /* Prototypes for all the bus_space structure functions */
-bs_protos(s3c2xx0);
 bs_protos(generic);
 bs_protos(generic_armv4);
 
@@ -98,16 +97,16 @@ struct bus_space s3c2xx0_bs_tag = {
(void *) 0,
 
/* mapping/unmapping */
-   s3c2xx0_bs_map,
-   s3c2xx0_bs_unmap,
-   s3c2xx0_bs_subregion,
+   generic_bs_map,
+   generic_bs_unmap,
+   generic_bs_subregion,
 
/* allocation/deallocation */
-   s3c2xx0_bs_alloc,   /* not implemented */
-   s3c2xx0_bs_free,/* not implemented */
+   generic_bs_alloc,   /* not implemented */
+   generic_bs_free,/* not implemented */
 
/* barrier */
-   s3c2xx0_bs_barrier,
+   generic_bs_barrier,
 
/* read (single) */
generic_bs_r_1,
@@ -164,87 +163,3 @@ struct bus_space s3c2xx0_bs_tag = {
NULL,
 };
 
-int
-s3c2xx0_bs_map(void *t, bus_addr_t bpa, bus_size_t size,
-  int flag, bus_space_handle_t * bshp)
-{
-   u_long startpa, endpa, pa;
-   vm_offset_t va;
-   pt_entry_t *pte;
-   const struct pmap_devmap *pd;
-
-   if ((pd = pmap_devmap_find_pa(bpa, size)) != NULL) {
-   /* Device was statically mapped. */
-   *bshp = pd->pd_va + (bpa - pd->pd_pa);
-   return 0;
-   }
-
-   startpa = trunc_page(bpa);
-   endpa = round_page(bpa + size);
-
-   va = kva_alloc(endpa - startpa);
-   if (!va)
-   return (ENOMEM);
-
-   *bshp = (bus_space_handle_t) (va + (bpa - startpa));
-
-   for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
-   pmap_kenter(va, pa);
-   pte = vtopte(va);
-   if ((flag & BUS_SPACE_MAP_CACHEABLE) == 0)
-   *pte &= ~L2_S_CACHE_MASK;
-   }
-   return (0);
-}
-
-void
-s3c2xx0_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size)
-{
-   vm_offset_t va, endva, origva;
-
-   if (pmap_devmap_find_va((vm_offset_t)h, size) != NULL) {
-   /* Device was statically mapped; nothing to do. */
-   return;
-   }
-
-   endva = round_page((vm_offset_t)h + size);
-   origva = va = trunc_page((vm_offset_t)h);
-
-   while (va < endva) {
-   pmap_kremove(va);
-   va += PAGE_SIZE;
-   }
-   kva_free(origva, endva - origva);
-}
-
-int
-s3c2xx0_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset,
-bus_size_t size, bus_space_handle_t * nbshp)
-{
-
-   *nbshp = bsh + offset;
-   return (0);
-}
-
-void
-s3c2xx0_bs_barrier(void *t, bus_space_handle_t bsh, bus_size_t offset,
-  bus_size_t len, int flags)
-{
-
-   /* Nothing to do. */
-}
-
-int
-s3c2xx0_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend,
-bus_size_t size, bus_size_t alignment, bus_size_t boundary,
-int flags, bus_addr_t * bpap, bus_space_handle_t * bshp)
-{
-
-   panic("s3c2xx0_io_bs_alloc(): not implemented\n");
-}
-
-void
-s3c2xx0_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size)
-{
-   panic("s3c2xx0_io_bs_free(): not implemented\n");
-}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259364 - in stable/10/sys: arm/allwinner arm/arm arm/at91 arm/broadcom/bcm2835 arm/econa arm/freescale/imx arm/include arm/lpc arm/mv arm/rockchip arm/s3c2xx0 arm/sa11x0 arm/samsung/ex...

2013-12-13 Thread Ian Lepore
Author: ian
Date: Fri Dec 13 23:56:53 2013
New Revision: 259364
URL: http://svnweb.freebsd.org/changeset/base/259364

Log:
  MFC r257648, r257649, r257660:
  
Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring
out common code related to mapping device memory into a new devmap.c file.
  
Remove the growing duplication of code that used pmap_devmap_find_pa() and
then did some math with the returned results to generate a virtual address,
and likewise in reverse to get a physical address.  Now there are a pair
of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that.  The
bus_space_map() implementations are rewritten in terms of these.
  
Move remaining code and data related to static device mapping into the
new devmap.[ch] files.  Emphasize the MD nature of these things by using
the prefix arm_devmap_ on the function and type names (already a few of
these things found their way into MI code, hopefully it will be harder to
do by accident in the future).

Added:
  stable/10/sys/arm/arm/devmap.c
 - copied, changed from r257648, head/sys/arm/arm/devmap.c
  stable/10/sys/arm/include/devmap.h
 - copied, changed from r257648, head/sys/arm/include/devmap.h
Modified:
  stable/10/sys/arm/allwinner/a10_machdep.c
  stable/10/sys/arm/arm/bus_space_generic.c
  stable/10/sys/arm/arm/machdep.c
  stable/10/sys/arm/arm/pmap-v6.c
  stable/10/sys/arm/arm/pmap.c
  stable/10/sys/arm/at91/at91.c
  stable/10/sys/arm/at91/at91_machdep.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  stable/10/sys/arm/econa/econa_machdep.c
  stable/10/sys/arm/freescale/imx/imx6_machdep.c
  stable/10/sys/arm/freescale/imx/imx_machdep.c
  stable/10/sys/arm/include/fdt.h
  stable/10/sys/arm/include/machdep.h
  stable/10/sys/arm/include/pmap.h
  stable/10/sys/arm/lpc/lpc_machdep.c
  stable/10/sys/arm/mv/mv_localbus.c
  stable/10/sys/arm/mv/mv_machdep.c
  stable/10/sys/arm/mv/mvvar.h
  stable/10/sys/arm/rockchip/rk30xx_machdep.c
  stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c
  stable/10/sys/arm/sa11x0/assabet_machdep.c
  stable/10/sys/arm/samsung/exynos/exynos5_machdep.c
  stable/10/sys/arm/tegra/tegra2_machdep.c
  stable/10/sys/arm/ti/ti_machdep.c
  stable/10/sys/arm/versatile/versatile_machdep.c
  stable/10/sys/arm/xilinx/zy7_machdep.c
  stable/10/sys/arm/xscale/i80321/ep80219_machdep.c
  stable/10/sys/arm/xscale/i80321/iq31244_machdep.c
  stable/10/sys/arm/xscale/i8134x/crb_machdep.c
  stable/10/sys/arm/xscale/ixp425/avila_machdep.c
  stable/10/sys/arm/xscale/pxa/pxa_machdep.c
  stable/10/sys/conf/files.arm
  stable/10/sys/dev/fdt/fdt_pci.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/allwinner/a10_machdep.c
==
--- stable/10/sys/arm/allwinner/a10_machdep.c   Fri Dec 13 23:07:22 2013
(r259363)
+++ stable/10/sys/arm/allwinner/a10_machdep.c   Fri Dec 13 23:56:53 2013
(r259364)
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
@@ -71,7 +72,7 @@ initarm_late_init(void)
 }
 
 #define FDT_DEVMAP_MAX (1 + 2 + 1 + 1)
-static struct pmap_devmap fdt_devmap[FDT_DEVMAP_MAX] = {
+static struct arm_devmap_entry fdt_devmap[FDT_DEVMAP_MAX] = {
{ 0, 0, 0, 0, 0, }
 };
 
@@ -91,7 +92,7 @@ platform_devmap_init(void)
 
i++;
 
-   pmap_devmap_bootstrap_table = &fdt_devmap[0];
+   arm_devmap_register_table(&fdt_devmap[0]);
 
return (0);
 }

Modified: stable/10/sys/arm/arm/bus_space_generic.c
==
--- stable/10/sys/arm/arm/bus_space_generic.c   Fri Dec 13 23:07:22 2013
(r259363)
+++ stable/10/sys/arm/arm/bus_space_generic.c   Fri Dec 13 23:56:53 2013
(r259364)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 /* Prototypes for all the bus_space structure functions */
 bs_protos(generic);
@@ -58,36 +59,20 @@ int
 generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags,
 bus_space_handle_t *bshp)
 {
-   const struct pmap_devmap *pd;
-   vm_paddr_t startpa, endpa, pa, offset;
-   vm_offset_t va;
-   pt_entry_t *pte;
-
-   if ((pd = pmap_devmap_find_pa(bpa, size)) != NULL) {
-   /* Device was statically mapped. */
-   *bshp = pd->pd_va + (bpa - pd->pd_pa);
-   return (0);
-   }
-
-   endpa = round_page(bpa + size);
-   offset = bpa & PAGE_MASK;
-   startpa = trunc_page(bpa);
-
-   va = kva_alloc(endpa - startpa);
-   if (va == 0)
-   return (ENOMEM);
-
-   *bshp = va + offset;
-
-   for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
-   pmap_kenter(va, pa);
-   pte = vtopte(va);
-   if (!(flags & BUS_SPACE_MAP_CACHEABLE)) {
-   *pte &= ~L2_S_CACHE_MASK;
-  

svn commit: r259365 - in stable/10/sys/arm: allwinner arm broadcom/bcm2835 freescale/imx include lpc mv rockchip samsung/exynos tegra ti versatile xilinx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:16:08 2013
New Revision: 259365
URL: http://svnweb.freebsd.org/changeset/base/259365

Log:
  MFC r257669, r257672, r257673, r257676, r257678:
  
Call initarm_lastaddr() later in the init sequence, after establishing
static device mappings, rather than as the first of the initializations
that a platform can hook into.  This allows a platform to allocate KVA
from the top of the address space downwards for things like static device
mapping, and return the final "last usable address" result after that and
other early init work is done.
  
Because some platforms were doing work in initarm_lastaddr() that needs to
be done early, add a new initarm_early_init() routine and move the early
init code to that routine on those platforms.
  
Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to
share the same code on both architectures.
  
Add new helper routines for arm static device mapping.  The new code
allocates kva space from the top down for the device mappings and builds
entries in an internal table which is automatically used later by
arm_devmap_bootstrap().  The platform code just calls the new
arm_devmap_add_entry() function as many times as it needs to (up to 32
entries allowed; most platforms use 2 or 3 at most).
  
Remove imx local devmap code and use the essentially identical common
code that got moved from imx_machdep.c to arm/devmap.c.

Modified:
  stable/10/sys/arm/allwinner/a10_machdep.c
  stable/10/sys/arm/arm/devmap.c
  stable/10/sys/arm/arm/machdep.c
  stable/10/sys/arm/broadcom/bcm2835/bcm2835_machdep.c
  stable/10/sys/arm/freescale/imx/imx51_machdep.c
  stable/10/sys/arm/freescale/imx/imx53_machdep.c
  stable/10/sys/arm/freescale/imx/imx6_machdep.c
  stable/10/sys/arm/freescale/imx/imx_machdep.c
  stable/10/sys/arm/include/devmap.h
  stable/10/sys/arm/include/machdep.h
  stable/10/sys/arm/include/pmap.h
  stable/10/sys/arm/lpc/lpc_machdep.c
  stable/10/sys/arm/mv/mv_machdep.c
  stable/10/sys/arm/rockchip/rk30xx_machdep.c
  stable/10/sys/arm/samsung/exynos/exynos5_machdep.c
  stable/10/sys/arm/tegra/tegra2_machdep.c
  stable/10/sys/arm/ti/ti_machdep.c
  stable/10/sys/arm/versatile/versatile_machdep.c
  stable/10/sys/arm/xilinx/zy7_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/allwinner/a10_machdep.c
==
--- stable/10/sys/arm/allwinner/a10_machdep.c   Fri Dec 13 23:56:53 2013
(r259364)
+++ stable/10/sys/arm/allwinner/a10_machdep.c   Sat Dec 14 00:16:08 2013
(r259365)
@@ -62,6 +62,12 @@ initarm_lastaddr(void)
 }
 
 void
+initarm_early_init(void)
+{
+
+}
+
+void
 initarm_gpio_init(void)
 {
 }
@@ -80,7 +86,7 @@ static struct arm_devmap_entry fdt_devma
  * Construct pmap_devmap[] with DT-derived config data.
  */
 int
-platform_devmap_init(void)
+initarm_devmap_init(void)
 {
int i = 0;
 

Modified: stable/10/sys/arm/arm/devmap.c
==
--- stable/10/sys/arm/arm/devmap.c  Fri Dec 13 23:56:53 2013
(r259364)
+++ stable/10/sys/arm/arm/devmap.c  Sat Dec 14 00:16:08 2013
(r259365)
@@ -36,9 +36,89 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 static const struct arm_devmap_entry *devmap_table;
+static boolean_t devmap_bootstrap_done = false;
+
+/*
+ * The allocated-kva (akva) devmap table and metadata.  Platforms can call
+ * arm_devmap_add_entry() to add static device mappings to this table using
+ * automatically allocated virtual addresses carved out of the top of kva 
space.
+ * Allocation begins immediately below the ARM_VECTORS_HIGH address.
+ */
+#defineAKVA_DEVMAP_MAX_ENTRIES 32
+static struct arm_devmap_entry akva_devmap_entries[AKVA_DEVMAP_MAX_ENTRIES];
+static u_int   akva_devmap_idx;
+static vm_offset_t akva_devmap_vaddr = ARM_VECTORS_HIGH;
+
+/*
+ * Return the "last" kva address used by the registered devmap table.  It's
+ * actually the lowest address used by the static mappings, i.e., the address 
of
+ * the first unusable byte of KVA.
+ */
+vm_offset_t
+arm_devmap_lastaddr()
+{
+   const struct arm_devmap_entry *pd;
+   vm_offset_t lowaddr;
+
+   if (akva_devmap_idx > 0)
+   return (akva_devmap_vaddr);
+
+   if (devmap_table == NULL)
+   panic("arm_devmap_lastaddr(): No devmap table registered.");
+
+   lowaddr = ARM_VECTORS_HIGH;
+   for (pd = devmap_table; pd->pd_size != 0; ++pd) {
+   if (lowaddr > pd->pd_va)
+   lowaddr = pd->pd_va;
+   }
+
+   return (lowaddr);
+}
+
+/*
+ * Add an entry to the internal "akva" static devmap table using the given
+ * physical address and size and a virtual address allocated from the top of
+ * kva.  This automatically registers the akva 

svn commit: r259366 - stable/10/sys/arm/freescale/imx

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:23:43 2013
New Revision: 259366
URL: http://svnweb.freebsd.org/changeset/base/259366

Log:
  MFC r257924:
  
Apparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo'
to be a constant integer suitable for use in a case label, so use #defines.

Modified:
  stable/10/sys/arm/freescale/imx/imx6_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx6_machdep.c
==
--- stable/10/sys/arm/freescale/imx/imx6_machdep.c  Sat Dec 14 00:16:08 
2013(r259365)
+++ stable/10/sys/arm/freescale/imx/imx6_machdep.c  Sat Dec 14 00:23:43 
2013(r259366)
@@ -145,11 +145,11 @@ u_int imx_soc_type()
 {
uint32_t digprog, hwsoc;
uint32_t *pcr;
-   const uint32_t HWSOC_MX6SL   = 0x60;
-   const uint32_t HWSOC_MX6DL   = 0x61;
-   const uint32_t HWSOC_MX6SOLO = 0x62;
-   const uint32_t HWSOC_MX6Q= 0x63;
const vm_offset_t SCU_CONFIG_PHYSADDR = 0x00a4;
+#defineHWSOC_MX6SL 0x60
+#defineHWSOC_MX6DL 0x61
+#defineHWSOC_MX6SOLO   0x62
+#defineHWSOC_MX6Q  0x63
 
digprog = imx6_anatop_read_4(IMX6_ANALOG_DIGPROG_SL);
hwsoc = (digprog >> IMX6_ANALOG_DIGPROG_SOCTYPE_SHIFT) & 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259368 - stable/10/usr.sbin/syslogd

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:25:57 2013
New Revision: 259368
URL: http://svnweb.freebsd.org/changeset/base/259368

Log:
  MFC r258076, r258077:
  
This fixes 3 problems in syslogd related to sizing receive buffers...
  
- A call was misplaced at the wrong level of nested if blocks, so that
  the buffers for unix domain sockets (/dev/log, /dev/klog) were never
  increased at all; they remained at a way-too-small default size of 4096.
  
- The function that was supposed to double the size of the buffer
  sometimes did nothing, and sometimes installed a wildly-wrong buffer
  size (either too large or too small) due to an unitialized 'slen'
  variable passed to getsockopt().  Most often it doubled the UDP buffers
  from 40k to 80k because accidentally there would be harmless stack
  garbage in the unitialized variables.
  
- The whole concept of blindly doubling a socket's buffer size without
  knowing what size it started at is a design flaw that has to be called a
  bug.  If the double_rbuf() function had worked at all (I.E., if the
  other two bugs didn't exist) this would lead to UDP sockets having an
  80k buffer while unix dgram sockets get an 8k buffer.  There's nothing
  about the problem being solved that requires larger buffers for UDP than
  for unix dgram sockets -- the buffering requirements are the same
  regardless of socket type.
  
This change renames the double_rbuf() function to increase_rbuf() and
increases the buffer size on all types of sockets to 80k.  80k was
chosen only because it appears to be the size the original change was
shooting for, and it certainly seems to be reasonably large (I might
have picked 64k in the absence of any historical guidance).
  
Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially
transient and shouldn't result in closing the socket and giving up forever.

Modified:
  stable/10/usr.sbin/syslogd/syslogd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/syslogd/syslogd.c
==
--- stable/10/usr.sbin/syslogd/syslogd.cSat Dec 14 00:25:25 2013
(r259367)
+++ stable/10/usr.sbin/syslogd/syslogd.cSat Dec 14 00:25:57 2013
(r259368)
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
 #defineDEFSPRI (LOG_KERN|LOG_CRIT)
 #defineTIMERINTVL  30  /* interval for checking flush, 
mark */
 #defineTTYMSGTIME  1   /* timeout passed to ttymsg */
+#defineRCVBUF_MINSIZE  (80 * 1024) /* minimum size of dgram rcv 
buffer */
 
 #include 
 #include 
@@ -336,7 +337,7 @@ static void unmapped(struct sockaddr *);
 static voidwallmsg(struct filed *, struct iovec *, const int iovlen);
 static int waitdaemon(int, int, int);
 static voidtimedout(int);
-static voiddouble_rbuf(int);
+static voidincrease_rcvbuf(int);
 
 int
 main(int argc, char *argv[])
@@ -547,8 +548,8 @@ main(int argc, char *argv[])
STAILQ_REMOVE(&funixes, fx, funix, next);
continue;
}
-   double_rbuf(fx->s);
}
+   increase_rcvbuf(fx->s);
}
if (SecureMode <= 1)
finet = socksetup(family, bindhostname);
@@ -1241,8 +1242,10 @@ fprintlog(struct filed *f, int flags, co
switch (errno) {
case ENOBUFS:
case ENETDOWN:
+   case ENETUNREACH:
case EHOSTUNREACH:
case EHOSTDOWN:
+   case EADDRNOTAVAIL:
break;
/* case EBADF: */
/* case EACCES: */
@@ -1253,7 +1256,7 @@ fprintlog(struct filed *f, int flags, co
/* case ENOBUFS: */
/* case ECONNREFUSED: */
default:
-   dprintf("removing entry\n");
+   dprintf("removing entry: errno=%d\n", 
e);
f->f_type = F_UNUSED;
break;
}
@@ -2720,7 +2723,7 @@ socksetup(int af, char *bindhostname)
}
 
if (!SecureMode)
-   double_rbuf(*s);
+   increase_rcvbuf(*s);
}
 
(*socks)++;
@@ -2741,12 +2744,16 @@ socksetup(int af, char *bindhostname)
 }
 
 static void
-double_rbuf(int fd)
+increase_rcvbuf(int fd)
 {
-   socklen_t slen, len;
+   socklen_t len, slen;
+
+   slen 

svn commit: r259367 - releng/10.0/sys/dev/drm2/radeon

2013-12-13 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sat Dec 14 00:25:25 2013
New Revision: 259367
URL: http://svnweb.freebsd.org/changeset/base/259367

Log:
  MFC r259234:
  
  drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes
  
  This fixes radeon_agp_init() and gtt_size is now correct. However, this
  is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
  implemented yet.
  
  Submitted by: tijl@
  Approved by:  re (gjb)

Modified:
  releng/10.0/sys/dev/drm2/radeon/radeon_agp.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/dev/drm2/radeon/radeon_agp.c
==
--- releng/10.0/sys/dev/drm2/radeon/radeon_agp.cSat Dec 14 00:23:43 
2013(r259366)
+++ releng/10.0/sys/dev/drm2/radeon/radeon_agp.cSat Dec 14 00:25:25 
2013(r259367)
@@ -153,11 +153,11 @@ int radeon_agp_init(struct radeon_device
return ret;
}
 
-   if (rdev->ddev->agp->info.ai_aperture_size < 32) {
+   if ((rdev->ddev->agp->info.ai_aperture_size >> 20) < 32) {
drm_agp_release(rdev->ddev);
dev_warn(rdev->dev, "AGP aperture too small (%zuM) "
"need at least 32M, disabling AGP\n",
-   rdev->ddev->agp->info.ai_aperture_size);
+   rdev->ddev->agp->info.ai_aperture_size >> 20);
return -EINVAL;
}
 
@@ -246,7 +246,7 @@ int radeon_agp_init(struct radeon_device
}
 
rdev->mc.agp_base = rdev->ddev->agp->info.ai_aperture_base;
-   rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size << 20;
+   rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size;
rdev->mc.gtt_start = rdev->mc.agp_base;
rdev->mc.gtt_end = rdev->mc.gtt_start + rdev->mc.gtt_size - 1;
dev_info(rdev->dev, "GTT: %juM 0x%08jX - 0x%08jX\n",
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259370 - releng/10.0/sys/dev/drm2/radeon

2013-12-13 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sat Dec 14 00:40:47 2013
New Revision: 259370
URL: http://svnweb.freebsd.org/changeset/base/259370

Log:
  MFC r259236:
  
  drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD
  
  The code was unmodified compared to Linux and returned the amount of
  received bytes from the i2c bus. This led to non-working i2c bus and
  failure to eg. read monitor's EDID, if connected to DisplayPort.
  
  Tested by:Mikaël Urankar 
  Approved by:  re (gjb)

Modified:
  releng/10.0/sys/dev/drm2/radeon/atombios_dp.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/dev/drm2/radeon/atombios_dp.c
==
--- releng/10.0/sys/dev/drm2/radeon/atombios_dp.c   Sat Dec 14 00:36:29 
2013(r259369)
+++ releng/10.0/sys/dev/drm2/radeon/atombios_dp.c   Sat Dec 14 00:40:47 
2013(r259370)
@@ -272,7 +272,7 @@ int radeon_dp_i2c_aux_ch(device_t dev, i
case AUX_I2C_REPLY_ACK:
if (mode == MODE_I2C_READ)
*read_byte = reply[0];
-   return ret;
+   return (0); /* Return ret on Linux. */
case AUX_I2C_REPLY_NACK:
DRM_DEBUG_KMS("aux_i2c nack\n");
return -EREMOTEIO;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r259371 - stable/10/sys/dev/nand

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:54:05 2013
New Revision: 259371
URL: http://svnweb.freebsd.org/changeset/base/259371

Log:
  MFC r257892, r258196, r258197, r258199, r258200, r258201, r258202:
  
Add ONFI signature check.
  
Add Micron chip found in Freescale Vybrid Family Phytec COSMIC board.
  
The vendor specified field is 88 bytes, not 8 bytes.
  
Update the onfi_params struct to ONFI revision 3.2 (06 12 2013).
  
Search for and validate the ONFI params as specified in the standard.
  
ONFI parameters are little-endian, hence we must take care to convert them
to native endianness.  We must also pay attention to unaligned accesses.
  
Rework the routine that returns a pointer to the table of software ECC
byte positions within the OOB area to support chips with unusual OOB
sizes such as 218 or 224 bytes.

Modified:
  stable/10/sys/dev/nand/nand.c
  stable/10/sys/dev/nand/nand.h
  stable/10/sys/dev/nand/nand_generic.c
  stable/10/sys/dev/nand/nand_id.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/nand/nand.c
==
--- stable/10/sys/dev/nand/nand.c   Sat Dec 14 00:40:47 2013
(r259370)
+++ stable/10/sys/dev/nand/nand.c   Sat Dec 14 00:54:05 2013
(r259371)
@@ -115,7 +115,7 @@ nand_init(struct nand_softc *nand, devic
 }
 
 void
-nand_onfi_set_params(struct nand_chip *chip, struct onfi_params *params)
+nand_onfi_set_params(struct nand_chip *chip, struct onfi_chip_params *params)
 {
struct chip_geom *cg;
 
@@ -309,23 +309,22 @@ nand_get_chip_param(struct nand_chip *ch
 static uint16_t *
 default_software_ecc_positions(struct nand_chip *chip)
 {
-   struct nand_ecc_data *eccd;
-
-   eccd = &chip->nand->ecc;
-
-   if (eccd->eccpositions)
-   return (eccd->eccpositions);
-
-   switch (chip->chip_geom.oob_size) {
-   case 16:
-   return ((uint16_t *)&default_software_ecc_positions_16);
-   case 64:
-   return ((uint16_t *)&default_software_ecc_positions_64);
-   case 128:
-   return ((uint16_t *)&default_software_ecc_positions_128);
-   default:
-   return (NULL); /* No ecc bytes positions defs available */
-   }
+   /* If positions have been set already, use them. */
+   if (chip->nand->ecc.eccpositions)
+   return (chip->nand->ecc.eccpositions);
+
+   /*
+* XXX Note that the following logic isn't really sufficient, especially
+* in the ONFI case where the number of ECC bytes can be dictated by
+* values in the parameters page, and that could lead to needing more
+* byte positions than exist within the tables of software-ecc defaults.
+*/
+   if (chip->chip_geom.oob_size >= 128)
+   return (default_software_ecc_positions_128);
+   if (chip->chip_geom.oob_size >= 64)
+   return (default_software_ecc_positions_64);
+   else if (chip->chip_geom.oob_size >= 16)
+   return (default_software_ecc_positions_16);
 
return (NULL);
 }

Modified: stable/10/sys/dev/nand/nand.h
==
--- stable/10/sys/dev/nand/nand.h   Sat Dec 14 00:40:47 2013
(r259370)
+++ stable/10/sys/dev/nand/nand.h   Sat Dec 14 00:54:05 2013
(r259371)
@@ -31,6 +31,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -122,7 +123,8 @@ MALLOC_DECLARE(M_NAND);
 
 #define NAND_MAN_SAMSUNG   0xec
 #define NAND_MAN_HYNIX 0xad
-#defineNAND_MAN_STMICRO0x20
+#define NAND_MAN_STMICRO   0x20
+#define NAND_MAN_MICRON0x2c
 
 struct nand_id {
uint8_t man_id;
@@ -176,12 +178,17 @@ struct onfi_params {
uint16_trev;
uint16_tfeatures;
uint16_toptional_commands;
-   uint8_t res1[22];
+   uint8_t primary_advanced_command;
+   uint8_t res1;
+   uint16_textended_parameter_page_length;
+   uint8_t parameter_page_count;
+   uint8_t res2[17];
charmanufacturer_name[12];
chardevice_model[20];
uint8_t manufacturer_id;
-   uint16_tdate;
-   uint8_t res2[13];
+   uint8_t manufacture_date_yy;
+   uint8_t manufacture_date_ww;
+   uint8_t res3[13];
uint32_tbytes_per_page;
uint16_tspare_bytes_per_page;
uint32_tbytes_per_partial_page;
@@ -200,7 +207,8 @@ struct onfi_params {
uint8_t bits_of_ecc;
uint8_t interleaved_addr_bits;
uint8_t interleaved_oper_attr;
-   uint8_t res3[13];
+   uint8_t eznand_support;
+   uint8_t res4[12];
  

svn commit: r259372 - stable/10/sys/dev/nand

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:55:34 2013
New Revision: 259372
URL: http://svnweb.freebsd.org/changeset/base/259372

Log:
  MFC r258740:
  
Look up a nand chip by id in the static table before trying to obtain
ONFI parameters.  This allows a static table entry to provide valid data
for chips known to provide invalid ONFI data.

Modified:
  stable/10/sys/dev/nand/nandbus.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/nand/nandbus.c
==
--- stable/10/sys/dev/nand/nandbus.cSat Dec 14 00:54:05 2013
(r259371)
+++ stable/10/sys/dev/nand/nandbus.cSat Dec 14 00:55:34 2013
(r259372)
@@ -195,8 +195,27 @@ nandbus_attach(device_t dev)
if (chip_id.man_id == 0xff)
continue;
 
-   /* Check if chip is ONFI compliant */
-   if (nand_probe_onfi(dev, &onfi) != 0) {
+   /*
+* First try to get info from the table.  If that fails, see if
+* the chip can provide ONFI info.  We check the table first to
+* allow table entries to override info from chips that are
+* known to provide bad ONFI data.
+*/
+   onfi = 0;
+   chip_params = nand_get_params(&chip_id);
+   if (chip_params == NULL) {
+   nand_probe_onfi(dev, &onfi);
+   }
+
+   /*
+* At this point it appears there is a chip at this chipselect,
+* so if we can't work with it, whine about it.
+*/
+   if (chip_params == NULL && onfi == 0) {
+   if (bootverbose || (nand_debug_flag & NDBG_BUS))
+   printf("Chip params not found, chipsel: %d "
+   "(manuf: 0x%0x, chipid: 0x%0x, onfi: %d)\n",
+   cs, chip_id.man_id, chip_id.dev_id, onfi);
continue;
}
 
@@ -218,15 +237,6 @@ nandbus_attach(device_t dev)
continue;
}
 
-   chip_params = nand_get_params(&chip_id);
-   if (chip_params == NULL) {
-   nand_debug(NDBG_BUS,"Chip description not found! "
-   "(manuf: 0x%0x, chipid: 0x%0x)\n",
-   chip_id.man_id, chip_id.dev_id);
-   free(ivar, M_NAND);
-   continue;
-   }
-
ivar->cs = cs;
ivar->cols = 1;
ivar->rows = 2;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259373 - stable/10/sys/arm/arm

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:57:05 2013
New Revision: 259373
URL: http://svnweb.freebsd.org/changeset/base/259373

Log:
  MFC r258240:
  
In the data abort handler, don't panic if kdb is available and says it
handled the condition.

Modified:
  stable/10/sys/arm/arm/trap.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/trap.c
==
--- stable/10/sys/arm/arm/trap.cSat Dec 14 00:55:34 2013
(r259372)
+++ stable/10/sys/arm/arm/trap.cSat Dec 14 00:57:05 2013
(r259373)
@@ -528,7 +528,8 @@ dab_fatal(struct trapframe *tf, u_int fs
 
 #ifdef KDB
if (debugger_on_panic || kdb_active)
-   kdb_trap(fsr, 0, tf);
+   if (kdb_trap(fsr, 0, tf))
+   return (0);
 #endif
panic("Fatal abort");
/*NOTREACHED*/
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259374 - stable/10/sys/arm/ti

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:58:13 2013
New Revision: 259374
URL: http://svnweb.freebsd.org/changeset/base/259374

Log:
  MFC r258356:
  
Bugfixes... the host capabilties from FDT data are stored in host.caps, not
host.host_ocr, examine the correct field when setting up the hardware.  
Also,
the offset for the capabilties register should be 0x140, not 0x240.

Modified:
  stable/10/sys/arm/ti/ti_sdhci.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/ti/ti_sdhci.c
==
--- stable/10/sys/arm/ti/ti_sdhci.c Sat Dec 14 00:57:05 2013
(r259373)
+++ stable/10/sys/arm/ti/ti_sdhci.c Sat Dec 14 00:58:13 2013
(r259374)
@@ -108,7 +108,7 @@ static struct ofw_compat_data compat_dat
 #defineMMCHS_CON   0x02C
 #define  MMCHS_CON_DW8   (1 << 5)
 #define  MMCHS_CON_DVAL_8_4MS(3 << 9)
-#defineMMCHS_SD_CAPA   0x240
+#defineMMCHS_SD_CAPA   0x140
 #define  MMCHS_SD_CAPA_VS18  (1 << 26)
 #define  MMCHS_SD_CAPA_VS30  (1 << 25)
 #define  MMCHS_SD_CAPA_VS33  (1 << 24)
@@ -432,9 +432,9 @@ ti_sdhci_attach(device_t dev)
 * that it can set the right values in the CAPA register, which can only
 * be done once and never reset.
 */
-   sc->slot.host.host_ocr |= MMC_OCR_LOW_VOLTAGE;
+   sc->slot.host.caps |= MMC_OCR_LOW_VOLTAGE;
if (sc->mmchs_device_id == 0 || OF_hasprop(node, "ti,dual-volt")) {
-   sc->slot.host.host_ocr |= MMC_OCR_290_300 | MMC_OCR_300_310;
+   sc->slot.host.caps |= MMC_OCR_290_300 | MMC_OCR_300_310;
}
 
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259375 - stable/10/sys/arm/conf

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 00:59:40 2013
New Revision: 259375
URL: http://svnweb.freebsd.org/changeset/base/259375

Log:
  MFC r258393:
  
Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.

Modified:
  stable/10/sys/arm/conf/BEAGLEBONE
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/conf/BEAGLEBONE
==
--- stable/10/sys/arm/conf/BEAGLEBONE   Sat Dec 14 00:58:13 2013
(r259374)
+++ stable/10/sys/arm/conf/BEAGLEBONE   Sat Dec 14 00:59:40 2013
(r259375)
@@ -104,6 +104,7 @@ device  gpio
 
 # USB support
 device usb
+optionsUSB_HOST_ALIGN=64   # Cacheline size is 64 on AM335x.
 optionsUSB_DEBUG
 #options   USB_REQ_DEBUG
 #options   USB_VERBOSE
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259376 - releng/10.0/sys/dev/drm2

2013-12-13 Thread Jean-Sebastien Pedron
Author: dumbbell
Date: Sat Dec 14 01:01:32 2013
New Revision: 259376
URL: http://svnweb.freebsd.org/changeset/base/259376

Log:
  MFC r259237:
  
  drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge
  
  Before this fix, capabilities were read from vgapci and were incorrect.
  
  Approved by:  re (gjb)

Modified:
  releng/10.0/sys/dev/drm2/drm_pci.c
Directory Properties:
  releng/10.0/   (props changed)

Modified: releng/10.0/sys/dev/drm2/drm_pci.c
==
--- releng/10.0/sys/dev/drm2/drm_pci.c  Sat Dec 14 00:59:40 2013
(r259375)
+++ releng/10.0/sys/dev/drm2/drm_pci.c  Sat Dec 14 01:01:32 2013
(r259376)
@@ -134,7 +134,11 @@ int drm_pcie_get_speed_cap_mask(struct d
if (!drm_device_is_pcie(dev))
return -EINVAL;
 
-   root = device_get_parent(dev->device);
+   root =
+   device_get_parent( /* pcib */
+   device_get_parent( /* `-- pci  */
+   device_get_parent( /* `-- vgapci   */
+   dev->device)));/* `-- drmn */
 
pos = 0;
pci_find_cap(root, PCIY_EXPRESS, &pos);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259377 - in stable/10/sys/arm: arm at91 econa s3c2xx0 sa11x0 xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 01:12:13 2013
New Revision: 259377
URL: http://svnweb.freebsd.org/changeset/base/259377

Log:
  MFC r258392, r258412:
  
Call cpu_setup() immediately after the page tables are installed.  This
enables data cache and other chip-specific features.  It was previously
done via an early SYSINIT, but it was being done after pmap and vm setup,
and those setups need to use mutexes.  On some modern ARM platforms,
the ldrex/strex instructions that implement mutexes require the data cache
to be enabled.
  
Call cpu_setup() from the initarm() routine on platforms that don't use
the common FDT-aware initarm() in arm/machdep.c.

Modified:
  stable/10/sys/arm/arm/machdep.c
  stable/10/sys/arm/at91/at91_machdep.c
  stable/10/sys/arm/econa/econa_machdep.c
  stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c
  stable/10/sys/arm/sa11x0/assabet_machdep.c
  stable/10/sys/arm/xscale/i80321/ep80219_machdep.c
  stable/10/sys/arm/xscale/i80321/iq31244_machdep.c
  stable/10/sys/arm/xscale/i8134x/crb_machdep.c
  stable/10/sys/arm/xscale/ixp425/avila_machdep.c
  stable/10/sys/arm/xscale/pxa/pxa_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/arm/machdep.c
==
--- stable/10/sys/arm/arm/machdep.c Sat Dec 14 01:01:32 2013
(r259376)
+++ stable/10/sys/arm/arm/machdep.c Sat Dec 14 01:12:13 2013
(r259377)
@@ -361,7 +361,6 @@ cpu_startup(void *dummy)
 #endif
 #endif
 
-   cpu_setup("");
identify_arm_cpu();
 
printf("real memory  = %ju (%ju MB)\n", (uintmax_t)ptoa(physmem),
@@ -1427,6 +1426,12 @@ initarm(struct arm_boot_params *abp)
cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2));
 
/*
+* Now that proper page tables are installed, call cpu_setup() to enable
+* instruction and data caches and other chip-specific features.
+*/
+   cpu_setup("");
+
+   /*
 * Only after the SOC registers block is mapped we can perform device
 * tree fixups, as they may attempt to read parameters from hardware.
 */

Modified: stable/10/sys/arm/at91/at91_machdep.c
==
--- stable/10/sys/arm/at91/at91_machdep.c   Sat Dec 14 01:01:32 2013
(r259376)
+++ stable/10/sys/arm/at91/at91_machdep.c   Sat Dec 14 01:12:13 2013
(r259377)
@@ -604,6 +604,7 @@ initarm(struct arm_boot_params *abp)
 * of the stack memory.
 */
cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
+   cpu_setup("");
 
set_stackptrs(0);
 

Modified: stable/10/sys/arm/econa/econa_machdep.c
==
--- stable/10/sys/arm/econa/econa_machdep.c Sat Dec 14 01:01:32 2013
(r259376)
+++ stable/10/sys/arm/econa/econa_machdep.c Sat Dec 14 01:12:13 2013
(r259377)
@@ -309,6 +309,7 @@ initarm(struct arm_boot_params *abp)
 * this problem will not occur after initarm().
 */
cpu_idcache_wbinv_all();
+   cpu_setup("");
 
/* Set stack for exception handlers */
data_abort_handler_address = (u_int)data_abort_handler;

Modified: stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c
==
--- stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Sat Dec 14 01:01:32 2013
(r259376)
+++ stable/10/sys/arm/s3c2xx0/s3c24x0_machdep.c Sat Dec 14 01:12:13 2013
(r259377)
@@ -355,6 +355,7 @@ initarm(struct arm_boot_params *abp)
 * this problem will not occur after initarm().
 */
cpu_idcache_wbinv_all();
+   cpu_setup("");
 
/* Disable all peripheral interrupts */
ioreg_write32(S3C24X0_INTCTL_BASE + INTCTL_INTMSK, ~0);

Modified: stable/10/sys/arm/sa11x0/assabet_machdep.c
==
--- stable/10/sys/arm/sa11x0/assabet_machdep.c  Sat Dec 14 01:01:32 2013
(r259376)
+++ stable/10/sys/arm/sa11x0/assabet_machdep.c  Sat Dec 14 01:12:13 2013
(r259377)
@@ -371,6 +371,7 @@ initarm(struct arm_boot_params *abp)
 
cpufunc_control(0x337f, 0x107d);
arm_vector_init(ARM_VECTORS_LOW, ARM_VEC_ALL);
+   cpu_setup("");
 
pmap_curmaxkvaddr = freemempos + KERNEL_PT_VMDATA_NUM * 0x40;
 

Modified: stable/10/sys/arm/xscale/i80321/ep80219_machdep.c
==
--- stable/10/sys/arm/xscale/i80321/ep80219_machdep.c   Sat Dec 14 01:01:32 
2013(r259376)
+++ stable/10/sys/arm/xscale/i80321/ep80219_machdep.c   Sat Dec 14 01:12:13 
2013(r259377)
@@ -334,6 +334,8 @@ initarm(struct arm_boot_params *abp)
 * this problem will not occur after initarm().
 */
cpu_idcache_wbinv_all

svn commit: r259378 - stable/10/sys/arm/at91

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 01:14:38 2013
New Revision: 259378
URL: http://svnweb.freebsd.org/changeset/base/259378

Log:
  MFC r258820:  Add definitions for the PIO pins found on recent AT91 SoCs.

Modified:
  stable/10/sys/arm/at91/at91_pioreg.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/at91/at91_pioreg.h
==
--- stable/10/sys/arm/at91/at91_pioreg.hSat Dec 14 01:12:13 2013
(r259377)
+++ stable/10/sys/arm/at91/at91_pioreg.hSat Dec 14 01:14:38 2013
(r259378)
@@ -164,5 +164,69 @@
 #define AT91C_PIO_PC29   ((unsigned int) 1 << 29) // Pin Controlled by PC29
 #define AT91C_PIO_PC30   ((unsigned int) 1 << 30) // Pin Controlled by PC30
 #define AT91C_PIO_PC31   ((unsigned int) 1 << 31) // Pin Controlled by PC31
+#define AT91C_PIO_PD0((unsigned int) 1 <<  0) // Pin Controlled by PD0
+#define AT91C_PIO_PD1((unsigned int) 1 <<  1) // Pin Controlled by PD1
+#define AT91C_PIO_PD2((unsigned int) 1 <<  2) // Pin Controlled by PD2
+#define AT91C_PIO_PD3((unsigned int) 1 <<  3) // Pin Controlled by PD3
+#define AT91C_PIO_PD4((unsigned int) 1 <<  4) // Pin Controlled by PD4
+#define AT91C_PIO_PD5((unsigned int) 1 <<  5) // Pin Controlled by PD5
+#define AT91C_PIO_PD6((unsigned int) 1 <<  6) // Pin Controlled by PD6
+#define AT91C_PIO_PD7((unsigned int) 1 <<  7) // Pin Controlled by PD7
+#define AT91C_PIO_PD8((unsigned int) 1 <<  8) // Pin Controlled by PD8
+#define AT91C_PIO_PD9((unsigned int) 1 <<  9) // Pin Controlled by PD9
+#define AT91C_PIO_PD10   ((unsigned int) 1 << 10) // Pin Controlled by PD10
+#define AT91C_PIO_PD11   ((unsigned int) 1 << 11) // Pin Controlled by PD11
+#define AT91C_PIO_PD12   ((unsigned int) 1 << 12) // Pin Controlled by PD12
+#define AT91C_PIO_PD13   ((unsigned int) 1 << 13) // Pin Controlled by PD13
+#define AT91C_PIO_PD14   ((unsigned int) 1 << 14) // Pin Controlled by PD14
+#define AT91C_PIO_PD15   ((unsigned int) 1 << 15) // Pin Controlled by PD15
+#define AT91C_PIO_PD16   ((unsigned int) 1 << 16) // Pin Controlled by PD16
+#define AT91C_PIO_PD17   ((unsigned int) 1 << 17) // Pin Controlled by PD17
+#define AT91C_PIO_PD18   ((unsigned int) 1 << 18) // Pin Controlled by PD18
+#define AT91C_PIO_PD19   ((unsigned int) 1 << 19) // Pin Controlled by PD19
+#define AT91C_PIO_PD20   ((unsigned int) 1 << 20) // Pin Controlled by PD20
+#define AT91C_PIO_PD21   ((unsigned int) 1 << 21) // Pin Controlled by PD21
+#define AT91C_PIO_PD22   ((unsigned int) 1 << 22) // Pin Controlled by PD22
+#define AT91C_PIO_PD23   ((unsigned int) 1 << 23) // Pin Controlled by PD23
+#define AT91C_PIO_PD24   ((unsigned int) 1 << 24) // Pin Controlled by PD24
+#define AT91C_PIO_PD25   ((unsigned int) 1 << 25) // Pin Controlled by PD25
+#define AT91C_PIO_PD26   ((unsigned int) 1 << 26) // Pin Controlled by PD26
+#define AT91C_PIO_PD27   ((unsigned int) 1 << 27) // Pin Controlled by PD27
+#define AT91C_PIO_PD28   ((unsigned int) 1 << 28) // Pin Controlled by PD28
+#define AT91C_PIO_PD29   ((unsigned int) 1 << 29) // Pin Controlled by PD29
+#define AT91C_PIO_PD30   ((unsigned int) 1 << 30) // Pin Controlled by PD30
+#define AT91C_PIO_PD31   ((unsigned int) 1 << 31) // Pin Controlled by PD31
+#define AT91C_PIO_PE0((unsigned int) 1 <<  0) // Pin Controlled by PE0
+#define AT91C_PIO_PE1((unsigned int) 1 <<  1) // Pin Controlled by PE1
+#define AT91C_PIO_PE2((unsigned int) 1 <<  2) // Pin Controlled by PE2
+#define AT91C_PIO_PE3((unsigned int) 1 <<  3) // Pin Controlled by PE3
+#define AT91C_PIO_PE4((unsigned int) 1 <<  4) // Pin Controlled by PE4
+#define AT91C_PIO_PE5((unsigned int) 1 <<  5) // Pin Controlled by PE5
+#define AT91C_PIO_PE6((unsigned int) 1 <<  6) // Pin Controlled by PE6
+#define AT91C_PIO_PE7((unsigned int) 1 <<  7) // Pin Controlled by PE7
+#define AT91C_PIO_PE8((unsigned int) 1 <<  8) // Pin Controlled by PE8
+#define AT91C_PIO_PE9((unsigned int) 1 <<  9) // Pin Controlled by PE9
+#define AT91C_PIO_PE10   ((unsigned int) 1 << 10) // Pin Controlled by PE10
+#define AT91C_PIO_PE11   ((unsigned int) 1 << 11) // Pin Controlled by PE11
+#define AT91C_PIO_PE12   ((unsigned int) 1 << 12) // Pin Controlled by PE12
+#define AT91C_PIO_PE13   ((unsigned int) 1 << 13) // Pin Controlled by PE13
+#define AT91C_PIO_PE14   ((unsigned int) 1 << 14) // Pin Controlled by PE14
+#define AT91C_PIO_PE15   ((unsigned int) 1 << 15) // Pin Controlled by PE15
+#define AT91C_PIO_PE16   ((unsigned int) 1 << 16) // Pin Controlled by PE16
+#define AT91C_PIO_PE17   ((unsigned int) 1 << 17) // Pin Controlled by PE17
+#define AT91C_PIO_PE18   ((unsigned int) 1 << 18) // Pin Controlled by PE18
+#define AT91

svn commit: r259379 - in stable/10/sys: arm/at91 dev/nand

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 01:15:26 2013
New Revision: 259379
URL: http://svnweb.freebsd.org/changeset/base/259379

Log:
  MFC r258828:
  
Add a nand flash controller driver for Atmel at91 family.  Tested only
on at91rm9200 so far.

Added:
  stable/10/sys/dev/nand/nfc_at91.c
 - copied unchanged from r258828, head/sys/dev/nand/nfc_at91.c
Modified:
  stable/10/sys/arm/at91/files.at91
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/at91/files.at91
==
--- stable/10/sys/arm/at91/files.at91   Sat Dec 14 01:14:38 2013
(r259378)
+++ stable/10/sys/arm/at91/files.at91   Sat Dec 14 01:15:26 2013
(r259379)
@@ -5,7 +5,7 @@ arm/at91/at91_machdep.c standard
 arm/at91/at91.cstandard
 arm/at91/at91_cfata.c  optionalat91_cfata
 arm/at91/at91_mci.coptionalat91_mci
-arm/at91/at91_nand.c   optionalnand
+dev/nand/nfc_at91.coptionalnand
 arm/at91/at91_pio.cstandard
 arm/at91/at91_pmc.cstandard
 arm/at91/at91_pit.coptionalat91sam9

Copied: stable/10/sys/dev/nand/nfc_at91.c (from r258828, 
head/sys/dev/nand/nfc_at91.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/dev/nand/nfc_at91.c   Sat Dec 14 01:15:26 2013
(r259379, copy of r258828, head/sys/dev/nand/nfc_at91.c)
@@ -0,0 +1,258 @@
+/*-
+ * Copyright (C) 2013 Ian Lepore.
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * Atmel at91-family integrated NAND controller driver.
+ *
+ * This code relies on the board setup code (in at91/board_whatever.c) having
+ * set up the EBI and SMC registers appropriately for whatever type of nand 
part
+ * is on the board.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include "nfc_if.h"
+
+/*
+ * Data cycles are triggered by access to any address within the EBI CS3 region
+ * that has A21 and A22 clear.  Command cycles are any access with bit A21
+ * asserted. Address cycles are any access with bit A22 asserted.
+ *
+ * XXX The atmel docs say that any address bits can be used instead of A21 and
+ * A22; these values should be configurable.
+ */
+#defineAT91_NAND_DATA  0
+#defineAT91_NAND_COMMAND   (1 << 21)
+#defineAT91_NAND_ADDRESS   (1 << 22)
+
+struct at91_nand_softc {
+   struct nand_softc   nand_sc;
+   struct resource *res;
+};
+
+static int at91_nand_attach(device_t);
+static int at91_nand_probe(device_t);
+static uint8_t at91_nand_read_byte(device_t);
+static voidat91_nand_read_buf(device_t, void *, uint32_t);
+static int at91_nand_read_rnb(device_t);
+static int at91_nand_select_cs(device_t, uint8_t);
+static int at91_nand_send_command(device_t, uint8_t);
+static int at91_nand_send_address(device_t, uint8_t);
+static voidat91_nand_write_buf(device_t, void *, uint32_t);
+
+static inline u_int8_t
+dev_read_1(struct at91_nand_softc *sc, bus_size_t offset)
+{
+   return bus_read_1(sc->res, offset);
+}
+
+static inline void
+dev_write_1(struct at91_nand_softc *sc, bus_size_t offset, u_int8_t value)
+{
+   bus_write_1(sc->res, offset, value);
+}
+
+static int
+at91_nand_probe(device_t dev)
+{
+
+   device_set_desc(dev, "AT91 Integrated NAND controller");
+   return (BUS_PROBE_DEFAULT);
+}
+

svn commit: r259380 - stable/10/sys/arm/at91

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 01:34:24 2013
New Revision: 259380
URL: http://svnweb.freebsd.org/changeset/base/259380

Log:
  MFC r259038, r259039:
  
Bump the maximum VM space from 3 * memory size to a fixed
256MB. That's all we have room for since we map the hardware registers
starting at 0xd000. This allows my 64MB AT91SAM9G20 to boot again
after the unmmaped I/O changes were MFC'd at r251897. Other
subplatforms may need similar treatment.
  
Although not strictly required to boot a 64MB board, bump
vm_max_virtual_address to be KERNVIRTADDR + 256MB. This allows some
future shock protection since the KVA requirements have gone up since
the unmapped changes have gone in, as well as preventing us from
overlapping with the hardware devices, which we map at 0xd000,
which we'd hit with anything more than 85MB...

Modified:
  stable/10/sys/arm/at91/at91_machdep.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/at91/at91_machdep.c
==
--- stable/10/sys/arm/at91/at91_machdep.c   Sat Dec 14 01:15:26 2013
(r259379)
+++ stable/10/sys/arm/at91/at91_machdep.c   Sat Dec 14 01:34:24 2013
(r259380)
@@ -633,7 +633,8 @@ initarm(struct arm_boot_params *abp)
 
pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1);
arm_dump_avail_init(memsize, sizeof(dump_avail)/sizeof(dump_avail[0]));
-   vm_max_kernel_address = KERNVIRTADDR + 3 * memsize;
+   /* Always use the 256MB of KVA we have available between the kernel and 
devices */
+   vm_max_kernel_address = KERNVIRTADDR + (256 << 20);
pmap_bootstrap(freemempos, &kernel_l1pt);
msgbufp = (void*)msgbufpv.pv_va;
msgbufinit(msgbufp, msgbufsize);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259381 - stable/10/sys/arm/at91

2013-12-13 Thread Ian Lepore
Author: ian
Date: Sat Dec 14 01:35:57 2013
New Revision: 259381
URL: http://svnweb.freebsd.org/changeset/base/259381

Log:
  MFC r259212, r259220:
  
Fix one race and one fence post error. When the TX buffer was
completely full, we'd not complete any of the mbufs due to the fence
post error (this creates a large leak). When this is fixed, we still
leak, but at a much smaller rate due to a race between ateintr and
atestart_locked as well as an asymmetry where atestart_locked is
called from elsewhere.  Ensure that we free in-flight packets that
have completed there as well. Also remove needless check for NULL on
mb, checked earlier in the loop and simplify a redundant if.

Modified:
  stable/10/sys/arm/at91/if_ate.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/at91/if_ate.c
==
--- stable/10/sys/arm/at91/if_ate.c Sat Dec 14 01:34:24 2013
(r259380)
+++ stable/10/sys/arm/at91/if_ate.c Sat Dec 14 01:35:57 2013
(r259381)
@@ -947,10 +947,8 @@ ate_intr(void *xsc)
 
} while (!done);
 
-   if (mb != NULL) {
-   ifp->if_ipackets++;
-   (*ifp->if_input)(ifp, mb);
-   }
+   ifp->if_ipackets++;
+   (*ifp->if_input)(ifp, mb);
}
}
 
@@ -974,16 +972,14 @@ ate_intr(void *xsc)
sc->tx_descs[sc->txtail + 1].status |= 
ETHB_TX_USED;
}
 
-   while (sc->txtail != sc->txhead &&
-   sc->tx_descs[sc->txtail].status & ETHB_TX_USED ) {
-
+   while ((sc->tx_descs[sc->txtail].status & ETHB_TX_USED) &&
+   sc->sent_mbuf[sc->txtail] != NULL) {
bus_dmamap_sync(sc->mtag, sc->tx_map[sc->txtail],
BUS_DMASYNC_POSTWRITE);
bus_dmamap_unload(sc->mtag, sc->tx_map[sc->txtail]);
m_freem(sc->sent_mbuf[sc->txtail]);
sc->tx_descs[sc->txtail].addr = 0;
sc->sent_mbuf[sc->txtail] = NULL;
-
ifp->if_opackets++;
sc->txtail = NEXT_TX_IDX(sc, sc->txtail);
}
@@ -1118,12 +1114,10 @@ atestart_locked(struct ifnet *ifp)
 * xmit packets.  We use OACTIVE to indicate "we can stuff more
 * into our buffers (clear) or not (set)."
 */
-   if (!sc->is_emacb) {
-   /* RM9200 has only two hardware entries */
-   if (!sc->is_emacb && (RD4(sc, ETH_TSR) & ETH_TSR_BNQ) 
== 0) {
-   ifp->if_drv_flags |= IFF_DRV_OACTIVE;
-   return;
-   }
+   /* RM9200 has only two hardware entries */
+   if (!sc->is_emacb && (RD4(sc, ETH_TSR) & ETH_TSR_BNQ) == 0) {
+   ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+   return;
}
 
IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
@@ -1146,6 +1140,21 @@ atestart_locked(struct ifnet *ifp)
m_freem(m);
continue;
}
+
+   /*
+* There's a small race between the loop in ate_intr finishing
+* and the check above to see if the packet was finished, as 
well
+* as when atestart gets called via other paths. Lose the race
+* gracefully and free the mbuf...
+*/
+   if (sc->sent_mbuf[sc->txhead] != NULL) {
+   bus_dmamap_sync(sc->mtag, sc->tx_map[sc->txtail],
+   BUS_DMASYNC_POSTWRITE);
+   bus_dmamap_unload(sc->mtag, sc->tx_map[sc->txtail]);
+   m_free(sc->sent_mbuf[sc->txhead]);
+   ifp->if_opackets++;
+   }
+   
sc->sent_mbuf[sc->txhead] = m;
 
bus_dmamap_sync(sc->mtag, sc->tx_map[sc->txhead],
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259382 - in head/sys/dev/cxgbe: . common tom

2013-12-13 Thread Navdeep Parhar
Author: np
Date: Sat Dec 14 03:08:03 2013
New Revision: 259382
URL: http://svnweb.freebsd.org/changeset/base/259382

Log:
  Read card capabilities after firmware initialization, instead of setting
  them up as part of firmware initialization (which the driver gets to do
  only if it's the master driver).
  
  Read the range of tids available for the ETHOFLD functionality if it's
  enabled.
  
  New is_ftid() and is_etid() functions to test whether a tid falls within
  the range of filter tids or ETHOFLD tids respectively.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/cxgbe/common/common.h
  head/sys/dev/cxgbe/offload.h
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_sge.c
  head/sys/dev/cxgbe/tom/t4_cpl_io.c

Modified: head/sys/dev/cxgbe/common/common.h
==
--- head/sys/dev/cxgbe/common/common.h  Sat Dec 14 01:35:57 2013
(r259381)
+++ head/sys/dev/cxgbe/common/common.h  Sat Dec 14 03:08:03 2013
(r259382)
@@ -267,8 +267,10 @@ struct adapter_params {
unsigned short a_wnd[NCCTRL_WIN];
unsigned short b_wnd[NCCTRL_WIN];
 
-   unsigned int mc_size;   /* MC memory size */
-   unsigned int nfilters;  /* size of filter region */
+   u_int ftid_min;
+   u_int ftid_max;
+   u_int etid_min;
+   u_int netids;
 
unsigned int cim_la_size;
 
@@ -280,8 +282,10 @@ struct adapter_params {
unsigned int offload:1; /* hw is TOE capable, fw has divvied up card
   resources for TOE operation. */
unsigned int bypass:1;  /* this is a bypass card */
+   unsigned int ethoffload:1;
 
unsigned int ofldq_wr_cred;
+   unsigned int eo_wr_cred;
 };
 
 #define CHELSIO_T4 0x4
@@ -318,11 +322,28 @@ struct link_config {
 #define for_each_port(adapter, iter) \
for (iter = 0; iter < (adapter)->params.nports; ++iter)
 
+static inline int is_ftid(const struct adapter *sc, u_int tid)
+{
+
+   return (tid >= sc->params.ftid_min && tid <= sc->params.ftid_max);
+}
+
+static inline int is_etid(const struct adapter *sc, u_int tid)
+{
+
+   return (tid >= sc->params.etid_min);
+}
+
 static inline int is_offload(const struct adapter *adap)
 {
return adap->params.offload;
 }
 
+static inline int is_ethoffload(const struct adapter *adap)
+{
+   return adap->params.ethoffload;
+}
+
 static inline int chip_id(struct adapter *adap)
 {
return adap->params.chipid;

Modified: head/sys/dev/cxgbe/offload.h
==
--- head/sys/dev/cxgbe/offload.hSat Dec 14 01:35:57 2013
(r259381)
+++ head/sys/dev/cxgbe/offload.hSat Dec 14 03:08:03 2013
(r259382)
@@ -101,6 +101,11 @@ struct tid_info {
u_int nftids;
u_int ftid_base;
u_int ftids_in_use;
+
+   struct mtx etid_lock __aligned(CACHE_LINE_SIZE);
+   struct etid_entry *etid_tab;
+   u_int netids;
+   u_int etid_base;
 };
 
 struct t4_range {

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cSat Dec 14 01:35:57 2013
(r259381)
+++ head/sys/dev/cxgbe/t4_main.cSat Dec 14 03:08:03 2013
(r259382)
@@ -2359,7 +2359,6 @@ use_config_on_flash:
 
 #define LIMIT_CAPS(x) do { \
caps.x &= htobe16(t4_##x##_allowed); \
-   sc->x = htobe16(caps.x); \
 } while (0)
 
/*
@@ -2461,6 +2460,8 @@ get_params__post_init(struct adapter *sc
sc->sge.eq_start = val[1];
sc->tids.ftid_base = val[2];
sc->tids.nftids = val[3] - val[2] + 1;
+   sc->params.ftid_min = val[2];
+   sc->params.ftid_max = val[3];
sc->vres.l2t.start = val[4];
sc->vres.l2t.size = val[5] - val[4] + 1;
KASSERT(sc->vres.l2t.size <= L2T_SIZE,
@@ -2479,7 +2480,35 @@ get_params__post_init(struct adapter *sc
return (rc);
}
 
-   if (caps.toecaps) {
+#define READ_CAPS(x) do { \
+   sc->x = htobe16(caps.x); \
+} while (0)
+   READ_CAPS(linkcaps);
+   READ_CAPS(niccaps);
+   READ_CAPS(toecaps);
+   READ_CAPS(rdmacaps);
+   READ_CAPS(iscsicaps);
+   READ_CAPS(fcoecaps);
+
+   if (sc->niccaps & FW_CAPS_CONFIG_NIC_ETHOFLD) {
+   param[0] = FW_PARAM_PFVF(ETHOFLD_START);
+   param[1] = FW_PARAM_PFVF(ETHOFLD_END);
+   param[2] = FW_PARAM_DEV(FLOWC_BUFFIFO_SZ);
+   rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 3, param, val);
+   if (rc != 0) {
+   device_printf(sc->dev,
+   "failed to query NIC parameters: %d.\n", rc);
+   return (rc);
+   }
+   sc->tids.etid_base = val[0];
+   sc->params.etid_min = val[0];
+   sc->tids.netids = val[1] - val[0] + 1;

svn commit: r259383 - stable/10/sys/geom/eli

2013-12-13 Thread Andrey V. Elsukov
Author: ae
Date: Sat Dec 14 04:16:27 2013
New Revision: 259383
URL: http://svnweb.freebsd.org/changeset/base/259383

Log:
  MFC r257965:
Add missing line breaks.
  
PR: 181900

Modified:
  stable/10/sys/geom/eli/g_eli.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/geom/eli/g_eli.c
==
--- stable/10/sys/geom/eli/g_eli.c  Sat Dec 14 03:08:03 2013
(r259382)
+++ stable/10/sys/geom/eli/g_eli.c  Sat Dec 14 04:16:27 2013
(r259383)
@@ -1170,9 +1170,9 @@ g_eli_dumpconf(struct sbuf *sb, const ch
if (pp != NULL || cp != NULL)
return; /* Nothing here. */
 
-   sbuf_printf(sb, "%s%ju", indent,
+   sbuf_printf(sb, "%s%ju\n", indent,
(uintmax_t)sc->sc_ekeys_total);
-   sbuf_printf(sb, "%s%ju", indent,
+   sbuf_printf(sb, "%s%ju\n", indent,
(uintmax_t)sc->sc_ekeys_allocated);
sbuf_printf(sb, "%s", indent);
if (sc->sc_flags == 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259384 - stable/9/sys/geom/eli

2013-12-13 Thread Andrey V. Elsukov
Author: ae
Date: Sat Dec 14 04:16:47 2013
New Revision: 259384
URL: http://svnweb.freebsd.org/changeset/base/259384

Log:
  MFC r257965:
Add missing line breaks.
  
PR: 181900

Modified:
  stable/9/sys/geom/eli/g_eli.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/geom/eli/g_eli.c
==
--- stable/9/sys/geom/eli/g_eli.c   Sat Dec 14 04:16:27 2013
(r259383)
+++ stable/9/sys/geom/eli/g_eli.c   Sat Dec 14 04:16:47 2013
(r259384)
@@ -1163,9 +1163,9 @@ g_eli_dumpconf(struct sbuf *sb, const ch
if (pp != NULL || cp != NULL)
return; /* Nothing here. */
 
-   sbuf_printf(sb, "%s%ju", indent,
+   sbuf_printf(sb, "%s%ju\n", indent,
(uintmax_t)sc->sc_ekeys_total);
-   sbuf_printf(sb, "%s%ju", indent,
+   sbuf_printf(sb, "%s%ju\n", indent,
(uintmax_t)sc->sc_ekeys_allocated);
sbuf_printf(sb, "%s", indent);
if (sc->sc_flags == 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259385 - stable/10/sys/netipsec

2013-12-13 Thread Andrey V. Elsukov
Author: ae
Date: Sat Dec 14 04:24:32 2013
New Revision: 259385
URL: http://svnweb.freebsd.org/changeset/base/259385

Log:
  MFC r257987:
Initialize prot variable.
  
PR: 177417

Modified:
  stable/10/sys/netipsec/ipsec_input.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netipsec/ipsec_input.c
==
--- stable/10/sys/netipsec/ipsec_input.cSat Dec 14 04:16:47 2013
(r259384)
+++ stable/10/sys/netipsec/ipsec_input.cSat Dec 14 04:24:32 2013
(r259385)
@@ -602,6 +602,7 @@ ipsec6_common_input_cb(struct mbuf *m, s
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
 
/* Save protocol */
+   prot = 0;
m_copydata(m, protoff, 1, (unsigned char *) &prot);
 
 #ifdef notyet
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259386 - stable/8/sys/netipsec

2013-12-13 Thread Andrey V. Elsukov
Author: ae
Date: Sat Dec 14 04:24:50 2013
New Revision: 259386
URL: http://svnweb.freebsd.org/changeset/base/259386

Log:
  MFC r257987:
Initialize prot variable.
  
PR: 177417

Modified:
  stable/8/sys/netipsec/ipsec_input.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netipsec/   (props changed)

Modified: stable/8/sys/netipsec/ipsec_input.c
==
--- stable/8/sys/netipsec/ipsec_input.c Sat Dec 14 04:24:32 2013
(r259385)
+++ stable/8/sys/netipsec/ipsec_input.c Sat Dec 14 04:24:50 2013
(r259386)
@@ -615,6 +615,7 @@ ipsec6_common_input_cb(struct mbuf *m, s
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
 
/* Save protocol */
+   prot = 0;
m_copydata(m, protoff, 1, (unsigned char *) &prot);
 
 #ifdef notyet
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r259387 - stable/9/sys/netipsec

2013-12-13 Thread Andrey V. Elsukov
Author: ae
Date: Sat Dec 14 04:27:28 2013
New Revision: 259387
URL: http://svnweb.freebsd.org/changeset/base/259387

Log:
  MFC r257987:
Initialize prot variable.
  
PR: 177417

Modified:
  stable/9/sys/netipsec/ipsec_input.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netipsec/ipsec_input.c
==
--- stable/9/sys/netipsec/ipsec_input.c Sat Dec 14 04:24:50 2013
(r259386)
+++ stable/9/sys/netipsec/ipsec_input.c Sat Dec 14 04:27:28 2013
(r259387)
@@ -602,6 +602,7 @@ ipsec6_common_input_cb(struct mbuf *m, s
ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
 
/* Save protocol */
+   prot = 0;
m_copydata(m, protoff, 1, (unsigned char *) &prot);
 
 #ifdef notyet
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"