svn commit: r253541 - head/contrib/openbsm/m4

2013-07-22 Thread Colin Percival
Author: cperciva
Date: Mon Jul 22 08:46:15 2013
New Revision: 253541
URL: http://svnweb.freebsd.org/changeset/base/253541

Log:
  Remove weirdly-named autofoo file.  This is not needed for the (FreeBSD)
  build, and freebsd-update chokes on it.
  
  9.2-RELEASE candidate.
  
  Approved by:  rwatson
  MFC after:3 days

Deleted:
  head/contrib/openbsm/m4/lt~obsolete.m4
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253542 - head/release

2013-07-22 Thread Glen Barber
Author: gjb
Date: Mon Jul 22 12:07:57 2013
New Revision: 253542
URL: http://svnweb.freebsd.org/changeset/base/253542

Log:
  For consistency with previous releases, name the cdrom install
  cd 'disc1.iso'.
  
  Discussed with:   re@ team
  Approved by:  kib (mentor)
  MFC after:3 days
  X-MFC-To: stable/9 only

Modified:
  head/release/Makefile

Modified: head/release/Makefile
==
--- head/release/Makefile   Mon Jul 22 08:46:15 2013(r253541)
+++ head/release/Makefile   Mon Jul 22 12:07:57 2013(r253542)
@@ -3,7 +3,7 @@
 # Makefile for building releases and release media.
 # 
 # User-driven targets:
-#  cdrom: Builds release CD-ROM media (release.iso)
+#  cdrom: Builds release CD-ROM media (disc1.iso)
 #  memstick: Builds memory stick image (memstick.img)
 #  ftp: Sets up FTP distribution area (ftp)
 #  release: Build all media and FTP distribution area
@@ -70,7 +70,7 @@ RELEASE_TARGETS= ftp
 IMAGES=
 .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
 RELEASE_TARGETS+= cdrom
-IMAGES+=   release.iso bootonly.iso
+IMAGES+=   disc1.iso bootonly.iso
 .endif
 .if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
 RELEASE_TARGETS+= memstick.img
@@ -161,7 +161,8 @@ bootonly: packagesystem
echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf
cp ${.CURDIR}/rc.local bootonly/etc
 
-release.iso: system
+release.iso: disc1.iso
+disc1.iso: system
sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} 
release
 
 bootonly.iso: bootonly
