Date: Mon, 27 Jan 2020 22:20:02 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357182 - head/sys/dev/sdhci Message-ID: <202001272220.00RMK2i6086134@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon Jan 27 22:20:02 2020 New Revision: 357182 URL: https://svnweb.freebsd.org/changeset/base/357182 Log: No need to have an extra layer of indirection here. Call the sdhci_cam_requiest routine directly when handling a MMIO request. Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Mon Jan 27 22:19:55 2020 (r357181) +++ head/sys/dev/sdhci/sdhci.c Mon Jan 27 22:20:02 2020 (r357182) @@ -124,7 +124,6 @@ static void sdhci_transfer_pio(struct sdhci_slot *slot static void sdhci_cam_action(struct cam_sim *sim, union ccb *ccb); static int sdhci_cam_get_possible_host_clock(const struct sdhci_slot *slot, int proposed_clock); -static void sdhci_cam_handle_mmcio(struct cam_sim *sim, union ccb *ccb); static void sdhci_cam_poll(struct cam_sim *sim); static int sdhci_cam_request(struct sdhci_slot *slot, union ccb *ccb); static int sdhci_cam_settran_settings(struct sdhci_slot *slot, union ccb *ccb); @@ -2560,16 +2559,6 @@ fail: cam_simq_free(slot->devq); } -static void -sdhci_cam_handle_mmcio(struct cam_sim *sim, union ccb *ccb) -{ - struct sdhci_slot *slot; - - slot = cam_sim_softc(sim); - - sdhci_cam_request(slot, ccb); -} - void sdhci_cam_action(struct cam_sim *sim, union ccb *ccb) { @@ -2624,13 +2613,11 @@ sdhci_cam_action(struct cam_sim *sim, union ccb *ccb) break; } case XPT_SET_TRAN_SETTINGS: - { if (sdhci_debug > 1) slot_printf(slot, "Got XPT_SET_TRAN_SETTINGS\n"); sdhci_cam_settran_settings(slot, ccb); ccb->ccb_h.status = CAM_REQ_CMP; break; - } case XPT_RESET_BUS: if (sdhci_debug > 1) slot_printf(slot, "Got XPT_RESET_BUS, ACK it...\n"); @@ -2647,10 +2634,8 @@ sdhci_cam_action(struct cam_sim *sim, union ccb *ccb) slot_printf(slot, "Got XPT_MMC_IO\n"); ccb->ccb_h.status = CAM_REQ_INPROG; - sdhci_cam_handle_mmcio(sim, ccb); + sdhci_cam_request(cam_sim_softc(sim), ccb); return; - /* NOTREACHED */ - break; default: ccb->ccb_h.status = CAM_REQ_INVALID; break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001272220.00RMK2i6086134>