From owner-svn-src-projects@FreeBSD.ORG Sun May 22 19:58:18 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81756106566B; Sun, 22 May 2011 19:58:18 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68AD08FC19; Sun, 22 May 2011 19:58: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 p4MJwIQZ088270; Sun, 22 May 2011 19:58:18 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MJwIPe088265; Sun, 22 May 2011 19:58:18 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201105221958.p4MJwIPe088265@svn.freebsd.org> From: Sean Bruno Date: Sun, 22 May 2011 19:58:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222192 - in projects/stable_7_xen/sys: dev/xen/blkfront dev/xen/netfront xen/evtchn xen/xenstore X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 19:58:18 -0000 Author: sbruno Date: Sun May 22 19:58:18 2011 New Revision: 222192 URL: http://svn.freebsd.org/changeset/base/222192 Log: Update from Yahoo BSD 7 branch. This captures updates from FreeBSD -HEAD Obtained from: Yahoo! Inc. Modified: projects/stable_7_xen/sys/dev/xen/blkfront/blkfront.c projects/stable_7_xen/sys/dev/xen/netfront/netfront.c projects/stable_7_xen/sys/xen/evtchn/evtchn.c projects/stable_7_xen/sys/xen/xenstore/xenstore.c Modified: projects/stable_7_xen/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- projects/stable_7_xen/sys/dev/xen/blkfront/blkfront.c Sun May 22 19:56:14 2011 (r222191) +++ projects/stable_7_xen/sys/dev/xen/blkfront/blkfront.c Sun May 22 19:58:18 2011 (r222192) @@ -508,7 +508,7 @@ blkfront_initialize(struct xb_softc *sc) sc->ring_pages = 1; sc->max_requests = BLKIF_MAX_RING_REQUESTS(PAGE_SIZE); sc->max_request_segments = BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK; - sc->max_request_size = sc->max_request_segments * PAGE_SIZE; + sc->max_request_size = (sc->max_request_segments - 1) * PAGE_SIZE; sc->max_request_blocks = BLKIF_SEGS_TO_BLOCKS(sc->max_request_segments); /* Modified: projects/stable_7_xen/sys/dev/xen/netfront/netfront.c ============================================================================== --- projects/stable_7_xen/sys/dev/xen/netfront/netfront.c Sun May 22 19:56:14 2011 (r222191) +++ projects/stable_7_xen/sys/dev/xen/netfront/netfront.c Sun May 22 19:58:18 2011 (r222192) @@ -1277,7 +1277,6 @@ xennet_get_responses(struct netfront_inf struct mbuf *m, *m0, *m_prev; grant_ref_t ref = xennet_get_rx_ref(np, *cons); RING_IDX ref_cons = *cons; - int max = 5 /* MAX_TX_REQ_FRAGS + (rx->status <= RX_COPY_THRESHOLD) */; int frags = 1; int err = 0; u_long ret; @@ -1425,19 +1424,10 @@ next_skip_queue: } *list = m0; - if (unlikely(frags > max)) { - if (net_ratelimit()) - WPRINTK("Too many frags\n"); - printf("%s: too many frags %d > max %d\n", __func__, frags, - max); - err = E2BIG; - } - *cons += frags; - *pages_flipped_p = pages_flipped; - return err; + return (err); } static void Modified: projects/stable_7_xen/sys/xen/evtchn/evtchn.c ============================================================================== --- projects/stable_7_xen/sys/xen/evtchn/evtchn.c Sun May 22 19:56:14 2011 (r222191) +++ projects/stable_7_xen/sys/xen/evtchn/evtchn.c Sun May 22 19:58:18 2011 (r222192) @@ -615,6 +615,7 @@ static void xenpic_dynirq_enable_sou static void xenpic_dynirq_disable_source(struct intsrc *isrc, int); static void xenpic_dynirq_eoi_source(struct intsrc *isrc); static void xenpic_dynirq_enable_intr(struct intsrc *isrc); +static void xenpic_dynirq_disable_intr(struct intsrc *isrc); static void xenpic_pirq_enable_source(struct intsrc *isrc); static void xenpic_pirq_disable_source(struct intsrc *isrc, int); @@ -626,7 +627,7 @@ static int xenpic_vector(struct int static int xenpic_source_pending(struct intsrc *isrc); static void xenpic_suspend(struct pic* pic); static void xenpic_resume(struct pic* pic); -static void xenpic_assign_cpu(struct intsrc *, u_int apic_id); +static int xenpic_assign_cpu(struct intsrc *, u_int apic_id); struct pic xenpic_dynirq_template = { @@ -645,6 +646,7 @@ struct pic xenpic_pirq_template = { .pic_disable_source = xenpic_pirq_disable_source, .pic_eoi_source = xenpic_pirq_eoi_source, .pic_enable_intr = xenpic_pirq_enable_intr, + .pic_disable_intr = xenpic_dynirq_disable_intr, .pic_vector = xenpic_vector, .pic_source_pending = xenpic_source_pending, .pic_suspend = xenpic_suspend, @@ -702,6 +704,20 @@ xenpic_dynirq_enable_intr(struct intsrc mtx_unlock_spin(&irq_mapping_update_lock); } +static void +xenpic_dynirq_disable_intr(struct intsrc *isrc) +{ + unsigned int irq; + struct xenpic_intsrc *xp; + + xp = (struct xenpic_intsrc *)isrc; + mtx_lock_spin(&irq_mapping_update_lock); + irq = xenpic_vector(isrc); + mask_evtchn(evtchn_from_irq(irq)); + xp->xp_masked = 1; + mtx_unlock_spin(&irq_mapping_update_lock); +} + static void xenpic_dynirq_eoi_source(struct intsrc *isrc) { @@ -752,10 +768,11 @@ xenpic_resume(struct pic* pic) TODO; } -static void +static int xenpic_assign_cpu(struct intsrc *isrc, u_int apic_id) { TODO; + return (EOPNOTSUPP); } void Modified: projects/stable_7_xen/sys/xen/xenstore/xenstore.c ============================================================================== --- projects/stable_7_xen/sys/xen/xenstore/xenstore.c Sun May 22 19:56:14 2011 (r222191) +++ projects/stable_7_xen/sys/xen/xenstore/xenstore.c Sun May 22 19:58:18 2011 (r222192) @@ -1102,7 +1102,6 @@ xs_probe(device_t dev) * Uncontitionally return success. */ device_set_desc(dev, "XenStore"); -printf("xs_probe: Probe retuns 0\n"); return (0); }