@@ -175,7 +176,7 @@ packagesystem: base.txz kernel.txz ${EXT
sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
touch ${.TARGET}
 
-cdrom: release.iso bootonly.iso
+cdrom: disc1.iso bootonly.iso
 ftp: packagesystem
rm -rf ftp
mkdir -p ftp
@@ -192,7 +193,7 @@ clean:
rm -f *.txz MANIFEST
rm -f system
rm -rf release bootonly
-   rm -f release.iso bootonly.iso memstick.img
+   rm -f disc1.iso bootonly.iso memstick.img
 
 install:
 .if defined(DESTDIR) && !empty(DESTDIR)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253543 - head/usr.sbin/bsdinstall/scripts

2013-07-22 Thread Gavin Atkinson
Author: gavin
Date: Mon Jul 22 12:56:50 2013
New Revision: 253543
URL: http://svnweb.freebsd.org/changeset/base/253543

Log:
  Update mirror list to more closely match
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html
  
  MFC after:1 week

Modified:
  head/usr.sbin/bsdinstall/scripts/mirrorselect

Modified: head/usr.sbin/bsdinstall/scripts/mirrorselect
==
--- head/usr.sbin/bsdinstall/scripts/mirrorselect   Mon Jul 22 12:07:57 
2013(r253542)
+++ head/usr.sbin/bsdinstall/scripts/mirrorselect   Mon Jul 22 12:56:50 
2013(r253543)
@@ -41,7 +41,6 @@ MIRROR=`dialog --backtitle "FreeBSD Inst
ftp://ftp.freebsd.org   "Main Site"\
ftp://ftp.freebsd.org   "IPv6 Main Site"\
ftp://ftp3.ie.freebsd.org   "IPv6 Ireland"\
-   ftp://ftp.il.freebsd.org"IPv6 Israel"\
ftp://ftp2.jp.freebsd.org   "IPv6 Japan"\
ftp://ftp4.se.freebsd.org   "IPv6 Sweden"\
ftp://ftp4.us.freebsd.org   "IPv6 USA"\
@@ -53,45 +52,34 @@ MIRROR=`dialog --backtitle "FreeBSD Inst
ftp://ftp5.freebsd.org  "Primary #5"\
ftp://ftp6.freebsd.org  "Primary #6"\
ftp://ftp7.freebsd.org  "Primary #7"\
-   ftp://ftp8.freebsd.org  "Primary #8"\
-   ftp://ftp9.freebsd.org  "Primary #9"\
ftp://ftp10.freebsd.org "Primary #10"\
ftp://ftp11.freebsd.org "Primary #11"\
ftp://ftp12.freebsd.org "Primary #12"\
ftp://ftp13.freebsd.org "Primary #13"\
ftp://ftp14.freebsd.org "Primary #14"\
-   ftp://ftp.ar.freebsd.org"Argentina"\
+   ftp://ftp1.am.freebsd.org   "Armenia"\
ftp://ftp.au.freebsd.org"Australia"\
ftp://ftp2.au.freebsd.org   "Australia #2"\
ftp://ftp3.au.freebsd.org   "Australia #3"\
ftp://ftp.at.freebsd.org"Austria"\
-   ftp://ftp2.at.freebsd.org   "Austria #2"\
-   ftp://ftp.br.freebsd.org"Brazil"\
ftp://ftp2.br.freebsd.org   "Brazil #2"\
ftp://ftp3.br.freebsd.org   "Brazil #3"\
ftp://ftp4.br.freebsd.org   "Brazil #4"\
-   ftp://ftp5.br.freebsd.org   "Brazil #5"\
-   ftp://ftp6.br.freebsd.org   "Brazil #6"\
-   ftp://ftp7.br.freebsd.org   "Brazil #7"\
ftp://ftp.ca.freebsd.org"Canada"\
ftp://ftp.cn.freebsd.org"China"\
-   ftp://ftp2.cn.freebsd.org   "China #2"\
-   ftp://ftp.hr.freebsd.org"Croatia"\
ftp://ftp.cz.freebsd.org"Czech Republic"\
ftp://ftp.dk.freebsd.org"Denmark"\
-   ftp://ftp2.dk.freebsd.org   "Denmark #2"\
ftp://ftp.ee.freebsd.org"Estonia"\
ftp://ftp.fi.freebsd.org"Finland"\
ftp://ftp.fr.freebsd.org"France"\
-   ftp://ftp2.fr.freebsd.org   "IPv6 France #2"\
ftp://ftp3.fr.freebsd.org   "France #3"\
ftp://ftp4.fr.freebsd.org   "IPv6 France #4"\
ftp://ftp5.fr.freebsd.org   "France #5"\
ftp://ftp6.fr.freebsd.org   "France #6"\
+   ftp://ftp7.fr.freebsd.org   "France #7"\
ftp://ftp8.fr.freebsd.org   "IPv6 France #8"\
ftp://ftp.de.freebsd.org"Germany"\
ftp://ftp2.de.freebsd.org   "Germany #2"\
-   ftp://ftp3.de.freebsd.org   "Germany #3"\
ftp://ftp4.de.freebsd.org   "Germany #4"\
ftp://ftp5.de.freebsd.org   "Germany #5"\
ftp://ftp6.de.freebsd.org   "Germany #6"\
@@ -99,10 +87,7 @@ MIRROR=`dialog --backtitle "FreeBSD Inst
ftp://ftp8.de.freebsd.org   "Germany #8"\
ftp://ftp.gr.freebsd.org"Greece"\
ftp://ftp2.gr.freebsd.org   "Greece #2"\
-   ftp://ftp.hu.freebsd.org"Hungary"\
ftp://ftp.is.freebsd.org"Iceland"\
-   ftp://ftp.ie.freebsd.org"Ireland"\
-   ftp://ftp2.ie.freebsd.org   "Ireland #2"\
ftp://ftp3.ie.freebsd.org   "Ireland #3"\
ftp://ftp.il.freebsd.org"Israel"\
ftp://ftp.it.freebsd.org"Italy"\
@@ -117,32 +102,26 @@ MIRROR=`dialog --backtitle "FreeBSD Inst
ftp://ftp9.jp.freebsd.org   "Japan #9"\
ftp://ftp.kr.freebsd.org"Korea"\
ftp://ftp2.kr.freebsd.org   "Korea #2"\
+   ftp://ftp.lv.freebsd.org"Latvia"\
ftp://ftp.lt.freebsd.org"Lithuania"\
ftp://ftp.nl.freebsd.org"Netherlands"\
ftp://ftp2.nl.freebsd.org   "Netherlands #2"\
+   ftp://ftp.nz.freebsd.org"New Zealand"\
ftp://ftp.no.freebsd.org"Norway"\
-   ftp://ftp3.no.freebsd.org   "Norway #3"\
ftp://ftp.pl.freebsd.org"Poland"\
ftp://ftp2.pl.freebsd.org   "Poland #2"\
-   ftp://ftp5.pl.freebsd.org   "Poland #5"\
-   ftp://ftp.pt.freebsd.org"Portugal"\
- 

svn commit: r253544 - in head/sys: dev/usb/gadget modules/usb modules/usb/g_audio modules/usb/g_keyboard modules/usb/g_modem modules/usb/g_mouse

2013-07-22 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Jul 22 13:39:33 2013
New Revision: 253544
URL: http://svnweb.freebsd.org/changeset/base/253544

Log:
  Add some USB gadget example drivers for USB audio, USB keyboard,
  USB mouse and USB modem classes. Hopefully someone will find
  these examples useful when implementing USB device side drivers
  using the FreeBSD USB stack.

Added:
  head/sys/dev/usb/gadget/
  head/sys/dev/usb/gadget/g_audio.c   (contents, props changed)
  head/sys/dev/usb/gadget/g_audio.h   (contents, props changed)
  head/sys/dev/usb/gadget/g_keyboard.c   (contents, props changed)
  head/sys/dev/usb/gadget/g_keyboard.h   (contents, props changed)
  head/sys/dev/usb/gadget/g_modem.c   (contents, props changed)
  head/sys/dev/usb/gadget/g_modem.h   (contents, props changed)
  head/sys/dev/usb/gadget/g_mouse.c   (contents, props changed)
  head/sys/dev/usb/gadget/g_mouse.h   (contents, props changed)
  head/sys/modules/usb/g_audio/
  head/sys/modules/usb/g_audio/Makefile   (contents, props changed)
  head/sys/modules/usb/g_keyboard/
  head/sys/modules/usb/g_keyboard/Makefile   (contents, props changed)
  head/sys/modules/usb/g_modem/
  head/sys/modules/usb/g_modem/Makefile   (contents, props changed)
  head/sys/modules/usb/g_mouse/
  head/sys/modules/usb/g_mouse/Makefile   (contents, props changed)
Modified:
  head/sys/modules/usb/Makefile

Added: head/sys/dev/usb/gadget/g_audio.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/usb/gadget/g_audio.c   Mon Jul 22 13:39:33 2013
(r253544)
@@ -0,0 +1,613 @@
+/* $FreeBSD$ */
+/*-
+ * Copyright (c) 2010 Hans Petter Selasky. 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.
+ */
+
+/*
+ * USB audio specs: http://www.usb.org/developers/devclass_docs/audio10.pdf
+ * http://www.usb.org/developers/devclass_docs/frmts10.pdf
+ * http://www.usb.org/developers/devclass_docs/termt10.pdf
+ */
+
+#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 "usb_if.h"
+
+#defineUSB_DEBUG_VAR g_audio_debug
+#include 
+
+#include 
+
+enum {
+   G_AUDIO_ISOC0_RD,
+   G_AUDIO_ISOC1_RD,
+   G_AUDIO_ISOC0_WR,
+   G_AUDIO_ISOC1_WR,
+   G_AUDIO_N_TRANSFER,
+};
+
+struct g_audio_softc {
+   struct mtx sc_mtx;
+   struct usb_callout sc_callout;
+   struct usb_callout sc_watchdog;
+   struct usb_xfer *sc_xfer[G_AUDIO_N_TRANSFER];
+
+   int sc_mode;
+   int sc_pattern_len;
+   int sc_throughput;
+   int sc_tx_interval;
+   int sc_state;
+   int sc_noise_rem;
+
+   int8_t  sc_pattern[G_AUDIO_MAX_STRLEN];
+
+   uint16_t sc_data_len[2][G_AUDIO_FRAMES];
+
+   int16_t sc_data_buf[2][G_AUDIO_BUFSIZE / 2];
+
+   uint8_t sc_volume_setting[32];
+   uint8_t sc_volume_limit[32];
+   uint8_t sc_sample_rate[32];
+};
+
+static SYSCTL_NODE(_hw_usb, OID_AUTO, g_audio, CTLFLAG_RW, 0, "USB audio 
gadget");
+
+#ifdef USB_DEBUG
+static int g_audio_debug = 0;
+
+SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, debug, CTLFLAG_RW,
+&g_audio_debug, 0, "Debug level");
+#endif
+
+static int g_audio_mode = 0;
+
+SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, mode, CTLFLAG_RW,
+&g_audio_mode, 0, "Mode selection");
+
+static int g_audio_pattern_interval = 1000;
+
+SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, pattern_interval, CTLFLAG_RW,
+&g_audio_pattern_interval, 0, "Pattern interval in milliseconds");

