svn commit: r317789 - head/lib/libsysdecode

2017-05-04 Thread Michael Tuexen
Author: tuexen
Date: Thu May  4 07:44:07 2017
New Revision: 317789
URL: https://svnweb.freebsd.org/changeset/base/317789

Log:
  Add support for socket option names related to the level IPPROTO_UDPLITE.

Modified:
  head/lib/libsysdecode/flags.c
  head/lib/libsysdecode/mktables

Modified: head/lib/libsysdecode/flags.c
==
--- head/lib/libsysdecode/flags.c   Thu May  4 06:45:43 2017
(r317788)
+++ head/lib/libsysdecode/flags.c   Thu May  4 07:44:07 2017
(r317789)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -759,6 +760,8 @@ sysdecode_sockopt_name(int level, int op
return (lookup_value(sockopttcp, optname));
if (level == IPPROTO_UDP)
return (lookup_value(sockoptudp, optname));
+   if (level == IPPROTO_UDPLITE)
+   return (lookup_value(sockoptudplite, optname));
return (NULL);
 }
 

Modified: head/lib/libsysdecode/mktables
==
--- head/lib/libsysdecode/mktables  Thu May  4 06:45:43 2017
(r317788)
+++ head/lib/libsysdecode/mktables  Thu May  4 07:44:07 2017
(r317789)
@@ -134,6 +134,7 @@ gen_table "sockoptipv6" "IPV6_[[:aln
 gen_table "sockoptsctp" "SCTP_[[:alnum:]_]+[[:space:]]+[0-9]+" 
"netinet/sctp.h"
 gen_table "sockopttcp"  "TCP_[[:alnum:]_]+[[:space:]]+[0-9]+"  
"netinet/tcp.h"  "TCP_MIN|TCP_MAX[^S]|TCP_MSS|TCP_[[:alnum:]_]+_MAX"
 gen_table "sockoptudp"  "UDP_[[:alnum:]]+[[:space:]]+[0-9]+"   
"netinet/udp.h"  "UDP_ENCAP_"
+gen_table "sockoptudplite"  "UDPLITE_[[:alnum:]_]+[[:space:]]+[0-9]+"  
"netinet/udplite.h"
 gen_table "socktype""SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*"  
"sys/socket.h"
 gen_table "thrcreateflags"  "THR_[A-Z]+[[:space:]]+0x[0-9]+"   
"sys/thr.h"
 gen_table "umtxop"  "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+"  
"sys/umtx.h"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317790 - head/share/man/man7

2017-05-04 Thread Konstantin Belousov
Author: kib
Date: Thu May  4 11:57:52 2017
New Revision: 317790
URL: https://svnweb.freebsd.org/changeset/base/317790

Log:
  Avoid wrapping of the machine-dependent type sizes table, by removing
  non-informational sizeof() expressions.  Add some explanatory and
  summary sentences.
  
  Noted by: bde
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks

Modified:
  head/share/man/man7/arch.7

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Thu May  4 07:44:07 2017(r317789)
+++ head/share/man/man7/arch.7  Thu May  4 11:57:52 2017(r317790)
@@ -36,8 +36,9 @@
 Differences between CPU architectures and platforms supported by
 .Fx .
 .Pp
+If not explicitly mentioned, sizes are in bytes.
 .Ss Type sizes
-On all supported architectures,
+On all supported architectures:
 .Bl -column -offset -indent "long long" "Size"
 .It Sy Type Ta Sy Size
 .It short Ta 2
@@ -47,8 +48,10 @@ On all supported architectures,
 .It float Ta 4
 .It double Ta 8
 .El
-.Bl -column -offset indent "Sy Architecture" "Sy sizeof(void *)" "Sy 
sizeof(long double)" "Sy sizeof(time_t)"
-.It Sy Architecture Ta Sy sizeof(void *) Ta Sy sizeof(long double) Ta Sy 
sizeof(time_t)
+.Pp
+Machine-dependent type sizes:
+.Bl -column -offset indent "Sy Architecture" "Sy void *" "Sy long double" "Sy 
time_t"
+.It Sy Architecture Ta Sy void * Ta Sy long double Ta Sy time_t
 .It amd64   Ta 8 Ta 16 Ta 8
 .It arm Ta 4 Ta  8 Ta 8
 .It armeb   Ta 4 Ta  8 Ta 8
@@ -71,6 +74,10 @@ On all supported architectures,
 .It riscv64sf   Ta 8 Ta 16 Ta 8
 .It sparc64 Ta 8 Ta 16 Ta 8
 .El
+.Pp
+.Sy time_t
+is 8 bytes on all supported architectures except i386 and 32-bit
+variants of powerpc.
 .Ss Endianness and Char Signedness
 .Bl -column -offset indent "Sy Architecture" "Sy Endianness" "Sy char 
Signedness"
 .It Sy Architecture Ta Sy Endianness Ta Sy char Signedness
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Ed Schouten
Hi Ed,

2016-07-19 19:46 GMT+02:00 Ed Maste :
> +.It arm Ta soft Ta soft, double precision
...
> +.It mipsTa soft Ta identical to double

I was wondering, what's the difference between two ways of phrasing
it? If long double is double precision, it's identical to double,
right?

> +.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .
> +.Dv PDP11_ENDIAN is not used on FreeBSD.

Would it make more sense to describe GCC/Clang's officially documented
endianness macros here?

__BYTE_ORDER__
__ORDER_LITTLE_ENDIAN__
__ORDER_BIG_ENDIAN__
__ORDER_PDP_ENDIAN__

-- 
Ed Schouten 
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Warner Losh
On Thu, May 4, 2017 at 7:44 AM, Ed Schouten  wrote:
> Hi Ed,
>
> 2016-07-19 19:46 GMT+02:00 Ed Maste :
>> +.It arm Ta soft Ta soft, double precision
> ...
>> +.It mipsTa soft Ta identical to double
>
> I was wondering, what's the difference between two ways of phrasing
> it? If long double is double precision, it's identical to double,
> right?
>
>> +.It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN .
>> +.Dv PDP11_ENDIAN is not used on FreeBSD.
>
> Would it make more sense to describe GCC/Clang's officially documented
> endianness macros here?
>
> __BYTE_ORDER__
> __ORDER_LITTLE_ENDIAN__
> __ORDER_BIG_ENDIAN__
> __ORDER_PDP_ENDIAN__

I don't think so. We don't use them in the source tree (except to
implement these macros). These are not standardized, so we use our
macros as a standard. We want everybody to use them always, except in
code we get from upstream.

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


Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Ed Maste
On 4 May 2017 at 09:44, Ed Schouten  wrote:
> Hi Ed,
>
> 2016-07-19 19:46 GMT+02:00 Ed Maste :
>> +.It arm Ta soft Ta soft, double precision
> ...
>> +.It mipsTa soft Ta identical to double
>
> I was wondering, what's the difference between two ways of phrasing
> it? If long double is double precision, it's identical to double,
> right?

Yes, good point. I copied the text that was on the wiki page and
missed making it consistent here. Probably the style used by the arm
entry is the one we want.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r317600 - in head/sys: amd64/vmm/amd modules/vmm

2017-05-04 Thread Conrad Meyer
Hi Anish,


On Sat, Apr 29, 2017 at 7:08 PM, Anish Gupta  wrote:
> Author: anish
> Date: Sun Apr 30 02:08:46 2017
> New Revision: 317600
> URL: https://svnweb.freebsd.org/changeset/base/317600
>
> Log:
>   Add AMD IOMMU/AMD-Vi support in bhyve for passthrough/direct assignment to 
> VMs. To enable AMD-Vi, set hw.vmm.amdvi.enable=1.
>
>   Reviewed by:bcr
>   Approved by:grehan
>   Tested by:rgrimes
>   Differential Revision:https://reviews.freebsd.org/D10049
> ...
>
> Added: head/sys/amd64/vmm/amd/amdvi_hw.c
> ...
> +/* See section 2.5.4 of AMD IOMMU spec ver 2.62.*/
> +static inline void
> +amdvi_decode_evt_flag_type(uint8_t type)
> +{
> +
> +   switch (AMDVI_EVENT_FLAG_TYPE(type)) {
> +   case 0:
> +   printf("RSVD\n");
> +   break;
> +   case 1:
> +   printf("Master Abort\n");
> +   break;
> +   case 2:
> +   printf("Target Abort\n");
> +   break;
> +   case 3:
> +   printf("Data Err\n");
> +   break;
> +   default:
> +   break;
> +   }
> +}

