On Fri, Dec 27, 2019 at 07:50:34PM +0100, Klemens Nanni wrote: > Diff below is what I booted last, but for reasons yet unkown to me the > kernel just hangs afer debug printf() > > ... > mpii0 at pci15 dev 0 function 0 "Symbios Logic SAS2008" rev 0x03: msi > mpii0: Solana On-Board, firmware 9.0.0.0 IR, MPI 2.0 > scsibus1 at mpii0: 834 targets > mpii_scsi_probe: target 0 lun 0 port_wwn 0 node_wwn 0 has > MPII_DF_VOLUME set in flags 10 More specifically, the driver hangs here:
2839 void 2840 mpii_wait(struct mpii_softc *sc, struct mpii_ccb *ccb) 2841 { 2842 struct mutex mtx = MUTEX_INITIALIZER(IPL_BIO); 2843 void (*done)(struct mpii_ccb *); 2844 void *cookie; 2845 2846 done = ccb->ccb_done; 2847 cookie = ccb->ccb_cookie; 2848 2849 ccb->ccb_done = mpii_wait_done; 2850 ccb->ccb_cookie = &mtx; 2851 2852 /* XXX this will wait forever for the ccb to complete */ 2853 2854 mpii_start(sc, ccb); 2855 2856 mtx_enter(&mtx); 2857 while (ccb->ccb_cookie != NULL) 2858 msleep(ccb, &mtx, PRIBIO, "mpiiwait", 0); 2859 mtx_leave(&mtx); 2860 2861 ccb->ccb_cookie = cookie; 2862 done(ccb); 2863 } mpii_start() returns then mpii_wait() "wait[s] forever". I'm still practically lost in this area. Why does it hang there only if I fetch the `struct mpii_cfg_raid_vol_pg1' page for its wwid member in mpii_scsi_probe() as per the previous diff? The commit which introduced the XXX: revision 1.31 date: 2010/07/07 10:29:17; author: dlg; state: Exp; lines: +52 -34; bring mpi_wait over to mpii for an mpsafe mechanism to sleep while waiting for a command to complete. this also replaces all the while (!ready) \ tsleep() wrapped in splbio code with mpii_wait. tested with bioctl runs and sensor updates on a raid volume