summaryrefslogtreecommitdiffstats
BranchCommit messageAuthorAge
12m23.github/codeql/edk2.qls: Enable CWE 120, 787, and 805 queriesMichael Kubacki2 years
9m11_23MdeModulePkg/HiiDatabase: Fix incorrect AllocateCopyPool sizeMike Beaton17 months
MdePkg_Acpi_1109MdePkg: Fix ACPI memory aggregator/device type mismatchChris Jones3 years
UDK2008sync patch r11075, r11087, r11088, r11091, r11092, r11119 from main trunk.lgao413 years
UDK2010Sync part of patch r12514 from main trunk.vanjeff13 years
UDK2010.SR1Copy head(r18255) from main trunk excluding UNI files.Jeff Fan10 years
UDK2014CodeModule: BaseTools - tools_def.txt VS2010, VS2010x86, VS2012 and VS2012x86...lhauch11 years
UDK2014.SP1MdeModulePkg/SmmCorePerfLib: [CVE-2017-5753] Fix bounds check bypassHao Wu6 years
UDK2015SecurityPkg/OpalPWSupportLib: [CVE-2017-5753] Fix bounds check bypassHao Wu6 years
UDK2017SecurityPkg/OpalPasswordExtraInfoVariable.h: Remove the deprecated guid and v...Eric Dong6 years
UDK2018UefiCpuPkg/PiSmmCpuDxeSmm: [CVE-2017-5753] Fix bounds check bypassHao Wu6 years
advisory-fix-1MdePkg: Fix overflow issue in BasePeCoffLib: PeCoffLoaderRelocateImageDoug Flick5 months
dependabot/github_actions/actions/cache-4GitHub Action: Bump actions/cache from 3 to 4dependabot[bot]12 months
dependabot/github_actions/actions/checkout-4GitHub Action: Bump actions/checkout from 3 to 4dependabot[bot]16 months
dependabot/github_actions/actions/setup-python-5GitHub Action: Bump actions/setup-python from 4 to 5dependabot[bot]14 months
dependabot/github_actions/actions/stale-9GitHub Action: Bump actions/stale from 8 to 9dependabot[bot]14 months
dependabot/github_actions/actions/upload-artifact-4GitHub Action: Bump actions/upload-artifact from 3 to 4dependabot[bot]13 months
dependabot/github_actions/github/codeql-action-3GitHub Action: Bump github/codeql-action from 2 to 3dependabot[bot]13 months
dependabot/github_actions/github/issue-labeler-3.4Merge branch 'master' into dependabot/github_actions/github/issue-labeler-3.4mergify[bot]6 months
dependabot/pip/antlr4-python3-runtime-4.11.1pip: bump antlr4-python3-runtime from 4.7.1 to 4.11.1dependabot[bot]2 years
dependabot/pip/antlr4-python3-runtime-4.12.0pip: bump antlr4-python3-runtime from 4.7.1 to 4.12.0dependabot[bot]23 months
dependabot/pip/antlr4-python3-runtime-4.13.0pip: bump antlr4-python3-runtime from 4.7.1 to 4.13.0dependabot[bot]20 months
dependabot/pip/antlr4-python3-runtime-4.13.1pip: bump antlr4-python3-runtime from 4.7.1 to 4.13.1dependabot[bot]16 months
dependabot/pip/antlr4-python3-runtime-4.13.2pip: bump antlr4-python3-runtime from 4.7.1 to 4.13.2dependabot[bot]7 months
dependabot/pip/edk2-basetools-0.1.40pip: bump edk2-basetools from 0.1.39 to 0.1.40dependabot[bot]24 months
dependabot/pip/edk2-basetools-0.1.44pip: bump edk2-basetools from 0.1.43 to 0.1.44dependabot[bot]22 months
dependabot/pip/edk2-basetools-0.1.45pip: bump edk2-basetools from 0.1.43 to 0.1.45dependabot[bot]22 months
dependabot/pip/edk2-basetools-0.1.46pip: bump edk2-basetools from 0.1.43 to 0.1.46dependabot[bot]22 months
dependabot/pip/edk2-basetools-0.1.47pip: bump edk2-basetools from 0.1.43 to 0.1.47dependabot[bot]22 months
dependabot/pip/edk2-basetools-0.1.48pip: bump edk2-basetools from 0.1.43 to 0.1.48dependabot[bot]21 months
dependabot/pip/edk2-basetools-0.1.49pip: bump edk2-basetools from 0.1.48 to 0.1.49dependabot[bot]20 months
dependabot/pip/edk2-basetools-0.1.50pip: bump edk2-basetools from 0.1.48 to 0.1.50dependabot[bot]12 months
dependabot/pip/edk2-basetools-0.1.51pip: bump edk2-basetools from 0.1.48 to 0.1.51dependabot[bot]12 months
dependabot/pip/edk2-basetools-0.1.52pip: bump edk2-basetools from 0.1.51 to 0.1.52dependabot[bot]7 months
dependabot/pip/edk2-basetools-0.1.53pip: bump edk2-basetools from 0.1.51 to 0.1.53dependabot[bot]7 months
dependabot/pip/edk2-pytool-extensions-0.27.0pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.0dependabot[bot]13 months
dependabot/pip/edk2-pytool-extensions-0.27.1pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.1dependabot[bot]13 months
dependabot/pip/edk2-pytool-extensions-0.27.10pip: bump edk2-pytool-extensions from 0.27.6 to 0.27.10dependabot[bot]7 months
dependabot/pip/edk2-pytool-extensions-0.27.11pip: bump edk2-pytool-extensions from 0.27.6 to 0.27.11dependabot[bot]6 months
dependabot/pip/edk2-pytool-extensions-0.27.12pip: bump edk2-pytool-extensions from 0.27.6 to 0.27.12dependabot[bot]5 months
dependabot/pip/edk2-pytool-extensions-0.27.2pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.2dependabot[bot]12 months
dependabot/pip/edk2-pytool-extensions-0.27.3pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.3dependabot[bot]11 months
dependabot/pip/edk2-pytool-extensions-0.27.4pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.4dependabot[bot]9 months
dependabot/pip/edk2-pytool-extensions-0.27.5pip: bump edk2-pytool-extensions from 0.26.4 to 0.27.5dependabot[bot]9 months
dependabot/pip/edk2-pytool-extensions-0.27.6pip: bump edk2-pytool-extensions from 0.27.5 to 0.27.6dependabot[bot]8 months
dependabot/pip/edk2-pytool-extensions-0.27.8pip: bump edk2-pytool-extensions from 0.27.6 to 0.27.8dependabot[bot]8 months
dependabot/pip/edk2-pytool-extensions-0.27.9pip: bump edk2-pytool-extensions from 0.27.6 to 0.27.9dependabot[bot]7 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.20.1pip: update edk2-pytool-extensions requirement from ~=0.20.0 to ~=0.20.1dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.21.0pip: update edk2-pytool-extensions requirement from ~=0.20.0 to ~=0.21.0dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.21.1pip: update edk2-pytool-extensions requirement from ~=0.20.0 to ~=0.21.1dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.21.2pip: update edk2-pytool-extensions requirement from ~=0.20.0 to ~=0.21.2dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.21.6pip: update edk2-pytool-extensions requirement from ~=0.20.0 to ~=0.21.6dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.21.7pip: update edk2-pytool-extensions requirement from ~=0.20.0 to ~=0.21.7dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.21.8pip: update edk2-pytool-extensions requirement from ~=0.20.0 to ~=0.21.8dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.22.0pip: update edk2-pytool-extensions requirement from ~=0.21.8 to ~=0.22.0dependabot[bot]2 years
dependabot/pip/edk2-pytool-extensions-approx-eq-0.22.1pip: update edk2-pytool-extensions requirement from ~=0.21.8 to ~=0.22.1dependabot[bot]24 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.22.2pip: update edk2-pytool-extensions requirement from ~=0.21.8 to ~=0.22.2dependabot[bot]23 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.0pip: update edk2-pytool-extensions requirement from ~=0.21.8 to ~=0.23.0dependabot[bot]22 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.10pip: update edk2-pytool-extensions requirementdependabot[bot]18 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.2pip: update edk2-pytool-extensions requirement from ~=0.21.8 to ~=0.23.2dependabot[bot]21 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.3pip: update edk2-pytool-extensions requirement from ~=0.21.8 to ~=0.23.3dependabot[bot]21 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.4pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.23.4dependabot[bot]21 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.5pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.23.5dependabot[bot]21 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.6pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.23.6dependabot[bot]20 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.8pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.23.8dependabot[bot]19 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.23.9pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.23.9dependabot[bot]19 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.24.1pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.24.1dependabot[bot]17 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.25.0pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.25.0dependabot[bot]16 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.25.1pip: update edk2-pytool-extensions requirement from ~=0.23.2 to ~=0.25.1dependabot[bot]16 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.26.0pip: update edk2-pytool-extensions requirement from ~=0.25.1 to ~=0.26.0dependabot[bot]15 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.26.2pip: update edk2-pytool-extensions requirement from ~=0.25.1 to ~=0.26.2dependabot[bot]14 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.26.3pip: update edk2-pytool-extensions requirement from ~=0.25.1 to ~=0.26.3dependabot[bot]14 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.26.4pip: update edk2-pytool-extensions requirement from ~=0.25.1 to ~=0.26.4dependabot[bot]14 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.28.0pip: update edk2-pytool-extensions requirementdependabot[bot]3 months
dependabot/pip/edk2-pytool-extensions-approx-eq-0.28.1pip: update edk2-pytool-extensions requirementdependabot[bot]3 weeks
dependabot/pip/edk2-pytool-extensions-approx-eq-0.28.2pip: update edk2-pytool-extensions requirementdependabot[bot]9 days
dependabot/pip/edk2-pytool-extensions-approx-eq-0.28.3pip: update edk2-pytool-extensions requirementdependabot[bot]2 days
dependabot/pip/edk2-pytool-library-0.13.0pip: bump edk2-pytool-library from 0.12.1 to 0.13.0dependabot[bot]2 years
dependabot/pip/edk2-pytool-library-0.13.1pip: bump edk2-pytool-library from 0.12.1 to 0.13.1dependabot[bot]2 years
dependabot/pip/edk2-pytool-library-0.14.0pip: bump edk2-pytool-library from 0.12.1 to 0.14.0dependabot[bot]2 years
dependabot/pip/edk2-pytool-library-0.14.1pip: bump edk2-pytool-library from 0.14.0 to 0.14.1dependabot[bot]22 months
dependabot/pip/edk2-pytool-library-0.15.0pip: bump edk2-pytool-library from 0.14.0 to 0.15.0dependabot[bot]21 months
dependabot/pip/edk2-pytool-library-0.15.1pip: bump edk2-pytool-library from 0.14.1 to 0.15.1dependabot[bot]21 months
dependabot/pip/edk2-pytool-library-0.15.2pip: bump edk2-pytool-library from 0.14.1 to 0.15.2dependabot[bot]21 months
dependabot/pip/edk2-pytool-library-0.15.3pip: bump edk2-pytool-library from 0.14.1 to 0.15.3dependabot[bot]19 months
dependabot/pip/edk2-pytool-library-0.15.4pip: bump edk2-pytool-library from 0.14.1 to 0.15.4dependabot[bot]19 months
dependabot/pip/edk2-pytool-library-0.16.1pip: bump edk2-pytool-library from 0.14.1 to 0.16.1dependabot[bot]19 months
dependabot/pip/edk2-pytool-library-0.16.2pip: bump edk2-pytool-library from 0.14.1 to 0.16.2dependabot[bot]18 months
dependabot/pip/edk2-pytool-library-0.17.0pip: bump edk2-pytool-library from 0.14.1 to 0.17.0dependabot[bot]18 months
dependabot/pip/edk2-pytool-library-0.18.2pip: bump edk2-pytool-library from 0.14.1 to 0.18.2dependabot[bot]17 months
dependabot/pip/edk2-pytool-library-0.19.0pip: bump edk2-pytool-library from 0.14.1 to 0.19.0dependabot[bot]16 months
dependabot/pip/edk2-pytool-library-0.19.1pip: bump edk2-pytool-library from 0.14.1 to 0.19.1dependabot[bot]16 months
dependabot/pip/edk2-pytool-library-0.19.2pip: bump edk2-pytool-library from 0.15.3 to 0.19.2dependabot[bot]16 months
dependabot/pip/edk2-pytool-library-0.19.3pip: bump edk2-pytool-library from 0.15.3 to 0.19.3dependabot[bot]16 months
dependabot/pip/edk2-pytool-library-0.19.4pip: bump edk2-pytool-library from 0.19.3 to 0.19.4dependabot[bot]15 months
dependabot/pip/edk2-pytool-library-0.19.5pip: bump edk2-pytool-library from 0.19.3 to 0.19.5dependabot[bot]15 months
dependabot/pip/edk2-pytool-library-0.19.6pip: bump edk2-pytool-library from 0.19.3 to 0.19.6dependabot[bot]15 months
dependabot/pip/edk2-pytool-library-0.19.7pip: bump edk2-pytool-library from 0.19.3 to 0.19.7dependabot[bot]14 months
dependabot/pip/edk2-pytool-library-0.19.8pip: bump edk2-pytool-library from 0.19.3 to 0.19.8dependabot[bot]14 months
dependabot/pip/edk2-pytool-library-0.20.0pip: bump edk2-pytool-library from 0.19.9 to 0.20.0dependabot[bot]13 months
dependabot/pip/edk2-pytool-library-0.21.10pip: bump edk2-pytool-library from 0.21.8 to 0.21.10dependabot[bot]7 months
dependabot/pip/edk2-pytool-library-0.21.2pip: bump edk2-pytool-library from 0.19.9 to 0.21.2dependabot[bot]12 months
dependabot/pip/edk2-pytool-library-0.21.3pip: bump edk2-pytool-library from 0.19.9 to 0.21.3dependabot[bot]12 months
dependabot/pip/edk2-pytool-library-0.21.4pip: bump edk2-pytool-library from 0.19.9 to 0.21.4dependabot[bot]11 months
dependabot/pip/edk2-pytool-library-0.21.5pip: bump edk2-pytool-library from 0.20.0 to 0.21.5dependabot[bot]9 months
dependabot/pip/edk2-pytool-library-0.21.6pip: bump edk2-pytool-library from 0.21.5 to 0.21.6dependabot[bot]9 months
dependabot/pip/edk2-pytool-library-0.21.7pip: bump edk2-pytool-library from 0.21.5 to 0.21.7dependabot[bot]8 months
dependabot/pip/edk2-pytool-library-0.21.8pip: bump edk2-pytool-library from 0.21.5 to 0.21.8dependabot[bot]8 months
dependabot/pip/edk2-pytool-library-0.21.9pip: bump edk2-pytool-library from 0.21.8 to 0.21.9dependabot[bot]7 months
dependabot/pip/edk2-pytool-library-approx-eq-0.21.11pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.21.11dependabot[bot]5 months
dependabot/pip/edk2-pytool-library-approx-eq-0.21.12pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.21.12dependabot[bot]4 months
dependabot/pip/edk2-pytool-library-approx-eq-0.22.0pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.22.0dependabot[bot]4 months
dependabot/pip/edk2-pytool-library-approx-eq-0.22.2pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.22.2dependabot[bot]3 months
dependabot/pip/edk2-pytool-library-approx-eq-0.22.3pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.22.3dependabot[bot]2 months
dependabot/pip/edk2-pytool-library-approx-eq-0.22.4pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.22.4dependabot[bot]7 weeks
dependabot/pip/edk2-pytool-library-approx-eq-0.22.5pip: update edk2-pytool-library requirement from ~=0.21.9 to ~=0.22.5dependabot[bot]3 weeks
dependabot/pip/regex-2023.10.3pip: bump regex from 2023.8.8 to 2023.10.3dependabot[bot]16 months
dependabot/pip/regex-2023.12.25pip: bump regex from 2023.8.8 to 2023.12.25dependabot[bot]14 months
dependabot/pip/regex-2024.11.6pip: bump regex from 2024.7.24 to 2024.11.6dependabot[bot]3 months
dependabot/pip/regex-2024.4.16pip: bump regex from 2023.12.25 to 2024.4.16dependabot[bot]10 months
dependabot/pip/regex-2024.4.28pip: bump regex from 2023.12.25 to 2024.4.28dependabot[bot]10 months
dependabot/pip/regex-2024.5.10pip: bump regex from 2023.12.25 to 2024.5.10dependabot[bot]9 months
dependabot/pip/regex-2024.5.15pip: bump regex from 2023.12.25 to 2024.5.15dependabot[bot]9 months
dependabot/pip/regex-2024.7.24pip: bump regex from 2024.5.15 to 2024.7.24dependabot[bot]7 months
dependabot/pip/regex-2024.9.11pip: bump regex from 2024.7.24 to 2024.9.11dependabot[bot]4 months
edk2-add-security-policy-patch-1Create SECURITY.mdmiki-intel-work3 years
leiflindholm-pr-templateMerge branch 'master' into leiflindholm-pr-templatemergify[bot]8 months
masterIntelFsp2Pkg: Fixing TemporaryRamSize Configurability option.Aravind P R2 days
release/rpl_programBaseTools: BinToPcd: Remove xdrlib dependencyJoey Vagedes8 months
security-advisory/cve-2024-38796/advisoryNetworkPkg/Dhcp6Dxe: Fix extraneous parenthesesMike Beaton5 months
stable/202011MdeModulePkg/Library/VarCheckLib: Allow SetVariable from SMMMichael D Kinney4 years
stable/202408UnitTestFrameworkPkg: Use TianoCore mirror of subhook submoduleMichael D Kinney4 months
 
