From owner-freebsd-drivers@freebsd.org Mon May 8 20:37:22 2017 Return-Path: Delivered-To: freebsd-drivers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06198D6312C for ; Mon, 8 May 2017 20:37:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF63118AA for ; Mon, 8 May 2017 20:37:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E5A9E10A7DB; Mon, 8 May 2017 16:37:20 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Subject: Re: uiomove question Date: Mon, 08 May 2017 13:35:42 -0700 Message-ID: <1616964.AnLvBdJceo@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 08 May 2017 16:37:21 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 20:37:22 -0000 On Saturday, March 11, 2017 02:03:06 PM Anindya Mukherjee wrote: > An example of the usage I am talking about: > > xxx_write(...) > { > ... > amount = MIN(uio->uio_resid, // 0. This is the no of bytes in the uio left to write > (BUFFER_SIZE - 1 - uio->uio_offset > 0) ? > BUFFER_SIZE - 1 - uio->uio_offset : 0); // 1. amount to write is computed > //assuming write will happen at uio_offset in sc_buffer > if (amount == 0) > return (error); > error = uiomove(sc->sc_buffer, amount, uio); // 2. sc_buffer is not offset > ... > } > > xxx_read(...) > { > ... > amount = MIN(uio->uio_resid, > (sc->sc_length - uio->uio_offset > 0) ? > sc->sc_length - uio->uio_offset : 0); // 3. Same as comment 1 above > error = uiomove(sc->sc_buffer + uio->uio_offset, amount, uio); // 4. Here buffer is offset > ... > } > > Anindya Yes, I think your point is correct. -- John Baldwin From owner-freebsd-drivers@freebsd.org Wed May 10 06:20:24 2017 Return-Path: Delivered-To: freebsd-drivers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8016AD6557B for ; Wed, 10 May 2017 06:20:24 +0000 (UTC) (envelope-from ram.vegesna@broadcom.com) Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com [IPv6:2a00:1450:4010:c07::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 089EC1FE4 for ; Wed, 10 May 2017 06:20:24 +0000 (UTC) (envelope-from ram.vegesna@broadcom.com) Received: by mail-lf0-x234.google.com with SMTP id h4so13847276lfj.3 for ; Tue, 09 May 2017 23:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=fb+aUGfhIyOrFUOgiEPNc7Ff/0k5OpKjAN5xZHVNR4A=; b=Mqm23vlpg+SYg9KcM+tKOzj9ofV7U/06X5twJi1nMTL2c+rGQGZnvbzpFgbnG563L5 01rAQ2f+kfhEdGN3dTvXwPphsnSuVWxDVP0B/S9bSRiqRTopCeBUAhRsnH9uc+auFUYk BsohiaVl/0q0YxsBwhBFNitIsitMkNSF07MiI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=fb+aUGfhIyOrFUOgiEPNc7Ff/0k5OpKjAN5xZHVNR4A=; b=o0dXRMC9LFDQo5NNCv6zWgBdxKIyRQpPUxJK+wsoP2Y2iDTZvV+PCI4/Ze8mvtaTfW mqWsWr3Lf0z0Vvxmsxgh0N+cAACa5ZcpNQEa2FsCeFvI4ycNWlL+1IM9c5lzhykZ/OBS aJ5aP/esKs9trM6JDj5iq5vfOWpV1Wh2P7Ae3Rc55gfvGLcSbstN3Ruw6iXZofRUPmqU 0Wf1lERrLqEXduegFy0H+b/DNHknxSn/Zqe9Gg48MBc/8pQmB6L5PkHUZyvxGtLyc1Ws ZuEURhABaaMRvjV2m/CBjn+/o3bmfzaZKe9r9YuRTOv+i+5+TqUwIXMIY9kmmzUNR8f6 VHzQ== X-Gm-Message-State: AODbwcC596zeNwMdaUatcwTa3CIyHCLE5cutcr3nw5jb3fuwiVjApUth 1Qwo/gRTL0cRty4OjDF0QRG3vorhq3ZM X-Received: by 10.25.202.93 with SMTP id h29mr2099334lfj.139.1494397221711; Tue, 09 May 2017 23:20:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.80.70 with HTTP; Tue, 9 May 2017 23:20:21 -0700 (PDT) From: Ram Kishore Vegesna Date: Wed, 10 May 2017 11:50:21 +0530 Message-ID: Subject: Upstream Request: Fiber channel driver for Broadcom/Emulex FC host bus adapter. To: freebsd-drivers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 06:20:24 -0000 Hi all, We are planning to upstream/inbox our FreeBSD cam driver which supports Emulex FC host bus adapters (LPe16xx and LPe32xx family). Please provide me the inputs on up-streaming driver process for FreeBSD. If you can share any documents related to that will be of great help. Thanks, Ram