From patchwork Fri Feb 3 21:35:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajesh Borundia X-Patchwork-Id: 139481 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 712CC104792 for ; Sat, 4 Feb 2012 08:51:54 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757992Ab2BCVvU (ORCPT ); Fri, 3 Feb 2012 16:51:20 -0500 Received: from ch1ehsobe005.messaging.microsoft.com ([216.32.181.185]:10583 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757973Ab2BCVvM (ORCPT ); Fri, 3 Feb 2012 16:51:12 -0500 Received: from mail98-ch1-R.bigfish.com (10.43.68.245) by CH1EHSOBE013.bigfish.com (10.43.70.63) with Microsoft SMTP Server id 14.1.225.23; Fri, 3 Feb 2012 21:51:08 +0000 Received: from mail98-ch1 (localhost [127.0.0.1]) by mail98-ch1-R.bigfish.com (Postfix) with ESMTP id E1D123A01B0; Fri, 3 Feb 2012 21:51:11 +0000 (UTC) X-SpamScore: 0 X-BigFish: VPS0(zzzz1202hzz8275bhz2fh2a8h668h839h) X-Forefront-Antispam-Report: CIP:198.70.193.61; KIP:(null); UIP:(null); IPV:NLI; H:avexcashub1.qlogic.com; RD:avexcashub1.qlogic.com; EFVD:NLI Received-SPF: pass (mail98-ch1: domain of qlogic.com designates 198.70.193.61 as permitted sender) client-ip=198.70.193.61; envelope-from=rajesh.borundia@qlogic.com; helo=avexcashub1.qlogic.com ; 1.qlogic.com ; Received: from mail98-ch1 (localhost.localdomain [127.0.0.1]) by mail98-ch1 (MessageSwitch) id 1328305869401600_17993; Fri, 3 Feb 2012 21:51:09 +0000 (UTC) Received: from CH1EHSMHS012.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.249]) by mail98-ch1.bigfish.com (Postfix) with ESMTP id 5AC6A160123; Fri, 3 Feb 2012 21:51:09 +0000 (UTC) Received: from avexcashub1.qlogic.com (198.70.193.61) by CH1EHSMHS012.bigfish.com (10.43.70.12) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 3 Feb 2012 21:51:03 +0000 Received: from mx.mv.qlogic.com (10.29.3.18) by avexcashub1.qlc.com (10.1.4.161) with Microsoft SMTP Server id 8.3.192.1; Fri, 3 Feb 2012 13:51:03 -0800 Received: from lnxdev-sm-001.mv.qlogic.com (dut6217.mv.qlogic.com [172.29.56.217]) by mx.mv.qlogic.com (Postfix) with ESMTP id D6A7BE64AE; Fri, 3 Feb 2012 13:51:03 -0800 (PST) Received: by lnxdev-sm-001.mv.qlogic.com (Postfix, from userid 0) id 80CBD14A80C; Fri, 3 Feb 2012 13:35:15 -0800 (PST) From: Rajesh Borundia To: David Miller CC: netdev , Ameen Rahman , Sony Chacko , Sritej Velaga Subject: [PATCH NEXT 3/6] netxen_nic: Fix phy link status Date: Fri, 3 Feb 2012 13:35:12 -0800 Message-ID: <1328304915-12858-4-git-send-email-rajesh.borundia@qlogic.com> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1328304915-12858-1-git-send-email-rajesh.borundia@qlogic.com> References: <1328304915-12858-1-git-send-email-rajesh.borundia@qlogic.com> MIME-Version: 1.0 X-OriginatorOrg: qlogic.com Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sritej Velaga Pass the adapter phy link status to the caller. Signed-off-by: Sritej Velaga --- .../net/ethernet/qlogic/netxen/netxen_nic_ctx.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c index 8f89c05..f3c0057 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ctx.c @@ -559,7 +559,11 @@ nx_fw_cmd_query_phy(struct netxen_adapter *adapter, u32 reg, u32 *val) if (rcode != NX_RCODE_SUCCESS) return -EIO; - return cmd.rsp.arg1; + if (val == NULL) + return -EIO; + + *val = cmd.rsp.arg1; + return 0; } int