Coverity warns that the result of AMDVI_EVENT_FLAG_TYPE() in this
function will always be zero.  This makes sense, as the macro is
defined as:

#define AMDVI_EVENT_FLAG_TYPE(x)(((x) >> 9) & 0x3)

And "type" is a uint8_t.  Right-shifting it by 9 will always zero it.
Perhaps the function's parameter should be a wider type?

FYI, this is Coverity CID 1374742.

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


Re: svn commit: r317600 - in head/sys: amd64/vmm/amd modules/vmm

2017-05-04 Thread Conrad Meyer
On Thu, May 4, 2017 at 7:58 AM, Conrad Meyer  wrote:
> On Sat, Apr 29, 2017 at 7:08 PM, Anish Gupta  wrote:
>> Author: anish
>> Date: Sun Apr 30 02:08:46 2017
>> New Revision: 317600
>> URL: https://svnweb.freebsd.org/changeset/base/317600
>>
>> Log:
>>   Add AMD IOMMU/AMD-Vi support in bhyve for passthrough/direct assignment to 
>> VMs. To enable AMD-Vi, set hw.vmm.amdvi.enable=1.
>>
>>   Reviewed by:bcr
>>   Approved by:grehan
>>   Tested by:rgrimes
>>   Differential Revision:https://reviews.freebsd.org/D10049
>> ...

Hi Anish,

One more Coverity warning that came in with this commit:

In ivrs_drv.c: ivrs_hdr_iterate_tbl(), there is a check for
'ivrs_hdr->Length < 0'.  However, Length has an unsigned type and
cannot be negative, so the check can never be true.  (CID: 1374746.)

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


svn commit: r317798 - head/sys/dev/bnxt

2017-05-04 Thread Sean Bruno
Author: sbruno
Date: Thu May  4 15:26:28 2017
New Revision: 317798
URL: https://svnweb.freebsd.org/changeset/base/317798

Log:
  bnxt: Add support for new Broadcom 100Gb adapter BCM57454
  
  Submitted by: bhargava.marre...@broadcom.com
  Reviewed by:  venkatkumar.duvv...@broadcom.com
  Differential Revision:https://reviews.freebsd.org/D10595

Modified:
  head/sys/dev/bnxt/bnxt.h
  head/sys/dev/bnxt/if_bnxt.c

Modified: head/sys/dev/bnxt/bnxt.h
==
--- head/sys/dev/bnxt/bnxt.hThu May  4 15:00:09 2017(r317797)
+++ head/sys/dev/bnxt/bnxt.hThu May  4 15:26:28 2017(r317798)
@@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
 #define BCM57417_NPAR1 0x16c0
 #define BCM57417_NPAR2 0x16cc
 #define BCM57417_SFP   0x16e2
+#define BCM57454   0x1614
 #define BCM58700   0x16cd
 #define NETXTREME_C_VF10x16cb
 #define NETXTREME_C_VF20x16e1

Modified: head/sys/dev/bnxt/if_bnxt.c
==
--- head/sys/dev/bnxt/if_bnxt.c Thu May  4 15:00:09 2017(r317797)
+++ head/sys/dev/bnxt/if_bnxt.c Thu May  4 15:26:28 2017(r317798)
@@ -127,6 +127,8 @@ static pci_vendor_info_t bnxt_vendor_inf
"Broadcom BCM57417 NetXtreme-E Ethernet Partition"),
 PVID(BROADCOM_VENDOR_ID, BCM57417_SFP,
"Broadcom BCM57417 NetXtreme-E 10Gb/25Gb Ethernet"),
+PVID(BROADCOM_VENDOR_ID, BCM57454,
+   "Broadcom BCM57454 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet"),
 PVID(BROADCOM_VENDOR_ID, BCM58700,
"Broadcom BCM58700 Nitro 1Gb/2.5Gb/10Gb Ethernet"),
 PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF1,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r303033 - head/share/man/man7

2017-05-04 Thread Bruce Evans

On Thu, 4 May 2017, Ed Maste wrote:


On 4 May 2017 at 09:44, Ed Schouten  wrote:

Hi Ed,

2016-07-19 19:46 GMT+02:00 Ed Maste :

+.It arm Ta soft Ta soft, double precision

...

+.It mipsTa soft Ta identical to double


I was wondering, what's the difference between two ways of phrasing
it? If long double is double precision, it's identical to double,
right?


Wrong.  long double is a different type with a different rank to double.
It cannot be identical.

"identical" is a fuzzy way of saying that the representation is
identical and all operations are the same at the level of the represention.



Yes, good point. I copied the text that was on the wiki page and
missed making it consistent here. Probably the style used by the arm
entry is the one we want.


The arm entry is not technically incorrect, but is less useful.  It
would be satisfied by long doubles with twice the number of bits (half
padding) in a different order.

These tables probably shouldn't attempt to give any details except the
size and the padding.  Padding and representation are not mentioned for
integers at all, because everying knows that integers are 2's complement
with no padding.  Long doubles have padding on supported arches iff they
are longer than double but shorter than quad, but the tables don't give
enough details to determine this, and this is just one of the complications
for long doubles.   also doesn't give enough details.  It has
to be augmented by _fpmath.h to see the details of the representation.

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


svn commit: r317799 - head/sys/cam/scsi

2017-05-04 Thread Kenneth D. Merry
Author: ken
Date: Thu May  4 17:23:39 2017
New Revision: 317799
URL: https://svnweb.freebsd.org/changeset/base/317799

Log:
  Add the SCSI Solid State Media Log page (0x11) definition.
  
  sys/cam/scsi/scsi_all.h:
Add the SCSI Solid State Media log page (0x11) structure
definition.  This gives the percentage used (in terms of
lifetime flash wear) of an SSD.
  
  MFC after:3 days
  Sponsored by: Spectra Logic

Modified:
  head/sys/cam/scsi/scsi_all.h

Modified: head/sys/cam/scsi/scsi_all.h
==
--- head/sys/cam/scsi/scsi_all.hThu May  4 15:26:28 2017
(r317798)
+++ head/sys/cam/scsi/scsi_all.hThu May  4 17:23:39 2017
(r317799)
@@ -565,6 +565,7 @@ struct scsi_log_sense
 #defineSLS_ERROR_LASTN_PAGE0x07
 #defineSLS_LOGICAL_BLOCK_PROVISIONING  0x0c
 #defineSLS_SELF_TEST_PAGE  0x10
+#defineSLS_SOLID_STATE_MEDIA   0x11
 #defineSLS_STAT_AND_PERF   0x19
 #defineSLS_IE_PAGE 0x2f
 #defineSLS_PAGE_CTRL_MASK  0xC0
@@ -624,6 +625,13 @@ struct scsi_log_param_header {
u_int8_t param_len;
 };
 
+struct scsi_log_media_pct_used {
+   struct scsi_log_param_header hdr;
+#defineSLP_SS_MEDIA_PCT_USED   0x0001
+   uint8_t reserved[3];
+   uint8_t pct_used;
+};
+
 struct scsi_log_stat_and_perf {
struct scsi_log_param_header hdr;
 #defineSLP_SAP 0x0001
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317800 - head/sys/dev/sdhci

2017-05-04 Thread Luiz Otavio O Souza
Author: loos
Date: Thu May  4 18:56:11 2017
New Revision: 317800
URL: https://svnweb.freebsd.org/changeset/base/317800

Log:
  Add support for the no-1-8-v and wp-inverted properties in generic SDHCI
  FDT glue.
  
  MFC after:2 weeks
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/dev/sdhci/sdhci_fdt.c

Modified: head/sys/dev/sdhci/sdhci_fdt.c
==
--- head/sys/dev/sdhci/sdhci_fdt.c  Thu May  4 17:23:39 2017
(r317799)
+++ head/sys/dev/sdhci/sdhci_fdt.c  Thu May  4 18:56:11 2017
(r317800)
@@ -70,6 +70,9 @@ struct sdhci_fdt_softc {
int num_slots;  /* Number of slots on this controller*/
struct sdhci_slot slots[MAX_SLOTS];
struct resource *mem_res[MAX_SLOTS];/* Memory resource */
+
+   boolwp_inverted;/* WP pin is inverted */
+   boolno_18v; /* No 1.8V support */
 };
 
 static uint8_t
@@ -110,8 +113,13 @@ static uint32_t
 sdhci_fdt_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off)
 {
struct sdhci_fdt_softc *sc = device_get_softc(dev);
+   uint32_t val32;
+
+   val32 = bus_read_4(sc->mem_res[slot->num], off);
+   if (off == SDHCI_CAPABILITIES && sc->no_18v)
+   val32 &= ~SDHCI_CAN_VDD_180;
 
-   return (bus_read_4(sc->mem_res[slot->num], off));
+   return (val32);
 }
 
 static void
