From patchwork Tue Aug 23 19:24:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Michalik X-Patchwork-Id: 1669440 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=ofn6w1qA; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MBzjn3s4Lz1ygP for ; Wed, 24 Aug 2022 05:26:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 66F9A408C2; Tue, 23 Aug 2022 19:26:19 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 66F9A408C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1661282779; bh=6Rrbai+DoZ+b8zGiToUwjRSos6Iz+vWZgjomYfeuNTw=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=ofn6w1qA5na0rp0PStoPRw3Sq7JgwJBoENIuSmTC5fPf9S+TTNnHD8I7I10AbUQYr sCm0Nvze8Uww+NxACYKXeXHP42bCHMrHfp4N+fQN2Bxp86xjU8cyog3Mi8JrenlQ4I x85+vryCDEV8gwpwgW7Opk6ukDWoJD935pfPEkB+4rBJ7ihFQJU5/4WCcP7+q63eRH I7L4cY3+HrKQmpTp5QarTU/MoiZoA+iGcPYb7kU4o7RNbw2wRML5OTftg99MpSo47F 3C2n6cH48C9o/UrRsQ+oFGu9jTBxxFn3clXWPfiZuvQ7edu7c0VSfYH8A9iwHbGenH qFq2sL1G7/jbw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6x6UO8N402dJ; Tue, 23 Aug 2022 19:26:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 2DCDC408DB; Tue, 23 Aug 2022 19:26:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2DCDC408DB X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 03AAF1BF39D for ; Tue, 23 Aug 2022 19:26:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D21484011C for ; Tue, 23 Aug 2022 19:26:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D21484011C X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ikdFaI8Fu1as for ; Tue, 23 Aug 2022 19:26:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1024540112 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1024540112 for ; Tue, 23 Aug 2022 19:26:15 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6500,9779,10448"; a="380068751" X-IronPort-AV: E=Sophos;i="5.93,258,1654585200"; d="scan'208";a="380068751" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2022 12:26:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,258,1654585200"; d="scan'208";a="638791975" Received: from mmichali-devpc.igk.intel.com ([10.211.235.239]) by orsmga008.jf.intel.com with ESMTP; 23 Aug 2022 12:26:14 -0700 From: Michal Michalik To: intel-wired-lan@lists.osuosl.org Date: Tue, 23 Aug 2022 21:24:29 +0200 Message-Id: <20220823192429.17881-1-michal.michalik@intel.com> X-Mailer: git-send-email 2.9.5 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661282776; x=1692818776; h=from:to:cc:subject:date:message-id; bh=oV5KfTRaBpCbl0BmnpIMqeuZzFtaHC188L2dEX/osGs=; b=Y7/TMUsQocpInq0ixy0DeX1HhyYifkX/2VZtfKvZJpHEdO6fXyBOkwne 9I1gMrVzjdOcaaU0Z/QXPKsVpaX+LSYVyajICpCqKJbtuoxxleI+Yc37t LwMxvy5Nzra0A5og1BSQfN3E7nHs80WXG4GuyVsZMAOxmHC4VLvYSGSbN uO7EfL+et0U+3b/qIXwqkM3t8LRfCE7F0933A1eCAHhWlmaTWy/v7Bn3p p9mlZSgVYS55hwOuT0fF8cHnxE2n6aTIbeNyZbXWSl7byX8fQZWRegRTT zKRY9FMGFqDVa4zsytA+/O96qdqzN5lpzy/Ap4tEP3lbyOmGRmyrhVcpV Q==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Y7/TMUsQ Subject: [Intel-wired-lan] [PATCH net v1] ice: Add set_termios tty operations handle to GNSS X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Some third party tools (ex. ubxtool) tries to change GNSS TTY parameters (ex. speed). While being optional implementation, without set_termios handle this operation fails and prevent those third party tools from working. TTY interface in ice driver is virtual and don't need any change on set_termios, so is left empty. Add this mock to support all Linux TTY APIs. Fixes: 43113ff73453 ("ice: add TTY for GNSS module for E810T device") Signed-off-by: Michal Michalik Tested-by: Gurucharan (A Contingent worker at Intel) --- drivers/net/ethernet/intel/ice/ice_gnss.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c index b5a7f24..c2dc5e5 100644 --- a/drivers/net/ethernet/intel/ice/ice_gnss.c +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c @@ -404,11 +404,26 @@ static unsigned int ice_gnss_tty_write_room(struct tty_struct *tty) return ICE_GNSS_TTY_WRITE_BUF; } +/** + * ice_gnss_tty_set_termios - mock for set_termios tty operations + * @tty: pointer to the tty_struct + * @new_termios: pointer to the new termios parameters + */ +static void +ice_gnss_tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios) +{ + /* Some 3rd party tools (ex. ubxtool) want to change the TTY parameters. + * In our virtual interface (I2C communication over FW AQ) we don't have + * to change anything, but we need to implement it to unblock tools. + */ +} + static const struct tty_operations tty_gps_ops = { .open = ice_gnss_tty_open, .close = ice_gnss_tty_close, .write = ice_gnss_tty_write, .write_room = ice_gnss_tty_write_room, + .set_termios = ice_gnss_tty_set_termios, }; /**