]> err.no Git - linux-2.6/blobdiff - drivers/net/cxgb3/ael1002.c
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6] / drivers / net / cxgb3 / ael1002.c
index 93a90d825d85eae56a2c9aa14c27c9136f0f0909..ee140e63ddc5e337a3b2e22ce8c7a128395b1fd6 100644 (file)
@@ -1,14 +1,34 @@
 /*
- * This file is part of the Chelsio T3 Ethernet driver.
+ * Copyright (c) 2005-2007 Chelsio, Inc. All rights reserved.
  *
- * Copyright (C) 2005-2006 Chelsio Communications.  All rights reserved.
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
  *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the LICENSE file included in this
- * release for licensing terms and conditions.
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
  */
-
 #include "common.h"
 #include "regs.h"
 
@@ -199,7 +219,13 @@ static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok,
                unsigned int status;
 
                status = t3_read_reg(phy->adapter,
-                                    XGM_REG(A_XGM_SERDES_STAT0, phy->addr));
+                                    XGM_REG(A_XGM_SERDES_STAT0, phy->addr)) |
+                   t3_read_reg(phy->adapter,
+                               XGM_REG(A_XGM_SERDES_STAT1, phy->addr)) |
+                   t3_read_reg(phy->adapter,
+                               XGM_REG(A_XGM_SERDES_STAT2, phy->addr)) |
+                   t3_read_reg(phy->adapter,
+                               XGM_REG(A_XGM_SERDES_STAT3, phy->addr));
                *link_ok = !(status & F_LOWSIG0);
        }
        if (speed)
@@ -227,5 +253,5 @@ static struct cphy_ops xaui_direct_ops = {
 void t3_xaui_direct_phy_prep(struct cphy *phy, struct adapter *adapter,
                             int phy_addr, const struct mdio_ops *mdio_ops)
 {
-       cphy_init(phy, adapter, 1, &xaui_direct_ops, mdio_ops);
+       cphy_init(phy, adapter, phy_addr, &xaui_direct_ops, mdio_ops);
 }