From owner-svn-src-head@freebsd.org Mon Jan 27 22:20:03 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 366A6230A07; Mon, 27 Jan 2020 22:20:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48641Z72Z0z4Gnk; Mon, 27 Jan 2020 22:20:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA40118FF2; Mon, 27 Jan 2020 22:20:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00RMK2fS086135; Mon, 27 Jan 2020 22:20:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00RMK2i6086134; Mon, 27 Jan 2020 22:20:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202001272220.00RMK2i6086134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 27 Jan 2020 22:20:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357182 - head/sys/dev/sdhci X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/sdhci X-SVN-Commit-Revision: 357182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2020 22:20:03 -0000 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;