From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 09:17:34 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E6A2C79; Sun, 28 Oct 2012 09:17:34 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 044978FC08; Sun, 28 Oct 2012 09:17:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9S9HXTo072069; Sun, 28 Oct 2012 09:17:33 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9S9HXuJ072066; Sun, 28 Oct 2012 09:17:33 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201210280917.q9S9HXuJ072066@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 28 Oct 2012 09:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242211 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 09:17:34 -0000 Author: edwin Date: Sun Oct 28 09:17:33 2012 New Revision: 242211 URL: http://svn.freebsd.org/changeset/base/242211 Log: Merge of current of tzdata2012h, r242208 - Bahia no longer has DST. - Tocantins has DST. - Israel has new DST rules next year. - Jordan stays on DST this winter. Modified: stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/southamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Sun Oct 28 09:16:55 2012 (r242210) +++ stable/8/share/zoneinfo/asia Sun Oct 28 09:17:33 2012 (r242211) @@ -1170,15 +1170,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S # # ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps -# From Paul Eggert (2005-02-22): +# From Paul Eggert (2012-10-26): # I used Ephraim Silverberg's dst-israel.el program # (2005-02-20) # along with Ed Reingold's cal-hebrew in GNU Emacs 21.4, -# to generate the transitions in this list. +# to generate the transitions from 2005 through 2012. # (I replaced "lastFri" with "Fri>=26" by hand.) -# The spring transitions below all correspond to the following Rule: +# The spring transitions all correspond to the following Rule: # -# Rule Zion 2005 max - Mar Fri>=26 2:00 1:00 D +# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D # # but older zic implementations (e.g., Solaris 8) do not support # "Fri>=26" to mean April 1 in years like 2005, so for now we list the @@ -1195,39 +1195,36 @@ Rule Zion 2009 only - Sep 27 2:00 0 S Rule Zion 2010 only - Sep 12 2:00 0 S Rule Zion 2011 only - Apr 1 2:00 1:00 D Rule Zion 2011 only - Oct 2 2:00 0 S -Rule Zion 2012 2015 - Mar Fri>=26 2:00 1:00 D +Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S -Rule Zion 2013 only - Sep 8 2:00 0 S -Rule Zion 2014 only - Sep 28 2:00 0 S -Rule Zion 2015 only - Sep 20 2:00 0 S -Rule Zion 2016 only - Apr 1 2:00 1:00 D -Rule Zion 2016 only - Oct 9 2:00 0 S -Rule Zion 2017 2021 - Mar Fri>=26 2:00 1:00 D -Rule Zion 2017 only - Sep 24 2:00 0 S -Rule Zion 2018 only - Sep 16 2:00 0 S -Rule Zion 2019 only - Oct 6 2:00 0 S -Rule Zion 2020 only - Sep 27 2:00 0 S -Rule Zion 2021 only - Sep 12 2:00 0 S -Rule Zion 2022 only - Apr 1 2:00 1:00 D -Rule Zion 2022 only - Oct 2 2:00 0 S -Rule Zion 2023 2032 - Mar Fri>=26 2:00 1:00 D -Rule Zion 2023 only - Sep 24 2:00 0 S -Rule Zion 2024 only - Oct 6 2:00 0 S -Rule Zion 2025 only - Sep 28 2:00 0 S -Rule Zion 2026 only - Sep 20 2:00 0 S -Rule Zion 2027 only - Oct 10 2:00 0 S -Rule Zion 2028 only - Sep 24 2:00 0 S -Rule Zion 2029 only - Sep 16 2:00 0 S -Rule Zion 2030 only - Oct 6 2:00 0 S -Rule Zion 2031 only - Sep 21 2:00 0 S -Rule Zion 2032 only - Sep 12 2:00 0 S -Rule Zion 2033 only - Apr 1 2:00 1:00 D -Rule Zion 2033 only - Oct 2 2:00 0 S -Rule Zion 2034 2037 - Mar Fri>=26 2:00 1:00 D -Rule Zion 2034 only - Sep 17 2:00 0 S -Rule Zion 2035 only - Oct 7 2:00 0 S -Rule Zion 2036 only - Sep 28 2:00 0 S -Rule Zion 2037 only - Sep 13 2:00 0 S + +# From Ephraim Silverberg (2012-10-18): + +# Yesterday, the Interior Ministry Committee, after more than a year +# past, approved sending the proposed June 2011 changes to the Time +# Decree Law back to the Knesset for second and third (final) votes +# before the upcoming elections on Jan. 22, 2013. Hence, although the +# changes are not yet law, they are expected to be so before Februray 2013. +# +# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March. +# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the +# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day +# later (i.e. at 02:00 the first Monday after October 2). +# [Rosh Hashana holidays are factored in until 2100.] + +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D +Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S +Rule Zion 2027 only - Oct Mon>=3 2:00 0 S +Rule Zion 2028 max - Oct Sun>=2 2:00 0 S +# The following rules are commented out for now, as they break older +# versions of zic that support only signed 32-bit timestamps, i.e., +# through 2038-01-19 03:14:07 UTC. +#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S +#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S +#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S +#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S +#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Jerusalem 2:20:56 - LMT 1880 @@ -1362,6 +1359,16 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 3 # From Arthur David Olson (2009-04-06): # We still have Jordan switching to DST on Thursdays in 2000 and 2001. +# From Steffen Thorsen (2012-10-25): +# Yesterday the government in Jordan announced that they will not +# switch back to standard time this winter, so the will stay on DST +# until about the same time next year (at least). +# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950 +# +# From Paul Eggert (2012-10-25): +# For now, assume this is just a one-year measure. If it becomes +# permanent, we should move Jordan from EET to AST effective tomorrow. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Jordan 1973 only - Jun 6 0:00 1:00 S Rule Jordan 1973 1975 - Oct 1 0:00 0 - @@ -1390,7 +1397,8 @@ Rule Jordan 2002 max - Mar lastThu 24:00 Rule Jordan 2003 only - Oct 24 0:00s 0 - Rule Jordan 2004 only - Oct 15 0:00s 0 - Rule Jordan 2005 only - Sep lastFri 0:00s 0 - -Rule Jordan 2006 max - Oct lastFri 0:00s 0 - +Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - +Rule Jordan 2013 max - Oct lastFri 0:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT Modified: stable/8/share/zoneinfo/southamerica ============================================================================== --- stable/8/share/zoneinfo/southamerica Sun Oct 28 09:16:55 2012 (r242210) +++ stable/8/share/zoneinfo/southamerica Sun Oct 28 09:17:33 2012 (r242211) @@ -829,6 +829,15 @@ Zone America/La_Paz -4:32:36 - LMT 1890 # http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6 # +# From Kelley Cook (2012-10-16): +# The governor of state of Bahia in Brazil announced on Thursday that +# due to public pressure, he is reversing the DST policy they implemented +# last year and will not be going to Summer Time on October 21st.... +# http://www.correio24horas.com.br/r/artigo/apos-pressoes-wagner-suspende-horario-de-verao-na-bahia + +# From Rodrigo Severo (2012-10-16): +# Tocantins state will have DST. +# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Decree 20,466 (1931-10-01) @@ -1048,7 +1057,8 @@ Zone America/Araguaina -3:12:48 - LMT 19 -3:00 Brazil BR%sT 1990 Sep 17 -3:00 - BRT 1995 Sep 14 -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT + -3:00 - BRT 2012 Oct 21 + -3:00 Brazil BR%sT # # Alagoas (AL), Sergipe (SE) Zone America/Maceio -2:22:52 - LMT 1914 @@ -1067,7 +1077,8 @@ Zone America/Maceio -2:22:52 - LMT 1914 Zone America/Bahia -2:34:04 - LMT 1914 -3:00 Brazil BR%sT 2003 Sep 24 -3:00 - BRT 2011 Oct 16 - -3:00 Brazil BR%sT + -3:00 Brazil BR%sT 2012 Oct 21 + -3:00 - BRT # # Goias (GO), Distrito Federal (DF), Minas Gerais (MG), # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR), From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 10:57:24 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9C0DF8F; Sun, 28 Oct 2012 10:57:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AED6D8FC0C; Sun, 28 Oct 2012 10:57:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SAvOgs089578; Sun, 28 Oct 2012 10:57:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SAvOXL089574; Sun, 28 Oct 2012 10:57:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210281057.q9SAvOXL089574@svn.freebsd.org> From: Xin LI Date: Sun, 28 Oct 2012 10:57:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242216 - in stable/8: share/man/man4 sys/dev/hptiop X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 10:57:24 -0000 Author: delphij Date: Sun Oct 28 10:57:24 2012 New Revision: 242216 URL: http://svn.freebsd.org/changeset/base/242216 Log: MFC r242086: Update hptiop(4) to version 1.8, which added support for HighPoint RocketRAID 4500 series. Many thanks to HighPoint Technologies for their continued support of FreeBSD! Submitted by: HighPoint Technologies Modified: stable/8/share/man/man4/hptiop.4 stable/8/sys/dev/hptiop/hptiop.c stable/8/sys/dev/hptiop/hptiop.h Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/hptiop/ (props changed) Modified: stable/8/share/man/man4/hptiop.4 ============================================================================== --- stable/8/share/man/man4/hptiop.4 Sun Oct 28 10:33:19 2012 (r242215) +++ stable/8/share/man/man4/hptiop.4 Sun Oct 28 10:57:24 2012 (r242216) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 5, 2012 +.Dd October 25, 2012 .Dt HPTIOP 4 .Os .Sh NAME @@ -58,6 +58,10 @@ driver supports the following SAS and SA .Pp .Bl -bullet -compact .It +HighPoint RocketRAID 4522 +.It +HighPoint RocketRAID 4520 +.It HighPoint RocketRAID 4322 .It HighPoint RocketRAID 4321 Modified: stable/8/sys/dev/hptiop/hptiop.c ============================================================================== --- stable/8/sys/dev/hptiop/hptiop.c Sun Oct 28 10:33:19 2012 (r242215) +++ stable/8/sys/dev/hptiop/hptiop.c Sun Oct 28 10:57:24 2012 (r242216) @@ -1,6 +1,6 @@ /* * HighPoint RR3xxx/4xxx RAID Driver for FreeBSD - * Copyright (C) 2007-2008 HighPoint Technologies, Inc. All Rights Reserved. + * Copyright (C) 2007-2012 HighPoint Technologies, Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -89,8 +89,8 @@ __FBSDID("$FreeBSD$"); #include -static char driver_name[] = "hptiop"; -static char driver_version[] = "v1.3 (010208)"; +static const char driver_name[] = "hptiop"; +static const char driver_version[] = "v1.8"; static devclass_t hptiop_devclass; @@ -99,41 +99,62 @@ static int hptiop_send_sync_msg(struct h static void hptiop_request_callback_itl(struct hpt_iop_hba *hba, u_int32_t req); static void hptiop_request_callback_mv(struct hpt_iop_hba *hba, u_int64_t req); +static void hptiop_request_callback_mvfrey(struct hpt_iop_hba *hba, + u_int32_t req); static void hptiop_os_message_callback(struct hpt_iop_hba *hba, u_int32_t msg); static int hptiop_do_ioctl_itl(struct hpt_iop_hba *hba, struct hpt_iop_ioctl_param *pParams); static int hptiop_do_ioctl_mv(struct hpt_iop_hba *hba, struct hpt_iop_ioctl_param *pParams); +static int hptiop_do_ioctl_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams); static int hptiop_rescan_bus(struct hpt_iop_hba *hba); static int hptiop_alloc_pci_res_itl(struct hpt_iop_hba *hba); static int hptiop_alloc_pci_res_mv(struct hpt_iop_hba *hba); +static int hptiop_alloc_pci_res_mvfrey(struct hpt_iop_hba *hba); static int hptiop_get_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_get_config *config); static int hptiop_get_config_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_get_config *config); +static int hptiop_get_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_get_config *config); static int hptiop_set_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config); static int hptiop_set_config_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config); +static int hptiop_set_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config); static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba); +static int hptiop_internal_memalloc_mvfrey(struct hpt_iop_hba *hba); +static int hptiop_internal_memfree_itl(struct hpt_iop_hba *hba); static int hptiop_internal_memfree_mv(struct hpt_iop_hba *hba); +static int hptiop_internal_memfree_mvfrey(struct hpt_iop_hba *hba); static int hptiop_post_ioctl_command_itl(struct hpt_iop_hba *hba, u_int32_t req32, struct hpt_iop_ioctl_param *pParams); static int hptiop_post_ioctl_command_mv(struct hpt_iop_hba *hba, struct hpt_iop_request_ioctl_command *req, struct hpt_iop_ioctl_param *pParams); +static int hptiop_post_ioctl_command_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_ioctl_command *req, + struct hpt_iop_ioctl_param *pParams); static void hptiop_post_req_itl(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb, bus_dma_segment_t *segs, int nsegs); static void hptiop_post_req_mv(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb, bus_dma_segment_t *segs, int nsegs); +static void hptiop_post_req_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs); static void hptiop_post_msg_itl(struct hpt_iop_hba *hba, u_int32_t msg); static void hptiop_post_msg_mv(struct hpt_iop_hba *hba, u_int32_t msg); +static void hptiop_post_msg_mvfrey(struct hpt_iop_hba *hba, u_int32_t msg); static void hptiop_enable_intr_itl(struct hpt_iop_hba *hba); static void hptiop_enable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_enable_intr_mvfrey(struct hpt_iop_hba *hba); static void hptiop_disable_intr_itl(struct hpt_iop_hba *hba); static void hptiop_disable_intr_mv(struct hpt_iop_hba *hba); +static void hptiop_disable_intr_mvfrey(struct hpt_iop_hba *hba); static void hptiop_free_srb(struct hpt_iop_hba *hba, struct hpt_iop_srb *srb); static int hptiop_os_query_remove_device(struct hpt_iop_hba *hba, int tid); static int hptiop_probe(device_t dev); @@ -146,8 +167,7 @@ static void hptiop_async(void *callback_ struct cam_path *path, void *arg); static void hptiop_pci_intr(void *arg); static void hptiop_release_resource(struct hpt_iop_hba *hba); -static int hptiop_reset_adapter(struct hpt_iop_hba *hba); - +static void hptiop_reset_adapter(void *argv); static d_open_t hptiop_open; static d_close_t hptiop_close; static d_ioctl_t hptiop_ioctl; @@ -193,6 +213,11 @@ static struct cdevsw hptiop_cdevsw = { #define BUS_SPACE_RD4_MV2(offset) bus_space_read_4(hba->bar2t,\ hba->bar2h, offsetof(struct hpt_iopmu_mv, offset)) +#define BUS_SPACE_WRT4_MVFREY2(offset, value) bus_space_write_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mvfrey, offset), value) +#define BUS_SPACE_RD4_MVFREY2(offset) bus_space_read_4(hba->bar2t,\ + hba->bar2h, offsetof(struct hpt_iopmu_mvfrey, offset)) + static int hptiop_open(ioctl_dev_t dev, int flags, int devtype, ioctl_thread_t proc) { @@ -294,6 +319,12 @@ static void hptiop_post_msg_mv(struct hp BUS_SPACE_RD4_MV0(outbound_intmask); } +static void hptiop_post_msg_mvfrey(struct hpt_iop_hba *hba, u_int32_t msg) +{ + BUS_SPACE_WRT4_MVFREY2(f0_to_cpu_msg_a, msg); + BUS_SPACE_RD4_MVFREY2(f0_to_cpu_msg_a); +} + static int hptiop_wait_ready_itl(struct hpt_iop_hba * hba, u_int32_t millisec) { u_int32_t req=0; @@ -323,6 +354,15 @@ static int hptiop_wait_ready_mv(struct h return 0; } +static int hptiop_wait_ready_mvfrey(struct hpt_iop_hba * hba, + u_int32_t millisec) +{ + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_NOP, millisec)) + return -1; + + return 0; +} + static void hptiop_request_callback_itl(struct hpt_iop_hba * hba, u_int32_t index) { @@ -618,6 +658,111 @@ scsi_done: } } +static void hptiop_request_callback_mvfrey(struct hpt_iop_hba * hba, + u_int32_t _tag) +{ + u_int32_t req_type = _tag & 0xf; + + struct hpt_iop_srb *srb; + struct hpt_iop_request_scsi_command *req; + union ccb *ccb; + u_int8_t *cdb; + + switch (req_type) { + case IOP_REQUEST_TYPE_GET_CONFIG: + case IOP_REQUEST_TYPE_SET_CONFIG: + hba->config_done = 1; + break; + + case IOP_REQUEST_TYPE_SCSI_COMMAND: + srb = hba->srb[(_tag >> 4) & 0xff]; + req = (struct hpt_iop_request_scsi_command *)srb; + + ccb = (union ccb *)srb->ccb; + + untimeout(hptiop_reset_adapter, hba, ccb->ccb_h.timeout_ch); + + if (ccb->ccb_h.flags & CAM_CDB_POINTER) + cdb = ccb->csio.cdb_io.cdb_ptr; + else + cdb = ccb->csio.cdb_io.cdb_bytes; + + if (cdb[0] == SYNCHRONIZE_CACHE) { /* ??? */ + ccb->ccb_h.status = CAM_REQ_CMP; + goto scsi_done; + } + + if (_tag & MVFREYIOPMU_QUEUE_REQUEST_RESULT_BIT) + req->header.result = IOP_RESULT_SUCCESS; + + switch (req->header.result) { + case IOP_RESULT_SUCCESS: + switch (ccb->ccb_h.flags & CAM_DIR_MASK) { + case CAM_DIR_IN: + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(hba->io_dmat, srb->dma_map); + break; + case CAM_DIR_OUT: + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(hba->io_dmat, srb->dma_map); + break; + } + ccb->ccb_h.status = CAM_REQ_CMP; + break; + case IOP_RESULT_BAD_TARGET: + ccb->ccb_h.status = CAM_DEV_NOT_THERE; + break; + case IOP_RESULT_BUSY: + ccb->ccb_h.status = CAM_BUSY; + break; + case IOP_RESULT_INVALID_REQUEST: + ccb->ccb_h.status = CAM_REQ_INVALID; + break; + case IOP_RESULT_FAIL: + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + break; + case IOP_RESULT_RESET: + ccb->ccb_h.status = CAM_BUSY; + break; + case IOP_RESULT_CHECK_CONDITION: + memset(&ccb->csio.sense_data, 0, + sizeof(ccb->csio.sense_data)); + if (req->dataxfer_length < ccb->csio.sense_len) + ccb->csio.sense_resid = ccb->csio.sense_len - + req->dataxfer_length; + else + ccb->csio.sense_resid = 0; + memcpy(&ccb->csio.sense_data, &req->sg_list, + MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data))); + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + ccb->ccb_h.status |= CAM_AUTOSNS_VALID; + ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; + break; + default: + ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + break; + } +scsi_done: + ccb->csio.resid = ccb->csio.dxfer_len - req->dataxfer_length; + + hptiop_free_srb(hba, srb); + xpt_done(ccb); + break; + case IOP_REQUEST_TYPE_IOCTL_COMMAND: + if (_tag & MVFREYIOPMU_QUEUE_REQUEST_RESULT_BIT) + hba->config_done = 1; + else + hba->config_done = -1; + wakeup((struct hpt_iop_request_ioctl_command *)hba->ctlcfg_ptr); + break; + default: + device_printf(hba->pcidev, "wrong callback type\n"); + break; + } +} + static void hptiop_drain_outbound_queue_mv(struct hpt_iop_hba * hba) { u_int64_t req; @@ -656,6 +801,50 @@ static int hptiop_intr_mv(struct hpt_iop return ret; } +static int hptiop_intr_mvfrey(struct hpt_iop_hba * hba) +{ + u_int32_t status, _tag, cptr; + int ret = 0; + + if (hba->initialized) { + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0); + } + + status = BUS_SPACE_RD4_MVFREY2(f0_doorbell); + if (status) { + BUS_SPACE_WRT4_MVFREY2(f0_doorbell, status); + if (status & CPU_TO_F0_DRBL_MSG_A_BIT) { + u_int32_t msg = BUS_SPACE_RD4_MVFREY2(cpu_to_f0_msg_a); + hptiop_os_message_callback(hba, msg); + } + ret = 1; + } + + status = BUS_SPACE_RD4_MVFREY2(isr_cause); + if (status) { + BUS_SPACE_WRT4_MVFREY2(isr_cause, status); + do { + cptr = *hba->u.mvfrey.outlist_cptr & 0xff; + while (hba->u.mvfrey.outlist_rptr != cptr) { + hba->u.mvfrey.outlist_rptr++; + if (hba->u.mvfrey.outlist_rptr == hba->u.mvfrey.list_count) { + hba->u.mvfrey.outlist_rptr = 0; + } + + _tag = hba->u.mvfrey.outlist[hba->u.mvfrey.outlist_rptr].val; + hptiop_request_callback_mvfrey(hba, _tag); + ret = 2; + } + } while (cptr != (*hba->u.mvfrey.outlist_cptr & 0xff)); + } + + if (hba->initialized) { + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0x1010); + } + + return ret; +} + static int hptiop_send_sync_request_itl(struct hpt_iop_hba * hba, u_int32_t req32, u_int32_t millisec) { @@ -702,6 +891,48 @@ static int hptiop_send_sync_request_mv(s return -1; } +static int hptiop_send_sync_request_mvfrey(struct hpt_iop_hba *hba, + void *req, u_int32_t millisec) +{ + u_int32_t i, index; + u_int64_t phy_addr; + struct hpt_iop_request_header *reqhdr = + (struct hpt_iop_request_header *)req; + + hba->config_done = 0; + + phy_addr = hba->ctlcfgcmd_phy; + reqhdr->flags = IOP_REQUEST_FLAG_SYNC_REQUEST + | IOP_REQUEST_FLAG_OUTPUT_CONTEXT + | IOP_REQUEST_FLAG_ADDR_BITS + | ((phy_addr >> 16) & 0xffff0000); + reqhdr->context = ((phy_addr & 0xffffffff) << 32 ) + | IOPMU_QUEUE_ADDR_HOST_BIT | reqhdr->type; + + hba->u.mvfrey.inlist_wptr++; + index = hba->u.mvfrey.inlist_wptr & 0x3fff; + + if (index == hba->u.mvfrey.list_count) { + index = 0; + hba->u.mvfrey.inlist_wptr &= ~0x3fff; + hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; + } + + hba->u.mvfrey.inlist[index].addr = phy_addr; + hba->u.mvfrey.inlist[index].intrfc_len = (reqhdr->size + 3) / 4; + + BUS_SPACE_WRT4_MVFREY2(inbound_write_ptr, hba->u.mvfrey.inlist_wptr); + BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); + + for (i = 0; i < millisec; i++) { + hptiop_intr_mvfrey(hba); + if (hba->config_done) + return 0; + DELAY(1000); + } + return -1; +} + static int hptiop_send_sync_msg(struct hpt_iop_hba *hba, u_int32_t msg, u_int32_t millisec) { @@ -776,6 +1007,37 @@ static int hptiop_get_config_mv(struct h return 0; } +static int hptiop_get_config_mvfrey(struct hpt_iop_hba * hba, + struct hpt_iop_request_get_config * config) +{ + struct hpt_iop_request_get_config *info = hba->u.mvfrey.config; + + if (info->header.size != sizeof(struct hpt_iop_request_get_config) || + info->header.type != IOP_REQUEST_TYPE_GET_CONFIG) { + KdPrint(("hptiop: header size %x/%x type %x/%x", + info->header.size, (int)sizeof(struct hpt_iop_request_get_config), + info->header.type, IOP_REQUEST_TYPE_GET_CONFIG)); + return -1; + } + + config->interface_version = info->interface_version; + config->firmware_version = info->firmware_version; + config->max_requests = info->max_requests; + config->request_size = info->request_size; + config->max_sg_count = info->max_sg_count; + config->data_transfer_length = info->data_transfer_length; + config->alignment_mask = info->alignment_mask; + config->max_devices = info->max_devices; + config->sdram_size = info->sdram_size; + + KdPrint(("hptiop: maxreq %x reqsz %x datalen %x maxdev %x sdram %x", + config->max_requests, config->request_size, + config->data_transfer_length, config->max_devices, + config->sdram_size)); + + return 0; +} + static int hptiop_set_config_itl(struct hpt_iop_hba *hba, struct hpt_iop_request_set_config *config) { @@ -833,6 +1095,31 @@ static int hptiop_set_config_mv(struct h return 0; } +static int hptiop_set_config_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_set_config *config) +{ + struct hpt_iop_request_set_config *req; + + if (!(req = hba->ctlcfg_ptr)) + return -1; + + memcpy((u_int8_t *)req + sizeof(struct hpt_iop_request_header), + (u_int8_t *)config + sizeof(struct hpt_iop_request_header), + sizeof(struct hpt_iop_request_set_config) - + sizeof(struct hpt_iop_request_header)); + + req->header.type = IOP_REQUEST_TYPE_SET_CONFIG; + req->header.size = sizeof(struct hpt_iop_request_set_config); + req->header.result = IOP_RESULT_PENDING; + + if (hptiop_send_sync_request_mvfrey(hba, req, 20000)) { + KdPrint(("hptiop: set config send cmd failed")); + return -1; + } + + return 0; +} + static int hptiop_post_ioctl_command_itl(struct hpt_iop_hba *hba, u_int32_t req32, struct hpt_iop_ioctl_param *pParams) @@ -884,7 +1171,8 @@ static int hptiop_post_ioctl_command_itl return 0; } -static int hptiop_bus_space_copyin(struct hpt_iop_hba *hba, u_int32_t bus, void *user, int size) +static int hptiop_bus_space_copyin(struct hpt_iop_hba *hba, u_int32_t bus, + void *user, int size) { unsigned char byte; int i; @@ -898,7 +1186,8 @@ static int hptiop_bus_space_copyin(struc return 0; } -static int hptiop_bus_space_copyout(struct hpt_iop_hba *hba, u_int32_t bus, void *user, int size) +static int hptiop_bus_space_copyout(struct hpt_iop_hba *hba, u_int32_t bus, + void *user, int size) { unsigned char byte; int i; @@ -1045,6 +1334,103 @@ invalid: } } +static int hptiop_post_ioctl_command_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_request_ioctl_command *req, + struct hpt_iop_ioctl_param *pParams) +{ + u_int64_t phy_addr; + u_int32_t index; + + phy_addr = hba->ctlcfgcmd_phy; + + if ((((pParams->nInBufferSize + 3) & ~3) + pParams->nOutBufferSize) > + (hba->max_request_size - + offsetof(struct hpt_iop_request_ioctl_command, buf))) { + device_printf(hba->pcidev, "request size beyond max value"); + return -1; + } + + req->ioctl_code = HPT_CTL_CODE_BSD_TO_IOP(pParams->dwIoControlCode); + req->inbuf_size = pParams->nInBufferSize; + req->outbuf_size = pParams->nOutBufferSize; + req->header.size = offsetof(struct hpt_iop_request_ioctl_command, buf) + + pParams->nInBufferSize; + + req->header.type = IOP_REQUEST_TYPE_IOCTL_COMMAND; + req->header.result = IOP_RESULT_PENDING; + + req->header.flags = IOP_REQUEST_FLAG_SYNC_REQUEST + | IOP_REQUEST_FLAG_OUTPUT_CONTEXT + | IOP_REQUEST_FLAG_ADDR_BITS + | ((phy_addr >> 16) & 0xffff0000); + req->header.context = ((phy_addr & 0xffffffff) << 32 ) + | IOPMU_QUEUE_ADDR_HOST_BIT | req->header.type; + + hba->u.mvfrey.inlist_wptr++; + index = hba->u.mvfrey.inlist_wptr & 0x3fff; + + if (index == hba->u.mvfrey.list_count) { + index = 0; + hba->u.mvfrey.inlist_wptr &= ~0x3fff; + hba->u.mvfrey.inlist_wptr ^= CL_POINTER_TOGGLE; + } + + hba->u.mvfrey.inlist[index].addr = phy_addr; + hba->u.mvfrey.inlist[index].intrfc_len = (req->header.size + 3) / 4; + + BUS_SPACE_WRT4_MVFREY2(inbound_write_ptr, hba->u.mvfrey.inlist_wptr); + BUS_SPACE_RD4_MVFREY2(inbound_write_ptr); + + while (hba->config_done == 0) { + if (hptiop_sleep(hba, req, PPAUSE, + "hptctl", HPT_OSM_TIMEOUT)==0) + continue; + hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000); + } + return 0; +} + +static int hptiop_do_ioctl_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_ioctl_param *pParams) +{ + struct hpt_iop_request_ioctl_command *req; + + if ((pParams->Magic != HPT_IOCTL_MAGIC) && + (pParams->Magic != HPT_IOCTL_MAGIC32)) + return EFAULT; + + req = (struct hpt_iop_request_ioctl_command *)(hba->ctlcfg_ptr); + hba->config_done = 0; + hptiop_lock_adapter(hba); + if (pParams->nInBufferSize) + if (copyin((void *)pParams->lpInBuffer, + req->buf, pParams->nInBufferSize)) + goto invalid; + if (hptiop_post_ioctl_command_mvfrey(hba, req, pParams)) + goto invalid; + + if (hba->config_done == 1) { + if (pParams->nOutBufferSize) + if (copyout(req->buf + + ((pParams->nInBufferSize + 3) & ~3), + (void *)pParams->lpOutBuffer, + pParams->nOutBufferSize)) + goto invalid; + + if (pParams->lpBytesReturned) + if (copyout(&req->bytes_returned, + (void*)pParams->lpBytesReturned, + sizeof(u_int32_t))) + goto invalid; + hptiop_unlock_adapter(hba); + return 0; + } else{ +invalid: + hptiop_unlock_adapter(hba); + return EFAULT; + } +} + static int hptiop_rescan_bus(struct hpt_iop_hba * hba) { union ccb *ccb; @@ -1063,6 +1449,7 @@ static int hptiop_rescan_bus(struct hpt static bus_dmamap_callback_t hptiop_map_srb; static bus_dmamap_callback_t hptiop_post_scsi_command; static bus_dmamap_callback_t hptiop_mv_map_ctlcfg; +static bus_dmamap_callback_t hptiop_mvfrey_map_ctlcfg; static int hptiop_alloc_pci_res_itl(struct hpt_iop_hba *hba) { @@ -1139,6 +1526,56 @@ static int hptiop_alloc_pci_res_mv(struc return 0; } +static int hptiop_alloc_pci_res_mvfrey(struct hpt_iop_hba *hba) +{ + hba->bar0_rid = 0x10; + hba->bar0_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_MEMORY, &hba->bar0_rid, RF_ACTIVE); + + if (hba->bar0_res == NULL) { + device_printf(hba->pcidev, "failed to get iop bar0.\n"); + return -1; + } + hba->bar0t = rman_get_bustag(hba->bar0_res); + hba->bar0h = rman_get_bushandle(hba->bar0_res); + hba->u.mvfrey.config = (struct hpt_iop_request_get_config *) + rman_get_virtual(hba->bar0_res); + + if (!hba->u.mvfrey.config) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + device_printf(hba->pcidev, "alloc bar0 mem res failed\n"); + return -1; + } + + hba->bar2_rid = 0x18; + hba->bar2_res = bus_alloc_resource_any(hba->pcidev, + SYS_RES_MEMORY, &hba->bar2_rid, RF_ACTIVE); + + if (hba->bar2_res == NULL) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + device_printf(hba->pcidev, "failed to get iop bar2.\n"); + return -1; + } + + hba->bar2t = rman_get_bustag(hba->bar2_res); + hba->bar2h = rman_get_bushandle(hba->bar2_res); + hba->u.mvfrey.mu = + (struct hpt_iopmu_mvfrey *)rman_get_virtual(hba->bar2_res); + + if (!hba->u.mvfrey.mu) { + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar2_rid, hba->bar2_res); + device_printf(hba->pcidev, "alloc mem bar2 res failed\n"); + return -1; + } + + return 0; +} + static void hptiop_release_pci_res_itl(struct hpt_iop_hba *hba) { if (hba->bar0_res) @@ -1156,6 +1593,16 @@ static void hptiop_release_pci_res_mv(st hba->bar2_rid, hba->bar2_res); } +static void hptiop_release_pci_res_mvfrey(struct hpt_iop_hba *hba) +{ + if (hba->bar0_res) + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar0_rid, hba->bar0_res); + if (hba->bar2_res) + bus_release_resource(hba->pcidev, SYS_RES_MEMORY, + hba->bar2_rid, hba->bar2_res); +} + static int hptiop_internal_memalloc_mv(struct hpt_iop_hba *hba) { if (bus_dma_tag_create(hba->parent_dmat, @@ -1172,7 +1619,7 @@ static int hptiop_internal_memalloc_mv(s NULL, NULL, #endif - &hba->ctlcfg_dmat)) { + &hba->ctlcfg_dmat)) { device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); return -1; } @@ -1205,6 +1652,72 @@ static int hptiop_internal_memalloc_mv(s return 0; } +static int hptiop_internal_memalloc_mvfrey(struct hpt_iop_hba *hba) +{ + u_int32_t list_count = BUS_SPACE_RD4_MVFREY2(inbound_conf_ctl); + + list_count >>= 16; + + if (list_count == 0) { + return -1; + } + + hba->u.mvfrey.list_count = list_count; + hba->u.mvfrey.internal_mem_size = 0x800 + + list_count * sizeof(struct mvfrey_inlist_entry) + + list_count * sizeof(struct mvfrey_outlist_entry) + + sizeof(int); + if (bus_dma_tag_create(hba->parent_dmat, + 1, + 0, + BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, + NULL, NULL, + hba->u.mvfrey.internal_mem_size, + 1, + BUS_SPACE_MAXSIZE_32BIT, + BUS_DMA_ALLOCNOW, +#if __FreeBSD_version > 502000 + NULL, + NULL, +#endif + &hba->ctlcfg_dmat)) { + device_printf(hba->pcidev, "alloc ctlcfg_dmat failed\n"); + return -1; + } + + if (bus_dmamem_alloc(hba->ctlcfg_dmat, (void **)&hba->ctlcfg_ptr, +#if __FreeBSD_version>501000 + BUS_DMA_WAITOK | BUS_DMA_COHERENT, +#else + BUS_DMA_WAITOK, +#endif + &hba->ctlcfg_dmamap) != 0) { + device_printf(hba->pcidev, + "bus_dmamem_alloc failed!\n"); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + return -1; + } + + if (bus_dmamap_load(hba->ctlcfg_dmat, + hba->ctlcfg_dmamap, hba->ctlcfg_ptr, + hba->u.mvfrey.internal_mem_size, + hptiop_mvfrey_map_ctlcfg, hba, 0)) { + device_printf(hba->pcidev, "bus_dmamap_load failed!\n"); + if (hba->ctlcfg_dmat) + bus_dmamem_free(hba->ctlcfg_dmat, + hba->ctlcfg_ptr, hba->ctlcfg_dmamap); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + return -1; + } + + return 0; +} + +static int hptiop_internal_memfree_itl(struct hpt_iop_hba *hba) { + return 0; +} + static int hptiop_internal_memfree_mv(struct hpt_iop_hba *hba) { if (hba->ctlcfg_dmat) { @@ -1217,6 +1730,54 @@ static int hptiop_internal_memfree_mv(st return 0; } +static int hptiop_internal_memfree_mvfrey(struct hpt_iop_hba *hba) +{ + if (hba->ctlcfg_dmat) { + bus_dmamap_unload(hba->ctlcfg_dmat, hba->ctlcfg_dmamap); + bus_dmamem_free(hba->ctlcfg_dmat, + hba->ctlcfg_ptr, hba->ctlcfg_dmamap); + bus_dma_tag_destroy(hba->ctlcfg_dmat); + } + + return 0; +} + +static int hptiop_reset_comm_mvfrey(struct hpt_iop_hba *hba) +{ + u_int32_t i = 100; + + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET_COMM, 3000)) + return -1; + + /* wait 100ms for MCU ready */ + while(i--) { + DELAY(1000); + } + + BUS_SPACE_WRT4_MVFREY2(inbound_base, + hba->u.mvfrey.inlist_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(inbound_base_high, + (hba->u.mvfrey.inlist_phy >> 16) >> 16); + + BUS_SPACE_WRT4_MVFREY2(outbound_base, + hba->u.mvfrey.outlist_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(outbound_base_high, + (hba->u.mvfrey.outlist_phy >> 16) >> 16); + + BUS_SPACE_WRT4_MVFREY2(outbound_shadow_base, + hba->u.mvfrey.outlist_cptr_phy & 0xffffffff); + BUS_SPACE_WRT4_MVFREY2(outbound_shadow_base_high, + (hba->u.mvfrey.outlist_cptr_phy >> 16) >> 16); + + hba->u.mvfrey.inlist_wptr = (hba->u.mvfrey.list_count - 1) + | CL_POINTER_TOGGLE; + *hba->u.mvfrey.outlist_cptr = (hba->u.mvfrey.list_count - 1) + | CL_POINTER_TOGGLE; + hba->u.mvfrey.outlist_rptr = hba->u.mvfrey.list_count - 1; + + return 0; +} + /* * CAM driver interface */ @@ -1230,9 +1791,10 @@ static device_method_t driver_methods[] }; static struct hptiop_adapter_ops hptiop_itl_ops = { + .family = INTEL_BASED_IOP, .iop_wait_ready = hptiop_wait_ready_itl, .internal_memalloc = 0, - .internal_memfree = 0, + .internal_memfree = hptiop_internal_memfree_itl, .alloc_pci_res = hptiop_alloc_pci_res_itl, .release_pci_res = hptiop_release_pci_res_itl, .enable_intr = hptiop_enable_intr_itl, @@ -1243,9 +1805,11 @@ static struct hptiop_adapter_ops hptiop_ .post_msg = hptiop_post_msg_itl, .post_req = hptiop_post_req_itl, .do_ioctl = hptiop_do_ioctl_itl, + .reset_comm = 0, }; static struct hptiop_adapter_ops hptiop_mv_ops = { + .family = MV_BASED_IOP, .iop_wait_ready = hptiop_wait_ready_mv, .internal_memalloc = hptiop_internal_memalloc_mv, .internal_memfree = hptiop_internal_memfree_mv, @@ -1259,6 +1823,25 @@ static struct hptiop_adapter_ops hptiop_ .post_msg = hptiop_post_msg_mv, .post_req = hptiop_post_req_mv, .do_ioctl = hptiop_do_ioctl_mv, + .reset_comm = 0, +}; + +static struct hptiop_adapter_ops hptiop_mvfrey_ops = { + .family = MVFREY_BASED_IOP, + .iop_wait_ready = hptiop_wait_ready_mvfrey, + .internal_memalloc = hptiop_internal_memalloc_mvfrey, + .internal_memfree = hptiop_internal_memfree_mvfrey, + .alloc_pci_res = hptiop_alloc_pci_res_mvfrey, + .release_pci_res = hptiop_release_pci_res_mvfrey, + .enable_intr = hptiop_enable_intr_mvfrey, + .disable_intr = hptiop_disable_intr_mvfrey, + .get_config = hptiop_get_config_mvfrey, + .set_config = hptiop_set_config_mvfrey, + .iop_intr = hptiop_intr_mvfrey, + .post_msg = hptiop_post_msg_mvfrey, + .post_req = hptiop_post_req_mvfrey, + .do_ioctl = hptiop_do_ioctl_mvfrey, + .reset_comm = hptiop_reset_comm_mvfrey, }; static driver_t hptiop_pci_driver = { @@ -1284,6 +1867,11 @@ static int hptiop_probe(device_t dev) id = pci_get_device(dev); switch (id) { + case 0x4520: + case 0x4522: + sas = 1; + ops = &hptiop_mvfrey_ops; + break; case 0x4210: case 0x4211: case 0x4310: @@ -1385,7 +1973,7 @@ static int hptiop_attach(device_t dev) goto release_pci_res; } - if (hba->ops->internal_memalloc) { + if (hba->ops->family == MV_BASED_IOP) { if (hba->ops->internal_memalloc(hba)) { device_printf(dev, "alloc srb_dmat failed\n"); goto destroy_parent_tag; @@ -1404,6 +1992,17 @@ static int hptiop_attach(device_t dev) hba->max_request_size = iop_config.request_size; hba->max_sg_count = iop_config.max_sg_count; + if (hba->ops->family == MVFREY_BASED_IOP) { + if (hba->ops->internal_memalloc(hba)) { + device_printf(dev, "alloc srb_dmat failed\n"); + goto destroy_parent_tag; + } + if (hba->ops->reset_comm(hba)) { + device_printf(dev, "reset comm failed\n"); + goto get_config_failed; + } + } + if (bus_dma_tag_create(hba->parent_dmat,/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ @@ -1542,6 +2141,7 @@ static int hptiop_attach(device_t dev) } hba->ops->enable_intr(hba); + hba->initialized = 1; hba->ioctl_dev = make_dev(&hptiop_cdevsw, unit, UID_ROOT, GID_WHEEL /*GID_OPERATOR*/, @@ -1587,8 +2187,7 @@ destroy_io_dmat: bus_dma_tag_destroy(hba->io_dmat); get_config_failed: - if (hba->ops->internal_memfree) - hba->ops->internal_memfree(hba); + hba->ops->internal_memfree(hba); destroy_parent_tag: if (hba->parent_dmat) @@ -1682,6 +2281,18 @@ static void hptiop_enable_intr_mv(struct BUS_SPACE_WRT4_MV0(outbound_intmask,int_mask); } +static void hptiop_enable_intr_mvfrey(struct hpt_iop_hba *hba) +{ + BUS_SPACE_WRT4_MVFREY2(f0_doorbell_enable, CPU_TO_F0_DRBL_MSG_A_BIT); + BUS_SPACE_RD4_MVFREY2(f0_doorbell_enable); + + BUS_SPACE_WRT4_MVFREY2(isr_enable, 0x1); + BUS_SPACE_RD4_MVFREY2(isr_enable); + + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0x1010); + BUS_SPACE_RD4_MVFREY2(pcie_f0_int_enable); +} + static void hptiop_disable_intr_itl(struct hpt_iop_hba *hba) { u_int32_t int_mask; @@ -1704,9 +2315,24 @@ static void hptiop_disable_intr_mv(struc BUS_SPACE_RD4_MV0(outbound_intmask); } -static int hptiop_reset_adapter(struct hpt_iop_hba * hba) +static void hptiop_disable_intr_mvfrey(struct hpt_iop_hba *hba) +{ + BUS_SPACE_WRT4_MVFREY2(f0_doorbell_enable, 0); + BUS_SPACE_RD4_MVFREY2(f0_doorbell_enable); + + BUS_SPACE_WRT4_MVFREY2(isr_enable, 0); + BUS_SPACE_RD4_MVFREY2(isr_enable); + + BUS_SPACE_WRT4_MVFREY2(pcie_f0_int_enable, 0); + BUS_SPACE_RD4_MVFREY2(pcie_f0_int_enable); +} + +static void hptiop_reset_adapter(void *argv) { - return hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000); + struct hpt_iop_hba * hba = (struct hpt_iop_hba *)argv; + if (hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_RESET, 60000)) + return; + hptiop_send_sync_msg(hba, IOPMU_INBOUND_MSG0_START_BACKGROUND_TASK, 5000); } static void *hptiop_get_srb(struct hpt_iop_hba * hba) @@ -1910,7 +2536,8 @@ static void hptiop_post_req_itl(struct h bcopy(cdb, req.cdb, ccb->csio.cdb_len); - req.header.size = offsetof(struct hpt_iop_request_scsi_command, sg_list) + req.header.size = + offsetof(struct hpt_iop_request_scsi_command, sg_list) + nsegs*sizeof(struct hpt_iopsg); req.header.type = IOP_REQUEST_TYPE_SCSI_COMMAND; req.header.flags = 0; @@ -1956,7 +2583,8 @@ static void hptiop_post_req_itl(struct h req->channel = 0; req->target = ccb->ccb_h.target_id; req->lun = ccb->ccb_h.target_lun; - req->header.size = offsetof(struct hpt_iop_request_scsi_command, sg_list) + req->header.size = + offsetof(struct hpt_iop_request_scsi_command, sg_list) + nsegs*sizeof(struct hpt_iopsg); req->header.context = (u_int64_t)srb->index | IOPMU_QUEUE_ADDR_HOST_BIT; @@ -2044,6 +2672,78 @@ static void hptiop_post_req_mv(struct hp | (size > 3 ? 3 : size), hba); } +static void hptiop_post_req_mvfrey(struct hpt_iop_hba *hba, + struct hpt_iop_srb *srb, + bus_dma_segment_t *segs, int nsegs) +{ + int idx, index; + union ccb *ccb = srb->ccb; + u_int8_t *cdb; + struct hpt_iop_request_scsi_command *req; + u_int64_t req_phy; + + req = (struct hpt_iop_request_scsi_command *)srb; + req_phy = srb->phy_addr; + + if (ccb->csio.dxfer_len && nsegs > 0) { + struct hpt_iopsg *psg = req->sg_list; + for (idx = 0; idx < nsegs; idx++, psg++) { + psg->pci_address = (u_int64_t)segs[idx].ds_addr | 1; + psg->size = segs[idx].ds_len; + psg->eot = 0; + } + psg[-1].eot = 1; + } + if (ccb->ccb_h.flags & CAM_CDB_POINTER) + cdb = ccb->csio.cdb_io.cdb_ptr; + else + cdb = ccb->csio.cdb_io.cdb_bytes; + + bcopy(cdb, req->cdb, ccb->csio.cdb_len); + req->header.type = IOP_REQUEST_TYPE_SCSI_COMMAND; + req->header.result = IOP_RESULT_PENDING; + req->dataxfer_length = ccb->csio.dxfer_len; + req->channel = 0; + req->target = ccb->ccb_h.target_id; + req->lun = ccb->ccb_h.target_lun; + req->header.size = sizeof(struct hpt_iop_request_scsi_command) + - sizeof(struct hpt_iopsg) + + nsegs * sizeof(struct hpt_iopsg); + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { + bus_dmamap_sync(hba->io_dmat, + srb->dma_map, BUS_DMASYNC_PREREAD); + } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 12:28:05 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4AC1A3F0; Sun, 28 Oct 2012 12:28:05 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DB7F8FC08; Sun, 28 Oct 2012 12:28:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SCS5Jp005863; Sun, 28 Oct 2012 12:28:05 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SCS4n9005861; Sun, 28 Oct 2012 12:28:04 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210281228.q9SCS4n9005861@svn.freebsd.org> From: Rick Macklem Date: Sun, 28 Oct 2012 12:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242221 - stable/8/sys/rpc/rpcsec_gss X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 12:28:05 -0000 Author: rmacklem Date: Sun Oct 28 12:28:04 2012 New Revision: 242221 URL: http://svn.freebsd.org/changeset/base/242221 Log: MFC: r242090 Modify the comment to take out the names and URL. Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/rpc/ (props changed) Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Sun Oct 28 12:23:57 2012 (r242220) +++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Sun Oct 28 12:28:04 2012 (r242221) @@ -1025,12 +1025,9 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); /* - * Attila Bogar and Herbert Poeckl reported similar problems - * w.r.t. a Linux NFS client doing a krb5 NFS mount against the - * FreeBSD server. We determined this was a Linux bug: - * http://www.spinics.net/lists/linux-nfs/msg32466.html, where - * the mount failed to work because a Destroy operation with a - * bogus encrypted checksum destroyed the authenticator handle. + * A bug in some versions of the Linux client generates a + * Destroy operation with a bogus encrypted checksum. Deleting + * the credential handle for that case causes the mount to fail. * Since the checksum is bogus (gss_verify_mic() failed), it * doesn't make sense to destroy the handle and not doing so * fixes the Linux mount. From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:37:48 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D772FB1; Sun, 28 Oct 2012 15:37:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64C248FC17; Sun, 28 Oct 2012 15:37:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFbmPP039711; Sun, 28 Oct 2012 15:37:48 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFbmkA039708; Sun, 28 Oct 2012 15:37:48 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281537.q9SFbmkA039708@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242225 - stable/8/sys/boot/i386/zfsboot X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:37:48 -0000 Author: avg Date: Sun Oct 28 15:37:47 2012 New Revision: 242225 URL: http://svn.freebsd.org/changeset/base/242225 Log: MFC r241288: zfsboot: use the same zfs dataset naming format as loader Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/8/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 15:37:32 2012 (r242224) +++ stable/8/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 15:37:47 2012 (r242225) @@ -548,7 +548,7 @@ main(void) if (parse()) autoboot = 0; if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmddup); + printf("%s: %s\n", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } @@ -572,13 +572,17 @@ main(void) if (!autoboot || !OPT_CHECK(RBX_QUIET)) { printf("\nFreeBSD/x86 boot\n"); if (zfs_rlookup(spa, zfsmount.rootobj, rootname) != 0) - printf("Default: %s:<0x%llx>:%s\n" + printf("Default: %s/<0x%llx>:%s\n" "boot: ", spa->spa_name, zfsmount.rootobj, kname); - else - printf("Default: %s:%s:%s\n" + else if (rootname[0] != '\0') + printf("Default: %s/%s:%s\n" "boot: ", spa->spa_name, rootname, kname); + else + printf("Default: %s:%s\n" + "boot: ", + spa->spa_name, kname); } if (ioctrl & IO_SERIAL) sio_flush(); @@ -703,12 +707,46 @@ load(void) } static int +zfs_mount_ds(char *dsname) +{ + uint64_t newroot; + spa_t *newspa; + char *q; + + q = strchr(dsname, '/'); + if (q) + *q++ = '\0'; + newspa = spa_find_by_name(dsname); + if (newspa == NULL) { + printf("\nCan't find ZFS pool %s\n", dsname); + return -1; + } + + if (zfs_spa_init(newspa)) + return -1; + + newroot = 0; + if (q) { + if (zfs_lookup_dataset(newspa, q, &newroot)) { + printf("\nCan't find dataset %s in ZFS pool %s\n", + q, newspa->spa_name); + return -1; + } + } + if (zfs_mount(newspa, newroot, &zfsmount)) { + printf("\nCan't mount ZFS dataset\n"); + return -1; + } + spa = newspa; + return (0); +} + +static int parse(void) { char *arg = cmd; char *ep, *p, *q; const char *cp; - //unsigned int drv; int c, i, j; while ((c = *arg++)) { @@ -768,37 +806,20 @@ parse(void) } /* + * If there is "zfs:" prefix simply ignore it. + */ + if (strncmp(arg, "zfs:", 4) == 0) + arg += 4; + + /* * If there is a colon, switch pools. */ - q = (char *) strchr(arg, ':'); + q = strchr(arg, ':'); if (q) { - spa_t *newspa; - uint64_t newroot; - - *q++ = 0; - newspa = spa_find_by_name(arg); - if (newspa) { - arg = q; - spa = newspa; - newroot = 0; - q = (char *) strchr(arg, ':'); - if (q) { - *q++ = 0; - if (zfs_lookup_dataset(spa, arg, &newroot)) { - printf("\nCan't find dataset %s in ZFS pool %s\n", - arg, spa->spa_name); - return -1; - } - arg = q; - } - if (zfs_mount(spa, newroot, &zfsmount)) { - printf("\nCan't mount ZFS dataset\n"); - return -1; - } - } else { - printf("\nCan't find ZFS pool %s\n", arg); + *q++ = '\0'; + if (zfs_mount_ds(arg) != 0) return -1; - } + arg = q; } if ((i = ep - arg)) { if ((size_t)i >= sizeof(kname)) From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:43:14 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F26C428; Sun, 28 Oct 2012 15:43:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 066CC8FC12; Sun, 28 Oct 2012 15:43:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFhDdg040870; Sun, 28 Oct 2012 15:43:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFhDnn040867; Sun, 28 Oct 2012 15:43:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281543.q9SFhDnn040867@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:43:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242227 - stable/8/sys/geom/part X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:43:14 -0000 Author: avg Date: Sun Oct 28 15:43:13 2012 New Revision: 242227 URL: http://svn.freebsd.org/changeset/base/242227 Log: MFC r241296: g_part_taste: directly destroy consumer and geom here, no need for withering Modified: stable/8/sys/geom/part/g_part.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/part/g_part.c ============================================================================== --- stable/8/sys/geom/part/g_part.c Sun Oct 28 15:41:14 2012 (r242226) +++ stable/8/sys/geom/part/g_part.c Sun Oct 28 15:43:13 2012 (r242227) @@ -1809,7 +1809,10 @@ g_part_taste(struct g_class *mp, struct if (error == 0) error = g_access(cp, 1, 0, 0); if (error != 0) { - g_part_wither(gp, error); + if (cp->provider) + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } @@ -1869,7 +1872,9 @@ g_part_taste(struct g_class *mp, struct g_topology_lock(); root_mount_rel(rht); g_access(cp, -1, 0, 0); - g_part_wither(gp, error); + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:45:15 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2610594; Sun, 28 Oct 2012 15:45:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A4638FC12; Sun, 28 Oct 2012 15:45:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFjFf7041349; Sun, 28 Oct 2012 15:45:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFjFrY041344; Sun, 28 Oct 2012 15:45:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281545.q9SFjFrY041344@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:45:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242228 - stable/8/sys/boot/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:45:15 -0000 Author: avg Date: Sun Oct 28 15:45:15 2012 New Revision: 242228 URL: http://svn.freebsd.org/changeset/base/242228 Log: MFC r241283: zfs boot: add code for listing child datasets of a given dataset Modified: stable/8/sys/boot/zfs/libzfs.h stable/8/sys/boot/zfs/zfs.c stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/libzfs.h ============================================================================== --- stable/8/sys/boot/zfs/libzfs.h Sun Oct 28 15:43:13 2012 (r242227) +++ stable/8/sys/boot/zfs/libzfs.h Sun Oct 28 15:45:15 2012 (r242228) @@ -59,6 +59,7 @@ int zfs_parsedev(struct zfs_devdesc *dev const char **path); char *zfs_fmtdev(void *vdev); int zfs_probe_dev(const char *devname, uint64_t *pool_guid); +int zfs_list(const char *name); extern struct devsw zfs_dev; extern struct fs_ops zfs_fsops; Modified: stable/8/sys/boot/zfs/zfs.c ============================================================================== --- stable/8/sys/boot/zfs/zfs.c Sun Oct 28 15:43:13 2012 (r242227) +++ stable/8/sys/boot/zfs/zfs.c Sun Oct 28 15:45:15 2012 (r242228) @@ -574,3 +574,38 @@ zfs_fmtdev(void *vdev) rootname); return (buf); } + +int +zfs_list(const char *name) +{ + static char poolname[ZFS_MAXNAMELEN]; + uint64_t objid; + spa_t *spa; + const char *dsname; + int len; + int rv; + + len = strlen(name); + dsname = strchr(name, '/'); + if (dsname != NULL) { + len = dsname - name; + dsname++; + } + memcpy(poolname, name, len); + poolname[len] = '\0'; + + spa = spa_find_by_name(poolname); + if (!spa) + return (ENXIO); + rv = zfs_spa_init(spa); + if (rv != 0) + return (rv); + if (dsname != NULL) + rv = zfs_lookup_dataset(spa, dsname, &objid); + else + rv = zfs_get_root(spa, &objid); + if (rv != 0) + return (rv); + rv = zfs_list_dataset(spa, objid); + return (0); +} Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:43:13 2012 (r242227) +++ stable/8/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:45:15 2012 (r242228) @@ -1332,8 +1332,6 @@ zap_lookup(const spa_t *spa, const dnode return (EIO); } -#ifdef BOOT2 - /* * List a microzap directory. Assumes that the zap scratch buffer contains * the directory contents. @@ -1458,8 +1456,6 @@ zap_list(const spa_t *spa, const dnode_p return fzap_list(spa, dnode); } -#endif - static int objset_get_dnode(const spa_t *spa, const objset_phys_t *os, uint64_t objnum, dnode_phys_t *dnode) { @@ -1696,6 +1692,38 @@ zfs_lookup_dataset(const spa_t *spa, con return (0); } +#ifndef BOOT2 +static int +zfs_list_dataset(const spa_t *spa, uint64_t objnum/*, int pos, char *entry*/) +{ + uint64_t dir_obj, child_dir_zapobj; + dnode_phys_t child_dir_zap, dir, dataset; + dsl_dataset_phys_t *ds; + dsl_dir_phys_t *dd; + + if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); + return (EIO); + } + ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; + dir_obj = ds->ds_dir_obj; + + if (objset_get_dnode(spa, &spa->spa_mos, dir_obj, &dir)) { + printf("ZFS: can't find dirobj %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + dd = (dsl_dir_phys_t *)&dir.dn_bonus; + + child_dir_zapobj = dd->dd_child_dir_zapobj; + if (objset_get_dnode(spa, &spa->spa_mos, child_dir_zapobj, &child_dir_zap) != 0) { + printf("ZFS: can't find child zap %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + + return (zap_list(spa, &child_dir_zap) != 0); +} +#endif + /* * Find the object set given the object number of its dataset object * and return its details in *objset From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:48:15 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C97F5A78; Sun, 28 Oct 2012 15:48:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A74348FC18; Sun, 28 Oct 2012 15:48:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFmFuO042088; Sun, 28 Oct 2012 15:48:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFmFJT042085; Sun, 28 Oct 2012 15:48:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281548.q9SFmFJT042085@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:48:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242231 - stable/8/sys/boot/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:48:16 -0000 Author: avg Date: Sun Oct 28 15:48:15 2012 New Revision: 242231 URL: http://svn.freebsd.org/changeset/base/242231 Log: MFC r241289: boot/zfs: call zfs_spa_init for all found pools Modified: stable/8/sys/boot/zfs/zfs.c stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/zfs.c ============================================================================== --- stable/8/sys/boot/zfs/zfs.c Sun Oct 28 15:47:56 2012 (r242230) +++ stable/8/sys/boot/zfs/zfs.c Sun Oct 28 15:48:15 2012 (r242231) @@ -369,10 +369,28 @@ vdev_read(vdev_t *vdev, void *priv, off_ static int zfs_dev_init(void) { + spa_t *spa; + spa_t *next; + spa_t *prev; + zfs_init(); if (archsw.arch_zfs_probe == NULL) return (ENXIO); archsw.arch_zfs_probe(); + + prev = NULL; + spa = STAILQ_FIRST(&zfs_pools); + while (spa != NULL) { + next = STAILQ_NEXT(spa, spa_link); + if (zfs_spa_init(spa)) { + if (prev == NULL) + STAILQ_REMOVE_HEAD(&zfs_pools, spa_link); + else + STAILQ_REMOVE_AFTER(&zfs_pools, prev, spa_link); + } else + prev = spa; + spa = next; + } return (0); } @@ -435,9 +453,6 @@ zfs_dev_open(struct open_file *f, ...) spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); mount = malloc(sizeof(*mount)); rv = zfs_mount(spa, dev->root_guid, mount); if (rv != 0) { @@ -517,9 +532,6 @@ zfs_parsedev(struct zfs_devdesc *dev, co spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); dev->pool_guid = spa->spa_guid; if (rootname[0] != '\0') { rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); @@ -554,10 +566,6 @@ zfs_fmtdev(void *vdev) printf("ZFS: can't find pool by guid\n"); return (buf); } - if (zfs_spa_init(spa) != 0) { - printf("ZFS: can't init pool\n"); - return (buf); - } if (dev->root_guid == 0 && zfs_get_root(spa, &dev->root_guid)) { printf("ZFS: can't find root filesystem\n"); return (buf); @@ -597,9 +605,6 @@ zfs_list(const char *name) spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); if (dsname != NULL) rv = zfs_lookup_dataset(spa, dsname, &objid); else Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:47:56 2012 (r242230) +++ stable/8/sys/boot/zfs/zfsimpl.c Sun Oct 28 15:48:15 2012 (r242231) @@ -1826,13 +1826,14 @@ static int zfs_spa_init(spa_t *spa) { - if (spa->spa_inited) - return (0); if (zio_read(spa, &spa->spa_uberblock.ub_rootbp, &spa->spa_mos)) { printf("ZFS: can't read MOS of pool %s\n", spa->spa_name); return (EIO); } - spa->spa_inited = 1; + if (spa->spa_mos.os_type != DMU_OST_META) { + printf("ZFS: corrupted MOS of pool %s\n", spa->spa_name); + return (EIO); + } return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:51:15 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7219D45; Sun, 28 Oct 2012 15:51:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF71C8FC0A; Sun, 28 Oct 2012 15:51:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFpFsl042801; Sun, 28 Oct 2012 15:51:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFpFWT042799; Sun, 28 Oct 2012 15:51:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281551.q9SFpFWT042799@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242233 - stable/8/sys/boot/i386/loader X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:51:15 -0000 Author: avg Date: Sun Oct 28 15:51:15 2012 New Revision: 242233 URL: http://svn.freebsd.org/changeset/base/242233 Log: MFC r241284: zfs boot: add lszfs command to i386 loader Modified: stable/8/sys/boot/i386/loader/main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/i386/loader/main.c ============================================================================== --- stable/8/sys/boot/i386/loader/main.c Sun Oct 28 15:51:00 2012 (r242232) +++ stable/8/sys/boot/i386/loader/main.c Sun Oct 28 15:51:15 2012 (r242233) @@ -322,6 +322,29 @@ command_heap(int argc, char *argv[]) return(CMD_OK); } +#ifdef LOADER_ZFS_SUPPORT +COMMAND_SET(lszfs, "lszfs", "list child datasets of a zfs dataset", + command_lszfs); + +static int +command_lszfs(int argc, char *argv[]) +{ + int err; + + if (argc != 2) { + command_errmsg = "wrong number of arguments"; + return (CMD_ERROR); + } + + err = zfs_list(argv[1]); + if (err != 0) { + command_errmsg = strerror(err); + return (CMD_ERROR); + } + return (CMD_OK); +} +#endif + /* ISA bus access functions for PnP. */ static int isa_inb(int port) From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:54:15 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9D1A7A; Sun, 28 Oct 2012 15:54:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC5B98FC0C; Sun, 28 Oct 2012 15:54:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFsFOb043415; Sun, 28 Oct 2012 15:54:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFsF8K043413; Sun, 28 Oct 2012 15:54:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281554.q9SFsF8K043413@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242235 - stable/8/sys/boot/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:54:15 -0000 Author: avg Date: Sun Oct 28 15:54:15 2012 New Revision: 242235 URL: http://svn.freebsd.org/changeset/base/242235 Log: MFC r241292: zfs loader: treat plain pool name as a name of its root dataset Modified: stable/8/sys/boot/zfs/zfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/zfs.c ============================================================================== --- stable/8/sys/boot/zfs/zfs.c Sun Oct 28 15:54:01 2012 (r242234) +++ stable/8/sys/boot/zfs/zfs.c Sun Oct 28 15:54:15 2012 (r242235) @@ -533,12 +533,9 @@ zfs_parsedev(struct zfs_devdesc *dev, co if (!spa) return (ENXIO); dev->pool_guid = spa->spa_guid; - if (rootname[0] != '\0') { - rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); - if (rv != 0) - return (rv); - } else - dev->root_guid = 0; + rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); + if (rv != 0) + return (rv); if (path != NULL) *path = (*end == '\0') ? end : end + 1; dev->d_dev = &zfs_dev; @@ -558,9 +555,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - if (dev->pool_guid == 0) + if (dev->pool_guid == 0) { spa = STAILQ_FIRST(&zfs_pools); - else + dev->pool_guid = spa->spa_guid; + } else spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); @@ -598,19 +596,17 @@ zfs_list(const char *name) if (dsname != NULL) { len = dsname - name; dsname++; - } + } else + dsname = ""; memcpy(poolname, name, len); poolname[len] = '\0'; spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - if (dsname != NULL) - rv = zfs_lookup_dataset(spa, dsname, &objid); - else - rv = zfs_get_root(spa, &objid); + rv = zfs_lookup_dataset(spa, dsname, &objid); if (rv != 0) return (rv); rv = zfs_list_dataset(spa, objid); - return (0); + return (rv); } From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:56:54 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94B9235F; Sun, 28 Oct 2012 15:56:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BBA08FC08; Sun, 28 Oct 2012 15:56:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFus31043949; Sun, 28 Oct 2012 15:56:54 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFusD2043947; Sun, 28 Oct 2012 15:56:54 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281556.q9SFusD2043947@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242237 - stable/8/sys/dev/acpi_support X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:56:54 -0000 Author: avg Date: Sun Oct 28 15:56:53 2012 New Revision: 242237 URL: http://svn.freebsd.org/changeset/base/242237 Log: MFC r241537: acpi_wmi: move wmi_info_list into sc Modified: stable/8/sys/dev/acpi_support/acpi_wmi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/acpi_support/ (props changed) Modified: stable/8/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- stable/8/sys/dev/acpi_support/acpi_wmi.c Sun Oct 28 15:56:36 2012 (r242236) +++ stable/8/sys/dev/acpi_support/acpi_wmi.c Sun Oct 28 15:56:53 2012 (r242237) @@ -74,6 +74,7 @@ struct acpi_wmi_softc { struct sbuf wmistat_sbuf; /* sbuf for /dev/wmistat output */ pid_t wmistat_open_pid; /* pid operating on /dev/wmistat */ int wmistat_bufptr; /* /dev/wmistat ptr to buffer position */ + TAILQ_HEAD(wmi_info_list_head, wmi_info) wmi_info_list; }; /* @@ -105,8 +106,6 @@ struct wmi_info { void *event_handler_user_data; /* ev handler cookie */ }; -TAILQ_HEAD(wmi_info_list_head, wmi_info) - wmi_info_list = TAILQ_HEAD_INITIALIZER(wmi_info_list); ACPI_SERIAL_DECL(acpi_wmi, "ACPI-WMI Mapping"); @@ -144,13 +143,13 @@ static ACPI_STATUS acpi_wmi_ec_handler(U UINT64 *value, void *context, void *region_context); /* helpers */ -static ACPI_STATUS acpi_wmi_read_wdg_blocks(ACPI_HANDLE h); +static ACPI_STATUS acpi_wmi_read_wdg_blocks(struct acpi_wmi_softc *sc, ACPI_HANDLE h); static ACPI_STATUS acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, enum event_generation_state state); static int acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid); -static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string( +static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string(struct acpi_wmi_softc *sc, const char *guid_string); static d_open_t acpi_wmi_wmistat_open; @@ -238,7 +237,7 @@ acpi_wmi_attach(device_t dev) ACPI_SERIAL_BEGIN(acpi_wmi); sc->wmi_dev = dev; sc->wmi_handle = acpi_get_handle(dev); - TAILQ_INIT(&wmi_info_list); + TAILQ_INIT(&sc->wmi_info_list); /* XXX Only works with one EC, but nearly all systems only have one. */ if ((sc->ec_dev = devclass_get_device(devclass_find("acpi_ec"), 0)) == NULL) @@ -254,7 +253,7 @@ acpi_wmi_attach(device_t dev) AcpiFormatException(status)); AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); - } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks( + } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks(sc, sc->wmi_handle)))) { device_printf(sc->wmi_dev, "couldn't parse _WDG - %s\n", AcpiFormatException(status)); @@ -305,11 +304,11 @@ acpi_wmi_detach(device_t dev) acpi_wmi_notify_handler); AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); - TAILQ_FOREACH_SAFE(winfo, &wmi_info_list, wmi_list, tmp) { + TAILQ_FOREACH_SAFE(winfo, &sc->wmi_info_list, wmi_list, tmp) { if (winfo->event_handler) acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); - TAILQ_REMOVE(&wmi_info_list, winfo, wmi_list); + TAILQ_REMOVE(&sc->wmi_info_list, winfo, wmi_list); free(winfo, M_ACPIWMI); } if (sc->wmistat_bufptr != -1) { @@ -334,12 +333,14 @@ acpi_wmi_detach(device_t dev) static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) { + struct acpi_wmi_softc *sc; struct wmi_info *winfo; int ret; + sc = device_get_softc(dev); ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_BEGIN(acpi_wmi); - winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string); + winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string); ret = (winfo == NULL)?0:winfo->ginfo.max_instance+1; ACPI_SERIAL_END(acpi_wmi); @@ -365,7 +366,7 @@ acpi_wmi_evaluate_call_method(device_t d sc = device_get_softc(dev); ACPI_SERIAL_BEGIN(acpi_wmi); - if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_NOT_FOUND; else if (!(winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) @@ -407,6 +408,7 @@ static ACPI_STATUS acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, ACPI_NOTIFY_HANDLER event_handler, void *data) { + struct acpi_wmi_softc *sc = device_get_softc(dev); struct wmi_info *winfo; ACPI_STATUS status; @@ -416,7 +418,7 @@ acpi_wmi_install_event_handler_method(de ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || event_handler == NULL) status = AE_BAD_PARAMETER; - else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_NOT_EXIST; else if (winfo->event_handler != NULL || @@ -438,6 +440,7 @@ acpi_wmi_install_event_handler_method(de static ACPI_STATUS acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string) { + struct acpi_wmi_softc *sc = device_get_softc(dev); struct wmi_info *winfo; ACPI_STATUS status; @@ -446,7 +449,7 @@ acpi_wmi_remove_event_handler_method(dev status = AE_OK; ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string && - (winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + (winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) != NULL && winfo->event_handler) { status = acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); @@ -481,7 +484,7 @@ acpi_wmi_get_event_data_method(device_t params[0].Integer.Value = event_id; input.Pointer = params; input.Count = 1; - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && ((UINT8) winfo->ginfo.oid[0] == event_id)) { status = AcpiEvaluateObject(sc->wmi_handle, "_WED", @@ -525,7 +528,7 @@ acpi_wmi_get_block_method(device_t dev, ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || out == NULL) status = AE_BAD_PARAMETER; - else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_ERROR; else if (instance > winfo->ginfo.max_instance) @@ -589,7 +592,7 @@ acpi_wmi_set_block_method(device_t dev, ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || in == NULL) status = AE_BAD_DATA; - else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(sc, guid_string)) == NULL) status = AE_ERROR; else if (instance > winfo->ginfo.max_instance) @@ -623,6 +626,7 @@ acpi_wmi_set_block_method(device_t dev, static void acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { + struct acpi_wmi_softc *sc = context; ACPI_NOTIFY_HANDLER handler; void *handler_data; struct wmi_info *winfo; @@ -632,7 +636,7 @@ acpi_wmi_notify_handler(ACPI_HANDLE h, U handler = NULL; handler_data = NULL; ACPI_SERIAL_BEGIN(acpi_wmi); - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && ((UINT8) winfo->ginfo.oid[0] == notify)) { if (winfo->event_handler) { @@ -705,7 +709,7 @@ acpi_wmi_ec_handler(UINT32 function, ACP * into wmi_info_list. */ static ACPI_STATUS -acpi_wmi_read_wdg_blocks(ACPI_HANDLE h) +acpi_wmi_read_wdg_blocks(struct acpi_wmi_softc *sc, ACPI_HANDLE h) { ACPI_BUFFER out = {ACPI_ALLOCATE_BUFFER, NULL}; struct guid_info *ginfo; @@ -736,7 +740,7 @@ acpi_wmi_read_wdg_blocks(ACPI_HANDLE h) return (AE_NO_MEMORY); } winfo->ginfo = ginfo[i]; - TAILQ_INSERT_TAIL(&wmi_info_list, winfo, wmi_list); + TAILQ_INSERT_TAIL(&sc->wmi_info_list, winfo, wmi_list); } AcpiOsFree(out.Pointer); free(ginfo, M_ACPIWMI); @@ -846,7 +850,7 @@ acpi_wmi_guid_string_to_guid(const UINT8 * Return NULL if the GUID is unknown in the _WDG */ static struct wmi_info* -acpi_wmi_lookup_wmi_info_by_guid_string(const char *guid_string) +acpi_wmi_lookup_wmi_info_by_guid_string(struct acpi_wmi_softc *sc, const char *guid_string) { char guid[16]; struct wmi_info *winfo; @@ -856,7 +860,7 @@ acpi_wmi_lookup_wmi_info_by_guid_string( ACPI_SERIAL_ASSERT(acpi_wmi); if (!acpi_wmi_guid_string_to_guid(guid_string, guid)) { - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { if (!memcmp(winfo->ginfo.guid, guid, 16)) { return (winfo); } @@ -955,7 +959,7 @@ acpi_wmi_wmistat_read(struct cdev *dev, sbuf_printf(&sc->wmistat_sbuf, "GUID " " INST EXPE METH STR " "EVENT OID\n"); - TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + TAILQ_FOREACH(winfo, &sc->wmi_info_list, wmi_list) { guid = (UINT8*)winfo->ginfo.guid; sbuf_printf(&sc->wmistat_sbuf, "{%02X%02X%02X%02X-%02X%02X-" From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 15:59:30 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8BCC66D; Sun, 28 Oct 2012 15:59:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90B9D8FC14; Sun, 28 Oct 2012 15:59:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SFxUEP044497; Sun, 28 Oct 2012 15:59:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SFxUid044495; Sun, 28 Oct 2012 15:59:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281559.q9SFxUid044495@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 15:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242239 - stable/8/sbin/devd X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 15:59:30 -0000 Author: avg Date: Sun Oct 28 15:59:30 2012 New Revision: 242239 URL: http://svn.freebsd.org/changeset/base/242239 Log: MFC r241772: document acpi_cpu devd notification about _CST change Modified: stable/8/sbin/devd/devd.conf.5 Directory Properties: stable/8/sbin/devd/ (props changed) Modified: stable/8/sbin/devd/devd.conf.5 ============================================================================== --- stable/8/sbin/devd/devd.conf.5 Sun Oct 28 15:59:17 2012 (r242238) +++ stable/8/sbin/devd/devd.conf.5 Sun Oct 28 15:59:30 2012 (r242239) @@ -320,6 +320,8 @@ Button state ($notify=0x00 is power, 0x0 Battery events. .It Li Lid Lid state ($notify=0x00 is closed, 0x01 is open). +.It Li PROCESSOR +Processor state/configuration ($notify=0x81 is a change in available Cx states). .It Li Thermal Thermal zone events. .El From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 16:10:19 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 43283CB0; Sun, 28 Oct 2012 16:10:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AC218FC14; Sun, 28 Oct 2012 16:10:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SGAJNk046859; Sun, 28 Oct 2012 16:10:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SGAIU5046853; Sun, 28 Oct 2012 16:10:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281610.q9SGAIU5046853@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 16:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242242 - in stable/8/sys/boot: i386/loader i386/zfsboot zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 16:10:19 -0000 Author: avg Date: Sun Oct 28 16:10:18 2012 New Revision: 242242 URL: http://svn.freebsd.org/changeset/base/242242 Log: MFC r241293: zfs boot: export boot/primary pool and vdev guid all the way to kenv Modified: stable/8/sys/boot/i386/loader/main.c stable/8/sys/boot/i386/zfsboot/zfsboot.c stable/8/sys/boot/zfs/libzfs.h stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/i386/loader/main.c ============================================================================== --- stable/8/sys/boot/i386/loader/main.c Sun Oct 28 16:10:03 2012 (r242241) +++ stable/8/sys/boot/i386/loader/main.c Sun Oct 28 16:10:18 2012 (r242242) @@ -209,6 +209,7 @@ extract_currdev(void) { struct i386_devdesc new_currdev; #ifdef LOADER_ZFS_SUPPORT + char buf[20]; struct zfs_boot_args *zargs; #endif int biosdev = -1; @@ -239,10 +240,17 @@ extract_currdev(void) if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) zargs = (struct zfs_boot_args *)(kargs + 1); - if (zargs != NULL && zargs->size >= sizeof(*zargs)) { + if (zargs != NULL && + zargs->size >= offsetof(struct zfs_boot_args, primary_pool)) { /* sufficient data is provided */ new_currdev.d_kind.zfs.pool_guid = zargs->pool; new_currdev.d_kind.zfs.root_guid = zargs->root; + if (zargs->size >= sizeof(*zargs) && zargs->primary_vdev != 0) { + sprintf(buf, "%llu", zargs->primary_pool); + setenv("vfs.zfs.boot.primary_pool", buf, 1); + sprintf(buf, "%llu", zargs->primary_vdev); + setenv("vfs.zfs.boot.primary_vdev", buf, 1); + } } else { /* old style zfsboot block */ new_currdev.d_kind.zfs.pool_guid = kargs->zfspool; Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/8/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:10:03 2012 (r242241) +++ stable/8/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:10:18 2012 (r242242) @@ -176,6 +176,8 @@ zfs_read(spa_t *spa, const dnode_phys_t * Current ZFS pool */ static spa_t *spa; +static spa_t *primary_spa; +static vdev_t *primary_vdev; /* * A wrapper for dskread that doesn't have to worry about whether the @@ -521,7 +523,7 @@ main(void) * first pool we found, if any. */ if (!spa) { - spa = STAILQ_FIRST(&zfs_pools); + spa = spa_get_primary(); if (!spa) { printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); for (;;) @@ -529,6 +531,9 @@ main(void) } } + primary_spa = spa; + primary_vdev = spa_get_primary_vdev(spa); + if (zfs_spa_init(spa) != 0 || zfs_mount(spa, 0, &zfsmount) != 0) { printf("%s: failed to mount default pool %s\n", BOOTPROG, spa->spa_name); @@ -697,6 +702,11 @@ load(void) zfsargs.size = sizeof(zfsargs); zfsargs.pool = zfsmount.spa->spa_guid; zfsargs.root = zfsmount.rootobj; + zfsargs.primary_pool = primary_spa->spa_guid; + if (primary_vdev != NULL) + zfsargs.primary_vdev = primary_vdev->v_guid; + else + printf("failed to detect primary vdev\n"); __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), bootdev, KARGS_FLAGS_ZFS | KARGS_FLAGS_EXTARG, Modified: stable/8/sys/boot/zfs/libzfs.h ============================================================================== --- stable/8/sys/boot/zfs/libzfs.h Sun Oct 28 16:10:03 2012 (r242241) +++ stable/8/sys/boot/zfs/libzfs.h Sun Oct 28 16:10:18 2012 (r242242) @@ -53,6 +53,8 @@ struct zfs_boot_args uint32_t reserved; uint64_t pool; uint64_t root; + uint64_t primary_pool; + uint64_t primary_vdev; }; int zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sun Oct 28 16:10:03 2012 (r242241) +++ stable/8/sys/boot/zfs/zfsimpl.c Sun Oct 28 16:10:18 2012 (r242242) @@ -648,6 +648,34 @@ spa_find_by_name(const char *name) return (0); } +#ifdef BOOT2 +static spa_t * +spa_get_primary(void) +{ + + return (STAILQ_FIRST(&zfs_pools)); +} + +static vdev_t * +spa_get_primary_vdev(const spa_t *spa) +{ + vdev_t *vdev; + vdev_t *kid; + + if (spa == NULL) + spa = spa_get_primary(); + if (spa == NULL) + return (NULL); + vdev = STAILQ_FIRST(&spa->spa_vdevs); + if (vdev == NULL) + return (NULL); + for (kid = STAILQ_FIRST(&vdev->v_children); kid != NULL; + kid = STAILQ_FIRST(&vdev->v_children)) + vdev = kid; + return (vdev); +} +#endif + static spa_t * spa_create(uint64_t guid) { From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 16:12:13 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1E62AF7C; Sun, 28 Oct 2012 16:12:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F07D18FC08; Sun, 28 Oct 2012 16:12:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SGCCnO047336; Sun, 28 Oct 2012 16:12:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SGCC4w047334; Sun, 28 Oct 2012 16:12:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281612.q9SGCC4w047334@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 16:12:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242244 - stable/8/sys/boot/i386/zfsboot X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 16:12:13 -0000 Author: avg Date: Sun Oct 28 16:12:12 2012 New Revision: 242244 URL: http://svn.freebsd.org/changeset/base/242244 Log: MFC r241294: zfsboot: simplify probe_drive() a little bit Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/8/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:11:58 2012 (r242243) +++ stable/8/sys/boot/i386/zfsboot/zfsboot.c Sun Oct 28 16:12:12 2012 (r242244) @@ -345,7 +345,7 @@ copy_dsk(struct dsk *dsk) } static void -probe_drive(struct dsk *dsk, spa_t **spap) +probe_drive(struct dsk *dsk) { #ifdef GPT struct gpt_hdr hdr; @@ -359,9 +359,10 @@ probe_drive(struct dsk *dsk, spa_t **spa /* * If we find a vdev on the whole disk, stop here. Otherwise dig - * out the MBR and probe each slice in turn for a vdev. + * out the partition table and probe each slice/partition + * in turn for a vdev. */ - if (vdev_probe(vdev_read, dsk, spap) == 0) + if (vdev_probe(vdev_read, dsk, NULL) == 0) return; sec = dmadat->secbuf; @@ -399,13 +400,7 @@ probe_drive(struct dsk *dsk, spa_t **spa if (memcmp(&ent->ent_type, &freebsd_zfs_uuid, sizeof(uuid_t)) == 0) { dsk->start = ent->ent_lba_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try - * to boot from that one). - */ - spap = NULL; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk * structure now since the vdev now owns this one. @@ -428,13 +423,7 @@ trymbr: if (!dp[i].dp_typ) continue; dsk->start = dp[i].dp_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try to boot - * from that one. - */ - spap = 0; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk structure now * since the vdev now owns this one. @@ -493,7 +482,7 @@ main(void) * Probe the boot drive first - we will try to boot from whatever * pool we find on that drive. */ - probe_drive(dsk, &spa); + probe_drive(dsk); /* * Probe the rest of the drives that the bios knows about. This @@ -515,20 +504,17 @@ main(void) dsk->part = 0; dsk->start = 0; dsk->init = 0; - probe_drive(dsk, NULL); + probe_drive(dsk); } /* - * If we didn't find a pool on the boot drive, default to the - * first pool we found, if any. + * The first discovered pool, if any, is the pool. */ + spa = spa_get_primary(); if (!spa) { - spa = spa_get_primary(); - if (!spa) { - printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); - for (;;) - ; - } + printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); + for (;;) + ; } primary_spa = spa; From owner-svn-src-stable-8@FreeBSD.ORG Sun Oct 28 16:14:20 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E6242D9; Sun, 28 Oct 2012 16:14:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 768CD8FC08; Sun, 28 Oct 2012 16:14:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9SGEKLU047819; Sun, 28 Oct 2012 16:14:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9SGEK7X047817; Sun, 28 Oct 2012 16:14:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210281614.q9SGEK7X047817@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Oct 2012 16:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242246 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2012 16:14:20 -0000 Author: avg Date: Sun Oct 28 16:14:19 2012 New Revision: 242246 URL: http://svn.freebsd.org/changeset/base/242246 Log: MFC r241281: ktrace/kern_exec: check p_tracecred instead of p_cred Modified: stable/8/sys/kern/kern_exec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_exec.c ============================================================================== --- stable/8/sys/kern/kern_exec.c Sun Oct 28 16:14:07 2012 (r242245) +++ stable/8/sys/kern/kern_exec.c Sun Oct 28 16:14:19 2012 (r242246) @@ -655,7 +655,8 @@ interpret: setsugid(p); #ifdef KTRACE - if (priv_check_cred(oldcred, PRIV_DEBUG_DIFFCRED, 0)) + if (p->p_tracecred != NULL && + priv_check_cred(p->p_tracecred, PRIV_DEBUG_DIFFCRED, 0)) ktrprocexec(p, &tracecred, &tracevp); #endif /* From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 03:45:39 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 96A7AF03; Mon, 29 Oct 2012 03:45:39 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E4028FC12; Mon, 29 Oct 2012 03:45:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T3jdMh068805; Mon, 29 Oct 2012 03:45:39 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T3jdce068802; Mon, 29 Oct 2012 03:45:39 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290345.q9T3jdce068802@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 03:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242279 - in stable/8/sys/dev/usb: . net X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 03:45:39 -0000 Author: eadler Date: Mon Oct 29 03:45:38 2012 New Revision: 242279 URL: http://svn.freebsd.org/changeset/base/242279 Log: MFC r241793: Add support for iPhone 5 tethering. PR: usb/172172 Approved by: cperciva (implicit) Modified: stable/8/sys/dev/usb/net/if_ipheth.c stable/8/sys/dev/usb/usbdevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/net/if_ipheth.c ============================================================================== --- stable/8/sys/dev/usb/net/if_ipheth.c Mon Oct 29 03:45:37 2012 (r242278) +++ stable/8/sys/dev/usb/net/if_ipheth.c Mon Oct 29 03:45:38 2012 (r242279) @@ -161,6 +161,9 @@ static const STRUCT_USB_HOST_ID ipheth_d {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_4, IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, IPHETH_USBINTF_PROTO)}, + {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_5, + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, + IPHETH_USBINTF_PROTO)}, }; static int Modified: stable/8/sys/dev/usb/usbdevs ============================================================================== --- stable/8/sys/dev/usb/usbdevs Mon Oct 29 03:45:37 2012 (r242278) +++ stable/8/sys/dev/usb/usbdevs Mon Oct 29 03:45:38 2012 (r242279) @@ -1034,6 +1034,7 @@ product APPLE IPOD_TOUCH 0x1291 iPod Tou product APPLE IPHONE_3G 0x1292 iPhone 3G product APPLE IPHONE_3GS 0x1294 iPhone 3GS product APPLE IPHONE_4 0x1297 iPhone 4 +product APPLE IPHONE_5 0x12a8 iPhone 5 product APPLE IPAD 0x129a iPad product APPLE ETHERNET 0x1402 Ethernet A1277 From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 03:48:24 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE58A2A7; Mon, 29 Oct 2012 03:48:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C56C08FC14; Mon, 29 Oct 2012 03:48:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T3mOMG069296; Mon, 29 Oct 2012 03:48:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T3mOgt069287; Mon, 29 Oct 2012 03:48:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290348.q9T3mOgt069287@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 03:48:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242280 - stable/8/sys/dev/usb/input X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 03:48:24 -0000 Author: eadler Date: Mon Oct 29 03:48:24 2012 New Revision: 242280 URL: http://svn.freebsd.org/changeset/base/242280 Log: MFC r241843: Make uhid attach to devices that look like keyboards or mice if the quirk which prevents higher level drivers from attaching is set. PR: usb/172458 Approved by: cperciva (implicit) Modified: stable/8/sys/dev/usb/input/uhid.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/input/uhid.c ============================================================================== --- stable/8/sys/dev/usb/input/uhid.c Mon Oct 29 03:45:38 2012 (r242279) +++ stable/8/sys/dev/usb/input/uhid.c Mon Oct 29 03:48:24 2012 (r242280) @@ -691,10 +691,11 @@ uhid_probe(device_t dev) */ if ((uaa->info.bInterfaceClass == UICLASS_HID) && (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && - ((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) || - (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))) { + (((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) && + !usb_test_quirk(uaa, UQ_KBD_IGNORE)) || + ((uaa->info.bInterfaceProtocol == UIPROTO_MOUSE) && + !usb_test_quirk(uaa, UQ_UMS_IGNORE)))) return (ENXIO); - } return (BUS_PROBE_GENERIC); } From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 03:52:19 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68F38602; Mon, 29 Oct 2012 03:52:19 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FF5E8FC15; Mon, 29 Oct 2012 03:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T3qJ96070062; Mon, 29 Oct 2012 03:52:19 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T3qJA2070052; Mon, 29 Oct 2012 03:52:19 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290352.q9T3qJA2070052@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 03:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242282 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 03:52:19 -0000 Author: eadler Date: Mon Oct 29 03:52:18 2012 New Revision: 242282 URL: http://svn.freebsd.org/changeset/base/242282 Log: MFC r241855,r241859: Update the kill(2) and killpg(2) man pages to the modern permission checks. Also indicate killpg(2) is POSIX compliant. Correct the killpg(2) return values: Return EPERM if processes were found but they were unable to be signaled. Return the first error from p_cansignal if no signal was successful. Discussed with: jilles Approved by: cperciva (implicit) Modified: stable/8/sys/kern/kern_sig.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Mon Oct 29 03:48:25 2012 (r242281) +++ stable/8/sys/kern/kern_sig.c Mon Oct 29 03:52:18 2012 (r242282) @@ -1623,8 +1623,10 @@ killpg1(struct thread *td, int sig, int { struct proc *p; struct pgrp *pgrp; - int nfound = 0; + int err; + int ret; + ret = ESRCH; if (all) { /* * broadcast @@ -1637,11 +1639,14 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); + ret = err; } + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); @@ -1668,16 +1673,19 @@ killpg1(struct thread *td, int sig, int PROC_UNLOCK(p); continue; } - if (p_cansignal(td, p, sig) == 0) { - nfound++; + err = p_cansignal(td, p, sig); + if (err == 0) { if (sig) pksignal(p, sig, ksi); + ret = err; } + else if (ret == ESRCH) + ret = err; PROC_UNLOCK(p); } PGRP_UNLOCK(pgrp); } - return (nfound ? 0 : ESRCH); + return (ret); } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 04:09:21 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33869DA9; Mon, 29 Oct 2012 04:09:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F166F8FC08; Mon, 29 Oct 2012 04:09:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T49KRA072913; Mon, 29 Oct 2012 04:09:20 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T49KI8072910; Mon, 29 Oct 2012 04:09:20 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290409.q9T49KI8072910@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242285 - stable/8/sys/dev/mpt X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:09:21 -0000 Author: eadler Date: Mon Oct 29 04:09:20 2012 New Revision: 242285 URL: http://svn.freebsd.org/changeset/base/242285 Log: MFC r241858: Remove unused code since the 5.x days Approved by: cperciva (implicit) Modified: stable/8/sys/dev/mpt/mpt_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/mpt/ (props changed) Modified: stable/8/sys/dev/mpt/mpt_pci.c ============================================================================== --- stable/8/sys/dev/mpt/mpt_pci.c Mon Oct 29 03:52:19 2012 (r242284) +++ stable/8/sys/dev/mpt/mpt_pci.c Mon Oct 29 04:09:20 2012 (r242285) @@ -261,68 +261,6 @@ mpt_pci_probe(device_t dev) return (rval); } -#if __FreeBSD_version < 500000 -static void -mpt_set_options(struct mpt_softc *mpt) -{ - int bitmap; - - bitmap = 0; - if (getenv_int("mpt_disable", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->disabled = 1; - } - } - bitmap = 0; - if (getenv_int("mpt_debug", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG; - } - } - bitmap = 0; - if (getenv_int("mpt_debug1", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG1; - } - } - bitmap = 0; - if (getenv_int("mpt_debug2", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG2; - } - } - bitmap = 0; - if (getenv_int("mpt_debug3", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->verbose = MPT_PRT_DEBUG3; - } - } - - mpt->cfg_role = MPT_ROLE_DEFAULT; - bitmap = 0; - if (getenv_int("mpt_nil_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role = 0; - } - mpt->do_cfg_role = 1; - } - bitmap = 0; - if (getenv_int("mpt_tgt_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role |= MPT_ROLE_TARGET; - } - mpt->do_cfg_role = 1; - } - bitmap = 0; - if (getenv_int("mpt_ini_role", &bitmap)) { - if (bitmap & (1 << mpt->unit)) { - mpt->cfg_role |= MPT_ROLE_INITIATOR; - } - mpt->do_cfg_role = 1; - } - mpt->msi_enable = 0; -} -#else static void mpt_set_options(struct mpt_softc *mpt) { @@ -354,7 +292,6 @@ mpt_set_options(struct mpt_softc *mpt) mpt->msi_enable = tval; } } -#endif static void mpt_link_peer(struct mpt_softc *mpt) From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 04:16:53 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5330E387; Mon, 29 Oct 2012 04:16:53 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1CA128FC12; Mon, 29 Oct 2012 04:16:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4Gqcf074279; Mon, 29 Oct 2012 04:16:52 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4Gq13074276; Mon, 29 Oct 2012 04:16:52 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290416.q9T4Gq13074276@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242288 - stable/8/lib/libfetch X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:16:53 -0000 Author: eadler Date: Mon Oct 29 04:16:52 2012 New Revision: 242288 URL: http://svn.freebsd.org/changeset/base/242288 Log: MFC r241840: Don't deny non-temporary redirects if the -A option is set (per the man page) [0] While here add support for draft-reschke-http-status-308-07 PR: 172451 [0] Approved by: cperciva (implicit) Modified: stable/8/lib/libfetch/http.c stable/8/lib/libfetch/http.errors Directory Properties: stable/8/lib/libfetch/ (props changed) Modified: stable/8/lib/libfetch/http.c ============================================================================== --- stable/8/lib/libfetch/http.c Mon Oct 29 04:09:21 2012 (r242287) +++ stable/8/lib/libfetch/http.c Mon Oct 29 04:16:52 2012 (r242288) @@ -96,6 +96,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 #define HTTP_TEMP_REDIRECT 307 +#define HTTP_PERM_REDIRECT 308 #define HTTP_NEED_AUTH 401 #define HTTP_NEED_PROXY_AUTH 407 #define HTTP_BAD_RANGE 416 @@ -1516,8 +1517,7 @@ http_request(struct url *URL, const char /* try the provided URL first */ url = URL; - /* if the A flag is set, we only get one try */ - n = noredirect ? 1 : MAX_REDIRECT; + n = MAX_REDIRECT; i = 0; e = HTTP_PROTOCOL_ERROR; @@ -1764,6 +1764,16 @@ http_request(struct url *URL, const char case hdr_location: if (!HTTP_REDIRECT(conn->err)) break; + /* + * if the A flag is set, we don't follow + * temporary redirects. + */ + if (noredirect && + conn->err != HTTP_MOVED_PERM && + conn->err != HTTP_PERM_REDIRECT) { + n = 1; + break; + } if (new) free(new); if (verbose) Modified: stable/8/lib/libfetch/http.errors ============================================================================== --- stable/8/lib/libfetch/http.errors Mon Oct 29 04:09:21 2012 (r242287) +++ stable/8/lib/libfetch/http.errors Mon Oct 29 04:16:52 2012 (r242288) @@ -18,6 +18,7 @@ 304 OK Not Modified 305 INFO Use Proxy 307 MOVED Temporary Redirect +308 MOVED Permanent Redirect 400 PROTO Bad Request 401 AUTH Unauthorized 402 AUTH Payment Required From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 04:18:34 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 858C57ED; Mon, 29 Oct 2012 04:18:34 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5408FC12; Mon, 29 Oct 2012 04:18:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4IYqK074677; Mon, 29 Oct 2012 04:18:34 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4IYgx074666; Mon, 29 Oct 2012 04:18:34 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290418.q9T4IYgx074666@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242291 - stable/8/lib/libfetch X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:18:34 -0000 Author: eadler Date: Mon Oct 29 04:18:33 2012 New Revision: 242291 URL: http://svn.freebsd.org/changeset/base/242291 Log: MFC r241841: Implement HTTP 305 redirect handling. PR: 172452 Approved by: cperciva (implicit) Modified: stable/8/lib/libfetch/http.c Directory Properties: stable/8/lib/libfetch/ (props changed) Modified: stable/8/lib/libfetch/http.c ============================================================================== --- stable/8/lib/libfetch/http.c Mon Oct 29 04:16:52 2012 (r242290) +++ stable/8/lib/libfetch/http.c Mon Oct 29 04:18:33 2012 (r242291) @@ -95,6 +95,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_MOVED_TEMP 302 #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 +#define HTTP_USE_PROXY 305 #define HTTP_TEMP_REDIRECT 307 #define HTTP_PERM_REDIRECT 308 #define HTTP_NEED_AUTH 401 @@ -105,6 +106,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_REDIRECT(xyz) ((xyz) == HTTP_MOVED_PERM \ || (xyz) == HTTP_MOVED_TEMP \ || (xyz) == HTTP_TEMP_REDIRECT \ + || (xyz) == HTTP_USE_PROXY \ || (xyz) == HTTP_SEE_OTHER) #define HTTP_ERROR(xyz) ((xyz) > 400 && (xyz) < 599) @@ -1689,6 +1691,7 @@ http_request(struct url *URL, const char case HTTP_MOVED_PERM: case HTTP_MOVED_TEMP: case HTTP_SEE_OTHER: + case HTTP_USE_PROXY: /* * Not so fine, but we still have to read the * headers to get the new location. @@ -1770,7 +1773,8 @@ http_request(struct url *URL, const char */ if (noredirect && conn->err != HTTP_MOVED_PERM && - conn->err != HTTP_PERM_REDIRECT) { + conn->err != HTTP_PERM_REDIRECT && + conn->err != HTTP_USE_PROXY) { n = 1; break; } From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 04:21:17 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DEC7C74; Mon, 29 Oct 2012 04:21:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 354398FC19; Mon, 29 Oct 2012 04:21:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4LHtj075228; Mon, 29 Oct 2012 04:21:17 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4LH8B075223; Mon, 29 Oct 2012 04:21:17 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290421.q9T4LH8B075223@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242295 - stable/8/usr.bin/uuencode X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:21:17 -0000 Author: eadler Date: Mon Oct 29 04:21:16 2012 New Revision: 242295 URL: http://svn.freebsd.org/changeset/base/242295 Log: MFC r242136: Prefer an example users born after myself might use. Approved by: cperciva (implicit) Modified: stable/8/usr.bin/uuencode/uuencode.1 Directory Properties: stable/8/usr.bin/uuencode/ (props changed) Modified: stable/8/usr.bin/uuencode/uuencode.1 ============================================================================== --- stable/8/usr.bin/uuencode/uuencode.1 Mon Oct 29 04:21:16 2012 (r242294) +++ stable/8/usr.bin/uuencode/uuencode.1 Mon Oct 29 04:21:16 2012 (r242295) @@ -187,7 +187,7 @@ tree. .Pp .Bd -literal -offset indent -compact tar cf \- src_tree \&| compress \&| -uuencode src_tree.tar.Z \&| mail sys1!sys2!user +uuencode src_tree.tar.Z \&| mail user@example.com .Ed .Pp The following example unpacks all uuencoded From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 04:51:51 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D31EEAC; Mon, 29 Oct 2012 04:51:51 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60B1A8FC0C; Mon, 29 Oct 2012 04:51:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T4ppGM080100; Mon, 29 Oct 2012 04:51:51 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T4ppsf080091; Mon, 29 Oct 2012 04:51:51 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210290451.q9T4ppsf080091@svn.freebsd.org> From: Eitan Adler Date: Mon, 29 Oct 2012 04:51:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242297 - in stable/8/lib/libc: compat-43 sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 04:51:51 -0000 Author: eadler Date: Mon Oct 29 04:51:50 2012 New Revision: 242297 URL: http://svn.freebsd.org/changeset/base/242297 Log: MFC r241855: Update the kill(2) and killpg(2) man pages to the modern permission checks. Also indicate killpg(2) is POSIX compliant. Approved by: cperciva (implicit) Modified: stable/8/lib/libc/compat-43/killpg.2 stable/8/lib/libc/sys/kill.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/compat-43/killpg.2 ============================================================================== --- stable/8/lib/libc/compat-43/killpg.2 Mon Oct 29 04:21:17 2012 (r242296) +++ stable/8/lib/libc/compat-43/killpg.2 Mon Oct 29 04:51:50 2012 (r242297) @@ -58,11 +58,9 @@ is 0, .Fn killpg sends the signal to the sending process's process group. .Pp -The sending process and members of the process group must -have the same effective user ID, or -the sender must be the super-user. -As a single special case the continue signal SIGCONT may be sent -to any process with the same session ID as the caller. +The sending process must be able to +.Fn kill +at least one process in the receiving process group. .Sh RETURN VALUES .Rv -std killpg .Sh ERRORS @@ -83,9 +81,8 @@ No process can be found in the process g The process group was given as 0 but the sending process does not have a process group. .It Bq Er EPERM -The sending process is not the super-user and one or more -of the target processes has an effective user ID different from that -of the sending process. +.Fn kill +returns EPERM for all processes in the process group. .El .Sh SEE ALSO .Xr getpgrp 2 , Modified: stable/8/lib/libc/sys/kill.2 ============================================================================== --- stable/8/lib/libc/sys/kill.2 Mon Oct 29 04:21:17 2012 (r242296) +++ stable/8/lib/libc/sys/kill.2 Mon Oct 29 04:51:50 2012 (r242297) @@ -64,11 +64,19 @@ This can be used to check the validity o For a process to have permission to send a signal to a process designated by .Fa pid , -the real or effective user ID of the receiving process must match -that of the sending process or the user must have appropriate privileges -(such as given by a set-user-ID program or the user is the super-user). +the user must be the super-user, or +the real or saved user ID of the receiving process must match +the real or effective user ID of the sending process. A single exception is the signal SIGCONT, which may always be sent -to any process with the same session ID as the caller. +to any process with the same session ID as the sender. +In addition, if the +.Va security.bsd.conservative_signals +.Xr sysctl +is set to 1, the user is not a super-user, and +the receiver is set-uid, then +only job control and terminal control signals may +be sent (in particular, only SIGKILL, SIGINT, SIGTERM, SIGALRM, +SIGSTOP, SIGTTIN, SIGTTOU, SIGTSTP, SIGHUP, SIGUSR1, SIGUSR2). .Bl -tag -width Ds .It \&If Fa pid No \&is greater than zero : The @@ -127,10 +135,9 @@ No process can be found corresponding to The process id was given as 0 but the sending process does not have a process group. .It Bq Er EPERM -The sending process is not the super-user and its effective -user id does not match the effective user-id of the receiving process. -When signaling a process group, this error is returned if any members -of the group could not be signaled. +The sending process does not have permission to send +.Va sig +to the receiving process. .El .Sh SEE ALSO .Xr getpgrp 2 , From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 08:11:14 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95C9FF85; Mon, 29 Oct 2012 08:11:14 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 9A56B8FC0C; Mon, 29 Oct 2012 08:11:12 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 336465356; Mon, 29 Oct 2012 09:11:04 +0100 From: Hans Petter Selasky To: Eitan Adler Subject: Re: svn commit: r242280 - stable/8/sys/dev/usb/input Date: Mon, 29 Oct 2012 09:12:44 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <201210290348.q9T3mOgt069287@svn.freebsd.org> In-Reply-To: <201210290348.q9T3mOgt069287@svn.freebsd.org> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210290912.44795.hselasky@c2i.net> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 08:11:14 -0000 On Monday 29 October 2012 04:48:24 Eitan Adler wrote: > Author: eadler > Date: Mon Oct 29 03:48:24 2012 > New Revision: 242280 > URL: http://svn.freebsd.org/changeset/base/242280 > > Log: > MFC r241843: > Make uhid attach to devices that look like keyboards > or mice if the quirk which prevents higher level > drivers from attaching is set. > > PR: usb/172458 > Approved by: cperciva (implicit) > > Modified: > stable/8/sys/dev/usb/input/uhid.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/dev/ (props changed) > stable/8/sys/dev/usb/ (props changed) > > Modified: stable/8/sys/dev/usb/input/uhid.c > =========================================================================== > === --- stable/8/sys/dev/usb/input/uhid.c Mon Oct 29 03:45:38 > 2012 (r242279) +++ stable/8/sys/dev/usb/input/uhid.c Mon Oct 29 03:48:24 > 2012 (r242280) @@ -691,10 +691,11 @@ uhid_probe(device_t dev) > */ > if ((uaa->info.bInterfaceClass == UICLASS_HID) && > (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && > - ((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) || > - (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))) { > + (((uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) && > + !usb_test_quirk(uaa, UQ_KBD_IGNORE)) || > + ((uaa->info.bInterfaceProtocol == UIPROTO_MOUSE) && > + !usb_test_quirk(uaa, UQ_UMS_IGNORE)))) > return (ENXIO); > - } > > return (BUS_PROBE_GENERIC); > } Hi, You need to MFC this aswell. Else it won't build. http://svn.freebsd.org/changeset/base/240667 --HPS From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 08:16:31 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF9794ED; Mon, 29 Oct 2012 08:16:31 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 997E28FC16; Mon, 29 Oct 2012 08:16:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9T8GVMs017608; Mon, 29 Oct 2012 08:16:31 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9T8GVqa017604; Mon, 29 Oct 2012 08:16:31 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210290816.q9T8GVqa017604@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 29 Oct 2012 08:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242303 - in stable/8/sys/dev/usb: input quirk X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 08:16:31 -0000 Author: hselasky Date: Mon Oct 29 08:16:31 2012 New Revision: 242303 URL: http://svn.freebsd.org/changeset/base/242303 Log: MFC r240615: Add UQ_UMS_IGNORE quirk. Wrap two long lines. Some minor spelling correction. This fixes build of 8-stable. PR: usb/171721 Modified: stable/8/sys/dev/usb/input/ums.c stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/quirk/usb_quirk.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/input/ums.c ============================================================================== --- stable/8/sys/dev/usb/input/ums.c Mon Oct 29 07:06:23 2012 (r242302) +++ stable/8/sys/dev/usb/input/ums.c Mon Oct 29 08:16:31 2012 (r242303) @@ -378,6 +378,9 @@ ums_probe(device_t dev) if (uaa->info.bInterfaceClass != UICLASS_HID) return (ENXIO); + if (usb_test_quirk(uaa, UQ_UMS_IGNORE)) + return (ENXIO); + if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE)) return (BUS_PROBE_DEFAULT); Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Mon Oct 29 07:06:23 2012 (r242302) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Mon Oct 29 08:16:31 2012 (r242303) @@ -484,6 +484,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_HID_IGNORE] = "UQ_HID_IGNORE", [UQ_KBD_IGNORE] = "UQ_KBD_IGNORE", [UQ_KBD_BOOTPROTO] = "UQ_KBD_BOOTPROTO", + [UQ_UMS_IGNORE] = "UQ_UMS_IGNORE", [UQ_MS_BAD_CLASS] = "UQ_MS_BAD_CLASS", [UQ_MS_LEADING_BYTE] = "UQ_MS_LEADING_BYTE", [UQ_MS_REVZ] = "UQ_MS_REVZ", Modified: stable/8/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.h Mon Oct 29 07:06:23 2012 (r242302) +++ stable/8/sys/dev/usb/quirk/usb_quirk.h Mon Oct 29 08:16:31 2012 (r242303) @@ -29,7 +29,7 @@ enum { /* - * Keep in sync with theusb_quirk_str usb_quirk.c, and with the + * Keep in sync with usb_quirk_str in usb_quirk.c, and with * share/man/man4/usb_quirk.4 */ UQ_NONE, /* not a valid quirk */ @@ -49,6 +49,7 @@ enum { UQ_HID_IGNORE, /* device should be ignored by hid class */ UQ_KBD_IGNORE, /* device should be ignored by kbd class */ UQ_KBD_BOOTPROTO, /* device should set the boot protocol */ + UQ_UMS_IGNORE, /* device should be ignored by ums class */ UQ_MS_BAD_CLASS, /* doesn't identify properly */ UQ_MS_LEADING_BYTE, /* mouse sends an unknown leading byte */ UQ_MS_REVZ, /* mouse has Z-axis reversed */ @@ -64,7 +65,10 @@ enum { UQ_CFG_INDEX_0, /* select configuration index 0 by default */ UQ_ASSUME_CM_OVER_DATA, /* assume cm over data feature */ - /* USB Mass Storage Quirks. See "storage/umass.c" for a detailed description. */ + /* + * USB Mass Storage Quirks. See "storage/umass.c" for a + * detailed description. + */ UQ_MSC_NO_TEST_UNIT_READY, /* send start/stop instead of TUR */ UQ_MSC_NO_RS_CLEAR_UA, /* does not reset Unit Att. */ UQ_MSC_NO_START_STOP, /* does not support start/stop */ From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 08:23:42 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C3073A29; Mon, 29 Oct 2012 08:23:42 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.c2i.net [212.247.154.66]) by mx1.freebsd.org (Postfix) with ESMTP id 441AC8FC12; Mon, 29 Oct 2012 08:23:41 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 170406270; Mon, 29 Oct 2012 09:18:33 +0100 From: Hans Petter Selasky To: Eitan Adler Subject: Re: svn commit: r242280 - stable/8/sys/dev/usb/input Date: Mon, 29 Oct 2012 09:20:13 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <201210290348.q9T3mOgt069287@svn.freebsd.org> <201210290912.44795.hselasky@c2i.net> In-Reply-To: <201210290912.44795.hselasky@c2i.net> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210290920.13223.hselasky@c2i.net> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 08:23:42 -0000 Hi, I just did the MFC. Hint: It might be worth to diff -ur sys/dev/usb from 8,9 towards 10-current to see what you are missing sometimes. --HPS From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 10:53:16 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 741A3586; Mon, 29 Oct 2012 10:53:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kostikbel-1-pt.tunnel.tserv11.ams1.ipv6.he.net [IPv6:2001:470:1f14:13d6::2]) by mx1.freebsd.org (Postfix) with ESMTP id E78B68FC12; Mon, 29 Oct 2012 10:53:15 +0000 (UTC) Received: from tom.home (localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id q9TAr5wT018004; Mon, 29 Oct 2012 12:53:05 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id q9TAr5Tp018003; Mon, 29 Oct 2012 12:53:05 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 29 Oct 2012 12:53:05 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r242280 - stable/8/sys/dev/usb/input Message-ID: <20121029105305.GK73505@kib.kiev.ua> References: <201210290348.q9T3mOgt069287@svn.freebsd.org> <201210290912.44795.hselasky@c2i.net> <201210290920.13223.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MzdA25v054BPvyZa" Content-Disposition: inline In-Reply-To: <201210290920.13223.hselasky@c2i.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=0.2 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler , svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 10:53:16 -0000 --MzdA25v054BPvyZa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 29, 2012 at 09:20:13AM +0100, Hans Petter Selasky wrote: > Hi, >=20 > I just did the MFC. >=20 > Hint: It might be worth to diff -ur sys/dev/usb from 8,9 towards 10-curre= nt to=20 > see what you are missing sometimes. It is worth to do the builds and tests before committing. I prefer the word 'must' there, in fact. Directed at Eitan. --MzdA25v054BPvyZa Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCOYBEACgkQC3+MBN1Mb4gqxwCg7p3SQwh0EiAXkuKzklodbOgy ZEkAmQEfNnXlF2ViFI53S0BFZ3nZ31eX =O9Yi -----END PGP SIGNATURE----- --MzdA25v054BPvyZa-- From owner-svn-src-stable-8@FreeBSD.ORG Mon Oct 29 11:48:45 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65191DF9 for ; Mon, 29 Oct 2012 11:48:45 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 255118FC0C for ; Mon, 29 Oct 2012 11:48:44 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so4397727pbb.13 for ; Mon, 29 Oct 2012 04:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=LQmL4YB77EzTG3LDjj4tZIURzwYTJaeiaDonAWPhd2U=; b=AKXvmWPZ20aJui65Mxhbz9GjTIuST1nnNEP8Gg6noQjoyjYmfwOpKKTePz/FVeoDiq UNrgfWbrM9lEHg9AxVOgwuo/CZBphSKHHL7Zqg1/NDlTS5xail+D5Z4xLrvrqxL2S54y hbWx2WiqYC4ondqn31bV+d4V665SJ4YW3kwJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=LQmL4YB77EzTG3LDjj4tZIURzwYTJaeiaDonAWPhd2U=; b=m4FQO6SmOlRQUwRsnMNJm+LTVDPlgRsHmCxOoDiHXAWmiuwBIjE/b6U+7Noo1zoE3+ Tv5L6PaEMx9lunsVZw+2vbKdUh5dYQgiG18wSXq5vKeY0gVIFOYUL67kESLdOqu5cemS Y1l8jJUklWrsygGs5lHoDddOhi7p1ESEXWRD4knzufM40/avmqzy/GLdNCuvlTn27vOs aXd+LrSQmm1ApUmpfZoTg1erYpU9R4Zf5etmDdVvabZAHr54j837Myg8t46M5rFFylbu hofXxaKutprBgbbWIu2R93aqt4xnStS3GmLe5+YS3EQ6pkIMm+wGPnr9f5IoYHzcpxHg 0BMw== Received: by 10.66.90.65 with SMTP id bu1mr82793909pab.31.1351511324553; Mon, 29 Oct 2012 04:48:44 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.161.163 with HTTP; Mon, 29 Oct 2012 04:48:14 -0700 (PDT) In-Reply-To: <201210290920.13223.hselasky@c2i.net> References: <201210290348.q9T3mOgt069287@svn.freebsd.org> <201210290912.44795.hselasky@c2i.net> <201210290920.13223.hselasky@c2i.net> From: Eitan Adler Date: Mon, 29 Oct 2012 07:48:14 -0400 X-Google-Sender-Auth: nfYSj1UMn8o-DmHnByjD92D5yLQ Message-ID: Subject: Re: svn commit: r242280 - stable/8/sys/dev/usb/input To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlbKfDwqyop/EZTzsw194wDx2REukQAWWxRsWMrAcyQ584fXK0TcDjD1wilrGN2mgLsPWTV Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 11:48:45 -0000 On 29 October 2012 04:20, Hans Petter Selasky wrote: > Hi, > > I just did the MFC. Thanks. > Hint: It might be worth to diff -ur sys/dev/usb from 8,9 towards 10-current to > see what you are missing sometimes. Will do in the future. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 30 03:21:28 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA974B5B; Tue, 30 Oct 2012 03:21:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1B118FC0C; Tue, 30 Oct 2012 03:21:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9U3LSrQ003683; Tue, 30 Oct 2012 03:21:28 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9U3LSaF003681; Tue, 30 Oct 2012 03:21:28 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210300321.q9U3LSaF003681@svn.freebsd.org> From: Eitan Adler Date: Tue, 30 Oct 2012 03:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242336 - stable/8/gnu/usr.bin/send-pr X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 03:21:28 -0000 Author: eadler Date: Tue Oct 30 03:21:28 2012 New Revision: 242336 URL: http://svn.freebsd.org/changeset/base/242336 Log: MFC r241857: Add support for the "&" character in usernames. Charlie & finally has his last name. PR: gnu/37910 Approved by: cperciva (implicit) Modified: stable/8/gnu/usr.bin/send-pr/send-pr.sh Directory Properties: stable/8/gnu/usr.bin/send-pr/ (props changed) Modified: stable/8/gnu/usr.bin/send-pr/send-pr.sh ============================================================================== --- stable/8/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:21:23 2012 (r242335) +++ stable/8/gnu/usr.bin/send-pr/send-pr.sh Tue Oct 30 03:21:28 2012 (r242336) @@ -23,7 +23,7 @@ # $FreeBSD$ # The version of this send-pr. -VERSION=3.113 +VERSION=3.114 # The submitter-id for your site. # "current-users" is the only allowable value for FreeBSD. @@ -92,11 +92,16 @@ elif [ -f $HOME/.fullname ]; then ORIGINATOR="`sed -e '1q' $HOME/.fullname`" else PTEMP=`mktemp -t p` || exit 1 + PTEMP2=`mktemp -t p` || exit 1 # Must use temp file due to incompatibilities in quoting behavior # and to protect shell metacharacters in the expansion of $LOGNAME - $PW usershow $LOGNAME | awk -F: '{ print $8 }' | sed -e 's/,.*//' > $PTEMP + $ECHON1 $LOGNAME | awk '{print toupper(substr($1,1,1))substr($1,2)}' > $PTEMP2 + ICLOGNAME="`cat $PTEMP2`" + $PW usershow $LOGNAME | awk -F: '{ print $8 }' \ + | sed -e "s/\&/$ICLOGNAME/" \ + | sed -e 's/,.*//' > $PTEMP ORIGINATOR="`cat $PTEMP`" - rm -f $PTEMP + rm -f "$PTEMP" "$PTEMP2" fi FROM="$ORIGINATOR <$LOGNAME>" From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 30 03:30:00 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC35C135; Tue, 30 Oct 2012 03:30:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FA308FC08; Tue, 30 Oct 2012 03:30:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9U3U0fG005094; Tue, 30 Oct 2012 03:30:00 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9U3U0NC005089; Tue, 30 Oct 2012 03:30:00 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210300330.q9U3U0NC005089@svn.freebsd.org> From: Eitan Adler Date: Tue, 30 Oct 2012 03:30:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242338 - stable/8/share/syscons/keymaps X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 03:30:00 -0000 Author: eadler Date: Tue Oct 30 03:30:00 2012 New Revision: 242338 URL: http://svn.freebsd.org/changeset/base/242338 Log: MFC r241851: Add Danish keyboard model for macbooks to syscons. (not verified to be accurate) PR: conf/146793 Approved by: cperciva (implicit) Added: stable/8/share/syscons/keymaps/danish.iso.macbook.kbd - copied unchanged from r241851, head/share/syscons/keymaps/danish.iso.macbook.kbd Modified: stable/8/share/syscons/keymaps/INDEX.keymaps stable/8/share/syscons/keymaps/Makefile Directory Properties: stable/8/share/syscons/keymaps/ (props changed) Modified: stable/8/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/8/share/syscons/keymaps/INDEX.keymaps Tue Oct 30 03:21:31 2012 (r242337) +++ stable/8/share/syscons/keymaps/INDEX.keymaps Tue Oct 30 03:30:00 2012 (r242338) @@ -117,6 +117,8 @@ danish.cp865.kbd:fr:Danois Code page 865 danish.cp865.kbd:pt:Dinamarquês Codepage 865 danish.cp865.kbd:es:Danés Codepage 865 +danish.iso.macbook.kbd:Danish ISO-8859-1 (macbook) + dutch.iso.acc.kbd:en:Dutch ISO keymap (accent keys) eee_nordic.kbd:en:Nordic layout on Asus eeePC Modified: stable/8/share/syscons/keymaps/Makefile ============================================================================== --- stable/8/share/syscons/keymaps/Makefile Tue Oct 30 03:21:31 2012 (r242337) +++ stable/8/share/syscons/keymaps/Makefile Tue Oct 30 03:30:00 2012 (r242338) @@ -10,6 +10,7 @@ FILES= INDEX.keymaps \ cs.latin2.qwertz.kbd \ cz.iso2.kbd \ danish.iso.kbd danish.iso.acc.kbd danish.cp865.kbd \ + danish.iso.macbook.kbd \ dutch.iso.acc.kbd \ eee_nordic.kbd el.iso07.kbd \ estonian.iso.kbd estonian.iso15.kbd estonian.cp850.kbd \ Copied: stable/8/share/syscons/keymaps/danish.iso.macbook.kbd (from r241851, head/share/syscons/keymaps/danish.iso.macbook.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/syscons/keymaps/danish.iso.macbook.kbd Tue Oct 30 03:30:00 2012 (r242338, copy of r241851, head/share/syscons/keymaps/danish.iso.macbook.kbd) @@ -0,0 +1,117 @@ +# $FreeBSD$ +# Danish ISO 8859-1 keyboard layout for Apple MacBook keyboards. Not all +# key combinations are available in this character set yet. +# by Erik Cederstrand +# alt +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' '1' nop 161 175 '1' '1' O + 003 '2' '"' '2' '2' nop nop '2' '2' O + 004 '3' '#' '3' '3' 167 '$' '3' '3' O + 005 '4' nop '4' '4' 163 162 '4' '4' O + 006 '5' '%' '5' '5' nop nop '5' '5' O + 007 '6' '&' '6' '6' nop nop '6' '6' O + 008 '7' '/' '7' '7' 182 '\' '7' '7' O + 009 '8' '(' '8' '8' '[' '{' '8' '8' O + 010 '9' ')' '9' '9' ']' '}' '9' '9' O + 011 '0' '=' '0' '0' nop nop '0' '0' O + 012 '+' '?' '+' '+' 177 191 '+' '+' O + 013 dacu dgra dacu dacu ''' nop dacu dacu O + 014 bs del del bs del bs susp bs O + 015 ht btab ht ht ht btab ht ht O + 016 'q' 'Q' dc1 dc1 186 nop nop nop C + 017 'w' 'W' etb etb 'w' 176 nop nop C + 018 'e' 'E' enq enq 223 nop nop nop C + 019 'r' 'R' dc2 dc2 174 nop nop nop C + 020 't' 'T' dc4 dc4 nop nop nop nop C + 021 'y' 'Y' em em 165 255 nop nop C + 022 'u' 'U' nak nak 252 nop nop nop C + 023 'i' 'I' ht ht '|' nop nop nop C + 024 'o' 'O' si si nop nop nop nop C + 025 'p' 'P' dle dle nop nop nop nop C + 026 229 nop nop nop nop nop nop nop C + 027 168 '^' nop nop '~' '^' '~' '~' O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 170 nop nop nop C + 031 's' 'S' dc3 dc3 nop nop nop nop C + 032 'd' 'D' eot eot 240 nop nop nop C + 033 'f' 'F' ack ack nop nop nop nop C + 034 'g' 'G' bel bel 169 nop nop nop C + 035 'h' 'H' bs bs 171 187 nop nop C + 036 'j' 'J' nl nl nop nop nop nop C + 037 'k' 'K' vt vt nop nop nop nop C + 038 'l' 'L' ff ff 172 nop nop nop C + 039 230 nop nop nop 228 nop nop nop C + 040 248 nop nop nop 246 nop nop nop C + 041 '$' 167 '0' '0' nop ''' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 ''' '*' nop nop '@' nop nop nop O + 044 'z' 'Z' sub sub nop 184 nop nop C + 045 'x' 'X' can can nop nop nop nop C + 046 'c' 'C' etx etx 231 nop nop nop C + 047 'v' 'V' syn syn 'v' 'V' nop nop C + 048 'b' 'B' stx stx nop nop nop nop C + 049 'n' 'N' so so 241 nop nop nop C + 050 'm' 'M' cr cr 181 nop nop nop C + 051 ',' ';' ',' ',' ',' ';' ',' ',' O + 052 '.' ':' '.' '.' 183 247 '.' '.' O + 053 '-' '_' '-' '-' '-' nop '-' '-' O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 nlock fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 slock fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 '7' '7' '7' '7' '7' '7' '7' '7' N + 072 '8' '8' '8' '8' '8' '8' '8' '8' N + 073 '9' '9' '9' '9' '9' '9' '9' '9' N + 074 '-' '-' '-' '-' '-' '-' '-' '-' N + 075 '4' '4' '4' '4' '4' '4' '4' '4' N + 076 '5' '5' '5' '5' '5' '5' '5' '5' N + 077 '6' '6' '6' '6' '6' '6' '6' '6' N + 078 '+' '+' '+' '+' '+' '+' '+' '+' N + 079 '1' '1' '1' '1' '1' '1' '1' '1' N + 080 '2' '2' '2' '2' '2' '2' '2' '2' N + 081 '3' '3' '3' '3' '3' '3' '3' '3' N + 082 '0' '0' '0' '0' '0' '0' '0' '0' N + 083 ',' ',' ',' ',' ',' ',' ',' ',' N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' fs fs '\' '>' fs fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 73 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 81 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 79 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 71 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 del del del del del fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 30 15:25:24 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A43BAA5D; Tue, 30 Oct 2012 15:25:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 824248FC16; Tue, 30 Oct 2012 15:25:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UFPOHB019715; Tue, 30 Oct 2012 15:25:24 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UFPOY0019710; Tue, 30 Oct 2012 15:25:24 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210301525.q9UFPOY0019710@svn.freebsd.org> From: Eitan Adler Date: Tue, 30 Oct 2012 15:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242363 - in stable/8/sys/dev: e1000 ixgbe sound/pci X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 15:25:24 -0000 Author: eadler Date: Tue Oct 30 15:25:23 2012 New Revision: 242363 URL: http://svn.freebsd.org/changeset/base/242363 Log: MFC r241917: Now that device disabling is generic, remove extraneous code from the device drivers that used to provide this feature. Approved by: cperciva (implicit) Modified: stable/8/sys/dev/e1000/if_lem.c stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/ixgbe/ixv.c stable/8/sys/dev/sound/pci/emu10kx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/dev/ixgbe/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) Modified: stable/8/sys/dev/e1000/if_lem.c ============================================================================== --- stable/8/sys/dev/e1000/if_lem.c Tue Oct 30 15:25:01 2012 (r242362) +++ stable/8/sys/dev/e1000/if_lem.c Tue Oct 30 15:25:23 2012 (r242363) @@ -387,11 +387,6 @@ lem_attach(device_t dev) INIT_DEBUGOUT("lem_attach: begin"); - if (resource_disabled("lem", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Tue Oct 30 15:25:01 2012 (r242362) +++ stable/8/sys/dev/ixgbe/ixgbe.c Tue Oct 30 15:25:23 2012 (r242363) @@ -389,11 +389,6 @@ ixgbe_attach(device_t dev) INIT_DEBUGOUT("ixgbe_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: stable/8/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixv.c Tue Oct 30 15:25:01 2012 (r242362) +++ stable/8/sys/dev/ixgbe/ixv.c Tue Oct 30 15:25:23 2012 (r242363) @@ -299,11 +299,6 @@ ixv_attach(device_t dev) INIT_DEBUGOUT("ixv_attach: begin"); - if (resource_disabled("ixgbe", device_get_unit(dev))) { - device_printf(dev, "Disabled by device hint\n"); - return (ENXIO); - } - /* Allocate, clear, and link in our adapter structure */ adapter = device_get_softc(dev); adapter->dev = adapter->osdep.dev = dev; Modified: stable/8/sys/dev/sound/pci/emu10kx.c ============================================================================== --- stable/8/sys/dev/sound/pci/emu10kx.c Tue Oct 30 15:25:01 2012 (r242362) +++ stable/8/sys/dev/sound/pci/emu10kx.c Tue Oct 30 15:25:23 2012 (r242363) @@ -3050,11 +3050,6 @@ emu_pci_attach(device_t dev) sc = device_get_softc(dev); unit = device_get_unit(dev); - if (resource_disabled("emu10kx", unit)) { - device_printf(dev, "disabled by kernel hints\n"); - return (ENXIO); /* XXX to avoid unit reuse */ - } - /* Get configuration */ sc->ctx = device_get_sysctl_ctx(dev); From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 30 17:05:28 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C518817F; Tue, 30 Oct 2012 17:05:28 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABF698FC08; Tue, 30 Oct 2012 17:05:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UH5SuG035574; Tue, 30 Oct 2012 17:05:28 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UH5SFj035569; Tue, 30 Oct 2012 17:05:28 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201210301705.q9UH5SFj035569@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 30 Oct 2012 17:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242366 - in stable/8: lib/libmemstat sys/vm X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 17:05:29 -0000 Author: mdf Date: Tue Oct 30 17:05:28 2012 New Revision: 242366 URL: http://svn.freebsd.org/changeset/base/242366 Log: MFC r242152: Const-ify the zone name argument to uma_zcreate(9). Modified: stable/8/lib/libmemstat/memstat_uma.c stable/8/sys/vm/uma.h stable/8/sys/vm/uma_core.c stable/8/sys/vm/uma_int.h Directory Properties: stable/8/lib/ (props changed) stable/8/lib/libmemstat/ (props changed) stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/lib/libmemstat/memstat_uma.c ============================================================================== --- stable/8/lib/libmemstat/memstat_uma.c Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/lib/libmemstat/memstat_uma.c Tue Oct 30 17:05:28 2012 (r242366) @@ -262,7 +262,7 @@ kread(kvm_t *kvm, void *kvm_pointer, voi } static int -kread_string(kvm_t *kvm, void *kvm_pointer, char *buffer, int buflen) +kread_string(kvm_t *kvm, const void *kvm_pointer, char *buffer, int buflen) { ssize_t ret; int i; Modified: stable/8/sys/vm/uma.h ============================================================================== --- stable/8/sys/vm/uma.h Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/sys/vm/uma.h Tue Oct 30 17:05:28 2012 (r242366) @@ -165,9 +165,9 @@ typedef void (*uma_fini)(void *mem, int * A pointer to a structure which is intended to be opaque to users of * the interface. The value may be null if the wait flag is not set. */ -uma_zone_t uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, - uma_init uminit, uma_fini fini, int align, - u_int32_t flags); +uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor, + uma_dtor dtor, uma_init uminit, uma_fini fini, + int align, u_int32_t flags); /* * Create a secondary uma zone Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/sys/vm/uma_core.c Tue Oct 30 17:05:28 2012 (r242366) @@ -153,7 +153,7 @@ static struct callout uma_callout; * a special allocation function just for zones. */ struct uma_zctor_args { - char *name; + const char *name; size_t size; uma_ctor ctor; uma_dtor dtor; @@ -1816,7 +1816,7 @@ uma_set_align(int align) /* See uma.h */ uma_zone_t -uma_zcreate(char *name, size_t size, uma_ctor ctor, uma_dtor dtor, +uma_zcreate(const char *name, size_t size, uma_ctor ctor, uma_dtor dtor, uma_init uminit, uma_fini fini, int align, u_int32_t flags) { Modified: stable/8/sys/vm/uma_int.h ============================================================================== --- stable/8/sys/vm/uma_int.h Tue Oct 30 17:05:12 2012 (r242365) +++ stable/8/sys/vm/uma_int.h Tue Oct 30 17:05:28 2012 (r242366) @@ -193,7 +193,7 @@ struct uma_keg { struct mtx uk_lock; /* Lock for the keg */ struct uma_hash uk_hash; - char *uk_name; /* Name of creating zone. */ + const char *uk_name; /* Name of creating zone. */ LIST_HEAD(,uma_zone) uk_zones; /* Keg's zones */ LIST_HEAD(,uma_slab) uk_part_slab; /* partially allocated slabs */ LIST_HEAD(,uma_slab) uk_free_slab; /* empty slab list */ @@ -296,7 +296,7 @@ typedef struct uma_klink *uma_klink_t; * */ struct uma_zone { - char *uz_name; /* Text name of the zone */ + const char *uz_name; /* Text name of the zone */ struct mtx *uz_lock; /* Lock for the zone (keg's lock) */ LIST_ENTRY(uma_zone) uz_link; /* List of all zones in keg */ From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 30 19:24:06 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30B4C72D; Tue, 30 Oct 2012 19:24:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17CAF8FC14; Tue, 30 Oct 2012 19:24:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UJO5FM057696; Tue, 30 Oct 2012 19:24:05 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UJO503057694; Tue, 30 Oct 2012 19:24:05 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201210301924.q9UJO503057694@svn.freebsd.org> From: Navdeep Parhar Date: Tue, 30 Oct 2012 19:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242370 - stable/8/sys/dev/cxgb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 19:24:06 -0000 Author: np Date: Tue Oct 30 19:24:05 2012 New Revision: 242370 URL: http://svn.freebsd.org/changeset/base/242370 Log: MFC r242087: Initialize the response queue mutex a bit earlier to avoid a panic that occurs if t3_sge_alloc_qset fails and then t3_free_qset attempts to destroy an uninitialized mutex. Modified: stable/8/sys/dev/cxgb/cxgb_sge.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/cxgb/ (props changed) Modified: stable/8/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_sge.c Tue Oct 30 19:21:53 2012 (r242369) +++ stable/8/sys/dev/cxgb/cxgb_sge.c Tue Oct 30 19:24:05 2012 (r242370) @@ -2593,6 +2593,10 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i goto err; } + snprintf(q->rspq.lockbuf, RSPQ_NAME_LEN, "t3 rspq lock %d:%d", + device_get_unit(sc->dev), irq_vec_idx); + MTX_INIT(&q->rspq.lock, q->rspq.lockbuf, NULL, MTX_DEF); + for (i = 0; i < ntxq; ++i) { size_t sz = i == TXQ_CTRL ? 0 : sizeof(struct tx_sw_desc); @@ -2708,11 +2712,7 @@ t3_sge_alloc_qset(adapter_t *sc, u_int i goto err_unlock; } } - - snprintf(q->rspq.lockbuf, RSPQ_NAME_LEN, "t3 rspq lock %d:%d", - device_get_unit(sc->dev), irq_vec_idx); - MTX_INIT(&q->rspq.lock, q->rspq.lockbuf, NULL, MTX_DEF); - + mtx_unlock_spin(&sc->sge.reg_lock); t3_update_qset_coalesce(q, p); q->port = pi; From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 30 21:05:07 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 141CBFD5; Tue, 30 Oct 2012 21:05:07 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D66E58FC0C; Tue, 30 Oct 2012 21:05:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9UL56k0075768; Tue, 30 Oct 2012 21:05:06 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9UL56RM075766; Tue, 30 Oct 2012 21:05:06 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201210302105.q9UL56RM075766@svn.freebsd.org> From: Andrey Zonov Date: Tue, 30 Oct 2012 21:05:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242377 - stable/8/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2012 21:05:07 -0000 Author: zont Date: Tue Oct 30 21:05:06 2012 New Revision: 242377 URL: http://svn.freebsd.org/changeset/base/242377 Log: MFC r241735: - Update cachelimit after hashsize and bucketlimit were set. Approved by: kib (mentor) Modified: stable/8/sys/netinet/tcp_hostcache.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/8/sys/netinet/tcp_hostcache.c Tue Oct 30 21:04:16 2012 (r242376) +++ stable/8/sys/netinet/tcp_hostcache.c Tue Oct 30 21:05:06 2012 (r242377) @@ -174,6 +174,7 @@ static MALLOC_DEFINE(M_HOSTCACHE, "hostc void tcp_hc_init(void) { + u_int cache_limit; int i; /* @@ -182,23 +183,27 @@ tcp_hc_init(void) V_tcp_hostcache.cache_count = 0; V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; V_tcp_hostcache.bucket_limit = TCP_HOSTCACHE_BUCKETLIMIT; - V_tcp_hostcache.cache_limit = - V_tcp_hostcache.hashsize * V_tcp_hostcache.bucket_limit; V_tcp_hostcache.expire = TCP_HOSTCACHE_EXPIRE; V_tcp_hostcache.prune = TCP_HOSTCACHE_PRUNE; TUNABLE_INT_FETCH("net.inet.tcp.hostcache.hashsize", &V_tcp_hostcache.hashsize); - TUNABLE_INT_FETCH("net.inet.tcp.hostcache.cachelimit", - &V_tcp_hostcache.cache_limit); - TUNABLE_INT_FETCH("net.inet.tcp.hostcache.bucketlimit", - &V_tcp_hostcache.bucket_limit); if (!powerof2(V_tcp_hostcache.hashsize)) { printf("WARNING: hostcache hash size is not a power of 2.\n"); V_tcp_hostcache.hashsize = TCP_HOSTCACHE_HASHSIZE; /* default */ } V_tcp_hostcache.hashmask = V_tcp_hostcache.hashsize - 1; + TUNABLE_INT_FETCH("net.inet.tcp.hostcache.bucketlimit", + &V_tcp_hostcache.bucket_limit); + + cache_limit = V_tcp_hostcache.hashsize * V_tcp_hostcache.bucket_limit; + V_tcp_hostcache.cache_limit = cache_limit; + TUNABLE_INT_FETCH("net.inet.tcp.hostcache.cachelimit", + &V_tcp_hostcache.cache_limit); + if (V_tcp_hostcache.cache_limit > cache_limit) + V_tcp_hostcache.cache_limit = cache_limit; + /* * Allocate the hash table. */ From owner-svn-src-stable-8@FreeBSD.ORG Wed Oct 31 17:00:37 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6C115DEA; Wed, 31 Oct 2012 17:00:37 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A94C8FC20; Wed, 31 Oct 2012 17:00:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9VH0bYL088576; Wed, 31 Oct 2012 17:00:37 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9VH0b7r088574; Wed, 31 Oct 2012 17:00:37 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210311700.q9VH0b7r088574@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 31 Oct 2012 17:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242399 - stable/8/bin/cat X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 17:00:37 -0000 Author: jh Date: Wed Oct 31 17:00:36 2012 New Revision: 242399 URL: http://svn.freebsd.org/changeset/base/242399 Log: MFC r238652: style(9). Modified: stable/8/bin/cat/cat.c Directory Properties: stable/8/bin/cat/ (props changed) Modified: stable/8/bin/cat/cat.c ============================================================================== --- stable/8/bin/cat/cat.c Wed Oct 31 15:04:27 2012 (r242398) +++ stable/8/bin/cat/cat.c Wed Oct 31 17:00:36 2012 (r242399) @@ -58,11 +58,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include -#include int bflag, eflag, nflag, sflag, tflag, vflag; int rval; @@ -77,16 +77,20 @@ static void raw_cat(int); static int udom_open(const char *path, int flags); #endif -/* Memory strategy threshold, in pages: if physmem is larger then this, use a - * large buffer */ -#define PHYSPAGES_THRESHOLD (32*1024) - -/* Maximum buffer size in bytes - do not allow it to grow larger than this */ -#define BUFSIZE_MAX (2*1024*1024) - -/* Small (default) buffer size in bytes. It's inefficient for this to be - * smaller than MAXPHYS */ -#define BUFSIZE_SMALL (MAXPHYS) +/* + * Memory strategy threshold, in pages: if physmem is larger than this, + * use a large buffer. + */ +#define PHYSPAGES_THRESHOLD (32 * 1024) + +/* Maximum buffer size in bytes - do not allow it to grow larger than this. */ +#define BUFSIZE_MAX (2 * 1024 * 1024) + +/* + * Small (default) buffer size in bytes. It's inefficient for this to be + * smaller than MAXPHYS. + */ +#define BUFSIZE_SMALL (MAXPHYS) int main(int argc, char *argv[]) @@ -144,13 +148,12 @@ usage(void) static void scanfiles(char *argv[], int cooked) { - int i = 0; + int fd, i; char *path; FILE *fp; + i = 0; while ((path = argv[i]) != NULL || i == 0) { - int fd; - if (path == NULL || strcmp(path, "-") == 0) { filename = "stdin"; fd = STDIN_FILENO; @@ -261,12 +264,12 @@ raw_cat(int rfd) if (S_ISREG(sbuf.st_mode)) { /* If there's plenty of RAM, use a large copy buffer */ if (sysconf(_SC_PHYS_PAGES) > PHYSPAGES_THRESHOLD) - bsize = MIN(BUFSIZE_MAX, MAXPHYS*8); + bsize = MIN(BUFSIZE_MAX, MAXPHYS * 8); else bsize = BUFSIZE_SMALL; } else - bsize = MAX(sbuf.st_blksize, - (blksize_t)sysconf(_SC_PAGESIZE)); + bsize = MAX(sbuf.st_blksize, + (blksize_t)sysconf(_SC_PAGESIZE)); if ((buf = malloc(bsize)) == NULL) err(1, "malloc() failure of IO buffer"); } @@ -327,7 +330,7 @@ udom_open(const char *path, int flags) break; } } - return(fd); + return (fd); } #endif From owner-svn-src-stable-8@FreeBSD.ORG Wed Oct 31 17:01:57 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3863EA9; Wed, 31 Oct 2012 17:01:57 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F2958FC1D; Wed, 31 Oct 2012 17:01:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9VH1uTh088901; Wed, 31 Oct 2012 17:01:56 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9VH1u9s088899; Wed, 31 Oct 2012 17:01:56 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201210311701.q9VH1u9s088899@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 31 Oct 2012 17:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242400 - stable/8/bin/cat X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2012 17:01:57 -0000 Author: jh Date: Wed Oct 31 17:01:56 2012 New Revision: 242400 URL: http://svn.freebsd.org/changeset/base/242400 Log: MFC r238653: Use proper error message when fstat(2) fails on stdout. PR: bin/159746 Modified: stable/8/bin/cat/cat.c Directory Properties: stable/8/bin/cat/ (props changed) Modified: stable/8/bin/cat/cat.c ============================================================================== --- stable/8/bin/cat/cat.c Wed Oct 31 17:00:36 2012 (r242399) +++ stable/8/bin/cat/cat.c Wed Oct 31 17:01:56 2012 (r242400) @@ -260,7 +260,7 @@ raw_cat(int rfd) wfd = fileno(stdout); if (buf == NULL) { if (fstat(wfd, &sbuf)) - err(1, "%s", filename); + err(1, "stdout"); if (S_ISREG(sbuf.st_mode)) { /* If there's plenty of RAM, use a large copy buffer */ if (sysconf(_SC_PHYS_PAGES) > PHYSPAGES_THRESHOLD) From owner-svn-src-stable-8@FreeBSD.ORG Thu Nov 1 20:47:19 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 065338E0; Thu, 1 Nov 2012 20:47:19 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1C588FC12; Thu, 1 Nov 2012 20:47:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA1KlIYt073339; Thu, 1 Nov 2012 20:47:18 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA1KlIwV073337; Thu, 1 Nov 2012 20:47:18 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201211012047.qA1KlIwV073337@svn.freebsd.org> From: Jim Harris Date: Thu, 1 Nov 2012 20:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242457 - stable/8/usr.sbin/pciconf X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2012 20:47:19 -0000 Author: jimharris Date: Thu Nov 1 20:47:18 2012 New Revision: 242457 URL: http://svn.freebsd.org/changeset/base/242457 Log: MFC r242085: For PCI Express capability, if max link width is greater than zero, print the current and max link speed. Sponsored by: Intel Modified: stable/8/usr.sbin/pciconf/cap.c Directory Properties: stable/8/usr.sbin/pciconf/ (props changed) Modified: stable/8/usr.sbin/pciconf/cap.c ============================================================================== --- stable/8/usr.sbin/pciconf/cap.c Thu Nov 1 20:46:48 2012 (r242456) +++ stable/8/usr.sbin/pciconf/cap.c Thu Nov 1 20:47:18 2012 (r242457) @@ -363,6 +363,22 @@ cap_subvendor(int fd, struct pci_conf *p #define MAX_PAYLOAD(field) (128 << (field)) +static const char * +link_speed_string(uint8_t speed) +{ + + switch (speed) { + case 1: + return ("2.5"); + case 2: + return ("5.0"); + case 3: + return ("8.0"); + default: + return ("undef"); + } +} + static void cap_express(int fd, struct pci_conf *p, uint8_t ptr) { @@ -416,6 +432,16 @@ cap_express(int fd, struct pci_conf *p, flags = read_config(fd, &p->pc_sel, ptr+ PCIER_LINK_STA, 2); printf(" link x%d(x%d)", (flags & PCIEM_LINK_STA_WIDTH) >> 4, (val & PCIEM_LINK_CAP_MAX_WIDTH) >> 4); + /* + * Only print link speed info if the link's max width is + * greater than 0. + */ + if ((val & PCIEM_LINK_CAP_MAX_WIDTH) != 0) { + printf("\n speed"); + printf(" %s(%s)", (flags & PCIEM_LINK_STA_WIDTH) == 0 ? + "0.0" : link_speed_string(flags & PCIEM_LINK_STA_SPEED), + link_speed_string(val & PCIEM_LINK_CAP_MAX_SPEED)); + } } static void From owner-svn-src-stable-8@FreeBSD.ORG Fri Nov 2 01:32:23 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1477D41A; Fri, 2 Nov 2012 01:32:23 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D73EF8FC0C; Fri, 2 Nov 2012 01:32:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA21WMNK016833; Fri, 2 Nov 2012 01:32:22 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA21WMnd016831; Fri, 2 Nov 2012 01:32:22 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201211020132.qA21WMnd016831@svn.freebsd.org> From: Jamie Gritton Date: Fri, 2 Nov 2012 01:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r242464 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Nov 2012 01:32:23 -0000 Author: jamie Date: Fri Nov 2 01:32:22 2012 New Revision: 242464 URL: http://svn.freebsd.org/changeset/base/242464 Log: MFC r225191: Delay the recursive decrement of pr_uref when jails are made invisible but not removed; decrement it instead when the child jail actually goes away. This avoids letting the counter go below zero in the case where dying (pr_uref==0) jails are "resurrected", and an associated KASSERT panic. PR: kern/173120 Submitted by: Steven Hartland Modified: stable/8/sys/kern/kern_jail.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Fri Nov 2 01:20:55 2012 (r242463) +++ stable/8/sys/kern/kern_jail.c Fri Nov 2 01:32:22 2012 (r242464) @@ -2454,32 +2454,11 @@ prison_deref(struct prison *pr, int flag if (!(flags & PD_LOCKED)) mtx_lock(&pr->pr_mtx); - /* Decrement the user references in a separate loop. */ - if (flags & PD_DEUREF) { - for (tpr = pr;; tpr = tpr->pr_parent) { - if (tpr != pr) - mtx_lock(&tpr->pr_mtx); - if (--tpr->pr_uref > 0) - break; - KASSERT(tpr != &prison0, ("prison0 pr_uref=0")); - mtx_unlock(&tpr->pr_mtx); - } - /* Done if there were only user references to remove. */ - if (!(flags & PD_DEREF)) { - mtx_unlock(&tpr->pr_mtx); - if (flags & PD_LIST_SLOCKED) - sx_sunlock(&allprison_lock); - else if (flags & PD_LIST_XLOCKED) - sx_xunlock(&allprison_lock); - return; - } - if (tpr != pr) { - mtx_unlock(&tpr->pr_mtx); - mtx_lock(&pr->pr_mtx); - } - } - for (;;) { + if (flags & PD_DEUREF) { + pr->pr_uref--; + KASSERT(prison0.pr_uref != 0, ("prison0 pr_uref=0")); + } if (flags & PD_DEREF) pr->pr_ref--; /* If the prison still has references, nothing else to do. */ @@ -2532,7 +2511,7 @@ prison_deref(struct prison *pr, int flag /* Removing a prison frees a reference on its parent. */ pr = ppr; mtx_lock(&pr->pr_mtx); - flags = PD_DEREF; + flags = PD_DEREF | PD_DEUREF; } }