Deleted Added
full compact
rtl8366rb.c (249752) rtl8366rb.c (253569)
1/*-
2 * Copyright (c) 2011-2012 Stefan Bethke.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2011-2012 Stefan Bethke.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/etherswitch/rtl8366/rtl8366rb.c 249752 2013-04-22 05:52:18Z adrian $
26 * $FreeBSD: head/sys/dev/etherswitch/rtl8366/rtl8366rb.c 253569 2013-07-23 13:56:38Z loos $
27 */
28
29#include <sys/param.h>
30#include <sys/bus.h>
31#include <sys/errno.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/socket.h>

--- 579 unchanged lines hidden (view full) ---

614rtl_getvgroup(device_t dev, etherswitch_vlangroup_t *vg)
615{
616 uint16_t vmcr[3];
617 int i;
618
619 for (i=0; i<3; i++)
620 vmcr[i] = rtl_readreg(dev, RTL8366RB_VMCR(i, vg->es_vlangroup));
621
27 */
28
29#include <sys/param.h>
30#include <sys/bus.h>
31#include <sys/errno.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/socket.h>

--- 579 unchanged lines hidden (view full) ---

614rtl_getvgroup(device_t dev, etherswitch_vlangroup_t *vg)
615{
616 uint16_t vmcr[3];
617 int i;
618
619 for (i=0; i<3; i++)
620 vmcr[i] = rtl_readreg(dev, RTL8366RB_VMCR(i, vg->es_vlangroup));
621
622 vg->es_vid = RTL8366RB_VMCR_VID(vmcr);
622 vg->es_vid = RTL8366RB_VMCR_VID(vmcr) | ETHERSWITCH_VID_VALID;
623 vg->es_member_ports = RTL8366RB_VMCR_MEMBER(vmcr);
624 vg->es_untagged_ports = RTL8366RB_VMCR_UNTAG(vmcr);
625 vg->es_fid = RTL8366RB_VMCR_FID(vmcr);
626 return (0);
627}
628
629static int
630rtl_setvgroup(device_t dev, etherswitch_vlangroup_t *vg)

--- 139 unchanged lines hidden ---
623 vg->es_member_ports = RTL8366RB_VMCR_MEMBER(vmcr);
624 vg->es_untagged_ports = RTL8366RB_VMCR_UNTAG(vmcr);
625 vg->es_fid = RTL8366RB_VMCR_FID(vmcr);
626 return (0);
627}
628
629static int
630rtl_setvgroup(device_t dev, etherswitch_vlangroup_t *vg)

--- 139 unchanged lines hidden ---