Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1731198rda; Tue, 24 Oct 2023 01:11:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE2s9y5lLZgJaSgb11MCuZbpBRIQovujMjS3RpxFbP9a87bp8XC9Ed3bcnXjdkr9Ek+PK+V X-Received: by 2002:a05:6a00:1a4e:b0:68f:e810:e86f with SMTP id h14-20020a056a001a4e00b0068fe810e86fmr9667322pfv.28.1698135061499; Tue, 24 Oct 2023 01:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698135061; cv=none; d=google.com; s=arc-20160816; b=tYFhI7pr/b6V9UzBg7XVohp5Me6LHTPPLkoUfgI4Ve7qC3GcYqaqyDYlDiKLSlcdp8 Kx+9B1Efk4glXGaLlj+xAtNQuIz2y93PKFVUctmJn7djPcamhzyELfe4H6KfkGwI8huh MVh877qBB5KnMZ7AJdyQLtLK+sX3Zgh50smHw8YVmh+8MevFT7z4v1jxUz40L3u0FKYB kmsl6QO5mmHOTtQzJcoXu7Ez+iwz5aTYnKizBalxWjxoio1+tEplU9wiVZboPJr5y2Lj ys1abC2n88r5QJCfK1JLWzxLYLP598HlA4xkvdtKwY5Xo6enemY7KTgq51v7RMOMu+iu 3xLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=YuGxYZSY9clfkeqStYfRc8diYRT+D62fwmlJjNRV100=; fh=jr2Bu0V4sKknqLbkK8Ju9CVDcF60HZD+wkHkmxC/dBs=; b=w91hT4Nm84OKpKmE7eM54dlLA/VY6pJsxkBOaWMW3OEntwU/rm9taPHIDW9LcVzfQI hko00sOm3XW5iYjd+Q8ZJZb91C7uKhg2ni7ghFQsdP4wS2ucKTgnk8KKgP9GE6+QCKch lYUnodReJ2XIdPudvf9+e9DOqbqV/LpJDklqoUeWPwXWOI5oDHE+4/XroqYavwh6Czhy HNQUqNaiGOOhmTJ3+YwELErkvlNHGi0eNZj3LBlMUbu46GnYB4j/dykWAVQNcUCZnb1x NOoEpGEmB3j/OSYfseLg2w0T9R52tqmrEhO7Avc33CCoy7qj7OWajXztG95ZVGyUZfPj WaIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KG5T8Mq2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g9-20020a056a000b8900b006935df301a3si8264772pfj.8.2023.10.24.01.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 01:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KG5T8Mq2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B5F878078CA5; Tue, 24 Oct 2023 01:10:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233808AbjJXIKY (ORCPT + 99 others); Tue, 24 Oct 2023 04:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232893AbjJXIKX (ORCPT ); Tue, 24 Oct 2023 04:10:23 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59A331A4; Tue, 24 Oct 2023 01:10:20 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFC23C433C8; Tue, 24 Oct 2023 08:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698135020; bh=5xhUOdK0houexRKXcOj94zVlL2PpAocoXIRj8TfVKBU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KG5T8Mq204F7Y8wCR8YhBSH8HQhdygp9fDkcBf8ZbjAsamSjwbx9XVKJUTxcVpUKH cgiqTFb8Et2+yKm7cGxUrh6kHKpQCi3p68Yb89KSDvvM0OKF/3L3OLYEfDvzJupvFi /BrbMIvLz6iAAboqli2ryXqpYg2mCto1wk/3RNw4= Date: Tue, 24 Oct 2023 10:10:16 +0200 From: Greg Kroah-Hartman To: Crescent CY Hsieh Cc: Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Jiri Slaby , LKML , linux-serial Subject: Re: [PATCH v3 6/6] tty: serial: 8250: Add support for MOXA PCIe boards to switch interface between RS422/RS485 Message-ID: <2023102403-clash-utmost-8377@gregkh> References: <20231018091739.10125-1-crescentcy.hsieh@moxa.com> <20231018091739.10125-7-crescentcy.hsieh@moxa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 24 Oct 2023 01:10:33 -0700 (PDT) On Tue, Oct 24, 2023 at 03:48:07PM +0800, Crescent CY Hsieh wrote: > On Mon, Oct 23, 2023 at 12:25:18PM +0300, Ilpo J?rvinen wrote: > > On Wed, 18 Oct 2023, Crescent CY Hsieh wrote: > > > + /* > > > + * RS232 is not supported for MOXA PCIe boards with device IDs > > > + * matching the pattern 0x*3**. > > > + */ > > > + if (pci_moxa_match_second_digit(device, 0x0300)) > > > + return -EOPNOTSUPP; > > > > This is not the correct error code I think. Maybe return -ENXIO instead. > > I think EOPNOTSUPP or ENOTSUPP would be more reasonable, they directly > indicates "operation is not supported". > > However, EOPNOTSUPP is used for network-related and ENOTSUPP is used for > NFSv3 protocol, even though they are already been used throughout the > kernel. > > Maybe add a new one stand for serial, or clean them up into a general > one, or use EOPNOTSUPP and ENOTSUPP just for now? -ENODEV should be the proper one here. thanks, greg k-h