From patchwork Wed Dec 8 19:24:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12665129 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86787C433F5 for ; Wed, 8 Dec 2021 19:25:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235169AbhLHT2l (ORCPT ); Wed, 8 Dec 2021 14:28:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234463AbhLHT2j (ORCPT ); Wed, 8 Dec 2021 14:28:39 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C012C061746; Wed, 8 Dec 2021 11:25:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E5EC1B8226E; Wed, 8 Dec 2021 19:25:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52F03C341CA; Wed, 8 Dec 2021 19:25:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638991504; bh=oQFwcN3lUVqm/QC2mXvvhW5W+70BEyg1ywIOR6zcnUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Er+Q1gw7uO6ekkXfxvesyhl0sDJc2L88xfrJ9wikppnjwxdUtHuWJ1M4Ug2G1vg6c OasEocccOiD6b1dkjTCUPwycDkzI+7enwlP0auOvCeOak81HmRHZZMueMFxNKp+F8z mhtLsz2Ziml5LCktjoP1ukZynuoryu6Ta8FI9HDTRq3+9B7aRZ4yfJR/71v2BEtrLI ONgouI3WDZd4zPqzgTOo+NrpccETm9qqn5IQIdlha+hS3i2ohjqt5XJtZ8fmfi8wHa CUEFLukDCUNmXrap8fprOPbxX/J9R2o7v6z272V+ugZ4Vh+jix6GI96ukgk8+IOKPz egp4XBjhWCRSQ== From: Bjorn Helgaas To: Jens Axboe , Joshua Morris , Philip Kelleher Cc: "Rafael J . Wysocki" , Vaibhav Gupta , Vaibhav Gupta , linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , Bjorn Helgaas Subject: [PATCH v5 1/4] mtip32xx: remove pointless drvdata checking Date: Wed, 8 Dec 2021 13:24:46 -0600 Message-Id: <20211208192449.146076-2-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211208192449.146076-1-helgaas@kernel.org> References: <20211208192449.146076-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas The .suspend() and .resume() methods are only called after the .probe() method (mtip_pci_probe()) has set the drvdata and returned success. Therefore, if we get to mtip_pci_suspend() or mtip_pci_resume(), the drvdata must be valid. Drop the unnecessary checking. Signed-off-by: Bjorn Helgaas --- drivers/block/mtip32xx/mtip32xx.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index c91b9010c1a6..8677ac4c3431 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -4150,12 +4150,6 @@ static int mtip_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) int rv = 0; struct driver_data *dd = pci_get_drvdata(pdev); - if (!dd) { - dev_err(&pdev->dev, - "Driver private datastructure is NULL\n"); - return -EFAULT; - } - set_bit(MTIP_DDF_RESUME_BIT, &dd->dd_flag); /* Disable ports & interrupts then send standby immediate */ @@ -4189,14 +4183,7 @@ static int mtip_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) static int mtip_pci_resume(struct pci_dev *pdev) { int rv = 0; - struct driver_data *dd; - - dd = pci_get_drvdata(pdev); - if (!dd) { - dev_err(&pdev->dev, - "Driver private datastructure is NULL\n"); - return -EFAULT; - } + struct driver_data *dd = pci_get_drvdata(pdev); /* Move the device to active State */ pci_set_power_state(pdev, PCI_D0); From patchwork Wed Dec 8 19:24:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12665131 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D126C43219 for ; Wed, 8 Dec 2021 19:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235843AbhLHT2n (ORCPT ); Wed, 8 Dec 2021 14:28:43 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:36876 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235390AbhLHT2m (ORCPT ); Wed, 8 Dec 2021 14:28:42 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DD60FCE2333; Wed, 8 Dec 2021 19:25:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCEC4C00446; Wed, 8 Dec 2021 19:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638991507; bh=8vyuFB78UlBf9oj4qyNlqvw2Y5owe7cuGBLG7rfajMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O2nxT0QF017bQkv7nttdePTZG8VfptmRW46a+ahpbY9wSlBob6LLX68ybWJBBcDbd OJDglUuwPRGBUdcLcgQy/7h77Lz7mem+S02SbK1Oh25j+QeDsrAMSBQ9oDhKFKUpTY OuKrUFI7H7GOpOmpiXoqz4BP81+sB7Q5tIo6k6IExkocm6xLwa4bhyXdplnVmDfROP 5pfhGWujUV7/ia92KW6ECo6Wzic2uctjCoIaVGHCIYhf99b+Tj0n30+sBNgXezVywx PeJMyIWuUAvSPf9rv7X3kX+/yubC3tKTr0D5HXlW1Ijl4IZfdCtbbmLNrhNRMAt2+7 1efdkxI97dmFg== From: Bjorn Helgaas To: Jens Axboe , Joshua Morris , Philip Kelleher Cc: "Rafael J . Wysocki" , Vaibhav Gupta , Vaibhav Gupta , linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , Bjorn Helgaas Subject: [PATCH v5 2/4] mtip32xx: remove pointless drvdata lookups Date: Wed, 8 Dec 2021 13:24:47 -0600 Message-Id: <20211208192449.146076-3-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211208192449.146076-1-helgaas@kernel.org> References: <20211208192449.146076-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas Previously we passed a struct pci_dev * to mtip_check_surprise_removal(), which immediately looked up the driver_data. But all callers already have the driver_data pointer, so just pass it directly and skip the extra lookup. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/block/mtip32xx/mtip32xx.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 8677ac4c3431..894020aaaaeb 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -136,16 +136,15 @@ struct mtip_compat_ide_task_request_s { * return value * true if device removed, else false */ -static bool mtip_check_surprise_removal(struct pci_dev *pdev) +static bool mtip_check_surprise_removal(struct driver_data *dd) { u16 vendor_id = 0; - struct driver_data *dd = pci_get_drvdata(pdev); if (dd->sr) return true; /* Read the vendorID from the configuration space */ - pci_read_config_word(pdev, 0x00, &vendor_id); + pci_read_config_word(dd->pdev, 0x00, &vendor_id); if (vendor_id == 0xFFFF) { dd->sr = true; if (dd->queue) @@ -447,7 +446,7 @@ static int mtip_device_reset(struct driver_data *dd) { int rv = 0; - if (mtip_check_surprise_removal(dd->pdev)) + if (mtip_check_surprise_removal(dd)) return 0; if (mtip_hba_reset(dd) < 0) @@ -727,7 +726,7 @@ static inline void mtip_process_errors(struct driver_data *dd, u32 port_stat) dev_warn(&dd->pdev->dev, "Port stat errors %x unhandled\n", (port_stat & ~PORT_IRQ_HANDLED)); - if (mtip_check_surprise_removal(dd->pdev)) + if (mtip_check_surprise_removal(dd)) return; } if (likely(port_stat & (PORT_IRQ_TF_ERR | PORT_IRQ_IF_ERR))) { @@ -752,7 +751,7 @@ static inline irqreturn_t mtip_handle_irq(struct driver_data *data) /* Acknowledge the interrupt status on the port.*/ port_stat = readl(port->mmio + PORT_IRQ_STAT); if (unlikely(port_stat == 0xFFFFFFFF)) { - mtip_check_surprise_removal(dd->pdev); + mtip_check_surprise_removal(dd); return IRQ_HANDLED; } writel(port_stat, port->mmio + PORT_IRQ_STAT); @@ -796,7 +795,7 @@ static inline irqreturn_t mtip_handle_irq(struct driver_data *data) } if (unlikely(port_stat & PORT_IRQ_ERR)) { - if (unlikely(mtip_check_surprise_removal(dd->pdev))) { + if (unlikely(mtip_check_surprise_removal(dd))) { /* don't proceed further */ return IRQ_HANDLED; } @@ -915,7 +914,7 @@ static int mtip_quiesce_io(struct mtip_port *port, unsigned long timeout) msleep(100); - if (mtip_check_surprise_removal(port->dd->pdev)) + if (mtip_check_surprise_removal(port->dd)) goto err_fault; active = mtip_commands_active(port); @@ -980,7 +979,7 @@ static int mtip_exec_internal_command(struct mtip_port *port, return -EFAULT; } - if (mtip_check_surprise_removal(dd->pdev)) + if (mtip_check_surprise_removal(dd)) return -EFAULT; rq = blk_mq_alloc_request(dd->queue, REQ_OP_DRV_IN, BLK_MQ_REQ_RESERVED); @@ -1022,7 +1021,7 @@ static int mtip_exec_internal_command(struct mtip_port *port, fis->command, int_cmd->status); rv = -EIO; - if (mtip_check_surprise_removal(dd->pdev) || + if (mtip_check_surprise_removal(dd) || test_bit(MTIP_DDF_REMOVE_PENDING_BIT, &dd->dd_flag)) { dev_err(&dd->pdev->dev, @@ -2513,7 +2512,7 @@ static int mtip_ftl_rebuild_poll(struct driver_data *dd) if (unlikely(test_bit(MTIP_DDF_REMOVE_PENDING_BIT, &dd->dd_flag))) return -EFAULT; - if (mtip_check_surprise_removal(dd->pdev)) + if (mtip_check_surprise_removal(dd)) return -EFAULT; if (mtip_get_identify(dd->port, NULL) < 0) @@ -2891,7 +2890,7 @@ static int mtip_hw_init(struct driver_data *dd) time_before(jiffies, timeout)) { mdelay(100); } - if (unlikely(mtip_check_surprise_removal(dd->pdev))) { + if (unlikely(mtip_check_surprise_removal(dd))) { timetaken = jiffies - timetaken; dev_warn(&dd->pdev->dev, "Surprise removal detected at %u ms\n", @@ -4098,7 +4097,7 @@ static void mtip_pci_remove(struct pci_dev *pdev) list_add(&dd->remove_list, &removing_list); spin_unlock_irqrestore(&dev_lock, flags); - mtip_check_surprise_removal(pdev); + mtip_check_surprise_removal(dd); synchronize_irq(dd->pdev->irq); /* Spin until workers are done */ From patchwork Wed Dec 8 19:24:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12665133 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B119AC43219 for ; Wed, 8 Dec 2021 19:25:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236118AbhLHT2r (ORCPT ); Wed, 8 Dec 2021 14:28:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235914AbhLHT2p (ORCPT ); Wed, 8 Dec 2021 14:28:45 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E930FC0617A1; Wed, 8 Dec 2021 11:25:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 2869CCE233A; Wed, 8 Dec 2021 19:25:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22D37C341CB; Wed, 8 Dec 2021 19:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638991509; bh=QEAVmPKcbfLK9UF+RR+mmCH6uory5+56xfMjGTff7FY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nAdq+tksKQ3hlZEqT10fOP6xA7lKP5QPDC06I2bBBoUMVqqWW8SCL266In7VpfjHd Kji4QnM6n8tOUf2IdRQZbtSjlrGZDKJQwr2HtGy8B8ZIQ0eZX+Xdx5ldePVJEkYlHP KetpquO0IFceCBeiQRkxHfl4RqguH3piC/ResGC5Ci46mXlCGmARbROvwdC8N3EMXl 9H9IZyydEWfRXqa8CFzNXj1lK6jxNEtN3He5g1rlSScuqnF7UKLKDUSNguBuXCVzcx MZ4emoKEdrYJttnVPKAUwQ91lSIoq+C72IeV3x7a6U2bF80IP4HpA2QGnBZe1yhY3n y0TxmDn02gkvA== From: Bjorn Helgaas To: Jens Axboe , Joshua Morris , Philip Kelleher Cc: "Rafael J . Wysocki" , Vaibhav Gupta , Vaibhav Gupta , linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , Bjorn Helgaas Subject: [PATCH v5 3/4] mtip32xx: convert to generic power management Date: Wed, 8 Dec 2021 13:24:48 -0600 Message-Id: <20211208192449.146076-4-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211208192449.146076-1-helgaas@kernel.org> References: <20211208192449.146076-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Vaibhav Gupta Convert mtip32xx from legacy PCI power management to the generic power management framework. Previously, mtip32xx used legacy PCI power management, where mtip_pci_suspend() and mtip_pci_resume() were responsible for both device-specific things and generic PCI things: mtip_pci_suspend mtip_block_suspend(dd) <-- device-specific pci_save_state(pdev) <-- generic PCI pci_set_power_state(pdev, pci_choose_state(pdev, state)) mtip_pci_resume pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state(pdev) <-- generic PCI pcim_enable_device(pdev) <-- generic PCI pci_set_master(pdev) <-- generic PCI mtip_block_resume(dd) <-- device-specific With generic power management, the PCI bus PM methods do the generic PCI things, and the driver needs only the device-specific part, i.e., suspend_devices_and_enter dpm_suspend_start(PMSG_SUSPEND) pci_pm_suspend # PCI bus .suspend() method mtip_pci_suspend # dev->driver->pm->suspend mtip_block_suspend <-- device-specific suspend_enter dpm_suspend_noirq(PMSG_SUSPEND) pci_pm_suspend_noirq # PCI bus .suspend_noirq() method pci_save_state <-- generic PCI pci_prepare_to_sleep <-- generic PCI pci_set_power_state ... dpm_resume_end(PMSG_RESUME) pci_pm_resume # PCI bus .resume() method pci_restore_standard_config pci_set_power_state(PCI_D0) <-- generic PCI pci_restore_state <-- generic PCI mtip_pci_resume # dev->driver->pm->resume mtip_block_resume <-- device-specific [bhelgaas: commit log] Link: https://lore.kernel.org/r/20210114115423.52414-2-vaibhavgupta40@gmail.com Signed-off-by: Vaibhav Gupta Signed-off-by: Bjorn Helgaas --- drivers/block/mtip32xx/mtip32xx.c | 48 +++++++------------------------ 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 894020aaaaeb..368b3c4e0744 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -4144,30 +4144,17 @@ static void mtip_pci_remove(struct pci_dev *pdev) * 0 Success * <0 Error */ -static int mtip_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) +static int __maybe_unused mtip_pci_suspend(struct device *dev) { int rv = 0; - struct driver_data *dd = pci_get_drvdata(pdev); + struct driver_data *dd = dev_get_drvdata(dev); set_bit(MTIP_DDF_RESUME_BIT, &dd->dd_flag); /* Disable ports & interrupts then send standby immediate */ rv = mtip_block_suspend(dd); - if (rv < 0) { - dev_err(&pdev->dev, - "Failed to suspend controller\n"); - return rv; - } - - /* - * Save the pci config space to pdev structure & - * disable the device - */ - pci_save_state(pdev); - pci_disable_device(pdev); - - /* Move to Low power state*/ - pci_set_power_state(pdev, PCI_D3hot); + if (rv < 0) + dev_err(dev, "Failed to suspend controller\n"); return rv; } @@ -4179,25 +4166,10 @@ static int mtip_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) * 0 Success * <0 Error */ -static int mtip_pci_resume(struct pci_dev *pdev) +static int __maybe_unused mtip_pci_resume(struct device *dev) { int rv = 0; - struct driver_data *dd = pci_get_drvdata(pdev); - - /* Move the device to active State */ - pci_set_power_state(pdev, PCI_D0); - - /* Restore PCI configuration space */ - pci_restore_state(pdev); - - /* Enable the PCI device*/ - rv = pcim_enable_device(pdev); - if (rv < 0) { - dev_err(&pdev->dev, - "Failed to enable card during resume\n"); - goto err; - } - pci_set_master(pdev); + struct driver_data *dd = dev_get_drvdata(dev); /* * Calls hbaReset, initPort, & startPort function @@ -4205,9 +4177,8 @@ static int mtip_pci_resume(struct pci_dev *pdev) */ rv = mtip_block_resume(dd); if (rv < 0) - dev_err(&pdev->dev, "Unable to resume\n"); + dev_err(dev, "Unable to resume\n"); -err: clear_bit(MTIP_DDF_RESUME_BIT, &dd->dd_flag); return rv; @@ -4238,14 +4209,15 @@ static const struct pci_device_id mtip_pci_tbl[] = { { 0 } }; +static SIMPLE_DEV_PM_OPS(mtip_pci_pm_ops, mtip_pci_suspend, mtip_pci_resume); + /* Structure that describes the PCI driver functions. */ static struct pci_driver mtip_pci_driver = { .name = MTIP_DRV_NAME, .id_table = mtip_pci_tbl, .probe = mtip_pci_probe, .remove = mtip_pci_remove, - .suspend = mtip_pci_suspend, - .resume = mtip_pci_resume, + .driver.pm = &mtip_pci_pm_ops, .shutdown = mtip_pci_shutdown, }; From patchwork Wed Dec 8 19:24:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 12665135 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEFC2C433F5 for ; Wed, 8 Dec 2021 19:25:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236404AbhLHT2v (ORCPT ); Wed, 8 Dec 2021 14:28:51 -0500 Received: from sin.source.kernel.org ([145.40.73.55]:36938 "EHLO sin.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236188AbhLHT2r (ORCPT ); Wed, 8 Dec 2021 14:28:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 0E699CE232B; Wed, 8 Dec 2021 19:25:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1000C341CF; Wed, 8 Dec 2021 19:25:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638991512; bh=vP6f/W58TP3IqHAcgDPaq9RdV/xPL90lUKpkB6Lv618=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pNOqjKq7ezrlERusPHPdRP9XugUOMPlfIQ4iSdbzrYdSDe/ejHEbZ8yn7W6HVOE6i aECrEKgA5A1JdZaeKiuHv5bLYBt23Dc4vKSUvbUpjRxxpOjMMdhWwrc53tvAOa6h7u 4sNA9wEVcDYqW2sLsTbQHPqI40/noCEp3/+JdvVm680MQ+6kaqJqntknG5c+4jJkXW AB6QmECkW8aJMS5ifFiOMZg1cfyj85mQ8FmoZu2XSIGI2Pn/CH0coxWYTAypXp518K /DdLyDDDpqFtieYy10VoFwc0n97ihKmw81j52Wl+RfVON8dh8E9JsJa3NMMKRX/o9+ grptupHmds9pg== From: Bjorn Helgaas To: Jens Axboe , Joshua Morris , Philip Kelleher Cc: "Rafael J . Wysocki" , Vaibhav Gupta , Vaibhav Gupta , linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , Bjorn Helgaas Subject: [PATCH v5 4/4] rsxx: Drop PCI legacy power management Date: Wed, 8 Dec 2021 13:24:49 -0600 Message-Id: <20211208192449.146076-5-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211208192449.146076-1-helgaas@kernel.org> References: <20211208192449.146076-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas The rsxx driver doesn't support device suspend, so remove rsxx_pci_suspend(), the legacy PCI .suspend() method, completely. Signed-off-by: Bjorn Helgaas --- drivers/block/rsxx/core.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c index 8d9d69f5dfbc..19b85d16d711 100644 --- a/drivers/block/rsxx/core.c +++ b/drivers/block/rsxx/core.c @@ -1037,12 +1037,6 @@ static void rsxx_pci_remove(struct pci_dev *dev) kfree(card); } -static int rsxx_pci_suspend(struct pci_dev *dev, pm_message_t state) -{ - /* We don't support suspend at this time. */ - return -ENOSYS; -} - static void rsxx_pci_shutdown(struct pci_dev *dev) { struct rsxx_cardinfo *card = pci_get_drvdata(dev); @@ -1083,7 +1077,6 @@ static struct pci_driver rsxx_pci_driver = { .id_table = rsxx_pci_ids, .probe = rsxx_pci_probe, .remove = rsxx_pci_remove, - .suspend = rsxx_pci_suspend, .shutdown = rsxx_pci_shutdown, .err_handler = &rsxx_err_handler, };