@@ -152,6 +160,14 @@ sdhci_fdt_intr(void *arg)
 }
 
 static int
+sdhci_fdt_get_ro(device_t bus, device_t dev)
+{
+   struct sdhci_fdt_softc *sc = device_get_softc(bus);
+
+   return (sdhci_generic_get_ro(bus, dev) ^ sc->wp_inverted);
+}
+
+static int
 sdhci_fdt_probe(device_t dev)
 {
struct sdhci_fdt_softc *sc = device_get_softc(dev);
@@ -182,6 +198,10 @@ sdhci_fdt_probe(device_t dev)
sc->num_slots = cid;
if ((OF_getencprop(node, "max-frequency", &cid, sizeof(cid))) > 0)
sc->max_clk = cid;
+   if (OF_hasprop(node, "no-1-8-v"))
+   sc->no_18v = true;
+   if (OF_hasprop(node, "wp-inverted"))
+   sc->wp_inverted = true;
 
return (0);
 }
@@ -279,7 +299,7 @@ static device_method_t sdhci_fdt_methods
/* mmcbr_if */
DEVMETHOD(mmcbr_update_ios, sdhci_generic_update_ios),
DEVMETHOD(mmcbr_request,sdhci_generic_request),
-   DEVMETHOD(mmcbr_get_ro, sdhci_generic_get_ro),
+   DEVMETHOD(mmcbr_get_ro, sdhci_fdt_get_ro),
DEVMETHOD(mmcbr_acquire_host,   sdhci_generic_acquire_host),
DEVMETHOD(mmcbr_release_host,   sdhci_generic_release_host),
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317801 - head/libexec/getty

2017-05-04 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu May  4 19:01:17 2017
New Revision: 317801
URL: https://svnweb.freebsd.org/changeset/base/317801

Log:
  Fix markup in gettytab(5).
  
  Reviewed by:  bapt
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D10476

Modified:
  head/libexec/getty/gettytab.5

Modified: head/libexec/getty/gettytab.5
==
--- head/libexec/getty/gettytab.5   Thu May  4 18:56:11 2017
(r317800)
+++ head/libexec/getty/gettytab.5   Thu May  4 19:01:17 2017
(r317801)
@@ -81,8 +81,8 @@ table.
 .It "c2num unused  tty control flags to leave terminal as"
 .It "ceboolfalse   use crt erase algorithm"
 .It "ckboolfalse   use crt kill algorithm"
-.It "clstr" Ta Dv NULL Ta
-.No "screen clear sequence"
+.It "clstr" Ta Dv NULL
+.Ta No "screen clear sequence"
 .It "coboolfalse   console - add"
 .Ql \en
 after login prompt
@@ -94,31 +94,31 @@ scripts
 .It "dcnum 0   chat debug bitmask"
 .It "denum 0   delay secs and flush input before writing first 
prompt"
 .It "dfstr %+  the" Xr strftime 3 "format used for \&%d in the 
banner message"
-.It "dsstr" Ta So Li ^Y Sc Ta
-.No "delayed suspend character"
+.It "dsstr" Ta So Li ^Y
+.Sc Ta No "delayed suspend character"
 .It "dxboolfalse   set"
 .Dv DECCTLQ
 .It "ecboolfalse   leave echo"
 .Em OFF
 .It "epboolfalse   terminal uses even parity"
-.It "erstr" Ta So Li ^? Sc Ta
-.No "erase character"
-.It "etstr" Ta So Li ^D Sc Ta
-.No "end of text"
+.It "erstr" Ta So Li ^?
+.Sc Ta No "erase character"
+.It "etstr" Ta So Li ^D
+.Sc Ta No "end of text"
 .Pq Dv EOF
 character
-.It "evstr" Ta Dv NULL Ta
-.No "initial environment"
+.It "evstr" Ta Dv NULL
+.Ta No "initial environment"
 .It "f0num unused  tty mode flags to write messages"
 .It "f1num unused  tty mode flags to read login name"
 .It "f2num unused  tty mode flags to leave terminal as"
-.It "flstr" Ta So Li ^O Sc Ta
-.No "output flush character"
+.It "flstr" Ta So Li ^O
+.Sc Ta No "output flush character"
 .It "hcboolfalse   do"
 .Em NOT
 hangup line on last close
-.It "hestr" Ta Dv NULL Ta
-.No "hostname editing regular expression"
+.It "hestr" Ta Dv NULL
+.Ta No "hostname editing regular expression"
 .It "hnstr hostnamehostname"
 .It "htboolfalse   terminal has real tabs"
 .It "hwboolfalse   do cts/rts hardware flow control"
@@ -128,21 +128,21 @@ hangup line on last close
 .It "icstr unused  expect-send chat script for modem 
initialization"
 .It "ifstr unused  display named file before prompt, like 
/etc/issue"
 .It "igboolfalse   ignore garbage characters in login name"
-.It "imstr" Ta Dv NULL Ta
-.No "initial (banner) message"
-.It "instr" Ta So Li ^C Sc Ta
-.No "interrupt character"
+.It "imstr" Ta Dv NULL
+.Ta No "initial (banner) message"
+.It "instr" Ta So Li ^C
+.Sc Ta No "interrupt character"
 .It "isnum unused  input speed"
-.It "klstr" Ta So Li ^U Sc Ta
-.No "kill character"
+.It "klstr" Ta So Li ^U
+.Sc Ta No "kill character"
 .It "l0num unused  tty local flags to write messages"
 .It "l1num unused  tty local flags to read login name"
 .It "l2num unused  tty local flags to leave terminal as"
 .It "lmstr login:  login prompt"
-.It "lnstr" Ta So Li ^V Sc Ta
-.No "``literal next'' character"
-.It "lostr" Ta Pa /usr/bin/login Ta
-.No "program to exec when name obtained"
+.It "lnstr" Ta So Li ^V
+.Sc Ta No "``literal next'' character"
+.It "lostr" Ta Pa /usr/bin/login
+.Ta No "program to exec when name obtained"
 .It "mbboolfalse   do flow control based on carrier"
 .It "ncboolfalse   terminal does not supply carrier (set clocal)"
 .It "nlboolfalse   terminal has (or might have) a newline 
character"
@@ -153,8 +153,8 @@ hangup line on last close
 .It "o2num unused  tty output flags to leave terminal as"
 .It "opboolfalse   terminal uses odd parity"
 .It "osnum unused  output speed"
-.It "pcstr" Ta So Li \e0 Sc Ta
-.No "pad character"
+.It "pcstr" Ta So Li \e0
+.Sc Ta No "pad character"
 .It "peboolfalse   use printer (hard copy) erase algorithm"
 .It "pfnum 0   delay"
 between first prompt and following flush (seconds)
@@ -165,25 +165,25 @@ is specified
 .It "psboolfalse   line connected to a"
 .Tn MICOM
 port selector
-.It "qustr" Ta So Li \&^\e Sc Ta
-.No "quit character"
-.It "rpstr" Ta So Li ^R Sc Ta
-.No "line rety

svn commit: r317802 - in head/contrib/blacklist: . bin etc/rc.d lib libexec port

2017-05-04 Thread Kurt Lidl
Author: lidl
Date: Thu May  4 19:07:37 2017
New Revision: 317802
URL: https://svnweb.freebsd.org/changeset/base/317802

Log:
  Merge latest version of blacklist sources from NetBSD (@ 20170503)
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Replaced:
  head/contrib/blacklist/port/config.h   (contents, props changed)
Modified:
  head/contrib/blacklist/README
  head/contrib/blacklist/bin/blacklistctl.8
  head/contrib/blacklist/bin/blacklistctl.c
  head/contrib/blacklist/bin/blacklistd.c
  head/contrib/blacklist/bin/blacklistd.conf.5
  head/contrib/blacklist/etc/rc.d/blacklistd
  head/contrib/blacklist/lib/bl.c
  head/contrib/blacklist/lib/libblacklist.3
  head/contrib/blacklist/libexec/blacklistd-helper
  head/contrib/blacklist/port/Makefile.am
  head/contrib/blacklist/port/sockaddr_snprintf.c
