From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::22d; helo=mail-io0-x22d.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8040622146756 for ; Thu, 22 Mar 2018 04:33:14 -0700 (PDT) Received: by mail-io0-x22d.google.com with SMTP id d5so10573811iob.9 for ; Thu, 22 Mar 2018 04:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:date:to:subject:message-id:mime-version:content-disposition :user-agent; bh=dzk9SBv4t3rfF71xt67lYu8BOpismQS2C2c+W6WUEbw=; b=GNf2GL5AYWpO3xIbR2aPPqHyHNdPvvfN50DHtyLQBBb6Iz/aKDIDpnCdBNzUMVmlHi ScCtlLothBprojgmMvBQPiqQjuMMS1qp5Yb0yOHX9NV64/vR/O8osbUOdCKHuf1IkCIG SDTkJU2BLK3cA37Fz++mJ8XjQBN3+vCCGj35g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:mime-version :content-disposition:user-agent; bh=dzk9SBv4t3rfF71xt67lYu8BOpismQS2C2c+W6WUEbw=; b=qi3xqSKC159f4pP4LLy/bkmQfxkNbFrtJGRikjnRP8kLq0jkQu3MUPKFDf7tqqJLfI ORJsSfa+bd6rc+xElMbdr3qzIJ4QpJ3h98ZWWit0ozG+kc3isH84gYaq1MIGQTI0V/rh P9thpShWgYVvZs52lI+3/yDzckHzF+KfAFifu4MCoqolDGFytLmNb/z+ApwFns2eDJJz VibdQpdxtPDvlii7yv7tAtOldjLxg/4n1FaTDxu/8WzfRpOgTYMQ0+volkaYzu4aUPCt toe10Wk24crTl6dBtp9mdGJa9dJFC9TTR5XHKsv9gs02GbhTxP+rPcFg7iHnjZAlZ0Wa 6EzQ== X-Gm-Message-State: AElRT7GGlLCROxOw49uMwspIHz9U6BlsSlc3NONEf+I5Ae77BLFUTPMv r/a519R3BW2Hqh6OfqJjW1uhrmd4Izg= X-Google-Smtp-Source: AIpwx4+4CLeY+DU5MaN/ooU603xnZ1y2G4vgZZYr39p2rZ9vUojHaPTtY62z9xNm9nNY26wq+lNuTA== X-Received: by 10.107.165.12 with SMTP id o12mr4645789ioe.87.1521718786171; Thu, 22 Mar 2018 04:39:46 -0700 (PDT) Received: from SZX1000114654 ([45.56.152.100]) by smtp.gmail.com with ESMTPSA id f201-v6sm5008473itc.12.2018.03.22.04.39.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 04:39:45 -0700 (PDT) From: Guo Heyi X-Google-Original-From: Guo Heyi Date: Thu, 22 Mar 2018 19:39:42 +0800 To: edk2-devel@lists.01.org Message-ID: <20180322113942.GC53577@SZX1000114654> MIME-Version: 1.0 User-Agent: Mutt/1.5.24 (2015-08-30) Subject: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 11:33:16 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi folks, The SetAttributes() interface of generic SerialDxe driver in MdeModulePkg/Universal does not fully follow UEFI spec. The spec requires to use default time out value when the input "Timeout" is 0, but the current implementation will set timeout to 0 directly. It tries to pass "Timeout" to SerialPortSetAttributes(), but none of SerialPortLib instances in edk2 tree will deal with this parameter. What's more, Timeout is actually a software parameter and is only used in SerialDxe itself, not in SerialPortLib instances, so I think it makes more sense to set Timeout in SerialDxe directly instead of in SerialPortLib. Please advise. Thanks and regards, Heyi