From 52f5544799fb1d668f87c9d2d244c47bc86bdf48 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:22:51 +0100 Subject: [PATCH] remove ehci_hcd workaround to restore full usb functionality (needs a new test on Asus A52J) [release 1.4.1-4mamba;Wed Jul 25 2012] --- README.md | 2 + pm-utils-20ehci_hcd | 23 +++++++++++ pm-utils.spec | 98 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 pm-utils-20ehci_hcd create mode 100644 pm-utils.spec diff --git a/README.md b/README.md index b7a6fa4..8d142d3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # pm-utils +pm-utils is a small collection of scripts that handle suspend and resume on behalf of HAL. + diff --git a/pm-utils-20ehci_hcd b/pm-utils-20ehci_hcd new file mode 100644 index 0000000..646567f --- /dev/null +++ b/pm-utils-20ehci_hcd @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Unbind ehci_hcd driver. Fixes suspend on Asus A52J +# +TMPLIST=/tmp/ehci-dev-list + +case "${1}" in + hibernate|suspend) + echo -n '' > $TMPLIST + for i in `ls /sys/bus/pci/drivers/ehci_hcd/ | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do + # Unbind ehci_hcd for first device XXXX:XX:XX.X: + echo -n "$i" | tee /sys/bus/pci/drivers/ehci_hcd/unbind + echo "$i" >> $TMPLIST + done + ;; + resume|thaw) + for i in `cat $TMPLIST`; do + # Bind ehci_hcd for first device XXXX:XX:XX.X: + echo -n "$i" | tee /sys/bus/pci/drivers/ehci_hcd/bind + done + rm $TMPLIST + ;; +esac diff --git a/pm-utils.spec b/pm-utils.spec new file mode 100644 index 0000000..8de11f5 --- /dev/null +++ b/pm-utils.spec @@ -0,0 +1,98 @@ +Name: pm-utils +Version: 1.4.1 +Release: 4mamba +Summary: A small collection of scripts that handle suspend and resume on behalf of HAL +Group: System/Kernel and Hardware +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://pm-utils.freedesktop.org +Source: http://pm-utils.freedesktop.org/releases/pm-utils-%{version}.tar.gz +Source1: %{name}-20ehci_hcd +License: GPL +BuildRequires: xmlto +Obsoletes: suspend +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +pm-utils is a small collection of scripts that handle suspend and resume on behalf of HAL. + +%package devel +Summary: Devel package for %{name} +Group: Development/Libraries +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +pm-utils is a small collection of scripts that handle suspend and resume on behalf of HAL. + +This package contains static libraries and header files need for development. + +%prep +%setup -q + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +#install -m0755 %{SOURCE1} %{buildroot}%{_libdir}/pm-utils/sleep.d/20ehci_hcd + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%dir %{_sysconfdir}/pm +%{_sysconfdir}/pm +%{_bindir}/on_ac_power +%{_bindir}/pm-is-supported +#%{_bindir}/import-fdi-quirkdb +%{_libdir}/pm-utils/* +%{_sbindir}/pm-hibernate +%{_sbindir}/pm-powersave +%{_sbindir}/pm-suspend +%{_sbindir}/pm-suspend-hybrid +%{_docdir}/pm-utils/* +%{_mandir}/man1/on_ac_power.1.gz +%{_mandir}/man1/pm-is-supported.1.gz +%{_mandir}/man8/pm-action.8.gz +%{_mandir}/man8/pm-pmu.8.gz +%{_mandir}/man8/pm-powersave.8.gz +%{_mandir}/man8/pm-hibernate.8.gz +%{_mandir}/man8/pm-suspend-hybrid.8.gz +%{_mandir}/man8/pm-suspend.8.gz +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +%{_libdir}/pkgconfig/*.pc +%doc ChangeLog NEWS README README.debugging README.distributions +%doc TODO + +%changelog +* Wed Jul 25 2012 Silvan Calarco 1.4.1-4mamba +- remove ehci_hcd workaround to restore full usb functionality (needs a new test on Asus A52J) + +* Fri Sep 09 2011 Silvan Calarco 1.4.1-3mamba +- obsolete suspend + +* Wed Mar 23 2011 Silvan Calarco 1.4.1-2mamba +- added 20ehci_hcd sleep.d script to fix suspend on Asus A52J + +* Mon Jul 12 2010 Automatic Build System 1.4.1-1mamba +- automatic update by autodist + +* Tue Jun 29 2010 Automatic Build System 1.4.0-1mamba +- automatic update by autodist + +* Fri Jun 04 2010 Automatic Build System 1.3.0-1mamba +- automatic update by autodist + +* Thu Dec 24 2009 Silvan Calarco 1.2.6.1-1mamba +- update to 1.2.6.1 + +* Thu May 14 2009 Silvan Calarco 1.2.5-1mamba +- package created by autospec