Re: Add Suunto D6i over FTDI
On Sun, Dec 11, 2016 at 05:48:02PM +0100, Kristaps Dzonsons wrote: > Hi, > > Enclosed is a one-liner to get my Suunto D6i dive computer (FTDI) > recognised by libdivecomputer, http://www.libdivecomputer.org/. Before > it was just seen as a ugen. > > After: > > port 1 addr 6: full speed, power 300 mA, config 1, Suunto Sports > Instrument(0xf680), Suunto(0x0403), rev 6.00, iSerialNumber ST03HS99 >uftdi0 > > I can then download using the libdivecomputer example prog. Yay! > > Best, > > Kristaps Thanks, committed.
Re: [patch]: Support Option ICON 505 3G modem
On Sun, Dec 11, 2016 at 08:59:36AM +, Piotr Isajew wrote: > Dnia 11.12.2016 Jonathan Graynapisa??/a: > > [...] > >> After plugging in, the modem appears as a mass storage device and > >> it's necessary to issue a SCSI REZERO command to switch it to > >> modem operation (i.e.: scsi -f /dev/rcd1c -c '1 0 0 0 0 0'). > > > > The DEV_UMASS1 and DEV_UMASS2 flags in umsm already do variations of > > rezero, does setting one of those remove the need to run the command? > > Thanks Jonathan :) DEV_UMASS1 seems to do the job. Updated patch: Your patch had wrapped lines so it didn't apply. I've committed it with the strings renamed to match the names Option uses. > > Index: share/man/man4/umsm.4 > === > RCS file: /cvs/src/share/man/man4/umsm.4,v > retrieving revision 1.91 > diff -u -p -r1.91 umsm.4 > --- share/man/man4/umsm.4 5 Nov 2015 17:17:38 - 1.91 > +++ share/man/man4/umsm.4 11 Dec 2016 08:53:37 - > @@ -98,6 +98,7 @@ driver: > .It Li "Option GlobeTrotter HSDPA" Ta "USB" > .It Li "Option GlobeTrotter HSDPA ICON225" Ta "USB" > .It Li "Option GlobeTrotter HSUPA 380E" Ta "PCI Express Mini Card" > +.It Li "Option GlobeTrotter HSDPA ICON505" Ta "USB" > .It Li "Sierra Wireless MC8755" Ta "PCI Express Mini Card" > .It Li "Sierra Wireless MC8775" Ta "PCI Express Mini Card" > .It Li "Sierra Wireless MC8790" Ta "PCI Express Mini Card" > Index: sys/dev/usb/umsm.c > === > RCS file: /cvs/src/sys/dev/usb/umsm.c,v > retrieving revision 1.106 > diff -u -p -r1.106 umsm.c > --- sys/dev/usb/umsm.c1 Jun 2016 13:20:01 - 1.106 > +++ sys/dev/usb/umsm.c11 Dec 2016 08:53:38 - > @@ -216,6 +216,8 @@ static const struct umsm_type umsm_devs[ > {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, 0}, > {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_SCORPION }, 0}, > {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, 0}, > + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505 }, DEV_UMASS1}, > > {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, 0}, > {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720 }, 0}, > Index: sys/dev/usb/usbdevs > === > RCS file: /cvs/src/sys/dev/usb/usbdevs,v > retrieving revision 1.666 > diff -u -p -r1.666 usbdevs > --- sys/dev/usb/usbdevs 1 Jun 2016 09:48:20 - 1.666 > +++ sys/dev/usb/usbdevs 11 Dec 2016 08:53:38 - > @@ -4382,6 +4382,7 @@ product OPTION GSICON72 0x6911 GlobeSur > product OPTION GTHSDPA2250x6971 GlobeTrotter HSDPA Icon 225 > product OPTION GTHSUPA380E 0x7211 GlobeTrotter HSUPA 380E > product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage > +product OPTION GTICON505 0xd055 GlobeTrotter Icon505 > > /* Vaisala Products */ > product VAISALA USBINSTCABLE 0x0200 USB instrument cable > Index: sys/dev/usb/usbdevs.h > === > RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v > retrieving revision 1.678 > diff -u -p -r1.678 usbdevs.h > --- sys/dev/usb/usbdevs.h 1 Jun 2016 09:48:54 - 1.678 > +++ sys/dev/usb/usbdevs.h 11 Dec 2016 08:53:38 - > @@ -4389,6 +4389,7 @@ > #define USB_PRODUCT_OPTION_GTHSDPA225 0x6971 /* GlobeTrotter > HSDPA Icon 225 */ > #define USB_PRODUCT_OPTION_GTHSUPA380E 0x7211 /* GlobeTrotter > HSUPA 380E */ > #define USB_PRODUCT_OPTION_GTICON3220xd033 /* GlobeTrotter > Icon322 storage */ > +#define USB_PRODUCT_OPTION_GTICON5050xd055 /* GlobeTrotter > Icon505 */ > > /* Vaisala Products */ > #define USB_PRODUCT_VAISALA_USBINSTCABLE0x0200 /* USB > instrument cable */ > Index: sys/dev/usb/usbdevs_data.h > === > RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v > retrieving revision 1.672 > diff -u -p -r1.672 usbdevs_data.h > --- sys/dev/usb/usbdevs_data.h1 Jun 2016 09:48:54 - 1.672 > +++ sys/dev/usb/usbdevs_data.h11 Dec 2016 08:53:38 - > @@ -11172,6 +11172,10 @@ const struct usb_known_product usb_known > { > USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON322, > "GlobeTrotter Icon322 storage", > + }, > + { > + USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505, > + "GlobeTrotter Icon505", > }, > { > USB_VENDOR_VAISALA, USB_PRODUCT_VAISALA_USBINSTCABLE, > > > > >
improve gre handling in tcpdump
gre can do more things than tcpdump currently thinks it can. specifically, gre can be carried by ipv6, and it can encapsulate more than just ip and ppp packets. as such, this tells tcpdump to look at gre inside ipv6 packets. gre uses ethertypes to represent what protocol it contains, so instead of rolling a gre specific version of ip and ppp protocol types, just reuse the ether ones. also tell tcpdump that gre can contains ipv6, ethernet, and mpls. NVGRE is basically a constrained gre header (ie, must be version 0, must only have the K bit set, must be transether), so this detects that and prints the NVGRE interpretation of the Key field. that makes the VSID in NVGRE packets easier to see. theres some tweaks to output so it looks ok with and without the -v optarg. ok? Index: print-gre.c === RCS file: /cvs/src/usr.sbin/tcpdump/print-gre.c,v retrieving revision 1.11 diff -u -p -r1.11 print-gre.c --- print-gre.c 5 Nov 2015 11:55:21 - 1.11 +++ print-gre.c 12 Dec 2016 02:48:21 - @@ -39,6 +39,8 @@ #include #include +#include + #include #include @@ -55,13 +57,15 @@ #defineGRE_AP 0x0080 /* acknowledgment# present */ #defineGRE_VERS0x0007 /* protocol version */ -#defineGREPROTO_IP 0x0800 /* IP */ -#defineGREPROTO_PPP0x880b /* PPTP */ - /* source route entry types */ #defineGRESRE_IP 0x0800 /* IP */ #defineGRESRE_ASN 0xfffe /* ASN */ +#define NVGRE_VSID_MASK0xff00U +#define NVGRE_VSID_SHIFT 8 +#define NVGRE_FLOWID_MASK 0x00ffU +#define NVGRE_FLOWID_SHIFT 0 + void gre_print_0(const u_char *, u_int); void gre_print_1(const u_char *, u_int); void gre_sre_print(u_int16_t, u_int8_t, u_int8_t, const u_char *, u_int); @@ -82,14 +86,17 @@ gre_print(const u_char *bp, u_int length } vers = EXTRACT_16BITS(bp) & GRE_VERS; - if (vers == 0) + switch (vers) { + case 0: gre_print_0(bp, len); - else if (vers == 1) + break; + case 1: gre_print_1(bp, len); - else + break; + default: printf("gre-unknown-version=%u", vers); - return; - + break; + } } void @@ -114,6 +121,8 @@ gre_print_0(const u_char *bp, u_int leng if (len < 2) goto trunc; prot = EXTRACT_16BITS(bp); + printf("%s", etherproto_string(prot)); + len -= 2; bp += 2; @@ -121,21 +130,32 @@ gre_print_0(const u_char *bp, u_int leng if (len < 2) goto trunc; if (vflag) - printf("sum 0x%x ", EXTRACT_16BITS(bp)); + printf(" sum 0x%x", EXTRACT_16BITS(bp)); bp += 2; len -= 2; if (len < 2) goto trunc; - printf("off 0x%x ", EXTRACT_16BITS(bp)); + printf(" off 0x%x", EXTRACT_16BITS(bp)); bp += 2; len -= 2; } if (flags & GRE_KP) { + uint32_t key, vsid; + if (len < 4) goto trunc; - printf("key=0x%x ", EXTRACT_32BITS(bp)); + key = EXTRACT_32BITS(bp); + + /* maybe NVGRE? */ + if (flags == (GRE_KP | 0) && prot == ETHERTYPE_TRANSETHER) { + vsid = (key & NVGRE_VSID_MASK) >> NVGRE_VSID_SHIFT; + printf(" NVGRE vsid=%u (0x%x)+flowid=0x%02x /", + vsid, vsid, + (key & NVGRE_FLOWID_MASK) >> NVGRE_FLOWID_SHIFT); + } + printf(" key=%u (0x%x)", key, key); bp += 4; len -= 4; } @@ -143,7 +163,7 @@ gre_print_0(const u_char *bp, u_int leng if (flags & GRE_SP) { if (len < 4) goto trunc; - printf("seq %u ", EXTRACT_32BITS(bp)); + printf(" seq %u", EXTRACT_32BITS(bp)); bp += 4; len -= 4; } @@ -174,10 +194,21 @@ gre_print_0(const u_char *bp, u_int leng } } + printf(": "); + switch (prot) { - case GREPROTO_IP: + case ETHERTYPE_IP: ip_print(bp, len); break; + case ETHERTYPE_IPV6: + ip6_print(bp, len); + break; + case ETHERTYPE_MPLS: + mpls_print(bp, len); + break; + case ETHERTYPE_TRANSETHER: + ether_print(bp, len); + break; default: printf("gre-proto-0x%x", prot); } @@ -198,7 +229,7 @@ gre_print_1(const u_char *bp, u_int leng bp += 2; if (vflag) { -
rasops(9): Remove rasops2 functions?
Hi tech@, Unless I overlooked something, nothing seems to use the rasops2 (2-bit color depth) functions. It seems unlikely that any future new platform will ever need them. Should we remove them? Comments? OK? Index: sys/conf/files === RCS file: /cvs/src/sys/conf/files,v retrieving revision 1.635 diff -u -p -r1.635 files --- sys/conf/files 30 Nov 2016 14:26:12 - 1.635 +++ sys/conf/files 11 Dec 2016 22:51:49 - @@ -41,7 +41,6 @@ attachmidi at midibus # raster operations attributes define rasops1 -define rasops2 define rasops4 define rasops8 define rasops15 Index: sys/dev/rasops/files.rasops === RCS file: /cvs/src/sys/dev/rasops/files.rasops,v retrieving revision 1.6 diff -u -p -r1.6 files.rasops --- sys/dev/rasops/files.rasops 2 Dec 2006 15:55:18 - 1.6 +++ sys/dev/rasops/files.rasops 11 Dec 2016 22:51:49 - @@ -3,14 +3,13 @@ # Note: `rasops_glue' is only here to force the header file's name # hence it must be mentioned first (shudder...) -file dev/rasops/rasops.c ((rasops_glue | rasops1 | rasops2 | rasops4 | - rasops8 | rasops15 | rasops16 | rasops24 | - rasops32 | rasops_bswap | rasops_rotation) & +file dev/rasops/rasops.c ((rasops_glue | rasops1 | rasops4 | rasops8 | + rasops15 | rasops16 | rasops24 | rasops32 | + rasops_bswap | rasops_rotation) & wsdisplay) needs-flag -file dev/rasops/rasops_masks.c wsdisplay & (rasops1 | rasops2 | rasops4) +file dev/rasops/rasops_masks.c wsdisplay & (rasops1 | rasops4) file dev/rasops/rasops1.cwsdisplay & rasops1 -file dev/rasops/rasops2.cwsdisplay & rasops2 file dev/rasops/rasops4.cwsdisplay & rasops4 file dev/rasops/rasops8.cwsdisplay & rasops8 file dev/rasops/rasops15.c wsdisplay & (rasops15 | rasops16) Index: sys/dev/rasops/rasops.c === RCS file: /cvs/src/sys/dev/rasops/rasops.c,v retrieving revision 1.43 diff -u -p -r1.43 rasops.c --- sys/dev/rasops/rasops.c 26 Sep 2016 20:41:08 - 1.43 +++ sys/dev/rasops/rasops.c 11 Dec 2016 22:51:49 - @@ -427,11 +427,6 @@ rasops_reconfig(struct rasops_info *ri, rasops1_init(ri); break; #endif -#if NRASOPS2 > 0 - case 2: - rasops2_init(ri); - break; -#endif #if NRASOPS4 > 0 case 4: rasops4_init(ri); @@ -802,16 +797,6 @@ rasops_init_devcmap(struct rasops_info * } switch (ri->ri_depth) { -#if NRASOPS2 > 0 - case 2: - for (i = 1; i < 15; i++) - ri->ri_devcmap[i] = 0x; - - ri->ri_devcmap[0] = 0; - ri->ri_devcmap[8] = 0x; - ri->ri_devcmap[15] = 0x; - return; -#endif #if NRASOPS4 > 0 case 4: for (i = 0; i < 16; i++) { Index: sys/dev/rasops/rasops.h === RCS file: /cvs/src/sys/dev/rasops/rasops.h,v retrieving revision 1.17 diff -u -p -r1.17 rasops.h --- sys/dev/rasops/rasops.h 7 Sep 2015 18:00:58 - 1.17 +++ sys/dev/rasops/rasops.h 11 Dec 2016 22:51:49 - @@ -158,7 +158,6 @@ struct rasops_info { * the rasops code. */ void rasops1_init(struct rasops_info *); -void rasops2_init(struct rasops_info *); void rasops4_init(struct rasops_info *); void rasops8_init(struct rasops_info *); void rasops15_init(struct rasops_info *); Index: sys/dev/rasops/rasops2.c === RCS file: sys/dev/rasops/rasops2.c diff -N sys/dev/rasops/rasops2.c --- sys/dev/rasops/rasops2.c19 Dec 2014 22:44:59 - 1.11 +++ /dev/null 1 Jan 1970 00:00:00 - @@ -1,461 +0,0 @@ -/* $OpenBSD: rasops2.c,v 1.11 2014/12/19 22:44:59 guenther Exp $ */ -/* $NetBSD: rasops2.c,v 1.5 2000/04/12 14:22:29 pk Exp $ */ - -/*- - * Copyright (c) 1999 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Andrew Doran. - * - * 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 NETBSD FOUNDATION,
Re: [Q] NVMe 1TB Samsung drive, Thinkpad X1 Carbon 4th Generation
are you booting your USB drive in UEFI mode? or legacy? d At 2016-12-12 02:43:32, "Bryan C. Everly"wrote: >Hi tech@, > >I'm trying to install OpenBSD in a partition on this drive. I created >an OpenBSD type (0xa600) partition type with a GPT layout from Arch >Linux when I was installing it on this same hardware (I want to dual >boot using refind). > >You can see from the lsblk output on Linux below how things are structured: > >NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT >nvme0n1259:00 953.9G 0 disk >├─nvme0n1p3259:30 453.9G 0 part >├─nvme0n1p1259:10 2G 0 part /boot >└─nvme0n1p2259:20 498G 0 part > └─crypt 254:00 498G 0 crypt >├─lvmpool-root 254:1035G 0 lvm / >├─lvmpool-swap 254:2016G 0 lvm [SWAP] >└─lvmpool-home 254:30 447G 0 lvm /home > >When I boot the latest snapshot install60.fs USB drive (my preferred >method of installing), what I'm seeing looks like the drive is >recognized, but for some reason, disklabel is not seeing the right >data and says the OpenBSD area takes up the entire disk. My concern >is that if I install, it will whack the existing disk structure and >I'll lose my Linux install. > >I'd appreciate any advice on how to troubleshoot this. Here is the >output of disklabel, fdisk and dmesg: > >[# fdisk -v sd0] > >Primary GPT: >Disk: sd0 Usable LBA: 34 to 2000409230 [2000409265 Sectors] >GUID: e044f116-3aa6-4bb0-b06e-655c4f928486 > #: type [ start: size ] > guid name > > 0: EFI Sys [2048: 4192257 ] > fba5492e-ddcd-40d5-afab-fce7f2886eef EFI System > 1: Linux files* [ 4196352: 1044379649 ] > a3a8a6d5-d881-4529-aab2-d383db3ebb2f Linux filesystem > 2: OpenBSD [ 1048578048:951831183 ] > c004f9b9-5ec6-4841-89ec-6b5149a74810 OpenBSD disklabel > >Secondary GPT: >Not Found > >MBR: >Disk: sd0geometry: 124519/255/63 [2000409265 Sectors] >Offset: 0Signature: 0xAA55 >Starting Ending LBA Info: > #: id C H S - C H S [ start:size ] >--- > 0: EE 0 0 2 - 124519 182 63 [ 1: 2000409263 ] EFI GPT > 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused > >[#disklabel sd0] > ># /dev/rsd0c: >type: SCSI >disk: SCSI disk >label: SAMSUNG MZSLW1T0 >duid: >flags: >bytes/sector: 512 >sectors/track: 63 >tracks/cylinder: 255 >sectors/cylinder: 16065 >cylinders: 124519 >total sectors: 2000409265 >boundstart: 0 >boundend: 2000409265 >drivedata: 0 > >16 partitions: >#size offset fstype [fsize bsize cpg] > c: 20004092650 unused > >[#dmesg] > >OpenBSD 6.0-current (RAMDISK_CD) #21: Wed Dec 7 23:24:13 MST 2016 >bu...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD >real mem = 16523563008 (15758MB) >avail mem = 16021069824 (15278MB) >mainbus0 at root >bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xd7c05000 (65 entries) >bios0: vendor LENOVO version "N1FET44W (1.18 )" date 09/01/2016 >bios0: LENOVO 20FBCTO1WW >acpi0 at bios0: rev 2 >acpi0: tables DSDT FACP TCPA SSDT UEFI SSDT SSDT ECDT HPET APIC MCFG >SSDT SSDT DBGP DBG2 BOOT BATB SLIC SSDT SSDT MSDM DMAR ASF! FPDT UEFI >acpiec0 at acpi0 >acpimadt0 at acpi0 addr 0xfee0: PC-AT compat >cpu0 at mainbus0: apid 0 (boot processor) >cpu0: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz, 2808.00 MHz >cpu0: >FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT >cpu0: 256KB 64b/line 8-way L2 cache >cpu0: TSC frequency 280800 Hz >cpu0: apic clock running at 24MHz >cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE >cpu at mainbus0: not configured >cpu at mainbus0: not configured >cpu at mainbus0: not configured >ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins >acpiprt0 at acpi0: bus 0 (PCI0) >acpiprt1 at acpi0: bus -1 (PEG0) >acpiprt2 at acpi0: bus -1 (PEG1) >acpiprt3 at acpi0: bus -1 (PEG2) >acpiprt4 at acpi0: bus 2 (EXP1) >acpiprt5 at acpi0: bus 4 (EXP3) >acpiprt6 at acpi0: bus 5 (EXP5) >acpiprt7 at acpi0: bus -1 (EXP9) >acpicpu at acpi0 not
Re: [Q] NVMe 1TB Samsung drive, Thinkpad X1 Carbon 4th Generation
On Sun, Dec 11, 2016 at 3:45 PM, dkroczyn...@163.comwrote: > are you booting your USB drive in UEFI mode? or legacy? > > d > Good question. Turns out it was booting in Legacy by default. I completely disabled legacy boot in the bios and rebooted from the USB drive. I got the same results (albeit with a smaller font). Any ideas? I'm starting to think that I might have to back up my Linux partition, wipe the drive, install OpenBSD first, then re-enable Linux. I'd really hate to have to do that but I'm willing to if that's where I end up.
Re: [Q] NVMe 1TB Samsung drive, Thinkpad X1 Carbon 4th Generation
On Sun, Dec 11, 2016 at 3:18 PM, Bryan Steelewrote: > On Sun, Dec 11, 2016 at 01:43:32PM -0500, Bryan C. Everly wrote: >> [# fdisk -v sd0] >> >> Primary GPT: >> Disk: sd0 Usable LBA: 34 to 2000409230 [2000409265 Sectors] >> GUID: e044f116-3aa6-4bb0-b06e-655c4f928486 >> ... >> >> Secondary GPT: >> Not Found > > Could it be this perhaps? Maybe the missing backup GPT is preventing > the creation of the pseudo-disklabel with the other partitions and > just showing it as a blank disk? > > I believe there are utilities in Linux to make sure the primary and > seconary GPT are in sync. > > -Bryan. > Unfortunately everything checks out AOK on the Linux side for that drive. I used 0xa600 for the partition type for OpenBSD. From reading it looks like that is "OpenBSD MBR". Is there a different ID that I should be using for an OpenBSD GPT partition?
[patch] turn igmpstat into a set of percpu counters
Hi, I converted the igmp stats to use percpu counters. This work is basically the same as what dlg@ did for other parts of the stack. I looked at the diff and adjusted it for igmp. diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 11446ce4188..c2a0a4839b4 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -101,13 +101,14 @@ int *igmpctl_vars[IGMPCTL_MAXID] = IGMPCTL_VARS; intigmp_timers_are_running; static struct router_info *rti_head; static struct mbuf *router_alert; -struct igmpstat igmpstat; +struct cpumem *igmpcounters; void igmp_checktimer(struct ifnet *); void igmp_sendpkt(struct in_multi *, int, in_addr_t); int rti_fill(struct in_multi *); struct router_info * rti_find(struct ifnet *); void igmp_input_if(struct ifnet *, struct mbuf *, int); +int igmp_sysctl_igmpstat(void *, size_t *, void *); void igmp_init(void) @@ -117,6 +118,7 @@ igmp_init(void) igmp_timers_are_running = 0; rti_head = 0; + igmpcounters = counters_alloc(igps_ncounters, M_COUNTERS); router_alert = m_get(M_DONTWAIT, MT_DATA); if (router_alert == NULL) { printf("%s: no mbuf\n", __func__); @@ -217,7 +219,7 @@ igmp_input(struct mbuf *m, ...) iphlen = va_arg(ap, int); va_end(ap); - ++igmpstat.igps_rcv_total; + igmpstat_inc(igps_rcv_total); ifp = if_get(m->m_pkthdr.ph_ifidx); if (ifp == NULL) { @@ -248,14 +250,14 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) * Validate lengths */ if (igmplen < IGMP_MINLEN) { - ++igmpstat.igps_rcv_tooshort; + igmpstat_inc(igps_rcv_tooshort); m_freem(m); return; } minlen = iphlen + IGMP_MINLEN; if ((m->m_flags & M_EXT || m->m_len < minlen) && (m = m_pullup(m, minlen)) == NULL) { - ++igmpstat.igps_rcv_tooshort; + igmpstat_inc(igps_rcv_tooshort); return; } @@ -266,7 +268,7 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) m->m_len -= iphlen; igmp = mtod(m, struct igmp *); if (in_cksum(m, igmplen)) { - ++igmpstat.igps_rcv_badsum; + igmpstat_inc(igps_rcv_badsum); m_freem(m); return; } @@ -277,7 +279,7 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) switch (igmp->igmp_type) { case IGMP_HOST_MEMBERSHIP_QUERY: - ++igmpstat.igps_rcv_queries; + igmpstat_inc(igps_rcv_queries); if (ifp->if_flags & IFF_LOOPBACK) break; @@ -292,7 +294,7 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) rti->rti_age = 0; if (ip->ip_dst.s_addr != INADDR_ALLHOSTS_GROUP) { - ++igmpstat.igps_rcv_badqueries; + igmpstat_inc(igps_rcv_badqueries); m_freem(m); return; } @@ -317,7 +319,7 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) } } else { if (!IN_MULTICAST(ip->ip_dst.s_addr)) { - ++igmpstat.igps_rcv_badqueries; + igmpstat_inc(igps_rcv_badqueries); m_freem(m); return; } @@ -367,14 +369,14 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) break; case IGMP_v1_HOST_MEMBERSHIP_REPORT: - ++igmpstat.igps_rcv_reports; + igmpstat_inc(igps_rcv_reports); if (ifp->if_flags & IFF_LOOPBACK) break; if (!IN_MULTICAST(igmp->igmp_group.s_addr) || igmp->igmp_group.s_addr != ip->ip_dst.s_addr) { - ++igmpstat.igps_rcv_badreports; + igmpstat_inc(igps_rcv_badreports); m_freem(m); return; } @@ -401,7 +403,7 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) IN_LOOKUP_MULTI(igmp->igmp_group, ifp, inm); if (inm != NULL) { inm->inm_timer = 0; - ++igmpstat.igps_rcv_ourreports; + igmpstat_inc(igps_rcv_ourreports); switch (inm->inm_state) { case IGMP_IDLE_MEMBER: @@ -433,14 +435,14 @@ igmp_input_if(struct ifnet *ifp, struct mbuf *m, int iphlen) break; #endif - ++igmpstat.igps_rcv_reports; + igmpstat_inc(igps_rcv_reports); if (ifp->if_flags & IFF_LOOPBACK) break; if
[Q] NVMe 1TB Samsung drive, Thinkpad X1 Carbon 4th Generation
Hi tech@, I'm trying to install OpenBSD in a partition on this drive. I created an OpenBSD type (0xa600) partition type with a GPT layout from Arch Linux when I was installing it on this same hardware (I want to dual boot using refind). You can see from the lsblk output on Linux below how things are structured: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1259:00 953.9G 0 disk ├─nvme0n1p3259:30 453.9G 0 part ├─nvme0n1p1259:10 2G 0 part /boot └─nvme0n1p2259:20 498G 0 part └─crypt 254:00 498G 0 crypt ├─lvmpool-root 254:1035G 0 lvm / ├─lvmpool-swap 254:2016G 0 lvm [SWAP] └─lvmpool-home 254:30 447G 0 lvm /home When I boot the latest snapshot install60.fs USB drive (my preferred method of installing), what I'm seeing looks like the drive is recognized, but for some reason, disklabel is not seeing the right data and says the OpenBSD area takes up the entire disk. My concern is that if I install, it will whack the existing disk structure and I'll lose my Linux install. I'd appreciate any advice on how to troubleshoot this. Here is the output of disklabel, fdisk and dmesg: [# fdisk -v sd0] Primary GPT: Disk: sd0 Usable LBA: 34 to 2000409230 [2000409265 Sectors] GUID: e044f116-3aa6-4bb0-b06e-655c4f928486 #: type [ start: size ] guid name 0: EFI Sys [2048: 4192257 ] fba5492e-ddcd-40d5-afab-fce7f2886eef EFI System 1: Linux files* [ 4196352: 1044379649 ] a3a8a6d5-d881-4529-aab2-d383db3ebb2f Linux filesystem 2: OpenBSD [ 1048578048:951831183 ] c004f9b9-5ec6-4841-89ec-6b5149a74810 OpenBSD disklabel Secondary GPT: Not Found MBR: Disk: sd0geometry: 124519/255/63 [2000409265 Sectors] Offset: 0Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start:size ] --- 0: EE 0 0 2 - 124519 182 63 [ 1: 2000409263 ] EFI GPT 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused [#disklabel sd0] # /dev/rsd0c: type: SCSI disk: SCSI disk label: SAMSUNG MZSLW1T0 duid: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 124519 total sectors: 2000409265 boundstart: 0 boundend: 2000409265 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] c: 20004092650 unused [#dmesg] OpenBSD 6.0-current (RAMDISK_CD) #21: Wed Dec 7 23:24:13 MST 2016 bu...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/RAMDISK_CD real mem = 16523563008 (15758MB) avail mem = 16021069824 (15278MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xd7c05000 (65 entries) bios0: vendor LENOVO version "N1FET44W (1.18 )" date 09/01/2016 bios0: LENOVO 20FBCTO1WW acpi0 at bios0: rev 2 acpi0: tables DSDT FACP TCPA SSDT UEFI SSDT SSDT ECDT HPET APIC MCFG SSDT SSDT DBGP DBG2 BOOT BATB SLIC SSDT SSDT MSDM DMAR ASF! FPDT UEFI acpiec0 at acpi0 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz, 2808.00 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PT,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: TSC frequency 280800 Hz cpu0: apic clock running at 24MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE cpu at mainbus0: not configured cpu at mainbus0: not configured cpu at mainbus0: not configured ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 120 pins acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEG0) acpiprt2 at acpi0: bus -1 (PEG1) acpiprt3 at acpi0: bus -1 (PEG2) acpiprt4 at acpi0: bus 2 (EXP1) acpiprt5 at acpi0: bus 4 (EXP3) acpiprt6 at acpi0: bus 5 (EXP5) acpiprt7 at acpi0: bus -1 (EXP9) acpicpu at acpi0 not configured acpipwrres at acpi0 not configured acpipwrres at acpi0 not configured acpipwrres at acpi0 not configured acpipwrres at acpi0 not configured acpipwrres at acpi0 not configured acpipwrres at acpi0 not configured acpitz at acpi0 not configured
make tcpdump show 11n mode correctly
This diff makes 'tcpdump -i iwn0 -y IEEE802_11_RADIO' show the correct mode for a channel in 11n mode. Before: After: Unfortunately this requires a kernel tweak because the kernel must be more careful about the channel flags it passes to userland. Channels exist in the 11b/g (2GHz) and 11a (5GHz) ranges. So net80211 has a "mode" concept, where a given mode is available if supported channels exist in a particular range. And there is the default "auto" mode which picks one of the other available modes. (This may not be the best design but it is how it was designed historically. Changing this is not in my radar.) The HT-channel flag is set to indicate whether a channel may be used in 11n mode. In practice this is just the superset of all channels supported by the device. When 11n support was introduced it was easier to fold the new 11n mode into the existing code with a flag like this, and avoid letting 11n mode be a special case which works against this design. And this HT-channel flag is set regardless of whether we're currently in 11n mode because we need this flag to enter 11n mode from another mode. A mode which has no channels available to it is not available. So the kernel needs this flag to be set on all channels at all times if the driver supports 11n. Now, we copy this flag out to userspace even in non-11n modes. If the kernel instead omits the HT-channel flag from the userspace copy if the current mode is not 11n, then tcpdump can inspect this flag to detect whether the channel is in fact an "11n" channel and print the mode correctly. In the end, this is just a cosmetic fix. If this is too much code churn and quirks for too little gain, I am happy to drop this diff. Index: sys/dev/pci/if_iwm.c === RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v retrieving revision 1.154 diff -u -p -r1.154 if_iwm.c --- sys/dev/pci/if_iwm.c10 Dec 2016 19:03:53 - 1.154 +++ sys/dev/pci/if_iwm.c11 Dec 2016 14:54:58 - @@ -3339,14 +3339,17 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, str if (sc->sc_drvbpf != NULL) { struct mbuf mb; struct iwm_rx_radiotap_header *tap = >sc_rxtap; + uint16_t chan_flags; tap->wr_flags = 0; if (phy_info->phy_flags & htole16(IWM_PHY_INFO_FLAG_SHPREAMBLE)) tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; tap->wr_chan_freq = htole16(ic->ic_channels[phy_info->channel].ic_freq); - tap->wr_chan_flags = - htole16(ic->ic_channels[phy_info->channel].ic_flags); + chan_flags = ic->ic_channels[phy_info->channel].ic_flags; + if (ic->ic_curmode != IEEE80211_MODE_11N) + chan_flags &= ~IEEE80211_CHAN_HT; + tap->wr_chan_flags = htole16(chan_flags); tap->wr_dbm_antsignal = (int8_t)rssi; tap->wr_dbm_antnoise = (int8_t)sc->sc_noise; tap->wr_tsft = phy_info->system_timestamp; @@ -3991,10 +3994,14 @@ iwm_tx(struct iwm_softc *sc, struct mbuf if (sc->sc_drvbpf != NULL) { struct mbuf mb; struct iwm_tx_radiotap_header *tap = >sc_txtap; + uint16_t chan_flags; tap->wt_flags = 0; tap->wt_chan_freq = htole16(ni->ni_chan->ic_freq); - tap->wt_chan_flags = htole16(ni->ni_chan->ic_flags); + chan_flags = ni->ni_chan->ic_flags; + if (ic->ic_curmode != IEEE80211_MODE_11N) + chan_flags &= ~IEEE80211_CHAN_HT; + tap->wt_chan_flags = htole16(chan_flags); if ((ni->ni_flags & IEEE80211_NODE_HT) && !IEEE80211_IS_MULTICAST(wh->i_addr1) && type == IEEE80211_FC0_TYPE_DATA && Index: sys/dev/pci/if_iwn.c === RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v retrieving revision 1.178 diff -u -p -r1.178 if_iwn.c --- sys/dev/pci/if_iwn.c10 Dec 2016 13:22:07 - 1.178 +++ sys/dev/pci/if_iwn.c11 Dec 2016 14:54:25 - @@ -2130,14 +2130,17 @@ iwn_rx_done(struct iwn_softc *sc, struct if (sc->sc_drvbpf != NULL) { struct mbuf mb; struct iwn_rx_radiotap_header *tap = >sc_rxtap; + uint16_t chan_flags; tap->wr_flags = 0; if (stat->flags & htole16(IWN_STAT_FLAG_SHPREAMBLE)) tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; tap->wr_chan_freq = htole16(ic->ic_channels[stat->chan].ic_freq); - tap->wr_chan_flags = - htole16(ic->ic_channels[stat->chan].ic_flags); + chan_flags = ic->ic_channels[stat->chan].ic_flags; + if (ic->ic_curmode != IEEE80211_MODE_11N) +
Re: Xeon-D R2PCIe Agent pcidevs
On 8.12.2016. 14:32, Hrvoje Popovski wrote: > Hi all, > > i have this supermicro box: > https://www.supermicro.nl/products/motherboard/Xeon/D/X10SDV-TP8F.cfm > > dmesg without this patch shows : > vendor "Intel", unknown product 0x6f34 (class DASP subclass Time and > Frequency, rev 0x03) at pci12 dev 16 function 1 not configured > > > with this patch: > "Intel Xeon-D R2PCIe Agent" rev 0x03 at pci12 dev 16 function 1 not > configured Hi all, slightly better diff than the previous one. ? XeonD_R2PCIe.diff Index: pcidevs === RCS file: /cvs/src/sys/dev/pci/pcidevs,v retrieving revision 1.1810 diff -u -p -r1.1810 pcidevs --- pcidevs 6 Dec 2016 16:55:51 - 1.1810 +++ pcidevs 8 Dec 2016 13:15:43 - @@ -4539,6 +4539,7 @@ product INTEL XEOND_RAS 0x6f2a Xeon-D R product INTEL XEOND_IOAPIC 0x6f2b Xeon-D I/O APIC product INTEL XEOND_IOAPIC_2 0x6f2c Xeon-D I/O APIC product INTEL XEOND_HA_0 0x6f30 Xeon-D Home Agent +product INTEL XEOND_R2PCIE 0x6f34 Xeon-D R2PCIe Agent product INTEL XEOND_QPI_R3_0 0x6f36 Xeon-D QPI Link product INTEL XEOND_QPI_R3_1 0x6f37 Xeon-D QPI Link product INTEL XEOND_QD_1 0x6f50 Xeon-D QuickData Index: pcidevs.h === RCS file: /cvs/src/sys/dev/pci/pcidevs.h,v retrieving revision 1.1804 diff -u -p -r1.1804 pcidevs.h --- pcidevs.h 6 Dec 2016 16:56:08 - 1.1804 +++ pcidevs.h 8 Dec 2016 13:15:44 - @@ -4544,6 +4544,7 @@ #define PCI_PRODUCT_INTEL_XEOND_IOAPIC 0x6f2b /* Xeon-D I/O APIC */ #define PCI_PRODUCT_INTEL_XEOND_IOAPIC_2 0x6f2c /* Xeon-D I/O APIC */ #define PCI_PRODUCT_INTEL_XEOND_HA_0 0x6f30 /* Xeon-D Home Agent */ +#define PCI_PRODUCT_INTEL_XEOND_R2PCIE 0x6f34 /* Xeon-D R2PCIe Agent */ #define PCI_PRODUCT_INTEL_XEOND_QPI_R3_0 0x6f36 /* Xeon-D QPI Link */ #define PCI_PRODUCT_INTEL_XEOND_QPI_R3_1 0x6f37 /* Xeon-D QPI Link */ #define PCI_PRODUCT_INTEL_XEOND_QD_1 0x6f50 /* Xeon-D QuickData */ Index: pcidevs_data.h === RCS file: /cvs/src/sys/dev/pci/pcidevs_data.h,v retrieving revision 1.1799 diff -u -p -r1.1799 pcidevs_data.h --- pcidevs_data.h 6 Dec 2016 16:56:08 - 1.1799 +++ pcidevs_data.h 8 Dec 2016 13:15:44 - @@ -15692,6 +15692,10 @@ static const struct pci_known_product pc "Xeon-D Home Agent", }, { + PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEOND_R2PCIE, + "Xeon-D R2PCIe Agent", + }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_XEOND_QPI_R3_0, "Xeon-D QPI Link", },
Re: Scheduler with a single runqueue
On 11/12/16(Sun) 12:54, Stuart Henderson wrote: > On 2016/12/10 17:56, Bryan Vyhmeister wrote: > > On Sat, Dec 10, 2016 at 10:47:31PM +, Stuart Henderson wrote: > > > In case anyone is interested, here's a version of this diff against > > > -current. It helps a lot for me. I'm not watching HD video while doing > > > "make -j4", just things like trying to move the pointer around the screen > > > and type into a terminal while a map is loading in a browser. > > > > Thank you for taking the time to update the diff. I should probably try > > it. I have noticed that if I am doing a lot of NFS I/O or rsync > > transfers to an NFS share that the pointer gets jumpy. > > In my case more like "machine freezes every few minutes for 30-40 seconds" > than just jumpy. Loads of IPIs, cpu0 high cpu in interrupt, other cores > 100% cpu in sys. It seems more apparent with chromium, but it's not a > whole lot better with firefox either. The problem is in librthread. Any multi-threaded program might benefit from this diff. However that's just a bandage. The real fix is to stop using sched_yield(2) when there's some contention in userland.
Re: Scheduler with a single runqueue
On 2016/12/10 17:56, Bryan Vyhmeister wrote: > On Sat, Dec 10, 2016 at 10:47:31PM +, Stuart Henderson wrote: > > In case anyone is interested, here's a version of this diff against > > -current. It helps a lot for me. I'm not watching HD video while doing > > "make -j4", just things like trying to move the pointer around the screen > > and type into a terminal while a map is loading in a browser. > > Thank you for taking the time to update the diff. I should probably try > it. I have noticed that if I am doing a lot of NFS I/O or rsync > transfers to an NFS share that the pointer gets jumpy. In my case more like "machine freezes every few minutes for 30-40 seconds" than just jumpy. Loads of IPIs, cpu0 high cpu in interrupt, other cores 100% cpu in sys. It seems more apparent with chromium, but it's not a whole lot better with firefox either. > The machine I am > seeing this on is a Supermicro X10SAE with Xeon E3 1275 v3, 32GB of > memory, and a Samsung 950 Pro NVMe SSD. I typically also have Firefox > and Iridium also running with a number of tabs. It is using Intel > graphics and running a 4K display which might be part of it. It seems to > be better for me with efifb(4) and wsfb(4) on my ThinkPad X1 Carbon 4th > Gen (which has the 2560x1440 display). I also tried the modesetting > driver on my desktop which seemed to be every so slightly improved over > the intel(4) driver but that is hard to quantify exactly. Ah yes, I should have included a dmesg from this machine. I haven't tried the modesetting driver, maybe I will sometime.. OpenBSD 6.0-current (GENERIC.MP) #0: Sat Dec 10 21:55:34 GMT 2016 st...@symphytum.spacehopper.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 8477306880 (8084MB) avail mem = 8215822336 (7835MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xec400 (90 entries) bios0: vendor Dell Inc. version "A04" date 07/20/2014 bios0: Dell Inc. PowerEdge T20 acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC FPDT SLIC LPIT SSDT SSDT SSDT HPET SSDT MCFG SSDT ASF! DMAR acpi0: wakeup devices UAR1(S3) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) PXSX(S4) PXSX(S4) PXSX(S4) GLAN(S4) EHC1(S3) EHC2(S3) XHC_(S4) HDEF(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.62 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.15 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 0, core 1, package 0 cpu2 at mainbus0: apid 4 (application processor) cpu2: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.15 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 6 (application processor) cpu3: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz, 3392.15 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,SENSOR,ARAT cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 0, core 3, package 0 ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins acpihpet0 at acpi0: 14318179 Hz acpimcfg0 at acpi0 addr 0xf800, bus 0-63 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (RP01) acpiprt2 at acpi0: bus 2 (RP02) acpiprt3 at
efifb(4): WSDISPLAYIO_{GET,SET}PARAM ioctl support
This allows the brightness on my Dell Latitude 3160 to be adjusted through wsconsctl(1). Index: arch/amd64/amd64/efifb.c === RCS file: /cvs/src/sys/arch/amd64/amd64/efifb.c,v retrieving revision 1.9 diff -u -p -r1.9 efifb.c --- arch/amd64/amd64/efifb.c21 Jun 2016 15:24:55 - 1.9 +++ arch/amd64/amd64/efifb.c11 Dec 2016 09:25:04 - @@ -104,6 +104,9 @@ int efifb_load_font(void *, void *, str struct cb_framebuffer *cb_find_fb(paddr_t); +extern int (*ws_get_param)(struct wsdisplay_param *); +extern int (*ws_set_param)(struct wsdisplay_param *); + const struct cfattach efifb_ca = { sizeof(struct efifb_softc), efifb_match, efifb_attach, NULL }; @@ -235,6 +238,16 @@ efifb_ioctl(void *v, u_long cmd, caddr_t struct wsdisplay_fbinfo *wdf; switch (cmd) { + case WSDISPLAYIO_GETPARAM: + if (ws_get_param != NULL) + return (*ws_get_param)((struct wsdisplay_param *)data); + else + return (-1); + case WSDISPLAYIO_SETPARAM: + if (ws_set_param != NULL) + return (*ws_set_param)((struct wsdisplay_param *)data); + else + return (-1); case WSDISPLAYIO_GTYPE: *(u_int *)data = WSDISPLAY_TYPE_EFIFB; break;
Re: [patch]: Support Option ICON 505 3G modem
Dnia 11.12.2016 Jonathan Graynapisał/a: > [...] >> After plugging in, the modem appears as a mass storage device and >> it's necessary to issue a SCSI REZERO command to switch it to >> modem operation (i.e.: scsi -f /dev/rcd1c -c '1 0 0 0 0 0'). > > The DEV_UMASS1 and DEV_UMASS2 flags in umsm already do variations of > rezero, does setting one of those remove the need to run the command? Thanks Jonathan :) DEV_UMASS1 seems to do the job. Updated patch: Index: share/man/man4/umsm.4 === RCS file: /cvs/src/share/man/man4/umsm.4,v retrieving revision 1.91 diff -u -p -r1.91 umsm.4 --- share/man/man4/umsm.4 5 Nov 2015 17:17:38 - 1.91 +++ share/man/man4/umsm.4 11 Dec 2016 08:53:37 - @@ -98,6 +98,7 @@ driver: .It Li "Option GlobeTrotter HSDPA" Ta "USB" .It Li "Option GlobeTrotter HSDPA ICON225" Ta "USB" .It Li "Option GlobeTrotter HSUPA 380E" Ta "PCI Express Mini Card" +.It Li "Option GlobeTrotter HSDPA ICON505" Ta "USB" .It Li "Sierra Wireless MC8755" Ta "PCI Express Mini Card" .It Li "Sierra Wireless MC8775" Ta "PCI Express Mini Card" .It Li "Sierra Wireless MC8790" Ta "PCI Express Mini Card" Index: sys/dev/usb/umsm.c === RCS file: /cvs/src/sys/dev/usb/umsm.c,v retrieving revision 1.106 diff -u -p -r1.106 umsm.c --- sys/dev/usb/umsm.c 1 Jun 2016 13:20:01 - 1.106 +++ sys/dev/usb/umsm.c 11 Dec 2016 08:53:38 - @@ -216,6 +216,8 @@ static const struct umsm_type umsm_devs[ {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, 0}, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_SCORPION }, 0}, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, 0}, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505 }, DEV_UMASS1}, {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, 0}, {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720 }, 0}, Index: sys/dev/usb/usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.666 diff -u -p -r1.666 usbdevs --- sys/dev/usb/usbdevs 1 Jun 2016 09:48:20 - 1.666 +++ sys/dev/usb/usbdevs 11 Dec 2016 08:53:38 - @@ -4382,6 +4382,7 @@ product OPTION GSICON72 0x6911 GlobeSur product OPTION GTHSDPA225 0x6971 GlobeTrotter HSDPA Icon 225 product OPTION GTHSUPA380E 0x7211 GlobeTrotter HSUPA 380E product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage +product OPTION GTICON505 0xd055 GlobeTrotter Icon505 /* Vaisala Products */ product VAISALA USBINSTCABLE 0x0200 USB instrument cable Index: sys/dev/usb/usbdevs.h === RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v retrieving revision 1.678 diff -u -p -r1.678 usbdevs.h --- sys/dev/usb/usbdevs.h 1 Jun 2016 09:48:54 - 1.678 +++ sys/dev/usb/usbdevs.h 11 Dec 2016 08:53:38 - @@ -4389,6 +4389,7 @@ #defineUSB_PRODUCT_OPTION_GTHSDPA225 0x6971 /* GlobeTrotter HSDPA Icon 225 */ #defineUSB_PRODUCT_OPTION_GTHSUPA380E 0x7211 /* GlobeTrotter HSUPA 380E */ #defineUSB_PRODUCT_OPTION_GTICON3220xd033 /* GlobeTrotter Icon322 storage */ +#defineUSB_PRODUCT_OPTION_GTICON5050xd055 /* GlobeTrotter Icon505 */ /* Vaisala Products */ #defineUSB_PRODUCT_VAISALA_USBINSTCABLE0x0200 /* USB instrument cable */ Index: sys/dev/usb/usbdevs_data.h === RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v retrieving revision 1.672 diff -u -p -r1.672 usbdevs_data.h --- sys/dev/usb/usbdevs_data.h 1 Jun 2016 09:48:54 - 1.672 +++ sys/dev/usb/usbdevs_data.h 11 Dec 2016 08:53:38 - @@ -11172,6 +11172,10 @@ const struct usb_known_product usb_known { USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON322, "GlobeTrotter Icon322 storage", + }, + { + USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505, + "GlobeTrotter Icon505", }, { USB_VENDOR_VAISALA, USB_PRODUCT_VAISALA_USBINSTCABLE,
Re: [patch]: Support Option ICON 505 3G modem
On Sun, Dec 11, 2016 at 08:00:27AM +, Piotr Isajew wrote: > Hi, > > the following makes the Option ICON 505 modem recognizable by > umsm(4). > > After plugging in, the modem appears as a mass storage device and > it's necessary to issue a SCSI REZERO command to switch it to > modem operation (i.e.: scsi -f /dev/rcd1c -c '1 0 0 0 0 0'). The DEV_UMASS1 and DEV_UMASS2 flags in umsm already do variations of rezero, does setting one of those remove the need to run the command? > > Index: share/man/man4/umsm.4 > === > RCS file: /cvs/src/share/man/man4/umsm.4,v > retrieving revision 1.91 > diff -u -p -r1.91 umsm.4 > --- share/man/man4/umsm.4 5 Nov 2015 17:17:38 - 1.91 > +++ share/man/man4/umsm.4 10 Dec 2016 19:06:38 - > @@ -98,6 +98,7 @@ driver: > .It Li "Option GlobeTrotter HSDPA" Ta "USB" > .It Li "Option GlobeTrotter HSDPA ICON225" Ta "USB" > .It Li "Option GlobeTrotter HSUPA 380E" Ta "PCI Express Mini Card" > +.It Li "Option GlobeTrotter HSDPA ICON505" Ta "USB" > .It Li "Sierra Wireless MC8755" Ta "PCI Express Mini Card" > .It Li "Sierra Wireless MC8775" Ta "PCI Express Mini Card" > .It Li "Sierra Wireless MC8790" Ta "PCI Express Mini Card" > Index: sys/dev/usb/umsm.c > === > RCS file: /cvs/src/sys/dev/usb/umsm.c,v > retrieving revision 1.106 > diff -u -p -r1.106 umsm.c > --- sys/dev/usb/umsm.c1 Jun 2016 13:20:01 - 1.106 > +++ sys/dev/usb/umsm.c10 Dec 2016 19:06:40 - > @@ -216,6 +216,8 @@ static const struct umsm_type umsm_devs[ > {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, 0}, > {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_SCORPION }, 0}, > {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, 0}, > + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505 }, 0}, > > {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, 0}, > {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720 }, 0}, > Index: sys/dev/usb/usbdevs > === > RCS file: /cvs/src/sys/dev/usb/usbdevs,v > retrieving revision 1.666 > diff -u -p -r1.666 usbdevs > --- sys/dev/usb/usbdevs 1 Jun 2016 09:48:20 - 1.666 > +++ sys/dev/usb/usbdevs 10 Dec 2016 19:06:41 - > @@ -4382,6 +4382,7 @@ product OPTION GSICON72 0x6911 GlobeSur > product OPTION GTHSDPA2250x6971 GlobeTrotter HSDPA Icon 225 > product OPTION GTHSUPA380E 0x7211 GlobeTrotter HSUPA 380E > product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage > +product OPTION GTICON505 0xd055 GlobeTrotter Icon505 > > /* Vaisala Products */ > product VAISALA USBINSTCABLE 0x0200 USB instrument cable > Index: sys/dev/usb/usbdevs.h > === > RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v > retrieving revision 1.678 > diff -u -p -r1.678 usbdevs.h > --- sys/dev/usb/usbdevs.h 1 Jun 2016 09:48:54 - 1.678 > +++ sys/dev/usb/usbdevs.h 10 Dec 2016 19:06:42 - > @@ -4389,6 +4389,7 @@ > #define USB_PRODUCT_OPTION_GTHSDPA225 0x6971 /* GlobeTrotter > HSDPA Icon 225 */ > #define USB_PRODUCT_OPTION_GTHSUPA380E 0x7211 /* GlobeTrotter > HSUPA 380E */ > #define USB_PRODUCT_OPTION_GTICON3220xd033 /* GlobeTrotter > Icon322 storage */ > +#define USB_PRODUCT_OPTION_GTICON5050xd055 /* GlobeTrotter > Icon505 */ > > /* Vaisala Products */ > #define USB_PRODUCT_VAISALA_USBINSTCABLE0x0200 /* USB > instrument cable */ > Index: sys/dev/usb/usbdevs_data.h > === > RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v > retrieving revision 1.672 > diff -u -p -r1.672 usbdevs_data.h > --- sys/dev/usb/usbdevs_data.h1 Jun 2016 09:48:54 - 1.672 > +++ sys/dev/usb/usbdevs_data.h10 Dec 2016 19:06:42 - > @@ -11172,6 +11172,10 @@ const struct usb_known_product usb_known > { > USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON322, > "GlobeTrotter Icon322 storage", > + }, > + { > + USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505, > + "GlobeTrotter Icon505", > }, > { > USB_VENDOR_VAISALA, USB_PRODUCT_VAISALA_USBINSTCABLE, >
[patch]: Support Option ICON 505 3G modem
Hi, the following makes the Option ICON 505 modem recognizable by umsm(4). After plugging in, the modem appears as a mass storage device and it's necessary to issue a SCSI REZERO command to switch it to modem operation (i.e.: scsi -f /dev/rcd1c -c '1 0 0 0 0 0'). Index: share/man/man4/umsm.4 === RCS file: /cvs/src/share/man/man4/umsm.4,v retrieving revision 1.91 diff -u -p -r1.91 umsm.4 --- share/man/man4/umsm.4 5 Nov 2015 17:17:38 - 1.91 +++ share/man/man4/umsm.4 10 Dec 2016 19:06:38 - @@ -98,6 +98,7 @@ driver: .It Li "Option GlobeTrotter HSDPA" Ta "USB" .It Li "Option GlobeTrotter HSDPA ICON225" Ta "USB" .It Li "Option GlobeTrotter HSUPA 380E" Ta "PCI Express Mini Card" +.It Li "Option GlobeTrotter HSDPA ICON505" Ta "USB" .It Li "Sierra Wireless MC8755" Ta "PCI Express Mini Card" .It Li "Sierra Wireless MC8775" Ta "PCI Express Mini Card" .It Li "Sierra Wireless MC8790" Ta "PCI Express Mini Card" Index: sys/dev/usb/umsm.c === RCS file: /cvs/src/sys/dev/usb/umsm.c,v retrieving revision 1.106 diff -u -p -r1.106 umsm.c --- sys/dev/usb/umsm.c 1 Jun 2016 13:20:01 - 1.106 +++ sys/dev/usb/umsm.c 10 Dec 2016 19:06:40 - @@ -216,6 +216,8 @@ static const struct umsm_type umsm_devs[ {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, 0}, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_SCORPION }, 0}, {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, 0}, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505 }, 0}, {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, 0}, {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720 }, 0}, Index: sys/dev/usb/usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.666 diff -u -p -r1.666 usbdevs --- sys/dev/usb/usbdevs 1 Jun 2016 09:48:20 - 1.666 +++ sys/dev/usb/usbdevs 10 Dec 2016 19:06:41 - @@ -4382,6 +4382,7 @@ product OPTION GSICON72 0x6911 GlobeSur product OPTION GTHSDPA225 0x6971 GlobeTrotter HSDPA Icon 225 product OPTION GTHSUPA380E 0x7211 GlobeTrotter HSUPA 380E product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage +product OPTION GTICON505 0xd055 GlobeTrotter Icon505 /* Vaisala Products */ product VAISALA USBINSTCABLE 0x0200 USB instrument cable Index: sys/dev/usb/usbdevs.h === RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v retrieving revision 1.678 diff -u -p -r1.678 usbdevs.h --- sys/dev/usb/usbdevs.h 1 Jun 2016 09:48:54 - 1.678 +++ sys/dev/usb/usbdevs.h 10 Dec 2016 19:06:42 - @@ -4389,6 +4389,7 @@ #defineUSB_PRODUCT_OPTION_GTHSDPA225 0x6971 /* GlobeTrotter HSDPA Icon 225 */ #defineUSB_PRODUCT_OPTION_GTHSUPA380E 0x7211 /* GlobeTrotter HSUPA 380E */ #defineUSB_PRODUCT_OPTION_GTICON3220xd033 /* GlobeTrotter Icon322 storage */ +#defineUSB_PRODUCT_OPTION_GTICON5050xd055 /* GlobeTrotter Icon505 */ /* Vaisala Products */ #defineUSB_PRODUCT_VAISALA_USBINSTCABLE0x0200 /* USB instrument cable */ Index: sys/dev/usb/usbdevs_data.h === RCS file: /cvs/src/sys/dev/usb/usbdevs_data.h,v retrieving revision 1.672 diff -u -p -r1.672 usbdevs_data.h --- sys/dev/usb/usbdevs_data.h 1 Jun 2016 09:48:54 - 1.672 +++ sys/dev/usb/usbdevs_data.h 10 Dec 2016 19:06:42 - @@ -11172,6 +11172,10 @@ const struct usb_known_product usb_known { USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON322, "GlobeTrotter Icon322 storage", + }, + { + USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON505, + "GlobeTrotter Icon505", }, { USB_VENDOR_VAISALA, USB_PRODUCT_VAISALA_USBINSTCABLE,