Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jan 2000 12:02:50 +0000 (GMT)
From:      Nick Hibma <n_hibma@webweaving.org>
To:        USB BSD list <usb-bsd@egroups.com>
Cc:        FreeBSD CURRENT Mailing List <current@FreeBSD.ORG>
Subject:   for testing - suspend fix for UHCI controllers
Message-ID:  <Pine.BSF.4.20.0001301521120.356-100000@localhost>

next in thread | raw e-mail | index | archive | help

When committing the patch to get suspend to work I managed to forget to
commit the parts for pci/[ou]hci_pci.c. The patch is given below. It
should make your devices suspend.

It is included in the big patchset as well.

This is against CURRENT (== 4.0-RC)

Thanks in advance.

Nick

Index: sys/pci/uhci_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/pci/uhci_pci.c,v
retrieving revision 1.21
diff -w -u -r1.21 uhci_pci.c
--- uhci_pci.c  2000/01/26 10:52:27     1.21
+++ uhci_pci.c  2000/01/30 15:15:57
@@ -93,8 +93,13 @@
 static int
 uhci_pci_suspend(device_t self)
 {
+       uhci_softc_t *sc = device_get_softc(self);
+       int err;
 
-       bus_generic_suspend(self);
+       err = bus_generic_suspend(self);
+       if (err)
+               return err;
+       uhci_power(PWR_SUSPEND, sc);
 
        return 0;
 }
@@ -102,11 +107,9 @@
 static int
 uhci_pci_resume(device_t self)
 {
-#if 0
        uhci_softc_t *sc = device_get_softc(self);
 
-       uhci_reset(sc);
-#endif
+       uhci_power(PWR_RESUME, sc);
        bus_generic_resume(self);
 
        return 0;


--
n_hibma@webweaving.org
n_hibma@freebsd.org                                          USB project
http://www.etla.net/~n_hibma/





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0001301521120.356-100000>