svn commit: r253545 - in head/usr.sbin/bsdconfig: include share/media

2013-07-22 Thread Devin Teske
Author: dteske
Date: Mon Jul 22 13:56:35 2013
New Revision: 253545
URL: http://svnweb.freebsd.org/changeset/base/253545

Log:
  Sync-up with bsdinstall(8) FTP mirrorselect changes.
  
  SVN r224656:
  Add back ftp4, a new machine has taken its place. ftp2 and ftp8 are both
  IPv6 capable mirrors.  cvsup4/ftp4 have already been added to the handbook.
  
  NOTE: Except put IPv6 entries in IPv6 section at the top of the list
  
  SVN r225467:
  Add ftp4.se.freebsd.org to the IPv4 and IPv6 mirror lists.
  
  SVN r235228:
  Add the IPv6 tag to ftp4.fr.freebsd.org.
  
  NOTE: Except dup entry into IPv6 section.
  
  SVN r243832:
  - Remove snapshots.se.freebsd.org [1]
  - Add ftp6.se.freebsd.org
  
  SVN r243854:
  Remove snapshots.jp.freebsd.org. It stopped working years ago.
  
  SVN r253543:
  Update mirror list to more closely match
  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html
  
  MFC after:1 week

Modified:
  head/usr.sbin/bsdconfig/include/messages.subr
  head/usr.sbin/bsdconfig/share/media/ftp.subr

Modified: head/usr.sbin/bsdconfig/include/messages.subr
==
--- head/usr.sbin/bsdconfig/include/messages.subr   Mon Jul 22 13:39:33 
2013(r253544)
+++ head/usr.sbin/bsdconfig/include/messages.subr   Mon Jul 22 13:56:35 
2013(r253545)
@@ -42,7 +42,7 @@ msg_all_desc="All available packages in 
 msg_always_try_sudo_when_run_as="Always try sudo(8) when run as %s"
 msg_arabic_desc="Ported software for Arab countries."
 msg_archivers_desc="Utilities for archiving and unarchiving data."
-msg_argentina="Argentina"
+msg_armenia="Armenia"
 msg_assume_network_is_already_configured="Running multi-user, assume that the 
network is already configured?"
 msg_assume_yes_to_all_non_critical_dialogs="Assume \"Yes\" answers to all 
non-critical dialogs"
 msg_astro_desc="Applications related to astronomy."
@@ -92,7 +92,6 @@ msg_couldnt_connect_to_proxy="Couldn't c
 msg_couldnt_connect_to_server="Couldn't connect to server"
 msg_couldnt_open_ftp_connection="Couldn't open FTP connection to %s:\n  %s."
 msg_created_path="Created %s"
-msg_croatia="Croatia"
 msg_czech_republic="Czech Republic"
 msg_databases_desc="Database software."
 msg_debugging="Debugging"
@@ -154,7 +153,6 @@ msg_hostname_variable_not_set="WARNING: 
 msg_http_direct="HTTP Direct"
 msg_http_proxy="HTTP Proxy"
 msg_hungarian_desc="Ported software for the Hungarian market."
-msg_hungary="Hungary"
 msg_iceland="Iceland"
 msg_install_from_a_dos_partition="Install from a DOS partition"
 msg_install_from_a_floppy_disk_set="Install from a floppy disk set"
@@ -195,6 +193,7 @@ msg_kld_desc="Kernel loadable modules."
 msg_korea="Korea"
 msg_korean_desc="Ported software for the Korean market."
 msg_lang_desc="Computer languages."
+msg_latvia="Latvia"
 msg_length_of_specified_url_is_too_long="Length of specified URL is %u 
characters. Allowable maximum is %u."
 msg_linux_desc="Linux programs that can run under binary compatibility."
 msg_lisp_desc="Software related to the Lisp language."
