Port-playstation2 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

USB fix



Hi -
could someone please test this patch? It should
update the ohci driver frontend for the device/softc split.

best regards
Matthias





-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------
Index: playstation2/dev/ohci_sbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/playstation2/dev/ohci_sbus.c,v
retrieving revision 1.7
diff -u -p -r1.7 ohci_sbus.c
--- playstation2/dev/ohci_sbus.c        4 Mar 2007 06:00:30 -0000       1.7
+++ playstation2/dev/ohci_sbus.c        3 Apr 2008 14:59:07 -0000
@@ -110,7 +110,7 @@ struct ohci_sbus_softc {
        LIST_HEAD(, ohci_dma_segment) sc_dmaseg_head;
 };
 
-CFATTACH_DECL(ohci_sbus, sizeof(struct ohci_sbus_softc),
+CFATTACH_DECL_NEW(ohci_sbus, sizeof(struct ohci_sbus_softc),
     ohci_sbus_match, ohci_sbus_attach, NULL, NULL);
 
 int
@@ -123,11 +123,14 @@ ohci_sbus_match(struct device *parent, s
 void
 ohci_sbus_attach(struct device *parent, struct device *self, void *aux)
 {
-       struct ohci_sbus_softc *sc = (void *)self;
+       struct ohci_sbus_softc *sc = device_private(self);
        usbd_status result;
 
        printf("\n");
 
+       sc->sc.sc_dev = self;
+       sc->sc.sc_bus.hci_private = sc;
+
        sc->sc.iot = bus_space_create(0, "OHCI I/O space", SBUS_OHCI_REGBASE,
            SBUS_OHCI_REGSIZE);
        sc->sc.ioh = SBUS_OHCI_REGBASE;
@@ -152,8 +155,7 @@ ohci_sbus_attach(struct device *parent, 
        }
 
        /* Attach usb device. */
-       sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus,
-           usbctlprint);
+       sc->sc.sc_child = config_found(self, &sc->sc.sc_bus, usbctlprint);
 }
 
 void


Home | Main Index | Thread Index | Old Index