]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / XhciDxe / Xhci.c
index f1c60bef01c011f33d34b3dd312864b924df717c..43c53bad4e4a654f4ca10c9d50a6a6d85327054e 100644 (file)
@@ -2,13 +2,7 @@
   The XHCI controller driver.\r
 \r
 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -1346,7 +1340,6 @@ XhcAsyncInterruptTransfer (
   EFI_STATUS              Status;\r
   UINT8                   SlotId;\r
   UINT8                   Index;\r
-  UINT8                   *Data;\r
   EFI_TPL                 OldTpl;\r
 \r
   //\r
@@ -1413,36 +1406,21 @@ XhcAsyncInterruptTransfer (
     goto ON_EXIT;\r
   }\r
 \r
-  Data = AllocateZeroPool (DataLength);\r
-\r
-  if (Data == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "XhcAsyncInterruptTransfer: failed to allocate buffer\n"));\r
-    Status = EFI_OUT_OF_RESOURCES;\r
-    goto ON_EXIT;\r
-  }\r
-\r
-  Urb = XhcCreateUrb (\r
+  Urb = XhciInsertAsyncIntTransfer (\r
           Xhc,\r
           DeviceAddress,\r
           EndPointAddress,\r
           DeviceSpeed,\r
           MaximumPacketLength,\r
-          XHC_INT_TRANSFER_ASYNC,\r
-          NULL,\r
-          Data,\r
           DataLength,\r
           CallBackFunction,\r
           Context\r
           );\r
-\r
   if (Urb == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "XhcAsyncInterruptTransfer: failed to create URB\n"));\r
-    FreePool (Data);\r
     Status = EFI_OUT_OF_RESOURCES;\r
     goto ON_EXIT;\r
   }\r
 \r
-  InsertHeadList (&Xhc->AsyncIntTransfers, &Urb->UrbList);\r
   //\r
   // Ring the doorbell\r
   //\r