@@ -226,6 +225,7 @@ msg_netherlands="Netherlands"
 msg_netmask="Netmask"
 msg_network_configuration="Network Configuration"
 msg_network_interface_information_required="Network interface information 
required"
+msg_new_zealand="New Zealand"
 msg_news_desc="USENET News support software."
 msg_next_page="Next page"
 msg_nfailed_attempts="%u incorrect password attempts"
@@ -298,7 +298,6 @@ msg_please_specify_url_of_freebsd_http_d
 msg_poland="Poland"
 msg_polish_desc="Ported software for the Polish market."
 msg_ports_mgmt_desc="Utilities for managing ports and packages."
-msg_portugal="Portugal"
 msg_portuguese_desc="Ported software for the Portuguese market."
 msg_previous_page="Previous page"
 msg_previous_syntax_errors="%s: Not overwriting \`%s' due to previous syntax 
errors"
@@ -323,7 +322,6 @@ msg_review="Review"
 msg_review_desc="Review/perform pending actions"
 msg_review_help="Install, Re-Install, or Un-install selected packages and 
dependencies"
 msg_reviewing_selected_packages="Reviewing %u selected packages:"
-msg_romania="Romania"
 msg_ruby_desc="Software related to the Ruby language."
 msg_rubygems_desc="Ports of RubyGems packages."
 msg_russia="Russia"
@@ -340,11 +338,8 @@ msg_select_a_site_thats_close="Select a 
 msg_selected="selected"
 msg_server_error_when_requesting_url="Server error when requesting %s, you 
could try an other server"
 msg_shells_desc="Various shells (tcsh, bash, etc)."
-msg_singapore="Singapore"
 msg_slovak_republic="Slovak Republic"
 msg_slovenia="Slovenia"
-msg_snapshots_server_japan="Snapshots Server Japan"
-msg_snapshots_server_sweden="Snapshots Server Sweden"
 msg_sorry_invalid_url="Sorry, %s is an invalid URL!"
 msg_sorry_package_was_not_found_in_the_index="Sorry, package %s was not found 
in the INDEX."
 msg_sorry_try_again="Sorry, try again."

Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr
==

Re: svn commit: r253546 - head/share/mk

2013-07-22 Thread Hans Petter Selasky

On 07/22/13 16:23, Gleb Smirnoff wrote:

Author: glebius
Date: Mon Jul 22 14:23:46 2013
New Revision: 253546
URL: http://svnweb.freebsd.org/changeset/base/253546

Log:
   Fix build.

Modified:
   head/share/mk/bsd.own.mk

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkMon Jul 22 13:56:35 2013(r253545)
+++ head/share/mk/bsd.own.mkMon Jul 22 14:23:46 2013(r253546)
@@ -385,7 +385,8 @@ __DEFAULT_NO_OPTIONS = \
  OFED \
  OPENSSH_NONE_CIPHER \
  SHARED_TOOLCHAIN \
-SVN
+SVN \
+USB_GADGET_EXAMPLES

  #
  # Default behaviour of some options depends on the architecture.  
Unfortunately




Thanks!

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


svn commit: r253546 - head/share/mk

2013-07-22 Thread Gleb Smirnoff
Author: glebius
Date: Mon Jul 22 14:23:46 2013
New Revision: 253546
URL: http://svnweb.freebsd.org/changeset/base/253546

Log:
  Fix build.

Modified:
  head/share/mk/bsd.own.mk

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkMon Jul 22 13:56:35 2013(r253545)
+++ head/share/mk/bsd.own.mkMon Jul 22 14:23:46 2013(r253546)
@@ -385,7 +385,8 @@ __DEFAULT_NO_OPTIONS = \
 OFED \
 OPENSSH_NONE_CIPHER \
 SHARED_TOOLCHAIN \
-SVN
+SVN \
+USB_GADGET_EXAMPLES
 
 #
 # Default behaviour of some options depends on the architecture.  Unfortunately
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253548 - head/lib/libc/sys

2013-07-22 Thread Ed Maste
Author: emaste
Date: Mon Jul 22 18:18:21 2013
New Revision: 253548
URL: http://svnweb.freebsd.org/changeset/base/253548

Log:
  Document EINVAL error return from PT_LWPINFO

Modified:
  head/lib/libc/sys/ptrace.2

Modified: head/lib/libc/sys/ptrace.2
==
--- head/lib/libc/sys/ptrace.2  Mon Jul 22 15:02:55 2013(r253547)
+++ head/lib/libc/sys/ptrace.2  Mon Jul 22 18:18:21 2013(r253548)
@@ -2,7 +2,7 @@
 .\"$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
 .\"
 .\" This file is in the public domain.
-.Dd February 7, 2013
+.Dd July 22, 2013
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -556,6 +556,14 @@ was attempted on a process with no valid
 was given an invalid value for
 .Fa pve_entry .
 This can also be caused by changes to the VM map of the process.
+.It
+The size (in
+.Fa data )
+provided to
+.Dv PT_LWPINFO
+was less than or equal to zero, or larger than the
+.Vt ptrace_lwpinfo
+structure known to the kernel.
 .El
 .It Bq Er EBUSY
 .Bl -bullet -compact
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253549 - in head/sys: cam dev/mps sys

2013-07-22 Thread Kenneth D. Merry
Author: ken
Date: Mon Jul 22 18:37:07 2013
New Revision: 253549
URL: http://svnweb.freebsd.org/changeset/base/253549

Log:
  CAM and mps(4) driver scanning changes.
  
  Add a PIM_NOSCAN flag to the CAM path inquiry CCB.  This tells CAM
  not to perform a rescan on a bus when it is registered.
  
  We now use this flag in the mps(4) driver.  Since it knows what
  devices it has attached, it is more efficient for it to just issue
  a target rescan on the targets that are attached.
  
  Also, remove the private rescan thread from the mps(4) driver in
  favor of the rescan thread already built into CAM.  Without this
  change, but with the change above, the MPS scanner could run before
  or during CAM's initial setup, which would cause duplicate device
  reprobes and announcements.
  
  sys/param.h:
