Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp333707rwb; Fri, 4 Aug 2023 13:34:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzlQgW46+IwnwxU2h0A6TkNELdSaxNK/tQT4Z9d6Y7OsG6Jk5gagIeJKbKyPoKJl+pR8ye X-Received: by 2002:a17:902:ab86:b0:1b8:7618:5414 with SMTP id f6-20020a170902ab8600b001b876185414mr2132944plr.60.1691181291691; Fri, 04 Aug 2023 13:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691181291; cv=none; d=google.com; s=arc-20160816; b=n1Cntp/PV2CyfTG8YPclyh2iSu7UnfmUcynNBipR7Vi63YK90gGJ9leoA5TOvzvjqE w8ypHueO96wBA6Ezu4gBIWtWEEndf964O6qsiRqpdcuRk+O5YOQSy6tfZkGytzYkw/vE xDK/NWLFkP2iSUyaX4Mod3MonFQY65qMrKm/Hmm8vNX9b/f+DGmDFGHNUVuNllonT8oW K3pPDgtgOvewJXm951eixIM3OyYf74DY06X5GKXklHuDe8Gb5RhCYYsYr2r659ZzRUmf nkqCQVUIpugjhFPUMXDPQw7/Xp0m0Z4/Ap6EXtEdY1jwdGoTsyQKgsYzt4UDltwOCb6v uGEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=n9+OtkuGasSF2C7I0OMmAEZINJXjFGyeICuyLxFJPnI=; fh=Q8R+ocd/vgHKVj+9bIsTNH/I3rxIMnxaWZN6p4yi3U8=; b=z9sfeq6gRX0rDkXRoEOrEYfWpY/ezo3dUOmFpbG3AlIfYw+8xR8x8W28WcJeFG/ba4 DkFAiUk3i6hk6DeqFqZYF5vfHyswTRwj6w3lEWOU4884xrMIG9aTAkbmm77y3dQA7xK4 6LQafZReXoVKaujLToxrhtSeh9thqCrW9pyZkUSv+nogMW6zynJHCZE4TIBwu+z44osj Yab8xAlYsVL3wRRP/xZZXS2DCMJX1wSWN4DRaKDdrrcm5LHPlIwyVroupugWtJqljyh9 FaL7m1aFy+PyKve7eWWRIj2F5KPZplyTxM8ryiImwYtxQSh5xf0zwWaRaZLgw3VcqNh2 /cNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eHAF5Zgc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t4-20020a170902d14400b001bb21e1e6dbsi191188plt.383.2023.08.04.13.34.39; Fri, 04 Aug 2023 13:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eHAF5Zgc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbjHDTog (ORCPT + 99 others); Fri, 4 Aug 2023 15:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbjHDToe (ORCPT ); Fri, 4 Aug 2023 15:44:34 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87ADDE60; Fri, 4 Aug 2023 12:44:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691178273; x=1722714273; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=J3UrcL2aKfNjWWixBt8W2nMV1RiEIIjNK75fxVLF/Jg=; b=eHAF5ZgcSCu9smFEcTBHBMAQw+j1OzRDU+lH14qFYEjFqWw1/U7WJ/vv EgMslUsScTNPkEsdLPxZGKVkhykK8cq0SHu+TkTgvbvHgdUYWkzwRVVjb +MFg8OeHM9kIvQClPqua7luXh/eSC+aRsJECkKpbLtPKDUqGKhdF+2/+8 XPsENrS0ce6Yg5uAjd2u4PVWm+mu00r4/AWtxxqHD9ceCzJcazXxpOj1O dAwGr9/buhxucNjavoEvMKkVYfHIXy6cwERIOpbP9r0gWgbqOvQhx4ZD1 MTh/AF2SgTfQMN+zc68APzbmOCN/FZEaZeC8ZhlFoL/97rydNIx0gGbQ+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="360292365" X-IronPort-AV: E=Sophos;i="6.01,255,1684825200"; d="scan'208";a="360292365" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2023 12:44:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10792"; a="800174396" X-IronPort-AV: E=Sophos;i="6.01,255,1684825200"; d="scan'208";a="800174396" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga004.fm.intel.com with ESMTP; 04 Aug 2023 12:44:19 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qS0if-005JjU-3C; Fri, 04 Aug 2023 22:44:17 +0300 Date: Fri, 4 Aug 2023 22:44:17 +0300 From: Andy Shevchenko To: Tony Lindgren Cc: Greg Kroah-Hartman , Jiri Slaby , Dhruva Gole , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , John Ogness , Johan Hovold , Sebastian Andrzej Siewior , Vignesh Raghavendra , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH] serial: 8250: Reinit port_id when adding back serial8250_isa_devs Message-ID: References: <20230804123546.25293-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230804123546.25293-1-tony@atomide.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 04, 2023 at 03:35:44PM +0300, Tony Lindgren wrote: > After fixing the serial core port device to use port->port_id instead of > port->line, unloading a hardware specific 8250 port driver started > producing an error for "sysfs: cannot create duplicate filename". > > This is happening as we are wrongly initializing port->port_id to zero > when adding back serial8250_isa_devs instances, and the serial8250:0.0 > sysfs entry may already exist. For serial8250 devices, we typically have > multiple devices mapped to a single driver instance. For the > serial8250_isa_devs instances, the port->port_id is the same as port->line. > > Let's fix the issue by re-initializing port_id when adding back the > serial8250_isa_devs instances in serial8250_unregister_port(). Good catch and fix, thank you! Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko