Deleted Added
full compact
ohci_pci.c (186722) ohci_pci.c (187170)
1/*-
2 * Copyright (c) 1998 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Lennart Augustsson (augustss@carlstedt.se) at
7 * Carlstedt Research & Technology.
8 *

--- 22 unchanged lines hidden (view full) ---

31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998 The NetBSD Foundation, Inc.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The NetBSD Foundation
6 * by Lennart Augustsson (augustss@carlstedt.se) at
7 * Carlstedt Research & Technology.
8 *

--- 22 unchanged lines hidden (view full) ---

31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/ohci2_pci.c 186722 2009-01-03 14:33:48Z marius $");
39__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/ohci2_pci.c 187170 2009-01-13 19:02:40Z thompsa $");
40
41/*
42 * USB Open Host Controller driver.
43 *
44 * OHCI spec: http://www.intel.com/design/usb/ohci11d.pdf
45 */
46
47/* The low level controller code for OHCI has been split into

--- 147 unchanged lines hidden (view full) ---

195 ohci_softc_t *sc = device_get_softc(self);
196 int rid;
197 int err;
198
199 if (sc == NULL) {
200 device_printf(self, "Could not allocate sc\n");
201 return (ENXIO);
202 }
40
41/*
42 * USB Open Host Controller driver.
43 *
44 * OHCI spec: http://www.intel.com/design/usb/ohci11d.pdf
45 */
46
47/* The low level controller code for OHCI has been split into

--- 147 unchanged lines hidden (view full) ---

195 ohci_softc_t *sc = device_get_softc(self);
196 int rid;
197 int err;
198
199 if (sc == NULL) {
200 device_printf(self, "Could not allocate sc\n");
201 return (ENXIO);
202 }
203 /* get all DMA memory */
204
203 /* initialise some bus fields */
205 sc->sc_bus.parent = self;
204 sc->sc_bus.parent = self;
205 sc->sc_bus.devices = sc->sc_devices;
206 sc->sc_bus.devices_max = OHCI_MAX_DEVICES;
207
208 /* get all DMA memory */
206 if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self),
207 &ohci_iterate_hw_softc)) {
209 if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self),
210 &ohci_iterate_hw_softc)) {
208 return ENOMEM;
211 return (ENOMEM);
209 }
210 sc->sc_dev = self;
211
212 pci_enable_busmaster(self);
213
214 /*
215 * Some Sun PCIO-2 USB controllers have their intpin register
216 * bogusly set to 0, although it should be 4. Correct that.

--- 184 unchanged lines hidden ---
212 }
213 sc->sc_dev = self;
214
215 pci_enable_busmaster(self);
216
217 /*
218 * Some Sun PCIO-2 USB controllers have their intpin register
219 * bogusly set to 0, although it should be 4. Correct that.

--- 184 unchanged lines hidden ---