Bump __FreeBSD_version to 139 for the inclusion of the
PIM_RESCAN CAM path inquiry flag.
  
  sys/cam/cam_ccb.h:
  sys/cam/cam_xpt.c:
Added a PIM_NOSCAN flag.  If a SIM sets this in the path
inquiry ccb, then CAM won't rescan the bus in
xpt_bus_regsister.
  
  sys/dev/mps/mps_sas.c
For versions of FreeBSD that have the PIM_NOSCAN path
inquiry flag, don't freeze the sim queue during scanning,
because CAM won't be scanning this bus.  Instead, hold
up the boot.  Don't call mpssas_rescan_target in
mpssas_startup_decrement; it's redundant and I don't
know why it was in there.
  
Set PIM_NOSCAN in path inquiry CCBs.
  
Remove methods related to the internal rescan daemon.
  
Always use async events to trigger a probe for EEDP support.
In older versions of FreeBSD where AC_ADVINFO_CHANGED is
not available, use AC_FOUND_DEVICE and issue the
necessary READ CAPACITY manually.
  
Provide a path to xpt_register_async() so that we only
receive events for our own SCSI domain.
  
Improve error reporting in cases where setup for EEDP
detection fails.
  
  sys/dev/mps/mps_sas.h:
Remove softc flags and data related to the scanner thread.
  
  sys/dev/mps/mps_sas_lsi.c:
Unconditionally rescan the target whenever a device is added.
  
  Sponsored by: Spectra Logic
  MFC after:1 week

Modified:
  head/sys/cam/cam_ccb.h
  head/sys/cam/cam_xpt.c
  head/sys/dev/mps/mps_sas.c
  head/sys/dev/mps/mps_sas.h
  head/sys/dev/mps/mps_sas_lsi.c
  head/sys/sys/param.h

