From owner-svn-src-head@FreeBSD.ORG Mon Mar 23 19:58:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35BE2106566B; Mon, 23 Mar 2009 19:58:27 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19F008FC0C; Mon, 23 Mar 2009 19:58:27 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2NJwRbl019690; Mon, 23 Mar 2009 19:58:27 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2NJwQdX019688; Mon, 23 Mar 2009 19:58:26 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200903231958.n2NJwQdX019688@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 23 Mar 2009 19:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190330 - head/sys/dev/cxgb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2009 19:58:27 -0000 Author: gnn Date: Mon Mar 23 19:58:26 2009 New Revision: 190330 URL: http://svn.freebsd.org/changeset/base/190330 Log: Minor updates to the Chelsio driver, including removing an LOR. Submitted by: Navdeep Parhar at Chelsio Reviewed by: gnn MFC after: 3 weeks Modified: head/sys/dev/cxgb/cxgb_main.c head/sys/dev/cxgb/cxgb_offload.c Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Mon Mar 23 19:27:23 2009 (r190329) +++ head/sys/dev/cxgb/cxgb_main.c Mon Mar 23 19:58:26 2009 (r190330) @@ -365,8 +365,8 @@ cxgb_controller_probe(device_t dev) } #define FW_FNAME "cxgb_t3fw" -#define TPEEPROM_NAME "t3%c_tp_eeprom" -#define TPSRAM_NAME "t3%c_protocol_sram" +#define TPEEPROM_NAME "cxgb_t3%c_tp_eeprom" +#define TPSRAM_NAME "cxgb_t3%c_protocol_sram" static int upgrade_fw(adapter_t *sc) @@ -1292,10 +1292,8 @@ void t3_os_link_fault_handler(struct ada { struct port_info *pi = &sc->port[port_id]; - ADAPTER_LOCK(sc); pi->link_fault = 1; taskqueue_enqueue(sc->tq, &pi->link_fault_task); - ADAPTER_UNLOCK(sc); } void @@ -1595,8 +1593,9 @@ update_tpeeprom(struct adapter *adap) tpeeprom = firmware_get(name); if (tpeeprom == NULL) { - device_printf(adap->dev, "could not load TP EEPROM: unable to load %s\n", - TPEEPROM_NAME); + device_printf(adap->dev, + "could not load TP EEPROM: unable to load %s\n", + name); return; } @@ -1607,7 +1606,9 @@ update_tpeeprom(struct adapter *adap) goto release_tpeeprom; if (len != TP_SRAM_LEN) { - device_printf(adap->dev, "%s length is wrong len=%d expected=%d\n", TPEEPROM_NAME, len, TP_SRAM_LEN); + device_printf(adap->dev, + "%s length is wrong len=%d expected=%d\n", name, + len, TP_SRAM_LEN); return; } @@ -1619,7 +1620,8 @@ update_tpeeprom(struct adapter *adap) "Protocol SRAM image updated in EEPROM to %d.%d.%d\n", TP_VERSION_MAJOR, TP_VERSION_MINOR, TP_VERSION_MICRO); } else - device_printf(adap->dev, "Protocol SRAM image update in EEPROM failed\n"); + device_printf(adap->dev, + "Protocol SRAM image update in EEPROM failed\n"); release_tpeeprom: firmware_put(tpeeprom, FIRMWARE_UNLOAD); @@ -2571,7 +2573,7 @@ cxgb_extension_ioctl(struct cdev *dev, u mmd = mid->phy_id >> 8; if (!mmd) mmd = MDIO_DEV_PCS; - else if (mmd > MDIO_DEV_XGXS) + else if (mmd > MDIO_DEV_VEND2) return (EINVAL); error = phy->mdio_read(sc, mid->phy_id & 0x1f, mmd, @@ -2593,7 +2595,7 @@ cxgb_extension_ioctl(struct cdev *dev, u mmd = mid->phy_id >> 8; if (!mmd) mmd = MDIO_DEV_PCS; - else if (mmd > MDIO_DEV_XGXS) + else if (mmd > MDIO_DEV_VEND2) return (EINVAL); error = phy->mdio_write(sc, mid->phy_id & 0x1f, Modified: head/sys/dev/cxgb/cxgb_offload.c ============================================================================== --- head/sys/dev/cxgb/cxgb_offload.c Mon Mar 23 19:27:23 2009 (r190329) +++ head/sys/dev/cxgb/cxgb_offload.c Mon Mar 23 19:58:26 2009 (r190330) @@ -94,6 +94,9 @@ register_tdev(struct t3cdev *tdev) static inline void unregister_tdev(struct t3cdev *tdev) { + if (!inited) + return; + mtx_lock(&cxgb_db_lock); TAILQ_REMOVE(&ofld_dev_list, tdev, entry); mtx_unlock(&cxgb_db_lock);