From owner-svn-src-vendor@FreeBSD.ORG Sun Apr 28 00:46:00 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0B1A61BA; Sun, 28 Apr 2013 00:46:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EEE0A10E8; Sun, 28 Apr 2013 00:45:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3S0jxlq041974; Sun, 28 Apr 2013 00:45:59 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3S0jxjO041967; Sun, 28 Apr 2013 00:45:59 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304280045.r3S0jxjO041967@svn.freebsd.org> From: Adrian Chadd Date: Sun, 28 Apr 2013 00:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250003 - in vendor/qcamain_open_hal: . dist dist/hal dist/hal/ar9300 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Apr 2013 00:46:00 -0000 Author: adrian Date: Sun Apr 28 00:45:58 2013 New Revision: 250003 URL: http://svnweb.freebsd.org/changeset/base/250003 Log: Initial import of the QCA qcamain_open_hal repository. Source: https://github.com/qca/qcamain_open_hal_public Revision: 60390a9f9ac6a20db168fbbc01a4ad4e01c395ce Thankyou to QCA for this release. Added: vendor/qcamain_open_hal/ vendor/qcamain_open_hal/dist/ vendor/qcamain_open_hal/dist/LICENCE.TXT vendor/qcamain_open_hal/dist/NOTICE.TXT vendor/qcamain_open_hal/dist/README vendor/qcamain_open_hal/dist/hal/ vendor/qcamain_open_hal/dist/hal/ar9300/ vendor/qcamain_open_hal/dist/hal/ar9300/ar9300.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_aic.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_ani.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_aphrodite10.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_attach.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_beacon.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_eeprom.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_gpio.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_interrupts.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_jupiter10.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_jupiter20.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_keycache.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_mci.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_misc.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_osprey22.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_osprey22_scoemu.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_paprd.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_phy.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_power.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_radar.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_radio.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_raw_adc_capture.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_recv.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_recv_ds.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_reset.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_rtt.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_sim.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_sim.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_spectral.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_timer.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_tx99_tgt.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_txbf.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_txbf.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_txbf_cal.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_xmit.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300_xmit_ds.c vendor/qcamain_open_hal/dist/hal/ar9300/ar9300desc.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300eep.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300paprd.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300phy.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300radar.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300reg.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_ap121.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_aphrodite.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_cus157.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_generic.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_hb112.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_hb116.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_osprey_k31.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_wasp_2.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_wasp_k31.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_xb112.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9300template_xb113.h vendor/qcamain_open_hal/dist/hal/ar9300/ar9330_11.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9330_12.ini (contents, props changed) vendor/qcamain_open_hal/dist/hal/ar9300/ar9340.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9485.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9485_1_1.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar955x.ini vendor/qcamain_open_hal/dist/hal/ar9300/ar9580.ini vendor/qcamain_open_hal/dist/hal/ar9300/eeprom.diff vendor/qcamain_open_hal/dist/hal/ar9300/osprey_reg_map.h vendor/qcamain_open_hal/dist/hal/ar9300/osprey_reg_map_macro.h vendor/qcamain_open_hal/dist/hal/ar9300/poseidon_reg_map_macro.h vendor/qcamain_open_hal/dist/hal/ar9300/scorpion_reg_map.h vendor/qcamain_open_hal/dist/hal/ar9300/scorpion_reg_map_macro.h vendor/qcamain_open_hal/dist/hal/ar9300/sources vendor/qcamain_open_hal/dist/hal/ar9300/wasp_reg_map.h Added: vendor/qcamain_open_hal/dist/LICENCE.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/qcamain_open_hal/dist/LICENCE.TXT Sun Apr 28 00:45:58 2013 (r250003) @@ -0,0 +1,13 @@ +Copyright (c) 2013 Qualcomm Atheros, Inc. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. Added: vendor/qcamain_open_hal/dist/NOTICE.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/qcamain_open_hal/dist/NOTICE.TXT Sun Apr 28 00:45:58 2013 (r250003) @@ -0,0 +1,72 @@ +This NOTICE.TXT file contains certain notices of software components included +with the software that QUALCOMM ATHEROS Incorporated ('Qualcomm Atheros') is +required to provide you. Notwithstanding anything in the notices in this file, +your use of these software components together with the Qualcomm Atheros +software (Qualcomm Atheros software hereinafter referred to as 'Software') is +subject to the terms of your license from Qualcomm Atheros. Compliance with +all copyright laws and software license agreements included in the notice +section of this file are the responsibility of the user. Except as may be +granted by separate express written agreement, this file provides no license +to any Qualcomm Atheros patents, trademarks, copyrights, or other intellectual +property. + +Copyright (c) 2013 QUALCOMM ATHEROS Incorporated. All rights reserved. + +QUALCOMM ATHEROS® is a registered trademark and registered service mark of +QUALCOMM ATHEROS Incorporated. All other trademarks and service marks are +the property of their respective owners. + +NOTICES: + +/* + * Copyright (c) 2005-2012 Atheros Communications Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2005 Atheros Communications, Inc. + * Copyright (c) 2008-2010, Atheros Communications Inc. + * + * Redistribution and use in source and binary forms are permitted + * provided that the following conditions are met: + * 1. The materials contained herein are unmodified and are used + * unmodified. + * 2. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following NO + * ''WARRANTY'' disclaimer below (''Disclaimer''), without + * modification. + * 3. Redistributions in binary form must reproduce at minimum a + * disclaimer similar to the Disclaimer below and any redistribution + * must be conditioned upon including a substantially similar + * Disclaimer requirement for further binary redistribution. + * 4. Neither the names of the above-listed copyright holders nor the + * names of any contributors may be used to endorse or promote + * product derived from this software without specific prior written + * permission. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, + * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE + * FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGES. + */ Added: vendor/qcamain_open_hal/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/qcamain_open_hal/dist/README Sun Apr 28 00:45:58 2013 (r250003) @@ -0,0 +1,23 @@ +This is a public version of the AR9300 HAL, suitable for open source +development. + + +What is this? +------------- + +This is a public version of the QCA mainline (10.x) development HAL. +It has a few notable changes: + +* The boolean types have been converted back to the HAL types + (HAL_BOOL, AH_TRUE / AH_FALSE) to aid integration into the existing + open source Atheros HAL drivers; + +* Some features have been removed from this HAL. + +However, this is essentially the same HAL which is used in QCA development +and forms the basis for public releases from the 10.x mainline. + +Subsequent HAL releases will be committed on top of this release in order +to provide developers with a simple change history they can use when +doing branch merging. + Added: vendor/qcamain_open_hal/dist/hal/ar9300/ar9300.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/qcamain_open_hal/dist/hal/ar9300/ar9300.h Sun Apr 28 00:45:58 2013 (r250003) @@ -0,0 +1,1641 @@ +/* + * Copyright (c) 2013 Qualcomm Atheros, Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _ATH_AR9300_H_ +#define _ATH_AR9300_H_ + +#include "ah_internal.h" +#include "ah_eeprom.h" +#include "ah_devid.h" +#include "ar9300eep.h" /* For Eeprom definitions */ +#include "asf_amem.h" + + +#define AR9300_MAGIC 0x19741014 + + +/* MAC register values */ + +#define INIT_CONFIG_STATUS 0x00000000 +#define INIT_RSSI_THR 0x7 /* Missed beacon counter initialized to 0x7 (max is 0xff) */ +#define INIT_RSSI_BEACON_WEIGHT 8 /* ave beacon rssi weight (0-16) */ + +/* + * Various fifo fill before Tx start, in 64-byte units + * i.e. put the frame in the air while still DMAing + */ +#define MIN_TX_FIFO_THRESHOLD 0x1 +#define MAX_TX_FIFO_THRESHOLD (( 4096 / 64) - 1) +#define INIT_TX_FIFO_THRESHOLD MIN_TX_FIFO_THRESHOLD + + #define CHANSEL_DIV 15 + #define FCLK 40 + +#define COEFF ((FCLK * 5) / 2) +#define CHANSEL_2G(_freq) (((_freq) * 0x10000) / CHANSEL_DIV) +#define CHANSEL_5G(_freq) (((_freq) * 0x8000) / CHANSEL_DIV) +#define CHANSEL_5G_DOT5MHZ 2188 + +/* + * Receive Queue Fifo depth. + */ +enum RX_FIFO_DEPTH { + HAL_HP_RXFIFO_DEPTH = 16, + HAL_LP_RXFIFO_DEPTH = 128, +}; + +/* + * Gain support. + */ +#define NUM_CORNER_FIX_BITS_2133 7 +#define CCK_OFDM_GAIN_DELTA 15 + +enum GAIN_PARAMS { + GP_TXCLIP, + GP_PD90, + GP_PD84, + GP_GSEL +}; + +enum GAIN_PARAMS_2133 { + GP_MIXGAIN_OVR, + GP_PWD_138, + GP_PWD_137, + GP_PWD_136, + GP_PWD_132, + GP_PWD_131, + GP_PWD_130, +}; + +enum { + HAL_RESET_POWER_ON, + HAL_RESET_WARM, + HAL_RESET_COLD, +}; + +typedef struct _gain_opt_step { + int16_t paramVal[NUM_CORNER_FIX_BITS_2133]; + int32_t stepGain; + int8_t stepName[16]; +} GAIN_OPTIMIZATION_STEP; + +typedef struct { + u_int32_t numStepsInLadder; + u_int32_t defaultStepNum; + GAIN_OPTIMIZATION_STEP optStep[10]; +} GAIN_OPTIMIZATION_LADDER; + +typedef struct { + u_int32_t currStepNum; + u_int32_t currGain; + u_int32_t targetGain; + u_int32_t loTrig; + u_int32_t hiTrig; + u_int32_t gainFCorrection; + u_int32_t active; + GAIN_OPTIMIZATION_STEP *curr_step; +} GAIN_VALUES; + +typedef struct { + u_int16_t synth_center; + u_int16_t ctl_center; + u_int16_t ext_center; +} CHAN_CENTERS; + +/* RF HAL structures */ +typedef struct rf_hal_funcs { + HAL_BOOL (*set_channel)(struct ath_hal *, HAL_CHANNEL_INTERNAL *); + HAL_BOOL (*get_chip_power_lim)(struct ath_hal *ah, HAL_CHANNEL *chans, + u_int32_t nchancs); +} RF_HAL_FUNCS; + +struct ar9300_ani_default { + u_int16_t m1_thresh_low; + u_int16_t m2_thresh_low; + u_int16_t m1_thresh; + u_int16_t m2_thresh; + u_int16_t m2_count_thr; + u_int16_t m2_count_thr_low; + u_int16_t m1_thresh_low_ext; + u_int16_t m2_thresh_low_ext; + u_int16_t m1_thresh_ext; + u_int16_t m2_thresh_ext; + u_int16_t firstep; + u_int16_t firstep_low; + u_int16_t cycpwr_thr1; + u_int16_t cycpwr_thr1_ext; +}; + +/* + * Per-channel ANI state private to the driver. + */ +struct ar9300_ani_state { + HAL_CHANNEL c; + HAL_BOOL must_restore; + HAL_BOOL ofdms_turn; + u_int8_t ofdm_noise_immunity_level; + u_int8_t cck_noise_immunity_level; + u_int8_t spur_immunity_level; + u_int8_t firstep_level; + u_int8_t ofdm_weak_sig_detect_off; + u_int8_t mrc_cck_off; + + /* Thresholds */ + u_int32_t listen_time; + u_int32_t ofdm_trig_high; + u_int32_t ofdm_trig_low; + int32_t cck_trig_high; + int32_t cck_trig_low; + int32_t rssi_thr_low; + int32_t rssi_thr_high; + + int32_t rssi; /* The current RSSI */ + u_int32_t tx_frame_count; /* Last tx_frame_count */ + u_int32_t rx_frame_count; /* Last rx Frame count */ + u_int32_t cycle_count; /* Last cycle_count (can detect wrap-around) */ + u_int32_t ofdm_phy_err_count;/* OFDM err count since last reset */ + u_int32_t cck_phy_err_count; /* CCK err count since last reset */ + + struct ar9300_ani_default ini_def; /* INI default values for ANI registers */ + HAL_BOOL phy_noise_spur; /* based on OFDM/CCK Phy errors */ +}; + +#define AR9300_ANI_POLLINTERVAL 1000 /* 1000 milliseconds between ANI poll */ + +#define AR9300_CHANNEL_SWITCH_TIME_USEC 1000 /* 1 millisecond needed to change channels */ + +#define HAL_PROCESS_ANI 0x00000001 /* ANI state setup */ +#define HAL_RADAR_EN 0x80000000 /* Radar detect is capable */ +#define HAL_AR_EN 0x40000000 /* AR detect is capable */ + +#define DO_ANI(ah) \ + ((AH9300(ah)->ah_proc_phy_err & HAL_PROCESS_ANI)) + +struct ar9300_stats { + u_int32_t ast_ani_niup; /* ANI increased noise immunity */ + u_int32_t ast_ani_nidown; /* ANI decreased noise immunity */ + u_int32_t ast_ani_spurup; /* ANI increased spur immunity */ + u_int32_t ast_ani_spurdown;/* ANI descreased spur immunity */ + u_int32_t ast_ani_ofdmon; /* ANI OFDM weak signal detect on */ + u_int32_t ast_ani_ofdmoff;/* ANI OFDM weak signal detect off */ + u_int32_t ast_ani_cckhigh;/* ANI CCK weak signal threshold high */ + u_int32_t ast_ani_ccklow; /* ANI CCK weak signal threshold low */ + u_int32_t ast_ani_stepup; /* ANI increased first step level */ + u_int32_t ast_ani_stepdown;/* ANI decreased first step level */ + u_int32_t ast_ani_ofdmerrs;/* ANI cumulative ofdm phy err count */ + u_int32_t ast_ani_cckerrs;/* ANI cumulative cck phy err count */ + u_int32_t ast_ani_reset; /* ANI parameters zero'd for non-STA */ + u_int32_t ast_ani_lzero; /* ANI listen time forced to zero */ + u_int32_t ast_ani_lneg; /* ANI listen time calculated < 0 */ + HAL_MIB_STATS ast_mibstats; /* MIB counter stats */ + HAL_NODE_STATS ast_nodestats; /* Latest rssi stats from driver */ +}; + +struct ar9300_rad_reader { + u_int16_t rd_index; + u_int16_t rd_expSeq; + u_int32_t rd_resetVal; + u_int8_t rd_start; +}; + +struct ar9300_rad_writer { + u_int16_t wr_index; + u_int16_t wr_seq; +}; + +struct ar9300_radar_event { + u_int32_t re_ts; /* 32 bit time stamp */ + u_int8_t re_rssi; /* rssi of radar event */ + u_int8_t re_dur; /* duration of radar pulse */ + u_int8_t re_chanIndex; /* Channel of event */ +}; + +struct ar9300_radar_q_elem { + u_int32_t rq_seqNum; + u_int32_t rq_busy; /* 32 bit to insure atomic read/write */ + struct ar9300_radar_event rq_event; /* Radar event */ +}; + +struct ar9300_radar_q_info { + u_int16_t ri_qsize; /* q size */ + u_int16_t ri_seqSize; /* Size of sequence ring */ + struct ar9300_rad_reader ri_reader; /* State for the q reader */ + struct ar9300_rad_writer ri_writer; /* state for the q writer */ +}; + +#define HAL_MAX_ACK_RADAR_DUR 511 +#define HAL_MAX_NUM_PEAKS 3 +#define HAL_ARQ_SIZE 4096 /* 8K AR events for buffer size */ +#define HAL_ARQ_SEQSIZE 4097 /* Sequence counter wrap for AR */ +#define HAL_RADARQ_SIZE 1024 /* 1K radar events for buffer size */ +#define HAL_RADARQ_SEQSIZE 1025 /* Sequence counter wrap for radar */ +#define HAL_NUMRADAR_STATES 64 /* Number of radar channels we keep state for */ + +struct ar9300_ar_state { + u_int16_t ar_prev_time_stamp; + u_int32_t ar_prev_width; + u_int32_t ar_phy_err_count[HAL_MAX_ACK_RADAR_DUR]; + u_int32_t ar_ack_sum; + u_int16_t ar_peak_list[HAL_MAX_NUM_PEAKS]; + u_int32_t ar_packet_threshold; /* Thresh to determine traffic load */ + u_int32_t ar_par_threshold; /* Thresh to determine peak */ + u_int32_t ar_radar_rssi; /* Rssi threshold for AR event */ +}; + +struct ar9300_radar_state { + HAL_CHANNEL_INTERNAL *rs_chan; /* Channel info */ + u_int8_t rs_chan_index; /* Channel index in radar structure */ + u_int32_t rs_num_radar_events; /* Number of radar events */ + int32_t rs_firpwr; /* Thresh to check radar sig is gone */ + u_int32_t rs_radar_rssi; /* Thresh to start radar det (dB) */ + u_int32_t rs_height; /* Thresh for pulse height (dB)*/ + u_int32_t rs_pulse_rssi; /* Thresh to check if pulse is gone (dB) */ + u_int32_t rs_inband; /* Thresh to check if pusle is inband (0.5 dB) */ +}; +typedef struct { + u_int8_t uc_receiver_errors; + u_int8_t uc_bad_tlp_errors; + u_int8_t uc_bad_dllp_errors; + u_int8_t uc_replay_timeout_errors; + u_int8_t uc_replay_number_rollover_errors; +} ar_pcie_error_moniter_counters; + +#define AR9300_OPFLAGS_11A 0x01 /* if set, allow 11a */ +#define AR9300_OPFLAGS_11G 0x02 /* if set, allow 11g */ +#define AR9300_OPFLAGS_N_5G_HT40 0x04 /* if set, disable 5G HT40 */ +#define AR9300_OPFLAGS_N_2G_HT40 0x08 /* if set, disable 2G HT40 */ +#define AR9300_OPFLAGS_N_5G_HT20 0x10 /* if set, disable 5G HT20 */ +#define AR9300_OPFLAGS_N_2G_HT20 0x20 /* if set, disable 2G HT20 */ + +/* + * For Kite and later chipsets, the following bits are not being programmed in EEPROM + * and so need to be enabled always. + * Bit 0: en_fcc_mid, Bit 1: en_jap_mid, Bit 2: en_fcc_dfs_ht40 + * Bit 3: en_jap_ht40, Bit 4: en_jap_dfs_ht40 + */ +#define AR9300_RDEXT_DEFAULT 0x1F + +#define AR9300_MAX_CHAINS 3 +#define AR9300_NUM_CHAINS(chainmask) \ + (((chainmask >> 2) & 1) + ((chainmask >> 1) & 1) + (chainmask & 1)) +#define AR9300_CHAIN0_MASK 0x1 +#define AR9300_CHAIN1_MASK 0x2 +#define AR9300_CHAIN2_MASK 0x4 + +/* Support for multiple INIs */ +struct ar9300_ini_array { + u_int32_t *ia_array; + u_int32_t ia_rows; + u_int32_t ia_columns; +}; +#define INIT_INI_ARRAY(iniarray, array, rows, columns) do { \ + (iniarray)->ia_array = (u_int32_t *)(array); \ + (iniarray)->ia_rows = (rows); \ + (iniarray)->ia_columns = (columns); \ +} while (0) +#define INI_RA(iniarray, row, column) (((iniarray)->ia_array)[(row) * ((iniarray)->ia_columns) + (column)]) + +#define INIT_CAL(_perCal) \ + (_perCal)->cal_state = CAL_WAITING; \ + (_perCal)->cal_next = AH_NULL; + +#define INSERT_CAL(_ahp, _perCal) \ +do { \ + if ((_ahp)->ah_cal_list_last == AH_NULL) { \ + (_ahp)->ah_cal_list = (_ahp)->ah_cal_list_last = (_perCal); \ + ((_ahp)->ah_cal_list_last)->cal_next = (_perCal); \ + } else { \ + ((_ahp)->ah_cal_list_last)->cal_next = (_perCal); \ + (_ahp)->ah_cal_list_last = (_perCal); \ + (_perCal)->cal_next = (_ahp)->ah_cal_list; \ + } \ +} while (0) + +typedef enum cal_types { + IQ_MISMATCH_CAL = 0x1, + TEMP_COMP_CAL = 0x2, +} HAL_CAL_TYPES; + +typedef enum cal_state { + CAL_INACTIVE, + CAL_WAITING, + CAL_RUNNING, + CAL_DONE +} HAL_CAL_STATE; /* Calibrate state */ + +#define MIN_CAL_SAMPLES 1 +#define MAX_CAL_SAMPLES 64 +#define INIT_LOG_COUNT 5 +#define PER_MIN_LOG_COUNT 2 +#define PER_MAX_LOG_COUNT 10 + +#define AR9300_NUM_BT_WEIGHTS 4 +#define AR9300_NUM_WLAN_WEIGHTS 4 + +/* Per Calibration data structure */ +typedef struct per_cal_data { + HAL_CAL_TYPES cal_type; // Type of calibration + u_int32_t cal_num_samples; // Number of SW samples to collect + u_int32_t cal_count_max; // Number of HW samples to collect + void (*cal_collect)(struct ath_hal *, u_int8_t); // Accumulator func + void (*cal_post_proc)(struct ath_hal *, u_int8_t); // Post-processing func +} HAL_PERCAL_DATA; + +/* List structure for calibration data */ +typedef struct cal_list { + const HAL_PERCAL_DATA *cal_data; + HAL_CAL_STATE cal_state; + struct cal_list *cal_next; +} HAL_CAL_LIST; + +#define AR9300_NUM_CAL_TYPES 2 +#define AR9300_PAPRD_TABLE_SZ 24 +#define AR9300_PAPRD_GAIN_TABLE_SZ 32 +#define AR9382_MAX_GPIO_PIN_NUM (16) +#define AR9382_GPIO_PIN_8_RESERVED (8) +#define AR9382_GPIO_9_INPUT_ONLY (9) +#define AR9382_MAX_GPIO_INPUT_PIN_NUM (13) +#define AR9382_GPIO_PIN_11_RESERVED (11) +#define AR9382_MAX_JTAG_GPIO_PIN_NUM (3) + +/* Paprd tx power adjust data structure */ +struct ar9300_paprd_pwr_adjust { + u_int32_t target_rate; // rate index + u_int32_t reg_addr; // register offset + u_int32_t reg_mask; // mask of register + u_int32_t reg_mask_offset; // mask offset of register + u_int32_t sub_db; // offset value unit of dB +}; + +#define AR9300_MAX_RATES 36 /* legacy(4) + ofdm(8) + HTSS(8) + HTDS(8) + HTTS(8)*/ +struct ath_hal_9300 { + struct ath_hal_private_tables ah_priv; /* base class */ + + /* + * Information retrieved from EEPROM. + */ + ar9300_eeprom_t ah_eeprom; + + GAIN_VALUES ah_gain_values; + + u_int8_t ah_macaddr[IEEE80211_ADDR_LEN]; + u_int8_t ah_bssid[IEEE80211_ADDR_LEN]; + u_int8_t ah_bssid_mask[IEEE80211_ADDR_LEN]; + u_int16_t ah_assoc_id; + + /* + * Runtime state. + */ + u_int32_t ah_mask_reg; /* copy of AR_IMR */ + u_int32_t ah_mask2Reg; /* copy of AR_IMR_S2 */ + u_int32_t ah_msi_reg; /* copy of AR_PCIE_MSI */ + os_atomic_t ah_ier_ref_count; /* reference count for enabling interrupts */ + struct ar9300_stats ah_stats; /* various statistics */ + RF_HAL_FUNCS ah_rf_hal; + u_int32_t ah_tx_desc_mask; /* mask for TXDESC */ + u_int32_t ah_tx_ok_interrupt_mask; + u_int32_t ah_tx_err_interrupt_mask; + u_int32_t ah_tx_desc_interrupt_mask; + u_int32_t ah_tx_eol_interrupt_mask; + u_int32_t ah_tx_urn_interrupt_mask; + HAL_TX_QUEUE_INFO ah_txq[HAL_NUM_TX_QUEUES]; + HAL_SMPS_MODE ah_sm_power_mode; + HAL_BOOL ah_chip_full_sleep; + u_int32_t ah_atim_window; + HAL_ANT_SETTING ah_diversity_control; /* antenna setting */ + u_int16_t ah_antenna_switch_swap; /* Controls mapping of OID request */ + u_int8_t ah_tx_chainmask_cfg; /* chain mask config */ + u_int8_t ah_rx_chainmask_cfg; + u_int32_t ah_beacon_rssi_threshold; /* cache beacon rssi threshold */ + /* Calibration related fields */ + HAL_CAL_TYPES ah_supp_cals; + HAL_CAL_LIST ah_iq_cal_data; /* IQ Cal Data */ + HAL_CAL_LIST ah_temp_comp_cal_data; /* Temperature Compensation Cal Data */ + HAL_CAL_LIST *ah_cal_list; /* ptr to first cal in list */ + HAL_CAL_LIST *ah_cal_list_last; /* ptr to last cal in list */ + HAL_CAL_LIST *ah_cal_list_curr; /* ptr to current cal */ +// IQ Cal aliases +#define ah_total_power_meas_i ah_meas0.unsign +#define ah_total_power_meas_q ah_meas1.unsign +#define ah_total_iq_corr_meas ah_meas2.sign + union { + u_int32_t unsign[AR9300_MAX_CHAINS]; + int32_t sign[AR9300_MAX_CHAINS]; + } ah_meas0; + union { + u_int32_t unsign[AR9300_MAX_CHAINS]; + int32_t sign[AR9300_MAX_CHAINS]; + } ah_meas1; + union { + u_int32_t unsign[AR9300_MAX_CHAINS]; + int32_t sign[AR9300_MAX_CHAINS]; + } ah_meas2; + union { + u_int32_t unsign[AR9300_MAX_CHAINS]; + int32_t sign[AR9300_MAX_CHAINS]; + } ah_meas3; + u_int16_t ah_cal_samples; + /* end - Calibration related fields */ + u_int32_t ah_tx6_power_in_half_dbm; /* power output for 6Mb tx */ + u_int32_t ah_sta_id1_defaults; /* STA_ID1 default settings */ + u_int32_t ah_misc_mode; /* MISC_MODE settings */ + HAL_BOOL ah_get_plcp_hdr; /* setting about MISC_SEL_EVM */ + enum { + AUTO_32KHZ, /* use it if 32kHz crystal present */ + USE_32KHZ, /* do it regardless */ + DONT_USE_32KHZ, /* don't use it regardless */ + } ah_enable32k_hz_clock; /* whether to sleep at 32kHz */ + + u_int32_t ah_ofdm_tx_power; + int16_t ah_tx_power_index_offset; + + u_int ah_slot_time; /* user-specified slot time */ + u_int ah_ack_timeout; /* user-specified ack timeout */ + /* + * XXX + * 11g-specific stuff; belongs in the driver. + */ + u_int8_t ah_g_beacon_rate; /* fixed rate for G beacons */ + u_int32_t ah_gpio_mask; /* copy of enabled GPIO mask */ + u_int32_t ah_gpio_cause; /* copy of GPIO cause (sync and async) */ + /* + * RF Silent handling; setup according to the EEPROM. + */ + u_int32_t ah_gpio_select; /* GPIO pin to use */ + u_int32_t ah_polarity; /* polarity to disable RF */ + u_int32_t ah_gpio_bit; /* after init, prev value */ + HAL_BOOL ah_eep_enabled; /* EEPROM bit for capability */ + +#ifdef ATH_BT_COEX + /* + * Bluetooth coexistence static setup according to the registry + */ + HAL_BT_MODULE ah_bt_module; /* Bluetooth module identifier */ + u_int8_t ah_bt_coex_config_type; /* BT coex configuration */ + u_int8_t ah_bt_active_gpio_select; /* GPIO pin for BT_ACTIVE */ + u_int8_t ah_bt_priority_gpio_select; /* GPIO pin for BT_PRIORITY */ + u_int8_t ah_wlan_active_gpio_select; /* GPIO pin for WLAN_ACTIVE */ + u_int8_t ah_bt_active_polarity; /* Polarity of BT_ACTIVE */ + HAL_BOOL ah_bt_coex_single_ant; /* Single or dual antenna configuration */ + u_int8_t ah_bt_wlan_isolation; /* Isolation between BT and WLAN in dB */ + /* + * Bluetooth coexistence runtime settings + */ + HAL_BOOL ah_bt_coex_enabled; /* If Bluetooth coexistence is enabled */ + u_int32_t ah_bt_coex_mode; /* Register setting for AR_BT_COEX_MODE */ + u_int32_t ah_bt_coex_bt_weight[AR9300_NUM_BT_WEIGHTS]; /* Register setting for AR_BT_COEX_WEIGHT */ + u_int32_t ah_bt_coex_wlan_weight[AR9300_NUM_WLAN_WEIGHTS]; /* Register setting for AR_BT_COEX_WEIGHT */ + u_int32_t ah_bt_coex_mode2; /* Register setting for AR_BT_COEX_MODE2 */ + u_int32_t ah_bt_coex_flag; /* Special tuning flags for BT coex */ +#endif + + /* + * Generic timer support + */ + u_int32_t ah_avail_gen_timers; /* mask of available timers */ + u_int32_t ah_intr_gen_timer_trigger; /* generic timer trigger interrupt state */ + u_int32_t ah_intr_gen_timer_thresh; /* generic timer trigger interrupt state */ + HAL_BOOL ah_enable_tsf2; /* enable TSF2 for gen timer 8-15. */ + + /* + * ANI & Radar support. + */ + u_int32_t ah_proc_phy_err; /* Process Phy errs */ + u_int32_t ah_ani_period; /* ani update list period */ + struct ar9300_ani_state *ah_curani; /* cached last reference */ + struct ar9300_ani_state ah_ani[255]; /* per-channel state */ + struct ar9300_radar_state ah_radar[HAL_NUMRADAR_STATES]; /* Per-Channel Radar detector state */ + struct ar9300_radar_q_elem *ah_radarq; /* radar event queue */ + struct ar9300_radar_q_info ah_radarq_info; /* radar event q read/write state */ + struct ar9300_ar_state ah_ar; /* AR detector state */ + struct ar9300_radar_q_elem *ah_arq; /* AR event queue */ + struct ar9300_radar_q_info ah_arq_info; /* AR event q read/write state */ + + /* + * Transmit power state. Note these are maintained + * here so they can be retrieved by diagnostic tools. + */ + u_int16_t ah_rates_array[16]; + + /* + * Tx queue interrupt state. + */ + u_int32_t ah_intr_txqs; + + HAL_BOOL ah_intr_mitigation_rx; /* rx Interrupt Mitigation Settings */ + HAL_BOOL ah_intr_mitigation_tx; /* tx Interrupt Mitigation Settings */ + + /* + * Extension Channel Rx Clear State + */ + u_int32_t ah_cycle_count; + u_int32_t ah_ctl_busy; + u_int32_t ah_ext_busy; + + /* HT CWM state */ + HAL_HT_EXTPROTSPACING ah_ext_prot_spacing; + u_int8_t ah_tx_chainmask; /* tx chain mask */ + u_int8_t ah_rx_chainmask; /* rx chain mask */ + + u_int8_t ah_tx_cal_chainmask; /* tx cal chain mask */ + u_int8_t ah_rx_cal_chainmask; /* rx cal chain mask */ + + int ah_hwp; + void *ah_cal_mem; + HAL_BOOL ah_emu_eeprom; + + HAL_ANI_CMD ah_ani_function; + HAL_BOOL ah_rifs_enabled; + u_int32_t ah_rifs_reg[11]; + u_int32_t ah_rifs_sec_cnt; + + /* open-loop power control */ + u_int32_t original_gain[22]; + int32_t init_pdadc; + int32_t pdadc_delta; + + /* cycle counts for beacon stuck diagnostics */ + u_int32_t ah_cycles; + u_int32_t ah_rx_clear; + u_int32_t ah_rx_frame; + u_int32_t ah_tx_frame; + +#define BB_HANG_SIG1 0 +#define BB_HANG_SIG2 1 +#define BB_HANG_SIG3 2 +#define BB_HANG_SIG4 3 +#define MAC_HANG_SIG1 4 +#define MAC_HANG_SIG2 5 + /* bb hang detection */ + int ah_hang[6]; + hal_hw_hangs_t ah_hang_wars; + /* + * Support for ar9300 multiple INIs + */ + struct ar9300_ini_array ah_ini_pcie_serdes; + struct ar9300_ini_array ah_ini_pcie_serdes_low_power; + struct ar9300_ini_array ah_ini_modes_additional; + struct ar9300_ini_array ah_ini_modes_additional_40mhz; + struct ar9300_ini_array ah_ini_modes_rxgain; + struct ar9300_ini_array ah_ini_modes_rxgain_bounds; + struct ar9300_ini_array ah_ini_modes_txgain; + struct ar9300_ini_array ah_ini_japan2484; + struct ar9300_ini_array ah_ini_radio_post_sys2ant; + struct ar9300_ini_array ah_ini_BTCOEX_MAX_TXPWR; + /* + * New INI format starting with Osprey 2.0 INI. + * Pre, core, post arrays for each sub-system (mac, bb, radio, soc) + */ + #define ATH_INI_PRE 0 + #define ATH_INI_CORE 1 + #define ATH_INI_POST 2 + #define ATH_INI_NUM_SPLIT (ATH_INI_POST + 1) + struct ar9300_ini_array ah_ini_mac[ATH_INI_NUM_SPLIT]; /* New INI format */ + struct ar9300_ini_array ah_ini_bb[ATH_INI_NUM_SPLIT]; /* New INI format */ + struct ar9300_ini_array ah_ini_radio[ATH_INI_NUM_SPLIT]; /* New INI format */ + struct ar9300_ini_array ah_ini_soc[ATH_INI_NUM_SPLIT]; /* New INI format */ + + /* + * Added to support DFS postamble array in INI that we need to apply + * in DFS channels + */ + + struct ar9300_ini_array ah_ini_dfs; + +#if ATH_WOW + struct ar9300_ini_array ah_ini_pcie_serdes_wow; /* SerDes values during WOW sleep */ +#endif + + /* To indicate EEPROM mapping used */ + u_int32_t ah_immunity_vals[6]; + HAL_BOOL ah_immunity_on; + /* + * snap shot of counter register for debug purposes + */ +#ifdef AH_DEBUG + u_int32_t last_tf; + u_int32_t last_rf; + u_int32_t last_rc; + u_int32_t last_cc; +#endif + HAL_BOOL ah_dma_stuck; /* Set to AH_TRUE when RX/TX DMA failed to stop. */ + u_int32_t nf_tsf32; /* timestamp for NF calibration duration */ + + u_int32_t reg_dmn; /* Regulatory Domain */ + int16_t twice_antenna_gain; /* Antenna Gain */ + u_int16_t twice_antenna_reduction; /* Antenna Gain Allowed */ + + /* + * Upper limit after factoring in the regulatory max, antenna gain and + * multichain factor. No TxBF, CDD or STBC gain factored + */ + int16_t upper_limit[AR9300_MAX_CHAINS]; + + /* adjusted power for descriptor-based TPC for 1, 2, or 3 chains */ + int16_t txpower[AR9300_MAX_RATES][AR9300_MAX_CHAINS]; + + + /* adjusted power for descriptor-based TPC for 1, 2, or 3 chains with STBC*/ + int16_t txpower_stbc[AR9300_MAX_RATES][AR9300_MAX_CHAINS]; + + /* Transmit Status ring support */ + struct ar9300_txs *ts_ring; + u_int16_t ts_tail; + u_int16_t ts_size; + u_int32_t ts_paddr_start; + u_int32_t ts_paddr_end; + + /* Receive Buffer size */ +#define HAL_RXBUFSIZE_DEFAULT 0xfff + u_int16_t rx_buf_size; + + u_int32_t ah_wa_reg_val; // Store the permanent value of Reg 0x4004 so we dont have to R/M/W. (We should not be reading this register when in sleep states). + + /* Indicate the PLL source clock rate is 25Mhz or not. + * clk_25mhz = 0 by default. + */ + u_int8_t clk_25mhz; + /* For PAPRD uses */ + u_int16_t small_signal_gain[AH_MAX_CHAINS]; + u_int32_t pa_table[AH_MAX_CHAINS][AR9300_PAPRD_TABLE_SZ]; + u_int32_t paprd_gain_table_entries[AR9300_PAPRD_GAIN_TABLE_SZ]; + u_int32_t paprd_gain_table_index[AR9300_PAPRD_GAIN_TABLE_SZ]; + u_int32_t ah_2g_paprd_rate_mask_ht20; /* Copy of eep->modal_header_2g.paprd_rate_mask_ht20 */ + u_int32_t ah_2g_paprd_rate_mask_ht40; /* Copy of eep->modal_header_2g.paprd_rate_mask_ht40 */ + u_int32_t ah_5g_paprd_rate_mask_ht20; /* Copy of eep->modal_header_5g.paprd_rate_mask_ht20 */ + u_int32_t ah_5g_paprd_rate_mask_ht40; /* Copy of eep->modal_header_5g.paprd_rate_mask_ht40 */ + u_int32_t paprd_training_power; + /* For GreenTx use to store the default tx power */ + u_int8_t ah_default_tx_power[ar9300_rate_size]; + HAL_BOOL ah_paprd_broken; + + /* To store offsets of host interface registers */ + struct { + u_int32_t AR_RC; + u_int32_t AR_WA; + u_int32_t AR_PM_STATE; + u_int32_t AR_H_INFOL; + u_int32_t AR_H_INFOH; + u_int32_t AR_PCIE_PM_CTRL; + u_int32_t AR_HOST_TIMEOUT; + u_int32_t AR_EEPROM; + u_int32_t AR_SREV; + u_int32_t AR_INTR_SYNC_CAUSE; + u_int32_t AR_INTR_SYNC_CAUSE_CLR; + u_int32_t AR_INTR_SYNC_ENABLE; + u_int32_t AR_INTR_ASYNC_MASK; + u_int32_t AR_INTR_SYNC_MASK; + u_int32_t AR_INTR_ASYNC_CAUSE_CLR; + u_int32_t AR_INTR_ASYNC_CAUSE; + u_int32_t AR_INTR_ASYNC_ENABLE; + u_int32_t AR_PCIE_SERDES; + u_int32_t AR_PCIE_SERDES2; + u_int32_t AR_GPIO_OUT; + u_int32_t AR_GPIO_IN; + u_int32_t AR_GPIO_OE_OUT; + u_int32_t AR_GPIO_OE1_OUT; + u_int32_t AR_GPIO_INTR_POL; + u_int32_t AR_GPIO_INPUT_EN_VAL; + u_int32_t AR_GPIO_INPUT_MUX1; + u_int32_t AR_GPIO_INPUT_MUX2; + u_int32_t AR_GPIO_OUTPUT_MUX1; + u_int32_t AR_GPIO_OUTPUT_MUX2; + u_int32_t AR_GPIO_OUTPUT_MUX3; + u_int32_t AR_INPUT_STATE; + u_int32_t AR_SPARE; + u_int32_t AR_PCIE_CORE_RESET_EN; + u_int32_t AR_CLKRUN; + u_int32_t AR_EEPROM_STATUS_DATA; + u_int32_t AR_OBS; + u_int32_t AR_RFSILENT; + u_int32_t AR_GPIO_PDPU; + u_int32_t AR_GPIO_DS; + u_int32_t AR_MISC; + u_int32_t AR_PCIE_MSI; + u_int32_t AR_TSF_SNAPSHOT_BT_ACTIVE; + u_int32_t AR_TSF_SNAPSHOT_BT_PRIORITY; + u_int32_t AR_TSF_SNAPSHOT_BT_CNTL; + u_int32_t AR_PCIE_PHY_LATENCY_NFTS_ADJ; + u_int32_t AR_TDMA_CCA_CNTL; + u_int32_t AR_TXAPSYNC; + u_int32_t AR_TXSYNC_INIT_SYNC_TMR; + u_int32_t AR_INTR_PRIO_SYNC_CAUSE; + u_int32_t AR_INTR_PRIO_SYNC_ENABLE; + u_int32_t AR_INTR_PRIO_ASYNC_MASK; + u_int32_t AR_INTR_PRIO_SYNC_MASK; + u_int32_t AR_INTR_PRIO_ASYNC_CAUSE; + u_int32_t AR_INTR_PRIO_ASYNC_ENABLE; + } ah_hostifregs; + + u_int32_t ah_enterprise_mode; + u_int32_t ah_radar1; + u_int32_t ah_dc_offset; + HAL_BOOL ah_hw_green_tx_enable; /* 1:enalbe H/W Green Tx */ + HAL_BOOL ah_smartantenna_enable; /* 1:enalbe H/W */ + u_int32_t ah_disable_cck; + HAL_BOOL ah_lna_div_use_bt_ant_enable; /* 1:enable Rx(LNA) Diversity */ + + + /* + * Different types of memory where the calibration data might be stored. + * All types are searched in Ar9300EepromRestore() in the order flash, eeprom, otp. + * To disable searching a type, set its parameter to 0. + */ + int try_dram; + int try_flash; + int try_eeprom; + int try_otp; +#ifdef ATH_CAL_NAND_FLASH + int try_nand; +#endif + /* + * This is where we found the calibration data. + */ + int calibration_data_source; + int calibration_data_source_address; + /* + * This is where we look for the calibration data. must be set before ath_attach() is called + */ + int calibration_data_try; + int calibration_data_try_address; + u_int8_t + tx_iq_cal_enable : 1, + tx_iq_cal_during_agc_cal : 1, + tx_cl_cal_enable : 1; + +#if ATH_SUPPORT_MCI + /* For MCI */ + HAL_BOOL ah_mci_ready; + u_int32_t ah_mci_int_raw; + u_int32_t ah_mci_int_rx_msg; + u_int32_t ah_mci_rx_status; + u_int32_t ah_mci_cont_status; + u_int8_t ah_mci_bt_state; + u_int32_t ah_mci_gpm_addr; + u_int8_t *ah_mci_gpm_buf; + u_int32_t ah_mci_gpm_len; + u_int32_t ah_mci_gpm_idx; + u_int32_t ah_mci_sched_addr; + u_int8_t *ah_mci_sched_buf; + u_int8_t ah_mci_coex_major_version_wlan; + u_int8_t ah_mci_coex_minor_version_wlan; + u_int8_t ah_mci_coex_major_version_bt; + u_int8_t ah_mci_coex_minor_version_bt; + HAL_BOOL ah_mci_coex_bt_version_known; + HAL_BOOL ah_mci_coex_wlan_channels_update; + u_int32_t ah_mci_coex_wlan_channels[4]; + HAL_BOOL ah_mci_coex_2g5g_update; + HAL_BOOL ah_mci_coex_is_2g; + HAL_BOOL ah_mci_query_bt; + HAL_BOOL ah_mci_unhalt_bt_gpm; /* need send UNHALT */ + HAL_BOOL ah_mci_halted_bt_gpm; /* HALT sent */ + HAL_BOOL ah_mci_need_flush_btinfo; + HAL_BOOL ah_mci_concur_tx_en; + u_int8_t ah_mci_stomp_low_tx_pri; + u_int8_t ah_mci_stomp_all_tx_pri; + u_int8_t ah_mci_stomp_none_tx_pri; + u_int32_t ah_mci_wlan_cal_seq; + u_int32_t ah_mci_wlan_cal_done; +#if ATH_SUPPORT_AIC + HAL_BOOL ah_aic_enabled; + u_int32_t ah_aic_sram[ATH_AIC_MAX_BT_CHANNEL]; +#endif +#endif /* ATH_SUPPORT_MCI */ + u_int8_t ah_cac_quiet_enabled; +#if ATH_WOW_OFFLOAD + u_int32_t ah_mcast_filter_l32_set; + u_int32_t ah_mcast_filter_u32_set; +#endif + HAL_BOOL ah_reduced_self_gen_mask; +}; + +#define AH9300(_ah) ((struct ath_hal_9300 *)(_ah)) + +#define IS_9300_EMU(ah) \ + (AH_PRIVATE(ah)->ah_devid == AR9300_DEVID_EMU_PCIE) + +#define ar9300_eep_data_in_flash(_ah) \ + (!(AH_PRIVATE(_ah)->ah_flags & AH_USE_EEPROM)) + +#define IS_5GHZ_FAST_CLOCK_EN(_ah, _c) \ + (IS_CHAN_5GHZ(_c) && \ + ((AH_PRIVATE(_ah))->ah_config.ath_hal_fastClockEnable)) + +#if notyet +// Need these additional conditions for IS_5GHZ_FAST_CLOCK_EN when we have valid eeprom contents. +&& \ + ((ar9300_eeprom_get(AH9300(_ah), EEP_MINOR_REV) <= AR9300_EEP_MINOR_VER_16) || \ + (ar9300_eeprom_get(AH9300(_ah), EEP_FSTCLK_5G)))) +#endif + +/* + * WAR for bug 6773. OS_DELAY() does a PIO READ on the PCI bus which allows + * other cards' DMA reads to complete in the middle of our reset. + */ +#define WAR_6773(x) do { \ + if ((++(x) % 64) == 0) \ + OS_DELAY(1); \ +} while (0) + +#define REG_WRITE_ARRAY(iniarray, column, regWr) do { \ + int r; \ + for (r = 0; r < ((iniarray)->ia_rows); r++) { \ + OS_REG_WRITE(ah, INI_RA((iniarray), (r), 0), INI_RA((iniarray), r, (column)));\ + WAR_6773(regWr); \ + } \ +} while (0) + +#define UPPER_5G_SUB_BANDSTART 5700 +#define MID_5G_SUB_BANDSTART 5400 +#define TRAINPOWER_DB_OFFSET 6 + +#define AH_PAPRD_GET_SCALE_FACTOR(_scale, _eep, _is2G, _channel) do{ if(_is2G) { _scale = (_eep->modal_header_2g.paprd_rate_mask_ht20>>25)&0x7; \ + } else { \ + if(_channel >= UPPER_5G_SUB_BANDSTART){ _scale = (_eep->modal_header_5g.paprd_rate_mask_ht20>>25)&0x7;} \ + else if((UPPER_5G_SUB_BANDSTART < _channel) && (_channel >= MID_5G_SUB_BANDSTART)) \ + { _scale = (_eep->modal_header_5g.paprd_rate_mask_ht40>>28)&0x7;} \ + else { _scale = (_eep->modal_header_5g.paprd_rate_mask_ht40>>25)&0x7;} } }while(0) + +#ifdef AH_ASSERT + #define ar9300FeatureNotSupported(feature, ah, func) \ + ath_hal_printf(ah, # feature \ + " not supported but called from %s\n", (func)), \ + hal_assert(0) +#else + #define ar9300FeatureNotSupported(feature, ah, func) \ + ath_hal_printf(ah, # feature \ + " not supported but called from %s\n", (func)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Sun Apr 28 00:48:09 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9F8C24D6; Sun, 28 Apr 2013 00:48:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 766B810FD; Sun, 28 Apr 2013 00:48:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3S0m9Ft042437; Sun, 28 Apr 2013 00:48:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3S0m9Li042436; Sun, 28 Apr 2013 00:48:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304280048.r3S0m9Li042436@svn.freebsd.org> From: Adrian Chadd Date: Sun, 28 Apr 2013 00:48:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250005 - vendor/qcamain_open_hal/60390a9f9ac6a20db168fbbc01a4ad4e01c395ce X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Apr 2013 00:48:09 -0000 Author: adrian Date: Sun Apr 28 00:48:09 2013 New Revision: 250005 URL: http://svnweb.freebsd.org/changeset/base/250005 Log: Tag 60390a9f9ac6a20db168fbbc01a4ad4e01c395ce . Added: vendor/qcamain_open_hal/60390a9f9ac6a20db168fbbc01a4ad4e01c395ce/ - copied from r250004, vendor/qcamain_open_hal/dist/ From owner-svn-src-vendor@FreeBSD.ORG Sun Apr 28 07:52:46 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B0345CFD; Sun, 28 Apr 2013 07:52:46 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A08CD1C93; Sun, 28 Apr 2013 07:52:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3S7qkTL091358; Sun, 28 Apr 2013 07:52:46 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3S7qkFE091357; Sun, 28 Apr 2013 07:52:46 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304280752.r3S7qkFE091357@svn.freebsd.org> From: Martin Matuska Date: Sun, 28 Apr 2013 07:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250017 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Apr 2013 07:52:46 -0000 Author: mm Date: Sun Apr 28 07:52:46 2013 New Revision: 250017 URL: http://svnweb.freebsd.org/changeset/base/250017 Log: Update vendor-sys/illumos/dist to illumos-gate 14020:3843f7c5f635 Illumos ZFS issues: 3705 stack overflow due to zfs lz4 compression Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Sun Apr 28 07:48:53 2013 (r250016) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Sun Apr 28 07:52:46 2013 (r250017) @@ -197,20 +197,17 @@ lz4_decompress(void *s_start, void *d_st defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \ defined(__LP64__) || defined(_LP64)) #define LZ4_ARCH64 1 -/* - * Illumos: On amd64 we have 20k of stack and 24k on sun4u and sun4v, so we - * can spend 16k on the algorithm - */ -#define STACKLIMIT 12 #else #define LZ4_ARCH64 0 +#endif + /* - * Illumos: On i386 we only have 12k of stack, so in order to maintain the - * same COMPRESSIONLEVEL we have to use heap allocation. Performance will - * suck, but alas, it's ZFS on 32-bit we're talking about, so... + * Limits the amount of stack space that the algorithm may consume to hold + * the compression lookup table. The value `9' here means we'll never use + * more than 2k of stack (see above for a description of COMPRESSIONLEVEL). + * If more memory is needed, it is allocated from the heap. */ -#define STACKLIMIT 11 -#endif +#define STACKLIMIT 9 /* * Little Endian or Big Endian? @@ -240,11 +237,7 @@ lz4_decompress(void *s_start, void *d_st #define LZ4_FORCE_UNALIGNED_ACCESS 1 #endif -/* - * Illumos: we can't use GCC's __builtin_ctz family of builtins in the - * kernel - */ -#define LZ4_FORCE_SW_BITCOUNT +/* #define LZ4_FORCE_SW_BITCOUNT */ /* * Compiler Options From owner-svn-src-vendor@FreeBSD.ORG Tue Apr 30 23:49:24 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 507DB1A3; Tue, 30 Apr 2013 23:49:24 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3FD101F4C; Tue, 30 Apr 2013 23:49:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3UNnOJG061099; Tue, 30 Apr 2013 23:49:24 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3UNnOcK061097; Tue, 30 Apr 2013 23:49:24 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304302349.r3UNnOcK061097@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 30 Apr 2013 23:49:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250125 - in vendor/flex/dist: . doc m4 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 23:49:24 -0000 Author: jkim Date: Tue Apr 30 23:49:23 2013 New Revision: 250125 URL: http://svnweb.freebsd.org/changeset/base/250125 Log: Import flex 2.5.37. Added: vendor/flex/dist/ylwrap (contents, props changed) Deleted: vendor/flex/dist/doc/ vendor/flex/dist/m4/ Modified: vendor/flex/dist/ChangeLog vendor/flex/dist/INSTALL vendor/flex/dist/Makefile.am vendor/flex/dist/Makefile.in vendor/flex/dist/NEWS vendor/flex/dist/README.cvs vendor/flex/dist/buf.c vendor/flex/dist/compile vendor/flex/dist/conf.in vendor/flex/dist/config.guess vendor/flex/dist/config.sub vendor/flex/dist/configure vendor/flex/dist/configure.in vendor/flex/dist/depcomp vendor/flex/dist/dfa.c vendor/flex/dist/filter.c vendor/flex/dist/flex.skl vendor/flex/dist/flexdef.h vendor/flex/dist/flexint.h vendor/flex/dist/gen.c vendor/flex/dist/install-sh vendor/flex/dist/main.c vendor/flex/dist/misc.c vendor/flex/dist/missing vendor/flex/dist/parse.c vendor/flex/dist/parse.h vendor/flex/dist/parse.y vendor/flex/dist/regex.c vendor/flex/dist/scan.c vendor/flex/dist/scan.l vendor/flex/dist/scanflags.c vendor/flex/dist/scanopt.c vendor/flex/dist/skel.c vendor/flex/dist/tables.c Modified: vendor/flex/dist/ChangeLog ============================================================================== --- vendor/flex/dist/ChangeLog Tue Apr 30 23:36:48 2013 (r250124) +++ vendor/flex/dist/ChangeLog Tue Apr 30 23:49:23 2013 (r250125) @@ -1,996 +1,1408 @@ -2008-02-26 15:36 Will Estes +2012-08-03 Will Estes + + * NEWS: update NEWS to reflect changes in 2.5.37 + +2012-08-03 Will Estes + + * configure.in: update flex version to 2.5.37 + +2012-08-03 Will Estes + + * po/de.po: new de translation from the translation project + +2012-08-02 Will Estes + + * po/vi.po: new vi translation from the translation project + +2012-08-02 Will Estes + + * po/pl.po: new pl translation from the translation project + +2012-08-02 Will Estes + + * po/fi.po: new fi translation from the translation project + +2012-08-02 Will Estes + + * Makefile.am: Add -f option to LN_S to create flex++ The autoconf macro LN_S needs -f to successfully install flex++ if + flex++ already exists. Fortunately, ln, ln -s and cp -p, which are + the various forms that LN_S can take all will do the right thing + with a -f argument passed. + +2012-08-02 Will Estes + + * Makefile.am, tools/Makefile.am, tools/cvs2cl.pl, + tools/cvsauthors, tools/git2cl: replace cvs2cl with git2cl Add the git2cl script in tools/ and remove the (now unnecessary) + cvs2cl script. Remove tools/cvsauthors since git2cl does not need + that file. Account for all the above in Makefile.am and + tools/Makefile.am + +2012-07-29 Will Estes + + * tests/.cvsignore, tests/.gitignore, tests/TEMPLATE/.cvsignore, + tests/TEMPLATE/.gitignore, tests/test-alloc-extra/.cvsignore, + tests/test-alloc-extra/.gitignore, tests/test-array-nr/.cvsignore, + tests/test-array-nr/.gitignore, tests/test-array-r/.cvsignore, + tests/test-array-r/.gitignore, tests/test-basic-nr/.cvsignore, + tests/test-basic-nr/.gitignore, tests/test-basic-r/.cvsignore, + tests/test-basic-r/.gitignore, tests/test-bison-nr/.cvsignore, + tests/test-bison-nr/.gitignore, tests/test-bison-yylloc/.cvsignore, + tests/test-bison-yylloc/.gitignore, + tests/test-bison-yylval/.cvsignore, + tests/test-bison-yylval/.gitignore, + tests/test-c++-basic/.cvsignore, tests/test-c++-basic/.gitignore, + tests/test-c++-multiple-scanners/.cvsignore, + tests/test-c++-multiple-scanners/.gitignore, + tests/test-c++-yywrap/.cvsignore, tests/test-c++-yywrap/.gitignore, + tests/test-c-cpp-nr/.cvsignore, tests/test-c-cpp-nr/.gitignore, + tests/test-c-cpp-r/.cvsignore, tests/test-c-cpp-r/.gitignore, + tests/test-ccl/.cvsignore, tests/test-ccl/.gitignore, + tests/test-concatenated-options/.cvsignore, + tests/test-concatenated-options/.gitignore, + tests/test-debug-nr/.cvsignore, tests/test-debug-nr/.gitignore, + tests/test-debug-r/.cvsignore, tests/test-debug-r/.gitignore, + tests/test-extended/.cvsignore, tests/test-extended/.gitignore, + tests/test-header-nr/.cvsignore, tests/test-header-nr/.gitignore, + tests/test-header-r/.cvsignore, tests/test-header-r/.gitignore, + tests/test-include-by-buffer/.cvsignore, + tests/test-include-by-buffer/.gitignore, + tests/test-include-by-push/.cvsignore, + tests/test-include-by-push/.gitignore, + tests/test-include-by-reentrant/.cvsignore, + tests/test-include-by-reentrant/.gitignore, + tests/test-linedir-r/.cvsignore, tests/test-linedir-r/.gitignore, + tests/test-lineno-nr/.cvsignore, tests/test-lineno-nr/.gitignore, + tests/test-lineno-r/.cvsignore, tests/test-lineno-r/.gitignore, + tests/test-mem-nr/.cvsignore, tests/test-mem-nr/.gitignore, + tests/test-mem-r/.cvsignore, tests/test-mem-r/.gitignore, + tests/test-multiple-scanners-nr/.cvsignore, + tests/test-multiple-scanners-nr/.gitignore, + tests/test-multiple-scanners-r/.cvsignore, + tests/test-multiple-scanners-r/.gitignore, + tests/test-noansi-nr/.cvsignore, tests/test-noansi-nr/.gitignore, + tests/test-noansi-r/.cvsignore, tests/test-noansi-r/.gitignore, + tests/test-posix/.cvsignore, tests/test-posix/.gitignore, + tests/test-posixly-correct/.cvsignore, + tests/test-posixly-correct/.gitignore, + tests/test-prefix-nr/.cvsignore, tests/test-prefix-nr/.gitignore, + tests/test-prefix-r/.cvsignore, tests/test-prefix-r/.gitignore, + tests/test-pthread/.cvsignore, tests/test-pthread/.gitignore, + tests/test-quotes/.cvsignore, tests/test-quotes/.gitignore, + tests/test-reject/.cvsignore, tests/test-reject/.gitignore, + tests/test-rescan-nr/.cvsignore, tests/test-rescan-nr/.gitignore, + tests/test-rescan-r/.cvsignore, tests/test-rescan-r/.gitignore, + tests/test-string-nr/.cvsignore, tests/test-string-nr/.gitignore, + tests/test-string-r/.cvsignore, tests/test-string-r/.gitignore, + tests/test-table-opts/.cvsignore, tests/test-table-opts/.gitignore, + tests/test-top/.cvsignore, tests/test-top/.gitignore, + tests/test-yyextra/.cvsignore, tests/test-yyextra/.gitignore: rename + .cvsignore files in tests/ subdirectories to gitignore + +2012-07-23 Will Estes + + * examples/.cvsignore, examples/fastwc/.cvsignore, + examples/manual/.cvsignore, lib/.cvsignore, tools/.cvsignore: remove + unneeded .cvsignore files + +2012-07-22 Will Estes + + * .gitignore: add *.o and *.a to top level .gitignore The cvs tree did not need these additions because cvs assumed a lot + of C-style defaults for .cvsignore files. flex builds *.o object + files in the course of compilation and *.a files are built as a part + of the libraries that flex compiles in the build process. + +2012-07-22 Will Estes + + * .cvsignore, .gitignore, doc/.cvsignore, doc/.gitignore, + m4/.cvsignore, m4/.gitignore, po/.cvsignore, po/.gitignore: rename + .cvsignore files to .gitignore The .cvsignore files from the legacy cvs repository tracked what + files got autogenerated during various stages of the flex build. + Renaming the .cvsignore files to .gitignore lets git do the same + thing. git is better about letting higher level .gitignore files + not-track files in lower level directories. As I work my way through + the test directories, we may add additional .gitignore files from + the old .cvsignore files. The po/ directory has a lot of special files used by gettext, so the + patterns in po/.gitignore look very different. The doc/.gitignore file accounts for what texinfo/makeinfo do, and + so it also has special patterns. The m4 directory is mainly present for autoconf's benefit, but we + have to account for it so make can do the right thing. Hence, + m4/.gitignore says to ignore *.m4, as counterintuitive as that may + seem. + +2012-07-22 Will Estes + + * NEWS: update NEWS file to note release date of 2.5.36 + +2012-06-23 Will Estes + + * doc/flex.texi: fix call to version in manual + +2012-06-22 Will Estes + + * doc/flex.texi: add missing argument to call to yylex in manual + +2012-04-27 Will Estes + + * flex.skl: lintish cleanup in flex.skl; resolves #2040664 + +2012-04-27 Will Estes + + * doc/flex.texi: add a 7 to the c99 octal pattern; resolves #3518269 + +2012-03-31 Will Estes + + * doc/flex.texi: copyedit; resolves #3513670 + +2012-03-23 Will Estes + + * buf.c: escape backslashes in #line filenames in %top section; + resolves #3212400; patch submitted by scfc_de + +2012-03-21 Will Estes + + * Makefile.am, configure.in, lib/Makefile.am, lib/lib.c, + lib/malloc.c, lib/realloc.c: provide malloc() and realloc() for + systems that do not have satisfactory versions; resolves #1899047 + +2012-03-21 Will Estes + + * Makefile.am: install flex++ as a link; resolves bug #2939681 + +2012-03-21 Will Estes + + * tests/test-bison-nr/Makefile.am, + tests/test-bison-yylloc/Makefile.am, + tests/test-bison-yylval/Makefile.am: fix dependencies for make -j in + test suite + +2012-03-19 Will Estes + + * flex.skl: add missing prototypes for yyset_column() and + yyget_column(); resolves #3029024; patch submitted by scfc_de + +2012-03-02 Will Estes + + * flex.skl, tests/test-reject/scanner.l, + tests/test-table-opts/scanner.l: wrap yy_fatal_error calls + appropriately + +2012-03-02 Will Estes + + * regex.c: fix overlapping data buffer issue; patch from Tim + Landsheet scfc_de + +2012-03-02 Will Estes + + * scan.l: better bracket handling in the scanner + +2012-03-02 Will Estes + + * flexdef.h, main.c, misc.c: Remove unneeded tracking of line/column + output; patch from Tim Landsheet scfc_de + +2012-03-02 Will Estes + + * configure.in: fix test for m4 to accept an m4 with -P and not jus + tGNU m4; patch from Tim Landsheet scfc_de on sourceforge + +2012-03-02 Will Estes + + * doc/flex.texi: fix order of td_lolen and td_hilen in + documentation; resolves #2913693; patch submitted by Andreas + Gruenbacher + +2012-03-02 Will Estes + + * doc/flex.texi: correct document of YY_FLUSH_BUFFER; resolves + #1723028 + +2012-02-17 Will Estes + + * dfa.c, flexdef.h, misc.c, parse.y: speed up things for complex + inputs; resolves #2891390 + +2012-02-17 Will Estes + + * doc/flex.texi: fix ipv6 pattern in manual; update manual copyright + to 2012 + +2012-02-17 Will Estes + + * flex.skl: fremove isatty() declaration; resolves #1984987 + +2012-02-17 Will Estes + + * doc/flex.texi: Add link for RFC 2396 + +2012-02-17 Will Estes + + * flex.skl: resolve #1990170 + +2012-02-17 Will Estes + + * flex.skl: fix documentation to reflect arguments actually used; + bug #2783023 + +2012-02-05 Will Estes + + * main.c: fix yywrap behavior for reentrant scanners + +2012-02-04 Will Estes + + * NEWS: Mmention tr translation + +2012-02-04 Will Estes + + * tables.c: prevent unused stuff from being compiled so as to reduce + warnings + +2012-02-03 Will Estes + + * buf.c, filter.c, main.c, misc.c, regex.c, scanflags.c: more better + error messages; more better memory handling + +2012-02-03 Will Estes + + * misc.c: more careful/paranoia + +2012-02-03 Will Estes + + * scanopt.c: more careful memory allocation in option processing + +2012-02-03 Will Estes + + * Makefile.am, configure.in: remove m4/ directory and generally + clean up automake/autoconf inputs + +2012-02-03 Will Estes + + * lib/.cvsignore: cvsignore files that need that + +2012-02-03 Will Estes + + * NEWS, po/da.po, po/es.po, po/ko.po, po/pt_BR.po, po/ro.po, + po/ru.po, po/sv.po, po/tr.po, po/zh_CN.po: check in translations + +2012-02-03 Will Estes + + * main.c: correct macro definition of yywrap + +2012-02-03 Will Estes + + * scan.l: Greater specificity in error messages + +2012-02-03 Will Estes + + * parse.y: improve rule handling at EOF + +2012-02-03 Will Estes + + * flex.skl: include cstdio for definition of EOF in all cases + +2012-02-03 Will Estes + + * flex.skl: suppress warning on unused yyguts_t + +2010-08-13 Will Estes + + * NEWS, po/LINGUAS, po/fi.po: new fi translation from the + translation project + +2009-03-31 Will Estes + + * doc/flex.texi: Include version.texi after @setfilename, so that @set values are correctly evaluated. (Start Conditions, Performance, Lex and Posix): Fix some markup errors. (Cxx): Likewise. Also, fix C++ example to actually be compilable. Patch from Ralf Wildenhues + +2008-12-28 Will Estes + + * configure.in: remove line break that broke configure + +2008-12-28 Will Estes + + * doc/flex.texi: specify the title on the title page since @settitle + doesn't do that for us; resolves bug #2043491 + +2008-12-28 Will Estes + + * configure.in, flexdef.h: check for regex.h; resolves bug #2337486 + +2008-07-23 Will Estes + + * NEWS, po/ga.po: new ga translation from the translation project + +2008-06-10 Will Estes + + * NEWS, po/ca.po: new ca translation + +2008-05-31 Will Estes + + * Makefile.am: move ABOUT-NLS back to EXTRA_DIST + +2008-05-31 Will Estes + + * Makefile.am: create new dist_doc_DATA; move some EXTRA_DIST files + to new dist_doc_DATA target + +2008-05-31 Will Estes + + * .cvsignore: ignore more automake generated config.status* files + +2008-05-31 Will Estes + + * NEWS: flex distribution now built with automake and autoconf + versions ... + +2008-05-31 Will Estes + + * README.cvs: document GNU auto* version changes for building flex + from cvs + +2008-05-31 Will Estes + + * .cvsignore, doc/Makefile.am: ignore automake-supplied ylwrap + +2008-05-15 Will Estes + + * NEWS, flex.skl: clean up types; resolves 1961902 + +2008-05-15 Will Estes + + * NEWS: update NEWS re manual + +2008-05-15 Will Estes + + * doc/flex.texi: correct eroneous references to 'nowrap' to refer to + 'noyywrap'; resolves bug #1739912 + +2008-05-14 Will Estes + + * filter.c: call clearerr on stdin before dup2'ing it; resolves bug + #1902612 + +2008-05-14 Will Estes + + * NEWS: generic updates to NEWS + +2008-05-14 Will Estes + + * tests/test-pthread/Makefile.am: move library flags in linker + command; resolves patch #1943403; patch submitted by + nullnix@users.sourceforge.net + +2008-05-14 Will Estes + + * doc/flex.texi: use ansi syntax in simple examples; resolves patch + #1909844; patch submitted by Tom Browder, + tbrowder2@users.sourceforge.net + +2008-04-10 Will Estes + + * doc/flex.texi: fix typo in example (from Paolo J. Matos + +2008-04-10 Will Estes + + * flexint.h: move endif to better account for what C99 defines for + integer types (fix from debian project) + +2008-04-10 Will Estes + + * gen.c: fix another int type to be size_t + +2008-03-30 Will Estes + + * NEWS, po/fr.po: new fr translation + +2008-03-30 Will Estes + + * NEWS, configure.in: start version 2.5.36 + +2008-02-26 Will Estes * NEWS: add date of release -2008-02-15 07:37 Will Estes +2008-02-15 Will Estes * NEWS, parse.y: fix bug that prevented comments from working properly -2008-02-12 07:57 Will Estes +2008-02-12 Will Estes * po/de.po: new de translation -2008-02-10 06:08 Will Estes +2008-02-10 Will Estes * NEWS, po/vi.po: new vi translation -2008-02-09 19:22 Will Estes +2008-02-10 Will Estes * NEWS, po/nl.po: new nl translation -2008-02-09 14:59 Will Estes +2008-02-09 Will Estes * NEWS, po/pl.po: new pl translation -2008-02-09 14:19 Will Estes +2008-02-09 Will Estes * NEWS, po/de.po, po/pt_BR.po: new de, pt_br translations -2008-02-09 13:54 Will Estes +2008-02-09 Will Estes * NEWS, flex.skl: generate headers for all functions (resolves bug #1628314) -2008-02-09 10:49 Will Estes +2008-02-09 Will Estes * NEWS, flex.skl: change yy_size_t to be size_t (resolves bug #1849812) -2008-02-09 10:46 Will Estes +2008-02-09 Will Estes * configure.in: start work on version 2.5.35 -2007-12-12 16:00 Will Estes +2007-12-12 Will Estes - * NEWS, configure.in: revert NEWS and configure.in to version - 2.5.34 + * NEWS, configure.in: revert NEWS and configure.in to version 2.5.34 -2007-09-12 11:28 Will Estes +2007-09-12 Will Estes * NEWS, configure.in: update version number to 2.5.35 -2007-09-10 02:17 Aaron Stone +2007-09-10 Aaron Stone * tests/test-alloc-extra/scanner.l: Use %option extra-type. -2007-09-10 02:16 Aaron Stone +2007-09-10 Aaron Stone - * NEWS, flex.skl, flexdef.h, main.c, parse.y, scan.l, - doc/flex.texi: Introduce %option extra-type="your_type *" (resolves - bug #1744505). + * NEWS, doc/flex.texi, flex.skl, flexdef.h, main.c, parse.y, scan.l: + Introduce %option extra-type="your_type *" (resolves bug #1744505). -2007-08-15 08:28 Will Estes +2007-08-15 Will Estes * po/nl.po: new nl translations from the translation project -2007-06-28 16:28 Will Estes +2007-06-28 Will Estes * NEWS: change release date -2007-06-27 21:59 Will Estes +2007-06-28 Will Estes * flex.skl: adjustment for prefix classes; patch submitted by Petr Machata -2007-06-27 21:53 Will Estes +2007-06-28 Will Estes * NEWS: NEWS item for yy_init_extra -2007-06-12 12:33 Aaron Stone +2007-06-12 Aaron Stone * doc/flex.texi: Docs and example for yylex_init_extra. -2007-05-31 20:22 Will Estes +2007-06-01 Will Estes * tests/test-alloc-extra/.cvsignore: ignore OUTPUT file in test-alloc-extra -2007-05-31 20:21 Will Estes +2007-06-01 Will Estes * tests/descriptions: add description of concatenated options test -2007-05-31 16:20 Will Estes +2007-05-31 Will Estes * tests/test-alloc-extra/.cvsignore: add missing .cvsignore to test-alloc-extra -2007-05-31 02:21 Aaron Stone +2007-05-31 Aaron Stone * configure.in, flex.skl, gen.c, main.c: Changes to resolve SF bugs 1568325 and 1563589. -2007-05-31 02:09 Aaron Stone +2007-05-31 Aaron Stone - * tests/: Makefile.am, descriptions, test-alloc-extra/Makefile.am, - test-alloc-extra/scanner.l, test-alloc-extra/test.input: Adding - test cases for yylex_init_extra. + * tests/Makefile.am, tests/descriptions, + tests/test-alloc-extra/Makefile.am, + tests/test-alloc-extra/scanner.l, tests/test-alloc-extra/test.input: + Adding test cases for yylex_init_extra. -2007-05-12 11:27 Will Estes +2007-05-12 Will Estes * configure.in, tests/test-pthread/scanner.l: fixes to test-pthread -2007-05-12 09:13 Will Estes +2007-05-12 Will Estes * NEWS: NEWS item for concatenated options -2007-05-12 09:13 Will Estes +2007-05-12 Will Estes * configure.in, tests/Makefile.am, tests/test-concatenated-options/.cvsignore, tests/test-concatenated-options/Makefile.am: unit test to verify concatenated options parsing -2007-05-12 09:11 Will Estes +2007-05-12 Will Estes * scanopt.c: parse multiple short concatenated options; patch submitted by Petr Machata +2007-05-11 Will Estes * autogen.sh: remove --force option from autogen.sh; much faster without it -2007-05-11 14:35 Will Estes +2007-05-11 Will Estes * NEWS, configure.in: version 2.5.34 -2007-05-08 00:23 Aaron Stone +2007-05-08 Aaron Stone * NEWS, flex.skl: Better checking after yyalloc/yyrealloc (resolves bug #1595967) -2007-05-01 08:10 Will Estes +2007-05-01 Will Estes * doc/flex.texi: change title of manual to 'Lexical Analysis with Flex' -2007-04-25 14:16 Will Estes +2007-04-25 Will Estes * flex.skl: c++ memory leak plug -2007-04-23 09:29 Will Estes +2007-04-23 Will Estes * flex.skl: roll back c++ memory patch as it causes the test suite no end of grief -2007-04-23 08:42 Will Estes +2007-04-23 Will Estes - * flex.skl: fix function definitions for non-ANSI environments - (from Manoj Srivastava from Debian patchset) + * flex.skl: fix function definitions for non-ANSI environments (from + Manoj Srivastava from Debian patchset) -2007-04-23 08:37 Will Estes +2007-04-23 Will Estes * flex.skl: fix c++ memory leak (from Manoj Srivastava from Debian patchset) -2007-04-23 06:59 Will Estes +2007-04-23 Will Estes * flex.skl: fix parameter name in comment (patch from Manoj Srivastava from the debian patchset -2007-04-23 06:57 Will Estes +2007-04-23 Will Estes * flex.skl: add a size_t cast (patch from Manoj Srivastava from the debian patchset -2007-04-16 17:06 Will Estes +2007-04-16 Will Estes - * tests/: test-extended/Makefile.am, test-quotes/Makefile.am: + * tests/test-extended/Makefile.am, tests/test-quotes/Makefile.am: cleanups to handle VPATH builds better; passifies make distcheck -2007-04-16 16:42 Will Estes +2007-04-16 Will Estes * doc/flex.texi: drop using the \ in \ escaping as it throws pdf generation for a loop -2007-04-14 08:33 Will Estes +2007-04-14 Will Estes * .cvsignore: add compile and *.tar.bz2 to .cvsignore -2007-04-14 08:27 Will Estes +2007-04-14 Will Estes * main.c: add call to setlocale for ctype as per debian patchset -2007-04-14 08:25 Will Estes +2007-04-14 Will Estes - * Makefile.am, NEWS: provide for a PIC version of libfl.a for - shared libraries using flex scanners + * Makefile.am, NEWS: provide for a PIC version of libfl.a for shared + libraries using flex scanners -2007-04-13 13:24 Will Estes +2007-04-13 Will Estes * FlexLexer.h: annotate endifs since they're a bit far from their opening #if statements -2007-04-13 12:55 Will Estes +2007-04-13 Will Estes * flexdef.h, parse.y: refactor and slightly redo alloca testing, resolves bug #1675899 -2007-04-13 12:50 Will Estes - - * configure.in: overhaul configure.in: use octathorps for comments - so they're passed through m4 processing; better bracketing of m4 - arguments; retool checks as per suggestions from autoscan(1) - -2007-04-13 12:43 Will Estes +2007-04-13 Will Estes - * flex.skl: better handling of class that use the prefix - functionality; from submitted patch + * : overhaul configure.in: use octathorps for comments so they're + passed through m4 processing; better bracketing of m4 arguments; + retool checks as per suggestions from autoscan(1) -2007-04-13 12:32 Will Estes +2007-04-13 Will Estes * flex.skl: fix skeleton for reentrant scanners -2007-04-12 21:50 Will Estes +2007-04-13 Will Estes * Makefile.am: remove homegrown tags target; automake does that for us -2007-04-12 15:12 Will Estes - - * FlexLexer.h: declare some const where missing in c++ header file - -2007-04-12 15:12 Will Estes +2007-04-12 Will Estes * flex.skl: fix skeleton for reentrant scanners, resolves bug #1694318 -2007-04-10 15:20 Will Estes +2007-04-12 Will Estes + + * FlexLexer.h: declare some const where missing in c++ header file + +2007-04-10 Will Estes * doc/flex.texi: corrections to the manual as per suggestions from flex-help@ -2007-04-03 15:16 Will Estes +2007-04-03 Will Estes * doc/flex.texi: include author names in online versions of the manual -2007-04-03 15:07 Will Estes +2007-04-03 Will Estes * COPYING: update copyright notice -2007-04-03 14:54 Will Estes +2007-04-03 Will Estes * AUTHORS: rearrange and update AUTHORS -2007-03-29 11:45 Will Estes +2007-03-29 Will Estes * NEWS: note sf feature request 1658379 in NEWS -2007-03-29 11:36 Will Estes +2007-03-29 Will Estes * tools/cvsauthors: add sodabrew to cvsauthors file -2007-03-29 11:25 Aaron Stone +2007-03-29 Aaron Stone - * flex.skl: - SourceForge feature request #1658379: Expose YY_BUF_SIZE in the - header file. + * flex.skl: SourceForge feature request #1658379: Expose YY_BUF_SIZE + in the header file. -2007-03-07 16:50 Will Estes +2007-03-07 Will Estes * NEWS, filter.c, flex.skl: apply patches submitted by sodabrew -2007-03-07 16:20 Will Estes +2007-03-07 Will Estes * README.cvs: more changes describing building flex from cvs -2007-03-07 16:16 Will Estes +2007-03-07 Will Estes * Makefile.am, README.cvs, README.cvs-snapshot: rename README.cvs-snapshot to README.cvs -2007-03-07 16:14 Will Estes +2007-03-07 Will Estes * README.cvs-snapshot: update to explain where flex cvs lives -2007-03-07 15:45 Will Estes +2007-03-07 Will Estes * README, doc/flex.texi: correct how to submit bugs -2007-02-16 10:38 Will Estes +2007-02-16 Will Estes * NEWS: clarify NEWS item re man page and pdf manual -2007-02-14 12:03 Will Estes +2007-02-14 Will Estes * po/Makevars: update bug address to point to flex-devel instead of lex-help -2007-02-13 12:54 Will Estes +2007-02-13 Will Estes * configure.in, doc/Makefile.am: make better use of AC_INIT; clean up, simplify and make more robust the generation of the man page -2007-02-13 12:08 Will Estes +2007-02-13 Will Estes * configure.in: remove option check-news from call to AM_INIT_AUTOMAKE as gnits implies check-news -2007-02-13 10:07 Will Estes +2007-02-13 Will Estes * Makefile.am, configure.in: move automake options from Makefile.am to configure.in -2007-02-13 10:04 Will Estes +2007-02-13 Will Estes * autogen.sh: restore --install option to autogen.sh since --force does not imply --install -2007-02-13 10:04 Will Estes +2007-02-13 Will Estes * tools/cvsauthors: add john43 to cvsauthors file -2007-02-13 09:50 Will Estes +2007-02-13 Will Estes * autogen.sh: call autoreconf with --force instead of --install -2007-02-13 09:48 Will Estes +2007-02-13 Will Estes * doc/.cvsignore: remove texinfo.tex from cvs tree -2007-02-12 20:15 Will Estes +2007-02-13 Will Estes * NEWS: updates to NEWS file to reflect recent changes -2007-02-12 20:14 Will Estes +2007-02-13 Will Estes * doc/Makefile.am: add flex.pdf to EXTRA_DIST -2007-02-12 19:45 Will Estes +2007-02-13 Will Estes * configure.in: remove flex.spec -2007-02-12 19:44 Will Estes +2007-02-13 Will Estes * Makefile.am: remove maintainercleanfiles -2007-02-01 15:56 Will Estes +2007-02-01 Will Estes * doc/Makefile.am: more changes to build system to distribute man page -2007-02-01 12:10 Will Estes +2007-02-01 Will Estes * doc/Makefile.am: add flex man page to distribution -2007-02-01 12:09 Will Estes +2007-02-01 Will Estes * .cvsignore, flex.spec.in: remove flex spec file -2006-11-17 10:14 Will Estes +2006-11-17 Will Estes - * tests/test-table-opts/Makefile.am: make test target depend on - test groupings, which in turn depend on building executables; - cygwin portability fix + * tests/test-table-opts/Makefile.am: make test target depend on test + groupings, which in turn depend on building executables; cygwin + portability fix -2006-11-10 16:00 Will Estes +2006-11-10 Will Estes * tests/create-test: change create-test script to edit files in place -2006-11-09 15:14 Will Estes +2006-11-09 Will Estes - * tests/: test-array-nr/Makefile.am, test-array-r/Makefile.am, - test-basic-nr/Makefile.am, test-basic-r/Makefile.am, - test-bison-nr/Makefile.am, test-bison-yylloc/Makefile.am, - test-bison-yylval/Makefile.am, test-c++-basic/Makefile.am, - test-c++-multiple-scanners/Makefile.am, - test-c++-yywrap/Makefile.am, test-c-cpp-nr/Makefile.am, - test-c-cpp-r/Makefile.am, test-ccl/Makefile.am, - test-debug-nr/Makefile.am, test-debug-r/Makefile.am, - test-extended/Makefile.am, test-header-nr/Makefile.am, - test-header-r/Makefile.am, test-include-by-buffer/Makefile.am, - test-include-by-push/Makefile.am, - test-include-by-reentrant/Makefile.am, test-linedir-r/Makefile.am, - test-lineno-nr/Makefile.am, test-lineno-r/Makefile.am, - test-mem-nr/Makefile.am, test-mem-r/Makefile.am, - test-multiple-scanners-nr/Makefile.am, - test-multiple-scanners-r/Makefile.am, test-noansi-nr/Makefile.am, - test-noansi-r/Makefile.am, test-posix/Makefile.am, - test-posixly-correct/Makefile.am, test-prefix-nr/Makefile.am, - test-prefix-r/Makefile.am, test-pthread/Makefile.am, - test-quotes/Makefile.am, test-reject/Makefile.am, - test-rescan-nr/Makefile.am, test-rescan-r/Makefile.am, - test-string-nr/Makefile.am, test-string-r/Makefile.am, - test-top/Makefile.am, test-yyextra/Makefile.am: change CLEANFILES - to include instead of just the testname for the executable + * tests/test-array-nr/Makefile.am, tests/test-array-r/Makefile.am, + tests/test-basic-nr/Makefile.am, tests/test-basic-r/Makefile.am, + tests/test-bison-nr/Makefile.am, + tests/test-bison-yylloc/Makefile.am, + tests/test-bison-yylval/Makefile.am, + tests/test-c++-basic/Makefile.am, + tests/test-c++-multiple-scanners/Makefile.am, + tests/test-c++-yywrap/Makefile.am, tests/test-c-cpp-nr/Makefile.am, + tests/test-c-cpp-r/Makefile.am, tests/test-ccl/Makefile.am, + tests/test-debug-nr/Makefile.am, tests/test-debug-r/Makefile.am, + tests/test-extended/Makefile.am, tests/test-header-nr/Makefile.am, + tests/test-header-r/Makefile.am, + tests/test-include-by-buffer/Makefile.am, + tests/test-include-by-push/Makefile.am, + tests/test-include-by-reentrant/Makefile.am, + tests/test-linedir-r/Makefile.am, tests/test-lineno-nr/Makefile.am, + tests/test-lineno-r/Makefile.am, tests/test-mem-nr/Makefile.am, + tests/test-mem-r/Makefile.am, + tests/test-multiple-scanners-nr/Makefile.am, + tests/test-multiple-scanners-r/Makefile.am, + tests/test-noansi-nr/Makefile.am, tests/test-noansi-r/Makefile.am, + tests/test-posix/Makefile.am, + tests/test-posixly-correct/Makefile.am, + tests/test-prefix-nr/Makefile.am, tests/test-prefix-r/Makefile.am, + tests/test-pthread/Makefile.am, tests/test-quotes/Makefile.am, + tests/test-reject/Makefile.am, tests/test-rescan-nr/Makefile.am, + tests/test-rescan-r/Makefile.am, tests/test-string-nr/Makefile.am, + tests/test-string-r/Makefile.am, tests/test-top/Makefile.am, + tests/test-yyextra/Makefile.am: change CLEANFILES to include + instead of just the testname for the executable -2006-11-09 09:44 Will Estes +2006-11-09 Will Estes * doc/flex.texi: fix typos in manual; resolves bug #1592857 -2006-11-09 09:39 Will Estes +2006-11-09 Will Estes * tests/TEMPLATE/Makefile.am: change test template to remove test executable when that executable has an extension, e.g. under Cygwin -2006-11-08 10:28 Will Estes +2006-11-08 Will Estes * tests/Makefile.am: test names weren't displaying in test success/failure messages (from #1591672 -2006-10-30 15:28 Will Estes +2006-10-30 Will Estes * doc/.cvsignore: add flex.html to .cvsignore in doc directory -2006-10-22 18:42 Will Estes +2006-10-22 Will Estes * NEWS: update NEWS file for the work that millaway did -2006-10-22 18:17 Will Estes +2006-10-22 Will Estes * FlexLexer.h, NEWS, main.c, tests/test-c++-multiple-scanners/scanner-2.l: make yywrap work with c++ scanners as per sf bug report -2006-10-20 15:16 Will Estes +2006-10-20 Will Estes - * flex.skl, tests/test-c++-multiple-scanners/main.cpp, - tests/test-c-cpp-nr/scanner.l, NEWS: memory leak issues in c++ - scanner + * NEWS, flex.skl, tests/test-c++-multiple-scanners/main.cpp, + tests/test-c-cpp-nr/scanner.l: memory leak issues in c++ scanner -2006-10-20 13:10 Will Estes +2006-10-20 Will Estes - * configure.in, tests/Makefile.am, tests/descriptions, + * NEWS, configure.in, tests/Makefile.am, tests/descriptions, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Tue Apr 30 23:50:07 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EB8063E4; Tue, 30 Apr 2013 23:50:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C49E81F57; Tue, 30 Apr 2013 23:50:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3UNo7wb061376; Tue, 30 Apr 2013 23:50:07 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3UNo7Ki061375; Tue, 30 Apr 2013 23:50:07 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304302350.r3UNo7Ki061375@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 30 Apr 2013 23:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250126 - vendor/flex/2.5.37 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 23:50:08 -0000 Author: jkim Date: Tue Apr 30 23:50:07 2013 New Revision: 250126 URL: http://svnweb.freebsd.org/changeset/base/250126 Log: Tag flex 2.5.37. Added: vendor/flex/2.5.37/ - copied from r250125, vendor/flex/dist/ From owner-svn-src-vendor@FreeBSD.ORG Tue Apr 30 23:51:12 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7519B547; Tue, 30 Apr 2013 23:51:12 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCD41F5E; Tue, 30 Apr 2013 23:51:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3UNpCnA063170; Tue, 30 Apr 2013 23:51:12 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3UNpC2O063168; Tue, 30 Apr 2013 23:51:12 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304302351.r3UNpC2O063168@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 30 Apr 2013 23:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250127 - vendor/flex X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 23:51:12 -0000 Author: jkim Date: Tue Apr 30 23:51:11 2013 New Revision: 250127 URL: http://svnweb.freebsd.org/changeset/base/250127 Log: Update for 2.5.37. Modified: vendor/flex/FREEBSD-Xlist Modified: vendor/flex/FREEBSD-Xlist ============================================================================== --- vendor/flex/FREEBSD-Xlist Tue Apr 30 23:50:07 2013 (r250126) +++ vendor/flex/FREEBSD-Xlist Tue Apr 30 23:51:11 2013 (r250127) @@ -1,9 +1,9 @@ +*/doc */examples +*/lib +*/m4 +*/po */tests -*/*.tex -*/*.texi */tools */*.pro -*/po */*.m4 -*/*.pdf From owner-svn-src-vendor@FreeBSD.ORG Wed May 1 00:04:30 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 46DB6CE4; Wed, 1 May 2013 00:04:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 391A91FF1; Wed, 1 May 2013 00:04:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4104U8O067687; Wed, 1 May 2013 00:04:30 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4104TmY067682; Wed, 1 May 2013 00:04:29 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201305010004.r4104TmY067682@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 1 May 2013 00:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250128 - vendor/flex/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 May 2013 00:04:30 -0000 Author: jkim Date: Wed May 1 00:04:29 2013 New Revision: 250128 URL: http://svnweb.freebsd.org/changeset/base/250128 Log: Merge some important post-2.5.37 changes from upstream. http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=c53fd2db8c78fef5afd284c3e64da51bc71cf6c3 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=899b2163bbde1a70b3be8b91cbbabd8007341205 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=7642bd98aebb62260df923f57b794138dab6f1e7 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=11b7c6cea340c2fca9b49ec635a45bd34361afe9 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=ec2fdb85e0bac6e8aeca405094506e4cf8bfc0b6 Modified: vendor/flex/dist/flex.skl vendor/flex/dist/flexdef.h vendor/flex/dist/gen.c vendor/flex/dist/main.c Modified: vendor/flex/dist/flex.skl ============================================================================== --- vendor/flex/dist/flex.skl Tue Apr 30 23:51:11 2013 (r250127) +++ vendor/flex/dist/flex.skl Wed May 1 00:04:29 2013 (r250128) @@ -727,6 +727,11 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]], %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here +m4_ifdef( [[M4_YY_NOT_IN_HEADER]], +[[ +%% [1.5] DFA +]]) + %if-c-only Standard (non-C++) definition m4_ifdef( [[M4_YY_NOT_IN_HEADER]], @@ -1272,8 +1277,6 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]], ]]) ]]) -%% [7.0] user's declarations go here - m4_ifdef( [[M4_YY_BISON_LVAL]], [[ yylval = yylval_param; @@ -1329,6 +1332,9 @@ m4_ifdef( [[M4_YY_USES_REJECT]], yy_load_buffer_state( M4_YY_CALL_ONLY_ARG ); } + { +%% [7.0] user's declarations go here + while ( 1 ) /* loops until end-of-file is reached */ { %% [8.0] yymore()-related code goes here @@ -1486,6 +1492,7 @@ do_action: /* This label is used only to "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ %ok-for-header @@ -2360,7 +2367,7 @@ YY_BUFFER_STATE yy_scan_bytes YYFARGS2( YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; m4_dnl M4_YY_DECL_GUTS_VAR(); /* Get memory for full buffer, including space for trailing EOB's. */ Modified: vendor/flex/dist/flexdef.h ============================================================================== --- vendor/flex/dist/flexdef.h Tue Apr 30 23:51:11 2013 (r250127) +++ vendor/flex/dist/flexdef.h Wed May 1 00:04:29 2013 (r250128) @@ -908,6 +908,9 @@ extern void lerrif PROTO ((const char *, /* Report an error message formatted with one string argument. */ extern void lerrsf PROTO ((const char *, const char *)); +/* Like lerrsf, but also exit after displaying message. */ +extern void lerrsf_fatal PROTO ((const char *, const char *)); + /* Spit out a "#line" statement. */ extern void line_directive_out PROTO ((FILE *, int)); Modified: vendor/flex/dist/gen.c ============================================================================== --- vendor/flex/dist/gen.c Tue Apr 30 23:51:11 2013 (r250127) +++ vendor/flex/dist/gen.c Wed May 1 00:04:29 2013 (r250128) @@ -874,7 +874,7 @@ void gen_next_state (worry_about_NULs) else strcpy (char_map, useecs ? - "yy_ec[YY_SC_TO_UI(*yy_cp)]" : + "yy_ec[YY_SC_TO_UI(*yy_cp)] " : "YY_SC_TO_UI(*yy_cp)"); if (worry_about_NULs && nultrans) { @@ -1972,7 +1972,7 @@ void make_tables () ("if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )"); indent_up (); indent_puts ("{"); - indent_puts ("int yyl;"); + indent_puts ("yy_size_t yyl;"); do_indent (); out_str ("for ( yyl = %s; yyl < yyleng; ++yyl )\n", yymore_used ? (yytext_is_array ? "YY_G(yy_prev_more_offset)" : Modified: vendor/flex/dist/main.c ============================================================================== --- vendor/flex/dist/main.c Tue Apr 30 23:51:11 2013 (r250127) +++ vendor/flex/dist/main.c Wed May 1 00:04:29 2013 (r250128) @@ -182,6 +182,8 @@ int flex_main (argc, argv) readin (); + skelout (); + /* %% [1.5] DFA */ ntod (); for (i = 1; i <= num_rules; ++i) @@ -240,11 +242,6 @@ void check_options () flexerror (_ ("Can't use --reentrant or --bison-bridge with -l option")); - /* Don't rely on detecting use of yymore() and REJECT, - * just assume they'll be used. - */ - yymore_really_used = reject_really_used = true; - yytext_is_array = true; do_yylineno = true; use_read = false; From owner-svn-src-vendor@FreeBSD.ORG Wed May 1 21:53:39 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A2290606; Wed, 1 May 2013 21:53:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5CB1566; Wed, 1 May 2013 21:53:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r41LrdMm030414; Wed, 1 May 2013 21:53:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r41LrdnL030413; Wed, 1 May 2013 21:53:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201305012153.r41LrdnL030413@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 1 May 2013 21:53:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250156 - vendor/flex/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 May 2013 21:53:39 -0000 Author: jkim Date: Wed May 1 21:53:38 2013 New Revision: 250156 URL: http://svnweb.freebsd.org/changeset/base/250156 Log: Clean up svn:keywords property. Modified: Directory Properties: vendor/flex/dist/FlexLexer.h (props changed) vendor/flex/dist/Makefile.am (props changed) vendor/flex/dist/Makefile.in (props changed) vendor/flex/dist/autogen.sh (props changed) vendor/flex/dist/buf.c (props changed) vendor/flex/dist/ccl.c (props changed) vendor/flex/dist/conf.in (props changed) vendor/flex/dist/configure.in (props changed) vendor/flex/dist/dfa.c (props changed) vendor/flex/dist/ecs.c (props changed) vendor/flex/dist/filter.c (props changed) vendor/flex/dist/flexdef.h (props changed) vendor/flex/dist/flexint.h (props changed) vendor/flex/dist/gen.c (props changed) vendor/flex/dist/gettext.h (props changed) vendor/flex/dist/libmain.c (props changed) vendor/flex/dist/libyywrap.c (props changed) vendor/flex/dist/main.c (props changed) vendor/flex/dist/misc.c (props changed) vendor/flex/dist/mkskel.sh (props changed) vendor/flex/dist/nfa.c (props changed) vendor/flex/dist/options.c (props changed) vendor/flex/dist/options.h (props changed) vendor/flex/dist/parse.c (props changed) vendor/flex/dist/parse.h (props changed) vendor/flex/dist/parse.y (props changed) vendor/flex/dist/regex.c (props changed) vendor/flex/dist/scan.c (props changed) vendor/flex/dist/scan.l (props changed) vendor/flex/dist/scanflags.c (props changed) vendor/flex/dist/scanopt.c (props changed) vendor/flex/dist/scanopt.h (props changed) vendor/flex/dist/skel.c (props changed) vendor/flex/dist/sym.c (props changed) vendor/flex/dist/tables.c (props changed) vendor/flex/dist/tables.h (props changed) vendor/flex/dist/tables_shared.c (props changed) vendor/flex/dist/tables_shared.h (props changed) vendor/flex/dist/tblcmp.c (props changed) vendor/flex/dist/version.h (props changed) vendor/flex/dist/yylex.c (props changed) From owner-svn-src-vendor@FreeBSD.ORG Fri May 3 02:03:38 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F1DA6428; Fri, 3 May 2013 02:03:37 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D40431096; Fri, 3 May 2013 02:03:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4323bgp031747; Fri, 3 May 2013 02:03:37 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4323bVs031736; Fri, 3 May 2013 02:03:37 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201305030203.r4323bVs031736@svn.freebsd.org> From: Peter Grehan Date: Fri, 3 May 2013 02:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250199 - in vendor/hyperv: . dist dist/sys dist/sys/dev dist/sys/dev/hyperv dist/sys/dev/hyperv/include dist/sys/dev/hyperv/netvsc dist/sys/dev/hyperv/storvsc dist/sys/dev/hyperv/utili... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2013 02:03:38 -0000 Author: grehan Date: Fri May 3 02:03:36 2013 New Revision: 250199 URL: http://svnweb.freebsd.org/changeset/base/250199 Log: Initial import of the Microsoft HyperV 'enlightened' drivers. From https://github.com/FreeBSDonHyper-V/VendorBranchForFreeBSDonHyper-V rev: 99eaa0ddb0485c9d76046664100f6beb1a0a0c58 Added: vendor/hyperv/ vendor/hyperv/dist/ vendor/hyperv/dist/README.md vendor/hyperv/dist/sys/ vendor/hyperv/dist/sys/dev/ vendor/hyperv/dist/sys/dev/hyperv/ vendor/hyperv/dist/sys/dev/hyperv/README vendor/hyperv/dist/sys/dev/hyperv/include/ vendor/hyperv/dist/sys/dev/hyperv/include/hyperv.h (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/netvsc/ vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_net_vsc.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_net_vsc.h (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_rndis.h (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_rndis_filter.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_rndis_filter.h (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/storvsc/ vendor/hyperv/dist/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/storvsc/hv_vstorage.h (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/utilities/ vendor/hyperv/dist/sys/dev/hyperv/utilities/hv_util.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/vmbus/ vendor/hyperv/dist/sys/dev/hyperv/vmbus/hv_channel.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/vmbus/hv_channel_mgmt.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/vmbus/hv_connection.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/vmbus/hv_hv.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/vmbus/hv_ring_buffer.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c (contents, props changed) vendor/hyperv/dist/sys/dev/hyperv/vmbus/hv_vmbus_priv.h (contents, props changed) vendor/hyperv/dist/sys/modules/ vendor/hyperv/dist/sys/modules/Makefile (contents, props changed) vendor/hyperv/dist/sys/modules/hyperv/ vendor/hyperv/dist/sys/modules/hyperv/Makefile (contents, props changed) vendor/hyperv/dist/sys/modules/hyperv/netvsc/ vendor/hyperv/dist/sys/modules/hyperv/netvsc/Makefile (contents, props changed) vendor/hyperv/dist/sys/modules/hyperv/storvsc/ vendor/hyperv/dist/sys/modules/hyperv/storvsc/Makefile (contents, props changed) vendor/hyperv/dist/sys/modules/hyperv/utilities/ vendor/hyperv/dist/sys/modules/hyperv/utilities/Makefile (contents, props changed) vendor/hyperv/dist/sys/modules/hyperv/vmbus/ vendor/hyperv/dist/sys/modules/hyperv/vmbus/Makefile (contents, props changed) Added: vendor/hyperv/dist/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/hyperv/dist/README.md Fri May 3 02:03:36 2013 (r250199) @@ -0,0 +1,4 @@ +HypervOnFreeBSDVendorBranch +=========================== + +Contains only the Hyper-V driver files and other files that have been touched. \ No newline at end of file Added: vendor/hyperv/dist/sys/dev/hyperv/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/hyperv/dist/sys/dev/hyperv/README Fri May 3 02:03:36 2013 (r250199) @@ -0,0 +1,34 @@ +***** Release rc2.3.0 4/27/2012 ************************************************** + +New features/limitations- + +-Added Fast IDE +-Massive code restructuring to meeting FreeBSD sytle guidelines + +***** Release rc2.2.0 1/4/2012 *************************************************** + +New features/limitations- + +-Port of LIS 2.1 with FreeBSD support code from Citrix, drivers are linked with + Kernel (future drivers will be loadable), port has not been refactored to meet + BSD coding standards + +-SCSI device driver functional, but support for scatter-gather lists is not + implemented-Fast IDE support has not been added-still using emulated IDE + support + +-Network storage device support has been added + +-While the storage and networking devices support multiple controllers, we're + waiting on a resolution from Microsoft to enable persistent and consistent + numbering between boots + +-Hyper-V bus has been ported with support code from Citrix to handle clock + synchronization between guest and host. Clock synchronization and heartbeat + logic have been moved to two, separate drivers-this separation is part + of the initial steps for refactoring and restructuring the Hyper-V bus driver from the + LIS 2.1 codebase + +Bug fixes- + +******************************************************************************* \ No newline at end of file Added: vendor/hyperv/dist/sys/dev/hyperv/include/hyperv.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/hyperv/dist/sys/dev/hyperv/include/hyperv.h Fri May 3 02:03:36 2013 (r250199) @@ -0,0 +1,796 @@ +/*- + * Copyright (c) 2009-2012 Microsoft Corp. + * Copyright (c) 2012 NetApp Inc. + * Copyright (c) 2012 Citrix Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * HyperV definitions for messages that are sent between instances of the + * Channel Management Library in separate partitions, or in some cases, + * back to itself. + */ + +#ifndef __HYPERV_H__ +#define __HYPERV_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +typedef uint8_t hv_bool_uint8_t; + +#define HV_S_OK 0x00000000 +#define HV_E_FAIL 0x80004005 +#define HV_ERROR_NOT_SUPPORTED 0x80070032 +#define HV_ERROR_MACHINE_LOCKED 0x800704F7 + +/* + * A revision number of vmbus that is used for ensuring both ends on a + * partition are using compatible versions. + */ + +#define HV_VMBUS_REVISION_NUMBER 13 + +/* + * Make maximum size of pipe payload of 16K + */ + +#define HV_MAX_PIPE_DATA_PAYLOAD (sizeof(BYTE) * 16384) + +/* + * Define pipe_mode values + */ + +#define HV_VMBUS_PIPE_TYPE_BYTE 0x00000000 +#define HV_VMBUS_PIPE_TYPE_MESSAGE 0x00000004 + +/* + * The size of the user defined data buffer for non-pipe offers + */ + +#define HV_MAX_USER_DEFINED_BYTES 120 + +/* + * The size of the user defined data buffer for pipe offers + */ + +#define HV_MAX_PIPE_USER_DEFINED_BYTES 116 + + +#define HV_MAX_PAGE_BUFFER_COUNT 16 +#define HV_MAX_MULTIPAGE_BUFFER_COUNT 32 + +#define HV_ALIGN_UP(value, align) \ + (((value) & (align-1)) ? \ + (((value) + (align-1)) & ~(align-1) ) : (value)) + +#define HV_ALIGN_DOWN(value, align) ( (value) & ~(align-1) ) + +#define HV_NUM_PAGES_SPANNED(addr, len) \ + ((HV_ALIGN_UP(addr+len, PAGE_SIZE) - \ + HV_ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT ) + +typedef struct hv_guid { + unsigned char data[16]; +} __packed hv_guid; + +/* + * At the center of the Channel Management library is + * the Channel Offer. This struct contains the + * fundamental information about an offer. + */ + +typedef struct hv_vmbus_channel_offer { + hv_guid interface_type; + hv_guid interface_instance; + uint64_t interrupt_latency_in_100ns_units; + uint32_t interface_revision; + uint32_t server_context_area_size; /* in bytes */ + uint16_t channel_flags; + uint16_t mmio_megabytes; /* in bytes * 1024 * 1024 */ + union + { + /* + * Non-pipes: The user has HV_MAX_USER_DEFINED_BYTES bytes. + */ + struct { + uint8_t user_defined[HV_MAX_USER_DEFINED_BYTES]; + } __packed standard; + + /* + * Pipes: The following structure is an integrated pipe protocol, which + * is implemented on top of standard user-defined data. pipe + * clients have HV_MAX_PIPE_USER_DEFINED_BYTES left for their + * own use. + */ + struct { + uint32_t pipe_mode; + uint8_t user_defined[HV_MAX_PIPE_USER_DEFINED_BYTES]; + } __packed pipe; + } u; + + uint32_t padding; + +} __packed hv_vmbus_channel_offer; + +typedef uint32_t hv_gpadl_handle; + +typedef struct { + uint16_t type; + uint16_t data_offset8; + uint16_t length8; + uint16_t flags; + uint64_t transaction_id; +} __packed hv_vm_packet_descriptor; + +typedef uint32_t hv_previous_packet_offset; + +typedef struct { + hv_previous_packet_offset previous_packet_start_offset; + hv_vm_packet_descriptor descriptor; +} __packed hv_vm_packet_header; + +typedef struct { + uint32_t byte_count; + uint32_t byte_offset; +} __packed hv_vm_transfer_page; + +typedef struct { + hv_vm_packet_descriptor d; + uint16_t transfer_page_set_id; + hv_bool_uint8_t sender_owns_set; + uint8_t reserved; + uint32_t range_count; + hv_vm_transfer_page ranges[1]; +} __packed hv_vm_transfer_page_packet_header; + +typedef struct { + hv_vm_packet_descriptor d; + uint32_t gpadl; + uint32_t reserved; +} __packed hv_vm_gpadl_packet_header; + +typedef struct { + hv_vm_packet_descriptor d; + uint32_t gpadl; + uint16_t transfer_page_set_id; + uint16_t reserved; +} __packed hv_vm_add_remove_transfer_page_set; + +/* + * This structure defines a range in guest + * physical space that can be made + * to look virtually contiguous. + */ + +typedef struct { + uint32_t byte_count; + uint32_t byte_offset; + uint64_t pfn_array[0]; +} __packed hv_gpa_range; + +/* + * This is the format for an Establish Gpadl packet, which contains a handle + * by which this GPADL will be known and a set of GPA ranges associated with + * it. This can be converted to a MDL by the guest OS. If there are multiple + * GPA ranges, then the resulting MDL will be "chained," representing multiple + * VA ranges. + */ + +typedef struct { + hv_vm_packet_descriptor d; + uint32_t gpadl; + uint32_t range_count; + hv_gpa_range range[1]; +} __packed hv_vm_establish_gpadl; + +/* + * This is the format for a Teardown Gpadl packet, which indicates that the + * GPADL handle in the Establish Gpadl packet will never be referenced again. + */ + +typedef struct { + hv_vm_packet_descriptor d; + uint32_t gpadl; + /* for alignment to a 8-byte boundary */ + uint32_t reserved; +} __packed hv_vm_teardown_gpadl; + +/* + * This is the format for a GPA-Direct packet, which contains a set of GPA + * ranges, in addition to commands and/or data. + */ + +typedef struct { + hv_vm_packet_descriptor d; + uint32_t reserved; + uint32_t range_count; + hv_gpa_range range[1]; +} __packed hv_vm_data_gpa_direct; + +/* + * This is the format for a Additional data Packet. + */ +typedef struct { + hv_vm_packet_descriptor d; + uint64_t total_bytes; + uint32_t byte_offset; + uint32_t byte_count; + uint8_t data[1]; +} __packed hv_vm_additional_data; + +typedef union { + hv_vm_packet_descriptor simple_header; + hv_vm_transfer_page_packet_header transfer_page_header; + hv_vm_gpadl_packet_header gpadl_header; + hv_vm_add_remove_transfer_page_set add_remove_transfer_page_header; + hv_vm_establish_gpadl establish_gpadl_header; + hv_vm_teardown_gpadl teardown_gpadl_header; + hv_vm_data_gpa_direct data_gpa_direct_header; +} __packed hv_vm_packet_largest_possible_header; + +typedef enum { + HV_VMBUS_PACKET_TYPE_INVALID = 0x0, + HV_VMBUS_PACKET_TYPES_SYNCH = 0x1, + HV_VMBUS_PACKET_TYPE_ADD_TRANSFER_PAGE_SET = 0x2, + HV_VMBUS_PACKET_TYPE_REMOVE_TRANSFER_PAGE_SET = 0x3, + HV_VMBUS_PACKET_TYPE_ESTABLISH_GPADL = 0x4, + HV_VMBUS_PACKET_TYPE_TEAR_DOWN_GPADL = 0x5, + HV_VMBUS_PACKET_TYPE_DATA_IN_BAND = 0x6, + HV_VMBUS_PACKET_TYPE_DATA_USING_TRANSFER_PAGES = 0x7, + HV_VMBUS_PACKET_TYPE_DATA_USING_GPADL = 0x8, + HV_VMBUS_PACKET_TYPE_DATA_USING_GPA_DIRECT = 0x9, + HV_VMBUS_PACKET_TYPE_CANCEL_REQUEST = 0xa, + HV_VMBUS_PACKET_TYPE_COMPLETION = 0xb, + HV_VMBUS_PACKET_TYPE_DATA_USING_ADDITIONAL_PACKETS = 0xc, + HV_VMBUS_PACKET_TYPE_ADDITIONAL_DATA = 0xd +} hv_vmbus_packet_type; + +#define HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED 1 + +/* + * Version 1 messages + */ +typedef enum { + HV_CHANNEL_MESSAGE_INVALID = 0, + HV_CHANNEL_MESSAGE_OFFER_CHANNEL = 1, + HV_CHANNEL_MESSAGE_RESCIND_CHANNEL_OFFER = 2, + HV_CHANNEL_MESSAGE_REQUEST_OFFERS = 3, + HV_CHANNEL_MESSAGE_ALL_OFFERS_DELIVERED = 4, + HV_CHANNEL_MESSAGE_OPEN_CHANNEL = 5, + HV_CHANNEL_MESSAGE_OPEN_CHANNEL_RESULT = 6, + HV_CHANNEL_MESSAGE_CLOSE_CHANNEL = 7, + HV_CHANNEL_MESSAGEL_GPADL_HEADER = 8, + HV_CHANNEL_MESSAGE_GPADL_BODY = 9, + HV_CHANNEL_MESSAGE_GPADL_CREATED = 10, + HV_CHANNEL_MESSAGE_GPADL_TEARDOWN = 11, + HV_CHANNEL_MESSAGE_GPADL_TORNDOWN = 12, + HV_CHANNEL_MESSAGE_REL_ID_RELEASED = 13, + HV_CHANNEL_MESSAGE_INITIATED_CONTACT = 14, + HV_CHANNEL_MESSAGE_VERSION_RESPONSE = 15, + HV_CHANNEL_MESSAGE_UNLOAD = 16, + +#ifdef HV_VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD + HV_CHANNEL_MESSAGE_VIEW_RANGE_ADD = 17, + HV_CHANNEL_MESSAGE_VIEW_RANGE_REMOVE = 18, +#endif + HV_CHANNEL_MESSAGE_COUNT +} hv_vmbus_channel_msg_type; + +typedef struct { + hv_vmbus_channel_msg_type message_type; + uint32_t padding; +} __packed hv_vmbus_channel_msg_header; + +/* + * Query VMBus Version parameters + */ +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t version; +} __packed hv_vmbus_channel_query_vmbus_version; + +/* + * VMBus Version Supported parameters + */ +typedef struct { + hv_vmbus_channel_msg_header header; + hv_bool_uint8_t version_supported; +} __packed hv_vmbus_channel_version_supported; + +/* + * Channel Offer parameters + */ +typedef struct { + hv_vmbus_channel_msg_header header; + hv_vmbus_channel_offer offer; + uint32_t child_rel_id; + uint8_t monitor_id; + hv_bool_uint8_t monitor_allocated; +} __packed hv_vmbus_channel_offer_channel; + +/* + * Rescind Offer parameters + */ +typedef struct +{ + hv_vmbus_channel_msg_header header; + uint32_t child_rel_id; +} __packed hv_vmbus_channel_rescind_offer; + + +/* + * Request Offer -- no parameters, SynIC message contains the partition ID + * + * Set Snoop -- no parameters, SynIC message contains the partition ID + * + * Clear Snoop -- no parameters, SynIC message contains the partition ID + * + * All Offers Delivered -- no parameters, SynIC message contains the + * partition ID + * + * Flush Client -- no parameters, SynIC message contains the partition ID + */ + + +/* + * Open Channel parameters + */ +typedef struct +{ + hv_vmbus_channel_msg_header header; + + /* + * Identifies the specific VMBus channel that is being opened. + */ + uint32_t child_rel_id; + + /* + * ID making a particular open request at a channel offer unique. + */ + uint32_t open_id; + + /* + * GPADL for the channel's ring buffer. + */ + hv_gpadl_handle ring_buffer_gpadl_handle; + + /* + * GPADL for the channel's server context save area. + */ + hv_gpadl_handle server_context_area_gpadl_handle; + + /* + * The upstream ring buffer begins at offset zero in the memory described + * by ring_buffer_gpadl_handle. The downstream ring buffer follows it at + * this offset (in pages). + */ + uint32_t downstream_ring_buffer_page_offset; + + /* + * User-specific data to be passed along to the server endpoint. + */ + uint8_t user_data[HV_MAX_USER_DEFINED_BYTES]; + +} __packed hv_vmbus_channel_open_channel; + +typedef uint32_t hv_nt_status; + +/* + * Open Channel Result parameters + */ +typedef struct +{ + hv_vmbus_channel_msg_header header; + uint32_t child_rel_id; + uint32_t open_id; + hv_nt_status status; +} __packed hv_vmbus_channel_open_result; + +/* + * Close channel parameters + */ +typedef struct +{ + hv_vmbus_channel_msg_header header; + uint32_t child_rel_id; +} __packed hv_vmbus_channel_close_channel; + +/* + * Channel Message GPADL + */ +#define HV_GPADL_TYPE_RING_BUFFER 1 +#define HV_GPADL_TYPE_SERVER_SAVE_AREA 2 +#define HV_GPADL_TYPE_TRANSACTION 8 + +/* + * The number of PFNs in a GPADL message is defined by the number of pages + * that would be spanned by byte_count and byte_offset. If the implied number + * of PFNs won't fit in this packet, there will be a follow-up packet that + * contains more + */ + +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t child_rel_id; + uint32_t gpadl; + uint16_t range_buf_len; + uint16_t range_count; + hv_gpa_range range[0]; +} __packed hv_vmbus_channel_gpadl_header; + +/* + * This is the follow-up packet that contains more PFNs + */ +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t message_number; + uint32_t gpadl; + uint64_t pfn[0]; +} __packed hv_vmbus_channel_gpadl_body; + +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t child_rel_id; + uint32_t gpadl; + uint32_t creation_status; +} __packed hv_vmbus_channel_gpadl_created; + +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t child_rel_id; + uint32_t gpadl; +} __packed hv_vmbus_channel_gpadl_teardown; + +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t gpadl; +} __packed hv_vmbus_channel_gpadl_torndown; + +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t child_rel_id; +} __packed hv_vmbus_channel_relid_released; + +typedef struct { + hv_vmbus_channel_msg_header header; + uint32_t vmbus_version_requested; + uint32_t padding2; + uint64_t interrupt_page; + uint64_t monitor_page_1; + uint64_t monitor_page_2; +} __packed hv_vmbus_channel_initiate_contact; + +typedef struct { + hv_vmbus_channel_msg_header header; + hv_bool_uint8_t version_supported; +} __packed hv_vmbus_channel_version_response; + +typedef hv_vmbus_channel_msg_header hv_vmbus_channel_unload; + +#define HW_MACADDR_LEN 6 + +/* + * Fixme: Added to quiet "typeof" errors involving hv_vmbus.h when + * the including C file was compiled with "-std=c99". + */ +#ifndef typeof +#define typeof __typeof +#endif + +#ifndef NULL +#define NULL (void *)0 +#endif + +typedef void *hv_vmbus_handle; + +#ifndef CONTAINING_RECORD +#define CONTAINING_RECORD(address, type, field) ((type *)( \ + (uint8_t *)(address) - \ + (uint8_t *)(&((type *)0)->field))) +#endif /* CONTAINING_RECORD */ + + +#define container_of(ptr, type, member) ({ \ + __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + +enum { + HV_VMBUS_IVAR_TYPE, + HV_VMBUS_IVAR_INSTANCE, + HV_VMBUS_IVAR_NODE, + HV_VMBUS_IVAR_DEVCTX +}; + +#define HV_VMBUS_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(vmbus, var, HV_VMBUS, ivar, type) + +HV_VMBUS_ACCESSOR(type, TYPE, const char *) +HV_VMBUS_ACCESSOR(devctx, DEVCTX, struct hv_device *) + + +/* + * Common defines for Hyper-V ICs + */ +#define HV_ICMSGTYPE_NEGOTIATE 0 +#define HV_ICMSGTYPE_HEARTBEAT 1 +#define HV_ICMSGTYPE_KVPEXCHANGE 2 +#define HV_ICMSGTYPE_SHUTDOWN 3 +#define HV_ICMSGTYPE_TIMESYNC 4 +#define HV_ICMSGTYPE_VSS 5 + +#define HV_ICMSGHDRFLAG_TRANSACTION 1 +#define HV_ICMSGHDRFLAG_REQUEST 2 +#define HV_ICMSGHDRFLAG_RESPONSE 4 + +typedef struct hv_vmbus_pipe_hdr { + uint32_t flags; + uint32_t msgsize; +} __packed hv_vmbus_pipe_hdr; + +typedef struct hv_vmbus_ic_version { + uint16_t major; + uint16_t minor; +} __packed hv_vmbus_ic_version; + +typedef struct hv_vmbus_icmsg_hdr { + hv_vmbus_ic_version icverframe; + uint16_t icmsgtype; + hv_vmbus_ic_version icvermsg; + uint16_t icmsgsize; + uint32_t status; + uint8_t ictransaction_id; + uint8_t icflags; + uint8_t reserved[2]; +} __packed hv_vmbus_icmsg_hdr; + +typedef struct hv_vmbus_icmsg_negotiate { + uint16_t icframe_vercnt; + uint16_t icmsg_vercnt; + uint32_t reserved; + hv_vmbus_ic_version icversion_data[1]; /* any size array */ +} __packed hv_vmbus_icmsg_negotiate; + +typedef struct hv_vmbus_shutdown_msg_data { + uint32_t reason_code; + uint32_t timeout_seconds; + uint32_t flags; + uint8_t display_message[2048]; +} __packed hv_vmbus_shutdown_msg_data; + +typedef struct hv_vmbus_heartbeat_msg_data { + uint64_t seq_num; + uint32_t reserved[8]; +} __packed hv_vmbus_heartbeat_msg_data; + +typedef struct { + /* + * offset in bytes from the start of ring data below + */ + volatile uint32_t write_index; + /* + * offset in bytes from the start of ring data below + */ + volatile uint32_t read_index; + /* + * NOTE: The interrupt_mask field is used only for channels, but + * vmbus connection also uses this data structure + */ + volatile uint32_t interrupt_mask; + /* pad it to PAGE_SIZE so that data starts on a page */ + uint8_t reserved[4084]; + + /* + * WARNING: Ring data starts here + ring_data_start_offset + * !!! DO NOT place any fields below this !!! + */ + uint8_t buffer[0]; /* doubles as interrupt mask */ +} __packed hv_vmbus_ring_buffer; + +typedef struct { + int length; + int offset; + uint64_t pfn; +} __packed hv_vmbus_page_buffer; + +typedef struct { + int length; + int offset; + uint64_t pfn_array[HV_MAX_MULTIPAGE_BUFFER_COUNT]; +} __packed hv_vmbus_multipage_buffer; + +typedef struct { + hv_vmbus_ring_buffer* ring_buffer; + uint32_t ring_size; /* Include the shared header */ + struct mtx ring_lock; + uint32_t ring_data_size; /* ring_size */ + uint32_t ring_data_start_offset; +} hv_vmbus_ring_buffer_info; + +typedef void (*hv_vmbus_pfn_channel_callback)(void *context); + +typedef enum { + HV_CHANNEL_OFFER_STATE, + HV_CHANNEL_OPENING_STATE, + HV_CHANNEL_OPEN_STATE, + HV_CHANNEL_CLOSING_NONDESTRUCTIVE_STATE, +} hv_vmbus_channel_state; + +typedef struct hv_vmbus_channel { + TAILQ_ENTRY(hv_vmbus_channel) list_entry; + struct hv_device* device; + hv_vmbus_channel_state state; + hv_vmbus_channel_offer_channel offer_msg; + /* + * These are based on the offer_msg.monitor_id. + * Save it here for easy access. + */ + uint8_t monitor_group; + uint8_t monitor_bit; + + uint32_t ring_buffer_gpadl_handle; + /* + * Allocated memory for ring buffer + */ + void* ring_buffer_pages; + uint32_t ring_buffer_page_count; + /* + * send to parent + */ + hv_vmbus_ring_buffer_info outbound; + /* + * receive from parent + */ + hv_vmbus_ring_buffer_info inbound; + + struct mtx inbound_lock; + hv_vmbus_handle control_work_queue; + + hv_vmbus_pfn_channel_callback on_channel_callback; + void* channel_callback_context; + +} hv_vmbus_channel; + +typedef struct hv_device { + hv_guid class_id; + hv_guid device_id; + device_t device; + hv_vmbus_channel* channel; +} hv_device; + + + +int hv_vmbus_channel_recv_packet( + hv_vmbus_channel* channel, + void* buffer, + uint32_t buffer_len, + uint32_t* buffer_actual_len, + uint64_t* request_id); + +int hv_vmbus_channel_recv_packet_raw( + hv_vmbus_channel* channel, + void* buffer, + uint32_t buffer_len, + uint32_t* buffer_actual_len, + uint64_t* request_id); + +int hv_vmbus_channel_open( + hv_vmbus_channel* channel, + uint32_t send_ring_buffer_size, + uint32_t recv_ring_buffer_size, + void* user_data, + uint32_t user_data_len, + hv_vmbus_pfn_channel_callback + pfn_on_channel_callback, + void* context); + +void hv_vmbus_channel_close(hv_vmbus_channel *channel); + +int hv_vmbus_channel_send_packet( + hv_vmbus_channel* channel, + void* buffer, + uint32_t buffer_len, + uint64_t request_id, + hv_vmbus_packet_type type, + uint32_t flags); + +int hv_vmbus_channel_send_packet_pagebuffer( + hv_vmbus_channel* channel, + hv_vmbus_page_buffer page_buffers[], + uint32_t page_count, + void* buffer, + uint32_t buffer_len, + uint64_t request_id); + +int hv_vmbus_channel_send_packet_multipagebuffer( + hv_vmbus_channel* channel, + hv_vmbus_multipage_buffer* multi_page_buffer, + void* buffer, + uint32_t buffer_len, + uint64_t request_id); + +int hv_vmbus_channel_establish_gpadl( + hv_vmbus_channel* channel, + /* must be phys and virt contiguous */ + void* contig_buffer, + /* page-size multiple */ + uint32_t size, + uint32_t* gpadl_handle); + +int hv_vmbus_channel_teardown_gpdal( + hv_vmbus_channel* channel, + uint32_t gpadl_handle); + +/* + * Work abstraction defines + */ +typedef struct hv_work_queue { + struct taskqueue* queue; + struct proc* proc; + struct sema* work_sema; +} hv_work_queue; + +typedef struct hv_work_item { + struct task work; + void (*callback)(void *); + void* context; + hv_work_queue* wq; +} hv_work_item; + +struct hv_work_queue* hv_work_queue_create(char* name); + +void hv_work_queue_close(struct hv_work_queue* wq); + +int hv_queue_work_item( + hv_work_queue* wq, + void (*callback)(void *), + void* context); +/** + * @brief Get physical address from virtual + */ +static inline unsigned long +hv_get_phys_addr(void *virt) +{ + unsigned long ret; + ret = (vtophys(virt) | ((vm_offset_t) virt & PAGE_MASK)); + return (ret); +} + +#endif /* __HYPERV_H__ */ + Added: vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/hyperv/dist/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri May 3 02:03:36 2013 (r250199) @@ -0,0 +1,1141 @@ +/*- + * Copyright (c) 2009-2012 Microsoft Corp. + * Copyright (c) 2010-2012 Citrix Inc. + * Copyright (c) 2012 NetApp Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * HyperV vmbus network VSC (virtual services client) module + * + */ + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "hv_net_vsc.h" +#include "hv_rndis.h" +#include "hv_rndis_filter.h" + + +/* + * Forward declarations + */ +static void hv_nv_on_channel_callback(void *context); +static int hv_nv_init_send_buffer_with_net_vsp(struct hv_device *device); +static int hv_nv_init_rx_buffer_with_net_vsp(struct hv_device *device); +static int hv_nv_destroy_send_buffer(netvsc_dev *net_dev); +static int hv_nv_destroy_rx_buffer(netvsc_dev *net_dev); +static int hv_nv_connect_to_vsp(struct hv_device *device); +static void hv_nv_on_send_completion(struct hv_device *device, + hv_vm_packet_descriptor *pkt); +static void hv_nv_on_receive(struct hv_device *device, + hv_vm_packet_descriptor *pkt); +static void hv_nv_send_receive_completion(struct hv_device *device, + uint64_t tid); + + +/* + * + */ +static inline netvsc_dev * +hv_nv_alloc_net_device(struct hv_device *device) +{ + netvsc_dev *net_dev; + hn_softc_t *sc = device_get_softc(device->device); + + net_dev = malloc(sizeof(netvsc_dev), M_DEVBUF, M_NOWAIT | M_ZERO); + if (net_dev == NULL) { + return (NULL); + } + + net_dev->dev = device; + net_dev->destroy = FALSE; + sc->net_dev = net_dev; + + return (net_dev); +} + +/* + * + */ +static inline netvsc_dev * +hv_nv_get_outbound_net_device(struct hv_device *device) +{ + hn_softc_t *sc = device_get_softc(device->device); + netvsc_dev *net_dev = sc->net_dev;; + + if ((net_dev != NULL) && net_dev->destroy) { + return (NULL); + } + + return (net_dev); +} + +/* + * + */ +static inline netvsc_dev * +hv_nv_get_inbound_net_device(struct hv_device *device) +{ + hn_softc_t *sc = device_get_softc(device->device); + netvsc_dev *net_dev = sc->net_dev;; + + if (net_dev == NULL) { + return (net_dev); + } + /* + * When the device is being destroyed; we only + * permit incoming packets if and only if there + * are outstanding sends. + */ + if (net_dev->destroy && net_dev->num_outstanding_sends == 0) { + return (NULL); + } + + return (net_dev); +} + +/* + * Net VSC initialize receive buffer with net VSP + * + * Net VSP: Network virtual services client, also known as the + * Hyper-V extensible switch and the synthetic data path. + */ +static int +hv_nv_init_rx_buffer_with_net_vsp(struct hv_device *device) +{ + netvsc_dev *net_dev; + nvsp_msg *init_pkt; + int ret = 0; + + net_dev = hv_nv_get_outbound_net_device(device); + if (!net_dev) { + return (ENODEV); + } + + net_dev->rx_buf = contigmalloc(net_dev->rx_buf_size, M_DEVBUF, + M_ZERO, 0UL, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); + if (net_dev->rx_buf == NULL) { + ret = ENOMEM; + goto cleanup; + } + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri May 3 02:07:02 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B6931709; Fri, 3 May 2013 02:07:02 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD8E10A8; Fri, 3 May 2013 02:07:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r43272bq032539; Fri, 3 May 2013 02:07:02 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r43272uP032538; Fri, 3 May 2013 02:07:02 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201305030207.r43272uP032538@svn.freebsd.org> From: Peter Grehan Date: Fri, 3 May 2013 02:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250200 - vendor/hyperv/20130502 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2013 02:07:02 -0000 Author: grehan Date: Fri May 3 02:07:02 2013 New Revision: 250200 URL: http://svnweb.freebsd.org/changeset/base/250200 Log: Tag hyperv 20130502 Added: vendor/hyperv/20130502/ - copied from r250199, vendor/hyperv/dist/ From owner-svn-src-vendor@FreeBSD.ORG Fri May 3 22:32:54 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3164E79F; Fri, 3 May 2013 22:32:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2150B189B; Fri, 3 May 2013 22:32:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r43MWsgi070166; Fri, 3 May 2013 22:32:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r43MWouj070134; Fri, 3 May 2013 22:32:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201305032232.r43MWouj070134@svn.freebsd.org> From: Xin LI Date: Fri, 3 May 2013 22:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250224 - in vendor/libz/dist: . contrib test X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2013 22:32:54 -0000 Author: delphij Date: Fri May 3 22:32:49 2013 New Revision: 250224 URL: http://svnweb.freebsd.org/changeset/base/250224 Log: Vendor import of zlib 1.2.8. Modified: vendor/libz/dist/ChangeLog vendor/libz/dist/README vendor/libz/dist/compress.c vendor/libz/dist/contrib/README.contrib vendor/libz/dist/deflate.c vendor/libz/dist/deflate.h vendor/libz/dist/gzguts.h vendor/libz/dist/gzlib.c vendor/libz/dist/gzread.c vendor/libz/dist/gzwrite.c vendor/libz/dist/infback.c vendor/libz/dist/inffast.c vendor/libz/dist/inflate.c vendor/libz/dist/inftrees.c vendor/libz/dist/test/example.c vendor/libz/dist/test/minigzip.c vendor/libz/dist/trees.c vendor/libz/dist/uncompr.c vendor/libz/dist/zconf.h vendor/libz/dist/zlib.3 vendor/libz/dist/zlib.h vendor/libz/dist/zutil.c vendor/libz/dist/zutil.h Modified: vendor/libz/dist/ChangeLog ============================================================================== --- vendor/libz/dist/ChangeLog Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/ChangeLog Fri May 3 22:32:49 2013 (r250224) @@ -1,6 +1,69 @@ ChangeLog file for zlib +Changes in 1.2.8 (28 Apr 2013) +- Update contrib/minizip/iowin32.c for Windows RT [Vollant] +- Do not force Z_CONST for C++ +- Clean up contrib/vstudio [Ro§] +- Correct spelling error in zlib.h +- Fix mixed line endings in contrib/vstudio + +Changes in 1.2.7.3 (13 Apr 2013) +- Fix version numbers and DLL names in contrib/vstudio/*/zlib.rc + +Changes in 1.2.7.2 (13 Apr 2013) +- Change check for a four-byte type back to hexadecimal +- Fix typo in win32/Makefile.msc +- Add casts in gzwrite.c for pointer differences + +Changes in 1.2.7.1 (24 Mar 2013) +- Replace use of unsafe string functions with snprintf if available +- Avoid including stddef.h on Windows for Z_SOLO compile [Niessink] +- Fix gzgetc undefine when Z_PREFIX set [Turk] +- Eliminate use of mktemp in Makefile (not always available) +- Fix bug in 'F' mode for gzopen() +- Add inflateGetDictionary() function +- Correct comment in deflate.h +- Use _snprintf for snprintf in Microsoft C +- On Darwin, only use /usr/bin/libtool if libtool is not Apple +- Delete "--version" file if created by "ar --version" [Richard G.] +- Fix configure check for veracity of compiler error return codes +- Fix CMake compilation of static lib for MSVC2010 x64 +- Remove unused variable in infback9.c +- Fix argument checks in gzlog_compress() and gzlog_write() +- Clean up the usage of z_const and respect const usage within zlib +- Clean up examples/gzlog.[ch] comparisons of different types +- Avoid shift equal to bits in type (caused endless loop) +- Fix unintialized value bug in gzputc() introduced by const patches +- Fix memory allocation error in examples/zran.c [Nor] +- Fix bug where gzopen(), gzclose() would write an empty file +- Fix bug in gzclose() when gzwrite() runs out of memory +- Check for input buffer malloc failure in examples/gzappend.c +- Add note to contrib/blast to use binary mode in stdio +- Fix comparisons of differently signed integers in contrib/blast +- Check for invalid code length codes in contrib/puff +- Fix serious but very rare decompression bug in inftrees.c +- Update inflateBack() comments, since inflate() can be faster +- Use underscored I/O function names for WINAPI_FAMILY +- Add _tr_flush_bits to the external symbols prefixed by --zprefix +- Add contrib/vstudio/vc10 pre-build step for static only +- Quote --version-script argument in CMakeLists.txt +- Don't specify --version-script on Apple platforms in CMakeLists.txt +- Fix casting error in contrib/testzlib/testzlib.c +- Fix types in contrib/minizip to match result of get_crc_table() +- Simplify contrib/vstudio/vc10 with 'd' suffix +- Add TOP support to win32/Makefile.msc +- Suport i686 and amd64 assembler builds in CMakeLists.txt +- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h +- Add vc11 and vc12 build files to contrib/vstudio +- Add gzvprintf() as an undocumented function in zlib +- Fix configure for Sun shell +- Remove runtime check in configure for four-byte integer type +- Add casts and consts to ease user conversion to C++ +- Add man pages for minizip and miniunzip +- In Makefile uninstall, don't rm if preceding cd fails +- Do not return Z_BUF_ERROR if deflateParam() has nothing to write + Changes in 1.2.7 (2 May 2012) - Replace use of memmove() with a simple copy for portability - Test for existence of strerror Modified: vendor/libz/dist/README ============================================================================== --- vendor/libz/dist/README Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/README Fri May 3 22:32:49 2013 (r250224) @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.7 is a general purpose data compression library. All the code is +zlib 1.2.8 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and @@ -31,7 +31,7 @@ Mark Nelson wrote an ar issue of Dr. Dobb's Journal; a copy of the article is available at http://marknelson.us/1997/01/01/zlib-engine/ . -The changes made in version 1.2.7 are documented in the file ChangeLog. +The changes made in version 1.2.8 are documented in the file ChangeLog. Unsupported third party contributions are provided in directory contrib/ . @@ -84,7 +84,7 @@ Acknowledgments: Copyright notice: - (C) 1995-2012 Jean-loup Gailly and Mark Adler + (C) 1995-2013 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages Modified: vendor/libz/dist/compress.c ============================================================================== --- vendor/libz/dist/compress.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/compress.c Fri May 3 22:32:49 2013 (r250224) @@ -29,7 +29,7 @@ int ZEXPORT compress2 (dest, destLen, so z_stream stream; int err; - stream.next_in = (Bytef*)source; + stream.next_in = (z_const Bytef *)source; stream.avail_in = (uInt)sourceLen; #ifdef MAXSEG_64K /* Check for source > 64K on 16-bit machine: */ Modified: vendor/libz/dist/contrib/README.contrib ============================================================================== --- vendor/libz/dist/contrib/README.contrib Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/contrib/README.contrib Fri May 3 22:32:49 2013 (r250224) @@ -75,3 +75,4 @@ untgz/ by Pedro A. Aranda Gutierrez vstudio/ by Gilles Vollant Building a minizip-enhanced zlib with Microsoft Visual Studio + Includes vc11 from kreuzerkrieg and vc12 from davispuh Modified: vendor/libz/dist/deflate.c ============================================================================== --- vendor/libz/dist/deflate.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/deflate.c Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.7 Copyright 1995-2012 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -305,7 +305,7 @@ int ZEXPORT deflateInit2_(strm, level, m if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || s->pending_buf == Z_NULL) { s->status = FINISH_STATE; - strm->msg = (char*)ERR_MSG(Z_MEM_ERROR); + strm->msg = ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } @@ -329,7 +329,7 @@ int ZEXPORT deflateSetDictionary (strm, uInt str, n; int wrap; unsigned avail; - unsigned char *next; + z_const unsigned char *next; if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL) return Z_STREAM_ERROR; @@ -359,7 +359,7 @@ int ZEXPORT deflateSetDictionary (strm, avail = strm->avail_in; next = strm->next_in; strm->avail_in = dictLength; - strm->next_in = (Bytef *)dictionary; + strm->next_in = (z_const Bytef *)dictionary; fill_window(s); while (s->lookahead >= MIN_MATCH) { str = s->strstart; @@ -513,6 +513,8 @@ int ZEXPORT deflateParams(strm, level, s strm->total_in != 0) { /* Flush the last buffer: */ err = deflate(strm, Z_BLOCK); + if (err == Z_BUF_ERROR && s->pending == 0) + err = Z_OK; } if (s->level != level) { s->level = level; Modified: vendor/libz/dist/deflate.h ============================================================================== --- vendor/libz/dist/deflate.h Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/deflate.h Fri May 3 22:32:49 2013 (r250224) @@ -104,7 +104,7 @@ typedef struct internal_state { int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ gz_headerp gzhead; /* gzip header information to write */ uInt gzindex; /* where in extra, name, or comment */ - Byte method; /* STORED (for zip only) or DEFLATED */ + Byte method; /* can only be DEFLATED */ int last_flush; /* value of flush param for previous deflate call */ /* used by deflate.c: */ Modified: vendor/libz/dist/gzguts.h ============================================================================== --- vendor/libz/dist/gzguts.h Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/gzguts.h Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ /* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -35,6 +35,13 @@ # include #endif +#ifdef WINAPI_FAMILY +# define open _open +# define read _read +# define write _write +# define close _close +#endif + #ifdef NO_DEFLATE /* for compatibility with old definition */ # define NO_GZCOMPRESS #endif @@ -60,7 +67,7 @@ #ifndef HAVE_VSNPRINTF # ifdef MSDOS /* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ + but for now we just assume it doesn't. */ # define NO_vsnprintf # endif # ifdef __TURBOC__ @@ -88,6 +95,14 @@ # endif #endif +/* unlike snprintf (which is required in C99, yet still not supported by + Microsoft more than a decade later!), _snprintf does not guarantee null + termination of the result -- however this is only used in gzlib.c where + the result is assured to fit in the space provided */ +#ifdef _MSC_VER +# define snprintf _snprintf +#endif + #ifndef local # define local static #endif @@ -127,7 +142,8 @@ # define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif -/* default i/o buffer size -- double this for output when reading */ +/* default i/o buffer size -- double this for output when reading (this and + twice this must be able to fit in an unsigned type) */ #define GZBUFSIZE 8192 /* gzip modes, also provide a little integrity check on the passed structure */ Modified: vendor/libz/dist/gzlib.c ============================================================================== --- vendor/libz/dist/gzlib.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/gzlib.c Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -108,7 +108,7 @@ local gzFile gz_open(path, fd, mode) return NULL; /* allocate gzFile structure to return */ - state = malloc(sizeof(gz_state)); + state = (gz_statep)malloc(sizeof(gz_state)); if (state == NULL) return NULL; state->size = 0; /* no buffers allocated yet */ @@ -162,8 +162,10 @@ local gzFile gz_open(path, fd, mode) break; case 'F': state->strategy = Z_FIXED; + break; case 'T': state->direct = 1; + break; default: /* could consider as an error, but just ignore */ ; } @@ -194,8 +196,8 @@ local gzFile gz_open(path, fd, mode) } else #endif - len = strlen(path); - state->path = malloc(len + 1); + len = strlen((const char *)path); + state->path = (char *)malloc(len + 1); if (state->path == NULL) { free(state); return NULL; @@ -208,7 +210,11 @@ local gzFile gz_open(path, fd, mode) *(state->path) = 0; else #endif +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(state->path, len + 1, "%s", (const char *)path); +#else strcpy(state->path, path); +#endif /* compute the flags for open() */ oflag = @@ -236,7 +242,7 @@ local gzFile gz_open(path, fd, mode) #ifdef _WIN32 fd == -2 ? _wopen(path, oflag, 0666) : #endif - open(path, oflag, 0666)); + open((const char *)path, oflag, 0666)); if (state->fd == -1) { free(state->path); free(state); @@ -282,9 +288,13 @@ gzFile ZEXPORT gzdopen(fd, mode) char *path; /* identifier for error messages */ gzFile gz; - if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL) + if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) return NULL; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(path, 7 + 3 * sizeof(int), "", fd); /* for debugging */ +#else sprintf(path, "", fd); /* for debugging */ +#endif gz = gz_open(path, fd, mode); free(path); return gz; @@ -531,7 +541,8 @@ const char * ZEXPORT gzerror(file, errnu /* return error information */ if (errnum != NULL) *errnum = state->err; - return state->msg == NULL ? "" : state->msg; + return state->err == Z_MEM_ERROR ? "out of memory" : + (state->msg == NULL ? "" : state->msg); } /* -- see zlib.h -- */ @@ -582,21 +593,24 @@ void ZLIB_INTERNAL gz_error(state, err, if (msg == NULL) return; - /* for an out of memory error, save as static string */ - if (err == Z_MEM_ERROR) { - state->msg = (char *)msg; + /* for an out of memory error, return literal string when requested */ + if (err == Z_MEM_ERROR) return; - } /* construct error message with path */ - if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) { + if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == + NULL) { state->err = Z_MEM_ERROR; - state->msg = (char *)"out of memory"; return; } +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, + "%s%s%s", state->path, ": ", msg); +#else strcpy(state->msg, state->path); strcat(state->msg, ": "); strcat(state->msg, msg); +#endif return; } Modified: vendor/libz/dist/gzread.c ============================================================================== --- vendor/libz/dist/gzread.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/gzread.c Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ /* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -58,7 +58,8 @@ local int gz_avail(state) return -1; if (state->eof == 0) { if (strm->avail_in) { /* copy what's there to the start */ - unsigned char *p = state->in, *q = strm->next_in; + unsigned char *p = state->in; + unsigned const char *q = strm->next_in; unsigned n = strm->avail_in; do { *p++ = *q++; @@ -90,8 +91,8 @@ local int gz_look(state) /* allocate read buffers and inflate memory */ if (state->size == 0) { /* allocate buffers */ - state->in = malloc(state->want); - state->out = malloc(state->want << 1); + state->in = (unsigned char *)malloc(state->want); + state->out = (unsigned char *)malloc(state->want << 1); if (state->in == NULL || state->out == NULL) { if (state->out != NULL) free(state->out); @@ -352,14 +353,14 @@ int ZEXPORT gzread(file, buf, len) /* large len -- read directly into user buffer */ else if (state->how == COPY) { /* read directly */ - if (gz_load(state, buf, len, &n) == -1) + if (gz_load(state, (unsigned char *)buf, len, &n) == -1) return -1; } /* large len -- decompress directly into user buffer */ else { /* state->how == GZIP */ strm->avail_out = len; - strm->next_out = buf; + strm->next_out = (unsigned char *)buf; if (gz_decomp(state) == -1) return -1; n = state->x.have; @@ -378,7 +379,11 @@ int ZEXPORT gzread(file, buf, len) } /* -- see zlib.h -- */ -#undef gzgetc +#ifdef Z_PREFIX_SET +# undef z_gzgetc +#else +# undef gzgetc +#endif int ZEXPORT gzgetc(file) gzFile file; { @@ -518,7 +523,7 @@ char * ZEXPORT gzgets(file, buf, len) /* look for end-of-line in current output buffer */ n = state->x.have > left ? left : state->x.have; - eol = memchr(state->x.next, '\n', n); + eol = (unsigned char *)memchr(state->x.next, '\n', n); if (eol != NULL) n = (unsigned)(eol - state->x.next) + 1; Modified: vendor/libz/dist/gzwrite.c ============================================================================== --- vendor/libz/dist/gzwrite.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/gzwrite.c Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ /* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -19,7 +19,7 @@ local int gz_init(state) z_streamp strm = &(state->strm); /* allocate input buffer */ - state->in = malloc(state->want); + state->in = (unsigned char *)malloc(state->want); if (state->in == NULL) { gz_error(state, Z_MEM_ERROR, "out of memory"); return -1; @@ -28,7 +28,7 @@ local int gz_init(state) /* only need output buffer and deflate state if compressing */ if (!state->direct) { /* allocate output buffer */ - state->out = malloc(state->want); + state->out = (unsigned char *)malloc(state->want); if (state->out == NULL) { free(state->in); gz_error(state, Z_MEM_ERROR, "out of memory"); @@ -168,7 +168,6 @@ int ZEXPORT gzwrite(file, buf, len) unsigned len; { unsigned put = len; - unsigned n; gz_statep state; z_streamp strm; @@ -208,16 +207,19 @@ int ZEXPORT gzwrite(file, buf, len) if (len < state->size) { /* copy to input buffer, compress when full */ do { + unsigned have, copy; + if (strm->avail_in == 0) strm->next_in = state->in; - n = state->size - strm->avail_in; - if (n > len) - n = len; - memcpy(strm->next_in + strm->avail_in, buf, n); - strm->avail_in += n; - state->x.pos += n; - buf = (char *)buf + n; - len -= n; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + copy = state->size - have; + if (copy > len) + copy = len; + memcpy(state->in + have, buf, copy); + strm->avail_in += copy; + state->x.pos += copy; + buf = (const char *)buf + copy; + len -= copy; if (len && gz_comp(state, Z_NO_FLUSH) == -1) return 0; } while (len); @@ -229,7 +231,7 @@ int ZEXPORT gzwrite(file, buf, len) /* directly compress user buffer to file */ strm->avail_in = len; - strm->next_in = (voidp)buf; + strm->next_in = (z_const Bytef *)buf; state->x.pos += len; if (gz_comp(state, Z_NO_FLUSH) == -1) return 0; @@ -244,6 +246,7 @@ int ZEXPORT gzputc(file, c) gzFile file; int c; { + unsigned have; unsigned char buf[1]; gz_statep state; z_streamp strm; @@ -267,12 +270,16 @@ int ZEXPORT gzputc(file, c) /* try writing to input buffer for speed (state->size == 0 if buffer not initialized) */ - if (strm->avail_in < state->size) { + if (state->size) { if (strm->avail_in == 0) strm->next_in = state->in; - strm->next_in[strm->avail_in++] = c; - state->x.pos++; - return c & 0xff; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + if (have < state->size) { + state->in[have] = c; + strm->avail_in++; + state->x.pos++; + return c & 0xff; + } } /* no room in buffer or not initialized, use gz_write() */ @@ -300,12 +307,11 @@ int ZEXPORT gzputs(file, str) #include /* -- see zlib.h -- */ -int ZEXPORTVA gzprintf (gzFile file, const char *format, ...) +int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) { int size, len; gz_statep state; z_streamp strm; - va_list va; /* get internal structure */ if (file == NULL) @@ -335,25 +341,20 @@ int ZEXPORTVA gzprintf (gzFile file, con /* do the printf() into the input buffer, put length in len */ size = (int)(state->size); state->in[size - 1] = 0; - va_start(va, format); #ifdef NO_vsnprintf # ifdef HAS_vsprintf_void (void)vsprintf((char *)(state->in), format, va); - va_end(va); for (len = 0; len < size; len++) if (state->in[len] == 0) break; # else len = vsprintf((char *)(state->in), format, va); - va_end(va); # endif #else # ifdef HAS_vsnprintf_void (void)vsnprintf((char *)(state->in), size, format, va); - va_end(va); len = strlen((char *)(state->in)); # else len = vsnprintf((char *)(state->in), size, format, va); - va_end(va); # endif #endif @@ -368,6 +369,17 @@ int ZEXPORTVA gzprintf (gzFile file, con return len; } +int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) +{ + va_list va; + int ret; + + va_start(va, format); + ret = gzvprintf(file, format, va); + va_end(va); + return ret; +} + #else /* !STDC && !Z_HAVE_STDARG_H */ /* -- see zlib.h -- */ @@ -547,9 +559,9 @@ int ZEXPORT gzclose_w(file) } /* flush, free memory, and close file */ + if (gz_comp(state, Z_FINISH) == -1) + ret = state->err; if (state->size) { - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; if (!state->direct) { (void)deflateEnd(&(state->strm)); free(state->out); Modified: vendor/libz/dist/infback.c ============================================================================== --- vendor/libz/dist/infback.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/infback.c Fri May 3 22:32:49 2013 (r250224) @@ -255,7 +255,7 @@ out_func out; void FAR *out_desc; { struct inflate_state FAR *state; - unsigned char FAR *next; /* next input */ + z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ Modified: vendor/libz/dist/inffast.c ============================================================================== --- vendor/libz/dist/inffast.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/inffast.c Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010 Mark Adler + * Copyright (C) 1995-2008, 2010, 2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -69,8 +69,8 @@ z_streamp strm; unsigned start; /* inflate()'s starting value for strm->avail_out */ { struct inflate_state FAR *state; - unsigned char FAR *in; /* local strm->next_in */ - unsigned char FAR *last; /* while in < last, enough input available */ + z_const unsigned char FAR *in; /* local strm->next_in */ + z_const unsigned char FAR *last; /* have enough input while in < last */ unsigned char FAR *out; /* local strm->next_out */ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ unsigned char FAR *end; /* while out < end, enough space available */ Modified: vendor/libz/dist/inflate.c ============================================================================== --- vendor/libz/dist/inflate.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/inflate.c Fri May 3 22:32:49 2013 (r250224) @@ -93,11 +93,12 @@ /* function prototypes */ local void fixedtables OF((struct inflate_state FAR *state)); -local int updatewindow OF((z_streamp strm, unsigned out)); +local int updatewindow OF((z_streamp strm, const unsigned char FAR *end, + unsigned copy)); #ifdef BUILDFIXED void makefixed OF((void)); #endif -local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf, +local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf, unsigned len)); int ZEXPORT inflateResetKeep(strm) @@ -375,12 +376,13 @@ void makefixed() output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ -local int updatewindow(strm, out) +local int updatewindow(strm, end, copy) z_streamp strm; -unsigned out; +const Bytef *end; +unsigned copy; { struct inflate_state FAR *state; - unsigned copy, dist; + unsigned dist; state = (struct inflate_state FAR *)strm->state; @@ -400,19 +402,18 @@ unsigned out; } /* copy state->wsize or less output bytes into the circular window */ - copy = out - strm->avail_out; if (copy >= state->wsize) { - zmemcpy(state->window, strm->next_out - state->wsize, state->wsize); + zmemcpy(state->window, end - state->wsize, state->wsize); state->wnext = 0; state->whave = state->wsize; } else { dist = state->wsize - state->wnext; if (dist > copy) dist = copy; - zmemcpy(state->window + state->wnext, strm->next_out - copy, dist); + zmemcpy(state->window + state->wnext, end - copy, dist); copy -= dist; if (copy) { - zmemcpy(state->window, strm->next_out - copy, copy); + zmemcpy(state->window, end - copy, copy); state->wnext = copy; state->whave = state->wsize; } @@ -606,7 +607,7 @@ z_streamp strm; int flush; { struct inflate_state FAR *state; - unsigned char FAR *next; /* next input */ + z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ @@ -920,7 +921,7 @@ int flush; while (state->have < 19) state->lens[order[state->have++]] = 0; state->next = state->codes; - state->lencode = (code const FAR *)(state->next); + state->lencode = (const code FAR *)(state->next); state->lenbits = 7; ret = inflate_table(CODES, state->lens, 19, &(state->next), &(state->lenbits), state->work); @@ -994,7 +995,7 @@ int flush; values here (9 and 6) without reading the comments in inftrees.h concerning the ENOUGH constants, which depend on those values */ state->next = state->codes; - state->lencode = (code const FAR *)(state->next); + state->lencode = (const code FAR *)(state->next); state->lenbits = 9; ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), &(state->lenbits), state->work); @@ -1003,7 +1004,7 @@ int flush; state->mode = BAD; break; } - state->distcode = (code const FAR *)(state->next); + state->distcode = (const code FAR *)(state->next); state->distbits = 6; ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, &(state->next), &(state->distbits), state->work); @@ -1230,7 +1231,7 @@ int flush; RESTORE(); if (state->wsize || (out != strm->avail_out && state->mode < BAD && (state->mode < CHECK || flush != Z_FINISH))) - if (updatewindow(strm, out)) { + if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { state->mode = MEM; return Z_MEM_ERROR; } @@ -1264,6 +1265,29 @@ z_streamp strm; return Z_OK; } +int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength) +z_streamp strm; +Bytef *dictionary; +uInt *dictLength; +{ + struct inflate_state FAR *state; + + /* check state */ + if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* copy dictionary */ + if (state->whave && dictionary != Z_NULL) { + zmemcpy(dictionary, state->window + state->wnext, + state->whave - state->wnext); + zmemcpy(dictionary + state->whave - state->wnext, + state->window, state->wnext); + } + if (dictLength != Z_NULL) + *dictLength = state->whave; + return Z_OK; +} + int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength) z_streamp strm; const Bytef *dictionary; @@ -1271,8 +1295,6 @@ uInt dictLength; { struct inflate_state FAR *state; unsigned long dictid; - unsigned char *next; - unsigned avail; int ret; /* check state */ @@ -1291,13 +1313,7 @@ uInt dictLength; /* copy dictionary to window using updatewindow(), which will amend the existing dictionary if appropriate */ - next = strm->next_out; - avail = strm->avail_out; - strm->next_out = (Bytef *)dictionary + dictLength; - strm->avail_out = 0; - ret = updatewindow(strm, dictLength); - strm->avail_out = avail; - strm->next_out = next; + ret = updatewindow(strm, dictionary + dictLength, dictLength); if (ret) { state->mode = MEM; return Z_MEM_ERROR; @@ -1337,7 +1353,7 @@ gz_headerp head; */ local unsigned syncsearch(have, buf, len) unsigned FAR *have; -unsigned char FAR *buf; +const unsigned char FAR *buf; unsigned len; { unsigned got; Modified: vendor/libz/dist/inftrees.c ============================================================================== --- vendor/libz/dist/inftrees.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/inftrees.c Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2012 Mark Adler + * Copyright (C) 1995-2013 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.7 Copyright 1995-2012 Mark Adler "; + " inflate 1.2.8 Copyright 1995-2013 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 78, 68}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, @@ -208,8 +208,8 @@ unsigned short FAR *work; mask = used - 1; /* mask for comparing low */ /* check available table space */ - if ((type == LENS && used >= ENOUGH_LENS) || - (type == DISTS && used >= ENOUGH_DISTS)) + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) return 1; /* process all codes and make table entries */ @@ -277,8 +277,8 @@ unsigned short FAR *work; /* check for enough space */ used += 1U << curr; - if ((type == LENS && used >= ENOUGH_LENS) || - (type == DISTS && used >= ENOUGH_DISTS)) + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) return 1; /* point entry in root table to sub-table */ Modified: vendor/libz/dist/test/example.c ============================================================================== --- vendor/libz/dist/test/example.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/test/example.c Fri May 3 22:32:49 2013 (r250224) @@ -26,7 +26,7 @@ } \ } -const char hello[] = "hello, hello!"; +z_const char hello[] = "hello, hello!"; /* "hello world" would be more standard, but the repeated "hello" * stresses the compression code better, sorry... */ @@ -212,7 +212,7 @@ void test_deflate(compr, comprLen) err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); CHECK_ERR(err, "deflateInit"); - c_stream.next_in = (Bytef*)hello; + c_stream.next_in = (z_const unsigned char *)hello; c_stream.next_out = compr; while (c_stream.total_in != len && c_stream.total_out < comprLen) { @@ -387,7 +387,7 @@ void test_flush(compr, comprLen) err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); CHECK_ERR(err, "deflateInit"); - c_stream.next_in = (Bytef*)hello; + c_stream.next_in = (z_const unsigned char *)hello; c_stream.next_out = compr; c_stream.avail_in = 3; c_stream.avail_out = (uInt)*comprLen; @@ -476,7 +476,7 @@ void test_dict_deflate(compr, comprLen) c_stream.next_out = compr; c_stream.avail_out = (uInt)comprLen; - c_stream.next_in = (Bytef*)hello; + c_stream.next_in = (z_const unsigned char *)hello; c_stream.avail_in = (uInt)strlen(hello)+1; err = deflate(&c_stream, Z_FINISH); Modified: vendor/libz/dist/test/minigzip.c ============================================================================== --- vendor/libz/dist/test/minigzip.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/test/minigzip.c Fri May 3 22:32:49 2013 (r250224) @@ -40,6 +40,10 @@ # define SET_BINARY_MODE(file) #endif +#ifdef _MSC_VER +# define snprintf _snprintf +#endif + #ifdef VMS # define unlink delete # define GZ_SUFFIX "-gz" @@ -463,8 +467,12 @@ void file_compress(file, mode) exit(1); } +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(outfile, sizeof(outfile), "%s%s", file, GZ_SUFFIX); +#else strcpy(outfile, file); strcat(outfile, GZ_SUFFIX); +#endif in = fopen(file, "rb"); if (in == NULL) { @@ -499,7 +507,11 @@ void file_uncompress(file) exit(1); } +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(buf, sizeof(buf), "%s", file); +#else strcpy(buf, file); +#endif if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) { infile = file; @@ -508,7 +520,11 @@ void file_uncompress(file) } else { outfile = file; infile = buf; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(buf + len, sizeof(buf) - len, "%s", GZ_SUFFIX); +#else strcat(infile, GZ_SUFFIX); +#endif } in = gzopen(infile, "rb"); if (in == NULL) { @@ -546,7 +562,11 @@ int main(argc, argv) gzFile file; char *bname, outmode[20]; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + snprintf(outmode, sizeof(outmode), "%s", "wb6 "); +#else strcpy(outmode, "wb6 "); +#endif prog = argv[0]; bname = strrchr(argv[0], '/'); Modified: vendor/libz/dist/trees.c ============================================================================== --- vendor/libz/dist/trees.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/trees.c Fri May 3 22:32:49 2013 (r250224) @@ -146,8 +146,8 @@ local void send_tree OF((deflate_st local int build_bl_tree OF((deflate_state *s)); local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, int blcodes)); -local void compress_block OF((deflate_state *s, ct_data *ltree, - ct_data *dtree)); +local void compress_block OF((deflate_state *s, const ct_data *ltree, + const ct_data *dtree)); local int detect_data_type OF((deflate_state *s)); local unsigned bi_reverse OF((unsigned value, int length)); local void bi_windup OF((deflate_state *s)); @@ -972,7 +972,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, bu } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) { #endif send_bits(s, (STATIC_TREES<<1)+last, 3); - compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree); + compress_block(s, (const ct_data *)static_ltree, + (const ct_data *)static_dtree); #ifdef DEBUG s->compressed_len += 3 + s->static_len; #endif @@ -980,7 +981,8 @@ void ZLIB_INTERNAL _tr_flush_block(s, bu send_bits(s, (DYN_TREES<<1)+last, 3); send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, max_blindex+1); - compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree); + compress_block(s, (const ct_data *)s->dyn_ltree, + (const ct_data *)s->dyn_dtree); #ifdef DEBUG s->compressed_len += 3 + s->opt_len; #endif @@ -1057,8 +1059,8 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc */ local void compress_block(s, ltree, dtree) deflate_state *s; - ct_data *ltree; /* literal tree */ - ct_data *dtree; /* distance tree */ + const ct_data *ltree; /* literal tree */ + const ct_data *dtree; /* distance tree */ { unsigned dist; /* distance of matched string */ int lc; /* match length or unmatched char (if dist == 0) */ Modified: vendor/libz/dist/uncompr.c ============================================================================== --- vendor/libz/dist/uncompr.c Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/uncompr.c Fri May 3 22:32:49 2013 (r250224) @@ -30,7 +30,7 @@ int ZEXPORT uncompress (dest, destLen, s z_stream stream; int err; - stream.next_in = (Bytef*)source; + stream.next_in = (z_const Bytef *)source; stream.avail_in = (uInt)sourceLen; /* Check for source > 64K on 16-bit machine: */ if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; Modified: vendor/libz/dist/zconf.h ============================================================================== --- vendor/libz/dist/zconf.h Fri May 3 21:11:57 2013 (r250223) +++ vendor/libz/dist/zconf.h Fri May 3 22:32:49 2013 (r250224) @@ -1,5 +1,5 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-vendor@FreeBSD.ORG Fri May 3 22:33:41 2013 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A17EC90A; Fri, 3 May 2013 22:33:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7A68818A7; Fri, 3 May 2013 22:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r43MXf5D070386; Fri, 3 May 2013 22:33:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r43MXfkh070385; Fri, 3 May 2013 22:33:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201305032233.r43MXfkh070385@svn.freebsd.org> From: Xin LI Date: Fri, 3 May 2013 22:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r250225 - vendor/libz/1.2.8 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2013 22:33:41 -0000 Author: delphij Date: Fri May 3 22:33:41 2013 New Revision: 250225 URL: http://svnweb.freebsd.org/changeset/base/250225 Log: Tag zlib 1.2.8. Added: vendor/libz/1.2.8/ - copied from r250224, vendor/libz/dist/