CVS commit: src/sbin/gpt
Module Name:src Committed By: jnemeth Date: Tue Sep 23 07:47:54 UTC 2014 Modified Files: src/sbin/gpt: Makefile gpt.8 gpt.c gpt.h Added Files: src/sbin/gpt: resizedisk.c Log Message: - make gpt_gpt() available for use directly by subcommands - create new resizedisk disk subcommand for relocating backup GPT To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sbin/gpt/Makefile cvs rdiff -u -r1.29 -r1.30 src/sbin/gpt/gpt.8 cvs rdiff -u -r1.28 -r1.29 src/sbin/gpt/gpt.c cvs rdiff -u -r1.11 -r1.12 src/sbin/gpt/gpt.h cvs rdiff -u -r0 -r1.1 src/sbin/gpt/resizedisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/Makefile diff -u src/sbin/gpt/Makefile:1.8 src/sbin/gpt/Makefile:1.9 --- src/sbin/gpt/Makefile:1.8 Sun Aug 10 18:27:15 2014 +++ src/sbin/gpt/Makefile Tue Sep 23 07:47:54 2014 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.8 2014/08/10 18:27:15 jnemeth Exp $ +# $NetBSD: Makefile,v 1.9 2014/09/23 07:47:54 jnemeth Exp $ # $FreeBSD: src/sbin/gpt/Makefile,v 1.7 2005/09/01 02:49:20 marcel Exp $ PROG= gpt SRCS= add.c backup.c biosboot.c create.c destroy.c gpt.c label.c map.c \ - migrate.c recover.c remove.c resize.c restore.c set.c show.c unset.c + migrate.c recover.c remove.c resize.c resizedisk.c restore.c \ + set.c show.c unset.c MAN= gpt.8 LDADD+= -lprop -lutil Index: src/sbin/gpt/gpt.8 diff -u src/sbin/gpt/gpt.8:1.29 src/sbin/gpt/gpt.8:1.30 --- src/sbin/gpt/gpt.8:1.29 Sat Sep 20 22:36:09 2014 +++ src/sbin/gpt/gpt.8 Tue Sep 23 07:47:54 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: gpt.8,v 1.29 2014/09/20 22:36:09 jnemeth Exp $ +.\" $NetBSD: gpt.8,v 1.30 2014/09/23 07:47:54 jnemeth Exp $ .\" .\" Copyright (c) 2002 Marcel Moolenaar .\" All rights reserved. @@ -26,7 +26,7 @@ .\" .\" $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $ .\" -.Dd September 20, 2014 +.Dd September 23, 2014 .Dt GPT 8 .Os .Sh NAME @@ -354,6 +354,34 @@ If the .Fl a option is specified then the size will be adjusted to be a multiple of alignment if possible. +.\" resizedisk +.It Nm Ic resizedisk Oo Fl s Ar size Oc Ar device ... +The +.Ic resizedisk +command allows the user to resize a disk. +With GPTs, a backup copy is stored at the end of the disk. +If the underlying medium changes size +.Pq or is going to change size , +then the backup copy needs to be moved to the new end of the disk, +and the last sector available for data storage needs to be adjusted. +This command does that. +If the backup copy no longer exists due to the medium shrinking, then +a new backup copy will be created using the primary copy. +.Pp +The +.Fl s +option allows the new size to be specified, otherwise the backup copy +will automatically be placed at the current end of the disk. +If there is no suffix, or the suffix is +.Sq s +or +.Sq S +then size is in sectors, otherwise size is in bytes which must be +a multiple of the device's sector size. +Using the +.Fl s +option allows you to move the backup copy prior to resizing the medium. +This is primarily useful when shrinking the medium. .\" restore .It Nm Ic restore Oo Fl F Oc Ar device ... The Index: src/sbin/gpt/gpt.c diff -u src/sbin/gpt/gpt.c:1.28 src/sbin/gpt/gpt.c:1.29 --- src/sbin/gpt/gpt.c:1.28 Sun Aug 10 18:27:15 2014 +++ src/sbin/gpt/gpt.c Tue Sep 23 07:47:54 2014 @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: gpt.c,v 1.28 2014/08/10 18:27:15 jnemeth Exp $"); +__RCSID("$NetBSD: gpt.c,v 1.29 2014/09/23 07:47:54 jnemeth Exp $"); #endif #include @@ -534,7 +534,7 @@ out: return -1; } -static int +int gpt_gpt(int fd, off_t lba, int found) { uuid_t type; @@ -728,6 +728,7 @@ static struct { { cmd_remove, "remove" }, { NULL, "rename" }, { cmd_resize, "resize" }, + { cmd_resizedisk, "resizedisk" }, { cmd_restore, "restore" }, { cmd_set, "set" }, { cmd_show, "show" }, @@ -742,8 +743,8 @@ usage(void) extern const char addmsg1[], addmsg2[], backupmsg[], biosbootmsg[]; extern const char createmsg[], destroymsg[], labelmsg1[], labelmsg2[]; extern const char labelmsg3[], migratemsg[], recovermsg[], removemsg1[]; - extern const char removemsg2[], resizemsg[], restoremsg[], setmsg[]; - extern const char showmsg[], unsetmsg[]; + extern const char removemsg2[], resizemsg[], resizediskmsg[]; + extern const char restoremsg[], setmsg[], showmsg[], unsetmsg[]; fprintf(stderr, "usage: %s %s\n" @@ -763,6 +764,7 @@ usage(void) " %s %s\n" " %s %s\n" " %s %s\n" + " %s %s\n" " %s %s\n", getprogname(), addmsg1, getprogname(), addmsg2, @@ -778,6 +780,7 @@ usage(void) getprogname(), removemsg1, getprogname(), removemsg2, getprogname(), resizemsg, + getprogname(), resizediskmsg, getprogname(), restoremsg,
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: macallan Date: Tue Sep 23 09:18:33 UTC 2014 Modified Files: src/sys/arch/evbarm/rpi: vcprop.h Log Message: add goop for hardware cursor handling To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/rpi/vcprop.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/rpi/vcprop.h diff -u src/sys/arch/evbarm/rpi/vcprop.h:1.9 src/sys/arch/evbarm/rpi/vcprop.h:1.10 --- src/sys/arch/evbarm/rpi/vcprop.h:1.9 Fri Jul 25 11:39:34 2014 +++ src/sys/arch/evbarm/rpi/vcprop.h Tue Sep 23 09:18:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vcprop.h,v 1.9 2014/07/25 11:39:34 jmcneill Exp $ */ +/* $NetBSD: vcprop.h,v 1.10 2014/09/23 09:18:33 macallan Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -88,6 +88,8 @@ struct vcprop_tag { #define VCPROPTAG_GET_EDID_BLOCK 0x00030020 +#define VCPROPTAG_SET_CURSOR_INFO 0x8011 +#define VCPROPTAG_SET_CURSOR_STATE 0x8010 uint32_t vpt_len; uint32_t vpt_rcode; @@ -276,6 +278,24 @@ struct vcprop_tag_edidblock { uint8_t data[128]; }; +struct vcprop_tag_cursorinfo { + struct vcprop_tag tag; + uint32_t width; + uint32_t height; + uint32_t __pad; /* unused */ + uint32_t pixels; + uint32_t hotspot_x; + uint32_t hotspot_y; +}; + +struct vcprop_tag_cursorstate { + struct vcprop_tag tag; + uint32_t enable; /* 1 - visible */ + uint32_t x; + uint32_t y; + uint32_t flags; /* 0 - display coord. 1 - fb coord. */ +}; + struct vcprop_buffer_hdr { uint32_t vpb_len; uint32_t vpb_rcode;
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: macallan Date: Tue Sep 23 10:52:21 UTC 2014 Modified Files: src/sys/arch/evbarm/rpi: vcprop.h Log Message: add VC memory management goop To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/rpi/vcprop.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/rpi/vcprop.h diff -u src/sys/arch/evbarm/rpi/vcprop.h:1.10 src/sys/arch/evbarm/rpi/vcprop.h:1.11 --- src/sys/arch/evbarm/rpi/vcprop.h:1.10 Tue Sep 23 09:18:33 2014 +++ src/sys/arch/evbarm/rpi/vcprop.h Tue Sep 23 10:52:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vcprop.h,v 1.10 2014/09/23 09:18:33 macallan Exp $ */ +/* $NetBSD: vcprop.h,v 1.11 2014/09/23 10:52:21 macallan Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -88,6 +88,11 @@ struct vcprop_tag { #define VCPROPTAG_GET_EDID_BLOCK 0x00030020 +#define VCPROPTAG_ALLOCMEM 0x0003000c +#define VCPROPTAG_LOCKMEM 0x0003000d +#define VCPROPTAG_UNLOCKMEM 0x0003000e +#define VCPROPTAG_RELEASEMEM 0x0003000f + #define VCPROPTAG_SET_CURSOR_INFO 0x8011 #define VCPROPTAG_SET_CURSOR_STATE 0x8010 @@ -283,7 +288,7 @@ struct vcprop_tag_cursorinfo { uint32_t width; uint32_t height; uint32_t __pad; /* unused */ - uint32_t pixels; + uint32_t pixels; /* bus address in VC memory */ uint32_t hotspot_x; uint32_t hotspot_y; }; @@ -296,6 +301,31 @@ struct vcprop_tag_cursorstate { uint32_t flags; /* 0 - display coord. 1 - fb coord. */ }; +struct vcprop_tag_allocmem { + struct vcprop_tag tag; + uint32_t size; /* handle returned here */ + uint32_t align; + uint32_t flags; +/* + * flag definitions from + * https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface + */ +#define MEM_FLAG_DISCARDABLE (1 << 0) /* can be resized to 0 at any time. Use for cached data */ +#define MEM_FLAG_NORMAL (0 << 2) /* normal allocating alias. Don't use from ARM */ +#define MEM_FLAG_DIRECT (1 << 2) /* 0xC alias uncached */ +#define MEM_FLAG_COHERENT (2 << 2) /* 0x8 alias. Non-allocating in L2 but coherent */ +#define MEM_FLAG_L1_NONALLOCATING (MEM_FLAG_DIRECT | MEM_FLAG_COHERENT) /* Allocating in L2 */ +#define MEM_FLAG_ZERO (1 << 4) /* initialise buffer to all zeros */ +#define MEM_FLAG_NO_INIT (1 << 5) /* don't initialise (default is initialise to all ones */ +#define MEM_FLAG_HINT_PERMALOCK (1 << 6) /* Likely to be locked for long periods of time. */ +}; + +/* also for unlock and release */ +struct vcprop_tag_lockmem { + struct vcprop_tag tag; + uint32_t handle; /* bus address returned here */ +}; + struct vcprop_buffer_hdr { uint32_t vpb_len; uint32_t vpb_rcode;
CVS commit: src/sys/dev/pci/hdaudio
Module Name:src Committed By: nat Date: Tue Sep 23 13:29:30 UTC 2014 Modified Files: src/sys/dev/pci/hdaudio: hdafg.c Log Message: Add missing defines for constants used in hdafg_enable_analog_beep. This commit was approved by christos@ To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/pci/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/hdaudio/hdafg.c diff -u src/sys/dev/pci/hdaudio/hdafg.c:1.24 src/sys/dev/pci/hdaudio/hdafg.c:1.25 --- src/sys/dev/pci/hdaudio/hdafg.c:1.24 Sun Sep 21 14:30:22 2014 +++ src/sys/dev/pci/hdaudio/hdafg.c Tue Sep 23 13:29:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.24 2014/09/21 14:30:22 christos Exp $ */ +/* $NetBSD: hdafg.c,v 1.25 2014/09/23 13:29:30 nat Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.24 2014/09/21 14:30:22 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.25 2014/09/23 13:29:30 nat Exp $"); #include #include @@ -4369,6 +4369,10 @@ hdafg_modcmd(modcmd_t cmd, void *opaque) #define HDAFG_GET_ANACTRL 0xfe0 #define HDAFG_SET_ANACTRL 0x7e0 #define HDAFG_ANALOG_BEEP_EN __BIT(5) +#define HDAFG_ALC231_MONO_OUT_MIXER 0xf +#define HDAFG_STAC9200_AFG 0x1 +#define HDAFG_STAC9200_GET_ANACTRL_PAYLOAD 0x0 +#define HDAFG_ALC231_INPUT_BOTH_CHANNELS_UNMUTE 0x7100 static void hdafg_enable_analog_beep(struct hdafg_softc *sc) @@ -4388,10 +4392,11 @@ hdafg_enable_analog_beep(struct hdafg_so case HDAUDIO_PRODUCT_SIGMATEL_STAC9205: case HDAUDIO_PRODUCT_SIGMATEL_STAC9205_1: case HDAUDIO_PRODUCT_SIGMATEL_STAC9205D: - nid = 0x01; + nid = HDAFG_STAC9200_AFG; response = hdaudio_command(sc->sc_codec, nid, - HDAFG_GET_ANACTRL, 0x00); + HDAFG_GET_ANACTRL, + HDAFG_STAC9200_GET_ANACTRL_PAYLOAD); hda_delay(100); response |= HDAFG_ANALOG_BEEP_EN; @@ -4411,9 +4416,10 @@ hdafg_enable_analog_beep(struct hdafg_so * ALC231 that identifies as an ALC269. * This unmutes the PCBEEP on the speaker. */ - nid = 0xf; + nid = HDAFG_ALC231_MONO_OUT_MIXER; response = hdaudio_command(sc->sc_codec, nid, - CORB_SET_AMPLIFIER_GAIN_MUTE, 0x7100); + CORB_SET_AMPLIFIER_GAIN_MUTE, + HDAFG_ALC231_INPUT_BOTH_CHANNELS_UNMUTE); hda_delay(100); break; default:
CVS commit: src/sbin/gpt
Module Name:src Committed By: msaitoh Date: Tue Sep 23 13:48:04 UTC 2014 Modified Files: src/sbin/gpt: resizedisk.c Log Message: Fix compile error observed on i386. Use PRIu64. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sbin/gpt/resizedisk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/resizedisk.c diff -u src/sbin/gpt/resizedisk.c:1.1 src/sbin/gpt/resizedisk.c:1.2 --- src/sbin/gpt/resizedisk.c:1.1 Tue Sep 23 07:47:54 2014 +++ src/sbin/gpt/resizedisk.c Tue Sep 23 13:48:04 2014 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/add.c,v 1.14 2006/06/22 22:05:28 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: resizedisk.c,v 1.1 2014/09/23 07:47:54 jnemeth Exp $"); +__RCSID("$NetBSD: resizedisk.c,v 1.2 2014/09/23 13:48:04 msaitoh Exp $"); #endif #include @@ -142,8 +142,8 @@ resizedisk(int fd) } } if (sector - gpt_size <= lastdata) { - warnx("%s: not enough space at %lu for secondary GPT table", - device_name, sector); + warnx("%s: not enough space at %" PRIu64 + " for secondary GPT table", device_name, sector); return; } if (last - gpt_size <= lastdata) {
CVS commit: src/sys/arch/zaurus
Module Name:src Committed By: nonaka Date: Tue Sep 23 14:49:46 UTC 2014 Modified Files: src/sys/arch/zaurus/conf: files.zaurus src/sys/arch/zaurus/dev: scoop.c scoopreg.h scoopvar.h zaudio.c Added Files: src/sys/arch/zaurus/dev: wm8731_zaudio.c wm8731reg.h wm8731var.h wm8750_zaudio.c wm8750var.h zaudiovar.h Log Message: Apply WM8731 support patch from TOYOKURA Atsushi, arranged by me. - SL-C700: work fine - SL-C750: attach failed - SL-C860: not tested To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/zaurus/conf/files.zaurus cvs rdiff -u -r1.12 -r1.13 src/sys/arch/zaurus/dev/scoop.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/zaurus/dev/scoopreg.h \ src/sys/arch/zaurus/dev/scoopvar.h cvs rdiff -u -r0 -r1.1 src/sys/arch/zaurus/dev/wm8731_zaudio.c \ src/sys/arch/zaurus/dev/wm8731reg.h src/sys/arch/zaurus/dev/wm8731var.h \ src/sys/arch/zaurus/dev/wm8750_zaudio.c \ src/sys/arch/zaurus/dev/wm8750var.h src/sys/arch/zaurus/dev/zaudiovar.h cvs rdiff -u -r1.20 -r1.21 src/sys/arch/zaurus/dev/zaudio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/zaurus/conf/files.zaurus diff -u src/sys/arch/zaurus/conf/files.zaurus:1.11 src/sys/arch/zaurus/conf/files.zaurus:1.12 --- src/sys/arch/zaurus/conf/files.zaurus:1.11 Sun Jan 29 10:12:41 2012 +++ src/sys/arch/zaurus/conf/files.zaurus Tue Sep 23 14:49:46 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.zaurus,v 1.11 2012/01/29 10:12:41 tsutsui Exp $ +# $NetBSD: files.zaurus,v 1.12 2014/09/23 14:49:46 nonaka Exp $ # # Sharp Zaurus specific configuration info # @@ -100,6 +100,8 @@ file arch/zaurus/dev/ztp.c ztp device zaudio: audiobus, auconv, mulaw, aurateconv, pxaiis attach zaudio at iic file arch/zaurus/dev/zaudio.c zaudio +file arch/zaurus/dev/wm8731_zaudio.c zaudio & cpu_xscale_pxa250 +file arch/zaurus/dev/wm8750_zaudio.c zaudio & cpu_xscale_pxa270 defparam opt_zaudio.h ZAUDIO_VOLUME_STRIDE # Zaurus remote control Index: src/sys/arch/zaurus/dev/scoop.c diff -u src/sys/arch/zaurus/dev/scoop.c:1.12 src/sys/arch/zaurus/dev/scoop.c:1.13 --- src/sys/arch/zaurus/dev/scoop.c:1.12 Sat Oct 27 17:18:14 2012 +++ src/sys/arch/zaurus/dev/scoop.c Tue Sep 23 14:49:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: scoop.c,v 1.12 2012/10/27 17:18:14 chs Exp $ */ +/* $NetBSD: scoop.c,v 1.13 2014/09/23 14:49:46 nonaka Exp $ */ /* $OpenBSD: zaurus_scoop.c,v 1.12 2005/11/17 05:26:31 uwe Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scoop.c,v 1.12 2012/10/27 17:18:14 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scoop.c,v 1.13 2014/09/23 14:49:46 nonaka Exp $"); #include #include @@ -245,16 +245,45 @@ scoop_set_headphone(int on) } /* + * Enable or disable the speaker output connection. + */ +void +scoop_set_speaker(int onoff) +{ + struct scoop_softc *sc; + + if (!ZAURUS_ISC860) + return; + + sc = device_lookup_private(&scoop_cd, 0); + if (sc == NULL) + return; + + scoop_gpio_pin_ctl(sc, SCOOP0_AMP_ON, GPIO_PIN_OUTPUT); + if (onoff) { + scoop_gpio_pin_write(sc, SCOOP0_AMP_ON, GPIO_PIN_HIGH); + } else { + scoop_gpio_pin_write(sc, SCOOP0_AMP_ON, GPIO_PIN_LOW); + } +} + +/* * Enable or disable the mic bias */ void scoop_set_mic_bias(int onoff) { + struct scoop_softc *sc0; struct scoop_softc *sc1; + sc0 = device_lookup_private(&scoop_cd, 0); sc1 = device_lookup_private(&scoop_cd, 1); - if (sc1 != NULL) + + if (sc1 != NULL) { scoop_gpio_pin_write(sc1, SCOOP1_MIC_BIAS, onoff); + } else if (sc0 != NULL) { + scoop_gpio_pin_write(sc0, SCOOP0_MIC_BIAS, onoff); + } } /* Index: src/sys/arch/zaurus/dev/scoopreg.h diff -u src/sys/arch/zaurus/dev/scoopreg.h:1.5 src/sys/arch/zaurus/dev/scoopreg.h:1.6 --- src/sys/arch/zaurus/dev/scoopreg.h:1.5 Sun Jan 29 10:12:41 2012 +++ src/sys/arch/zaurus/dev/scoopreg.h Tue Sep 23 14:49:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: scoopreg.h,v 1.5 2012/01/29 10:12:41 tsutsui Exp $ */ +/* $NetBSD: scoopreg.h,v 1.6 2014/09/23 14:49:46 nonaka Exp $ */ /* $OpenBSD: zaurus_scoopreg.h,v 1.7 2005/07/01 23:51:55 uwe Exp $ */ /* @@ -68,7 +68,7 @@ #define SCOOP0_MUTE_R 5 #define SCOOP0_AKIN_PULLUP 6 #define SCOOP0_CF_POWER_C3000 6 -#define SCOOP0_APM_ON 7 +#define SCOOP0_AMP_ON 7 #define SCOOP0_LED_ORANGE_C3000 7 #define SCOOP0_BACKLIGHT_CONT 8 #define SCOOP0_JK_A_C3000 8 Index: src/sys/arch/zaurus/dev/scoopvar.h diff -u src/sys/arch/zaurus/dev/scoopvar.h:1.5 src/sys/arch/zaurus/dev/scoopvar.h:1.6 --- src/sys/arch/zaurus/dev/scoopvar.h:1.5 Sat Apr 18 05:20:21 2009 +++ src/sys/arch/zaurus/dev/scoopvar.h Tue Sep 23 14:49:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: scoopvar.h,v 1.5 2009/04/18 05:20:21 nonaka Exp $ */ +/* $NetBSD: scoopvar.h,v 1.6 2014/09/23 14:49:46 nonaka Exp $ */ /* $OpenBSD: zaurus_scoopvar.h,v 1.10 2005/11/17 05:26:31 uwe Exp $ */ /* @@ -32,6 +32,7 @@ void scoop_discharge_battery(int); void scoop_set_sdmmc_p
CVS commit: src/sys/arch/evbarm/awin
Module Name:src Committed By: skrll Date: Tue Sep 23 15:02:08 UTC 2014 Modified Files: src/sys/arch/evbarm/awin: awin_machdep.c Log Message: Fix up usb0drv for BPI To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/awin/awin_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/awin/awin_machdep.c diff -u src/sys/arch/evbarm/awin/awin_machdep.c:1.11 src/sys/arch/evbarm/awin/awin_machdep.c:1.12 --- src/sys/arch/evbarm/awin/awin_machdep.c:1.11 Mon Sep 15 19:30:16 2014 +++ src/sys/arch/evbarm/awin/awin_machdep.c Tue Sep 23 15:02:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_machdep.c,v 1.11 2014/09/15 19:30:16 martin Exp $ */ +/* $NetBSD: awin_machdep.c,v 1.12 2014/09/23 15:02:08 skrll Exp $ */ /* * Machine dependent functions for kernel setup for TI OSK5912 board. @@ -125,7 +125,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.11 2014/09/15 19:30:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awin_machdep.c,v 1.12 2014/09/23 15:02:08 skrll Exp $"); #include "opt_machdep.h" #include "opt_ddb.h" @@ -591,7 +591,7 @@ awin_device_register(device_t self, void */ prop_dictionary_set_cstring(dict, "satapwren", (cubietruck_p ? ">PH12" : ">PB8")); -#if AWIN_board == AWIN_cubieboard || AWIN_board == AWIN_cubietruck +#if AWIN_board == AWIN_cubieboard || AWIN_board == AWIN_cubietruck || AWIN_board == AWIN_bpi if (cubietruck_p) { prop_dictionary_set_cstring(dict, "usb0drv", ">PH17"); } else if (awin_chip_id() == AWIN_CHIP_ID_A20) {
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: njoly Date: Tue Sep 23 15:05:25 UTC 2014 Modified Files: src/distrib/sets/lists/comp: mi src/distrib/sets/lists/man: mi Log Message: Add some missing cat pages: hdestroy_r.0 and dnssec-importkey.0 To generate a diff of this commit: cvs rdiff -u -r1.1911 -r1.1912 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.1486 -r1.1487 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1911 src/distrib/sets/lists/comp/mi:1.1912 --- src/distrib/sets/lists/comp/mi:1.1911 Mon Aug 25 18:44:03 2014 +++ src/distrib/sets/lists/comp/mi Tue Sep 23 15:05:25 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1911 2014/08/25 18:44:03 pooka Exp $ +# $NetBSD: mi,v 1.1912 2014/09/23 15:05:25 njoly Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6907,6 +6907,7 @@ ./usr/share/man/cat3/hdestroy.0 comp-c-catman .cat ./usr/share/man/cat3/hdestroy1.0 comp-c-catman .cat ./usr/share/man/cat3/hdestroy1_r.0 comp-c-catman .cat +./usr/share/man/cat3/hdestroy_r.0 comp-c-catman .cat ./usr/share/man/cat3/heapsort.0 comp-c-catman .cat ./usr/share/man/cat3/herror.0 comp-c-catman .cat ./usr/share/man/cat3/hesiod.0 comp-c-catman hesiod,.cat Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1486 src/distrib/sets/lists/man/mi:1.1487 --- src/distrib/sets/lists/man/mi:1.1486 Mon Aug 25 12:49:22 2014 +++ src/distrib/sets/lists/man/mi Tue Sep 23 15:05:25 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1486 2014/08/25 12:49:22 tsutsui Exp $ +# $NetBSD: mi,v 1.1487 2014/09/23 15:05:25 njoly Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2390,6 +2390,7 @@ ./usr/share/man/cat8/dmsetup.0 man-lvm-catman lvm,.cat ./usr/share/man/cat8/dnsblog.0 man-postfix-catman postfix,.cat ./usr/share/man/cat8/dnssec-dsfromkey.0 man-bind-catman .cat +./usr/share/man/cat8/dnssec-importkey.0 man-bind-catman .cat ./usr/share/man/cat8/dnssec-keyfromlabel.0 man-bind-catman .cat ./usr/share/man/cat8/dnssec-keygen.0 man-bind-catman .cat ./usr/share/man/cat8/dnssec-makekeyset.0 man-obsolete obsolete
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Wed Sep 24 00:11:43 UTC 2014 Modified Files: src/sys/dev/usb: usbdevs Log Message: whitespace To generate a diff of this commit: cvs rdiff -u -r1.680 -r1.681 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.680 src/sys/dev/usb/usbdevs:1.681 --- src/sys/dev/usb/usbdevs:1.680 Mon Aug 4 15:59:37 2014 +++ src/sys/dev/usb/usbdevs Tue Sep 23 20:11:43 2014 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.680 2014/08/04 19:59:37 jdc Exp $ +$NetBSD: usbdevs,v 1.681 2014/09/24 00:11:43 christos Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -1725,15 +1725,15 @@ product HTC ANDROID 0x0ffe Android /* Huawei Technologies products */ product HUAWEI MOBILE 0x1001 Huawei Mobile -product HUAWEI E220 0x1003 Huawei E220 -product HUAWEI EM770W 0x1404 Huawei EM770W -product HUAWEI E1750 0x140c Huawei E1750 -product HUAWEI E1750INIT 0x1446 Huawei E1750 USB CD -product HUAWEI K3765 0x1465 Huawei K3765 -product HUAWEI E1820 0x14ac Huawei E1820 -product HUAWEI E171INIT 0x14fe Huawei E171 USB CD -product HUAWEI E171 0x1506 Huawei E171 -product HUAWEI K3765INIT 0x1520 Huawei K3765 USB CD +product HUAWEI E220 0x1003 Huawei E220 +product HUAWEI EM770W 0x1404 Huawei EM770W +product HUAWEI E1750 0x140c Huawei E1750 +product HUAWEI E1750INIT 0x1446 Huawei E1750 USB CD +product HUAWEI K3765 0x1465 Huawei K3765 +product HUAWEI E1820 0x14ac Huawei E1820 +product HUAWEI E171INIT 0x14fe Huawei E171 USB CD +product HUAWEI E171 0x1506 Huawei E171 +product HUAWEI K3765INIT 0x1520 Huawei K3765 USB CD /* Huawei-3Com products */ product HUAWEI3COM RT2573 0x0009 RT2573
CVS commit: src/sys/dev/usb
Module Name:src Committed By: christos Date: Wed Sep 24 00:17:13 UTC 2014 Modified Files: src/sys/dev/usb: u3g.c usbdevs Log Message: PR/49233: Ben Gergely: Add huawei e353 to u3g (factor out some common code in the process) To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/u3g.c cvs rdiff -u -r1.681 -r1.682 src/sys/dev/usb/usbdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/u3g.c diff -u src/sys/dev/usb/u3g.c:1.30 src/sys/dev/usb/u3g.c:1.31 --- src/sys/dev/usb/u3g.c:1.30 Mon Sep 2 03:39:03 2013 +++ src/sys/dev/usb/u3g.c Tue Sep 23 20:17:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: u3g.c,v 1.30 2013/09/02 07:39:03 christos Exp $ */ +/* $NetBSD: u3g.c,v 1.31 2014/09/24 00:17:13 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.30 2013/09/02 07:39:03 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.31 2014/09/24 00:17:13 christos Exp $"); #include #include @@ -192,6 +192,7 @@ static const struct usb_devno u3g_devs[] { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_K3765 }, { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE }, { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E171 }, + { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E353 }, /* OEM: Merlin */ { USB_VENDOR_MERLIN, USB_PRODUCT_MERLIN_V620 }, /* OEM: Novatel */ @@ -334,6 +335,16 @@ send_bulkmsg(usbd_device_handle dev, voi return (err == USBD_NORMAL_COMPLETION ? UMATCH_HIGHEST : UMATCH_NONE); } +/* Byte 0..3: Command Block Wrapper (CBW) signature */ +static void +set_cbw(unsigned char *cmd) +{ + cmd[0] = 0x55; + cmd[1] = 0x53; + cmd[2] = 0x42; + cmd[3] = 0x43; +} + static int u3g_bulk_scsi_eject(usbd_device_handle dev) { @@ -341,10 +352,7 @@ u3g_bulk_scsi_eject(usbd_device_handle d memset(cmd, 0, sizeof(cmd)); /* Byte 0..3: Command Block Wrapper (CBW) signature */ - cmd[0] = 0x55; - cmd[1] = 0x53; - cmd[2] = 0x42; - cmd[3] = 0x43; + set_cbw(cmd); /* 4..7: CBW Tag, has to unique, but only a single transfer used. */ cmd[4] = 0x01; /* 8..11: CBW Transfer Length, no data here */ @@ -372,10 +380,7 @@ u3g_bulk_ata_eject(usbd_device_handle de memset(cmd, 0, sizeof(cmd)); /* Byte 0..3: Command Block Wrapper (CBW) signature */ - cmd[0] = 0x55; - cmd[1] = 0x53; - cmd[2] = 0x42; - cmd[3] = 0x43; + set_cbw(cmd); /* 4..7: CBW Tag, has to unique, but only a single transfer used. */ cmd[4] = 0x01; /* 8..11: CBW Transfer Length, no data here */ @@ -455,16 +460,14 @@ u3g_huawei_k3765_reinit(usbd_device_hand /* magic string adapted from some webpage */ memset(cmd, 0, sizeof(cmd)); - cmd[0] = 0x55; - cmd[1] = 0x53; - cmd[2] = 0x42; - cmd[3] = 0x43; + /* Byte 0..3: Command Block Wrapper (CBW) signature */ + set_cbw(cmd); + cmd[15]= 0x11; cmd[16]= 0x06; return send_bulkmsg(dev, cmd, sizeof(cmd)); } - static int u3g_huawei_e171_reinit(usbd_device_handle dev) { @@ -472,10 +475,9 @@ u3g_huawei_e171_reinit(usbd_device_handl /* magic string adapted from some webpage */ memset(cmd, 0, sizeof(cmd)); - cmd[0] = 0x55; - cmd[1] = 0x53; - cmd[2] = 0x42; - cmd[3] = 0x43; + /* Byte 0..3: Command Block Wrapper (CBW) signature */ + set_cbw(cmd); + cmd[15]= 0x11; cmd[16]= 0x06; cmd[17]= 0x20; @@ -485,6 +487,28 @@ u3g_huawei_e171_reinit(usbd_device_handl } static int +u3g_huawei_e353_reinit(usbd_device_handle dev) +{ + unsigned char cmd[31]; + + /* magic string adapted from some webpage */ + memset(cmd, 0, sizeof(cmd)); + /* Byte 0..3: Command Block Wrapper (CBW) signature */ + set_cbw(cmd); + + cmd[4] = 0x7f; + cmd[9] = 0x02; + cmd[12] = 0x80; + cmd[14] = 0x0a; + cmd[15] = 0x11; + cmd[16] = 0x06; + cmd[17] = 0x20; + cmd[23] = 0x01; + + return send_bulkmsg(dev, cmd, sizeof(cmd)); +} + +static int u3g_sierra_reinit(usbd_device_handle dev) { /* Some Sierra devices presents themselves as a umass device with @@ -508,12 +532,25 @@ static int u3g_4gsystems_reinit(usbd_device_handle dev) { /* magic string adapted from usb_modeswitch database */ - static unsigned char cmd[31] = { - 0x55, 0x53, 0x42, 0x43, 0x12, 0x34, 0x56, 0x78, 0x80, 0x00, - 0x00, 0x00, 0x80, 0x00, 0x06, 0x06, 0xf5, 0x04, 0x02, 0x52, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 - }; + unsigned char cmd[31]; + + memset(cmd, 0, sizeof(cmd)); + /* Byte 0..3: Command Block Wrapper (CBW) signature */ + set_cbw(cmd); + + cmd[4] = 0x12; + cmd[5] = 0x34; + cmd[6] = 0x56; + cmd[7] = 0x78; + cmd[8] = 0x80; + cmd[12] = 0x80; + cmd[14] = 0x06; + cmd[15] = 0x06; + cmd[16] = 0xf5; + cmd[17] = 0x04; + cmd[18] = 0x02; + cmd[19] = 0x52; + cmd[20] = 0x70; return send_bulkmsg(dev, cmd, sizeof(cmd)); } @@ -545,6 +582,9 @@ u3ginit_match(device_t parent, cfdata_t case USB_PRODUCT_HUAWEI_E171INIT: return u3g_huawei_e171_reinit(uaa->device); break; + case USB_PRODUCT_HUAWEI_E3