Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp202989lqk; Wed, 13 Mar 2024 23:51:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnTLn0LdbNX5gjlLhE9J6OfGgYMml6M/xlu4T3iBw8+58gU07jYIpu6B7fkEGuy5IOYGCAZZXlg5F+fuuJcg8/68Dgw8hSrJTIXlJvbg== X-Google-Smtp-Source: AGHT+IE84a8Q+uzWAfz4sHLVwnmD97OmUeoBrUFS5LSjtft+IM0Rgs7T6UnXPshv3UkgZNZHJfD3 X-Received: by 2002:a50:9b1e:0:b0:566:7769:11c with SMTP id o30-20020a509b1e000000b005667769011cmr4833511edi.19.1710399114086; Wed, 13 Mar 2024 23:51:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710399114; cv=pass; d=google.com; s=arc-20160816; b=JnveF1kjxSIZ/fmhM0v1WhnV77uokgtQcOPfzSM303LdP0m8fJ2jhuQyWc0BWfYOt+ wEanWm0MgAWPUplO+Q6gQAWUrVldLQRwa4TJC41ujo5zHQvCCHGNMMWMohNxn1bIb0l4 2veXe7p5CTT3/8a4iXUhwarm3OFaJx5ShfF5oFOoQlEZqSX4iHor0PpIRcdTFhvdgJee wui8z9q4gFlf72061IoIe2f+Yf6SQQev6gsQMNP24GEVzO4kttWO1NvmLPgRU8FJriNa D7PQQnzicbhmEdcgNtmcvJ+5mIZb6n9Em8IJGJnvUzrq9MFRO0kRI0DjUDrIONfiedCt 0iKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=GHrlvD44AzN8hdwzDJKJs3lJc1B3Gre4izhBsD/FmKY=; fh=EZaOMlDFnuX0C6WO8vMhk7vVEYu0LYYsuAcD0mwTvt8=; b=cB6ms6mdDaVVTgj3j8l+jRtycoLDxcCd3kQokrn1TmkJQACQ5E43YbmRDk0gezG1Kr S5rGQ3n0bvCovJEeb7qFcBXtCZRBnHP4h0HuZUD0P85ld5GiLHIoibsyj4VjfWAGXlXI xvW+5pLKLOR76r2etUZGKq8e0POtOzwe4Bp1eHwnkC1Kj4MnWOr4KCQkRfAvfXcdflxP pfRBEGEiA287DviJ3OmE6aeWdMVyrWKVVOuy7tLH4MXyAn1Vyz0aYjEavUZ6/Dqsx6ZC SycyuANqJY9yBka+WwNRSXgvqsk3rOP4UeCPh3mPlbFoqS2d6SOR2p13WfIaC6VaIws4 h+aA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-kernel+bounces-102891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102891-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ds14-20020a0564021cce00b005689f5404basi377077edb.60.2024.03.13.23.51.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 23:51:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-kernel+bounces-102891-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102891-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9F2221F23FF8 for ; Thu, 14 Mar 2024 06:51:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F138749A; Thu, 14 Mar 2024 06:51:43 +0000 (UTC) Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D54286107 for ; Thu, 14 Mar 2024 06:51:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710399103; cv=none; b=knB4mgGawIBmHRP19wOyawPQskqhOMVKZY7+hcyalBT2q0BnMP1IixmDOQebzG2/x8jOR9easu8UHDdVfTEj5NnAaknveeB6qq/yI099RKI0/EWObhTokCsEvzXXL46SvAWYe2fEZKWWaVMz85M1mnGqOJC20OXoLsx/lY8s5Qs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710399103; c=relaxed/simple; bh=PWh8eKsHZ2D80yRxqV5lAUSTWJ9Q0bV2NWJayUlEwpk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=dMEbHDFfpN2FbJIVq5Zxm2RXTGK7hat+s04oSKwVEUP0H0C9G1Vis0KX8ydKWXsROEpy9mxrMwdAoRMCfNaOLwgYSxARFVPNEKZHOxH0nUT4SAMqnO/hTMXMGtuplsY3jiIj2CIdy9sJZsfwsYXhk4vrm/awuUhkHDIHEAE4Up0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 42E6pJHc91216374, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 42E6pJHc91216374 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Mar 2024 14:51:21 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 14 Mar 2024 14:51:20 +0800 Received: from localhost (172.22.81.102) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 14 Mar 2024 14:51:20 +0800 From: Ricky Wu To: , , CC: Ricky Wu Subject: [PATCH] misc: rtsx: Fix rts5264 driver status incorrect when card removed Date: Thu, 14 Mar 2024 14:51:13 +0800 Message-ID: <20240314065113.5962-1-ricky_wu@realtek.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXH36506.realtek.com.tw (172.21.6.27) To RTEXMBS01.realtek.com.tw (172.21.6.94) X-KSE-ServerInfo: RTEXMBS01.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback rts5264 driver not clean express link error and set EXTRA_CAPS_SD_EXPRESS capability back when card removed Fixes: 6a511c9b3a0d ("misc: rtsx: add to support new card reader rts5264") Signed-off-by: Ricky Wu --- drivers/misc/cardreader/rtsx_pcr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c index 1a64364700eb..0ad2ff9065aa 100644 --- a/drivers/misc/cardreader/rtsx_pcr.c +++ b/drivers/misc/cardreader/rtsx_pcr.c @@ -1002,7 +1002,7 @@ static irqreturn_t rtsx_pci_isr(int irq, void *dev_id) } else { pcr->card_removed |= SD_EXIST; pcr->card_inserted &= ~SD_EXIST; - if (PCI_PID(pcr) == PID_5261) { + if ((PCI_PID(pcr) == PID_5261) || (PCI_PID(pcr) == PID_5264)) { rtsx_pci_write_register(pcr, RTS5261_FW_STATUS, RTS5261_EXPRESS_LINK_FAIL_MASK, 0); pcr->extra_caps |= EXTRA_CAPS_SD_EXPRESS; -- 2.25.1