Le 2003-09-06, Petri Helenius écrivait : > Should this work or is the work to port this to ATAng still undergoing?
This should work, but does not, so the work is still in progress... > panic: mutex Giant not owned at ../../../dev/ata/atapi-cam.c:117 Please try this patch. Index: atapi-cam.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/atapi-cam.c,v retrieving revision 1.22 diff -u -r1.22 atapi-cam.c --- atapi-cam.c 11 Sep 2003 17:34:47 -0000 1.22 +++ atapi-cam.c 16 Sep 2003 12:51:35 -0000 @@ -114,13 +114,10 @@ struct cam_path *path = NULL; int unit; - GIANT_REQUIRED; - if (mtx_initialized(&atapicam_softc_mtx) == 0) mtx_init(&atapicam_softc_mtx, "ATAPI/CAM softc mutex", NULL, MTX_DEF); mtx_lock(&atapicam_softc_mtx); - LIST_FOREACH(scp, &all_buses, chain) { if (scp->ata_ch == ata_ch) break; @@ -130,10 +127,12 @@ if (scp != NULL) return; - if ((scp = malloc(sizeof(struct atapi_xpt_softc), - M_ATACAM, M_NOWAIT | M_ZERO)) == NULL) - goto error; + scp = malloc(sizeof(struct atapi_xpt_softc), + M_ATACAM, M_NOWAIT | M_ZERO)); + mtx_lock (&Giant); + if (scp == NULL) + goto error; scp->ata_ch = ata_ch; TAILQ_INIT(&scp->pending_hcbs); LIST_INSERT_HEAD(&all_buses, scp, chain); @@ -165,10 +164,12 @@ setup_async_cb(scp, AC_LOST_DEVICE); reinit_bus(scp, cold ? BOOT_ATTACH : ATTACH); + mtx_unlock (&Giant); return; error: free_softc(scp); + mtx_unlock (&Giant); } void -- [EMAIL PROTECTED]
pgp00000.pgp
Description: PGP signature