]> git.pld-linux.org Git - packages/VirtualBox.git/blob - linux-4.14.patch
upstream fixes for linux 4.14 (r69143, r69525, r69539)
[packages/VirtualBox.git] / linux-4.14.patch
1 Index: src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
2 ===================================================================
3 --- src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c    (revision 69538)
4 +++ src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c    (revision 69539)
5 @@ -746,9 +746,6 @@
6          case PDMNETWORKGSOTYPE_IPV4_TCP:
7              fGsoType = SKB_GSO_TCPV4;
8              break;
9 -        case PDMNETWORKGSOTYPE_IPV4_UDP:
10 -            fGsoType = SKB_GSO_UDP;
11 -            break;
12          case PDMNETWORKGSOTYPE_IPV6_TCP:
13              fGsoType = SKB_GSO_TCPV6;
14              break;
15 @@ -1282,7 +1279,7 @@
16       * Check the GSO properties of the socket buffer and make sure it fits.
17       */
18      /** @todo Figure out how to handle SKB_GSO_TCP_ECN! */
19 -    if (RT_UNLIKELY( skb_shinfo(pSkb)->gso_type & ~(SKB_GSO_UDP | SKB_GSO_DODGY | SKB_GSO_TCPV6 | SKB_GSO_TCPV4) ))
20 +    if (RT_UNLIKELY( skb_shinfo(pSkb)->gso_type & ~(SKB_GSO_DODGY | SKB_GSO_TCPV6 | SKB_GSO_TCPV4) ))
21      {
22          Log5(("vboxNetFltLinuxCanForwardAsGso: gso_type=%#x\n", skb_shinfo(pSkb)->gso_type));
23          return false;
24 @@ -1532,7 +1529,7 @@
25          }
26  #endif /* !VBOXNETFLT_SG_SUPPORT */
27  # ifdef VBOXNETFLT_WITH_GSO_RECV
28 -        if (   (skb_shinfo(pBuf)->gso_type & (SKB_GSO_UDP | SKB_GSO_TCPV6 | SKB_GSO_TCPV4))
29 +        if (   (skb_shinfo(pBuf)->gso_type & (SKB_GSO_TCPV6 | SKB_GSO_TCPV4))
30              && vboxNetFltLinuxCanForwardAsGso(pThis, pBuf, fSrc, &GsoCtx) )
31              vboxNetFltLinuxForwardAsGso(pThis, pBuf, fSrc, &GsoCtx);
32          else
33 @@ -1708,17 +1705,9 @@
34                  fGsoCapabilites |= RT_BIT_32(PDMNETWORKGSOTYPE_IPV4_TCP);
35              if (fFeatures & NETIF_F_TSO6)
36                  fGsoCapabilites |= RT_BIT_32(PDMNETWORKGSOTYPE_IPV6_TCP);
37 -# if 0 /** @todo GSO: Test UDP offloading (UFO) on linux. */
38 -            if (fFeatures & NETIF_F_UFO)
39 -                fGsoCapabilites |= RT_BIT_32(PDMNETWORKGSOTYPE_IPV4_UDP);
40 -            if (fFeatures & NETIF_F_UFO)
41 -                fGsoCapabilites |= RT_BIT_32(PDMNETWORKGSOTYPE_IPV6_UDP);
42 -# endif
43              Log3(("vboxNetFltLinuxReportNicGsoCapabilities: reporting wire %s%s%s%s\n",
44                    (fGsoCapabilites & RT_BIT_32(PDMNETWORKGSOTYPE_IPV4_TCP)) ? "tso " : "",
45 -                  (fGsoCapabilites & RT_BIT_32(PDMNETWORKGSOTYPE_IPV6_TCP)) ? "tso6 " : "",
46 -                  (fGsoCapabilites & RT_BIT_32(PDMNETWORKGSOTYPE_IPV4_UDP)) ? "ufo " : "",
47 -                  (fGsoCapabilites & RT_BIT_32(PDMNETWORKGSOTYPE_IPV6_UDP)) ? "ufo6 " : ""));
48 +                  (fGsoCapabilites & RT_BIT_32(PDMNETWORKGSOTYPE_IPV6_TCP)) ? "tso6 " : ""));
49              pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, fGsoCapabilites, INTNETTRUNKDIR_WIRE);
50          }
51  
52 @@ -2411,15 +2400,11 @@
53       */
54      /** @todo duplicate work here now? Attach */
55  #if defined(VBOXNETFLT_WITH_GSO_XMIT_HOST)
56 -    Log3(("vboxNetFltOsConnectIt: reporting host tso tso6 ufo\n"));
57 +    Log3(("vboxNetFltOsConnectIt: reporting host tso tso6\n"));
58      pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort,
59                                                   0
60                                                   | RT_BIT_32(PDMNETWORKGSOTYPE_IPV4_TCP)
61                                                   | RT_BIT_32(PDMNETWORKGSOTYPE_IPV6_TCP)
62 -                                                 | RT_BIT_32(PDMNETWORKGSOTYPE_IPV4_UDP)
63 -# if 0 /** @todo GSO: Test UDP offloading (UFO) on linux. */
64 -                                                 | RT_BIT_32(PDMNETWORKGSOTYPE_IPV6_UDP)
65 -# endif
66                                                   , INTNETTRUNKDIR_HOST);
67  
68  #endif
69 Index: src/VBox/Additions/linux/drm/vbox_mode.c
70 ===================================================================
71 --- src/VBox/Additions/linux/drm/vbox_mode.c    (revision 69524)
72 +++ src/VBox/Additions/linux/drm/vbox_mode.c    (revision 69525)
73 @@ -151,11 +151,6 @@
74         return 0;
75  }
76  
77 -static void vbox_crtc_load_lut(struct drm_crtc *crtc)
78 -{
79 -
80 -}
81 -
82  static void vbox_crtc_dpms(struct drm_crtc *crtc, int mode)
83  {
84         struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
85 @@ -348,7 +344,6 @@
86      .mode_set = vbox_crtc_mode_set,
87      /* .mode_set_base = vbox_crtc_mode_set_base, */
88      .disable = vbox_crtc_disable,
89 -    .load_lut = vbox_crtc_load_lut,
90      .prepare = vbox_crtc_prepare,
91      .commit = vbox_crtc_commit,
92  
93 Index: src/VBox/Additions/linux/drm/vbox_fb.c
94 ===================================================================
95 --- src/VBox/Additions/linux/drm/vbox_fb.c      (revision 69142)
96 +++ src/VBox/Additions/linux/drm/vbox_fb.c      (revision 69143)
97 @@ -338,23 +338,7 @@
98         return 0;
99  }
100  
101 -static void vbox_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
102 -                   u16 blue, int regno)
103 -{
104 -
105 -}
106 -
107 -static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
108 -                   u16 *blue, int regno)
109 -{
110 -    *red = regno;
111 -    *green = regno;
112 -    *blue = regno;
113 -}
114 -
115  static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
116 -    .gamma_set = vbox_fb_gamma_set,
117 -    .gamma_get = vbox_fb_gamma_get,
118      .fb_probe = vboxfb_create,
119  };
120  
121 Index: src/VBox/Additions/linux/drm/vbox_drv.c
122 ===================================================================
123 --- src/VBox/Additions/linux/drm/vbox_drv.c     (revision 69142)
124 +++ src/VBox/Additions/linux/drm/vbox_drv.c     (revision 69143)
125 @@ -272,7 +272,9 @@
126      .master_set = vbox_master_set,
127      .master_drop = vbox_master_drop,
128  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) || defined(RHEL_73)
129 +# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
130      .set_busid = drm_pci_set_busid,
131 +# endif
132  #endif
133  
134      .fops = &vbox_fops,
135 @@ -307,7 +309,7 @@
136  
137  static int __init vbox_init(void)
138  {
139 -#ifdef CONFIG_VGA_CONSOLE
140 +#ifdef CONFIG_VGA_CONSOLE || LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
141      if (vgacon_text_force() && vbox_modeset == -1)
142          return -EINVAL;
143  #endif
144 @@ -315,11 +317,11 @@
145      if (vbox_modeset == 0)
146          return -EINVAL;
147  
148 -    return drm_pci_init(&driver, &vbox_pci_driver);
149 +    return pci_register_driver(&vbox_pci_driver);
150  }
151  static void __exit vbox_exit(void)
152  {
153 -    drm_pci_exit(&driver, &vbox_pci_driver);
154 +    pci_unregister_driver(&vbox_pci_driver);
155  }
156  
157  module_init(vbox_init);
This page took 0.05593 seconds and 4 git commands to generate.