Directory Properties:
  head/contrib/blacklist/   (props changed)

Modified: head/contrib/blacklist/README
==
--- head/contrib/blacklist/README   Thu May  4 19:01:17 2017
(r317801)
+++ head/contrib/blacklist/README   Thu May  4 19:07:37 2017
(r317802)
@@ -1,4 +1,4 @@
-# $NetBSD: README,v 1.7 2015/01/26 00:34:50 christos Exp $
+# $NetBSD: README,v 1.8 2017/04/13 17:59:34 christos Exp $
 
 This package contains library that can be used by network daemons to
 communicate with a packet filter via a daemon to enforce opening and
@@ -98,6 +98,16 @@ group "internal" on $int_if {
...
 }
 
+You can use 'blacklistctl dump -a' to list all the current entries
+in the database; the ones that have nfail / where urrent
+>= otal, should have an id assosiated with them; this means that
+there is a packet filter rule added for that entry. For npf, you
+can examine the packet filter dynamic rule entries using 'npfctl
+rule  list'.  The number of current entries can exceed
+the total. This happens because entering packet filter rules is
+asynchronous; there could be other connection before the rule
+becomes activated.
+
 Enjoy,
 
 christos

Modified: head/contrib/blacklist/bin/blacklistctl.8
==
--- head/contrib/blacklist/bin/blacklistctl.8   Thu May  4 19:01:17 2017
(r317801)
+++ head/contrib/blacklist/bin/blacklistctl.8   Thu May  4 19:07:37 2017
(r317802)
@@ -1,4 +1,4 @@
-.\" $NetBSD: blacklistctl.8,v 1.7 2015/04/30 06:20:43 riz Exp $
+.\" $NetBSD: blacklistctl.8,v 1.9 2016/06/08 12:48:37 wiz Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -77,7 +77,8 @@ it to make sure that there is only one r
 .Nm
 first appeared in
 .Nx 7 .
-.Fx support for
+.Fx
+support for
 .Nm
 was implemented in
 .Fx 11 .

Modified: head/contrib/blacklist/bin/blacklistctl.c
==
--- head/contrib/blacklist/bin/blacklistctl.c   Thu May  4 19:01:17 2017
(r317801)
+++ head/contrib/blacklist/bin/blacklistctl.c   Thu May  4 19:07:37 2017
(r317802)
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $   
*/
+/* $NetBSD: blacklistctl.c,v 1.21 2016/11/02 03:15:07 jnemeth Exp $
*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: blacklistctl.c,v 1.20 2016/04/04 15:52:56 christos Exp $");
+__RCSID("$NetBSD: blacklistctl.c,v 1.21 2016/11/02 03:15:07 jnemeth Exp $");
 
 #include 
 #include 

Modified: head/contrib/blacklist/bin/blacklistd.c
==
--- head/contrib/blacklist/bin/blacklistd.c Thu May  4 19:01:17 2017
(r317801)
+++ head/contrib/blacklist/bin/blacklistd.c Thu May  4 19:07:37 2017
(r317802)
@@ -1,4 +1,4 @@
-/* $NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $ */
+/* $NetBSD: blacklistd.c,v 1.37 2017/02/18 00:26:16 christos Exp $ */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "config.h"
 #endif
 #include 
-__RCSID("$NetBSD: blacklistd.c,v 1.35 2016/09/26 19:43:43 christos Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.37 2017/02/18 00:26:16 christos Exp $");
 
 #include 
 #include 
