File xhci-bw-override.spec of Package xhci-bw-override

#
# spec file for package xhci-bw-override
#
# Copyright (c) 2023, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           xhci-bw-override
Version:        0.0.1
Release:        0
Summary:        USB xHCI controller bandwidth limit overide
License:        GPL-3.0-or-later
Group:          Hardware/Other
URL:            https://osmocom.org/projects/e1-t1-adapter/wiki/Isochronous_USB_Issues
Source:         https://osmocom.org/attachments/download/6543/xhci-bw-override.c
ExclusiveArch:  %{ix86} x86_64

%description
Small utility that scans for xHCI controller, check if they're compatible
and overwrite the FS isochronous bandwidth limit register.

Note:
  Make sure to unload the *xhci_pci* kernel module before.
  If you don't the program segfaults.

%prep
cp %{SOURCE0} .

%build
gcc %{optflags} xhci-bw-override.c -o xhci-bw-override

%install
install -Dpm 0755 xhci-bw-override %{buildroot}/%{_bindir}/xhci-bw-override

%files
%{_bindir}/xhci-bw-override

%changelog
openSUSE Build Service is sponsored by