Modified: head/sys/cam/cam_ccb.h
==
--- head/sys/cam/cam_ccb.h  Mon Jul 22 18:18:21 2013(r253548)
+++ head/sys/cam/cam_ccb.h  Mon Jul 22 18:37:07 2013(r253549)
@@ -571,6 +571,7 @@ typedef enum {
PIM_NO_6_BYTE   = 0x08, /* Do not send 6-byte commands */
PIM_SEQSCAN = 0x04, /* Do bus scans sequentially, not in parallel */
PIM_UNMAPPED= 0x02,
+   PIM_NOSCAN  = 0x01  /* SIM does its own scanning */
 } pi_miscflag;
 
 /* Path Inquiry CCB */

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Mon Jul 22 18:18:21 2013(r253548)
+++ head/sys/cam/cam_xpt.c  Mon Jul 22 18:37:07 2013(r253549)
@@ -3895,18 +3895,23 @@ xpt_bus_register(struct cam_sim *sim, de
 
/* Notify interested parties */
if (sim->path_id != CAM_XPT_PATH_ID) {
-   union   ccb *scan_ccb;
 
xpt_async(AC_PATH_REGISTERED, path, &cpi);
-   /* Initiate bus rescan. */
-   scan_ccb = xpt_alloc_ccb_nowait();
-   if (scan_ccb != NULL) {
-   scan_ccb->ccb_h.path = path;
-   scan_ccb->ccb_h.func_code = XPT_SCAN_BUS;
-   scan_ccb->crcn.flags = 0;
-   xpt_rescan(scan_ccb);
+   if ((cpi.hba_misc & PIM_NOSCAN) == 0) {
+   union   ccb *scan_ccb;
+
+   /* Initiate bus rescan. */
+   scan_ccb = xpt_alloc_ccb_nowait();
+   if (scan_ccb != NULL) {
+   scan_ccb->ccb_h.path = path;
+   scan_ccb->ccb_h.func_code = XPT_SCAN_BUS;
+   scan_ccb->crcn.flags = 0;
+   xpt_rescan(scan_ccb);
+   } else
+   xpt_print(path,
+ "Can't allocate CCB to scan bus\n");
} else
-   xpt_print(path, "Can't allocate CCB to scan bus\n");
+   xpt_free_path(path);
} else
xpt_free_path(path);
return (CAM_SUCCESS);

Modified: head/sys/dev/mps/mps_sas.c
==
--- head/sys/dev/mps/mps_sas.c  Mon Jul 22 18:18:21 2013(r253548)
+++ head/

svn commit: r253550 - head/sys/dev/mps

2013-07-22 Thread Kenneth D. Merry
Author: ken
Date: Mon Jul 22 18:41:53 2013
New Revision: 253550
URL: http://svnweb.freebsd.org/changeset/base/253550

Log:
  Merge in phase 14+ -> 16 mps driver fixes from LSI:
  
  ---
  System panics during a Port reset with ouststanding I/O
  ---
  It is possible to call mps_mapping_free_memory after this
  memory is already freed, causing a panic. Removed this extra
  call to mps_mappiing_free_memory and call mps_mapping_exit
  in place of the mps_mapping_free_memory call so that any
  outstanding mapping items can be flushed before memory is
  freed.
  
  ---
  Correct memory leak during a Port reset with ouststanding I/O
  ---
  In mps_reinit function, the mapping memory was not being
  freed before being re-allocated. Added line to call the
  memory free function for mapping memory.
  
  ---
  Use CAM_SIM_QUEUED flag in Driver IO path.
  ---
  This flag informs the XPT that successful abort of a CCB
  requires an abort ccb to be issued to the SIM.  While
  processing SCSI IO's, set the CAM_SIM_QUEUED flag in the
  status for the IO. When the command completes, clear this
  flag.
  
  ---
  Check for CAM_REQ_INPROG in I/O path.
  ---
  Added a check in mpssas_action_scsiio for the In Progress
  status for the IO. If this flag is set, the IO has already
  been aborted by the upper layer (before CAM_SIM_QUEUED was
  set) and there is no need to send the IO. The request will
  be completed without error.
  
  ---
  Improve "doorbell handshake method" for mps_get_iocfacts
  ---
  Removed call to get Port Facts since this information is
  not used currently.
  
  Added mps_iocfacts_allocate function to allocate memory
  that is based on IOC Facts data.  Added mps_iocfacts_free
  function to free memory that is based on IOC Facts data.
  Both of the functions are used when a Diag Reset is performed
  or when the driver is attached/detached. This is needed in
  case IOC Facts changes after a Diag Reset, which could
  happen if FW is upgraded.
  
  Moved call of mps_bases_static_config_pages from the attach
  routine to after the IOC is ready to process accesses based
  on the new memory allocations (instead of polling through
  the Doorbell).
  
  ---
  Set TimeStamp in INIT message in millisecond format Set the IOC
  ---
  
  ---
  Prefer mps_wait_command to mps_request_polled
  ---
  Instead of using mps_request_polled, call mps_wait_command
  whenever possible. Change the mps_wait_command function to
  check the current context and either use interrupt context
  or poll if required by using the pause or DELAY function.
  Added a check after waiting 50mSecs to see if the command
  has timed out. This is only done if polliing, the msleep
  command will automatically timeout if the command has taken
  too long to complete.
  
  ---
  Integrated RAID: Volume Activation Failed error message is
  displayed though the volume has been activated.
  ---
  Instead of failing an IOCTL request that does not have a
  large enough buffer to hold the complete reply, copy as
  much data from the reply as possible into the user's buffer
  and log a message saying that the user's buffer was smaller
  than the returned data.
  
  ---
  mapping_add_new_device failure due to persistent table FULL
  ---
  When a new device is added, if it is determined that the
  device persistent table is being used and is full, instead
  of displaying a message for this condition every time, only
  log a message if the MPS_INFO bit is set in the debug_flags.
  
  Submitted by: LSI
  MFC after:1 week

Modified:
  head/sys/dev/mps/mps.c
  head/sys/dev/mps/mps_config.c
  head/sys/dev/mps/mps_mapping.c
  head/sys/dev/mps/mps_sas.c
  head/sys/dev/mps/mps_sas_lsi.c
  head/sys/dev/mps/mps_user.c
  head/sys/dev/mps/mpsvar.h

Modified: head/sys/dev/mps/mps.c
==
--- head/sys/dev/mps/mps.c  Mon Jul 22 18:37:07 

svn commit: r253551 - head/share/man/man4

2013-07-22 Thread Sergey Kandaurov
Author: pluknet
Date: Mon Jul 22 19:21:28 2013
New Revision: 253551
URL: http://svnweb.freebsd.org/changeset/base/253551

Log:
  Update chipset support list for ath_hal.
  This adds "device ath_ar9300".
  
  PR:   docs/180743
  Reviewed by:  adrian

Modified:
  head/share/man/man4/ath_hal.4

Modified: head/share/man/man4/ath_hal.4
==
--- head/share/man/man4/ath_hal.4   Mon Jul 22 18:41:53 2013
(r253550)
+++ head/share/man/man4/ath_hal.4   Mon Jul 22 19:21:28 2013
(r253551)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"/
-.Dd August 28, 2011
+.Dd July 22, 2013
 .Dt ATH_HAL 4
 .Os
 .Sh NAME
@@ -56,11 +56,13 @@ or
 .Cd "device ath_ar9280"
 .Cd "device ath_ar9285"
 .Cd "device ath_ar9287"
+.Cd "device ath_ar9300"
 .Cd "options AH_SUPPORT_AR5416"
 .Sh DESCRIPTION
 The hal provides hardware support for wireless network adapters based on
 the Atheros AR5210, AR5211, AR5212, AR5213, AR2413, AR2417, AR2425,
-AR5413, AR5416, AR5418, AR5424, AR9160, AR9220, AR9280, AR9285 and AR9287
+AR5413, AR5416, AR5418, AR5424, AR9160, AR9220, AR9280, AR9285, AR9287,
+AR9380, AR9390, AR9580, AR9590, AR9562 and QCA9565
 chips (and companion RF/baseband parts).
 This code is part of the
 .Xr ath 4
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253552 - head/share/man/man4

2013-07-22 Thread Sergey Kandaurov
Author: pluknet
Date: Mon Jul 22 19:32:42 2013
New Revision: 253552
URL: http://svnweb.freebsd.org/changeset/base/253552

Log:
  Add TP-LINK TL-WDN4800.
  
  PR:   docs/180743
  Reviewed by:  adrian

Modified:
  head/share/man/man4/ath_hal.4

Modified: head/share/man/man4/ath_hal.4
==
--- head/share/man/man4/ath_hal.4   Mon Jul 22 19:21:28 2013
(r253551)
+++ head/share/man/man4/ath_hal.4   Mon Jul 22 19:32:42 2013
(r253552)
@@ -130,6 +130,7 @@ module:
 .It "Sony PCWA-C300S   AR5212  Cardbus b/g"
 .It "Sony PCWA-C500AR5210  Cardbus a"
 .It "3Com 3CRPAG175AR5212  CardBus a/b/g"
+.It "TP-LINK TL-WDN4800AR9380  PCIea/b/g/n"
 .El
 .Sh SEE ALSO
 .Xr ath 4
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r252646 - head/sys/amd64/amd64

2013-07-22 Thread Neel Natu
Hi Jean-Sebastien,

On Sun, Jul 21, 2013 at 1:05 AM, Jean-Sébastien Pédron
 wrote:
> Le 20/07/2013 20:26, Neel Natu a écrit :
>
>> I would start looking by looking at the value of the page table entry
>> in question (this would be 'tpte' in pmap_remove_pages()).
>>
>> In particular, it would be useful to identify whether this is pointing
>> to a superpage mapping and if so what page within the superpage is
>> triggering the "vm_page_dirty: page is invalid" panic.
>
>
> Here's what was logged by your patch:
>
> va = 0x8007da000
> tpte = 0x8000d2f834f7
> m->phys_addr = 0xd2eaf000
> m->valid = 0
> m->dirty= 0
> m->flags = 4, aflags = 0, oflags = 0
> panic: vm_page_dirty: page is invalid!
>
> So it corresponds to page m[175] in the superpage. I don't know if it helps
> but I checked the remaining pages: they all have '->valid = 0', except a few
> ones (265 to 267, 345, 361 to 363, 379 to 387 and 425 to 431 have '->valid =
> VM_PAGE_BITS_ALL').
>

Thanks a lot for that - it helped a lot!

Could you revert the debug patch earlier and apply the following patch
and give it a spin?

Index: pmap.c
===
--- pmap.c  (revision 253553)
+++ pmap.c  (working copy)
@@ -4400,7 +4400,7 @@
struct rwlock *lock;
int64_t bit;
uint64_t inuse, bitmask;
-   int allfree, field, freed, idx;
+   int allfree, field, freed, idx, superpage;
vm_paddr_t pa;

if (pmap != PCPU_GET(curpmap)) {
@@ -4427,12 +4427,15 @@
pte = pmap_pdpe_to_pde(pte, pv->pv_va);
tpte = *pte;
if ((tpte & (PG_PS | PG_V)) == PG_V) {
+   superpage = 0;
ptepde = tpte;
pte = (pt_entry_t *)PHYS_TO_DMAP(tpte &
PG_FRAME);
pte = &pte[pmap_pte_index(pv->pv_va)];
tpte = *pte;
-   }
+   } else
+   superpage = 1;
+
if ((tpte & PG_V) == 0) {
panic("bad pte va %lx pte %lx",
pv->pv_va, tpte);
@@ -4446,7 +4449,7 @@
continue;
}

-   if (tpte & PG_PS)
+   if (superpage)
pa = tpte & PG_PS_FRAME;
else
pa = tpte & PG_FRAME;
@@ -4468,7 +4471,7 @@
 * Update the vm_page_t clean/reference bits.
 */
if ((tpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) {
-   if ((tpte & PG_PS) != 0) {
+   if (superpage) {
for (mt = m; mt < &m[NBPDR / 
PAGE_SIZE]; mt++)
vm_page_dirty(mt);
} else
@@ -4479,7 +4482,7 @@

/* Mark free */
pc->pc_map[field] |= bitmask;
-   if ((tpte & PG_PS) != 0) {
+   if (superpage) {
pmap_resident_count_dec(pmap, NBPDR / 
PAGE_SIZE);
pvh = pa_to_pvh(tpte & PG_PS_FRAME);
TAILQ_REMOVE(&pvh->pv_list, pv, 
pv_next);

best
Neel

> --
> Jean-Sébastien Pédron
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253554 - head/sys/vm

2013-07-22 Thread Jeremie Le Hen
Author: jlh
Date: Mon Jul 22 21:47:14 2013
New Revision: 253554
URL: http://svnweb.freebsd.org/changeset/base/253554

Log:
  Fix a panic in the racct code when munlock(2) is called with incorrect values.
  
  The racct code in sys_munlock() assumed that the boundaries provided by the
  userland were correct as long as vm_map_unwire() returned successfully.
  However the latter contains its own logic and sometimes manages to do 
something
  out of those boundaries, even if they are buggy.  This change makes the racct
  code to use the accounting done by the vm layer, as it is done in other places
  such as vm_mlock().
  
  Despite fixing the panic, Alan Cox pointed that this code is still race-y
  though: two simultaneous callers will produce incorrect values.
  
  Reviewed by:  alc
  MFC after:7 days

Modified:
  head/sys/vm/vm_mmap.c

Modified: head/sys/vm/vm_mmap.c
==
--- head/sys/vm/vm_mmap.c   Mon Jul 22 19:38:21 2013(r253553)
+++ head/sys/vm/vm_mmap.c   Mon Jul 22 21:47:14 2013(r253554)
@@ -1224,6 +1224,7 @@ sys_munlock(td, uap)
 {
vm_offset_t addr, end, last, start;
vm_size_t size;
+   vm_map_t map;
int error;
 
error = priv_check(td, PRIV_VM_MUNLOCK);
@@ -1241,7 +1242,9 @@ sys_munlock(td, uap)
 #ifdef RACCT
if (error == KERN_SUCCESS) {
PROC_LOCK(td->td_proc);
-   racct_sub(td->td_proc, RACCT_MEMLOCK, ptoa(end - start));
+   map = &td->td_proc->p_vmspace->vm_map;
+   racct_set(td->td_proc, RACCT_MEMLOCK,
+   ptoa(pmap_wired_count(map->pmap)));
PROC_UNLOCK(td->td_proc);
}
 #endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r252646 - head/sys/amd64/amd64

2013-07-22 Thread Jean-Sébastien Pédron
On 22.07.2013 23:22, Neel Natu wrote:
> Could you revert the debug patch earlier and apply the following patch
> and give it a spin?

I can't reproduce the panic with this patch :) Thank you very much, Neel!

-- 
Jean-Sébastien Pédron



signature.asc
Description: OpenPGP digital signature


svn commit: r253556 - head/sys/vm

2013-07-22 Thread Jeremie Le Hen
Author: jlh
Date: Mon Jul 22 22:16:47 2013
New Revision: 253556
URL: http://svnweb.freebsd.org/changeset/base/253556

Log:
  Fix previous commit when option RACCT is not used.
  
  MFC after:7 days

Modified:
  head/sys/vm/vm_mmap.c

Modified: head/sys/vm/vm_mmap.c
==
--- head/sys/vm/vm_mmap.c   Mon Jul 22 22:09:27 2013(r253555)
+++ head/sys/vm/vm_mmap.c   Mon Jul 22 22:16:47 2013(r253556)
@@ -1224,7 +1224,9 @@ sys_munlock(td, uap)
 {
vm_offset_t addr, end, last, start;
vm_size_t size;
+#ifdef RACCT
vm_map_t map;
+#endif
int error;
 
error = priv_check(td, PRIV_VM_MUNLOCK);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253558 - head/sys/ia64/ia64

2013-07-22 Thread Marcel Moolenaar
Author: marcel
Date: Tue Jul 23 02:11:22 2013
New Revision: 253558
URL: http://svnweb.freebsd.org/changeset/base/253558

Log:
  In pmap_mapdev(), if the physical memory range is not covered by an EFI
  memory descriptor, don't return NULL as the virtual address, return the
  direct-mapped uncacheable virtual address for it. At first, this was
  needed only for the Altix 350, but now even some high-end HP machines
  have devices mapped to physical addresses that aren't covered by the
  EFI memory map.

Modified:
  head/sys/ia64/ia64/pmap.c

Modified: head/sys/ia64/ia64/pmap.c
==
--- head/sys/ia64/ia64/pmap.c   Mon Jul 22 23:08:36 2013(r253557)
+++ head/sys/ia64/ia64/pmap.c   Tue Jul 23 02:11:22 2013(r253558)
@@ -2451,7 +2451,7 @@ pmap_mapdev(vm_paddr_t pa, vm_size_t sz)
if (md == NULL) {
printf("%s: [%#lx..%#lx] not covered by memory descriptor\n",
__func__, pa, pa + sz - 1);
-   return (NULL);
+   return ((void *)IA64_PHYS_TO_RR6(pa));
}
 
if (md->md_type == EFI_MD_TYPE_FREE) {
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253559 - head/sys/ia64/ia64

2013-07-22 Thread Marcel Moolenaar
Author: marcel
Date: Tue Jul 23 02:38:23 2013
New Revision: 253559
URL: http://svnweb.freebsd.org/changeset/base/253559

Log:
  In ia64_mca_init(), don't limit the allocation of the info block to
  fall within the first 256MB of memory. The origin/reason for that
  limitation is not known, but it's not believed to be required for
  proper initialization. What is known is that the Altix 350 does not
  have physical memory at that address (by virtue of the address space
  bits).
  
  Keep the boundary at 256MB so that the info block will be covered
  by a single direct-mapped translation.
  
  While here, change the flags to M_NOWAIT to eliminate confusion. It
  does not change the behaviour of contigmalloc(). What is does is
  makes the flags argument explicitly say what the actual behaviour
  is.

Modified:
  head/sys/ia64/ia64/mca.c

Modified: head/sys/ia64/ia64/mca.c
==
--- head/sys/ia64/ia64/mca.cTue Jul 23 02:11:22 2013(r253558)
+++ head/sys/ia64/ia64/mca.cTue Jul 23 02:38:23 2013(r253559)
@@ -284,8 +284,8 @@ ia64_mca_init(void)
}
max_size = round_page(max_size);
 
-   p = (max_size) ? contigmalloc(max_size, M_TEMP, 0, 0ul,
-   256*1024*1024 - 1, PAGE_SIZE, 256*1024*1024) : NULL;
+   p = (max_size) ? contigmalloc(max_size, M_TEMP, M_NOWAIT, 0ul, ~0ul,
+   PAGE_SIZE, 256*1024*1024) : NULL;
if (p != NULL) {
mca_info_block = IA64_PHYS_TO_RR7(ia64_tpa((u_int64_t)p));
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r253560 - head/sys/ia64/pci

2013-07-22 Thread Marcel Moolenaar
Author: marcel
Date: Tue Jul 23 03:03:17 2013
New Revision: 253560
URL: http://svnweb.freebsd.org/changeset/base/253560

Log:
  In pci_cfgregread() and pci_cfgregwrite(), multiplex the domain and
  bus number into the bus argument. The bus number occupies the least
  significant 8 bits. The PCI domain occupies the most significant 24
  bits.
  
  On the Altix 350, the PCI domain is a required parameter, but
  changing the prototype of the pci_cfgreg*() functions to include a
  separate domain argument has wide-spread consequences across the
  supported architectures. We'd be changing a known interface.
  
  Multiplexing is an acceptable kluge to give us what we need with
  manageable impact. Note that the PCI bus number fits in 8 bits,
  so the multiplexing of the domain is a backward compatible change.

Modified:
  head/sys/ia64/pci/pci_cfgreg.c

Modified: head/sys/ia64/pci/pci_cfgreg.c
==
--- head/sys/ia64/pci/pci_cfgreg.c  Tue Jul 23 02:38:23 2013
(r253559)
+++ head/sys/ia64/pci/pci_cfgreg.c  Tue Jul 23 03:03:17 2013
(r253560)
@@ -70,7 +70,7 @@ pci_cfgregread(int bus, int slot, int fu
register_t is;
u_long addr;
 
-   addr = pci_sal_address(0, bus, slot, func, reg);
+   addr = pci_sal_address(bus >> 8, bus & 0xff, slot, func, reg);
if (addr == ~0ul)
return (~0);
 
@@ -91,7 +91,7 @@ pci_cfgregwrite(int bus, int slot, int f
register_t is;
u_long addr;
 
-   addr = pci_sal_address(0, bus, slot, func, reg);
+   addr = pci_sal_address(bus >> 8, bus & 0xff, slot, func, reg);
if (addr == ~0ul)
return;
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"