TagDownloadAuthorAge
edk2-stable202502edk2-stable202502.tar.gz  Longhaox Lee3 days
edk2-stable202411edk2-stable202411.tar.gz  Ning Feng3 months
edk2-stable202408.01edk2-stable202408.01.tar.gz  Michael D Kinney4 months
edk2-stable202408edk2-stable202408.tar.gz  Ashraf Ali6 months
edk2-stable202405edk2-stable202405.tar.gz  Ard Biesheuvel9 months
edk2-stable202402edk2-stable202402.tar.gz  Laszlo Ersek12 months
edk2-stable202311edk2-stable202311.tar.gz  Igor Kulchytskyy15 months
edk2-stable202308edk2-stable202308.tar.gz  Qingyu Shang18 months
edk2-stable202305edk2-stable202305.tar.gz  Wendy Liao21 months
edk2-stable202302edk2-stable202302.tar.gz  Sunil V L24 months
edk2-stable202211edk2-stable202211.tar.gz  Michael Kubacki2 years
edk2-stable202208edk2-stable202208.tar.gz  Rebecca Cran2 years
edk2-stable202205edk2-stable202205.tar.gz  Theo Jehl3 years
edk2-stable202205-rc1edk2-stable202205-rc1.tar.gz  Rebecca Cran3 years
edk2-stable202202edk2-stable202202.tar.gz  Heng Luo3 years
edk2-stable202202-rc1edk2-stable202202-rc1.tar.gz  Rebecca Cran3 years
edk2-stable202111edk2-stable202111.tar.gz  Liming Gao3 years
edk2-stable202111-rc1edk2-stable202111-rc1.tar.gz  Dandan Bi3 years
edk2-stable202108edk2-stable202108.tar.gz  Stewart, Chris (SW Architect) via groups.io4 years
edk2-stable202108-rc1edk2-stable202108-rc1.tar.gz  Yeh, GregX4 years
edk2-stable202108-rc0edk2-stable202108-rc0.tar.gz  DunTan4 years
edk2-stable202105edk2-stable202105.tar.gz  Andreas Sandberg4 years
edk2-stable202102edk2-stable202102.tar.gz  Sheng Wei4 years
edk2-stable202011edk2-stable202011.tar.gz  James Bottomley4 years
edk2-stable202008edk2-stable202008.tar.gz  Zhang, Shenglei4 years
edk2-stable202005edk2-stable202005.tar.gz  Ard Biesheuvel5 years
edk2-stable202002edk2-stable202002.tar.gz  Leo Duran5 years
edk2-stable201911edk2-stable201911.tar.gz  Kubacki, Michael A5 years
edk2-stable201908edk2-stable201908.tar.gz  Feng, Bob C5 years
edk2-stable201905edk2-stable201905.tar.gz  Wang, Jian J6 years
edk2-stable201903edk2-stable201903.tar.gz  Liming Gao6 years
edk2-stable201811edk2-stable201811.tar.gz  Ruiyu Ni6 years
edk2-stable201808edk2-stable201808.tar.gz  Ming Huang7 years
vUDK2018edk2-vUDK2018.tar.gz  Kinney, Michael D7 years
vUDK2017edk2-vUDK2017.tar.gz  Kinney8 years
dev; size_t size = sizeof(struct esd_usb2_msg); WARN_ON(!context); priv = context->priv; netdev = priv->netdev; dev = priv->usb2; /* free up our allocated buffer */ usb_free_coherent(urb->dev, size, urb->transfer_buffer, urb->transfer_dma); if (!netif_device_present(netdev)) return; if (urb->status) netdev_info(netdev, "Tx URB aborted (%d)\n", urb->status); netdev->trans_start = jiffies; } static ssize_t show_firmware(struct device *d, struct device_attribute *attr, char *buf) { struct usb_interface *intf = to_usb_interface(d); struct esd_usb2 *dev = usb_get_intfdata(intf); return sprintf(buf, "%d.%d.%d\n", (dev->version >> 12) & 0xf, (dev->version >> 8) & 0xf, dev->version & 0xff); } static DEVICE_ATTR(firmware, S_IRUGO, show_firmware, NULL); static ssize_t show_hardware(struct device *d, struct device_attribute *attr, char *buf) { struct usb_interface *intf = to_usb_interface(d); struct esd_usb2 *dev = usb_get_intfdata(intf); return sprintf(buf, "%d.%d.%d\n", (dev->version >> 28) & 0xf, (dev->version >> 24) & 0xf, (dev->version >> 16) & 0xff); } static DEVICE_ATTR(hardware, S_IRUGO, show_hardware, NULL); static ssize_t show_nets(struct device *d, struct device_attribute *attr, char *buf) { struct usb_interface *intf = to_usb_interface(d); struct esd_usb2 *dev = usb_get_intfdata(intf); return sprintf(buf, "%d", dev->net_count); } static DEVICE_ATTR(nets, S_IRUGO, show_nets, NULL); static int esd_usb2_send_msg(struct esd_usb2 *dev, struct esd_usb2_msg *msg) { int actual_length; return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), msg, msg->msg.hdr.len << 2, &actual_length, 1000); } static int esd_usb2_wait_msg(struct esd_usb2 *dev, struct esd_usb2_msg *msg) { int actual_length; return usb_bulk_msg(dev->udev, usb_rcvbulkpipe(dev->udev, 1), msg, sizeof(*msg), &actual_length, 1000); } static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev) { int i, err = 0; if (dev->rxinitdone) return 0; for (i = 0; i < MAX_RX_URBS; i++) { struct urb *urb = NULL; u8 *buf = NULL; /* create a URB, and a buffer for it */ urb = usb_alloc_urb(0, GFP_KERNEL); if (!urb) { dev_warn(dev->udev->dev.parent, "No memory left for URBs\n"); err = -ENOMEM; break; } buf = usb_alloc_coherent(dev->udev, RX_BUFFER_SIZE, GFP_KERNEL, &urb->transfer_dma); if (!buf) { dev_warn(dev->udev->dev.parent, "No memory left for USB buffer\n"); err = -ENOMEM; goto freeurb; } usb_fill_bulk_urb(urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), buf, RX_BUFFER_SIZE, esd_usb2_read_bulk_callback, dev); urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; usb_anchor_urb(urb, &dev->rx_submitted); err = usb_submit_urb(urb, GFP_KERNEL); if (err) { usb_unanchor_urb(urb); usb_free_coherent(dev->udev, RX_BUFFER_SIZE, buf, urb->transfer_dma); } freeurb: /* Drop reference, USB core will take care of freeing it */ usb_free_urb(urb); if (err) break; } /* Did we submit any URBs */ if (i == 0) { dev_err(dev->udev->dev.parent, "couldn't setup read URBs\n"); return err; } /* Warn if we've couldn't transmit all the URBs */ if (i < MAX_RX_URBS) { dev_warn(dev->udev->dev.parent, "rx performance may be slow\n"); } dev->rxinitdone = 1; return 0; } /* * Start interface */ static int esd_usb2_start(struct esd_usb2_net_priv *priv) { struct esd_usb2 *dev = priv->usb2; struct net_device *netdev = priv->netdev; struct esd_usb2_msg *msg; int err, i; msg = kmalloc(sizeof(*msg), GFP_KERNEL); if (!msg) { err = -ENOMEM; goto out; } /* * Enable all IDs * The IDADD message takes up to 64 32 bit bitmasks (2048 bits). * Each bit represents one 11 bit CAN identifier. A set bit * enables reception of the corresponding CAN identifier. A cleared * bit disabled this identifier. An additional bitmask value * following the CAN 2.0A bits is used to enable reception of * extended CAN frames. Only the LSB of this final mask is checked * for the complete 29 bit ID range. The IDADD message also allows * filter configuration for an ID subset. In this case you can add * the number of the starting bitmask (0..64) to the filter.option * field followed by only some bitmasks. */ msg->msg.hdr.cmd = CMD_IDADD; msg->msg.hdr.len = 2 + ESD_MAX_ID_SEGMENT; msg->msg.filter.net = priv->index; msg->msg.filter.option = ESD_ID_ENABLE; /* start with segment 0 */ for (i = 0; i < ESD_MAX_ID_SEGMENT; i++) msg->msg.filter.mask[i] = cpu_to_le32(0xffffffff); /* enable 29bit extended IDs */ msg->msg.filter.mask[ESD_MAX_ID_SEGMENT] = cpu_to_le32(0x00000001); err = esd_usb2_send_msg(dev, msg); if (err) goto out; err = esd_usb2_setup_rx_urbs(dev); if (err) goto out; priv->can.state = CAN_STATE_ERROR_ACTIVE; out: if (err == -ENODEV) netif_device_detach(netdev); if (err) netdev_err(netdev, "couldn't start device: %d\n", err); kfree(msg); return err; } static void unlink_all_urbs(struct esd_usb2 *dev) { struct esd_usb2_net_priv *priv; int i, j; usb_kill_anchored_urbs(&dev->rx_submitted); for (i = 0; i < dev->net_count; i++) { priv = dev->nets[i]; if (priv) { usb_kill_anchored_urbs(&priv->tx_submitted); atomic_set(&priv->active_tx_jobs, 0); for (j = 0; j < MAX_TX_URBS; j++) priv->tx_contexts[j].echo_index = MAX_TX_URBS; } } } static int esd_usb2_open(struct net_device *netdev) { struct esd_usb2_net_priv *priv = netdev_priv(netdev); int err; /* common open */ err = open_candev(netdev); if (err) return err; /* finally start device */ err = esd_usb2_start(priv); if (err) { netdev_warn(netdev, "couldn't start device: %d\n", err); close_candev(netdev); return err; } netif_start_queue(netdev); return 0; } static netdev_tx_t esd_usb2_start_xmit(struct sk_buff *skb, struct net_device *netdev) { struct esd_usb2_net_priv *priv = netdev_priv(netdev); struct esd_usb2 *dev = priv->usb2; struct esd_tx_urb_context *context = NULL; struct net_device_stats *stats = &netdev->stats; struct can_frame *cf = (struct can_frame *)skb->data; struct esd_usb2_msg *msg; struct urb *urb; u8 *buf; int i, err; int ret = NETDEV_TX_OK; size_t size = sizeof(struct esd_usb2_msg); if (can_dropped_invalid_skb(netdev, skb)) return NETDEV_TX_OK; /* create a URB, and a buffer for it, and copy the data to the URB */ urb = usb_alloc_urb(0, GFP_ATOMIC); if (!urb) { netdev_err(netdev, "No memory left for URBs\n"); stats->tx_dropped++; dev_kfree_skb(skb); goto nourbmem; } buf = usb_alloc_coherent(dev->udev, size, GFP_ATOMIC, &urb->transfer_dma); if (!buf) { netdev_err(netdev, "No memory left for USB buffer\n"); stats->tx_dropped++; dev_kfree_skb(skb); goto nobufmem; } msg = (struct esd_usb2_msg *)buf; msg->msg.hdr.len = 3; /* minimal length */ msg->msg.hdr.cmd = CMD_CAN_TX; msg->msg.tx.net = priv->index; msg->msg.tx.dlc = cf->can_dlc; msg->msg.tx.id = cpu_to_le32(cf->can_id & CAN_ERR_MASK); if (cf->can_id & CAN_RTR_FLAG) msg->msg.tx.dlc |= ESD_RTR; if (cf->can_id & CAN_EFF_FLAG) msg->msg.tx.id |= cpu_to_le32(ESD_EXTID); for (i = 0; i < cf->can_dlc; i++) msg->msg.tx.data[i] = cf->data[i]; msg->msg.hdr.len += (cf->can_dlc + 3) >> 2; for (i = 0; i < MAX_TX_URBS; i++) { if (priv->tx_contexts[i].echo_index == MAX_TX_URBS) { context = &priv->tx_contexts[i]; break; } } /* * This may never happen. */ if (!context) { netdev_warn(netdev, "couldn't find free context\n"); ret = NETDEV_TX_BUSY; goto releasebuf; } context->priv = priv; context->echo_index = i; context->dlc = cf->can_dlc;