Date: Tue, 19 Jun 2018 11:28:51 +0000 (UTC) From: Ilya Bakulin <kibab@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335367 - head/sys/cam/mmc Message-ID: <201806191128.w5JBSpWo024380@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kibab Date: Tue Jun 19 11:28:50 2018 New Revision: 335367 URL: https://svnweb.freebsd.org/changeset/base/335367 Log: Don't try to turn power down MMC bus if it is already down Regulator framework doens't like turning off already turned off regulators, so we get panic on AllWinner boards. Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D15890 Modified: head/sys/cam/mmc/mmc_xpt.c Modified: head/sys/cam/mmc/mmc_xpt.c ============================================================================== --- head/sys/cam/mmc/mmc_xpt.c Tue Jun 19 11:25:40 2018 (r335366) +++ head/sys/cam/mmc/mmc_xpt.c Tue Jun 19 11:28:50 2018 (r335367) @@ -574,14 +574,16 @@ mmcprobe_start(struct cam_periph *periph, union ccb *s /* FALLTHROUGH */ case PROBE_IDENTIFY: xpt_path_inq(&start_ccb->cpi, periph->path); - CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("Start with PROBE_RESET\n")); - init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); - cts->ios.power_mode = power_off; - cts->ios_valid = MMC_PM; + init_standard_ccb(start_ccb, XPT_GET_TRAN_SETTINGS); xpt_action(start_ccb); - mtx_sleep(periph, p_mtx, 0, "mmcios", 100); - + if (cts->ios.power_mode != power_off) { + init_standard_ccb(start_ccb, XPT_SET_TRAN_SETTINGS); + cts->ios.power_mode = power_off; + cts->ios_valid = MMC_PM; + xpt_action(start_ccb); + mtx_sleep(periph, p_mtx, 0, "mmcios", 100); + } /* mmc_power_up */ /* Get the host OCR */ init_standard_ccb(start_ccb, XPT_GET_TRAN_SETTINGS);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806191128.w5JBSpWo024380>