@@ -403,12 +403,14 @@ int
 main(int argc, char *argv[])
 {
int c, tout, flags, flush, restore, ret;
-   const char *spath, *blsock;
+   const char *spath, **blsock;
+   size_t nblsock, maxblsock;
 
setprogname(argv[0]);
 
spath = NULL;
-   blsock = _PATH_BLSOCK;
+   blsock = NULL;
+   maxblsock = nblsock = 0;
flush = 0;
restore = 0;
tout = 0;
@@ -440,7 +442,17 @@ main(int argc, char *argv[])
restore++;
break;
case 's':
-   blsock = optarg;
+   if (nblsock >= maxblsock) {
+ 

svn commit: r317803 - head/etc/autofs

2017-05-04 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu May  4 19:16:36 2017
New Revision: 317803
URL: https://svnweb.freebsd.org/changeset/base/317803

Log:
  Enable automounting of exFAT media.
  
  With fstyp(8) being updated to detect exfat in base r312003, it seems
  like a good time to add support for auto-mounting SDXC cards -- which
  use exfat by default.
  
  The user will need to locally compile and install sysutils/fusefs-exfat
  for this to succeed; logs a message to that effect when not installed.
  
  PR:   218743
  Submitted by: eborisch+free...@gmail.com
  MFC after:2 weeks

Modified:
  head/etc/autofs/special_media

Modified: head/etc/autofs/special_media
==
--- head/etc/autofs/special_media   Thu May  4 19:07:37 2017
(r317802)
+++ head/etc/autofs/special_media   Thu May  4 19:16:36 2017
(r317803)
@@ -39,6 +39,15 @@ print_map_entry() {
_p="$2"
 
case "${_fstype}" in
+   "exfat")
+   if [ -f "/usr/local/sbin/mount.exfat" ]; then
+   echo 
"-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid   :/dev/${_p}" 
+   else
+   /usr/bin/logger -p info -t "special_media[$$]" \
+   "Cannot mount ${_fstype} formatted device 
/dev/${_p}: Install sysutils/fusefs-exfat first"
+   exit 1
+   fi
+   ;;
"ntfs")
if [ -f "/usr/local/bin/ntfs-3g" ]; then
echo 
"-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid:/dev/${_p}" 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317804 - head/usr.sbin/autofs

2017-05-04 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu May  4 19:41:19 2017
New Revision: 317804
URL: https://svnweb.freebsd.org/changeset/base/317804

Log:
  Make automount(8) error out when the map name is missing.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/autofs/common.c

Modified: head/usr.sbin/autofs/common.c
==
--- head/usr.sbin/autofs/common.c   Thu May  4 19:16:36 2017
(r317803)
+++ head/usr.sbin/autofs/common.c   Thu May  4 19:41:19 2017
(r317804)
@@ -224,6 +224,7 @@ node_new_map(struct node *parent, char *
n->n_options = options;
else
n->n_options = strdup("");
+   assert(map != NULL);
n->n_map = map;
assert(config_file != NULL);
n->n_config_file = config_file;
@@ -1122,6 +1123,10 @@ parse_master_yyin(struct node *root, con
ret = yylex();
if (ret == 0 || ret == NEWLINE) {
if (mountpoint != NULL) {
+   if (map == NULL) {
+   log_errx(1, "missing map name "
+   "at %s, line %d", master, lineno);
+   }
//log_debugx("adding map for %s", mountpoint);
node_new_map(root, mountpoint, options, map,
master, lineno);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317805 - head/usr.sbin/autofs

2017-05-04 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu May  4 19:55:32 2017
New Revision: 317805
URL: https://svnweb.freebsd.org/changeset/base/317805

Log:
  Revert r317804; apparently I forgot the auto_master syntax.
  
  MFC after:2 weeks

Modified:
  head/usr.sbin/autofs/common.c

Modified: head/usr.sbin/autofs/common.c
==
--- head/usr.sbin/autofs/common.c   Thu May  4 19:41:19 2017
(r317804)
+++ head/usr.sbin/autofs/common.c   Thu May  4 19:55:32 2017
(r317805)
@@ -224,7 +224,6 @@ node_new_map(struct node *parent, char *
n->n_options = options;
else
n->n_options = strdup("");
-   assert(map != NULL);
n->n_map = map;
assert(config_file != NULL);
n->n_config_file = config_file;
@@ -1123,10 +1122,6 @@ parse_master_yyin(struct node *root, con
ret = yylex();
if (ret == 0 || ret == NEWLINE) {
if (mountpoint != NULL) {
-   if (map == NULL) {
-   log_errx(1, "missing map name "
-   "at %s, line %d", master, lineno);
-   }
//log_debugx("adding map for %s", mountpoint);
node_new_map(root, mountpoint, options, map,
master, lineno);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317806 - head/sys/dev/nand

2017-05-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu May  4 20:42:31 2017
New Revision: 317806
URL: https://svnweb.freebsd.org/changeset/base/317806

Log:
  The nandsim(4) simulator driver doesn't have any protection against
  races at least in its ioctl handler, and at the same time it creates
  device entry with 0666 permissions.
  
  To plug possible issues in it:
  - Mark it as needing Giant.
  - Switch device mode to 0600.
  
  Submitted by: C Turt
  Reviewed by:  imp
  MFC after:1 week
  Security: Possible double free in ioctl handler

Modified:
  head/sys/dev/nand/nandsim.c

Modified: head/sys/dev/nand/nandsim.c
==
--- head/sys/dev/nand/nandsim.c Thu May  4 19:55:32 2017(r317805)
+++ head/sys/dev/nand/nandsim.c Thu May  4 20:42:31 2017(r317806)
@@ -71,6 +71,7 @@ static struct nandsim_chip *get_nandsim_
 
 static struct cdevsw nandsim_cdevsw = {
.d_version =D_VERSION,
+   .d_flags =  D_NEEDGIANT,
.d_ioctl =  nandsim_ioctl,
.d_name =   "nandsim",
 };
@@ -639,7 +640,7 @@ nandsim_modevent(module_t mod __unused, 
switch (type) {
case MOD_LOAD:
nandsim_dev = make_dev(&nandsim_cdevsw, 0,
-   UID_ROOT, GID_WHEEL, 0666, "nandsim.ioctl");
+   UID_ROOT, GID_WHEEL, 0600, "nandsim.ioctl");
break;
case MOD_UNLOAD:
for (i = 0; i < MAX_SIM_DEV; i++) {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317809 - head/share/man/man7

2017-05-04 Thread Konstantin Belousov
Author: kib
Date: Thu May  4 21:31:50 2017
New Revision: 317809
URL: https://svnweb.freebsd.org/changeset/base/317809

Log:
  Provide introduction for the arch(7) manpage.
  
  Start with some words about linear address space and its layout, then
  explain pointers models and ABIs, providing explanation to the
  structure of the tables.
  
  Reviewed by:  emaste, imp
  'Future-proof' cheri wording by:  brooks
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D10596

Modified:
  head/share/man/man7/arch.7

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Thu May  4 21:30:26 2017(r317808)
+++ head/share/man/man7/arch.7  Thu May  4 21:31:50 2017(r317809)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 3, 2017
+.Dd May 4, 2017
 .Dt ARCH 7
 .Os
 .Sh NAME
@@ -35,9 +35,92 @@
 .Sh DESCRIPTION
 Differences between CPU architectures and platforms supported by
 .Fx .
-.Pp
+.Ss Introduction
 If not explicitly mentioned, sizes are in bytes.
+.Pp
+FreeBSD uses flat address space for program execution, where
+pointers have the same binary representation as
+.Vt unsigned long
+variables, and
+.Vt uintptr_t
+and
+.Vt size_t
+types are synonyms for
+.Vt unsigned long .
+.Pp
+In order to maximize compatibility with future pointer integrity mechanisms,
+manipulations of pointers as integers should be performed via
+.Vt uintptr_t
+or
+.Vt intptr_t
+and no other types.
+In particular,
+.Vt long
+and
+.Vt ptrdiff_t
+should be avoided.
+.Pp
+On some architectures, e.g.
+.Dv sparc64 ,
+.Dv powerpc
+and AIM variants of
+.Dv powerpc64 ,
+the kernel uses a separate address space.
+On other architectures, kernel and a user mode process share a
+single address space.
+The kernel is located at the highest addresses.
+.Pp
+On each architecture, the main user mode thread's stack starts near
+the highest user address and grows down.
 .Ss Type sizes
+All FreeBSD architectures use some variant of the ELF (see
+.Xr elf 5 )
+.Sy Application Binary Interface
+(ABI) for the machine processor.
+All supported ABIs can be divided into two groups:
+.Bl -tag -width "Dv ILP32"
+.It Dv ILP32
+.Vt int ,
+.Vt long ,
+.Vt void *
+types machine representations all have 4-byte size.
+.It Dv LP64
+.Vt int
+type machine representation uses 4 bytes,
+while
+.Vt long
+and
+.Vt void *
+are 8 bytes.
+.El
+Compilers define
+.Dv _LP64
+symbol when compiling for an
+.Dv LP64
+ABI.
+.Pp
+Some machines support more that one FreeBSD ABI.
+Typically these are 64-bit machines, where the
+.Dq native
+.Dv LP64
+execution environment is accompanied by the
+.Dq legacy
+.Dv ILP32
+environment, which was historical 32-bit predecessor for 64-bit evolution.
+Examples are:
+.Bl -column -offset indent "powerpc64" "Sy ILP32 counterpart"
+.It Sy LP64Ta Sy ILP32 counterpart
+.It Dv amd64   Ta Dv i386
+.It Dv powerpc64   Ta Dv powerpc
+.It Dv mips64* Ta Dv mips*
+.El
+.Dv arm64
+currently does not support execution of
+.Dv armv6
+binaries, even if the CPU implements
+.Dv AArch32
+execution state.
+.Pp
 On all supported architectures:
 .Bl -column -offset -indent "long long" "Size"
 .It Sy Type Ta Sy Size
@@ -48,6 +131,9 @@ On all supported architectures:
 .It float Ta 4
 .It double Ta 8
 .El
+Integers are represented as two-complement.
+Alignment of integer and pointer types is natural, that is,
+the address of the variable must be congruent to zero modulo type size.
 .Pp
 Machine-dependent type sizes:
 .Bl -column -offset indent "Sy Architecture" "Sy void *" "Sy long double" "Sy 
time_t"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317810 - head/contrib/llvm/lib/Target/PowerPC

2017-05-04 Thread Dimitry Andric
Author: dim
Date: Thu May  4 21:40:16 2017
New Revision: 317810
URL: https://svnweb.freebsd.org/changeset/base/317810

Log:
  Pull in r302183 from upstream llvm trunk (by Krzysztof Parzyszek):
  
[PPC] When restoring R30 (PIC base pointer), mark it as 
  
This happened on the PPC32/SVR4 path and was discovered when building
FreeBSD on PPC32. It was a typo-class error in the frame lowering
code.
  
This fixes PR26519.
  
  Reported by:  Mark Millard
  PR:   206990
  MFC after:3 days

Modified:
  head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp

Modified: head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
==
--- head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp   Thu May  4 
21:31:50 2017(r317809)
+++ head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp   Thu May  4 
21:40:16 2017(r317810)
@@ -1467,8 +1467,7 @@ void PPCFrameLowering::emitEpilogue(Mach
   }
 
   if (FI->usesPICBase())
-BuildMI(MBB, MBBI, dl, LoadInst)
-  .addReg(PPC::R30)
+BuildMI(MBB, MBBI, dl, LoadInst, PPC::R30)
   .addImm(PBPOffset)
   .addReg(RBReg);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317811 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 22:47:18 2017
New Revision: 317811
URL: https://svnweb.freebsd.org/changeset/base/317811

Log:
  Fix triple-finger taps reported as double-finger for Elan hw v.4 touchpads
  
  Wait for all advertised head packets after status packet have been received.
  This fixes rare but quite annoying issue in Elan hw v.4 touchpads support
  when triple-finger taps are reported as double-finger taps under several
  circumstances.
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 21:40:16 2017(r317810)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 22:47:18 2017(r317811)
@@ -366,6 +366,7 @@ enum {
 typedef struct elantechaction {
finger_tfingers[ELANTECH_MAX_FINGERS];
int mask;
+   int mask_v4wait;
 } elantechaction_t;
 
 /* driver control block */
@@ -3879,9 +3880,15 @@ proc_elantech(struct psm_softc *sc, pack
mask = pb->ipacket[1] & 0x1f;
nfingers = bitcount(mask);
 
+   if (sc->elanaction.mask_v4wait != 0)
+   VLOG(3, (LOG_DEBUG, "elantech: HW v4 status packet"
+   " when not all previous head packets received\n"));
+
+   /* Bitmap of fingers to receive before gesture processing */
+   sc->elanaction.mask_v4wait = mask & ~sc->elanaction.mask;
+
/* Skip "new finger is on touchpad" packets */
-   if ((sc->elanaction.mask & mask) == sc->elanaction.mask &&
-   (mask & ~sc->elanaction.mask)) {
+   if (sc->elanaction.mask_v4wait) {
sc->elanaction.mask = mask;
return (0);
}
@@ -3906,11 +3913,33 @@ proc_elantech(struct psm_softc *sc, pack
mask = sc->elanaction.mask;
nfingers = bitcount(mask);
id = ((pb->ipacket[3] & 0xe0) >> 5) - 1;
+   fn = ELANTECH_FINGER_SET_XYP(pb);
+   fn.w =(pb->ipacket[0] & 0xf0) >> 4;
 
-   if (id >= 0 && id < ELANTECH_MAX_FINGERS) {
-   f[id] = ELANTECH_FINGER_SET_XYP(pb);
-   f[id].w = (pb->ipacket[0] & 0xf0) >> 4;
+   if (id < 0)
+   return (0);
+
+   /* Packet is finger position update. Report it */
+   if (sc->elanaction.mask_v4wait == 0) {
+   if (id < ELANTECH_MAX_FINGERS)
+   f[id] = fn;
+   break;
}
+
+   /* Remove finger from waiting bitmap and store into context */
+   sc->elanaction.mask_v4wait &= ~(1 << id);
+   if (id < ELANTECH_MAX_FINGERS)
+   sc->elanaction.fingers[id] = fn;
+
+   /* Wait for other fingers if needed */
+   if (sc->elanaction.mask_v4wait != 0)
+   return (0);
+
+   /* All new fingers are received. Report them from context */
+   for (id = 0; id < ELANTECH_MAX_FINGERS; id++)
+   if (sc->elanaction.mask & (1 << id))
+   f[id] =  sc->elanaction.fingers[id];
+
break;
 
case ELANTECH_PKT_V4_MOTION:/* HW Version 4. Motion packet */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317812 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 22:51:22 2017
New Revision: 317812
URL: https://svnweb.freebsd.org/changeset/base/317812

Log:
  Reduce default tap_min_queue size for Elan touchpads
  
  Elan hw v.4 touchpads often sends touchpad release packet right after
  touchpad touch one. Most probably this happens due to PS/2 limited bandwith.
  Reducing of tap_min_queue size to 1 makes multifinger tap detection
  more reliable in this case.
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 22:47:18 2017(r317811)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 22:51:22 2017(r317812)
@@ -6218,6 +6218,9 @@ elantech_init_synaptics(struct psm_softc
/* Disable finger detection pressure threshold */
sc->syninfo.min_pressure = 1;
 
+   /* Elans often report double & triple taps as single event */
+   sc->syninfo.tap_min_queue = 1;
+
/* Use full area of touchpad */
sc->syninfo.margin_top = 0;
sc->syninfo.margin_right = 0;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317813 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 22:53:45 2017
New Revision: 317813
URL: https://svnweb.freebsd.org/changeset/base/317813

Log:
  Adjust Elantech palm width threshold to nearly match synaptics defaults
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 22:51:22 2017(r317812)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 22:53:45 2017(r317813)
@@ -6218,6 +6218,9 @@ elantech_init_synaptics(struct psm_softc
/* Disable finger detection pressure threshold */
sc->syninfo.min_pressure = 1;
 
+   /* Adjust palm width to nearly match synaptics w=10 */
+   sc->syninfo.max_width = 7;
+
/* Elans often report double & triple taps as single event */
sc->syninfo.tap_min_queue = 1;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317814 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 23:02:34 2017
New Revision: 317814
URL: https://svnweb.freebsd.org/changeset/base/317814

Log:
  psm(4): reduce cursor jumping on palm detection
  
  This is done with discarding pointer movements rather then mouse packets
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 22:53:45 2017(r317813)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 23:02:34 2017(r317814)
@@ -3017,13 +3017,15 @@ proc_synaptics(struct psm_softc *sc, pac
 
ms->button = touchpad_buttons;
 
+   psmgestures(sc, &f[0], nfingers, ms);
+   for (id = 0; id < PSM_FINGERS; id++)
+   psmsmoother(sc, &f[id], id, ms, x, y);
+
/* Palm detection doesn't terminate the current action. */
-   if (!psmpalmdetect(sc, &f[0], nfingers)) {
-   psmgestures(sc, &f[0], nfingers, ms);
-   for (id = 0; id < PSM_FINGERS; id++)
-   psmsmoother(sc, &f[id], id, ms, x, y);
-   } else {
-   VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", 
f[0].w));
+   if (psmpalmdetect(sc, &f[0], nfingers)) {
+   *x = *y = *z = 0;
+   ms->button = ms->obutton;
+   return (0);
}
 
ms->button |= extended_buttons | guest_buttons;
@@ -3077,6 +3079,7 @@ psmpalmdetect(struct psm_softc *sc, fing
 *[min_pressure; max_pressure]
 *  - pen aren't supported but PSM_FINGER_IS_PEN is set
 */
+   VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f->w));
return (1);
}
return (0);
@@ -4035,20 +4038,14 @@ proc_elantech(struct psm_softc *sc, pack
 
ms->button = touchpad_button | trackpoint_button;
 
-   /* Palm detection doesn't terminate the current action. */
-   if (!psmpalmdetect(sc, &f[0], nfingers)) {
-   /* Send finger 1 position to gesture processor */
-   if (PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) ||
-   nfingers == 0)
-   psmgestures(sc, &f[0], imin(nfingers, 3), ms);
-   /* Send fingers positions to movement smoothers */
-   for (id = 0; id < PSM_FINGERS; id++)
-   if (PSM_FINGER_IS_SET(f[id]) || !(mask & (1 << id)))
-   psmsmoother(sc, &f[id], id, ms, x, y);
-   } else {
-   VLOG(2, (LOG_DEBUG, "elantech: palm detected! (%d)\n",
-   f[0].w));
-   }
+   /* Send finger 1 position to gesture processor */
+   if (PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) ||
+   nfingers == 0)
+   psmgestures(sc, &f[0], imin(nfingers, 3), ms);
+   /* Send fingers positions to movement smoothers */
+   for (id = 0; id < PSM_FINGERS; id++)
+   if (PSM_FINGER_IS_SET(f[id]) || !(mask & (1 << id)))
+   psmsmoother(sc, &f[id], id, ms, x, y);
 
/* Store current finger positions in action context */
for (id = 0; id < ELANTECH_MAX_FINGERS; id++) {
@@ -4059,6 +4056,13 @@ proc_elantech(struct psm_softc *sc, pack
}
sc->elanaction.mask = mask;
 
+   /* Palm detection doesn't terminate the current action. */
+   if (psmpalmdetect(sc, &f[0], nfingers)) {
+   *x = *y = *z = 0;
+   ms->button = ms->obutton;
+   return (0);
+   }
+
/* Use the extra buttons as a scrollwheel */
if (ms->button & MOUSE_BUTTON4DOWN)
*z = -1;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317815 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 23:04:52 2017
New Revision: 317815
URL: https://svnweb.freebsd.org/changeset/base/317815

Log:
  Enable palm detection on two finger touches for multitouch trackpads.
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 23:02:34 2017(r317814)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 23:04:52 2017(r317815)
@@ -3065,8 +3065,9 @@ static int
 psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers)
 {
if (!(
-   ((sc->synhw.capMultiFinger ||
- sc->synhw.capAdvancedGestures) && nfingers > 1) ||
+   ((sc->synhw.capMultiFinger || sc->synhw.capAdvancedGestures) &&
+ !sc->synhw.capReportsV && nfingers > 1) ||
+   (sc->synhw.capReportsV && nfingers > 2) ||
(sc->synhw.capPalmDetect && f->w <= sc->syninfo.max_width) ||
(!sc->synhw.capPalmDetect && f->p <= sc->syninfo.max_pressure) ||
(sc->synhw.capPen && f->flags & PSM_FINGER_IS_PEN))) {
@@ -6188,7 +6189,10 @@ elantech_init_synaptics(struct psm_softc
sc->synhw.capPassthrough = sc->elanhw.hastrackpoint;
sc->synhw.capClickPad = sc->elanhw.isclickpad;
sc->synhw.capMultiFinger = 1;
-   sc->synhw.capAdvancedGestures = 1;
+   if (sc->elanhw.issemimt)
+   sc->synhw.capAdvancedGestures = 1;
+   else
+   sc->synhw.capReportsV = 1;
sc->synhw.capPalmDetect = 1;
sc->synhw.capPen = 0;
sc->synhw.capReportsMax = 1;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317816 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 23:08:55 2017
New Revision: 317816
URL: https://svnweb.freebsd.org/changeset/base/317816

Log:
  Report 3-rd and 4-th fingers as first finger for Elan hw v.2 and v.3 as
  Linux does. It should not affect gesture processing in current state as it
  ignores finger coords on 3-finger tap detection but it should make evdev
  reports looking more Linux-alike.
  
  Reviewed by:  gonzo
  Approved by:  gonzo
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 23:04:52 2017(r317815)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 23:08:55 2017(r317816)
@@ -3772,27 +3772,30 @@ proc_elantech(struct psm_softc *sc, pack
nfingers = (pb->ipacket[0] & 0xc0) >> 6;
if (nfingers == 3 && (pb->ipacket[3] & 0x80))
nfingers = 4;
-   mask = (1 << nfingers) - 1;
 
-   fn = ELANTECH_FINGER_SET_XYP(pb);
+   if (nfingers == 0) {
+   mask = (1 << nfingers) - 1; /* = 0x00 */
+   break;
+   }
+
+   /* Map 3-rd and 4-th fingers to first finger */
+   mask = (1 << 1) - 1;/* = 0x01 */
+   f[0] = ELANTECH_FINGER_SET_XYP(pb);
if (sc->elanhw.haspressure) {
-   fn.w = ((pb->ipacket[0] & 0x30) >> 2) |
+   f[0].w = ((pb->ipacket[0] & 0x30) >> 2) |
((pb->ipacket[3] & 0x30) >> 4);
} else {
-   fn.p = PSM_FINGER_DEFAULT_P;
-   fn.w = PSM_FINGER_DEFAULT_W;
+   f[0].p = PSM_FINGER_DEFAULT_P;
+   f[0].w = PSM_FINGER_DEFAULT_W;
}
 
/*
 * HW v2 dont report exact finger positions when 3 or more
-* fingers are on touchpad. Use reported value as fingers
-* position as it is required for tap detection
+* fingers are on touchpad.
 */
if (nfingers > 2)
-   fn.flags = PSM_FINGER_FUZZY;
+   f[0].flags = PSM_FINGER_FUZZY;
 
-   for (id = 0; id < imin(nfingers, ELANTECH_MAX_FINGERS); id++)
-   f[id] = fn;
break;
 
case ELANTECH_PKT_V2_2FINGER:   /*HW V2. Two finger touch */
@@ -3838,8 +3841,12 @@ proc_elantech(struct psm_softc *sc, pack
 * ---
 */
nfingers = (pb->ipacket[0] & 0xc0) >> 6;
-   mask = (1 << nfingers) - 1;
-   id = nfingers - 1;
+   /* Map 3-rd finger to first finger */
+   id = nfingers > 2 ? 0 : nfingers - 1;
+   mask = (1 << (id + 1)) - 1;
+
+   if (nfingers == 0)
+   break;
 
fn = ELANTECH_FINGER_SET_XYP(pb);
fn.w = ((pb->ipacket[0] & 0x30) >> 2) |
@@ -3847,15 +3854,11 @@ proc_elantech(struct psm_softc *sc, pack
 
/*
 * HW v3 dont report exact finger positions when 3 or more
-* fingers are on touchpad. Use reported value as fingers
-* position as it is required for tap detection
+* fingers are on touchpad.
 */
if (nfingers > 1)
fn.flags = PSM_FINGER_FUZZY;
 
-   for (id = 0; id < imin(nfingers, ELANTECH_MAX_FINGERS); id++)
-   f[id] = fn;
-
if (nfingers == 2) {
if (ELANTECH_PKT_IS_V3_HEAD(pb, sc->elanhw.hascrc)) {
sc->elanaction.fingers[0] = fn;
@@ -3863,6 +3866,7 @@ proc_elantech(struct psm_softc *sc, pack
} else
f[0] = sc->elanaction.fingers[0];
}
+   f[id] = fn;
break;
 
case ELANTECH_PKT_V4_STATUS:/* HW Version 4. Status packet */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317817 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 23:12:45 2017
New Revision: 317817
URL: https://svnweb.freebsd.org/changeset/base/317817

Log:
  Set predefined logical touchpad sizes for several ancient Elan hw v.2
  models. This change is based on Linux driver.
  Determine logical trace size. It used for calculation of touch sizes
  in surface units for MT-protocol type B evdev reports.
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 23:08:55 2017(r317816)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 23:12:45 2017(r317817)
@@ -300,6 +300,8 @@ typedef struct elantechhw {
int dpmmy;
int ntracesx;
int ntracesy;
+   int dptracex;
+   int dptracey;
int issemimt;
int isclickpad;
int hascrc;
@@ -6280,8 +6282,17 @@ enable_elantech(struct psm_softc *sc, en
static const int ic2hw[] =
/*IC: 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f */
{ 0, 0, 2, 0, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0 };
+   static const int fw_sizes[][3] = {
+   /* FW.vers  MaxX  MaxY */
+   { 0x020030, 1152,  768 },
+   { 0x020800, 1152,  768 },
+   { 0x020b00, 1152,  768 },
+   { 0x040215,  900,  500 },
+   { 0x040216,  819,  405 },
+   { 0x040219,  900,  500 },
+   };
elantechhw_t elanhw;
-   int icversion, hwversion, dptracex, dptracey, id, resp[3], dpix, dpiy;
+   int icversion, hwversion, xtr, i, id, resp[3], dpix, dpiy;
KBDC kbdc = sc->kbdc;
 
VLOG(3, (LOG_DEBUG, "elantech: BEGIN init\n"));
@@ -6332,8 +6343,8 @@ enable_elantech(struct psm_softc *sc, en
return (FALSE);
}
 
-   elanhw.ntracesx = resp[1] - 1;
-   elanhw.ntracesy = resp[2] - 1;
+   elanhw.ntracesx = imax(resp[1], 3);
+   elanhw.ntracesy = imax(resp[2], 3);
elanhw.hastrackpoint = (resp[0] & 0x80) != 0;
 
/* Get the touchpad resolution */
@@ -6367,24 +6378,35 @@ enable_elantech(struct psm_softc *sc, en
 * On HW v.3 touchpads it should be done after switching hardware
 * to real resolution mode (by setting bit 3 of reg10)
 */
+   elanhw.dptracex = elanhw.dptracey = 64;
+   for (i = 0; i < nitems(fw_sizes); i++) {
+   if (elanhw.fwversion == fw_sizes[i][0]) {
+   elanhw.sizex = fw_sizes[i][1];
+   elanhw.sizey = fw_sizes[i][2];
+   goto found;
+   }
+   }
if (elantech_cmd(kbdc, hwversion, ELANTECH_FW_ID, resp) != 0) {
printf("  Failed to read touchpad size\n");
elanhw.sizex = 1; /* Arbitrary high values to */
elanhw.sizey = 1; /* prevent clipping in smoother */
} else if (hwversion == 2) {
-   dptracex = dptracey = 64;
if ((elanhw.fwversion >> 16) == 0x14 && (resp[1] & 0x10) &&
!elantech_cmd(kbdc, hwversion, ELANTECH_SAMPLE, resp)) {
-   dptracex = resp[1] / 2;
-   dptracey = resp[2] / 2;
+   elanhw.dptracex = resp[1] / 2;
+   elanhw.dptracey = resp[2] / 2;
}
-   elanhw.sizex = (elanhw.ntracesx - 1) * dptracex;
-   elanhw.sizey = (elanhw.ntracesy - 1) * dptracey;
+   xtr = ((elanhw.fwversion >> 8) == 0x0208) ? 1 : 2;
+   elanhw.sizex = (elanhw.ntracesx - xtr) * elanhw.dptracex;
+   elanhw.sizey = (elanhw.ntracesy - xtr) * elanhw.dptracey;
} else {
elanhw.sizex = (resp[0] & 0x0f) << 8 | resp[1];
elanhw.sizey = (resp[0] & 0xf0) << 4 | resp[2];
+   xtr = (elanhw.sizex % (elanhw.ntracesx - 2) == 0) ? 2 : 1;
+   elanhw.dptracex = elanhw.sizex / (elanhw.ntracesx - xtr);
+   elanhw.dptracey = elanhw.sizey / (elanhw.ntracesy - xtr);
}
-
+found:
if (verbose >= 2) {
printf("  Model information:\n");
printf("   MaxX:   %d\n", elanhw.sizex);
@@ -6393,6 +6415,8 @@ enable_elantech(struct psm_softc *sc, en
printf("   DpmmY:  %d\n", elanhw.dpmmy);
printf("   TracesX:%d\n", elanhw.ntracesx);
printf("   TracesY:%d\n", elanhw.ntracesy);
+   printf("   DptraceX:   %d\n", elanhw.dptracex);
+   printf("   DptraceY:   %d\n", elanhw.dptracey);
printf("   SemiMT: %d\n", elanhw.isse

svn commit: r317818 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 23:17:21 2017
New Revision: 317818
URL: https://svnweb.freebsd.org/changeset/base/317818

Log:
  psm(4): Remove sys/libkern.h header inclusion
  
  It is already included via sys/systm.h
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D10266

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 23:12:45 2017(r317817)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 23:17:21 2017(r317818)
@@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317819 - head/sys/dev/atkbdc

2017-05-04 Thread Vladimir Kondratyev
Author: wulf
Date: Thu May  4 23:19:27 2017
New Revision: 317819
URL: https://svnweb.freebsd.org/changeset/base/317819

Log:
  Reduce synaptics touch sensitivity
  
  Increase hw.psm.synaptics.min_pressure default value from 16 to 32
  to nearly match Linux driver (30-35 hysteresis loop).
  This makes libinput tap detection more reliable.
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Thu May  4 23:17:21 2017(r317818)
+++ head/sys/dev/atkbdc/psm.c   Thu May  4 23:19:27 2017(r317819)
@@ -5093,7 +5093,7 @@ synaptics_sysctl_create_tree(struct psm_
"Enable two finger scrolling");
 
/* hw.psm.synaptics.min_pressure. */
-   sc->syninfo.min_pressure = 16;
+   sc->syninfo.min_pressure = 32;
SYSCTL_ADD_PROC(&sc->syninfo.sysctl_ctx,
SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO,
"min_pressure", CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY,
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r317820 - head/sys/dev/cxgbe

2017-05-04 Thread Navdeep Parhar
Author: np
Date: Fri May  5 00:54:23 2017
New Revision: 317820
URL: https://svnweb.freebsd.org/changeset/base/317820

Log:
  cxgbe(4): Update the list of PCIe devices claimed by the driver.  At
  this point any board with a T6 should just work.
  
  Obtained from:Chelsio Communications
  MFC after:1 week
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_iov.c
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_iov.c
==
--- head/sys/dev/cxgbe/t4_iov.c Thu May  4 23:19:27 2017(r317819)
+++ head/sys/dev/cxgbe/t4_iov.c Fri May  5 00:54:23 2017(r317820)
@@ -92,11 +92,25 @@ struct {
{0x5013,  "Chelsio T580-CHR"},
 #endif
 }, t6iov_pciids[] = {
+   {0x6000, "Chelsio T6-DBG-25"},  /* 2 x 10/25G, debug */
{0x6001, "Chelsio T6225-CR"},   /* 2 x 10/25G */
{0x6002, "Chelsio T6225-SO-CR"},/* 2 x 10/25G, nomem */
+   {0x6003, "Chelsio T6425-CR"},   /* 4 x 10/25G */
+   {0x6004, "Chelsio T6425-CR"},   /* 4 x 10/25G, nomem */
+   {0x6005, "Chelsio T6225-OCP-SO"},   /* 2 x 10/25G, nomem */
+   {0x6006, "Chelsio T62100-OCP-SO"},  /* 2 x 40/50/100G, nomem */
{0x6007, "Chelsio T62100-LP-CR"},   /* 2 x 40/50/100G */
{0x6008, "Chelsio T62100-SO-CR"},   /* 2 x 40/50/100G, nomem */
+   {0x6009, "Chelsio T6210-BT"},   /* 2 x 10GBASE-T */
{0x600d, "Chelsio T62100-CR"},  /* 2 x 40/50/100G */
+   {0x6010, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */
+   {0x6011, "Chelsio T6225-LL-CR"},/* 2 x 10/25G */
+   {0x6014, "Chelsio T61100-OCP-SO"},  /* 1 x 40/50/100G, nomem */
+   {0x6015, "Chelsio T6201-BT"},   /* 2 x 1000BASE-T */
+
+   /* Custom */
+   {0x6080, "Chelsio T6225 80"},
+   {0x6081, "Chelsio T62100 81"},
 };
 
 static int t4iov_attach_child(device_t dev);

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cThu May  4 23:19:27 2017
(r317819)
+++ head/sys/dev/cxgbe/t4_main.cFri May  5 00:54:23 2017
(r317820)
@@ -623,13 +623,25 @@ struct {
 #endif
 }, t6_pciids[] = {
{0xc006, "Chelsio Terminator 6 FPGA"},  /* T6 PE10K6 FPGA (PF0) */
-   {0x6400, "Chelsio T6225-DBG"},  /* 2 x 10/25G, debug */
+   {0x6400, "Chelsio T6-DBG-25"},  /* 2 x 10/25G, debug */
{0x6401, "Chelsio T6225-CR"},   /* 2 x 10/25G */
{0x6402, "Chelsio T6225-SO-CR"},/* 2 x 10/25G, nomem */
+   {0x6403, "Chelsio T6425-CR"},   /* 4 x 10/25G */
+   {0x6404, "Chelsio T6425-SO-CR"},/* 4 x 10/25G, nomem */
+   {0x6405, "Chelsio T6225-OCP-SO"},   /* 2 x 10/25G, nomem */
+   {0x6406, "Chelsio T62100-OCP-SO"},  /* 2 x 40/50/100G, nomem */
{0x6407, "Chelsio T62100-LP-CR"},   /* 2 x 40/50/100G */
{0x6408, "Chelsio T62100-SO-CR"},   /* 2 x 40/50/100G, nomem */
+   {0x6409, "Chelsio T6210-BT"},   /* 2 x 10GBASE-T */
{0x640d, "Chelsio T62100-CR"},  /* 2 x 40/50/100G */
-   {0x6410, "Chelsio T62100-DBG"}, /* 2 x 40/50/100G, debug */
+   {0x6410, "Chelsio T6-DBG-100"}, /* 2 x 40/50/100G, debug */
+   {0x6411, "Chelsio T6225-LL-CR"},/* 2 x 10/25G */
+   {0x6414, "Chelsio T61100-OCP-SO"},  /* 1 x 40/50/100G, nomem */
+   {0x6415, "Chelsio T6201-BT"},   /* 2 x 1000BASE-T */
+
+   /* Custom */
+   {0x6480, "Chelsio T6225 80"},
+   {0x6481, "Chelsio T62100 81"},
 };
 
 #ifdef TCP_OFFLOAD
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r317777 - head/usr.sbin/bhyve

2017-05-04 Thread Roman Bogorodskiy
  Gleb Smirnoff wrote:

> Author: glebius
> Date: Wed May  3 21:44:04 2017
> New Revision: 31
> URL: https://svnweb.freebsd.org/changeset/base/31
> 
> Log:
>   Improve documentation of fbuf device.
>   
>   Submitted by:   novel
>   Reviewed by:grehan, bcr
>   Differential Revision:  https://reviews.freebsd.org/D10014
> 
> Modified:
>   head/usr.sbin/bhyve/bhyve.8

Thanks!

Roman Bogorodskiy


signature.asc
Description: PGP signature


svn commit: r317821 - head/sys/dev/hyperv/input

2017-05-04 Thread Sepherosa Ziehau
Author: sephe
Date: Fri May  5 03:28:30 2017
New Revision: 317821
URL: https://svnweb.freebsd.org/changeset/base/317821

Log:
  hyperv/kbd: Channel read expects non-NULL channel argument.
  
  MFC after:now
  Sponsored by: Microsoft

Modified:
  head/sys/dev/hyperv/input/hv_kbd.c

Modified: head/sys/dev/hyperv/input/hv_kbd.c
==
--- head/sys/dev/hyperv/input/hv_kbd.c  Fri May  5 00:54:23 2017
(r317820)
+++ head/sys/dev/hyperv/input/hv_kbd.c  Fri May  5 03:28:30 2017
(r317821)
@@ -198,7 +198,7 @@ static void
 hvkbd_do_poll(hv_kbd_sc *sc, uint8_t wait)
 {
while (!hv_kbd_prod_is_ready(sc)) {
-   hv_kbd_read_channel(NULL, sc);
+   hv_kbd_read_channel(sc->hs_chan, sc);
if (!wait)
break;
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"