From patchwork Wed Sep 25 00:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wesley Cheng X-Patchwork-Id: 13811497 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B065A1891D2; Wed, 25 Sep 2024 01:01:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727226098; cv=none; b=G5YkS55jRg/gi3TD/PfBAHnymXxuagWjalO6dnC1rfZAgo1Nt/a2svy/e0cpR8WnKoy6qEkfAHqejGOspLo3ZRwdRNDbCeZoSh2sfzbmcG7FeB6iT06tE2gCjOKa59ePVaepVfV7bJUthXx6/npPEDwtHRiJoH+G0YccRjW3gHo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727226098; c=relaxed/simple; bh=S7gNn/zMH9Mq7yohNCakzHW+ZK7IqUedqKKHCL3FDOU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=URaIrIFnQcCk6DKpbtvxK8s+Di/rFJ59lKkQLWygJYr0FqLCPdeXeb/pA6FrEDRLRdJ/oNUwckKcw+KOoh6cWpR/ZL7kGJrTlGvnO7K8F6jjKo4jEcp1VEqrR25nk3zV2OONK0dCSoNeaMPG14DLRyCvxRFXWT16Jv0Old/fWn8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=gOY1VxMN; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gOY1VxMN" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48OHnxLj030180; Wed, 25 Sep 2024 01:00:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= c5gwoddCxMnmmFAKaTw4cQrxCONcapW95+AyW+pR6yQ=; b=gOY1VxMN5b76TVVW MLxJTbwzxWf7oXPgpfolJloTPTycHmPbJeyh2ma4A/uB4oTJyDbDOsUi09ZlOsDT 3OYCZcj+UxQGxzdhx6B3Cm3I9JntI8jlU1FrvdGy9SoaPtuY7P525JZeQYS7g9Qa WwVXRuteMtaCf+5KYEgMfWfpkNNNI7c+qwUxU2Xg+WlDFyYFQCd6j7b8nhbdQM6Q Ce3B8Xj//85fZeIksaJ+82xOJ7WB5apR4ZrDwyu8K1b1QLxtONz+cAsFKslc4sjh OT1GQ38MAU26d74BtyVRbH55Gl8+Cf6LP3P7zMGUML9nYHdhXoedYhLLWIpKXcDu 8UPxKg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41sp7ujj77-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Sep 2024 01:00:13 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 48P10CRs032382 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Sep 2024 01:00:12 GMT Received: from hu-wcheng-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 24 Sep 2024 18:00:12 -0700 From: Wesley Cheng To: , , , , , , , , , , , , , , CC: , , , , , , , , Wesley Cheng Subject: [PATCH v28 04/32] usb: xhci: xhci-sideband: Set IMOD for xHCI sideband clients Date: Tue, 24 Sep 2024 17:59:32 -0700 Message-ID: <20240925010000.2231406-5-quic_wcheng@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240925010000.2231406-1-quic_wcheng@quicinc.com> References: <20240925010000.2231406-1-quic_wcheng@quicinc.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: MSXKG88uuFqnuUmaDxAA4ItNFXJ8SOSA X-Proofpoint-ORIG-GUID: MSXKG88uuFqnuUmaDxAA4ItNFXJ8SOSA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxlogscore=680 mlxscore=0 phishscore=0 suspectscore=0 impostorscore=0 spamscore=0 malwarescore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409250005 When creating a secondary interrupter over xHCI, add an argument for xHCI sideband clients to specify an interrupt moderation value for the interrupter context assigned. Signed-off-by: Wesley Cheng --- drivers/usb/host/xhci-sideband.c | 4 ++-- include/linux/usb/xhci-sideband.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-sideband.c b/drivers/usb/host/xhci-sideband.c index 69bc234818d2..248d9713570e 100644 --- a/drivers/usb/host/xhci-sideband.c +++ b/drivers/usb/host/xhci-sideband.c @@ -259,7 +259,7 @@ EXPORT_SYMBOL_GPL(xhci_sideband_get_event_buffer); */ int xhci_sideband_create_interrupter(struct xhci_sideband *sb, int num_seg, - bool ip_autoclear) + bool ip_autoclear, u32 imod_interval) { int ret = 0; @@ -273,7 +273,7 @@ xhci_sideband_create_interrupter(struct xhci_sideband *sb, int num_seg, } sb->ir = xhci_create_secondary_interrupter(xhci_to_hcd(sb->xhci), - num_seg); + num_seg, imod_interval); if (!sb->ir) { ret = -ENOMEM; goto out; diff --git a/include/linux/usb/xhci-sideband.h b/include/linux/usb/xhci-sideband.h index 6c11e240fbca..bc5b56a77e37 100644 --- a/include/linux/usb/xhci-sideband.h +++ b/include/linux/usb/xhci-sideband.h @@ -59,7 +59,7 @@ xhci_sideband_get_event_buffer(struct xhci_sideband *sb); int xhci_sideband_create_interrupter(struct xhci_sideband *sb, int num_seg, - bool ip_autoclear); + bool ip_autoclear, u32 imod_interval); void xhci_sideband_remove_interrupter(struct xhci_sideband *sb);