From owner-svn-src-head@freebsd.org Wed Mar 2 02:27:15 2016 Return-Path: Delivered-To: svn-src-head@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 6D2F1AC0762; Wed, 2 Mar 2016 02:27:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E32F1CFA; Wed, 2 Mar 2016 02:27:15 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u222REWJ017594; Wed, 2 Mar 2016 02:27:14 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u222RE0Q017592; Wed, 2 Mar 2016 02:27:14 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201603020227.u222RE0Q017592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 2 Mar 2016 02:27:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296293 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 02:27:15 -0000 Author: sephe Date: Wed Mar 2 02:27:13 2016 New Revision: 296293 URL: https://svnweb.freebsd.org/changeset/base/296293 Log: hyperv/hn: Pass channel to hv_nv_on_receive_completion() While I'm here, staticize this function. Submitted by: Hongjiang Zhang Modified by: sephe MFC after: 1 week Sponsored by: Microsoft OSTC Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Mar 2 02:12:01 2016 (r296292) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Mar 2 02:27:13 2016 (r296293) @@ -62,6 +62,8 @@ static int hv_nv_destroy_rx_buffer(netv static int hv_nv_connect_to_vsp(struct hv_device *device); static void hv_nv_on_send_completion(netvsc_dev *net_dev, struct hv_device *device, hv_vm_packet_descriptor *pkt); +static void hv_nv_on_receive_completion(struct hv_vmbus_channel *chan, + uint64_t tid, uint32_t status); static void hv_nv_on_receive(netvsc_dev *net_dev, struct hv_device *device, struct hv_vmbus_channel *chan, hv_vm_packet_descriptor *pkt); @@ -911,7 +913,7 @@ hv_nv_on_receive(netvsc_dev *net_dev, st * messages (not just data messages) will trigger a response * message back to the host. */ - hv_nv_on_receive_completion(device, vm_xfer_page_pkt->d.transaction_id, + hv_nv_on_receive_completion(chan, vm_xfer_page_pkt->d.transaction_id, status); } @@ -920,8 +922,8 @@ hv_nv_on_receive(netvsc_dev *net_dev, st * * Send a receive completion packet to RNDIS device (ie NetVsp) */ -void -hv_nv_on_receive_completion(struct hv_device *device, uint64_t tid, +static void +hv_nv_on_receive_completion(struct hv_vmbus_channel *chan, uint64_t tid, uint32_t status) { nvsp_msg rx_comp_msg; @@ -936,7 +938,7 @@ hv_nv_on_receive_completion(struct hv_de retry_send_cmplt: /* Send the completion */ - ret = hv_vmbus_channel_send_packet(device->channel, &rx_comp_msg, + ret = hv_vmbus_channel_send_packet(chan, &rx_comp_msg, sizeof(nvsp_msg), tid, HV_VMBUS_PACKET_TYPE_COMPLETION, 0); if (ret == 0) { /* success */ Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Mar 2 02:12:01 2016 (r296292) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Wed Mar 2 02:27:13 2016 (r296293) @@ -1095,8 +1095,6 @@ typedef struct hn_softc { extern int hv_promisc_mode; void netvsc_linkstatus_callback(struct hv_device *device_obj, uint32_t status); -void hv_nv_on_receive_completion(struct hv_device *device, - uint64_t tid, uint32_t status); netvsc_dev *hv_nv_on_device_add(struct hv_device *device, void *additional_info); int hv_nv_on_device_remove(struct hv_device *device,