Port-hpcmips 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: hpcmips/dev/plumohci.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hpcmips/dev/plumohci.c,v
retrieving revision 1.11
diff -u -p -r1.11 plumohci.c
--- hpcmips/dev/plumohci.c      4 Mar 2007 05:59:52 -0000       1.11
+++ hpcmips/dev/plumohci.c      3 Apr 2008 14:58:43 -0000
@@ -116,7 +116,7 @@ struct plumohci_softc {
        LIST_HEAD(, plumohci_shm) sc_shm_head;
 };
 
-CFATTACH_DECL(plumohci, sizeof(struct plumohci_softc),
+CFATTACH_DECL_NEW(plumohci, sizeof(struct plumohci_softc),
     plumohci_match, plumohci_attach, NULL, NULL);
 
 int
@@ -130,10 +130,13 @@ plumohci_match(struct device *parent, st
 void
 plumohci_attach(struct device *parent, struct device *self, void *aux)
 {
-       struct plumohci_softc *sc = (struct plumohci_softc *)self;
+       struct plumohci_softc *sc = device_private(self);
        struct plum_attach_args *pa = aux;
        usbd_status r;
 
+       sc->sc.sc_dev = self;
+       sc->sc.sc_bus.hci_private = sc;
+
        sc->sc.iot = pa->pa_iot;
        sc->sc.sc_bus.dmatag = &plumohci_bus_dma_tag.bdt;
        plumohci_bus_dma_tag._dmamap_chipset_v = sc;
@@ -188,8 +191,7 @@ plumohci_attach(struct device *parent, s
        }
 
        /* 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);
 }
 
 int


Home | Main Index | Thread Index | Old Index