From patchwork Wed May 19 00:19:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 100652 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4J0JJxS028940 for ; Wed, 19 May 2010 00:19:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754825Ab0ESATI (ORCPT ); Tue, 18 May 2010 20:19:08 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:55595 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753313Ab0ESATE convert rfc822-to-8bit (ORCPT ); Tue, 18 May 2010 20:19:04 -0400 Received: by iwn6 with SMTP id 6so2294542iwn.19 for ; Tue, 18 May 2010 17:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=8kqU2jhtpcM5qio6o3AifjqVmuTY/IpkoDe7k7HeUx8=; b=slzYPvhFRI/LBozv+rE9WC+4hKAP6lGAuCLvHLVc9AAlGpaTkCmZtiE57UH9BzGdKb xipf/TopNIw4/OBeVsAu53XR6wt8ZzEagrExRPlhWLwM6xINm5N3MY2tOSCK3g7qMsbT 0JHvfoQEMQKHoJ+GPXzqsr/ZN19KU9h2L78dA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=PNXhYLwnucy2nbiiNQN7CIcILl7umd4lIH5xVH1cyVmN38z6XeyPNYuKEKDnkox7vF Sk9erxsPZM8AyAW9Qtzb3yGE6oHteEl7svv9z9QMIVrStoTpqIMd3FxiS6EuW4z6ZbxZ omY+7dZ0UlughysAalqQxL9tMvpb/sT3phN1E= MIME-Version: 1.0 Received: by 10.231.156.1 with SMTP id u1mr2751095ibw.46.1274228343889; Tue, 18 May 2010 17:19:03 -0700 (PDT) Received: by 10.231.143.203 with HTTP; Tue, 18 May 2010 17:19:03 -0700 (PDT) In-Reply-To: <1274196888.8701.2.camel@localhost.localdomain> References: <1274196888.8701.2.camel@localhost.localdomain> Date: Tue, 18 May 2010 17:19:03 -0700 X-Google-Sender-Auth: EtJkjfRDg9o8RHCBTP6TviyaURw Message-ID: Subject: Re: [PATCH net-next] ixgbe: return error in set_rar when index out of range From: Jeff Kirsher To: Shirley Ma Cc: davem@davemloft.net, kvm@vger.kernel.org, netdev@vger.kernel.org, e1000-devel@lists.sourceforge.net Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 19 May 2010 00:19:19 +0000 (UTC) diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 1159d91..9595b1b 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c @@ -1188,6 +1188,7 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); } else { hw_dbg(hw, "RAR index %d is out of range.\n", index); + return IXGBE_ERR_RAR_INDEX; } return 0; @@ -1219,6 +1220,7 @@ s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index) IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); } else { hw_dbg(hw, "RAR index %d is out of range.\n", index); + return IXGBE_ERR_RAR_INDEX; } /* clear VMDq pool/queue selection for this RAR */ diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index bd69196..37d2807 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h @@ -2600,6 +2600,7 @@ struct ixgbe_info { #define IXGBE_ERR_FDIR_REINIT_FAILED -23 #define IXGBE_ERR_EEPROM_VERSION -24 #define IXGBE_ERR_NO_SPACE -25 +#define IXGBE_ERR_RAR_INDEX -26 #define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF #endif /* _IXGBE_TYPE_H_ */