svn commit: r251076 - head/sys/dev/qlxgbe

2013-05-28 Thread David C Somayajulu
Author: davidcs
Date: Tue May 28 22:00:37 2013
New Revision: 251076
URL: http://svnweb.freebsd.org/changeset/base/251076

Log:
  Avoid reading back certain registers following a write. This is an 
optimization.
  
  Submitted by: David C Somayajulu
  Approved by: George Neville Neil

Modified:
  head/sys/dev/qlxgbe/ql_hw.h

Modified: head/sys/dev/qlxgbe/ql_hw.h
==
--- head/sys/dev/qlxgbe/ql_hw.h Tue May 28 21:57:55 2013(r251075)
+++ head/sys/dev/qlxgbe/ql_hw.h Tue May 28 22:00:37 2013(r251076)
@@ -1533,16 +1533,16 @@ typedef struct _qla_hw {
 } qla_hw_t;
 
 #define QL_UPDATE_RDS_PRODUCER_INDEX(ha, prod_reg, val) \
-   WRITE_REG32(ha, prod_reg, val);
+   bus_write_4((ha-pci_reg), prod_reg, val);
 
 #define QL_UPDATE_TX_PRODUCER_INDEX(ha, val, i) \
-   WRITE_REG32(ha, ha-hw.tx_cntxt[i].tx_prod_reg, val)
+   WRITE_REG32(ha, ha-hw.tx_cntxt[i].tx_prod_reg, val)
 
 #define QL_UPDATE_SDS_CONSUMER_INDEX(ha, i, val) \
-   WRITE_REG32(ha, ha-hw.sds[i].sds_consumer, val)
-
-#define QL_ENABLE_INTERRUPTS(ha, i) WRITE_REG32(ha, ha-hw.intr_src[i], 0);
+   bus_write_4((ha-pci_reg), (ha-hw.sds[i].sds_consumer), val);
 
+#define QL_ENABLE_INTERRUPTS(ha, i) \
+   bus_write_4((ha-pci_reg), (ha-hw.intr_src[i]), 0);
 
 #define QL_BUFFER_ALIGN16
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r251605 - head/sys/dev/qlxgbe

2013-06-10 Thread David C Somayajulu
Author: davidcs
Date: Mon Jun 10 17:12:22 2013
New Revision: 251605
URL: http://svnweb.freebsd.org/changeset/base/251605

Log:
  There is a one-to-one correspondence between the MSI-X vector # and the 
Status Descriptor Ring Index. Hence there is no need to check the Interrupt 
Source Register.
  
  Approved by:  George Neville-Neil

Modified:
  head/sys/dev/qlxgbe/ql_isr.c

Modified: head/sys/dev/qlxgbe/ql_isr.c
==
--- head/sys/dev/qlxgbe/ql_isr.cMon Jun 10 15:22:27 2013
(r251604)
+++ head/sys/dev/qlxgbe/ql_isr.cMon Jun 10 17:12:22 2013
(r251605)
@@ -858,7 +858,6 @@ ql_isr(void *arg)
int idx;
qla_hw_t *hw;
struct ifnet *ifp;
-   uint32_t data = 0;
uint32_t ret = 0;
 
ha = ivec-ha;
@@ -871,12 +870,7 @@ ql_isr(void *arg)
if (idx == 0)
taskqueue_enqueue(ha-tx_tq, ha-tx_task);

-
-
-   data = READ_REG32(ha, ha-hw.intr_src[idx]);
-
-   if (data  0x1 ) 
-   ret = qla_rcv_isr(ha, idx, -1);
+   ret = qla_rcv_isr(ha, idx, -1);
 
if (idx == 0)
taskqueue_enqueue(ha-tx_tq, ha-tx_task);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r252206 - in head: share/man/man4 sys/conf sys/dev/qlxge sys/modules sys/modules/qlxge

2013-06-25 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 25 17:50:22 2013
New Revision: 252206
URL: http://svnweb.freebsd.org/changeset/base/252206

Log:
  Add Qlogic 10Gb Ethernet Driver for Qlogic 8100 Series CNA Adapter
  Driver version (v2.0.0)
  
  Submitted by: David C Somayajulu (davi...@freebsd.org) QLogic Corporation
  Approved by: George Neville-Neil (g...@freebsd.org)

Added:
  head/share/man/man4/qlxge.4   (contents, props changed)
  head/sys/dev/qlxge/
  head/sys/dev/qlxge/README.txt   (contents, props changed)
  head/sys/dev/qlxge/qls_dbg.c   (contents, props changed)
  head/sys/dev/qlxge/qls_dbg.h   (contents, props changed)
  head/sys/dev/qlxge/qls_def.h   (contents, props changed)
  head/sys/dev/qlxge/qls_dump.c   (contents, props changed)
  head/sys/dev/qlxge/qls_dump.h   (contents, props changed)
  head/sys/dev/qlxge/qls_glbl.h   (contents, props changed)
  head/sys/dev/qlxge/qls_hw.c   (contents, props changed)
  head/sys/dev/qlxge/qls_hw.h   (contents, props changed)
  head/sys/dev/qlxge/qls_inline.h   (contents, props changed)
  head/sys/dev/qlxge/qls_ioctl.c   (contents, props changed)
  head/sys/dev/qlxge/qls_ioctl.h   (contents, props changed)
  head/sys/dev/qlxge/qls_isr.c   (contents, props changed)
  head/sys/dev/qlxge/qls_os.c   (contents, props changed)
  head/sys/dev/qlxge/qls_os.h   (contents, props changed)
  head/sys/dev/qlxge/qls_ver.h   (contents, props changed)
  head/sys/modules/qlxge/
  head/sys/modules/qlxge/Makefile   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/sys/conf/files.amd64
  head/sys/modules/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileTue Jun 25 15:45:31 2013
(r252205)
+++ head/share/man/man4/MakefileTue Jun 25 17:50:22 2013
(r252206)
@@ -371,6 +371,7 @@ MAN=aac.4 \
pts.4 \
pty.4 \
puc.4 \
+   ${_qlxge.4} \
${_qlxgb.4} \
${_qlxgbe.4} \
ral.4 \
@@ -793,10 +794,12 @@ _bhyve.4= bhyve.4
 _if_ntb.4= if_ntb.4
 _ntb.4=ntb.4
 _ntb_hw.4= ntb_hw.4
+_qlxge.4=  qlxge.4
 _qlxgb.4=  qlxgb.4
 _qlxgbe.4= qlxgbe.4
 _sfxge.4=  sfxge.4
 
+MLINKS+=qlxge.4 if_qlxge.4
 MLINKS+=qlxgb.4 if_qlxgb.4
 MLINKS+=qlxgbe.4 if_qlxgbe.4
 MLINKS+=sfxge.4 if_sfxge.4

Added: head/share/man/man4/qlxge.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/qlxge.4 Tue Jun 25 17:50:22 2013(r252206)
@@ -0,0 +1,91 @@
+.\-
+.\ Copyright (c) 2013-2014 Qlogic Corporation 
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. 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.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd June 21, 2013
+.Dt QLXGE 4
+.Os
+.Sh NAME
+.Nm qlxge
+.Nd QLogic 8100 Series 10 Gigabit Ethernet Adapter Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device qlxge
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_qlxge_load=YES
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports IPv4 checksum offload,
+TCP and UDP checksum offload for both IPv4 and IPv6,
+Large Segment Offload for both IPv4 and IPv6,
+Jumbo frames, VLAN Tag, and
+Receive Side scaling.
+For further hardware information, see
+.Pa http://www.qlogic.com/ .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet  CNA Adapter based on the following
+chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic 8100 series
+.El
+.Sh SUPPORT
+For support questions please contact

svn commit: r252580 - head/sys/dev/qlxgbe

2013-07-03 Thread David C Somayajulu
Author: davidcs
Date: Wed Jul  3 17:57:35 2013
New Revision: 252580
URL: http://svnweb.freebsd.org/changeset/base/252580

Log:
  Port 0 needs to wait for ACK only if it issued the RESET.

Modified:
  head/sys/dev/qlxgbe/ql_os.c

Modified: head/sys/dev/qlxgbe/ql_os.c
==
--- head/sys/dev/qlxgbe/ql_os.c Wed Jul  3 17:47:48 2013(r252579)
+++ head/sys/dev/qlxgbe/ql_os.c Wed Jul  3 17:57:35 2013(r252580)
@@ -1646,11 +1646,13 @@ qla_error_recovery(void *context, int pe

if ((ha-pci_func  0x1) == 0) {
 
-   if (!ha-msg_from_peer) 
+   if (!ha-msg_from_peer) {
qla_send_msg_to_peer(ha, QL_PEER_MSG_RESET);
 
-   while ((ha-msg_from_peer != QL_PEER_MSG_ACK)   msecs_100--)
-   qla_mdelay(__func__, 100);
+   while ((ha-msg_from_peer != QL_PEER_MSG_ACK) 
+   msecs_100--)
+   qla_mdelay(__func__, 100);
+   }
 
ha-msg_from_peer = 0;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r250340 - head/sys/dev/qlxgb

2013-05-07 Thread David C Somayajulu
Author: davidcs
Date: Tue May  7 22:58:42 2013
New Revision: 250340
URL: http://svnweb.freebsd.org/changeset/base/250340

Log:
  1. Updated Copyright Information
  2. Added Flash Read/Update Support
  3. Fixed TSO Handling
  
  Submitted by: David C Somayajulu (davi...@freebsd.org)
  Reviewed by: George Neville-Neil (g...@freebsd.org)
  Approved by: George Neville-Neil (g...@freebsd.org)

Modified:
  head/sys/dev/qlxgb/README.txt
  head/sys/dev/qlxgb/qla_dbg.c
  head/sys/dev/qlxgb/qla_dbg.h
  head/sys/dev/qlxgb/qla_def.h
  head/sys/dev/qlxgb/qla_glbl.h
  head/sys/dev/qlxgb/qla_hw.c
  head/sys/dev/qlxgb/qla_hw.h
  head/sys/dev/qlxgb/qla_inline.h
  head/sys/dev/qlxgb/qla_ioctl.c
  head/sys/dev/qlxgb/qla_ioctl.h
  head/sys/dev/qlxgb/qla_isr.c
  head/sys/dev/qlxgb/qla_misc.c
  head/sys/dev/qlxgb/qla_os.c
  head/sys/dev/qlxgb/qla_os.h
  head/sys/dev/qlxgb/qla_reg.h
  head/sys/dev/qlxgb/qla_ver.h

Modified: head/sys/dev/qlxgb/README.txt
==
--- head/sys/dev/qlxgb/README.txt   Tue May  7 22:49:56 2013
(r250339)
+++ head/sys/dev/qlxgb/README.txt   Tue May  7 22:58:42 2013
(r250340)
@@ -93,7 +93,7 @@ Technical Support at any phase of integr
 Technical Support can be reached by the following methods: 
 Web:http://support.qlogic.com
 E-mail: supp...@qlogic.com
-(c) Copyright 2011. All rights reserved worldwide. QLogic, the QLogic 
+(c) Copyright 2013. All rights reserved worldwide. QLogic, the QLogic 
 logo, and the Powered by QLogic logo are registered trademarks of
 QLogic Corporation. All other brand and product names are trademarks 
 or registered trademarks of their respective owners. 

Modified: head/sys/dev/qlxgb/qla_dbg.c
==
--- head/sys/dev/qlxgb/qla_dbg.cTue May  7 22:49:56 2013
(r250339)
+++ head/sys/dev/qlxgb/qla_dbg.cTue May  7 22:58:42 2013
(r250340)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2011 Qlogic Corporation
+ * Copyright (c) 2011-2013 Qlogic Corporation
  * All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/qlxgb/qla_dbg.h
==
--- head/sys/dev/qlxgb/qla_dbg.hTue May  7 22:49:56 2013
(r250339)
+++ head/sys/dev/qlxgb/qla_dbg.hTue May  7 22:58:42 2013
(r250340)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2011 Qlogic Corporation
+ * Copyright (c) 2011-2013 Qlogic Corporation
  * All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/qlxgb/qla_def.h
==
--- head/sys/dev/qlxgb/qla_def.hTue May  7 22:49:56 2013
(r250339)
+++ head/sys/dev/qlxgb/qla_def.hTue May  7 22:58:42 2013
(r250340)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2011 Qlogic Corporation
+ * Copyright (c) 2011-2013 Qlogic Corporation
  * All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -194,6 +194,8 @@ struct qla_host {
/* debug stuff */
volatile const char *qla_lock;
volatile const char *qla_unlock;
+
+   uint8_t fw_ver_str[32];
 };
 typedef struct qla_host qla_host_t;
 

Modified: head/sys/dev/qlxgb/qla_glbl.h
==
--- head/sys/dev/qlxgb/qla_glbl.h   Tue May  7 22:49:56 2013
(r250339)
+++ head/sys/dev/qlxgb/qla_glbl.h   Tue May  7 22:58:42 2013
(r250340)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2011 Qlogic Corporation
+ * Copyright (c) 2011-2013 Qlogic Corporation
  * All rights reserved.
  *
  *  Redistribution and use in source and binary forms, with or without
@@ -56,14 +56,6 @@ extern void qla_start(struct ifnet *ifp)
 extern int qla_get_mbuf(qla_host_t *ha, qla_rx_buf_t *rxb, struct mbuf *nmp,
uint32_t jumbo);
 
-
-/*
- * from qla_flash.c
- */
-extern int qla_flash_rd32_words(qla_host_t *ha, uint32_t addr,
-   uint32_t *val, uint32_t num);
-extern int qla_flash_rd32(qla_host_t *ha, uint32_t addr, uint32_t *val);
-
 /*
  * from qla_hw.c
  */
@@ -97,6 +89,14 @@ extern int qla_init_hw(qla_host_t *ha);
 extern int qla_rdwr_indreg32(qla_host_t *ha, uint32_t addr, uint32_t *val,
uint32_t rd);
 extern int qla_rd_flash32(qla_host_t *ha, uint32_t addr, uint32_t *data);
+extern int qla_flash_rd32_words(qla_host_t *ha, uint32_t addr,
+   uint32_t *val, uint32_t num);
+extern int qla_flash_rd32(qla_host_t *ha, uint32_t addr, uint32_t *val);
+extern int qla_fw_update(qla_host_t *ha, void *fdata, uint32_t off,
+   uint32_t size);
+extern int qla_erase_flash(qla_host_t *ha, uint32_t off, uint32_t size);
+extern int

svn commit: r250375 - head/sys/dev/qlxgb

2013-05-08 Thread David C Somayajulu
Author: davidcs
Date: Wed May  8 18:25:46 2013
New Revision: 250375
URL: http://svnweb.freebsd.org/changeset/base/250375

Log:
  No need to set if_mtu since it automatically updated by ether_ifattach().
  Use  if_initbaudrate() to set baudrate.
  Add IFCAP_LINKSTATE to if_capabilities.
  
  Submitted by: David C Somayajulu davi...@freebsd.org
  Approved by:  George Neville-Neil g...@freebsd.org

Modified:
  head/sys/dev/qlxgb/qla_os.c

Modified: head/sys/dev/qlxgb/qla_os.c
==
--- head/sys/dev/qlxgb/qla_os.c Wed May  8 17:45:22 2013(r250374)
+++ head/sys/dev/qlxgb/qla_os.c Wed May  8 18:25:46 2013(r250375)
@@ -669,8 +669,7 @@ qla_init_ifnet(device_t dev, qla_host_t 
 
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
 
-   ifp-if_mtu = ETHERMTU;
-   ifp-if_baudrate = (1 * 1000 * 1000 *1000);
+   if_initbaudrate(ifp, IF_Gbps(10));
ifp-if_init = qla_init;
ifp-if_softc = ha;
ifp-if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -690,6 +689,7 @@ qla_init_ifnet(device_t dev, qla_host_t 
IFCAP_JUMBO_MTU;
 
ifp-if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU;
+   ifp-if_capabilities |= IFCAP_LINKSTATE;
 
 #if defined(__FreeBSD_version)  (__FreeBSD_version  92)
ifp-if_timer = 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r250661 - in head: share/man/man4 sys/conf sys/dev/qlxgbe sys/modules sys/modules/qlxgbe

2013-05-15 Thread David C Somayajulu
Author: davidcs
Date: Wed May 15 17:03:09 2013
New Revision: 250661
URL: http://svnweb.freebsd.org/changeset/base/250661

Log:
  Add Qlogic 10Gigabit Ethernet  CNA Adapter Driver Version 3.10.10 for
  QLogic 8300 Series Adapters
  
  Submitted by: David C Somayajulu (davi...@freebsd.org) QLogic Corporation
  Approved by: George Neville-Neil (g...@freebsd.org)

Added:
  head/share/man/man4/qlxgbe.4   (contents, props changed)
  head/sys/dev/qlxgbe/
  head/sys/dev/qlxgbe/README.txt   (contents, props changed)
  head/sys/dev/qlxgbe/ql_dbg.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_dbg.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_def.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_glbl.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_hw.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_hw.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_inline.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_ioctl.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_ioctl.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_isr.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_misc.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_os.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_os.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_reset.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_tmplt.h   (contents, props changed)
  head/sys/dev/qlxgbe/ql_ver.h   (contents, props changed)
  head/sys/modules/qlxgbe/
  head/sys/modules/qlxgbe/Makefile   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/sys/conf/files.amd64
  head/sys/modules/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileWed May 15 14:35:02 2013
(r250660)
+++ head/share/man/man4/MakefileWed May 15 17:03:09 2013
(r250661)
@@ -371,6 +371,7 @@ MAN=aac.4 \
pty.4 \
puc.4 \
${_qlxgb.4} \
+   ${_qlxgbe.4} \
ral.4 \
random.4 \
rc.4 \
@@ -791,9 +792,11 @@ _if_ntb.4= if_ntb.4
 _ntb.4=ntb.4
 _ntb_hw.4= ntb_hw.4
 _qlxgb.4=  qlxgb.4
+_qlxgbe.4= qlxgbe.4
 _sfxge.4=  sfxge.4
 
 MLINKS+=qlxgb.4 if_qlxgb.4
+MLINKS+=qlxgbe.4 if_qlxgbe.4
 MLINKS+=sfxge.4 if_sfxge.4
 .endif
 

Added: head/share/man/man4/qlxgbe.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/qlxgbe.4Wed May 15 17:03:09 2013
(r250661)
@@ -0,0 +1,91 @@
+.\-
+.\ Copyright (c) 2013 Qlogic Corportaion 
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. 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.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd April 1, 2013
+.Dt QLXGBE 4
+.Os
+.Sh NAME
+.Nm qlxgbe
+.Nd QLogic 10 Gigabit Ethernet  CNA Adapter Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device qlxgbe
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_qlxgbe_load=YES
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports IPv4 checksum offload,
+TCP and UDP checksum offload for both IPv4 and IPv6,
+Large Segment Offload for both IPv4 and IPv6,
+Jumbo frames, VLAN Tag, and
+Receive Side scaling.
+For further hardware information, see
+.Pa http://www.qlogic.com/ .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet  CNA Adapter based on the following
+chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic 8300 series
+.El
+.Sh SUPPORT
+For support questions please

svn commit: r268854 - head/sys/dev/bxe

2014-07-18 Thread David C Somayajulu
Author: davidcs
Date: Fri Jul 18 20:04:11 2014
New Revision: 268854
URL: http://svnweb.freebsd.org/changeset/base/268854

Log:
  Initiate error recovery stats fail to update after 3 retries.
  Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
  panic only if ECORE_STOP_ON_ERROR is defined.
  
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe.h
  head/sys/dev/bxe/bxe_stats.c
  head/sys/dev/bxe/ecore_reg.h
  head/sys/dev/bxe/ecore_sp.h

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Fri Jul 18 18:11:24 2014(r268853)
+++ head/sys/dev/bxe/bxe.c  Fri Jul 18 20:04:11 2014(r268854)
@@ -11471,6 +11471,10 @@ bxe_process_kill(struct bxe_softc *sc,
 bxe_process_kill_chip_reset(sc, global);
 mb();
 
+/* clear errors in PGB */
+if (!CHIP_IS_E1(sc))
+REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f);
+
 /* Recover after reset: */
 /* MCP */
 if (global  bxe_reset_mcp_comp(sc, val)) {

Modified: head/sys/dev/bxe/bxe.h
==
--- head/sys/dev/bxe/bxe.h  Fri Jul 18 18:11:24 2014(r268853)
+++ head/sys/dev/bxe/bxe.h  Fri Jul 18 20:04:11 2014(r268854)
@@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx
 } \
 } while(0)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define bxe_panic(sc, msg) \
 do {   \
 panic msg; \
 } while (0)
 
+#else
+
+#define bxe_panic(sc, msg) \
+device_printf((sc)-dev, %s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#endif
+
 #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data));
 #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe)
 

Modified: head/sys/dev/bxe/bxe_stats.c
==
--- head/sys/dev/bxe/bxe_stats.cFri Jul 18 18:11:24 2014
(r268853)
+++ head/sys/dev/bxe/bxe_stats.cFri Jul 18 20:04:11 2014
(r268854)
@@ -1302,7 +1302,10 @@ bxe_stats_update(struct bxe_softc *sc)
 
 if (bxe_storm_stats_update(sc)) {
 if (sc-stats_pending++ == 3) {
-bxe_panic(sc, (storm stats not updated for 3 times\n));
+   if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
+   atomic_store_rel_long(sc-chip_tq_flags, 
CHIP_TQ_REINIT);
+   taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   }
 }
 return;
 }

Modified: head/sys/dev/bxe/ecore_reg.h
==
--- head/sys/dev/bxe/ecore_reg.hFri Jul 18 18:11:24 2014
(r268853)
+++ head/sys/dev/bxe/ecore_reg.hFri Jul 18 20:04:11 2014
(r268854)
@@ -1039,6 +1039,8 @@ __FBSDID($FreeBSD$);
0x942cUL
 #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \
0x9430UL
+#define PGLUE_B_REG_LATCHED_ERRORS_CLR \
+   0x943CUL
 #define PGLUE_B_REG_PGLUE_B_INT_STS \
0x9298UL
 #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \

Modified: head/sys/dev/bxe/ecore_sp.h
==
--- head/sys/dev/bxe/ecore_sp.h Fri Jul 18 18:11:24 2014(r268853)
+++ head/sys/dev/bxe/ecore_sp.h Fri Jul 18 20:04:11 2014(r268854)
@@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 #define ecore_sp_post(_sc, _a, _b, _c, _d) \
 bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define ECORE_DBG_BREAK_IF(exp) \
 do {\
 if (__predict_false(exp)) { \
@@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 }\
 } while (0)
 
+#else
+
+#define ECORE_DBG_BREAK_IF(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG_ON(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+
+#endif /* #ifdef ECORE_STOP_ON_ERROR */
+
 #define ECORE_ERR(str, ...) \
 BLOGE(sc, ECORE:  str, ##__VA_ARGS__)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r265411 - in head/sys: dev/bxe modules/bxe

2014-05-05 Thread David C Somayajulu
Author: davidcs
Date: Tue May  6 02:32:27 2014
New Revision: 265411
URL: http://svnweb.freebsd.org/changeset/base/265411

Log:
  Modify Copyright information to reflect Qlogic Corporation's purchase
  of Broadcom's NetXtreme business
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation
  MFC after:5 days

Modified:
  head/sys/dev/bxe/57710_init_values.c
  head/sys/dev/bxe/57710_int_offsets.h
  head/sys/dev/bxe/57711_init_values.c
  head/sys/dev/bxe/57711_int_offsets.h
  head/sys/dev/bxe/57712_init_values.c
  head/sys/dev/bxe/57712_int_offsets.h
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe.h
  head/sys/dev/bxe/bxe_dcb.h
  head/sys/dev/bxe/bxe_debug.c
  head/sys/dev/bxe/bxe_elink.c
  head/sys/dev/bxe/bxe_elink.h
  head/sys/dev/bxe/bxe_stats.c
  head/sys/dev/bxe/bxe_stats.h
  head/sys/dev/bxe/ecore_fw_defs.h
  head/sys/dev/bxe/ecore_hsi.h
  head/sys/dev/bxe/ecore_init.h
  head/sys/dev/bxe/ecore_init_ops.h
  head/sys/dev/bxe/ecore_mfw_req.h
  head/sys/dev/bxe/ecore_reg.h
  head/sys/dev/bxe/ecore_sp.c
  head/sys/dev/bxe/ecore_sp.h
  head/sys/modules/bxe/Makefile

Modified: head/sys/dev/bxe/57710_init_values.c
==
--- head/sys/dev/bxe/57710_init_values.cTue May  6 02:22:52 2014
(r265410)
+++ head/sys/dev/bxe/57710_init_values.cTue May  6 02:32:27 2014
(r265411)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: head/sys/dev/bxe/57710_int_offsets.h
==
--- head/sys/dev/bxe/57710_int_offsets.hTue May  6 02:22:52 2014
(r265410)
+++ head/sys/dev/bxe/57710_int_offsets.hTue May  6 02:32:27 2014
(r265411)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: head/sys/dev/bxe/57711_init_values.c
==
--- head/sys/dev/bxe/57711_init_values.cTue May  6 02:22:52 2014
(r265410)
+++ head/sys/dev/bxe/57711_init_values.cTue May  6 02:32:27 2014
(r265411)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior 

svn commit: r265703 - in head: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce

2014-05-08 Thread David C Somayajulu
Author: davidcs
Date: Thu May  8 19:40:37 2014
New Revision: 265703
URL: http://svnweb.freebsd.org/changeset/base/265703

Log:
  Modify Copyright information and other strings to reflect Qlogic 
Corporation's purchase of Broadcom's NetXtreme business.
  Added clean option to Makefile
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation
  MFC after:5 days

Modified:
  head/share/man/man4/bce.4
  head/share/man/man4/bxe.4
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bce/if_bcefw.h
  head/sys/dev/bce/if_bcereg.h
  head/sys/dev/bxe/bxe.c
  head/sys/modules/bce/Makefile

Modified: head/share/man/man4/bce.4
==
--- head/share/man/man4/bce.4   Thu May  8 19:35:29 2014(r265702)
+++ head/share/man/man4/bce.4   Thu May  8 19:40:37 2014(r265703)
@@ -1,5 +1,4 @@
-.\ Copyright (c) 2006 Broadcom Corporation
-.\  David Christensen davi...@broadcom.com.  All rights reserved.
+.\ Copyright (c) 2006-2014 QLogic Corporation
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -10,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its 
contributors
-.\may be used to endorse or promote products derived from this software
-.\without specific prior written consent.
 .\
 .\ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
 .\ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -33,7 +29,7 @@
 .Os
 .Sh NAME
 .Nm bce
-.Nd Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
+.Nd QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -52,7 +48,7 @@ if_bce_load=YES
 .Sh DESCRIPTION
 The
 .Nm
-driver supports Broadcom's NetXtreme II product family, including the
+driver supports QLogic's NetXtreme II product family, including the
 BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers.
 .Pp
 The NetXtreme II product family is composed of various Converged NIC (or CNIC)
@@ -141,25 +137,25 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver provides support for various NICs based on the Broadcom NetXtreme II
+driver provides support for various NICs based on the QLogic NetXtreme II
 family of Gigabit Ethernet controllers, including the
 following:
 .Pp
 .Bl -bullet -compact
 .It
-Broadcom NetXtreme II BCM5706 1000Base-SX
+QLogic NetXtreme II BCM5706 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5706 1000Base-T
+QLogic NetXtreme II BCM5706 1000Base-T
 .It
-Broadcom NetXtreme II BCM5708 1000Base-SX
+QLogic NetXtreme II BCM5708 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5708 1000Base-T
+QLogic NetXtreme II BCM5708 1000Base-T
 .It
-Broadcom NetXtreme II BCM5709 1000Base-SX
+QLogic NetXtreme II BCM5709 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5709 1000Base-T
+QLogic NetXtreme II BCM5709 1000Base-T
 .It
-Broadcom NetXtreme II BCM5716 1000Base-T
+QLogic NetXtreme II BCM5716 1000Base-T
 .It
 Dell PowerEdge 1950 integrated BCM5708 NIC
 .It
@@ -411,9 +407,11 @@ A controller hardware failure has occurr
 If the problem continues replace the controller.
 .El
 .Sh SUPPORT
-For general information and support,
-go to the Broadcom NIC Open Source Developer Resource Site:
-.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php .
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq supp...@qlogic.com .
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,

Modified: head/share/man/man4/bxe.4
==
--- head/share/man/man4/bxe.4   Thu May  8 19:35:29 2014(r265702)
+++ head/share/man/man4/bxe.4   Thu May  8 19:40:37 2014(r265703)
@@ -1,4 +1,4 @@
-.\ Copyright (c) 2013 Broadcom Corporation. All rights reserved.
+.\ Copyright (c) 2014 Qlogic Corporation. All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -9,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its 
contributors
-.\may be used to endorse or promote products derived from this software
-.\without specific prior written consent.
 .\
 .\ THIS SOFTWARE IS 

svn commit: r265794 - in stable/7/sys: dev/bxe modules/bxe

2014-05-09 Thread David C Somayajulu
Author: davidcs
Date: Sat May 10 02:06:46 2014
New Revision: 265794
URL: http://svnweb.freebsd.org/changeset/base/265794

Log:
  MFC r265411
  Modify Copyright information to reflect Qlogic Corporation's purchase
  of Broadcom's NetXtreme business
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/7/sys/dev/bxe/57710_init_values.c
  stable/7/sys/dev/bxe/57710_int_offsets.h
  stable/7/sys/dev/bxe/57711_init_values.c
  stable/7/sys/dev/bxe/57711_int_offsets.h
  stable/7/sys/dev/bxe/57712_init_values.c
  stable/7/sys/dev/bxe/57712_int_offsets.h
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe.h
  stable/7/sys/dev/bxe/bxe_dcb.h
  stable/7/sys/dev/bxe/bxe_debug.c
  stable/7/sys/dev/bxe/bxe_elink.c
  stable/7/sys/dev/bxe/bxe_elink.h
  stable/7/sys/dev/bxe/bxe_stats.c
  stable/7/sys/dev/bxe/bxe_stats.h
  stable/7/sys/dev/bxe/ecore_fw_defs.h
  stable/7/sys/dev/bxe/ecore_hsi.h
  stable/7/sys/dev/bxe/ecore_init.h
  stable/7/sys/dev/bxe/ecore_init_ops.h
  stable/7/sys/dev/bxe/ecore_mfw_req.h
  stable/7/sys/dev/bxe/ecore_reg.h
  stable/7/sys/dev/bxe/ecore_sp.c
  stable/7/sys/dev/bxe/ecore_sp.h
  stable/7/sys/modules/bxe/Makefile
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/57710_init_values.c
==
--- stable/7/sys/dev/bxe/57710_init_values.cSat May 10 01:45:39 2014
(r265793)
+++ stable/7/sys/dev/bxe/57710_init_values.cSat May 10 02:06:46 2014
(r265794)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/7/sys/dev/bxe/57710_int_offsets.h
==
--- stable/7/sys/dev/bxe/57710_int_offsets.hSat May 10 01:45:39 2014
(r265793)
+++ stable/7/sys/dev/bxe/57710_int_offsets.hSat May 10 02:06:46 2014
(r265794)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/7/sys/dev/bxe/57711_init_values.c
==
--- stable/7/sys/dev/bxe/57711_init_values.cSat May 10 01:45:39 2014
(r265793)
+++ stable/7/sys/dev/bxe/57711_init_values.cSat May 10 02:06:46 2014
(r265794)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. 

svn commit: r265795 - in stable/8/sys: dev/bxe modules/bxe

2014-05-09 Thread David C Somayajulu
Author: davidcs
Date: Sat May 10 02:08:04 2014
New Revision: 265795
URL: http://svnweb.freebsd.org/changeset/base/265795

Log:
  MFC r265411
  Modify Copyright information to reflect Qlogic Corporation's purchase
  of Broadcom's NetXtreme business
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/8/sys/dev/bxe/57710_init_values.c
  stable/8/sys/dev/bxe/57710_int_offsets.h
  stable/8/sys/dev/bxe/57711_init_values.c
  stable/8/sys/dev/bxe/57711_int_offsets.h
  stable/8/sys/dev/bxe/57712_init_values.c
  stable/8/sys/dev/bxe/57712_int_offsets.h
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/bxe.h
  stable/8/sys/dev/bxe/bxe_dcb.h
  stable/8/sys/dev/bxe/bxe_debug.c
  stable/8/sys/dev/bxe/bxe_elink.c
  stable/8/sys/dev/bxe/bxe_elink.h
  stable/8/sys/dev/bxe/bxe_stats.c
  stable/8/sys/dev/bxe/bxe_stats.h
  stable/8/sys/dev/bxe/ecore_fw_defs.h
  stable/8/sys/dev/bxe/ecore_hsi.h
  stable/8/sys/dev/bxe/ecore_init.h
  stable/8/sys/dev/bxe/ecore_init_ops.h
  stable/8/sys/dev/bxe/ecore_mfw_req.h
  stable/8/sys/dev/bxe/ecore_reg.h
  stable/8/sys/dev/bxe/ecore_sp.c
  stable/8/sys/dev/bxe/ecore_sp.h
  stable/8/sys/modules/bxe/Makefile
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/modules/   (props changed)

Modified: stable/8/sys/dev/bxe/57710_init_values.c
==
--- stable/8/sys/dev/bxe/57710_init_values.cSat May 10 02:06:46 2014
(r265794)
+++ stable/8/sys/dev/bxe/57710_init_values.cSat May 10 02:08:04 2014
(r265795)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/8/sys/dev/bxe/57710_int_offsets.h
==
--- stable/8/sys/dev/bxe/57710_int_offsets.hSat May 10 02:06:46 2014
(r265794)
+++ stable/8/sys/dev/bxe/57710_int_offsets.hSat May 10 02:08:04 2014
(r265795)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/8/sys/dev/bxe/57711_init_values.c
==
--- stable/8/sys/dev/bxe/57711_init_values.cSat May 10 02:06:46 2014
(r265794)
+++ stable/8/sys/dev/bxe/57711_init_values.cSat May 10 02:08:04 2014
(r265795)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  

svn commit: r265796 - in stable/9/sys: dev/bxe modules/bxe

2014-05-09 Thread David C Somayajulu
Author: davidcs
Date: Sat May 10 02:09:09 2014
New Revision: 265796
URL: http://svnweb.freebsd.org/changeset/base/265796

Log:
  MFC r265411
  Modify Copyright information to reflect Qlogic Corporation's purchase
  of Broadcom's NetXtreme business
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/9/sys/dev/bxe/57710_init_values.c
  stable/9/sys/dev/bxe/57710_int_offsets.h
  stable/9/sys/dev/bxe/57711_init_values.c
  stable/9/sys/dev/bxe/57711_int_offsets.h
  stable/9/sys/dev/bxe/57712_init_values.c
  stable/9/sys/dev/bxe/57712_int_offsets.h
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/bxe.h
  stable/9/sys/dev/bxe/bxe_dcb.h
  stable/9/sys/dev/bxe/bxe_debug.c
  stable/9/sys/dev/bxe/bxe_elink.c
  stable/9/sys/dev/bxe/bxe_elink.h
  stable/9/sys/dev/bxe/bxe_stats.c
  stable/9/sys/dev/bxe/bxe_stats.h
  stable/9/sys/dev/bxe/ecore_fw_defs.h
  stable/9/sys/dev/bxe/ecore_hsi.h
  stable/9/sys/dev/bxe/ecore_init.h
  stable/9/sys/dev/bxe/ecore_init_ops.h
  stable/9/sys/dev/bxe/ecore_mfw_req.h
  stable/9/sys/dev/bxe/ecore_reg.h
  stable/9/sys/dev/bxe/ecore_sp.c
  stable/9/sys/dev/bxe/ecore_sp.h
  stable/9/sys/modules/bxe/Makefile
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/dev/bxe/57710_init_values.c
==
--- stable/9/sys/dev/bxe/57710_init_values.cSat May 10 02:08:04 2014
(r265795)
+++ stable/9/sys/dev/bxe/57710_init_values.cSat May 10 02:09:09 2014
(r265796)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/9/sys/dev/bxe/57710_int_offsets.h
==
--- stable/9/sys/dev/bxe/57710_int_offsets.hSat May 10 02:08:04 2014
(r265795)
+++ stable/9/sys/dev/bxe/57710_int_offsets.hSat May 10 02:09:09 2014
(r265796)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/9/sys/dev/bxe/57711_init_values.c
==
--- stable/9/sys/dev/bxe/57711_init_values.cSat May 10 02:08:04 2014
(r265795)
+++ stable/9/sys/dev/bxe/57711_init_values.cSat May 10 02:09:09 2014
(r265796)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  

svn commit: r265797 - in stable/10/sys: dev/bxe modules/bxe

2014-05-09 Thread David C Somayajulu
Author: davidcs
Date: Sat May 10 02:10:32 2014
New Revision: 265797
URL: http://svnweb.freebsd.org/changeset/base/265797

Log:
  MFC r265411
  Modify Copyright information to reflect Qlogic Corporation's purchase
  of Broadcom's NetXtreme business
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/10/sys/dev/bxe/57710_init_values.c
  stable/10/sys/dev/bxe/57710_int_offsets.h
  stable/10/sys/dev/bxe/57711_init_values.c
  stable/10/sys/dev/bxe/57711_int_offsets.h
  stable/10/sys/dev/bxe/57712_init_values.c
  stable/10/sys/dev/bxe/57712_int_offsets.h
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe.h
  stable/10/sys/dev/bxe/bxe_dcb.h
  stable/10/sys/dev/bxe/bxe_debug.c
  stable/10/sys/dev/bxe/bxe_elink.c
  stable/10/sys/dev/bxe/bxe_elink.h
  stable/10/sys/dev/bxe/bxe_stats.c
  stable/10/sys/dev/bxe/bxe_stats.h
  stable/10/sys/dev/bxe/ecore_fw_defs.h
  stable/10/sys/dev/bxe/ecore_hsi.h
  stable/10/sys/dev/bxe/ecore_init.h
  stable/10/sys/dev/bxe/ecore_init_ops.h
  stable/10/sys/dev/bxe/ecore_mfw_req.h
  stable/10/sys/dev/bxe/ecore_reg.h
  stable/10/sys/dev/bxe/ecore_sp.c
  stable/10/sys/dev/bxe/ecore_sp.h
  stable/10/sys/modules/bxe/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/57710_init_values.c
==
--- stable/10/sys/dev/bxe/57710_init_values.c   Sat May 10 02:09:09 2014
(r265796)
+++ stable/10/sys/dev/bxe/57710_init_values.c   Sat May 10 02:10:32 2014
(r265797)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/10/sys/dev/bxe/57710_int_offsets.h
==
--- stable/10/sys/dev/bxe/57710_int_offsets.h   Sat May 10 02:09:09 2014
(r265796)
+++ stable/10/sys/dev/bxe/57710_int_offsets.h   Sat May 10 02:10:32 2014
(r265797)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. Neither the name of Broadcom Corporation nor the name of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written consent.
  *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Modified: stable/10/sys/dev/bxe/57711_init_values.c
==
--- stable/10/sys/dev/bxe/57711_init_values.c   Sat May 10 02:09:09 2014
(r265796)
+++ stable/10/sys/dev/bxe/57711_init_values.c   Sat May 10 02:10:32 2014
(r265797)
@@ -1,9 +1,5 @@
 /*-
- * Copyright (c) 2007-2013 Broadcom Corporation. All rights reserved.
- *
- * Eric Daviseda...@broadcom.com
- * David Christensen davi...@broadcom.com
- * Gary Zambrano zambr...@broadcom.com
+ * Copyright (c) 2007-2014 QLogic Corporation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,9 +10,6 @@
  * 2. 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.
- * 3. 

svn commit: r265917 - in stable/10: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce

2014-05-12 Thread David C Somayajulu
Author: davidcs
Date: Mon May 12 15:52:49 2014
New Revision: 265917
URL: http://svnweb.freebsd.org/changeset/base/265917

Log:
  MFC r265703
  Modify Copyright information and other strings to reflect
  Qlogic Corporation's purchase of Broadcom's NetXtreme business.
  Added clean option to Makefile
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/10/share/man/man4/bce.4
  stable/10/share/man/man4/bxe.4
  stable/10/sys/dev/bce/if_bce.c
  stable/10/sys/dev/bce/if_bcefw.h
  stable/10/sys/dev/bce/if_bcereg.h
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/modules/bce/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/man/man4/bce.4
==
--- stable/10/share/man/man4/bce.4  Mon May 12 14:46:32 2014
(r265916)
+++ stable/10/share/man/man4/bce.4  Mon May 12 15:52:49 2014
(r265917)
@@ -1,5 +1,4 @@
-.\ Copyright (c) 2006 Broadcom Corporation
-.\  David Christensen davi...@broadcom.com.  All rights reserved.
+.\ Copyright (c) 2006-2014 QLogic Corporation
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -10,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its 
contributors
-.\may be used to endorse or promote products derived from this software
-.\without specific prior written consent.
 .\
 .\ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
 .\ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -33,7 +29,7 @@
 .Os
 .Sh NAME
 .Nm bce
-.Nd Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
+.Nd QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -52,7 +48,7 @@ if_bce_load=YES
 .Sh DESCRIPTION
 The
 .Nm
-driver supports Broadcom's NetXtreme II product family, including the
+driver supports QLogic's NetXtreme II product family, including the
 BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers.
 .Pp
 The NetXtreme II product family is composed of various Converged NIC (or CNIC)
@@ -141,25 +137,25 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver provides support for various NICs based on the Broadcom NetXtreme II
+driver provides support for various NICs based on the QLogic NetXtreme II
 family of Gigabit Ethernet controllers, including the
 following:
 .Pp
 .Bl -bullet -compact
 .It
-Broadcom NetXtreme II BCM5706 1000Base-SX
+QLogic NetXtreme II BCM5706 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5706 1000Base-T
+QLogic NetXtreme II BCM5706 1000Base-T
 .It
-Broadcom NetXtreme II BCM5708 1000Base-SX
+QLogic NetXtreme II BCM5708 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5708 1000Base-T
+QLogic NetXtreme II BCM5708 1000Base-T
 .It
-Broadcom NetXtreme II BCM5709 1000Base-SX
+QLogic NetXtreme II BCM5709 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5709 1000Base-T
+QLogic NetXtreme II BCM5709 1000Base-T
 .It
-Broadcom NetXtreme II BCM5716 1000Base-T
+QLogic NetXtreme II BCM5716 1000Base-T
 .It
 Dell PowerEdge 1950 integrated BCM5708 NIC
 .It
@@ -411,9 +407,11 @@ A controller hardware failure has occurr
 If the problem continues replace the controller.
 .El
 .Sh SUPPORT
-For general information and support,
-go to the Broadcom NIC Open Source Developer Resource Site:
-.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php .
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq supp...@qlogic.com .
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,

Modified: stable/10/share/man/man4/bxe.4
==
--- stable/10/share/man/man4/bxe.4  Mon May 12 14:46:32 2014
(r265916)
+++ stable/10/share/man/man4/bxe.4  Mon May 12 15:52:49 2014
(r265917)
@@ -1,4 +1,4 @@
-.\ Copyright (c) 2013 Broadcom Corporation. All rights reserved.
+.\ Copyright (c) 2014 Qlogic Corporation. All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -9,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its 
contributors
-.\may be used to 

svn commit: r265918 - in stable/9: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce

2014-05-12 Thread David C Somayajulu
Author: davidcs
Date: Mon May 12 15:56:11 2014
New Revision: 265918
URL: http://svnweb.freebsd.org/changeset/base/265918

Log:
  MFC r265703
  Modify Copyright information and other strings to reflect
  Qlogic Corporation's purchase of Broadcom's NetXtreme business.
  Added clean option to Makefile
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/9/share/man/man4/bce.4
  stable/9/share/man/man4/bxe.4
  stable/9/sys/dev/bce/if_bce.c
  stable/9/sys/dev/bce/if_bcefw.h
  stable/9/sys/dev/bce/if_bcereg.h
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/modules/bce/Makefile
Directory Properties:
  stable/9/   (props changed)
  stable/9/share/   (props changed)
  stable/9/share/man/   (props changed)
  stable/9/share/man/man4/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/share/man/man4/bce.4
==
--- stable/9/share/man/man4/bce.4   Mon May 12 15:52:49 2014
(r265917)
+++ stable/9/share/man/man4/bce.4   Mon May 12 15:56:11 2014
(r265918)
@@ -1,5 +1,4 @@
-.\ Copyright (c) 2006 Broadcom Corporation
-.\  David Christensen davi...@broadcom.com.  All rights reserved.
+.\ Copyright (c) 2006-2014 QLogic Corporation
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -10,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its 
contributors
-.\may be used to endorse or promote products derived from this software
-.\without specific prior written consent.
 .\
 .\ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
 .\ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -33,7 +29,7 @@
 .Os
 .Sh NAME
 .Nm bce
-.Nd Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
+.Nd QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -52,7 +48,7 @@ if_bce_load=YES
 .Sh DESCRIPTION
 The
 .Nm
-driver supports Broadcom's NetXtreme II product family, including the
+driver supports QLogic's NetXtreme II product family, including the
 BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers.
 .Pp
 The NetXtreme II product family is composed of various Converged NIC (or CNIC)
@@ -141,25 +137,25 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver provides support for various NICs based on the Broadcom NetXtreme II
+driver provides support for various NICs based on the QLogic NetXtreme II
 family of Gigabit Ethernet controllers, including the
 following:
 .Pp
 .Bl -bullet -compact
 .It
-Broadcom NetXtreme II BCM5706 1000Base-SX
+QLogic NetXtreme II BCM5706 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5706 1000Base-T
+QLogic NetXtreme II BCM5706 1000Base-T
 .It
-Broadcom NetXtreme II BCM5708 1000Base-SX
+QLogic NetXtreme II BCM5708 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5708 1000Base-T
+QLogic NetXtreme II BCM5708 1000Base-T
 .It
-Broadcom NetXtreme II BCM5709 1000Base-SX
+QLogic NetXtreme II BCM5709 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5709 1000Base-T
+QLogic NetXtreme II BCM5709 1000Base-T
 .It
-Broadcom NetXtreme II BCM5716 1000Base-T
+QLogic NetXtreme II BCM5716 1000Base-T
 .It
 Dell PowerEdge 1950 integrated BCM5708 NIC
 .It
@@ -411,9 +407,11 @@ A controller hardware failure has occurr
 If the problem continues replace the controller.
 .El
 .Sh SUPPORT
-For general information and support,
-go to the Broadcom NIC Open Source Developer Resource Site:
-.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php .
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq supp...@qlogic.com .
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,

Modified: stable/9/share/man/man4/bxe.4
==
--- stable/9/share/man/man4/bxe.4   Mon May 12 15:52:49 2014
(r265917)
+++ stable/9/share/man/man4/bxe.4   Mon May 12 15:56:11 2014
(r265918)
@@ -1,4 +1,4 @@
-.\ Copyright (c) 2013 Broadcom Corporation. All rights reserved.
+.\ Copyright (c) 2014 Qlogic Corporation. All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -9,9 +9,6 @@
 .\ 2. Redistributions in binary form must reproduce the above copyright
 .\notice, this list of 

svn commit: r265919 - in stable/8: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce

2014-05-12 Thread David C Somayajulu
Author: davidcs
Date: Mon May 12 15:59:09 2014
New Revision: 265919
URL: http://svnweb.freebsd.org/changeset/base/265919

Log:
  MFC r265703
  Modify Copyright information and other strings to reflect
  Qlogic Corporation's purchase of Broadcom's NetXtreme business.
  Added clean option to Makefile
  
  Submitted by:David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/8/share/man/man4/bce.4
  stable/8/share/man/man4/bxe.4
  stable/8/sys/dev/bce/if_bce.c
  stable/8/sys/dev/bce/if_bcefw.h
  stable/8/sys/dev/bce/if_bcereg.h
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/modules/bce/Makefile
Directory Properties:
  stable/8/   (props changed)
  stable/8/share/   (props changed)
  stable/8/share/man/   (props changed)
  stable/8/share/man/man4/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/bce/   (props changed)
  stable/8/sys/modules/   (props changed)

Modified: stable/8/share/man/man4/bce.4
==
--- stable/8/share/man/man4/bce.4   Mon May 12 15:56:11 2014
(r265918)
+++ stable/8/share/man/man4/bce.4   Mon May 12 15:59:09 2014
(r265919)
@@ -1,5 +1,4 @@
-.\ Copyright (c) 2006 Broadcom Corporation
-.\  David Christensen davi...@broadcom.com.  All rights reserved.
+.\ Copyright (c) 2006-2014 QLogic Corporation
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -10,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its 
contributors
-.\may be used to endorse or promote products derived from this software
-.\without specific prior written consent.
 .\
 .\ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
 .\ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -33,7 +29,7 @@
 .Os
 .Sh NAME
 .Nm bce
-.Nd Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
+.Nd QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -52,7 +48,7 @@ if_bce_load=YES
 .Sh DESCRIPTION
 The
 .Nm
-driver supports Broadcom's NetXtreme II product family, including the
+driver supports QLogic's NetXtreme II product family, including the
 BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers.
 .Pp
 The NetXtreme II product family is composed of various Converged NIC (or CNIC)
@@ -141,25 +137,25 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver provides support for various NICs based on the Broadcom NetXtreme II
+driver provides support for various NICs based on the QLogic NetXtreme II
 family of Gigabit Ethernet controllers, including the
 following:
 .Pp
 .Bl -bullet -compact
 .It
-Broadcom NetXtreme II BCM5706 1000Base-SX
+QLogic NetXtreme II BCM5706 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5706 1000Base-T
+QLogic NetXtreme II BCM5706 1000Base-T
 .It
-Broadcom NetXtreme II BCM5708 1000Base-SX
+QLogic NetXtreme II BCM5708 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5708 1000Base-T
+QLogic NetXtreme II BCM5708 1000Base-T
 .It
-Broadcom NetXtreme II BCM5709 1000Base-SX
+QLogic NetXtreme II BCM5709 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5709 1000Base-T
+QLogic NetXtreme II BCM5709 1000Base-T
 .It
-Broadcom NetXtreme II BCM5716 1000Base-T
+QLogic NetXtreme II BCM5716 1000Base-T
 .It
 Dell PowerEdge 1950 integrated BCM5708 NIC
 .It
@@ -411,9 +407,11 @@ A controller hardware failure has occurr
 If the problem continues replace the controller.
 .El
 .Sh SUPPORT
-For general information and support,
-go to the Broadcom NIC Open Source Developer Resource Site:
-.Pa http://www.broadcom.com/support/ethernet_nic/open_source.php .
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq supp...@qlogic.com .
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,

Modified: stable/8/share/man/man4/bxe.4
==
--- stable/8/share/man/man4/bxe.4   Mon May 12 15:56:11 2014
(r265918)
+++ stable/8/share/man/man4/bxe.4   Mon May 12 15:59:09 2014
(r265919)
@@ -1,4 +1,4 @@
-.\ Copyright (c) 2013 Broadcom Corporation. All rights reserved.
+.\ Copyright (c) 2014 Qlogic Corporation. All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -9,9 +9,6 @@
 .\ 2. Redistributions in binary form must reproduce the 

svn commit: r265920 - in stable/7: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce

2014-05-12 Thread David C Somayajulu
Author: davidcs
Date: Mon May 12 16:10:14 2014
New Revision: 265920
URL: http://svnweb.freebsd.org/changeset/base/265920

Log:
  MFC r265703
  Modify Copyright information and other strings to reflect
  Qlogic Corporation's purchase of Broadcom's NetXtreme business.
  Added clean option to Makefile
  
  Submitted by: David C Somayajulu (davi...@freebsd.org) QLogic Corporation

Modified:
  stable/7/share/man/man4/bce.4
  stable/7/share/man/man4/bxe.4
  stable/7/sys/dev/bce/if_bce.c
  stable/7/sys/dev/bce/if_bcefw.h
  stable/7/sys/dev/bce/if_bcereg.h
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/modules/bce/Makefile
Directory Properties:
  stable/7/   (props changed)
  stable/7/share/   (props changed)
  stable/7/share/man/   (props changed)
  stable/7/share/man/man4/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/share/man/man4/bce.4
==
--- stable/7/share/man/man4/bce.4   Mon May 12 15:59:09 2014
(r265919)
+++ stable/7/share/man/man4/bce.4   Mon May 12 16:10:14 2014
(r265920)
@@ -1,5 +1,4 @@
-.\ Copyright (c) 2006 Broadcom Corporation
-.\  David Christensen davi...@broadcom.com.  All rights reserved.
+.\ Copyright (c) 2006-2014 QLogic Corporation
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -10,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its 
contributors
-.\may be used to endorse or promote products derived from this software
-.\without specific prior written consent.
 .\
 .\ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS'
 .\ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -33,7 +29,7 @@
 .Os
 .Sh NAME
 .Nm bce
-.Nd Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
+.Nd QLogic NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet 
adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -52,7 +48,7 @@ if_bce_load=YES
 .Sh DESCRIPTION
 The
 .Nm
-driver supports Broadcom's NetXtreme II product family, including the
+driver supports QLogic's NetXtreme II product family, including the
 BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers.
 .Pp
 The NetXtreme II product family is composed of various Converged NIC (or CNIC)
@@ -141,25 +137,25 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver provides support for various NICs based on the Broadcom NetXtreme II
+driver provides support for various NICs based on the QLogic NetXtreme II
 family of Gigabit Ethernet controllers, including the
 following:
 .Pp
 .Bl -bullet -compact
 .It
-Broadcom NetXtreme II BCM5706 1000Base-SX
+QLogic NetXtreme II BCM5706 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5706 1000Base-T
+QLogic NetXtreme II BCM5706 1000Base-T
 .It
-Broadcom NetXtreme II BCM5708 1000Base-SX
+QLogic NetXtreme II BCM5708 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5708 1000Base-T
+QLogic NetXtreme II BCM5708 1000Base-T
 .It
-Broadcom NetXtreme II BCM5709 1000Base-SX
+QLogic NetXtreme II BCM5709 1000Base-SX
 .It
-Broadcom NetXtreme II BCM5709 1000Base-T
+QLogic NetXtreme II BCM5709 1000Base-T
 .It
-Broadcom NetXtreme II BCM5716 1000Base-T
+QLogic NetXtreme II BCM5716 1000Base-T
 .It
 Dell PowerEdge 1950 integrated BCM5708 NIC
 .It
@@ -346,6 +342,12 @@ with the cable connection, or a driver l
 A controller hardware failure has occurred.
 If the problem continues replace the controller.
 .El
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq supp...@qlogic.com .
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,

Modified: stable/7/share/man/man4/bxe.4
==
--- stable/7/share/man/man4/bxe.4   Mon May 12 15:59:09 2014
(r265919)
+++ stable/7/share/man/man4/bxe.4   Mon May 12 16:10:14 2014
(r265920)
@@ -1,4 +1,4 @@
-.\ Copyright (c) 2013 Broadcom Corporation. All rights reserved.
+.\ Copyright (c) 2014 Qlogic Corporation. All rights reserved.
 .\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
@@ -9,9 +9,6 @@
 .\ 2. 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.
-.\ 3. Neither the name of Broadcom Corporation nor the name of its

svn commit: r261861 - head/sys/dev/qlxgb

2014-02-13 Thread David C Somayajulu
Author: davidcs
Date: Fri Feb 14 01:02:06 2014
New Revision: 261861
URL: http://svnweb.freebsd.org/changeset/base/261861

Log:
  check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
  qla_hw_send is moot.

Modified:
  head/sys/dev/qlxgb/qla_hw.c
  head/sys/dev/qlxgb/qla_os.c

Modified: head/sys/dev/qlxgb/qla_hw.c
==
--- head/sys/dev/qlxgb/qla_hw.c Fri Feb 14 00:26:30 2014(r261860)
+++ head/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:02:06 2014(r261861)
@@ -998,7 +998,6 @@ qla_hw_send(qla_host_t *ha, bus_dma_segm
if (hdr_len == 0) {
if ((nsegs  Q8_TX_MAX_SEGMENTS) ||
(mp-m_pkthdr.len  ha-max_frame_size)){
-   /* TBD: copy into private buffer and send it */
device_printf(dev,
%s: (nsegs[%d, %d, 0x%b]  
Q8_TX_MAX_SEGMENTS)\n,
__func__, nsegs, mp-m_pkthdr.len,

Modified: head/sys/dev/qlxgb/qla_os.c
==
--- head/sys/dev/qlxgb/qla_os.c Fri Feb 14 00:26:30 2014(r261860)
+++ head/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:02:06 2014(r261861)
@@ -1063,10 +1063,7 @@ qla_send(qla_host_t *ha, struct mbuf **m
ret = bus_dmamap_load_mbuf_sg(ha-tx_tag, map, m_head, segs, nsegs,
BUS_DMA_NOWAIT);
 
-   if ((ret == EFBIG) ||
-   ((nsegs  Q8_TX_MAX_SEGMENTS) 
-(((m_head-m_pkthdr.csum_flags  CSUM_TSO) == 0) ||
-   (m_head-m_pkthdr.len = ha-max_frame_size {
+   if (ret == EFBIG) {
 
struct mbuf *m;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261862 - stable/9/sys/dev/qlxgb

2014-02-13 Thread David C Somayajulu
Author: davidcs
Date: Fri Feb 14 01:46:33 2014
New Revision: 261862
URL: http://svnweb.freebsd.org/changeset/base/261862

Log:
  MFC r261861
check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment 
in
qla_hw_send is moot.

Modified:
  stable/9/sys/dev/qlxgb/qla_hw.c
  stable/9/sys/dev/qlxgb/qla_os.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/qlxgb/qla_hw.c
==
--- stable/9/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:02:06 2014
(r261861)
+++ stable/9/sys/dev/qlxgb/qla_hw.c Fri Feb 14 01:46:33 2014
(r261862)
@@ -941,7 +941,6 @@ qla_hw_send(qla_host_t *ha, bus_dma_segm
if (hdr_len == 0) {
if ((nsegs  Q8_TX_MAX_SEGMENTS) ||
(mp-m_pkthdr.len  ha-max_frame_size)){
-   /* TBD: copy into private buffer and send it */
device_printf(dev,
%s: (nsegs[%d, %d, 0x%x]  
Q8_TX_MAX_SEGMENTS)\n,
__func__, nsegs, mp-m_pkthdr.len,

Modified: stable/9/sys/dev/qlxgb/qla_os.c
==
--- stable/9/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:02:06 2014
(r261861)
+++ stable/9/sys/dev/qlxgb/qla_os.c Fri Feb 14 01:46:33 2014
(r261862)
@@ -1054,10 +1054,7 @@ qla_send(qla_host_t *ha, struct mbuf **m
ret = bus_dmamap_load_mbuf_sg(ha-tx_tag, map, m_head, segs, nsegs,
BUS_DMA_NOWAIT);
 
-   if ((ret == EFBIG) ||
-   ((nsegs  Q8_TX_MAX_SEGMENTS) 
-(((m_head-m_pkthdr.csum_flags  CSUM_TSO) == 0) ||
-   (m_head-m_pkthdr.len = ha-max_frame_size {
+   if (ret == EFBIG) {
 
struct mbuf *m;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r261864 - stable/10/sys/dev/qlxgb

2014-02-13 Thread David C Somayajulu
Author: davidcs
Date: Fri Feb 14 02:48:14 2014
New Revision: 261864
URL: http://svnweb.freebsd.org/changeset/base/261864

Log:
  MFC 261861
  check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
  qla_hw_send is moot.

Modified:
  stable/10/sys/dev/qlxgb/qla_hw.c
  stable/10/sys/dev/qlxgb/qla_os.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/qlxgb/qla_hw.c
==
--- stable/10/sys/dev/qlxgb/qla_hw.cFri Feb 14 01:47:12 2014
(r261863)
+++ stable/10/sys/dev/qlxgb/qla_hw.cFri Feb 14 02:48:14 2014
(r261864)
@@ -998,7 +998,6 @@ qla_hw_send(qla_host_t *ha, bus_dma_segm
if (hdr_len == 0) {
if ((nsegs  Q8_TX_MAX_SEGMENTS) ||
(mp-m_pkthdr.len  ha-max_frame_size)){
-   /* TBD: copy into private buffer and send it */
device_printf(dev,
%s: (nsegs[%d, %d, 0x%b]  
Q8_TX_MAX_SEGMENTS)\n,
__func__, nsegs, mp-m_pkthdr.len,

Modified: stable/10/sys/dev/qlxgb/qla_os.c
==
--- stable/10/sys/dev/qlxgb/qla_os.cFri Feb 14 01:47:12 2014
(r261863)
+++ stable/10/sys/dev/qlxgb/qla_os.cFri Feb 14 02:48:14 2014
(r261864)
@@ -1063,10 +1063,7 @@ qla_send(qla_host_t *ha, struct mbuf **m
ret = bus_dmamap_load_mbuf_sg(ha-tx_tag, map, m_head, segs, nsegs,
BUS_DMA_NOWAIT);
 
-   if ((ret == EFBIG) ||
-   ((nsegs  Q8_TX_MAX_SEGMENTS) 
-(((m_head-m_pkthdr.csum_flags  CSUM_TSO) == 0) ||
-   (m_head-m_pkthdr.len = ha-max_frame_size {
+   if (ret == EFBIG) {
 
struct mbuf *m;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258155 - head/sys/dev/qlxgbe

2013-11-14 Thread David C Somayajulu
Author: davidcs
Date: Fri Nov 15 01:26:24 2013
New Revision: 258155
URL: http://svnweb.freebsd.org/changeset/base/258155

Log:
  ql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
  ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP
  
  Submitted by:David C Somayajulu

Modified:
  head/sys/dev/qlxgbe/ql_hw.c
  head/sys/dev/qlxgbe/ql_hw.h
  head/sys/dev/qlxgbe/ql_ioctl.c

Modified: head/sys/dev/qlxgbe/ql_hw.c
==
--- head/sys/dev/qlxgbe/ql_hw.c Thu Nov 14 23:28:28 2013(r258154)
+++ head/sys/dev/qlxgbe/ql_hw.c Fri Nov 15 01:26:24 2013(r258155)
@@ -212,6 +212,12 @@ ql_hw_add_sysctls(qla_host_t *ha)
Number of Rcv Rings Entries to post before updating
 RDS Ring Producer Index);
 
+   ha-hw.min_lro_pkt_size = 512;
+   SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+   SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+   OID_AUTO, min_lro_pkt_size, CTLFLAG_RD, 
ha-hw.min_lro_pkt_size,
+   ha-hw.min_lro_pkt_size, minimum packet size to trigger lro);
+
ha-hw.mdump_active = 0;
 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
@@ -1069,6 +1075,11 @@ qla_config_fw_lro(qla_host_t *ha, uint16
 
fw_lro-cntxt_id = cntxt_id;
 
+   if (ha-hw.min_lro_pkt_size) {
+   fw_lro-flags |= Q8_MBX_FW_LRO_LOW_THRESHOLD;
+   fw_lro-low_threshold = ha-hw.min_lro_pkt_size;
+   }
+
if (qla_mbx_cmd(ha, (uint32_t *)fw_lro,
(sizeof (q80_config_fw_lro_t)  2),
ha-hw.mbox, (sizeof (q80_config_fw_lro_rsp_t)  2), 0)) {

Modified: head/sys/dev/qlxgbe/ql_hw.h
==
--- head/sys/dev/qlxgbe/ql_hw.h Thu Nov 14 23:28:28 2013(r258154)
+++ head/sys/dev/qlxgbe/ql_hw.h Fri Nov 15 01:26:24 2013(r258155)
@@ -568,9 +568,13 @@ typedef struct _q80_config_fw_lro {
 #define Q8_MBX_FW_LRO_IPV6 0x2
 #define Q8_MBX_FW_LRO_IPV4_WO_DST_IP_CHK   0x4
 #define Q8_MBX_FW_LRO_IPV6_WO_DST_IP_CHK   0x8
+#define Q8_MBX_FW_LRO_LOW_THRESHOLD0x10
 
uint8_t rsrvd;
uint16_tcntxt_id;
+
+   uint16_tlow_threshold;
+   uint16_trsrvd0;
 } __packed q80_config_fw_lro_t;
 
 typedef struct _q80_config_fw_lro_rsp {
@@ -1521,6 +1525,7 @@ typedef struct _qla_hw {
uint32_thealth_count;
 
uint32_tmax_tx_segs;
+   uint32_tmin_lro_pkt_size;

/* Flash Descriptor Table */
qla_flash_desc_table_t fdt;

Modified: head/sys/dev/qlxgbe/ql_ioctl.c
==
--- head/sys/dev/qlxgbe/ql_ioctl.c  Thu Nov 14 23:28:28 2013
(r258154)
+++ head/sys/dev/qlxgbe/ql_ioctl.c  Fri Nov 15 01:26:24 2013
(r258155)
@@ -223,6 +223,13 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
}

fw_dump = (qla_rd_fw_dump_t *)data;
+
+   if ((fw_dump-md_template == NULL) ||
+   (fw_dump-template_size != 
ha-hw.dma_buf.minidump.size)) {
+   rval = EINVAL;
+   break;
+   }
+
if ((rval = copyout(ha-hw.dma_buf.minidump.dma_b,
fw_dump-md_template, fw_dump-template_size)))
rval = ENXIO;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258156 - head/sys/dev/qlxge

2013-11-14 Thread David C Somayajulu
Author: davidcs
Date: Fri Nov 15 01:44:58 2013
New Revision: 258156
URL: http://svnweb.freebsd.org/changeset/base/258156

Log:
  Validate the buffer and its length passed to QLA_MPI_DUMP.
  copyout dump only if qls_mpi_core_dump() is successful.
  (like to credit x90c for pointing the issue)
  Submitted by:David C Somayajulu

Modified:
  head/sys/dev/qlxge/qls_ioctl.c

Modified: head/sys/dev/qlxge/qls_ioctl.c
==
--- head/sys/dev/qlxge/qls_ioctl.c  Fri Nov 15 01:26:24 2013
(r258155)
+++ head/sys/dev/qlxge/qls_ioctl.c  Fri Nov 15 01:44:58 2013
(r258156)
@@ -100,13 +100,16 @@ qls_eioctl(struct cdev *dev, u_long cmd,
if (mpi_dump-size == 0) {
mpi_dump-size = sizeof (qls_mpi_coredump_t);
} else {
-   if (mpi_dump-size  sizeof (qls_mpi_coredump_t))
+   if ((mpi_dump-size != sizeof (qls_mpi_coredump_t)) ||
+   (mpi_dump-dbuf == NULL))
rval = EINVAL;
else {
-   qls_mpi_core_dump(ha);
-   rval = copyout( ql_mpi_coredump,
-   mpi_dump-dbuf,
-   mpi_dump-size);
+   if (qls_mpi_core_dump(ha) == 0) {
+   rval = copyout(ql_mpi_coredump,
+   mpi_dump-dbuf,
+   mpi_dump-size);
+   } else 
+   rval = ENXIO;
 
if (rval) {
device_printf(ha-pci_dev,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r258457 - in stable/10/sys/dev: qlxgbe qlxge

2013-11-21 Thread David C Somayajulu
Author: davidcs
Date: Fri Nov 22 00:26:21 2013
New Revision: 258457
URL: http://svnweb.freebsd.org/changeset/base/258457

Log:
  MFC r258155
  ql_hw.[c,h]: set minimum thresholds on pkt size for lro path.
  ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP
  MFC r258156
  qls_ioctl.c: Validate the buffer and its length passed to QLA_MPI_DUMP.
   copyout dump only if qls_mpi_core_dump() is successful.
  (like to credit x90c for pointing the issue)
  
  Approved by: re (delphij)

Modified:
  stable/10/sys/dev/qlxgbe/ql_hw.c
  stable/10/sys/dev/qlxgbe/ql_hw.h
  stable/10/sys/dev/qlxgbe/ql_ioctl.c
  stable/10/sys/dev/qlxge/qls_ioctl.c
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/dev/qlxgbe/ql_hw.c
==
--- stable/10/sys/dev/qlxgbe/ql_hw.cFri Nov 22 00:06:11 2013
(r258456)
+++ stable/10/sys/dev/qlxgbe/ql_hw.cFri Nov 22 00:26:21 2013
(r258457)
@@ -212,6 +212,12 @@ ql_hw_add_sysctls(qla_host_t *ha)
Number of Rcv Rings Entries to post before updating
 RDS Ring Producer Index);
 
+   ha-hw.min_lro_pkt_size = 512;
+   SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+   SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+   OID_AUTO, min_lro_pkt_size, CTLFLAG_RD, 
ha-hw.min_lro_pkt_size,
+   ha-hw.min_lro_pkt_size, minimum packet size to trigger lro);
+
ha-hw.mdump_active = 0;
 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
@@ -1069,6 +1075,11 @@ qla_config_fw_lro(qla_host_t *ha, uint16
 
fw_lro-cntxt_id = cntxt_id;
 
+   if (ha-hw.min_lro_pkt_size) {
+   fw_lro-flags |= Q8_MBX_FW_LRO_LOW_THRESHOLD;
+   fw_lro-low_threshold = ha-hw.min_lro_pkt_size;
+   }
+
if (qla_mbx_cmd(ha, (uint32_t *)fw_lro,
(sizeof (q80_config_fw_lro_t)  2),
ha-hw.mbox, (sizeof (q80_config_fw_lro_rsp_t)  2), 0)) {

Modified: stable/10/sys/dev/qlxgbe/ql_hw.h
==
--- stable/10/sys/dev/qlxgbe/ql_hw.hFri Nov 22 00:06:11 2013
(r258456)
+++ stable/10/sys/dev/qlxgbe/ql_hw.hFri Nov 22 00:26:21 2013
(r258457)
@@ -568,9 +568,13 @@ typedef struct _q80_config_fw_lro {
 #define Q8_MBX_FW_LRO_IPV6 0x2
 #define Q8_MBX_FW_LRO_IPV4_WO_DST_IP_CHK   0x4
 #define Q8_MBX_FW_LRO_IPV6_WO_DST_IP_CHK   0x8
+#define Q8_MBX_FW_LRO_LOW_THRESHOLD0x10
 
uint8_t rsrvd;
uint16_tcntxt_id;
+
+   uint16_tlow_threshold;
+   uint16_trsrvd0;
 } __packed q80_config_fw_lro_t;
 
 typedef struct _q80_config_fw_lro_rsp {
@@ -1521,6 +1525,7 @@ typedef struct _qla_hw {
uint32_thealth_count;
 
uint32_tmax_tx_segs;
+   uint32_tmin_lro_pkt_size;

/* Flash Descriptor Table */
qla_flash_desc_table_t fdt;

Modified: stable/10/sys/dev/qlxgbe/ql_ioctl.c
==
--- stable/10/sys/dev/qlxgbe/ql_ioctl.c Fri Nov 22 00:06:11 2013
(r258456)
+++ stable/10/sys/dev/qlxgbe/ql_ioctl.c Fri Nov 22 00:26:21 2013
(r258457)
@@ -223,6 +223,13 @@ ql_eioctl(struct cdev *dev, u_long cmd, 
}

fw_dump = (qla_rd_fw_dump_t *)data;
+
+   if ((fw_dump-md_template == NULL) ||
+   (fw_dump-template_size != 
ha-hw.dma_buf.minidump.size)) {
+   rval = EINVAL;
+   break;
+   }
+
if ((rval = copyout(ha-hw.dma_buf.minidump.dma_b,
fw_dump-md_template, fw_dump-template_size)))
rval = ENXIO;

Modified: stable/10/sys/dev/qlxge/qls_ioctl.c
==
--- stable/10/sys/dev/qlxge/qls_ioctl.c Fri Nov 22 00:06:11 2013
(r258456)
+++ stable/10/sys/dev/qlxge/qls_ioctl.c Fri Nov 22 00:26:21 2013
(r258457)
@@ -100,13 +100,16 @@ qls_eioctl(struct cdev *dev, u_long cmd,
if (mpi_dump-size == 0) {
mpi_dump-size = sizeof (qls_mpi_coredump_t);
} else {
-   if (mpi_dump-size  sizeof (qls_mpi_coredump_t))
+   if ((mpi_dump-size != sizeof (qls_mpi_coredump_t)) ||
+   (mpi_dump-dbuf == NULL))
rval = EINVAL;
else {
-   qls_mpi_core_dump(ha);
-   rval = copyout( ql_mpi_coredump,
-   mpi_dump-dbuf,
-   mpi_dump-size);
+  

svn commit: r258898 - in stable/9: share/man/man4 sys/conf sys/dev/qlxgbe sys/modules sys/modules/qlxgbe

2013-12-03 Thread David C Somayajulu
Author: davidcs
Date: Tue Dec  3 22:31:08 2013
New Revision: 258898
URL: http://svnweb.freebsd.org/changeset/base/258898

Log:
  MFC 250661,251076,251605,252580,254976,255003,258155
  port dev/qlxgbe from HEAD

Added:
  stable/9/share/man/man4/qlxgbe.4
 - copied unchanged from r250661, head/share/man/man4/qlxgbe.4
  stable/9/sys/dev/qlxgbe/
 - copied from r250661, head/sys/dev/qlxgbe/
  stable/9/sys/modules/qlxgbe/
 - copied from r250661, head/sys/modules/qlxgbe/
Modified:
  stable/9/share/man/man4/Makefile
  stable/9/sys/conf/files.amd64
  stable/9/sys/dev/qlxgbe/ql_hw.c
  stable/9/sys/dev/qlxgbe/ql_hw.h
  stable/9/sys/dev/qlxgbe/ql_ioctl.c
  stable/9/sys/dev/qlxgbe/ql_isr.c
  stable/9/sys/dev/qlxgbe/ql_misc.c
  stable/9/sys/dev/qlxgbe/ql_os.c
  stable/9/sys/modules/Makefile
Directory Properties:
  stable/9/share/   (props changed)
  stable/9/share/man/   (props changed)
  stable/9/share/man/man4/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/share/man/man4/Makefile
==
--- stable/9/share/man/man4/MakefileTue Dec  3 22:26:38 2013
(r258897)
+++ stable/9/share/man/man4/MakefileTue Dec  3 22:31:08 2013
(r258898)
@@ -362,6 +362,7 @@ MAN=aac.4 \
pty.4 \
puc.4 \
${_qlxgb.4} \
+   ${_qlxgbe.4} \
ral.4 \
random.4 \
rc.4 \
@@ -771,9 +772,11 @@ MLINKS+=lindev.4 full.4
 
 .if ${MACHINE_CPUARCH} == amd64
 _qlxgb.4=  qlxgb.4
+_qlxgbe.4= qlxgbe.4
 _sfxge.4=  sfxge.4
 
 MLINKS+=qlxgb.4 if_qlxgb.4
+MLINKS+=qlxgbe.4 if_qlxgbe.4
 MLINKS+=sfxge.4 if_sfxge.4
 .endif
 

Copied: stable/9/share/man/man4/qlxgbe.4 (from r250661, 
head/share/man/man4/qlxgbe.4)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/share/man/man4/qlxgbe.4Tue Dec  3 22:31:08 2013
(r258898, copy of r250661, head/share/man/man4/qlxgbe.4)
@@ -0,0 +1,91 @@
+.\-
+.\ Copyright (c) 2013 Qlogic Corportaion 
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. 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.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd April 1, 2013
+.Dt QLXGBE 4
+.Os
+.Sh NAME
+.Nm qlxgbe
+.Nd QLogic 10 Gigabit Ethernet  CNA Adapter Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device qlxgbe
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_qlxgbe_load=YES
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports IPv4 checksum offload,
+TCP and UDP checksum offload for both IPv4 and IPv6,
+Large Segment Offload for both IPv4 and IPv6,
+Jumbo frames, VLAN Tag, and
+Receive Side scaling.
+For further hardware information, see
+.Pa http://www.qlogic.com/ .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet  CNA Adapter based on the following
+chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic 8300 series
+.El
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq supp...@qlogic.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An David C Somayajulu
+at QLogic Corporation.

Modified: stable/9/sys/conf/files.amd64

svn commit: r258936 - in stable/9: share/man/man4 sys/conf sys/dev/qlxge sys/modules sys/modules/qlxge

2013-12-04 Thread David C Somayajulu
Author: davidcs
Date: Wed Dec  4 20:05:20 2013
New Revision: 258936
URL: http://svnweb.freebsd.org/changeset/base/258936

Log:
  MFC: 252206,258156
  port dev/qlxge from head

Added:
  stable/9/share/man/man4/qlxge.4
 - copied unchanged from r252206, head/share/man/man4/qlxge.4
  stable/9/sys/dev/qlxge/
 - copied from r252206, head/sys/dev/qlxge/
  stable/9/sys/modules/qlxge/
 - copied from r252206, head/sys/modules/qlxge/
Modified:
  stable/9/share/man/man4/Makefile
  stable/9/sys/conf/files.amd64
  stable/9/sys/dev/qlxge/qls_ioctl.c
  stable/9/sys/modules/Makefile
Directory Properties:
  stable/9/share/   (props changed)
  stable/9/share/man/   (props changed)
  stable/9/share/man/man4/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/share/man/man4/Makefile
==
--- stable/9/share/man/man4/MakefileWed Dec  4 20:04:34 2013
(r258935)
+++ stable/9/share/man/man4/MakefileWed Dec  4 20:05:20 2013
(r258936)
@@ -361,6 +361,7 @@ MAN=aac.4 \
pts.4 \
pty.4 \
puc.4 \
+   ${_qlxge.4} \
${_qlxgb.4} \
${_qlxgbe.4} \
ral.4 \
@@ -771,10 +772,12 @@ MLINKS+=lindev.4 full.4
 .endif
 
 .if ${MACHINE_CPUARCH} == amd64
+_qlxge.4=  qlxge.4
 _qlxgb.4=  qlxgb.4
 _qlxgbe.4= qlxgbe.4
 _sfxge.4=  sfxge.4
 
+MLINKS+=qlxge.4 if_qlxge.4
 MLINKS+=qlxgb.4 if_qlxgb.4
 MLINKS+=qlxgbe.4 if_qlxgbe.4
 MLINKS+=sfxge.4 if_sfxge.4

Copied: stable/9/share/man/man4/qlxge.4 (from r252206, 
head/share/man/man4/qlxge.4)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/share/man/man4/qlxge.4 Wed Dec  4 20:05:20 2013
(r258936, copy of r252206, head/share/man/man4/qlxge.4)
@@ -0,0 +1,91 @@
+.\-
+.\ Copyright (c) 2013-2014 Qlogic Corporation 
+.\ All rights reserved.
+.\
+.\ Redistribution and use in source and binary forms, with or without
+.\ modification, are permitted provided that the following conditions
+.\ are met:
+.\ 1. Redistributions of source code must retain the above copyright
+.\notice, this list of conditions and the following disclaimer.
+.\ 2. 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.
+.\
+.\ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\ SUCH DAMAGE.
+.\
+.\ $FreeBSD$
+.\
+.Dd June 21, 2013
+.Dt QLXGE 4
+.Os
+.Sh NAME
+.Nm qlxge
+.Nd QLogic 8100 Series 10 Gigabit Ethernet Adapter Driver
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd device qlxge
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_qlxge_load=YES
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports IPv4 checksum offload,
+TCP and UDP checksum offload for both IPv4 and IPv6,
+Large Segment Offload for both IPv4 and IPv6,
+Jumbo frames, VLAN Tag, and
+Receive Side scaling.
+For further hardware information, see
+.Pa http://www.qlogic.com/ .
+.Sh HARDWARE
+The
+.Nm
+driver supports 10 Gigabit Ethernet  CNA Adapter based on the following
+chipsets:
+.Pp
+.Bl -bullet -compact
+.It
+QLogic 8100 series
+.El
+.Sh SUPPORT
+For support questions please contact your QLogic approved reseller or
+QLogic Technical Support at
+.Pa http://support.qlogic.com ,
+or by E-mail at
+.Aq supp...@qlogic.com .
+.Sh SEE ALSO
+.Xr altq 4 ,
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ng_ether 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An David C Somayajulu
+at QLogic Corporation.

Modified: stable/9/sys/conf/files.amd64
==
--- stable/9/sys/conf/files.amd64   Wed Dec  4 20:04:34 2013
(r258935)
+++ stable/9

svn commit: r254976 - head/sys/dev/qlxgbe

2013-08-27 Thread David C Somayajulu
Author: davidcs
Date: Tue Aug 27 21:29:21 2013
New Revision: 254976
URL: http://svnweb.freebsd.org/changeset/base/254976

Log:
  Fix bug in Flash access code
  
  Submitted by: David C Somayajulu

Modified:
  head/sys/dev/qlxgbe/ql_misc.c

Modified: head/sys/dev/qlxgbe/ql_misc.c
==
--- head/sys/dev/qlxgbe/ql_misc.c   Tue Aug 27 21:28:12 2013
(r254975)
+++ head/sys/dev/qlxgbe/ql_misc.c   Tue Aug 27 21:29:21 2013
(r254976)
@@ -321,7 +321,7 @@ qla_get_fdt(qla_host_t *ha)
 
} while ((count  1)  (data32 != 0x6));
 
-   if (count == 0  data32 != 0x6) {
+   if (data32 != 0x6) {
qla_sem_unlock(ha, Q8_FLASH_UNLOCK);
device_printf(ha-pci_dev,
%s: Poll Q8_FLASH_STATUS failed\n,
@@ -401,7 +401,7 @@ qla_flash_write_enable(qla_host_t *ha, i
 
} while ((count  1)  (data32 != 0x6));

-   if (count == 0  data32 != 0x6) {
+   if (data32 != 0x6) {
device_printf(ha-pci_dev,
%s: Poll Q8_FLASH_STATUS failed\n,
__func__);
@@ -432,7 +432,7 @@ qla_erase_flash_sector(qla_host_t *ha, u
 
} while (((count++)  1000)  (data32 != 0x6));
 
-   if (count == 0  data32 != 0x6) {
+   if (data32 != 0x6) {
device_printf(ha-pci_dev,
%s: Poll Q8_FLASH_STATUS failed\n,
__func__);
@@ -479,7 +479,7 @@ qla_erase_flash_sector(qla_host_t *ha, u
 
} while (((count++)  1000)  (data32 != 0x6));
 
-   if (count == 0  data32 != 0x6) {
+   if (data32 != 0x6) {
device_printf(ha-pci_dev,
%s: Poll Q8_FLASH_STATUS failed\n,
__func__);
@@ -575,7 +575,7 @@ qla_wr_flash32(qla_host_t *ha, uint32_t 
 
} while ((count  1)  (data32 != 0x6)); 
 
-   if (count == 0  data32 != 0x6) {
+   if (data32 != 0x6) {
device_printf(ha-pci_dev,
%s: Poll Q8_FLASH_STATUS failed\n,
__func__);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r255003 - head/sys/dev/qlxgbe

2013-08-28 Thread David C Somayajulu
Author: davidcs
Date: Wed Aug 28 20:07:00 2013
New Revision: 255003
URL: http://svnweb.freebsd.org/changeset/base/255003

Log:
  ql_minidump() should be performed only by port 0.
  
  Submitted by: David C Somayajulu

Modified:
  head/sys/dev/qlxgbe/ql_os.c

Modified: head/sys/dev/qlxgbe/ql_os.c
==
--- head/sys/dev/qlxgbe/ql_os.c Wed Aug 28 20:00:25 2013(r255002)
+++ head/sys/dev/qlxgbe/ql_os.c Wed Aug 28 20:07:00 2013(r255003)
@@ -1642,8 +1642,6 @@ qla_error_recovery(void *context, int pe
 
 QLA_UNLOCK(ha, __func__);
 
-   ql_minidump(ha);
-   
if ((ha-pci_func  0x1) == 0) {
 
if (!ha-msg_from_peer) {
@@ -1656,6 +1654,8 @@ qla_error_recovery(void *context, int pe
 
ha-msg_from_peer = 0;
 
+   ql_minidump(ha);
+
(void) ql_init_hw(ha);
qla_free_xmt_bufs(ha);
qla_free_rcv_bufs(ha);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271476 - stable/9/sys/dev/bxe

2014-09-12 Thread David C Somayajulu
Author: davidcs
Date: Fri Sep 12 18:20:35 2014
New Revision: 271476
URL: http://svnweb.freebsd.org/changeset/base/271476

Log:
  MFC r268854
Initiate error recovery stats fail to update after 3 retries.
Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
panic only if ECORE_STOP_ON_ERROR is defined.

Modified:
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/bxe.h
  stable/9/sys/dev/bxe/bxe_stats.c
  stable/9/sys/dev/bxe/ecore_reg.h
  stable/9/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Fri Sep 12 17:32:28 2014(r271475)
+++ stable/9/sys/dev/bxe/bxe.c  Fri Sep 12 18:20:35 2014(r271476)
@@ -11486,6 +11486,10 @@ bxe_process_kill(struct bxe_softc *sc,
 bxe_process_kill_chip_reset(sc, global);
 mb();
 
+/* clear errors in PGB */
+if (!CHIP_IS_E1(sc))
+REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f);
+
 /* Recover after reset: */
 /* MCP */
 if (global  bxe_reset_mcp_comp(sc, val)) {

Modified: stable/9/sys/dev/bxe/bxe.h
==
--- stable/9/sys/dev/bxe/bxe.h  Fri Sep 12 17:32:28 2014(r271475)
+++ stable/9/sys/dev/bxe/bxe.h  Fri Sep 12 18:20:35 2014(r271476)
@@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx
 } \
 } while(0)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define bxe_panic(sc, msg) \
 do {   \
 panic msg; \
 } while (0)
 
+#else
+
+#define bxe_panic(sc, msg) \
+device_printf((sc)-dev, %s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#endif
+
 #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data));
 #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe)
 

Modified: stable/9/sys/dev/bxe/bxe_stats.c
==
--- stable/9/sys/dev/bxe/bxe_stats.cFri Sep 12 17:32:28 2014
(r271475)
+++ stable/9/sys/dev/bxe/bxe_stats.cFri Sep 12 18:20:35 2014
(r271476)
@@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc)
 
 if (bxe_storm_stats_update(sc)) {
 if (sc-stats_pending++ == 3) {
-bxe_panic(sc, (storm stats not updated for 3 times\n));
+   if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
+   atomic_store_rel_long(sc-chip_tq_flags, 
CHIP_TQ_REINIT);
+   taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   }
 }
 return;
 }

Modified: stable/9/sys/dev/bxe/ecore_reg.h
==
--- stable/9/sys/dev/bxe/ecore_reg.hFri Sep 12 17:32:28 2014
(r271475)
+++ stable/9/sys/dev/bxe/ecore_reg.hFri Sep 12 18:20:35 2014
(r271476)
@@ -1039,6 +1039,8 @@ __FBSDID($FreeBSD$);
0x942cUL
 #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \
0x9430UL
+#define PGLUE_B_REG_LATCHED_ERRORS_CLR \
+   0x943CUL
 #define PGLUE_B_REG_PGLUE_B_INT_STS \
0x9298UL
 #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \

Modified: stable/9/sys/dev/bxe/ecore_sp.h
==
--- stable/9/sys/dev/bxe/ecore_sp.h Fri Sep 12 17:32:28 2014
(r271475)
+++ stable/9/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:20:35 2014
(r271476)
@@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 #define ecore_sp_post(_sc, _a, _b, _c, _d) \
 bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define ECORE_DBG_BREAK_IF(exp) \
 do {\
 if (__predict_false(exp)) { \
@@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 }\
 } while (0)
 
+#else
+
+#define ECORE_DBG_BREAK_IF(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG_ON(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+
+#endif /* #ifdef ECORE_STOP_ON_ERROR */
+
 #define ECORE_ERR(str, ...) \
 BLOGE(sc, ECORE:  str, ##__VA_ARGS__)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271478 - stable/8/sys/dev/bxe

2014-09-12 Thread David C Somayajulu
Author: davidcs
Date: Fri Sep 12 18:27:20 2014
New Revision: 271478
URL: http://svnweb.freebsd.org/changeset/base/271478

Log:
MFC r268854
  Initiate error recovery stats fail to update after 3 retries.
  Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
  panic only if ECORE_STOP_ON_ERROR is defined.

Modified:
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/bxe.h
  stable/8/sys/dev/bxe/bxe_stats.c
  stable/8/sys/dev/bxe/ecore_reg.h
  stable/8/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Fri Sep 12 18:23:22 2014(r271477)
+++ stable/8/sys/dev/bxe/bxe.c  Fri Sep 12 18:27:20 2014(r271478)
@@ -11486,6 +11486,10 @@ bxe_process_kill(struct bxe_softc *sc,
 bxe_process_kill_chip_reset(sc, global);
 mb();
 
+/* clear errors in PGB */
+if (!CHIP_IS_E1(sc))
+REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f);
+
 /* Recover after reset: */
 /* MCP */
 if (global  bxe_reset_mcp_comp(sc, val)) {

Modified: stable/8/sys/dev/bxe/bxe.h
==
--- stable/8/sys/dev/bxe/bxe.h  Fri Sep 12 18:23:22 2014(r271477)
+++ stable/8/sys/dev/bxe/bxe.h  Fri Sep 12 18:27:20 2014(r271478)
@@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx
 } \
 } while(0)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define bxe_panic(sc, msg) \
 do {   \
 panic msg; \
 } while (0)
 
+#else
+
+#define bxe_panic(sc, msg) \
+device_printf((sc)-dev, %s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#endif
+
 #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data));
 #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe)
 

Modified: stable/8/sys/dev/bxe/bxe_stats.c
==
--- stable/8/sys/dev/bxe/bxe_stats.cFri Sep 12 18:23:22 2014
(r271477)
+++ stable/8/sys/dev/bxe/bxe_stats.cFri Sep 12 18:27:20 2014
(r271478)
@@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc)
 
 if (bxe_storm_stats_update(sc)) {
 if (sc-stats_pending++ == 3) {
-bxe_panic(sc, (storm stats not updated for 3 times\n));
+   if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
+   atomic_store_rel_long(sc-chip_tq_flags, 
CHIP_TQ_REINIT);
+   taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   }
 }
 return;
 }

Modified: stable/8/sys/dev/bxe/ecore_reg.h
==
--- stable/8/sys/dev/bxe/ecore_reg.hFri Sep 12 18:23:22 2014
(r271477)
+++ stable/8/sys/dev/bxe/ecore_reg.hFri Sep 12 18:27:20 2014
(r271478)
@@ -1039,6 +1039,8 @@ __FBSDID($FreeBSD$);
0x942cUL
 #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \
0x9430UL
+#define PGLUE_B_REG_LATCHED_ERRORS_CLR \
+   0x943CUL
 #define PGLUE_B_REG_PGLUE_B_INT_STS \
0x9298UL
 #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \

Modified: stable/8/sys/dev/bxe/ecore_sp.h
==
--- stable/8/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:23:22 2014
(r271477)
+++ stable/8/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:27:20 2014
(r271478)
@@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 #define ecore_sp_post(_sc, _a, _b, _c, _d) \
 bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define ECORE_DBG_BREAK_IF(exp) \
 do {\
 if (__predict_false(exp)) { \
@@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 }\
 } while (0)
 
+#else
+
+#define ECORE_DBG_BREAK_IF(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG_ON(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+
+#endif /* #ifdef ECORE_STOP_ON_ERROR */
+
 #define ECORE_ERR(str, ...) \
 BLOGE(sc, ECORE:  str, ##__VA_ARGS__)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271479 - stable/7/sys/dev/bxe

2014-09-12 Thread David C Somayajulu
Author: davidcs
Date: Fri Sep 12 18:31:44 2014
New Revision: 271479
URL: http://svnweb.freebsd.org/changeset/base/271479

Log:
  MFC r268854
Initiate error recovery stats fail to update after 3 retries.
Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
panic only if ECORE_STOP_ON_ERROR is defined.

Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe.h
  stable/7/sys/dev/bxe/bxe_stats.c
  stable/7/sys/dev/bxe/ecore_reg.h
  stable/7/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Fri Sep 12 18:27:20 2014(r271478)
+++ stable/7/sys/dev/bxe/bxe.c  Fri Sep 12 18:31:44 2014(r271479)
@@ -11488,6 +11488,10 @@ bxe_process_kill(struct bxe_softc *sc,
 bxe_process_kill_chip_reset(sc, global);
 mb();
 
+/* clear errors in PGB */
+if (!CHIP_IS_E1(sc))
+REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f);
+
 /* Recover after reset: */
 /* MCP */
 if (global  bxe_reset_mcp_comp(sc, val)) {

Modified: stable/7/sys/dev/bxe/bxe.h
==
--- stable/7/sys/dev/bxe/bxe.h  Fri Sep 12 18:27:20 2014(r271478)
+++ stable/7/sys/dev/bxe/bxe.h  Fri Sep 12 18:31:44 2014(r271479)
@@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx
 } \
 } while(0)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define bxe_panic(sc, msg) \
 do {   \
 panic msg; \
 } while (0)
 
+#else
+
+#define bxe_panic(sc, msg) \
+device_printf((sc)-dev, %s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#endif
+
 #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data));
 #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe)
 

Modified: stable/7/sys/dev/bxe/bxe_stats.c
==
--- stable/7/sys/dev/bxe/bxe_stats.cFri Sep 12 18:27:20 2014
(r271478)
+++ stable/7/sys/dev/bxe/bxe_stats.cFri Sep 12 18:31:44 2014
(r271479)
@@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc)
 
 if (bxe_storm_stats_update(sc)) {
 if (sc-stats_pending++ == 3) {
-bxe_panic(sc, (storm stats not updated for 3 times\n));
+   if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
+   atomic_store_rel_long(sc-chip_tq_flags, 
CHIP_TQ_REINIT);
+   taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   }
 }
 return;
 }

Modified: stable/7/sys/dev/bxe/ecore_reg.h
==
--- stable/7/sys/dev/bxe/ecore_reg.hFri Sep 12 18:27:20 2014
(r271478)
+++ stable/7/sys/dev/bxe/ecore_reg.hFri Sep 12 18:31:44 2014
(r271479)
@@ -1039,6 +1039,8 @@ __FBSDID($FreeBSD$);
0x942cUL
 #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \
0x9430UL
+#define PGLUE_B_REG_LATCHED_ERRORS_CLR \
+   0x943CUL
 #define PGLUE_B_REG_PGLUE_B_INT_STS \
0x9298UL
 #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \

Modified: stable/7/sys/dev/bxe/ecore_sp.h
==
--- stable/7/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:27:20 2014
(r271478)
+++ stable/7/sys/dev/bxe/ecore_sp.h Fri Sep 12 18:31:44 2014
(r271479)
@@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 #define ecore_sp_post(_sc, _a, _b, _c, _d) \
 bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define ECORE_DBG_BREAK_IF(exp) \
 do {\
 if (__predict_false(exp)) { \
@@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 }\
 } while (0)
 
+#else
+
+#define ECORE_DBG_BREAK_IF(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG_ON(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+
+#endif /* #ifdef ECORE_STOP_ON_ERROR */
+
 #define ECORE_ERR(str, ...) \
 BLOGE(sc, ECORE:  str, ##__VA_ARGS__)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271725 - stable/10/sys/dev/bxe

2014-09-17 Thread David C Somayajulu
Author: davidcs
Date: Wed Sep 17 22:11:20 2014
New Revision: 271725
URL: http://svnweb.freebsd.org/changeset/base/271725

Log:
  MFC r268854
  Initiate error recovery stats fail to update after 3 retries.
  Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
  panic only if ECORE_STOP_ON_ERROR is defined.
  
  Approved by: re(gjb)

Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe.h
  stable/10/sys/dev/bxe/bxe_stats.c
  stable/10/sys/dev/bxe/ecore_reg.h
  stable/10/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Wed Sep 17 21:04:50 2014(r271724)
+++ stable/10/sys/dev/bxe/bxe.c Wed Sep 17 22:11:20 2014(r271725)
@@ -11478,6 +11478,10 @@ bxe_process_kill(struct bxe_softc *sc,
 bxe_process_kill_chip_reset(sc, global);
 mb();
 
+/* clear errors in PGB */
+if (!CHIP_IS_E1(sc))
+REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f);
+
 /* Recover after reset: */
 /* MCP */
 if (global  bxe_reset_mcp_comp(sc, val)) {

Modified: stable/10/sys/dev/bxe/bxe.h
==
--- stable/10/sys/dev/bxe/bxe.h Wed Sep 17 21:04:50 2014(r271724)
+++ stable/10/sys/dev/bxe/bxe.h Wed Sep 17 22:11:20 2014(r271725)
@@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx
 } \
 } while(0)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define bxe_panic(sc, msg) \
 do {   \
 panic msg; \
 } while (0)
 
+#else
+
+#define bxe_panic(sc, msg) \
+device_printf((sc)-dev, %s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#endif
+
 #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data));
 #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe)
 

Modified: stable/10/sys/dev/bxe/bxe_stats.c
==
--- stable/10/sys/dev/bxe/bxe_stats.c   Wed Sep 17 21:04:50 2014
(r271724)
+++ stable/10/sys/dev/bxe/bxe_stats.c   Wed Sep 17 22:11:20 2014
(r271725)
@@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc)
 
 if (bxe_storm_stats_update(sc)) {
 if (sc-stats_pending++ == 3) {
-bxe_panic(sc, (storm stats not updated for 3 times\n));
+   if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
+   atomic_store_rel_long(sc-chip_tq_flags, 
CHIP_TQ_REINIT);
+   taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   }
 }
 return;
 }

Modified: stable/10/sys/dev/bxe/ecore_reg.h
==
--- stable/10/sys/dev/bxe/ecore_reg.h   Wed Sep 17 21:04:50 2014
(r271724)
+++ stable/10/sys/dev/bxe/ecore_reg.h   Wed Sep 17 22:11:20 2014
(r271725)
@@ -1039,6 +1039,8 @@ __FBSDID($FreeBSD$);
0x942cUL
 #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \
0x9430UL
+#define PGLUE_B_REG_LATCHED_ERRORS_CLR \
+   0x943CUL
 #define PGLUE_B_REG_PGLUE_B_INT_STS \
0x9298UL
 #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \

Modified: stable/10/sys/dev/bxe/ecore_sp.h
==
--- stable/10/sys/dev/bxe/ecore_sp.hWed Sep 17 21:04:50 2014
(r271724)
+++ stable/10/sys/dev/bxe/ecore_sp.hWed Sep 17 22:11:20 2014
(r271725)
@@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 #define ecore_sp_post(_sc, _a, _b, _c, _d) \
 bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define ECORE_DBG_BREAK_IF(exp) \
 do {\
 if (__predict_false(exp)) { \
@@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 }\
 } while (0)
 
+#else
+
+#define ECORE_DBG_BREAK_IF(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG_ON(exp) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+
+
+#endif /* #ifdef ECORE_STOP_ON_ERROR */
+
 #define ECORE_ERR(str, ...) \
 BLOGE(sc, ECORE:  str, ##__VA_ARGS__)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271726 - head/sys/modules/bxe

2014-09-17 Thread David C Somayajulu
Author: davidcs
Date: Wed Sep 17 22:24:51 2014
New Revision: 271726
URL: http://svnweb.freebsd.org/changeset/base/271726

Log:
  Remove clean option
  
  MFC after:5 days

Modified:
  head/sys/modules/bxe/Makefile

Modified: head/sys/modules/bxe/Makefile
==
--- head/sys/modules/bxe/Makefile   Wed Sep 17 22:11:20 2014
(r271725)
+++ head/sys/modules/bxe/Makefile   Wed Sep 17 22:24:51 2014
(r271726)
@@ -18,9 +18,4 @@ SRCS  += bxe.c   \
 
 CFLAGS += -I${BXE}
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271727 - head/sys/modules/bce

2014-09-17 Thread David C Somayajulu
Author: davidcs
Date: Wed Sep 17 22:26:01 2014
New Revision: 271727
URL: http://svnweb.freebsd.org/changeset/base/271727

Log:
  Remove clean option
  
  MFC after:5 days

Modified:
  head/sys/modules/bce/Makefile

Modified: head/sys/modules/bce/Makefile
==
--- head/sys/modules/bce/Makefile   Wed Sep 17 22:24:51 2014
(r271726)
+++ head/sys/modules/bce/Makefile   Wed Sep 17 22:26:01 2014
(r271727)
@@ -5,9 +5,4 @@ SRCS=   opt_bce.h if_bce.c miibus_if.h mii
 
 #CFLAGS += -DBCE_DEBUG=0
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271728 - head/sys/dev/bxe

2014-09-17 Thread David C Somayajulu
Author: davidcs
Date: Wed Sep 17 22:49:29 2014
New Revision: 271728
URL: http://svnweb.freebsd.org/changeset/base/271728

Log:
  For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag 
before
  printing error message.
  
  MFC after:5 days

Modified:
  head/sys/dev/bxe/ecore_sp.h

Modified: head/sys/dev/bxe/ecore_sp.h
==
--- head/sys/dev/bxe/ecore_sp.h Wed Sep 17 22:26:01 2014(r271727)
+++ head/sys/dev/bxe/ecore_sp.h Wed Sep 17 22:49:29 2014(r271728)
@@ -246,14 +246,23 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 
 #else
 
+extern unsigned long bxe_debug;
+
+#define BXE_DEBUG_ECORE_DBG_BREAK_IF   0x01
+#define BXE_DEBUG_ECORE_BUG0x02
+#define BXE_DEBUG_ECORE_BUG_ON 0x04
+
 #define ECORE_DBG_BREAK_IF(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_DBG_BREAK_IF) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG_ON(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG_ON) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 
 #endif /* #ifdef ECORE_STOP_ON_ERROR */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271984 - stable/7/sys/modules/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 18:29:14 2014
New Revision: 271984
URL: http://svnweb.freebsd.org/changeset/base/271984

Log:
  MFC r271726
  Remove clean option in Makefile

Modified:
  stable/7/sys/modules/bxe/Makefile
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/modules/bxe/Makefile
==
--- stable/7/sys/modules/bxe/Makefile   Mon Sep 22 17:32:27 2014
(r271983)
+++ stable/7/sys/modules/bxe/Makefile   Mon Sep 22 18:29:14 2014
(r271984)
@@ -15,9 +15,4 @@ SRCS  += bxe.c   \
 
 CFLAGS += -I${BXE}
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271985 - stable/7/sys/modules/bce

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 18:31:40 2014
New Revision: 271985
URL: http://svnweb.freebsd.org/changeset/base/271985

Log:
  MFC r271727
  Remove clean option form Makefile

Modified:
  stable/7/sys/modules/bce/Makefile
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/modules/bce/Makefile
==
--- stable/7/sys/modules/bce/Makefile   Mon Sep 22 18:29:14 2014
(r271984)
+++ stable/7/sys/modules/bce/Makefile   Mon Sep 22 18:31:40 2014
(r271985)
@@ -5,9 +5,4 @@ SRCS=   opt_bce.h if_bce.c miibus_if.h mii
 
 #CFLAGS += -DBCE_DEBUG=0
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271986 - stable/7/sys/dev/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 18:36:37 2014
New Revision: 271986
URL: http://svnweb.freebsd.org/changeset/base/271986

Log:
  MFC r271728
  For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag 
before printing error message.

Modified:
  stable/7/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/ecore_sp.h
==
--- stable/7/sys/dev/bxe/ecore_sp.h Mon Sep 22 18:31:40 2014
(r271985)
+++ stable/7/sys/dev/bxe/ecore_sp.h Mon Sep 22 18:36:37 2014
(r271986)
@@ -246,14 +246,23 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 
 #else
 
+extern unsigned long bxe_debug;
+
+#define BXE_DEBUG_ECORE_DBG_BREAK_IF   0x01
+#define BXE_DEBUG_ECORE_BUG0x02
+#define BXE_DEBUG_ECORE_BUG_ON 0x04
+
 #define ECORE_DBG_BREAK_IF(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_DBG_BREAK_IF) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG_ON(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG_ON) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 
 #endif /* #ifdef ECORE_STOP_ON_ERROR */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271987 - stable/8/sys/modules/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 18:57:37 2014
New Revision: 271987
URL: http://svnweb.freebsd.org/changeset/base/271987

Log:
  MFC r271726
  Remove clean option from Makefile

Modified:
  stable/8/sys/modules/bxe/Makefile
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/modules/   (props changed)

Modified: stable/8/sys/modules/bxe/Makefile
==
--- stable/8/sys/modules/bxe/Makefile   Mon Sep 22 18:36:37 2014
(r271986)
+++ stable/8/sys/modules/bxe/Makefile   Mon Sep 22 18:57:37 2014
(r271987)
@@ -15,9 +15,4 @@ SRCS  += bxe.c   \
 
 CFLAGS += -I${BXE}
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271988 - stable/10/sys/modules/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 19:00:30 2014
New Revision: 271988
URL: http://svnweb.freebsd.org/changeset/base/271988

Log:
  MFC r271726
  remove clean option from Makefile
  
  Approved by: re(gjb)

Modified:
  stable/10/sys/modules/bxe/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/modules/bxe/Makefile
==
--- stable/10/sys/modules/bxe/Makefile  Mon Sep 22 18:57:37 2014
(r271987)
+++ stable/10/sys/modules/bxe/Makefile  Mon Sep 22 19:00:30 2014
(r271988)
@@ -15,9 +15,4 @@ SRCS  += bxe.c   \
 
 CFLAGS += -I${BXE}
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271989 - stable/8/sys/modules/bce

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 19:03:23 2014
New Revision: 271989
URL: http://svnweb.freebsd.org/changeset/base/271989

Log:
  MFC r271727
  remove clean option from Makefile

Modified:
  stable/8/sys/modules/bce/Makefile
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/modules/   (props changed)

Modified: stable/8/sys/modules/bce/Makefile
==
--- stable/8/sys/modules/bce/Makefile   Mon Sep 22 19:00:30 2014
(r271988)
+++ stable/8/sys/modules/bce/Makefile   Mon Sep 22 19:03:23 2014
(r271989)
@@ -5,9 +5,4 @@ SRCS=   opt_bce.h if_bce.c miibus_if.h mii
 
 #CFLAGS += -DBCE_DEBUG=0
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271991 - stable/8/sys/dev/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 19:09:04 2014
New Revision: 271991
URL: http://svnweb.freebsd.org/changeset/base/271991

Log:
  MFC r271728
  For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag 
before printing error message.

Modified:
  stable/8/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/ecore_sp.h
==
--- stable/8/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:07:27 2014
(r271990)
+++ stable/8/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:09:04 2014
(r271991)
@@ -246,14 +246,23 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 
 #else
 
+extern unsigned long bxe_debug;
+
+#define BXE_DEBUG_ECORE_DBG_BREAK_IF   0x01
+#define BXE_DEBUG_ECORE_BUG0x02
+#define BXE_DEBUG_ECORE_BUG_ON 0x04
+
 #define ECORE_DBG_BREAK_IF(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_DBG_BREAK_IF) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG_ON(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG_ON) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 
 #endif /* #ifdef ECORE_STOP_ON_ERROR */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271993 - stable/9/sys/modules/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 19:28:21 2014
New Revision: 271993
URL: http://svnweb.freebsd.org/changeset/base/271993

Log:
  MFC r271726
  remove clean option from Makefile

Modified:
  stable/9/sys/modules/bxe/Makefile
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/modules/bxe/Makefile
==
--- stable/9/sys/modules/bxe/Makefile   Mon Sep 22 19:14:27 2014
(r271992)
+++ stable/9/sys/modules/bxe/Makefile   Mon Sep 22 19:28:21 2014
(r271993)
@@ -15,9 +15,4 @@ SRCS  += bxe.c   \
 
 CFLAGS += -I${BXE}
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271994 - stable/9/sys/modules/bce

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 19:37:03 2014
New Revision: 271994
URL: http://svnweb.freebsd.org/changeset/base/271994

Log:
  MFC r271727
  remove clean option from Makefile

Modified:
  stable/9/sys/modules/bce/Makefile
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/modules/   (props changed)

Modified: stable/9/sys/modules/bce/Makefile
==
--- stable/9/sys/modules/bce/Makefile   Mon Sep 22 19:28:21 2014
(r271993)
+++ stable/9/sys/modules/bce/Makefile   Mon Sep 22 19:37:03 2014
(r271994)
@@ -5,9 +5,4 @@ SRCS=   opt_bce.h if_bce.c miibus_if.h mii
 
 #CFLAGS += -DBCE_DEBUG=0
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271995 - stable/9/sys/dev/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 19:42:18 2014
New Revision: 271995
URL: http://svnweb.freebsd.org/changeset/base/271995

Log:
  MFC r271728
  For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag 
before printing error message.

Modified:
  stable/9/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/ecore_sp.h
==
--- stable/9/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:37:03 2014
(r271994)
+++ stable/9/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:42:18 2014
(r271995)
@@ -246,14 +246,23 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 
 #else
 
+extern unsigned long bxe_debug;
+
+#define BXE_DEBUG_ECORE_DBG_BREAK_IF   0x01
+#define BXE_DEBUG_ECORE_BUG0x02
+#define BXE_DEBUG_ECORE_BUG_ON 0x04
+
 #define ECORE_DBG_BREAK_IF(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_DBG_BREAK_IF) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG_ON(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG_ON) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 
 #endif /* #ifdef ECORE_STOP_ON_ERROR */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r272001 - stable/10/sys/modules/bce

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 20:53:17 2014
New Revision: 272001
URL: http://svnweb.freebsd.org/changeset/base/272001

Log:
  MFC r271727
  remove clean option from Makefile
  
  Approved by:  re(gjb)

Modified:
  stable/10/sys/modules/bce/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/modules/bce/Makefile
==
--- stable/10/sys/modules/bce/Makefile  Mon Sep 22 20:38:01 2014
(r272000)
+++ stable/10/sys/modules/bce/Makefile  Mon Sep 22 20:53:17 2014
(r272001)
@@ -5,9 +5,4 @@ SRCS=   opt_bce.h if_bce.c miibus_if.h mii
 
 #CFLAGS += -DBCE_DEBUG=0
 
-clean:
-   rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
-   rm -f *.o *.kld *.ko
-   rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h
-
 .include bsd.kmod.mk
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r272004 - stable/10/sys/dev/bxe

2014-09-22 Thread David C Somayajulu
Author: davidcs
Date: Mon Sep 22 21:12:30 2014
New Revision: 272004
URL: http://svnweb.freebsd.org/changeset/base/272004

Log:
  MFC r271728
  For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag 
before printing error message.
  
  Approved by:  re(gjb)

Modified:
  stable/10/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/ecore_sp.h
==
--- stable/10/sys/dev/bxe/ecore_sp.hMon Sep 22 21:09:30 2014
(r272003)
+++ stable/10/sys/dev/bxe/ecore_sp.hMon Sep 22 21:12:30 2014
(r272004)
@@ -246,14 +246,23 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 
 #else
 
+extern unsigned long bxe_debug;
+
+#define BXE_DEBUG_ECORE_DBG_BREAK_IF   0x01
+#define BXE_DEBUG_ECORE_BUG0x02
+#define BXE_DEBUG_ECORE_BUG_ON 0x04
+
 #define ECORE_DBG_BREAK_IF(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_DBG_BREAK_IF) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 #define ECORE_BUG_ON(exp) \
-printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
+if (bxe_debug  BXE_DEBUG_ECORE_BUG_ON) \
+printf(%s (%s,%d)\n, __FUNCTION__, __FILE__, __LINE__);
 
 
 #endif /* #ifdef ECORE_STOP_ON_ERROR */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r281219 - stable/7/sys/dev/bxe

2015-04-07 Thread David C Somayajulu
Author: davidcs
Date: Tue Apr  7 18:14:01 2015
New Revision: 281219
URL: https://svnweb.freebsd.org/changeset/base/281219

Log:
  MFC r281006
  When an mbuf allocation fails in the receive path, the mbuf containing the 
received packet is not sent to the host network stack and is reused again on 
the receive ring.  Remaining received packets in the ring are not processed in 
that invocation of bxe_rxeof() and defered to the task thread

Modified:
  stable/7/sys/dev/bxe/bxe.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Tue Apr  7 18:10:58 2015(r281218)
+++ stable/7/sys/dev/bxe/bxe.c  Tue Apr  7 18:14:01 2015(r281219)
@@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc*sc,
 uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons;
 uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod;
 int rx_pkts = 0;
-int rc;
+int rc = 0;
 
 BXE_FP_RX_LOCK(fp);
 
@@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc*sc,
   (sc-max_rx_bufs != RX_BD_USABLE) ?
   bd_prod : bd_cons);
 if (rc != 0) {
+
+/* we simply reuse the received mbuf and don't post it to the 
stack */
+m = NULL;
+
 BLOGE(sc, mbuf alloc fail for fp[%02d] rx chain (%d)\n,
   fp-index, rc);
 fp-eth_q_stats.rx_soft_errors++;
@@ -3487,6 +3491,9 @@ next_cqe:
 sw_cq_cons = RCQ_NEXT(sw_cq_cons);
 
 /* limit spinning on the queue */
+if (rc != 0)
+break;
+
 if (rx_pkts == sc-rx_budget) {
 fp-eth_q_stats.rx_budget_reached++;
 break;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r281218 - stable/8/sys/dev/bxe

2015-04-07 Thread David C Somayajulu
Author: davidcs
Date: Tue Apr  7 18:10:58 2015
New Revision: 281218
URL: https://svnweb.freebsd.org/changeset/base/281218

Log:
  MFC r281006
  When an mbuf allocation fails in the receive path, the mbuf containing the 
received packet is not sent to the host network stack and is reused again on 
the receive ring.  Remaining received packets in the ring are not processed in 
that invocation of bxe_rxeof() and defered to the task thread

Modified:
  stable/8/sys/dev/bxe/bxe.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Tue Apr  7 18:07:16 2015(r281217)
+++ stable/8/sys/dev/bxe/bxe.c  Tue Apr  7 18:10:58 2015(r281218)
@@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc*sc,
 uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons;
 uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod;
 int rx_pkts = 0;
-int rc;
+int rc = 0;
 
 BXE_FP_RX_LOCK(fp);
 
@@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc*sc,
   (sc-max_rx_bufs != RX_BD_USABLE) ?
   bd_prod : bd_cons);
 if (rc != 0) {
+
+/* we simply reuse the received mbuf and don't post it to the 
stack */
+m = NULL;
+
 BLOGE(sc, mbuf alloc fail for fp[%02d] rx chain (%d)\n,
   fp-index, rc);
 fp-eth_q_stats.rx_soft_errors++;
@@ -3487,6 +3491,9 @@ next_cqe:
 sw_cq_cons = RCQ_NEXT(sw_cq_cons);
 
 /* limit spinning on the queue */
+if (rc != 0)
+break;
+
 if (rx_pkts == sc-rx_budget) {
 fp-eth_q_stats.rx_budget_reached++;
 break;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r281217 - stable/9/sys/dev/bxe

2015-04-07 Thread David C Somayajulu
Author: davidcs
Date: Tue Apr  7 18:07:16 2015
New Revision: 281217
URL: https://svnweb.freebsd.org/changeset/base/281217

Log:
  MFC r281006
  When an mbuf allocation fails in the receive path, the mbuf containing the 
received packet is not sent to the host network stack and is reused again on 
the receive ring.  Remaining received packets in the ring are not processed in 
that invocation of bxe_rxeof() and defered to the task thread

Modified:
  stable/9/sys/dev/bxe/bxe.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Apr  7 18:06:46 2015(r281216)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Apr  7 18:07:16 2015(r281217)
@@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc*sc,
 uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons;
 uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod;
 int rx_pkts = 0;
-int rc;
+int rc = 0;
 
 BXE_FP_RX_LOCK(fp);
 
@@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc*sc,
   (sc-max_rx_bufs != RX_BD_USABLE) ?
   bd_prod : bd_cons);
 if (rc != 0) {
+
+/* we simply reuse the received mbuf and don't post it to the 
stack */
+m = NULL;
+
 BLOGE(sc, mbuf alloc fail for fp[%02d] rx chain (%d)\n,
   fp-index, rc);
 fp-eth_q_stats.rx_soft_errors++;
@@ -3487,6 +3491,9 @@ next_cqe:
 sw_cq_cons = RCQ_NEXT(sw_cq_cons);
 
 /* limit spinning on the queue */
+if (rc != 0)
+break;
+
 if (rx_pkts == sc-rx_budget) {
 fp-eth_q_stats.rx_budget_reached++;
 break;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r281215 - stable/10/sys/dev/bxe

2015-04-07 Thread David C Somayajulu
Author: davidcs
Date: Tue Apr  7 18:04:18 2015
New Revision: 281215
URL: https://svnweb.freebsd.org/changeset/base/281215

Log:
  MFC r281006
  When an mbuf allocation fails in the receive path, the mbuf containing the 
received packet is not sent to the host network stack and is reused again on 
the receive ring.  Remaining received packets in the ring are not processed in 
that invocation of bxe_rxeof() and defered to the task thread

Modified:
  stable/10/sys/dev/bxe/bxe.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Apr  7 17:40:35 2015(r281214)
+++ stable/10/sys/dev/bxe/bxe.c Tue Apr  7 18:04:18 2015(r281215)
@@ -3257,7 +3257,7 @@ bxe_rxeof(struct bxe_softc*sc,
 uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons;
 uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod;
 int rx_pkts = 0;
-int rc;
+int rc = 0;
 
 BXE_FP_RX_LOCK(fp);
 
@@ -3399,6 +3399,10 @@ bxe_rxeof(struct bxe_softc*sc,
   (sc-max_rx_bufs != RX_BD_USABLE) ?
   bd_prod : bd_cons);
 if (rc != 0) {
+
+/* we simply reuse the received mbuf and don't post it to the 
stack */
+m = NULL;
+
 BLOGE(sc, mbuf alloc fail for fp[%02d] rx chain (%d)\n,
   fp-index, rc);
 fp-eth_q_stats.rx_soft_errors++;
@@ -3487,6 +3491,9 @@ next_cqe:
 sw_cq_cons = RCQ_NEXT(sw_cq_cons);
 
 /* limit spinning on the queue */
+if (rc != 0)
+break;
+
 if (rx_pkts == sc-rx_budget) {
 fp-eth_q_stats.rx_budget_reached++;
 break;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r281006 - head/sys/dev/bxe

2015-04-02 Thread David C Somayajulu
Author: davidcs
Date: Thu Apr  2 21:55:03 2015
New Revision: 281006
URL: https://svnweb.freebsd.org/changeset/base/281006

Log:
  When an mbuf allocation fails in the receive path, the mbuf containing the 
received packet is not sent to the host net
  work stack and is reused again on the receive ring.  Remaining received 
packets in the ring are not processed in that
  invocation of bxe_rxeof() and defered to the task thread.
  
  MFC after: 5 days

Modified:
  head/sys/dev/bxe/bxe.c

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Thu Apr  2 21:35:36 2015(r281005)
+++ head/sys/dev/bxe/bxe.c  Thu Apr  2 21:55:03 2015(r281006)
@@ -3246,7 +3246,7 @@ bxe_rxeof(struct bxe_softc*sc,
 uint16_t bd_cons, bd_prod, bd_prod_fw, comp_ring_cons;
 uint16_t hw_cq_cons, sw_cq_cons, sw_cq_prod;
 int rx_pkts = 0;
-int rc;
+int rc = 0;
 
 BXE_FP_RX_LOCK(fp);
 
@@ -3388,6 +3388,10 @@ bxe_rxeof(struct bxe_softc*sc,
   (sc-max_rx_bufs != RX_BD_USABLE) ?
   bd_prod : bd_cons);
 if (rc != 0) {
+
+/* we simply reuse the received mbuf and don't post it to the 
stack */
+m = NULL;
+
 BLOGE(sc, mbuf alloc fail for fp[%02d] rx chain (%d)\n,
   fp-index, rc);
 fp-eth_q_stats.rx_soft_errors++;
@@ -3476,6 +3480,9 @@ next_cqe:
 sw_cq_cons = RCQ_NEXT(sw_cq_cons);
 
 /* limit spinning on the queue */
+if (rc != 0)
+break;
+
 if (rx_pkts == sc-rx_budget) {
 fp-eth_q_stats.rx_budget_reached++;
 break;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284739 - head/sys/dev/bxe

2015-06-23 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 23 20:09:52 2015
New Revision: 284739
URL: https://svnweb.freebsd.org/changeset/base/284739

Log:
  tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
  
  Submitted by:attilio@isilon.com
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Tue Jun 23 20:01:12 2015(r284738)
+++ head/sys/dev/bxe/bxe.c  Tue Jun 23 20:09:52 2015(r284739)
@@ -6547,10 +6547,14 @@ bxe_free_fp_buffers(struct bxe_softc *sc
 
 #if __FreeBSD_version = 80
 if (fp-tx_br != NULL) {
-struct mbuf *m;
 /* just in case bxe_mq_flush() wasn't called */
-while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL) {
-m_freem(m);
+if (mtx_initialized(fp-tx_mtx)) {
+struct mbuf *m;
+
+BXE_FP_TX_LOCK(fp);
+while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL)
+m_freem(m);
+BXE_FP_TX_UNLOCK(fp);
 }
 buf_ring_free(fp-tx_br, M_DEVBUF);
 fp-tx_br = NULL;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284740 - svnadmin/conf

2015-06-23 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 23 22:00:47 2015
New Revision: 284740
URL: https://svnweb.freebsd.org/changeset/base/284740

Log:
  added self to sizelimit.conf

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confTue Jun 23 20:09:52 2015
(r284739)
+++ svnadmin/conf/sizelimit.confTue Jun 23 22:00:47 2015
(r284740)
@@ -23,6 +23,7 @@ bapt
 brooks
 # cy
 #delphij
+davidcs
 des
 dim
 ed
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284651 - head/sys/dev/bxe

2015-06-20 Thread David C Somayajulu
Author: davidcs
Date: Sat Jun 20 22:24:44 2015
New Revision: 284651
URL: https://svnweb.freebsd.org/changeset/base/284651

Log:
  Simplified implementation of bxe_set_mc_list()
  removed bxe_free_mcast_macs_list() and bxe_init_mcast_macs_list()
  fixed bug where copy of multicast list mta was deleted prior to passing the 
list to firmware
  
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Sat Jun 20 21:48:07 2015(r284650)
+++ head/sys/dev/bxe/bxe.c  Sat Jun 20 22:24:44 2015(r284651)
@@ -12499,24 +12499,21 @@ bxe_initial_phy_init(struct bxe_softc *s
 }
 
 /* must be called under IF_ADDR_LOCK */
+
 static int
-bxe_init_mcast_macs_list(struct bxe_softc *sc,
- struct ecore_mcast_ramrod_params *p)
+bxe_set_mc_list(struct bxe_softc *sc)
 {
-if_t ifp = sc-ifp;
+struct ecore_mcast_ramrod_params rparam = { NULL };
+int rc = 0;
 int mc_count = 0;
 int mcnt, i;
-struct ecore_mcast_list_elem *mc_mac;
+struct ecore_mcast_list_elem *mc_mac, *mc_mac_start;
 unsigned char *mta;
+if_t ifp = sc-ifp;
 
 mc_count = if_multiaddr_count(ifp, -1);/* XXX they don't have a limit */
-   /* should we enforce one? */
-ECORE_LIST_INIT(p-mcast_list);
-p-mcast_list_len = 0;
-
-if (!mc_count) {
+if (!mc_count)
 return (0);
-}
 
 mta = malloc(sizeof(unsigned char) * ETHER_ADDR_LEN *
 mc_count, M_DEVBUF, M_NOWAIT);
@@ -12527,8 +12524,9 @@ bxe_init_mcast_macs_list(struct bxe_soft
 }
 bzero(mta, (sizeof(unsigned char) * ETHER_ADDR_LEN * mc_count));
 
-mc_mac = malloc(sizeof(*mc_mac) * mc_count, M_DEVBUF,
-(M_NOWAIT | M_ZERO));
+mc_mac = malloc(sizeof(*mc_mac) * mc_count, M_DEVBUF, (M_NOWAIT | M_ZERO));
+mc_mac_start = mc_mac;
+
 if (!mc_mac) {
 free(mta, M_DEVBUF);
 BLOGE(sc, Failed to allocate temp mcast list\n);
@@ -12536,12 +12534,17 @@ bxe_init_mcast_macs_list(struct bxe_soft
 }
 bzero(mc_mac, (sizeof(*mc_mac) * mc_count));
 
-if_multiaddr_array(ifp, mta, mcnt, mc_count); /* mta and mcnt not 
expected 
-  to be  different */
+/* mta and mcnt not expected to be  different */
+if_multiaddr_array(ifp, mta, mcnt, mc_count);
+
+
+rparam.mcast_obj = sc-mcast_obj;
+ECORE_LIST_INIT(rparam.mcast_list);
+
 for(i=0; i mcnt; i++) {
 
-   mc_mac-mac = (uint8_t *)(mta + (i * ETHER_ADDR_LEN));
-ECORE_LIST_PUSH_TAIL(mc_mac-link, p-mcast_list);
+mc_mac-mac = (uint8_t *)(mta + (i * ETHER_ADDR_LEN));
+ECORE_LIST_PUSH_TAIL(mc_mac-link, rparam.mcast_list);
 
 BLOGD(sc, DBG_LOAD,
   Setting MCAST %02X:%02X:%02X:%02X:%02X:%02X\n,
@@ -12550,34 +12553,7 @@ bxe_init_mcast_macs_list(struct bxe_soft
 
 mc_mac++;
 }
-
-p-mcast_list_len = mc_count;
-free(mta, M_DEVBUF);
-
-return (0);
-}
-
-static void
-bxe_free_mcast_macs_list(struct ecore_mcast_ramrod_params *p)
-{
-struct ecore_mcast_list_elem *mc_mac =
-ECORE_LIST_FIRST_ENTRY(p-mcast_list,
-   struct ecore_mcast_list_elem,
-   link);
-
-if (mc_mac) {
-/* only a single free as all mc_macs are in the same heap array */
-free(mc_mac, M_DEVBUF);
-}
-}
-
-static int
-bxe_set_mc_list(struct bxe_softc *sc)
-{
-struct ecore_mcast_ramrod_params rparam = { NULL };
-int rc = 0;
-
-rparam.mcast_obj = sc-mcast_obj;
+rparam.mcast_list_len = mc_count;
 
 BXE_MCAST_LOCK(sc);
 
@@ -12586,14 +12562,8 @@ bxe_set_mc_list(struct bxe_softc *sc)
 if (rc  0) {
 BLOGE(sc, Failed to clear multicast configuration: %d\n, rc);
 BXE_MCAST_UNLOCK(sc);
-return (rc);
-}
-
-/* configure a new MACs list */
-rc = bxe_init_mcast_macs_list(sc, rparam);
-if (rc) {
-BLOGE(sc, Failed to create mcast MACs list (%d)\n, rc);
-BXE_MCAST_UNLOCK(sc);
+   free(mc_mac_start, M_DEVBUF);
+free(mta, M_DEVBUF);
 return (rc);
 }
 
@@ -12603,10 +12573,11 @@ bxe_set_mc_list(struct bxe_softc *sc)
 BLOGE(sc, Failed to set new mcast config (%d)\n, rc);
 }
 
-bxe_free_mcast_macs_list(rparam);
-
 BXE_MCAST_UNLOCK(sc);
 
+free(mc_mac_start, M_DEVBUF);
+free(mta, M_DEVBUF);
+
 return (rc);
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284741 - in head/sys: dev/qlxgbe modules/qlxgbe

2015-06-23 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 23 22:22:36 2015
New Revision: 284741
URL: https://svnweb.freebsd.org/changeset/base/284741

Log:
  Updated Copyright information
  Added support for the following:
  - iSCSI TLV (requires 64 Tx and 32 Rx rings
  - 9K receive buffers for jumbo frames (feature may be 
enabled/disabled)
  - builtin firmware, bootloader and minidump template
  - quick stats
  - async event handling for SFP insertion/removal and DCBX changes
  - Configuring DCBX and interrupt coalescing parameters

Added:
  head/sys/dev/qlxgbe/ql_boot.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_fw.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_minidump.c   (contents, props changed)
Modified:
  head/sys/dev/qlxgbe/ql_dbg.c
  head/sys/dev/qlxgbe/ql_dbg.h
  head/sys/dev/qlxgbe/ql_def.h
  head/sys/dev/qlxgbe/ql_glbl.h
  head/sys/dev/qlxgbe/ql_hw.c
  head/sys/dev/qlxgbe/ql_hw.h
  head/sys/dev/qlxgbe/ql_inline.h
  head/sys/dev/qlxgbe/ql_ioctl.c
  head/sys/dev/qlxgbe/ql_ioctl.h
  head/sys/dev/qlxgbe/ql_isr.c
  head/sys/dev/qlxgbe/ql_misc.c
  head/sys/dev/qlxgbe/ql_os.c
  head/sys/dev/qlxgbe/ql_os.h
  head/sys/dev/qlxgbe/ql_reset.c
  head/sys/dev/qlxgbe/ql_tmplt.h
  head/sys/dev/qlxgbe/ql_ver.h
  head/sys/modules/qlxgbe/Makefile

Added: head/sys/dev/qlxgbe/ql_boot.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/qlxgbe/ql_boot.c   Tue Jun 23 22:22:36 2015
(r284741)
@@ -0,0 +1,10964 @@
+/*
+ * Copyright (c) 2012-2016 Qlogic Corporation
+ * All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *  2. 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.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * File: ql_boot.c
+ */
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include ql_os.h
+
+unsigned int ql83xx_bootloader_version_major = 5;
+unsigned int ql83xx_bootloader_version_minor = 2;
+unsigned int ql83xx_bootloader_version_sub = 7;
+unsigned char ql83xx_bootloader[] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x04, 0x00, 0x80, 0x82, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x21, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x7c, 0x00,
+  0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

svn commit: r284470 - head/sys/dev/bxe

2015-06-16 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 16 21:11:32 2015
New Revision: 284470
URL: https://svnweb.freebsd.org/changeset/base/284470

Log:
  In bxe_init_mcast_macs_list(): mc_mac-mac needs to point to the multicast 
mac address
  In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
  In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/ecore_sp.c

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Tue Jun 16 21:11:31 2015(r284469)
+++ head/sys/dev/bxe/bxe.c  Tue Jun 16 21:11:32 2015(r284470)
@@ -12525,6 +12525,7 @@ bxe_init_mcast_macs_list(struct bxe_soft
 BLOGE(sc, Failed to allocate temp mcast list\n);
 return (-1);
 }
+bzero(mta, (sizeof(unsigned char) * ETHER_ADDR_LEN * mc_count));
 
 mc_mac = malloc(sizeof(*mc_mac) * mc_count, M_DEVBUF,
 (M_NOWAIT | M_ZERO));
@@ -12533,12 +12534,13 @@ bxe_init_mcast_macs_list(struct bxe_soft
 BLOGE(sc, Failed to allocate temp mcast list\n);
 return (-1);
 }
+bzero(mc_mac, (sizeof(*mc_mac) * mc_count));
 
 if_multiaddr_array(ifp, mta, mcnt, mc_count); /* mta and mcnt not 
expected 
   to be  different */
 for(i=0; i mcnt; i++) {
 
-bcopy((mta + (i * ETHER_ADDR_LEN)), mc_mac-mac, ETHER_ADDR_LEN);
+   mc_mac-mac = (uint8_t *)(mta + (i * ETHER_ADDR_LEN));
 ECORE_LIST_PUSH_TAIL(mc_mac-link, p-mcast_list);
 
 BLOGD(sc, DBG_LOAD,
@@ -12583,6 +12585,7 @@ bxe_set_mc_list(struct bxe_softc *sc)
 rc = ecore_config_mcast(sc, rparam, ECORE_MCAST_CMD_DEL);
 if (rc  0) {
 BLOGE(sc, Failed to clear multicast configuration: %d\n, rc);
+BXE_MCAST_UNLOCK(sc);
 return (rc);
 }
 

Modified: head/sys/dev/bxe/ecore_sp.c
==
--- head/sys/dev/bxe/ecore_sp.c Tue Jun 16 21:11:31 2015(r284469)
+++ head/sys/dev/bxe/ecore_sp.c Tue Jun 16 21:11:32 2015(r284470)
@@ -474,7 +474,7 @@ static void __ecore_vlan_mac_h_exec_pend
o-head_exe_request = FALSE;
o-saved_ramrod_flags = 0;
rc = ecore_exe_queue_step(sc, o-exe_queue, ramrod_flags);
-   if (rc != ECORE_SUCCESS) {
+   if ((rc != ECORE_SUCCESS)  (rc != ECORE_PENDING)) {
ECORE_ERR(execution of pending commands failed with rc %d\n,
  rc);
 #ifdef ECORE_STOP_ON_ERROR
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284335 - head/sys/dev/bxe

2015-06-12 Thread David C Somayajulu
Author: davidcs
Date: Sat Jun 13 01:28:19 2015
New Revision: 284335
URL: https://svnweb.freebsd.org/changeset/base/284335

Log:
  PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases 
it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which 
can cause the PHY to use bogus values. Fixes intermittent link failures.
  
  bxe_ioctl() completes all functions within its context as opposed to a 
taskqueue earlier.
  
  bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the 
functionality within its context
  
  Submitted by:gary.zambr...@qlogic.com
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe.h
  head/sys/dev/bxe/ecore_reg.h

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Fri Jun 12 22:05:04 2015(r284334)
+++ head/sys/dev/bxe/bxe.c  Sat Jun 13 01:28:19 2015(r284335)
@@ -726,7 +726,6 @@ static __noinline int bxe_nic_unload(str
  uint8_t  keep_link);
 
 static void bxe_handle_sp_tq(void *context, int pending);
-static void bxe_handle_rx_mode_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
 
@@ -1174,7 +1173,17 @@ bxe_release_hw_lock(struct bxe_softc *sc
 REG_WR(sc, hw_lock_control_reg, resource_bit);
 return (0);
 }
+static void bxe_acquire_phy_lock(struct bxe_softc *sc)
+{
+   BXE_PHY_LOCK(sc);
+   bxe_acquire_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+}
 
+static void bxe_release_phy_lock(struct bxe_softc *sc)
+{
+   bxe_release_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+   BXE_PHY_UNLOCK(sc);
+}
 /*
  * Per pf misc lock must be acquired before the per port mcp lock. Otherwise,
  * had we done things the other way around, if two pfs from the same port
@@ -4764,28 +4773,6 @@ bxe_handle_chip_tq(void *context,
 
 switch (work)
 {
-case CHIP_TQ_START:
-if ((if_getflags(sc-ifp)  IFF_UP) 
-!(if_getdrvflags(sc-ifp)  IFF_DRV_RUNNING)) {
-/* start the interface */
-BLOGD(sc, DBG_LOAD, Starting the interface...\n);
-BXE_CORE_LOCK(sc);
-bxe_init_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
-case CHIP_TQ_STOP:
-if (!(if_getflags(sc-ifp)  IFF_UP) 
-(if_getdrvflags(sc-ifp)  IFF_DRV_RUNNING)) {
-/* bring down the interface */
-BLOGD(sc, DBG_LOAD, Stopping the interface...\n);
-bxe_periodic_stop(sc);
-BXE_CORE_LOCK(sc);
-bxe_stop_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
 
 case CHIP_TQ_REINIT:
 if (if_getdrvflags(sc-ifp)  IFF_DRV_RUNNING) {
@@ -4859,21 +4846,22 @@ bxe_ioctl(if_t ifp,
 /* toggle the interface state up or down */
 BLOGD(sc, DBG_IOCTL, Received SIOCSIFFLAGS ioctl\n);
 
+   BXE_CORE_LOCK(sc);
 /* check if the interface is up */
 if (if_getflags(ifp)  IFF_UP) {
 if (if_getdrvflags(ifp)  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
 bxe_set_rx_mode(sc);
 } else {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_START);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_init_locked(sc);
 }
 } else {
 if (if_getdrvflags(ifp)  IFF_DRV_RUNNING) {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_STOP);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   bxe_stop_locked(sc);
 }
 }
+   BXE_CORE_UNLOCK(sc);
 
 break;
 
@@ -4885,7 +4873,9 @@ bxe_ioctl(if_t ifp,
 /* check if the interface is up */
 if (if_getdrvflags(ifp)  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
+   BXE_CORE_LOCK(sc);
 bxe_set_rx_mode(sc);
+   BXE_CORE_UNLOCK(sc); 
 }
 
 break;
@@ -5044,8 +5034,11 @@ bxe_ioctl(if_t ifp,
 if (reinit  (if_getdrvflags(sc-ifp)  IFF_DRV_RUNNING)) {
 BLOGD(sc, DBG_LOAD | DBG_IOCTL,
   Re-initializing hardware from IOCTL change\n);
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_REINIT);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   BXE_CORE_LOCK(sc);
+   bxe_stop_locked(sc);
+   bxe_init_locked(sc);
+   BXE_CORE_UNLOCK(sc);
 }
 
 return (error);
@@ -7487,8 +7480,7 @@ bxe_attn_int_asserted(struct bxe_softc *
 if (asserted  ATTN_HARD_WIRED_MASK) {
 if (asserted  ATTN_NIG_FOR_FUNC) {
 
-BXE_PHY_LOCK(sc);
-
+   bxe_acquire_phy_lock(sc);
 /* save nig interrupt mask */
 nig_mask = REG_RD(sc, nig_int_mask_addr);
 
@@ -7581,7 +7573,7 @@ bxe_attn_int_asserted(struct 

svn commit: r283760 - stable/8/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Fri May 29 23:33:49 2015
New Revision: 283760
URL: https://svnweb.freebsd.org/changeset/base/283760

Log:
  MFC r283274
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/bxe_stats.c
  stable/8/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Fri May 29 23:28:55 2015(r283759)
+++ stable/8/sys/dev/bxe/bxe.c  Fri May 29 23:33:49 2015(r283760)
@@ -27,7 +27,7 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
-#define BXE_DRIVER_VERSION 1.78.78
+#define BXE_DRIVER_VERSION 1.78.79
 
 #include bxe.h
 #include ecore_sp.h
@@ -483,6 +483,8 @@ static const struct {
 4, STATS_FLAGS_FUNC, rx_pkts},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, rx_tpa_pkts},
+{ STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, rx_jumbo_sge_pkts},
 { STATS_OFFSET32(rx_soft_errors),
 4, STATS_FLAGS_FUNC, rx_soft_errors},
 { STATS_OFFSET32(rx_hw_csum_errors),
@@ -594,6 +596,8 @@ static const struct {
 4, rx_pkts},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, rx_tpa_pkts},
+{ Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, rx_jumbo_sge_pkts},
 { Q_STATS_OFFSET32(rx_soft_errors),
 4, rx_soft_errors},
 { Q_STATS_OFFSET32(rx_hw_csum_errors),
@@ -3477,6 +3481,7 @@ bxe_rxeof(struct bxe_softc*sc,
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
+fp-eth_q_stats.rx_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -6860,42 +6865,40 @@ bxe_alloc_fp_buffers(struct bxe_softc *s
 fp-rx_cq_prod = cqe_ring_prod;
 fp-eth_q_stats.rx_calls = fp-eth_q_stats.rx_pkts = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-max_agg_queues = MAX_AGG_QS(sc);
+max_agg_queues = MAX_AGG_QS(sc);
 
-fp-tpa_enable = TRUE;
+fp-tpa_enable = TRUE;
 
-/* fill the TPA pool */
-for (j = 0; j  max_agg_queues; j++) {
-rc = bxe_alloc_rx_tpa_mbuf(fp, j);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
+/* fill the TPA pool */
+for (j = 0; j  max_agg_queues; j++) {
+rc = bxe_alloc_rx_tpa_mbuf(fp, j);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
   i, j);
-fp-tpa_enable = FALSE;
-goto bxe_alloc_fp_buffers_error;
-}
-
-fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+fp-tpa_enable = FALSE;
+goto bxe_alloc_fp_buffers_error;
 }
 
-if (fp-tpa_enable) {
-/* fill the RX SGE chain */
-ring_prod = 0;
-for (j = 0; j  RX_SGE_USABLE; j++) {
-rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
-  i, ring_prod);
-fp-tpa_enable = FALSE;
-ring_prod = 0;
-goto bxe_alloc_fp_buffers_error;
-}
+fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+}
 
-ring_prod = RX_SGE_NEXT(ring_prod);
+if (fp-tpa_enable) {
+/* fill the RX SGE chain */
+ring_prod = 0;
+for (j = 0; j  RX_SGE_USABLE; j++) {
+rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
+  i, ring_prod);
+fp-tpa_enable = FALSE;
+ring_prod = 0;
+goto bxe_alloc_fp_buffers_error;
 }
 
-fp-rx_sge_prod = ring_prod;
+ring_prod = RX_SGE_NEXT(ring_prod);
 }
+
+fp-rx_sge_prod = ring_prod;
 }
 }
 
@@ -11779,28 +11782,26 @@ bxe_pf_rx_q_prep(struct bxe_softc   
 uint16_t sge_sz = 0;
 uint16_t tpa_agg_size = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-pause-sge_th_lo = SGE_TH_LO(sc);
-pause-sge_th_hi = SGE_TH_HI(sc);
+pause-sge_th_lo = SGE_TH_LO(sc);
+pause-sge_th_hi = SGE_TH_HI(sc);
 
-/* validate SGE ring has enough to cross high threshold */
-if (sc-dropless_fc 
+/* validate SGE ring has enough to cross high threshold */
+if (sc-dropless_fc 
 (pause-sge_th_hi + FW_PREFETCH_CNT) 
  

svn commit: r283757 - stable/9/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Fri May 29 22:33:06 2015
New Revision: 283757
URL: https://svnweb.freebsd.org/changeset/base/283757

Log:
  MFC r283274
  
  Submitted by: gary.zambr...@qlogic.com
  Approved by:davi...@freebsd.org

Modified:
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/bxe_stats.c
  stable/9/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Fri May 29 22:27:48 2015(r283756)
+++ stable/9/sys/dev/bxe/bxe.c  Fri May 29 22:33:06 2015(r283757)
@@ -27,7 +27,7 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
-#define BXE_DRIVER_VERSION 1.78.78
+#define BXE_DRIVER_VERSION 1.78.79
 
 #include bxe.h
 #include ecore_sp.h
@@ -483,6 +483,8 @@ static const struct {
 4, STATS_FLAGS_FUNC, rx_pkts},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, rx_tpa_pkts},
+{ STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, rx_jumbo_sge_pkts},
 { STATS_OFFSET32(rx_soft_errors),
 4, STATS_FLAGS_FUNC, rx_soft_errors},
 { STATS_OFFSET32(rx_hw_csum_errors),
@@ -594,6 +596,8 @@ static const struct {
 4, rx_pkts},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, rx_tpa_pkts},
+{ Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, rx_jumbo_sge_pkts},
 { Q_STATS_OFFSET32(rx_soft_errors),
 4, rx_soft_errors},
 { Q_STATS_OFFSET32(rx_hw_csum_errors),
@@ -3477,6 +3481,7 @@ bxe_rxeof(struct bxe_softc*sc,
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
+fp-eth_q_stats.rx_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -6860,42 +6865,40 @@ bxe_alloc_fp_buffers(struct bxe_softc *s
 fp-rx_cq_prod = cqe_ring_prod;
 fp-eth_q_stats.rx_calls = fp-eth_q_stats.rx_pkts = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-max_agg_queues = MAX_AGG_QS(sc);
+max_agg_queues = MAX_AGG_QS(sc);
 
-fp-tpa_enable = TRUE;
+fp-tpa_enable = TRUE;
 
-/* fill the TPA pool */
-for (j = 0; j  max_agg_queues; j++) {
-rc = bxe_alloc_rx_tpa_mbuf(fp, j);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
+/* fill the TPA pool */
+for (j = 0; j  max_agg_queues; j++) {
+rc = bxe_alloc_rx_tpa_mbuf(fp, j);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
   i, j);
-fp-tpa_enable = FALSE;
-goto bxe_alloc_fp_buffers_error;
-}
-
-fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+fp-tpa_enable = FALSE;
+goto bxe_alloc_fp_buffers_error;
 }
 
-if (fp-tpa_enable) {
-/* fill the RX SGE chain */
-ring_prod = 0;
-for (j = 0; j  RX_SGE_USABLE; j++) {
-rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
-  i, ring_prod);
-fp-tpa_enable = FALSE;
-ring_prod = 0;
-goto bxe_alloc_fp_buffers_error;
-}
+fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+}
 
-ring_prod = RX_SGE_NEXT(ring_prod);
+if (fp-tpa_enable) {
+/* fill the RX SGE chain */
+ring_prod = 0;
+for (j = 0; j  RX_SGE_USABLE; j++) {
+rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
+  i, ring_prod);
+fp-tpa_enable = FALSE;
+ring_prod = 0;
+goto bxe_alloc_fp_buffers_error;
 }
 
-fp-rx_sge_prod = ring_prod;
+ring_prod = RX_SGE_NEXT(ring_prod);
 }
+
+fp-rx_sge_prod = ring_prod;
 }
 }
 
@@ -11779,28 +11782,26 @@ bxe_pf_rx_q_prep(struct bxe_softc   
 uint16_t sge_sz = 0;
 uint16_t tpa_agg_size = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-pause-sge_th_lo = SGE_TH_LO(sc);
-pause-sge_th_hi = SGE_TH_HI(sc);
+pause-sge_th_lo = SGE_TH_LO(sc);
+pause-sge_th_hi = SGE_TH_HI(sc);
 
-/* validate SGE ring has enough to cross high threshold */
-if (sc-dropless_fc 
+/* validate SGE ring has enough to cross high threshold */
+if (sc-dropless_fc 
 

svn commit: r283759 - stable/8/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Fri May 29 23:28:55 2015
New Revision: 283759
URL: https://svnweb.freebsd.org/changeset/base/283759

Log:
  MFC r283269
  
  Submitted by: gary.zambr...@qlogic.com
  Approved by:davi...@freebsd.org

Modified:
  stable/8/sys/dev/bxe/bxe.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Fri May 29 23:02:12 2015(r283758)
+++ stable/8/sys/dev/bxe/bxe.c  Fri May 29 23:28:55 2015(r283759)
@@ -3111,7 +3111,7 @@ static inline void
 bxe_update_sge_prod(struct bxe_softc  *sc,
 struct bxe_fastpath   *fp,
 uint16_t  sge_len,
-struct eth_end_agg_rx_cqe *cqe)
+union eth_sgl_or_raw_data *cqe)
 {
 uint16_t last_max, last_elem, first_elem;
 uint16_t delta = 0;
@@ -3124,17 +3124,17 @@ bxe_update_sge_prod(struct bxe_softc
 /* first mark all used pages */
 for (i = 0; i  sge_len; i++) {
 BIT_VEC64_CLEAR_BIT(fp-sge_mask,
-RX_SGE(le16toh(cqe-sgl_or_raw_data.sgl[i])));
+RX_SGE(le16toh(cqe-sgl[i])));
 }
 
 BLOGD(sc, DBG_LRO,
   fp[%02d] fp_cqe-sgl[%d] = %d\n,
   fp-index, sge_len - 1,
-  le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+  le16toh(cqe-sgl[sge_len - 1]));
 
 /* assume that the last SGE index is the biggest */
 bxe_update_last_max_sge(fp,
-le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+le16toh(cqe-sgl[sge_len - 1]));
 
 last_max = RX_SGE(fp-last_max_sge);
 last_elem = last_max  BIT_VEC64_ELEM_SHIFT;
@@ -3250,6 +3250,53 @@ bxe_tpa_stop_exit:
 }
 
 static uint8_t
+bxe_service_rxsgl(
+ struct bxe_fastpath *fp,
+ uint16_t len,
+ uint16_t lenonbd,
+ struct mbuf *m,
+ struct eth_fast_path_rx_cqe *cqe_fp)
+{
+struct mbuf *m_frag;
+uint16_t frags, frag_len;
+uint16_t sge_idx = 0;
+uint16_t j;
+uint8_t i, rc = 0;
+uint32_t frag_size;
+
+/* adjust the mbuf */
+m-m_len = lenonbd;
+
+frag_size =  len - lenonbd;
+frags = SGE_PAGE_ALIGN(frag_size)  SGE_PAGE_SHIFT;
+
+for (i = 0, j = 0; i  frags; i += PAGES_PER_SGE, j++) {
+sge_idx = RX_SGE(le16toh(cqe_fp-sgl_or_raw_data.sgl[j]));
+
+m_frag = fp-rx_sge_mbuf_chain[sge_idx].m;
+frag_len = min(frag_size, (uint32_t)(SGE_PAGE_SIZE));
+m_frag-m_len = frag_len;
+
+   /* allocate a new mbuf for the SGE */
+rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx);
+if (rc) {
+/* Leave all remaining SGEs in the ring! */
+return (rc);
+}
+fp-eth_q_stats.mbuf_alloc_sge--;
+
+/* concatenate the fragment to the head mbuf */
+m_cat(m, m_frag);
+
+frag_size -= frag_len;
+}
+
+bxe_update_sge_prod(fp-sc, fp, frags, cqe_fp-sgl_or_raw_data);
+
+return rc;
+}
+
+static uint8_t
 bxe_rxeof(struct bxe_softc*sc,
   struct bxe_fastpath *fp)
 {
@@ -3289,7 +3336,7 @@ bxe_rxeof(struct bxe_softc*sc,
 struct eth_fast_path_rx_cqe *cqe_fp;
 uint8_t cqe_fp_flags;
 enum eth_rx_cqe_type cqe_fp_type;
-uint16_t len, pad;
+uint16_t len, lenonbd,  pad;
 struct mbuf *m = NULL;
 
 comp_ring_cons = RCQ(sw_cq_cons);
@@ -3304,7 +3351,7 @@ bxe_rxeof(struct bxe_softc*sc,
 BLOGD(sc, DBG_RX,
   fp[%02d] Rx hw_cq_cons=%d hw_sw_cons=%d 
   BD prod=%d cons=%d CQE type=0x%x err=0x%x 
-  status=0x%x rss_hash=0x%x vlan=0x%x len=%u\n,
+  status=0x%x rss_hash=0x%x vlan=0x%x len=%u lenonbd=%u\n,
   fp-index,
   hw_cq_cons,
   sw_cq_cons,
@@ -3315,7 +3362,8 @@ bxe_rxeof(struct bxe_softc*sc,
   cqe_fp-status_flags,
   le32toh(cqe_fp-rss_hash_result),
   le16toh(cqe_fp-vlan_tag),
-  le16toh(cqe_fp-pkt_len_or_gro_seg_len));
+  le16toh(cqe_fp-pkt_len_or_gro_seg_len),
+  le16toh(cqe_fp-len_on_bd));
 
 /* is this a slowpath msg? */
 if (__predict_false(CQE_TYPE_SLOW(cqe_fp_type))) {
@@ -3362,7 +3410,7 @@ bxe_rxeof(struct bxe_softc*sc,
 bxe_tpa_stop(sc, fp, tpa_info, queue, pages,
  cqe-end_agg_cqe, comp_ring_cons);
 
-bxe_update_sge_prod(sc, fp, pages, cqe-end_agg_cqe);
+bxe_update_sge_prod(sc, fp, pages, 
cqe-end_agg_cqe.sgl_or_raw_data);
 
 goto next_cqe;
 }
@@ -3378,6 +3426,7 @@ bxe_rxeof(struct bxe_softc*sc,
 }
 
 len = le16toh(cqe_fp-pkt_len_or_gro_seg_len);
+lenonbd = le16toh(cqe_fp-len_on_bd);
 pad = 

svn commit: r283756 - stable/9/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Fri May 29 22:27:48 2015
New Revision: 283756
URL: https://svnweb.freebsd.org/changeset/base/283756

Log:
  MFC r283269
  
  Submitted by: gary.zambr...@qlogic.com
  Approved by:davi...@freebsd.org

Modified:
  stable/9/sys/dev/bxe/bxe.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Fri May 29 21:30:11 2015(r283755)
+++ stable/9/sys/dev/bxe/bxe.c  Fri May 29 22:27:48 2015(r283756)
@@ -3111,7 +3111,7 @@ static inline void
 bxe_update_sge_prod(struct bxe_softc  *sc,
 struct bxe_fastpath   *fp,
 uint16_t  sge_len,
-struct eth_end_agg_rx_cqe *cqe)
+union eth_sgl_or_raw_data *cqe)
 {
 uint16_t last_max, last_elem, first_elem;
 uint16_t delta = 0;
@@ -3124,17 +3124,17 @@ bxe_update_sge_prod(struct bxe_softc
 /* first mark all used pages */
 for (i = 0; i  sge_len; i++) {
 BIT_VEC64_CLEAR_BIT(fp-sge_mask,
-RX_SGE(le16toh(cqe-sgl_or_raw_data.sgl[i])));
+RX_SGE(le16toh(cqe-sgl[i])));
 }
 
 BLOGD(sc, DBG_LRO,
   fp[%02d] fp_cqe-sgl[%d] = %d\n,
   fp-index, sge_len - 1,
-  le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+  le16toh(cqe-sgl[sge_len - 1]));
 
 /* assume that the last SGE index is the biggest */
 bxe_update_last_max_sge(fp,
-le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+le16toh(cqe-sgl[sge_len - 1]));
 
 last_max = RX_SGE(fp-last_max_sge);
 last_elem = last_max  BIT_VEC64_ELEM_SHIFT;
@@ -3250,6 +3250,53 @@ bxe_tpa_stop_exit:
 }
 
 static uint8_t
+bxe_service_rxsgl(
+ struct bxe_fastpath *fp,
+ uint16_t len,
+ uint16_t lenonbd,
+ struct mbuf *m,
+ struct eth_fast_path_rx_cqe *cqe_fp)
+{
+struct mbuf *m_frag;
+uint16_t frags, frag_len;
+uint16_t sge_idx = 0;
+uint16_t j;
+uint8_t i, rc = 0;
+uint32_t frag_size;
+
+/* adjust the mbuf */
+m-m_len = lenonbd;
+
+frag_size =  len - lenonbd;
+frags = SGE_PAGE_ALIGN(frag_size)  SGE_PAGE_SHIFT;
+
+for (i = 0, j = 0; i  frags; i += PAGES_PER_SGE, j++) {
+sge_idx = RX_SGE(le16toh(cqe_fp-sgl_or_raw_data.sgl[j]));
+
+m_frag = fp-rx_sge_mbuf_chain[sge_idx].m;
+frag_len = min(frag_size, (uint32_t)(SGE_PAGE_SIZE));
+m_frag-m_len = frag_len;
+
+   /* allocate a new mbuf for the SGE */
+rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx);
+if (rc) {
+/* Leave all remaining SGEs in the ring! */
+return (rc);
+}
+fp-eth_q_stats.mbuf_alloc_sge--;
+
+/* concatenate the fragment to the head mbuf */
+m_cat(m, m_frag);
+
+frag_size -= frag_len;
+}
+
+bxe_update_sge_prod(fp-sc, fp, frags, cqe_fp-sgl_or_raw_data);
+
+return rc;
+}
+
+static uint8_t
 bxe_rxeof(struct bxe_softc*sc,
   struct bxe_fastpath *fp)
 {
@@ -3289,7 +3336,7 @@ bxe_rxeof(struct bxe_softc*sc,
 struct eth_fast_path_rx_cqe *cqe_fp;
 uint8_t cqe_fp_flags;
 enum eth_rx_cqe_type cqe_fp_type;
-uint16_t len, pad;
+uint16_t len, lenonbd,  pad;
 struct mbuf *m = NULL;
 
 comp_ring_cons = RCQ(sw_cq_cons);
@@ -3304,7 +3351,7 @@ bxe_rxeof(struct bxe_softc*sc,
 BLOGD(sc, DBG_RX,
   fp[%02d] Rx hw_cq_cons=%d hw_sw_cons=%d 
   BD prod=%d cons=%d CQE type=0x%x err=0x%x 
-  status=0x%x rss_hash=0x%x vlan=0x%x len=%u\n,
+  status=0x%x rss_hash=0x%x vlan=0x%x len=%u lenonbd=%u\n,
   fp-index,
   hw_cq_cons,
   sw_cq_cons,
@@ -3315,7 +3362,8 @@ bxe_rxeof(struct bxe_softc*sc,
   cqe_fp-status_flags,
   le32toh(cqe_fp-rss_hash_result),
   le16toh(cqe_fp-vlan_tag),
-  le16toh(cqe_fp-pkt_len_or_gro_seg_len));
+  le16toh(cqe_fp-pkt_len_or_gro_seg_len),
+  le16toh(cqe_fp-len_on_bd));
 
 /* is this a slowpath msg? */
 if (__predict_false(CQE_TYPE_SLOW(cqe_fp_type))) {
@@ -3362,7 +3410,7 @@ bxe_rxeof(struct bxe_softc*sc,
 bxe_tpa_stop(sc, fp, tpa_info, queue, pages,
  cqe-end_agg_cqe, comp_ring_cons);
 
-bxe_update_sge_prod(sc, fp, pages, cqe-end_agg_cqe);
+bxe_update_sge_prod(sc, fp, pages, 
cqe-end_agg_cqe.sgl_or_raw_data);
 
 goto next_cqe;
 }
@@ -3378,6 +3426,7 @@ bxe_rxeof(struct bxe_softc*sc,
 }
 
 len = le16toh(cqe_fp-pkt_len_or_gro_seg_len);
+lenonbd = le16toh(cqe_fp-len_on_bd);
 pad = 

svn commit: r283761 - stable/7/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Fri May 29 23:37:27 2015
New Revision: 283761
URL: https://svnweb.freebsd.org/changeset/base/283761

Log:
  MFC r283269
  
  Submitted by: gary.zambr...@qlogic.com

Modified:
  stable/7/sys/dev/bxe/bxe.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Fri May 29 23:33:49 2015(r283760)
+++ stable/7/sys/dev/bxe/bxe.c  Fri May 29 23:37:27 2015(r283761)
@@ -3111,7 +3111,7 @@ static inline void
 bxe_update_sge_prod(struct bxe_softc  *sc,
 struct bxe_fastpath   *fp,
 uint16_t  sge_len,
-struct eth_end_agg_rx_cqe *cqe)
+union eth_sgl_or_raw_data *cqe)
 {
 uint16_t last_max, last_elem, first_elem;
 uint16_t delta = 0;
@@ -3124,17 +3124,17 @@ bxe_update_sge_prod(struct bxe_softc
 /* first mark all used pages */
 for (i = 0; i  sge_len; i++) {
 BIT_VEC64_CLEAR_BIT(fp-sge_mask,
-RX_SGE(le16toh(cqe-sgl_or_raw_data.sgl[i])));
+RX_SGE(le16toh(cqe-sgl[i])));
 }
 
 BLOGD(sc, DBG_LRO,
   fp[%02d] fp_cqe-sgl[%d] = %d\n,
   fp-index, sge_len - 1,
-  le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+  le16toh(cqe-sgl[sge_len - 1]));
 
 /* assume that the last SGE index is the biggest */
 bxe_update_last_max_sge(fp,
-le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+le16toh(cqe-sgl[sge_len - 1]));
 
 last_max = RX_SGE(fp-last_max_sge);
 last_elem = last_max  BIT_VEC64_ELEM_SHIFT;
@@ -3250,6 +3250,53 @@ bxe_tpa_stop_exit:
 }
 
 static uint8_t
+bxe_service_rxsgl(
+ struct bxe_fastpath *fp,
+ uint16_t len,
+ uint16_t lenonbd,
+ struct mbuf *m,
+ struct eth_fast_path_rx_cqe *cqe_fp)
+{
+struct mbuf *m_frag;
+uint16_t frags, frag_len;
+uint16_t sge_idx = 0;
+uint16_t j;
+uint8_t i, rc = 0;
+uint32_t frag_size;
+
+/* adjust the mbuf */
+m-m_len = lenonbd;
+
+frag_size =  len - lenonbd;
+frags = SGE_PAGE_ALIGN(frag_size)  SGE_PAGE_SHIFT;
+
+for (i = 0, j = 0; i  frags; i += PAGES_PER_SGE, j++) {
+sge_idx = RX_SGE(le16toh(cqe_fp-sgl_or_raw_data.sgl[j]));
+
+m_frag = fp-rx_sge_mbuf_chain[sge_idx].m;
+frag_len = min(frag_size, (uint32_t)(SGE_PAGE_SIZE));
+m_frag-m_len = frag_len;
+
+   /* allocate a new mbuf for the SGE */
+rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx);
+if (rc) {
+/* Leave all remaining SGEs in the ring! */
+return (rc);
+}
+fp-eth_q_stats.mbuf_alloc_sge--;
+
+/* concatenate the fragment to the head mbuf */
+m_cat(m, m_frag);
+
+frag_size -= frag_len;
+}
+
+bxe_update_sge_prod(fp-sc, fp, frags, cqe_fp-sgl_or_raw_data);
+
+return rc;
+}
+
+static uint8_t
 bxe_rxeof(struct bxe_softc*sc,
   struct bxe_fastpath *fp)
 {
@@ -3289,7 +3336,7 @@ bxe_rxeof(struct bxe_softc*sc,
 struct eth_fast_path_rx_cqe *cqe_fp;
 uint8_t cqe_fp_flags;
 enum eth_rx_cqe_type cqe_fp_type;
-uint16_t len, pad;
+uint16_t len, lenonbd,  pad;
 struct mbuf *m = NULL;
 
 comp_ring_cons = RCQ(sw_cq_cons);
@@ -3304,7 +3351,7 @@ bxe_rxeof(struct bxe_softc*sc,
 BLOGD(sc, DBG_RX,
   fp[%02d] Rx hw_cq_cons=%d hw_sw_cons=%d 
   BD prod=%d cons=%d CQE type=0x%x err=0x%x 
-  status=0x%x rss_hash=0x%x vlan=0x%x len=%u\n,
+  status=0x%x rss_hash=0x%x vlan=0x%x len=%u lenonbd=%u\n,
   fp-index,
   hw_cq_cons,
   sw_cq_cons,
@@ -3315,7 +3362,8 @@ bxe_rxeof(struct bxe_softc*sc,
   cqe_fp-status_flags,
   le32toh(cqe_fp-rss_hash_result),
   le16toh(cqe_fp-vlan_tag),
-  le16toh(cqe_fp-pkt_len_or_gro_seg_len));
+  le16toh(cqe_fp-pkt_len_or_gro_seg_len),
+  le16toh(cqe_fp-len_on_bd));
 
 /* is this a slowpath msg? */
 if (__predict_false(CQE_TYPE_SLOW(cqe_fp_type))) {
@@ -3362,7 +3410,7 @@ bxe_rxeof(struct bxe_softc*sc,
 bxe_tpa_stop(sc, fp, tpa_info, queue, pages,
  cqe-end_agg_cqe, comp_ring_cons);
 
-bxe_update_sge_prod(sc, fp, pages, cqe-end_agg_cqe);
+bxe_update_sge_prod(sc, fp, pages, 
cqe-end_agg_cqe.sgl_or_raw_data);
 
 goto next_cqe;
 }
@@ -3378,6 +3426,7 @@ bxe_rxeof(struct bxe_softc*sc,
 }
 
 len = le16toh(cqe_fp-pkt_len_or_gro_seg_len);
+lenonbd = le16toh(cqe_fp-len_on_bd);
 pad = cqe_fp-placement_offset;
 
 m = rx_buf-m;
@@ -3424,6 +3473,12 @@ 

svn commit: r283763 - stable/7/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Sat May 30 04:49:19 2015
New Revision: 283763
URL: https://svnweb.freebsd.org/changeset/base/283763

Log:
  MFC r283274
  Add stat counters for Jumbo Frames using SGE ring.
  Also remove the checks for IFCAP_LRO in bxe_alloc_fp_buffers() and 
bxe_pf_rx_q_prep() since both TPA and Jumbo can use SGE ring.
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe_stats.c
  stable/7/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Sat May 30 01:04:45 2015(r283762)
+++ stable/7/sys/dev/bxe/bxe.c  Sat May 30 04:49:19 2015(r283763)
@@ -27,7 +27,7 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
-#define BXE_DRIVER_VERSION 1.78.78
+#define BXE_DRIVER_VERSION 1.78.79
 
 #include bxe.h
 #include ecore_sp.h
@@ -483,6 +483,8 @@ static const struct {
 4, STATS_FLAGS_FUNC, rx_pkts},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, rx_tpa_pkts},
+{ STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, rx_jumbo_sge_pkts},
 { STATS_OFFSET32(rx_soft_errors),
 4, STATS_FLAGS_FUNC, rx_soft_errors},
 { STATS_OFFSET32(rx_hw_csum_errors),
@@ -594,6 +596,8 @@ static const struct {
 4, rx_pkts},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, rx_tpa_pkts},
+{ Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, rx_jumbo_sge_pkts},
 { Q_STATS_OFFSET32(rx_soft_errors),
 4, rx_soft_errors},
 { Q_STATS_OFFSET32(rx_hw_csum_errors),
@@ -3477,6 +3481,7 @@ bxe_rxeof(struct bxe_softc*sc,
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
+fp-eth_q_stats.rx_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -6862,42 +6867,40 @@ bxe_alloc_fp_buffers(struct bxe_softc *s
 fp-rx_cq_prod = cqe_ring_prod;
 fp-eth_q_stats.rx_calls = fp-eth_q_stats.rx_pkts = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-max_agg_queues = MAX_AGG_QS(sc);
+max_agg_queues = MAX_AGG_QS(sc);
 
-fp-tpa_enable = TRUE;
+fp-tpa_enable = TRUE;
 
-/* fill the TPA pool */
-for (j = 0; j  max_agg_queues; j++) {
-rc = bxe_alloc_rx_tpa_mbuf(fp, j);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
+/* fill the TPA pool */
+for (j = 0; j  max_agg_queues; j++) {
+rc = bxe_alloc_rx_tpa_mbuf(fp, j);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
   i, j);
-fp-tpa_enable = FALSE;
-goto bxe_alloc_fp_buffers_error;
-}
-
-fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+fp-tpa_enable = FALSE;
+goto bxe_alloc_fp_buffers_error;
 }
 
-if (fp-tpa_enable) {
-/* fill the RX SGE chain */
-ring_prod = 0;
-for (j = 0; j  RX_SGE_USABLE; j++) {
-rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
-  i, ring_prod);
-fp-tpa_enable = FALSE;
-ring_prod = 0;
-goto bxe_alloc_fp_buffers_error;
-}
+fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+}
 
-ring_prod = RX_SGE_NEXT(ring_prod);
+if (fp-tpa_enable) {
+/* fill the RX SGE chain */
+ring_prod = 0;
+for (j = 0; j  RX_SGE_USABLE; j++) {
+rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
+  i, ring_prod);
+fp-tpa_enable = FALSE;
+ring_prod = 0;
+goto bxe_alloc_fp_buffers_error;
 }
 
-fp-rx_sge_prod = ring_prod;
+ring_prod = RX_SGE_NEXT(ring_prod);
 }
+
+fp-rx_sge_prod = ring_prod;
 }
 }
 
@@ -11781,28 +11784,26 @@ bxe_pf_rx_q_prep(struct bxe_softc   
 uint16_t sge_sz = 0;
 uint16_t tpa_agg_size = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-pause-sge_th_lo = SGE_TH_LO(sc);
-pause-sge_th_hi = SGE_TH_HI(sc);
+pause-sge_th_lo = SGE_TH_LO(sc);
+pause-sge_th_hi = SGE_TH_HI(sc);
 
-/* validate SGE ring has enough to cross high threshold */
-if 

svn commit: r283752 - stable/10/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Fri May 29 20:00:02 2015
New Revision: 283752
URL: https://svnweb.freebsd.org/changeset/base/283752

Log:
  MFC r283269
  
  Submitted by:gary.zambr...@qlogic.com
  Approved by:davi...@freebsd.org

Modified:
  stable/10/sys/dev/bxe/bxe.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Fri May 29 19:42:55 2015(r283751)
+++ stable/10/sys/dev/bxe/bxe.c Fri May 29 20:00:02 2015(r283752)
@@ -3111,7 +3111,7 @@ static inline void
 bxe_update_sge_prod(struct bxe_softc  *sc,
 struct bxe_fastpath   *fp,
 uint16_t  sge_len,
-struct eth_end_agg_rx_cqe *cqe)
+union eth_sgl_or_raw_data *cqe)
 {
 uint16_t last_max, last_elem, first_elem;
 uint16_t delta = 0;
@@ -3124,17 +3124,17 @@ bxe_update_sge_prod(struct bxe_softc
 /* first mark all used pages */
 for (i = 0; i  sge_len; i++) {
 BIT_VEC64_CLEAR_BIT(fp-sge_mask,
-RX_SGE(le16toh(cqe-sgl_or_raw_data.sgl[i])));
+RX_SGE(le16toh(cqe-sgl[i])));
 }
 
 BLOGD(sc, DBG_LRO,
   fp[%02d] fp_cqe-sgl[%d] = %d\n,
   fp-index, sge_len - 1,
-  le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+  le16toh(cqe-sgl[sge_len - 1]));
 
 /* assume that the last SGE index is the biggest */
 bxe_update_last_max_sge(fp,
-le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+le16toh(cqe-sgl[sge_len - 1]));
 
 last_max = RX_SGE(fp-last_max_sge);
 last_elem = last_max  BIT_VEC64_ELEM_SHIFT;
@@ -3250,6 +3250,53 @@ bxe_tpa_stop_exit:
 }
 
 static uint8_t
+bxe_service_rxsgl(
+ struct bxe_fastpath *fp,
+ uint16_t len,
+ uint16_t lenonbd,
+ struct mbuf *m,
+ struct eth_fast_path_rx_cqe *cqe_fp)
+{
+struct mbuf *m_frag;
+uint16_t frags, frag_len;
+uint16_t sge_idx = 0;
+uint16_t j;
+uint8_t i, rc = 0;
+uint32_t frag_size;
+
+/* adjust the mbuf */
+m-m_len = lenonbd;
+
+frag_size =  len - lenonbd;
+frags = SGE_PAGE_ALIGN(frag_size)  SGE_PAGE_SHIFT;
+
+for (i = 0, j = 0; i  frags; i += PAGES_PER_SGE, j++) {
+sge_idx = RX_SGE(le16toh(cqe_fp-sgl_or_raw_data.sgl[j]));
+
+m_frag = fp-rx_sge_mbuf_chain[sge_idx].m;
+frag_len = min(frag_size, (uint32_t)(SGE_PAGE_SIZE));
+m_frag-m_len = frag_len;
+
+   /* allocate a new mbuf for the SGE */
+rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx);
+if (rc) {
+/* Leave all remaining SGEs in the ring! */
+return (rc);
+}
+fp-eth_q_stats.mbuf_alloc_sge--;
+
+/* concatenate the fragment to the head mbuf */
+m_cat(m, m_frag);
+
+frag_size -= frag_len;
+}
+
+bxe_update_sge_prod(fp-sc, fp, frags, cqe_fp-sgl_or_raw_data);
+
+return rc;
+}
+
+static uint8_t
 bxe_rxeof(struct bxe_softc*sc,
   struct bxe_fastpath *fp)
 {
@@ -3289,7 +3336,7 @@ bxe_rxeof(struct bxe_softc*sc,
 struct eth_fast_path_rx_cqe *cqe_fp;
 uint8_t cqe_fp_flags;
 enum eth_rx_cqe_type cqe_fp_type;
-uint16_t len, pad;
+uint16_t len, lenonbd,  pad;
 struct mbuf *m = NULL;
 
 comp_ring_cons = RCQ(sw_cq_cons);
@@ -3304,7 +3351,7 @@ bxe_rxeof(struct bxe_softc*sc,
 BLOGD(sc, DBG_RX,
   fp[%02d] Rx hw_cq_cons=%d hw_sw_cons=%d 
   BD prod=%d cons=%d CQE type=0x%x err=0x%x 
-  status=0x%x rss_hash=0x%x vlan=0x%x len=%u\n,
+  status=0x%x rss_hash=0x%x vlan=0x%x len=%u lenonbd=%u\n,
   fp-index,
   hw_cq_cons,
   sw_cq_cons,
@@ -3315,7 +3362,8 @@ bxe_rxeof(struct bxe_softc*sc,
   cqe_fp-status_flags,
   le32toh(cqe_fp-rss_hash_result),
   le16toh(cqe_fp-vlan_tag),
-  le16toh(cqe_fp-pkt_len_or_gro_seg_len));
+  le16toh(cqe_fp-pkt_len_or_gro_seg_len),
+  le16toh(cqe_fp-len_on_bd));
 
 /* is this a slowpath msg? */
 if (__predict_false(CQE_TYPE_SLOW(cqe_fp_type))) {
@@ -3362,7 +3410,7 @@ bxe_rxeof(struct bxe_softc*sc,
 bxe_tpa_stop(sc, fp, tpa_info, queue, pages,
  cqe-end_agg_cqe, comp_ring_cons);
 
-bxe_update_sge_prod(sc, fp, pages, cqe-end_agg_cqe);
+bxe_update_sge_prod(sc, fp, pages, 
cqe-end_agg_cqe.sgl_or_raw_data);
 
 goto next_cqe;
 }
@@ -3378,6 +3426,7 @@ bxe_rxeof(struct bxe_softc*sc,
 }
 
 len = le16toh(cqe_fp-pkt_len_or_gro_seg_len);
+lenonbd = le16toh(cqe_fp-len_on_bd);
 pad = cqe_fp-placement_offset;
 
 m = 

svn commit: r283755 - stable/10/sys/dev/bxe

2015-05-29 Thread David C Somayajulu
Author: davidcs
Date: Fri May 29 21:30:11 2015
New Revision: 283755
URL: https://svnweb.freebsd.org/changeset/base/283755

Log:
  MFC r283274
  
  Submitted by: gary.zambr...@qlogic.com
  Approved by:davi...@freebsd.org

Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe_stats.c
  stable/10/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Fri May 29 20:50:41 2015(r283754)
+++ stable/10/sys/dev/bxe/bxe.c Fri May 29 21:30:11 2015(r283755)
@@ -27,7 +27,7 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
-#define BXE_DRIVER_VERSION 1.78.78
+#define BXE_DRIVER_VERSION 1.78.79
 
 #include bxe.h
 #include ecore_sp.h
@@ -483,6 +483,8 @@ static const struct {
 4, STATS_FLAGS_FUNC, rx_pkts},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, rx_tpa_pkts},
+{ STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, rx_jumbo_sge_pkts},
 { STATS_OFFSET32(rx_soft_errors),
 4, STATS_FLAGS_FUNC, rx_soft_errors},
 { STATS_OFFSET32(rx_hw_csum_errors),
@@ -594,6 +596,8 @@ static const struct {
 4, rx_pkts},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, rx_tpa_pkts},
+{ Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, rx_jumbo_sge_pkts},
 { Q_STATS_OFFSET32(rx_soft_errors),
 4, rx_soft_errors},
 { Q_STATS_OFFSET32(rx_hw_csum_errors),
@@ -3477,6 +3481,7 @@ bxe_rxeof(struct bxe_softc*sc,
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
+fp-eth_q_stats.rx_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -6851,42 +6856,40 @@ bxe_alloc_fp_buffers(struct bxe_softc *s
 fp-rx_cq_prod = cqe_ring_prod;
 fp-eth_q_stats.rx_calls = fp-eth_q_stats.rx_pkts = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-max_agg_queues = MAX_AGG_QS(sc);
+max_agg_queues = MAX_AGG_QS(sc);
 
-fp-tpa_enable = TRUE;
+fp-tpa_enable = TRUE;
 
-/* fill the TPA pool */
-for (j = 0; j  max_agg_queues; j++) {
-rc = bxe_alloc_rx_tpa_mbuf(fp, j);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
+/* fill the TPA pool */
+for (j = 0; j  max_agg_queues; j++) {
+rc = bxe_alloc_rx_tpa_mbuf(fp, j);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
   i, j);
-fp-tpa_enable = FALSE;
-goto bxe_alloc_fp_buffers_error;
-}
-
-fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+fp-tpa_enable = FALSE;
+goto bxe_alloc_fp_buffers_error;
 }
 
-if (fp-tpa_enable) {
-/* fill the RX SGE chain */
-ring_prod = 0;
-for (j = 0; j  RX_SGE_USABLE; j++) {
-rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
-  i, ring_prod);
-fp-tpa_enable = FALSE;
-ring_prod = 0;
-goto bxe_alloc_fp_buffers_error;
-}
+fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+}
 
-ring_prod = RX_SGE_NEXT(ring_prod);
+if (fp-tpa_enable) {
+/* fill the RX SGE chain */
+ring_prod = 0;
+for (j = 0; j  RX_SGE_USABLE; j++) {
+rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
+  i, ring_prod);
+fp-tpa_enable = FALSE;
+ring_prod = 0;
+goto bxe_alloc_fp_buffers_error;
 }
 
-fp-rx_sge_prod = ring_prod;
+ring_prod = RX_SGE_NEXT(ring_prod);
 }
+
+fp-rx_sge_prod = ring_prod;
 }
 }
 
@@ -11770,28 +11773,26 @@ bxe_pf_rx_q_prep(struct bxe_softc   
 uint16_t sge_sz = 0;
 uint16_t tpa_agg_size = 0;
 
-if (sc-ifnet-if_capenable  IFCAP_LRO) {
-pause-sge_th_lo = SGE_TH_LO(sc);
-pause-sge_th_hi = SGE_TH_HI(sc);
+pause-sge_th_lo = SGE_TH_LO(sc);
+pause-sge_th_hi = SGE_TH_HI(sc);
 
-/* validate SGE ring has enough to cross high threshold */
-if (sc-dropless_fc 
+/* validate SGE ring has enough to cross high threshold */
+if (sc-dropless_fc 
 (pause-sge_th_hi + FW_PREFETCH_CNT) 

svn commit: r283269 - head/sys/dev/bxe

2015-05-21 Thread David C Somayajulu
Author: davidcs
Date: Thu May 21 20:47:19 2015
New Revision: 283269
URL: https://svnweb.freebsd.org/changeset/base/283269

Log:
  Limit the size of the posted receive buffers in Rx Rings to MJUMPAGESIZE. 
Previously for jumbo MTUs, the rx ring buffers were
   MTU + any required pad. Now when this size greater than MJUMPAGESIZE, the 
packet is spanned across multiple buffers and the
  mbufs are stiched together.
  
  Submitted by:gary.zambr...@qlogic.com
  Approved by:davi...@freebsd.org

Modified:
  head/sys/dev/bxe/bxe.c

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Thu May 21 20:43:02 2015(r283268)
+++ head/sys/dev/bxe/bxe.c  Thu May 21 20:47:19 2015(r283269)
@@ -3100,7 +3100,7 @@ static inline void
 bxe_update_sge_prod(struct bxe_softc  *sc,
 struct bxe_fastpath   *fp,
 uint16_t  sge_len,
-struct eth_end_agg_rx_cqe *cqe)
+union eth_sgl_or_raw_data *cqe)
 {
 uint16_t last_max, last_elem, first_elem;
 uint16_t delta = 0;
@@ -3113,17 +3113,17 @@ bxe_update_sge_prod(struct bxe_softc
 /* first mark all used pages */
 for (i = 0; i  sge_len; i++) {
 BIT_VEC64_CLEAR_BIT(fp-sge_mask,
-RX_SGE(le16toh(cqe-sgl_or_raw_data.sgl[i])));
+RX_SGE(le16toh(cqe-sgl[i])));
 }
 
 BLOGD(sc, DBG_LRO,
   fp[%02d] fp_cqe-sgl[%d] = %d\n,
   fp-index, sge_len - 1,
-  le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+  le16toh(cqe-sgl[sge_len - 1]));
 
 /* assume that the last SGE index is the biggest */
 bxe_update_last_max_sge(fp,
-le16toh(cqe-sgl_or_raw_data.sgl[sge_len - 1]));
+le16toh(cqe-sgl[sge_len - 1]));
 
 last_max = RX_SGE(fp-last_max_sge);
 last_elem = last_max  BIT_VEC64_ELEM_SHIFT;
@@ -3239,6 +3239,53 @@ bxe_tpa_stop_exit:
 }
 
 static uint8_t
+bxe_service_rxsgl(
+ struct bxe_fastpath *fp,
+ uint16_t len,
+ uint16_t lenonbd,
+ struct mbuf *m,
+ struct eth_fast_path_rx_cqe *cqe_fp)
+{
+struct mbuf *m_frag;
+uint16_t frags, frag_len;
+uint16_t sge_idx = 0;
+uint16_t j;
+uint8_t i, rc = 0;
+uint32_t frag_size;
+
+/* adjust the mbuf */
+m-m_len = lenonbd;
+
+frag_size =  len - lenonbd;
+frags = SGE_PAGE_ALIGN(frag_size)  SGE_PAGE_SHIFT;
+
+for (i = 0, j = 0; i  frags; i += PAGES_PER_SGE, j++) {
+sge_idx = RX_SGE(le16toh(cqe_fp-sgl_or_raw_data.sgl[j]));
+
+m_frag = fp-rx_sge_mbuf_chain[sge_idx].m;
+frag_len = min(frag_size, (uint32_t)(SGE_PAGE_SIZE));
+m_frag-m_len = frag_len;
+
+   /* allocate a new mbuf for the SGE */
+rc = bxe_alloc_rx_sge_mbuf(fp, sge_idx);
+if (rc) {
+/* Leave all remaining SGEs in the ring! */
+return (rc);
+}
+fp-eth_q_stats.mbuf_alloc_sge--;
+
+/* concatenate the fragment to the head mbuf */
+m_cat(m, m_frag);
+
+frag_size -= frag_len;
+}
+
+bxe_update_sge_prod(fp-sc, fp, frags, cqe_fp-sgl_or_raw_data);
+
+return rc;
+}
+
+static uint8_t
 bxe_rxeof(struct bxe_softc*sc,
   struct bxe_fastpath *fp)
 {
@@ -3278,7 +3325,7 @@ bxe_rxeof(struct bxe_softc*sc,
 struct eth_fast_path_rx_cqe *cqe_fp;
 uint8_t cqe_fp_flags;
 enum eth_rx_cqe_type cqe_fp_type;
-uint16_t len, pad;
+uint16_t len, lenonbd,  pad;
 struct mbuf *m = NULL;
 
 comp_ring_cons = RCQ(sw_cq_cons);
@@ -3293,7 +3340,7 @@ bxe_rxeof(struct bxe_softc*sc,
 BLOGD(sc, DBG_RX,
   fp[%02d] Rx hw_cq_cons=%d hw_sw_cons=%d 
   BD prod=%d cons=%d CQE type=0x%x err=0x%x 
-  status=0x%x rss_hash=0x%x vlan=0x%x len=%u\n,
+  status=0x%x rss_hash=0x%x vlan=0x%x len=%u lenonbd=%u\n,
   fp-index,
   hw_cq_cons,
   sw_cq_cons,
@@ -3304,7 +3351,8 @@ bxe_rxeof(struct bxe_softc*sc,
   cqe_fp-status_flags,
   le32toh(cqe_fp-rss_hash_result),
   le16toh(cqe_fp-vlan_tag),
-  le16toh(cqe_fp-pkt_len_or_gro_seg_len));
+  le16toh(cqe_fp-pkt_len_or_gro_seg_len),
+  le16toh(cqe_fp-len_on_bd));
 
 /* is this a slowpath msg? */
 if (__predict_false(CQE_TYPE_SLOW(cqe_fp_type))) {
@@ -3351,7 +3399,7 @@ bxe_rxeof(struct bxe_softc*sc,
 bxe_tpa_stop(sc, fp, tpa_info, queue, pages,
  cqe-end_agg_cqe, comp_ring_cons);
 
-bxe_update_sge_prod(sc, fp, pages, cqe-end_agg_cqe);
+bxe_update_sge_prod(sc, fp, pages, 
cqe-end_agg_cqe.sgl_or_raw_data);
 
 goto next_cqe;
 }
@@ -3367,6 +3415,7 @@ 

svn commit: r283274 - head/sys/dev/bxe

2015-05-21 Thread David C Somayajulu
Author: davidcs
Date: Fri May 22 01:44:07 2015
New Revision: 283274
URL: https://svnweb.freebsd.org/changeset/base/283274

Log:
  Add stat counters for Jumbo Frames using SGE ring.
  Also remove the checks for IFCAP_LRO in bxe_alloc_fp_buffers() and 
bxe_pf_rx_q_prep() since both TPA and Jumbo can use SGE ring.
  
  Submitted by:gary.zambr...@qlogic.com
  Approved by:davi...@freebsd.org
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe_stats.c
  head/sys/dev/bxe/bxe_stats.h

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Thu May 21 23:14:18 2015(r283273)
+++ head/sys/dev/bxe/bxe.c  Fri May 22 01:44:07 2015(r283274)
@@ -27,7 +27,7 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
-#define BXE_DRIVER_VERSION 1.78.78
+#define BXE_DRIVER_VERSION 1.78.79
 
 #include bxe.h
 #include ecore_sp.h
@@ -472,6 +472,8 @@ static const struct {
 4, STATS_FLAGS_FUNC, rx_pkts},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, rx_tpa_pkts},
+{ STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, rx_jumbo_sge_pkts},
 { STATS_OFFSET32(rx_soft_errors),
 4, STATS_FLAGS_FUNC, rx_soft_errors},
 { STATS_OFFSET32(rx_hw_csum_errors),
@@ -583,6 +585,8 @@ static const struct {
 4, rx_pkts},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, rx_tpa_pkts},
+{ Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
+4, rx_jumbo_sge_pkts},
 { Q_STATS_OFFSET32(rx_soft_errors),
 4, rx_soft_errors},
 { Q_STATS_OFFSET32(rx_hw_csum_errors),
@@ -3466,6 +3470,7 @@ bxe_rxeof(struct bxe_softc*sc,
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
+fp-eth_q_stats.rx_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -6844,42 +6849,40 @@ bxe_alloc_fp_buffers(struct bxe_softc *s
 fp-rx_cq_prod = cqe_ring_prod;
 fp-eth_q_stats.rx_calls = fp-eth_q_stats.rx_pkts = 0;
 
-if (if_getcapenable(sc-ifp)  IFCAP_LRO) {
-max_agg_queues = MAX_AGG_QS(sc);
+max_agg_queues = MAX_AGG_QS(sc);
 
-fp-tpa_enable = TRUE;
+fp-tpa_enable = TRUE;
 
-/* fill the TPA pool */
-for (j = 0; j  max_agg_queues; j++) {
-rc = bxe_alloc_rx_tpa_mbuf(fp, j);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
+/* fill the TPA pool */
+for (j = 0; j  max_agg_queues; j++) {
+rc = bxe_alloc_rx_tpa_mbuf(fp, j);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] TPA queue %d\n,
   i, j);
-fp-tpa_enable = FALSE;
-goto bxe_alloc_fp_buffers_error;
-}
-
-fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+fp-tpa_enable = FALSE;
+goto bxe_alloc_fp_buffers_error;
 }
 
-if (fp-tpa_enable) {
-/* fill the RX SGE chain */
-ring_prod = 0;
-for (j = 0; j  RX_SGE_USABLE; j++) {
-rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
-if (rc != 0) {
-BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
-  i, ring_prod);
-fp-tpa_enable = FALSE;
-ring_prod = 0;
-goto bxe_alloc_fp_buffers_error;
-}
+fp-rx_tpa_info[j].state = BXE_TPA_STATE_STOP;
+}
 
-ring_prod = RX_SGE_NEXT(ring_prod);
+if (fp-tpa_enable) {
+/* fill the RX SGE chain */
+ring_prod = 0;
+for (j = 0; j  RX_SGE_USABLE; j++) {
+rc = bxe_alloc_rx_sge_mbuf(fp, ring_prod);
+if (rc != 0) {
+BLOGE(sc, mbuf alloc fail for fp[%02d] SGE %d\n,
+  i, ring_prod);
+fp-tpa_enable = FALSE;
+ring_prod = 0;
+goto bxe_alloc_fp_buffers_error;
 }
 
-fp-rx_sge_prod = ring_prod;
+ring_prod = RX_SGE_NEXT(ring_prod);
 }
+
+fp-rx_sge_prod = ring_prod;
 }
 }
 
@@ -11763,28 +11766,26 @@ bxe_pf_rx_q_prep(struct bxe_softc   
 uint16_t sge_sz = 0;
 uint16_t tpa_agg_size = 0;
 
-if (if_getcapenable(sc-ifp)   IFCAP_LRO) {
-pause-sge_th_lo = SGE_TH_LO(sc);
-pause-sge_th_hi = SGE_TH_HI(sc);
+pause-sge_th_lo = SGE_TH_LO(sc);
+pause-sge_th_hi = SGE_TH_HI(sc);
 
-/* validate SGE ring has enough to cross high threshold */
-if (sc-dropless_fc 
+/* validate SGE 

svn commit: r284962 - stable/10/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 17:44:44 2015
New Revision: 284962
URL: https://svnweb.freebsd.org/changeset/base/284962

Log:
  MFC r284335
  
  PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases 
it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which 
can cause the PHY to use bogus values. Fixes intermittent link failures.
  
  bxe_ioctl() completes all functions within its context as opposed to a 
taskqueue earlier.
  
  bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the 
functionality within its context
  
  Submitted by: gary.zambr...@qlogic.com

Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe.h
  stable/10/sys/dev/bxe/ecore_reg.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jun 30 17:19:58 2015(r284961)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jun 30 17:44:44 2015(r284962)
@@ -737,7 +737,6 @@ static __noinline int bxe_nic_unload(str
  uint8_t  keep_link);
 
 static void bxe_handle_sp_tq(void *context, int pending);
-static void bxe_handle_rx_mode_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
 
@@ -1185,7 +1184,17 @@ bxe_release_hw_lock(struct bxe_softc *sc
 REG_WR(sc, hw_lock_control_reg, resource_bit);
 return (0);
 }
+static void bxe_acquire_phy_lock(struct bxe_softc *sc)
+{
+   BXE_PHY_LOCK(sc);
+   bxe_acquire_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+}
 
+static void bxe_release_phy_lock(struct bxe_softc *sc)
+{
+   bxe_release_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+   BXE_PHY_UNLOCK(sc);
+}
 /*
  * Per pf misc lock must be acquired before the per port mcp lock. Otherwise,
  * had we done things the other way around, if two pfs from the same port
@@ -4775,29 +4784,6 @@ bxe_handle_chip_tq(void *context,
 
 switch (work)
 {
-case CHIP_TQ_START:
-if ((sc-ifnet-if_flags  IFF_UP) 
-!(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* start the interface */
-BLOGD(sc, DBG_LOAD, Starting the interface...\n);
-BXE_CORE_LOCK(sc);
-bxe_init_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
-case CHIP_TQ_STOP:
-if (!(sc-ifnet-if_flags  IFF_UP) 
-(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* bring down the interface */
-BLOGD(sc, DBG_LOAD, Stopping the interface...\n);
-bxe_periodic_stop(sc);
-BXE_CORE_LOCK(sc);
-bxe_stop_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
 case CHIP_TQ_REINIT:
 if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
 /* restart the interface */
@@ -4867,21 +4853,22 @@ bxe_ioctl(struct ifnet *ifp,
 /* toggle the interface state up or down */
 BLOGD(sc, DBG_IOCTL, Received SIOCSIFFLAGS ioctl\n);
 
+   BXE_CORE_LOCK(sc);
 /* check if the interface is up */
 if (ifp-if_flags  IFF_UP) {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
 bxe_set_rx_mode(sc);
 } else {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_START);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_init_locked(sc);
 }
 } else {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_STOP);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   bxe_stop_locked(sc);
 }
 }
+   BXE_CORE_UNLOCK(sc);
 
 break;
 
@@ -4893,7 +4880,9 @@ bxe_ioctl(struct ifnet *ifp,
 /* check if the interface is up */
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
+   BXE_CORE_LOCK(sc);
 bxe_set_rx_mode(sc);
+   BXE_CORE_UNLOCK(sc); 
 }
 
 break;
@@ -5051,8 +5040,11 @@ bxe_ioctl(struct ifnet *ifp,
 if (reinit  (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
 BLOGD(sc, DBG_LOAD | DBG_IOCTL,
   Re-initializing hardware from IOCTL change\n);
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_REINIT);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   BXE_CORE_LOCK(sc);
+   bxe_stop_locked(sc);
+   bxe_init_locked(sc);
+   BXE_CORE_UNLOCK(sc);
 }
 
 return (error);
@@ -7494,8 +7486,7 @@ bxe_attn_int_asserted(struct bxe_softc *
 if (asserted  ATTN_HARD_WIRED_MASK) {
 if (asserted  ATTN_NIG_FOR_FUNC) {
 
-BXE_PHY_LOCK(sc);
-
+   bxe_acquire_phy_lock(sc);
 /* save nig interrupt 

svn commit: r284963 - stable/10/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 17:59:14 2015
New Revision: 284963
URL: https://svnweb.freebsd.org/changeset/base/284963

Log:
  MFC r284470
  In bxe_init_mcast_macs_list(): mc_mac-mac needs to point to the multicast 
mac address
  In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
  In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING
  
  Submitted by: gary.zambr...@qlogic.com

Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/ecore_sp.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jun 30 17:44:44 2015(r284962)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jun 30 17:59:14 2015(r284963)
@@ -12535,6 +12535,7 @@ bxe_init_mcast_macs_list(struct bxe_soft
 BLOGE(sc, Failed to allocate temp mcast list\n);
 return (-1);
 }
+bzero(mc_mac, (sizeof(*mc_mac) * mc_count));
 
 TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
 if (ifma-ifma_addr-sa_family != AF_LINK) {
@@ -12585,6 +12586,7 @@ bxe_set_mc_list(struct bxe_softc *sc)
 rc = ecore_config_mcast(sc, rparam, ECORE_MCAST_CMD_DEL);
 if (rc  0) {
 BLOGE(sc, Failed to clear multicast configuration: %d\n, rc);
+BXE_MCAST_UNLOCK(sc);
 return (rc);
 }
 

Modified: stable/10/sys/dev/bxe/ecore_sp.c
==
--- stable/10/sys/dev/bxe/ecore_sp.cTue Jun 30 17:44:44 2015
(r284962)
+++ stable/10/sys/dev/bxe/ecore_sp.cTue Jun 30 17:59:14 2015
(r284963)
@@ -474,7 +474,7 @@ static void __ecore_vlan_mac_h_exec_pend
o-head_exe_request = FALSE;
o-saved_ramrod_flags = 0;
rc = ecore_exe_queue_step(sc, o-exe_queue, ramrod_flags);
-   if (rc != ECORE_SUCCESS) {
+   if ((rc != ECORE_SUCCESS)  (rc != ECORE_PENDING)) {
ECORE_ERR(execution of pending commands failed with rc %d\n,
  rc);
 #ifdef ECORE_STOP_ON_ERROR
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284973 - stable/9

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:01:24 2015
New Revision: 284973
URL: https://svnweb.freebsd.org/changeset/base/284973

Log:
  MFC r284739
tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
  
  Submitted by: attilio@isilon.com

Modified:
Directory Properties:
  stable/9/   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284977 - stable/8/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:28:07 2015
New Revision: 284977
URL: https://svnweb.freebsd.org/changeset/base/284977

Log:
  MFC r284470
  In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
  In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING
  
  Submitted by: gary.zambr...@qlogic.com

Modified:
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/ecore_sp.c
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Tue Jun 30 20:24:23 2015(r284976)
+++ stable/8/sys/dev/bxe/bxe.c  Tue Jun 30 20:28:07 2015(r284977)
@@ -12544,6 +12544,7 @@ bxe_init_mcast_macs_list(struct bxe_soft
 BLOGE(sc, Failed to allocate temp mcast list\n);
 return (-1);
 }
+bzero(mc_mac, (sizeof(*mc_mac) * mc_count));
 
 TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
 if (ifma-ifma_addr-sa_family != AF_LINK) {
@@ -12594,6 +12595,7 @@ bxe_set_mc_list(struct bxe_softc *sc)
 rc = ecore_config_mcast(sc, rparam, ECORE_MCAST_CMD_DEL);
 if (rc  0) {
 BLOGE(sc, Failed to clear multicast configuration: %d\n, rc);
+BXE_MCAST_UNLOCK(sc);
 return (rc);
 }
 

Modified: stable/8/sys/dev/bxe/ecore_sp.c
==
--- stable/8/sys/dev/bxe/ecore_sp.c Tue Jun 30 20:24:23 2015
(r284976)
+++ stable/8/sys/dev/bxe/ecore_sp.c Tue Jun 30 20:28:07 2015
(r284977)
@@ -474,7 +474,7 @@ static void __ecore_vlan_mac_h_exec_pend
o-head_exe_request = FALSE;
o-saved_ramrod_flags = 0;
rc = ecore_exe_queue_step(sc, o-exe_queue, ramrod_flags);
-   if (rc != ECORE_SUCCESS) {
+   if ((rc != ECORE_SUCCESS)  (rc != ECORE_PENDING)) {
ECORE_ERR(execution of pending commands failed with rc %d\n,
  rc);
 #ifdef ECORE_STOP_ON_ERROR
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284979 - stable/7/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:37:04 2015
New Revision: 284979
URL: https://svnweb.freebsd.org/changeset/base/284979

Log:
  MFC r284335
  
  PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases 
it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which 
can cause the PHY to use bogus values. Fixes intermittent link failures.
  
  bxe_ioctl() completes all functions within its context as opposed to a 
taskqueue earlier.
  
  bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the 
functionality within its context
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe.h
  stable/7/sys/dev/bxe/ecore_reg.h
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Tue Jun 30 20:31:00 2015(r284978)
+++ stable/7/sys/dev/bxe/bxe.c  Tue Jun 30 20:37:04 2015(r284979)
@@ -737,7 +737,6 @@ static __noinline int bxe_nic_unload(str
  uint8_t  keep_link);
 
 static void bxe_handle_sp_tq(void *context, int pending);
-static void bxe_handle_rx_mode_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
 
@@ -1185,7 +1184,17 @@ bxe_release_hw_lock(struct bxe_softc *sc
 REG_WR(sc, hw_lock_control_reg, resource_bit);
 return (0);
 }
+static void bxe_acquire_phy_lock(struct bxe_softc *sc)
+{
+   BXE_PHY_LOCK(sc);
+   bxe_acquire_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+}
 
+static void bxe_release_phy_lock(struct bxe_softc *sc)
+{
+   bxe_release_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+   BXE_PHY_UNLOCK(sc);
+}
 /*
  * Per pf misc lock must be acquired before the per port mcp lock. Otherwise,
  * had we done things the other way around, if two pfs from the same port
@@ -4775,29 +4784,6 @@ bxe_handle_chip_tq(void *context,
 
 switch (work)
 {
-case CHIP_TQ_START:
-if ((sc-ifnet-if_flags  IFF_UP) 
-!(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* start the interface */
-BLOGD(sc, DBG_LOAD, Starting the interface...\n);
-BXE_CORE_LOCK(sc);
-bxe_init_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
-case CHIP_TQ_STOP:
-if (!(sc-ifnet-if_flags  IFF_UP) 
-(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* bring down the interface */
-BLOGD(sc, DBG_LOAD, Stopping the interface...\n);
-bxe_periodic_stop(sc);
-BXE_CORE_LOCK(sc);
-bxe_stop_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
 case CHIP_TQ_REINIT:
 if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
 /* restart the interface */
@@ -4867,21 +4853,22 @@ bxe_ioctl(struct ifnet *ifp,
 /* toggle the interface state up or down */
 BLOGD(sc, DBG_IOCTL, Received SIOCSIFFLAGS ioctl\n);
 
+   BXE_CORE_LOCK(sc);
 /* check if the interface is up */
 if (ifp-if_flags  IFF_UP) {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
 bxe_set_rx_mode(sc);
 } else {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_START);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_init_locked(sc);
 }
 } else {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_STOP);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   bxe_stop_locked(sc);
 }
 }
+   BXE_CORE_UNLOCK(sc);
 
 break;
 
@@ -4893,7 +4880,9 @@ bxe_ioctl(struct ifnet *ifp,
 /* check if the interface is up */
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
+   BXE_CORE_LOCK(sc);
 bxe_set_rx_mode(sc);
+   BXE_CORE_UNLOCK(sc); 
 }
 
 break;
@@ -5051,8 +5040,11 @@ bxe_ioctl(struct ifnet *ifp,
 if (reinit  (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
 BLOGD(sc, DBG_LOAD | DBG_IOCTL,
   Re-initializing hardware from IOCTL change\n);
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_REINIT);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   BXE_CORE_LOCK(sc);
+   bxe_stop_locked(sc);
+   bxe_init_locked(sc);
+   BXE_CORE_UNLOCK(sc);
 }
 
 return (error);
@@ -7505,8 +7497,7 @@ bxe_attn_int_asserted(struct bxe_softc *
 if (asserted  ATTN_HARD_WIRED_MASK) {
 if (asserted  ATTN_NIG_FOR_FUNC) {
 
-BXE_PHY_LOCK(sc);
-
+   bxe_acquire_phy_lock(sc);
 /* save nig interrupt 

svn commit: r284975 - stable/9/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:17:38 2015
New Revision: 284975
URL: https://svnweb.freebsd.org/changeset/base/284975

Log:
  MFC r284739
  tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
  
  Submitted by:attilio@isilon.com

Modified:
  stable/9/sys/dev/bxe/bxe.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Jun 30 20:11:48 2015(r284974)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Jun 30 20:17:38 2015(r284975)
@@ -6562,10 +6562,14 @@ bxe_free_fp_buffers(struct bxe_softc *sc
 
 #if __FreeBSD_version = 80
 if (fp-tx_br != NULL) {
-struct mbuf *m;
 /* just in case bxe_mq_flush() wasn't called */
-while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL) {
-m_freem(m);
+if (mtx_initialized(fp-tx_mtx)) {
+struct mbuf *m;
+
+BXE_FP_TX_LOCK(fp);
+while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL)
+m_freem(m);
+BXE_FP_TX_UNLOCK(fp);
 }
 buf_ring_free(fp-tx_br, M_DEVBUF);
 fp-tx_br = NULL;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284981 - stable/7/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:45:41 2015
New Revision: 284981
URL: https://svnweb.freebsd.org/changeset/base/284981

Log:
  MFC r284739
  tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
  
  Submitted by: attilio@isilon.com

Modified:
  stable/7/sys/dev/bxe/bxe.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Tue Jun 30 20:40:38 2015(r284980)
+++ stable/7/sys/dev/bxe/bxe.c  Tue Jun 30 20:45:41 2015(r284981)
@@ -6564,10 +6564,14 @@ bxe_free_fp_buffers(struct bxe_softc *sc
 
 #if __FreeBSD_version = 80
 if (fp-tx_br != NULL) {
-struct mbuf *m;
 /* just in case bxe_mq_flush() wasn't called */
-while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL) {
-m_freem(m);
+if (mtx_initialized(fp-tx_mtx)) {
+struct mbuf *m;
+
+BXE_FP_TX_LOCK(fp);
+while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL)
+m_freem(m);
+BXE_FP_TX_UNLOCK(fp);
 }
 buf_ring_free(fp-tx_br, M_DEVBUF);
 fp-tx_br = NULL;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284982 - in stable/10/sys: dev/qlxgbe modules/qlxgbe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:59:07 2015
New Revision: 284982
URL: https://svnweb.freebsd.org/changeset/base/284982

Log:
  MFC r284741
  
  Updated Copyright information
  Added support for the following:
   - iSCSI TLV (requires 64 Tx and 32 Rx rings
   - 9K receive buffers for jumbo frames (feature may be enabled/disabled)
   - builtin firmware, bootloader and minidump template
   - quick stats
   - async event handling for SFP insertion/removal and DCBX changes
   - Configuring DCBX and interrupt coalescing parameters

Added:
  stable/10/sys/dev/qlxgbe/ql_boot.c
 - copied unchanged from r284741, head/sys/dev/qlxgbe/ql_boot.c
  stable/10/sys/dev/qlxgbe/ql_fw.c
 - copied unchanged from r284741, head/sys/dev/qlxgbe/ql_fw.c
  stable/10/sys/dev/qlxgbe/ql_minidump.c
 - copied unchanged from r284741, head/sys/dev/qlxgbe/ql_minidump.c
Modified:
  stable/10/sys/dev/qlxgbe/ql_dbg.c
  stable/10/sys/dev/qlxgbe/ql_dbg.h
  stable/10/sys/dev/qlxgbe/ql_def.h
  stable/10/sys/dev/qlxgbe/ql_glbl.h
  stable/10/sys/dev/qlxgbe/ql_hw.c
  stable/10/sys/dev/qlxgbe/ql_hw.h
  stable/10/sys/dev/qlxgbe/ql_inline.h
  stable/10/sys/dev/qlxgbe/ql_ioctl.c
  stable/10/sys/dev/qlxgbe/ql_ioctl.h
  stable/10/sys/dev/qlxgbe/ql_isr.c
  stable/10/sys/dev/qlxgbe/ql_misc.c
  stable/10/sys/dev/qlxgbe/ql_os.c
  stable/10/sys/dev/qlxgbe/ql_os.h
  stable/10/sys/dev/qlxgbe/ql_reset.c
  stable/10/sys/dev/qlxgbe/ql_tmplt.h
  stable/10/sys/dev/qlxgbe/ql_ver.h
  stable/10/sys/modules/qlxgbe/Makefile
Directory Properties:
  stable/10/   (props changed)

Copied: stable/10/sys/dev/qlxgbe/ql_boot.c (from r284741, 
head/sys/dev/qlxgbe/ql_boot.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/sys/dev/qlxgbe/ql_boot.c  Tue Jun 30 20:59:07 2015
(r284982, copy of r284741, head/sys/dev/qlxgbe/ql_boot.c)
@@ -0,0 +1,10964 @@
+/*
+ * Copyright (c) 2012-2016 Qlogic Corporation
+ * All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *  2. 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.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * File: ql_boot.c
+ */
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include ql_os.h
+
+unsigned int ql83xx_bootloader_version_major = 5;
+unsigned int ql83xx_bootloader_version_minor = 2;
+unsigned int ql83xx_bootloader_version_sub = 7;
+unsigned char ql83xx_bootloader[] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x04, 0x00, 0x80, 0x82, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x21, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 

svn commit: r284972 - stable/9/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 19:59:19 2015
New Revision: 284972
URL: https://svnweb.freebsd.org/changeset/base/284972

Log:
  MFC r284470
  In bxe_init_mcast_macs_list(): mc_mac-mac needs to point to the multicast 
mac address
  In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
  In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/ecore_sp.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Jun 30 19:53:59 2015(r284971)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Jun 30 19:59:19 2015(r284972)
@@ -12544,6 +12544,7 @@ bxe_init_mcast_macs_list(struct bxe_soft
 BLOGE(sc, Failed to allocate temp mcast list\n);
 return (-1);
 }
+bzero(mc_mac, (sizeof(*mc_mac) * mc_count));
 
 TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
 if (ifma-ifma_addr-sa_family != AF_LINK) {
@@ -12594,6 +12595,7 @@ bxe_set_mc_list(struct bxe_softc *sc)
 rc = ecore_config_mcast(sc, rparam, ECORE_MCAST_CMD_DEL);
 if (rc  0) {
 BLOGE(sc, Failed to clear multicast configuration: %d\n, rc);
+BXE_MCAST_UNLOCK(sc);
 return (rc);
 }
 

Modified: stable/9/sys/dev/bxe/ecore_sp.c
==
--- stable/9/sys/dev/bxe/ecore_sp.c Tue Jun 30 19:53:59 2015
(r284971)
+++ stable/9/sys/dev/bxe/ecore_sp.c Tue Jun 30 19:59:19 2015
(r284972)
@@ -474,7 +474,7 @@ static void __ecore_vlan_mac_h_exec_pend
o-head_exe_request = FALSE;
o-saved_ramrod_flags = 0;
rc = ecore_exe_queue_step(sc, o-exe_queue, ramrod_flags);
-   if (rc != ECORE_SUCCESS) {
+   if ((rc != ECORE_SUCCESS)  (rc != ECORE_PENDING)) {
ECORE_ERR(execution of pending commands failed with rc %d\n,
  rc);
 #ifdef ECORE_STOP_ON_ERROR
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284974 - stable/9

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:11:48 2015
New Revision: 284974
URL: https://svnweb.freebsd.org/changeset/base/284974

Log:
  reverse r284973

Modified:
Directory Properties:
  stable/9/   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284978 - stable/8/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:31:00 2015
New Revision: 284978
URL: https://svnweb.freebsd.org/changeset/base/284978

Log:
  MFC r284739
tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
  
  Submitted by: attilio@isilon.com

Modified:
  stable/8/sys/dev/bxe/bxe.c
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Tue Jun 30 20:28:07 2015(r284977)
+++ stable/8/sys/dev/bxe/bxe.c  Tue Jun 30 20:31:00 2015(r284978)
@@ -6562,10 +6562,14 @@ bxe_free_fp_buffers(struct bxe_softc *sc
 
 #if __FreeBSD_version = 80
 if (fp-tx_br != NULL) {
-struct mbuf *m;
 /* just in case bxe_mq_flush() wasn't called */
-while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL) {
-m_freem(m);
+if (mtx_initialized(fp-tx_mtx)) {
+struct mbuf *m;
+
+BXE_FP_TX_LOCK(fp);
+while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL)
+m_freem(m);
+BXE_FP_TX_UNLOCK(fp);
 }
 buf_ring_free(fp-tx_br, M_DEVBUF);
 fp-tx_br = NULL;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284971 - stable/9/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 19:53:59 2015
New Revision: 284971
URL: https://svnweb.freebsd.org/changeset/base/284971

Log:
  MFC r284335
  
  PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases 
it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which 
can cause the PHY to use bogus values. Fixes intermittent link failures.
  
  bxe_ioctl() completes all functions within its context as opposed to a 
taskqueue earlier.
  
  bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the 
functionality within its context
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/bxe.h
  stable/9/sys/dev/bxe/ecore_reg.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Jun 30 19:53:26 2015(r284970)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Jun 30 19:53:59 2015(r284971)
@@ -737,7 +737,6 @@ static __noinline int bxe_nic_unload(str
  uint8_t  keep_link);
 
 static void bxe_handle_sp_tq(void *context, int pending);
-static void bxe_handle_rx_mode_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
 
@@ -1185,7 +1184,17 @@ bxe_release_hw_lock(struct bxe_softc *sc
 REG_WR(sc, hw_lock_control_reg, resource_bit);
 return (0);
 }
+static void bxe_acquire_phy_lock(struct bxe_softc *sc)
+{
+   BXE_PHY_LOCK(sc);
+   bxe_acquire_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+}
 
+static void bxe_release_phy_lock(struct bxe_softc *sc)
+{
+   bxe_release_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+   BXE_PHY_UNLOCK(sc);
+}
 /*
  * Per pf misc lock must be acquired before the per port mcp lock. Otherwise,
  * had we done things the other way around, if two pfs from the same port
@@ -4775,29 +4784,6 @@ bxe_handle_chip_tq(void *context,
 
 switch (work)
 {
-case CHIP_TQ_START:
-if ((sc-ifnet-if_flags  IFF_UP) 
-!(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* start the interface */
-BLOGD(sc, DBG_LOAD, Starting the interface...\n);
-BXE_CORE_LOCK(sc);
-bxe_init_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
-case CHIP_TQ_STOP:
-if (!(sc-ifnet-if_flags  IFF_UP) 
-(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* bring down the interface */
-BLOGD(sc, DBG_LOAD, Stopping the interface...\n);
-bxe_periodic_stop(sc);
-BXE_CORE_LOCK(sc);
-bxe_stop_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
 case CHIP_TQ_REINIT:
 if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
 /* restart the interface */
@@ -4867,21 +4853,22 @@ bxe_ioctl(struct ifnet *ifp,
 /* toggle the interface state up or down */
 BLOGD(sc, DBG_IOCTL, Received SIOCSIFFLAGS ioctl\n);
 
+   BXE_CORE_LOCK(sc);
 /* check if the interface is up */
 if (ifp-if_flags  IFF_UP) {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
 bxe_set_rx_mode(sc);
 } else {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_START);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_init_locked(sc);
 }
 } else {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_STOP);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   bxe_stop_locked(sc);
 }
 }
+   BXE_CORE_UNLOCK(sc);
 
 break;
 
@@ -4893,7 +4880,9 @@ bxe_ioctl(struct ifnet *ifp,
 /* check if the interface is up */
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
+   BXE_CORE_LOCK(sc);
 bxe_set_rx_mode(sc);
+   BXE_CORE_UNLOCK(sc); 
 }
 
 break;
@@ -5051,8 +5040,11 @@ bxe_ioctl(struct ifnet *ifp,
 if (reinit  (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
 BLOGD(sc, DBG_LOAD | DBG_IOCTL,
   Re-initializing hardware from IOCTL change\n);
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_REINIT);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   BXE_CORE_LOCK(sc);
+   bxe_stop_locked(sc);
+   bxe_init_locked(sc);
+   BXE_CORE_UNLOCK(sc);
 }
 
 return (error);
@@ -7503,8 +7495,7 @@ bxe_attn_int_asserted(struct bxe_softc *
 if (asserted  ATTN_HARD_WIRED_MASK) {
 if (asserted  ATTN_NIG_FOR_FUNC) {
 
-BXE_PHY_LOCK(sc);
-
+   

svn commit: r284976 - stable/8/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:24:23 2015
New Revision: 284976
URL: https://svnweb.freebsd.org/changeset/base/284976

Log:
  MFC r284335
  
  PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases 
it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which 
can cause the PHY to use bogus values. Fixes intermittent link failures.
  
  bxe_ioctl() completes all functions within its context as opposed to a 
taskqueue earlier.
  
  bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the 
functionality within its context
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/bxe.h
  stable/8/sys/dev/bxe/ecore_reg.h
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Tue Jun 30 20:17:38 2015(r284975)
+++ stable/8/sys/dev/bxe/bxe.c  Tue Jun 30 20:24:23 2015(r284976)
@@ -737,7 +737,6 @@ static __noinline int bxe_nic_unload(str
  uint8_t  keep_link);
 
 static void bxe_handle_sp_tq(void *context, int pending);
-static void bxe_handle_rx_mode_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
 
@@ -1185,7 +1184,17 @@ bxe_release_hw_lock(struct bxe_softc *sc
 REG_WR(sc, hw_lock_control_reg, resource_bit);
 return (0);
 }
+static void bxe_acquire_phy_lock(struct bxe_softc *sc)
+{
+   BXE_PHY_LOCK(sc);
+   bxe_acquire_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+}
 
+static void bxe_release_phy_lock(struct bxe_softc *sc)
+{
+   bxe_release_hw_lock(sc,HW_LOCK_RESOURCE_MDIO); 
+   BXE_PHY_UNLOCK(sc);
+}
 /*
  * Per pf misc lock must be acquired before the per port mcp lock. Otherwise,
  * had we done things the other way around, if two pfs from the same port
@@ -4775,29 +4784,6 @@ bxe_handle_chip_tq(void *context,
 
 switch (work)
 {
-case CHIP_TQ_START:
-if ((sc-ifnet-if_flags  IFF_UP) 
-!(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* start the interface */
-BLOGD(sc, DBG_LOAD, Starting the interface...\n);
-BXE_CORE_LOCK(sc);
-bxe_init_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
-case CHIP_TQ_STOP:
-if (!(sc-ifnet-if_flags  IFF_UP) 
-(sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
-/* bring down the interface */
-BLOGD(sc, DBG_LOAD, Stopping the interface...\n);
-bxe_periodic_stop(sc);
-BXE_CORE_LOCK(sc);
-bxe_stop_locked(sc);
-BXE_CORE_UNLOCK(sc);
-}
-break;
-
 case CHIP_TQ_REINIT:
 if (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING) {
 /* restart the interface */
@@ -4867,21 +4853,22 @@ bxe_ioctl(struct ifnet *ifp,
 /* toggle the interface state up or down */
 BLOGD(sc, DBG_IOCTL, Received SIOCSIFFLAGS ioctl\n);
 
+   BXE_CORE_LOCK(sc);
 /* check if the interface is up */
 if (ifp-if_flags  IFF_UP) {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
 bxe_set_rx_mode(sc);
 } else {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_START);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_init_locked(sc);
 }
 } else {
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_STOP);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   bxe_stop_locked(sc);
 }
 }
+   BXE_CORE_UNLOCK(sc);
 
 break;
 
@@ -4893,7 +4880,9 @@ bxe_ioctl(struct ifnet *ifp,
 /* check if the interface is up */
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
 /* set the receive mode flags */
+   BXE_CORE_LOCK(sc);
 bxe_set_rx_mode(sc);
+   BXE_CORE_UNLOCK(sc); 
 }
 
 break;
@@ -5051,8 +5040,11 @@ bxe_ioctl(struct ifnet *ifp,
 if (reinit  (sc-ifnet-if_drv_flags  IFF_DRV_RUNNING)) {
 BLOGD(sc, DBG_LOAD | DBG_IOCTL,
   Re-initializing hardware from IOCTL change\n);
-atomic_store_rel_long(sc-chip_tq_flags, CHIP_TQ_REINIT);
-taskqueue_enqueue(sc-chip_tq, sc-chip_tq_task);
+   bxe_periodic_stop(sc);
+   BXE_CORE_LOCK(sc);
+   bxe_stop_locked(sc);
+   bxe_init_locked(sc);
+   BXE_CORE_UNLOCK(sc);
 }
 
 return (error);
@@ -7503,8 +7495,7 @@ bxe_attn_int_asserted(struct bxe_softc *
 if (asserted  ATTN_HARD_WIRED_MASK) {
 if (asserted  ATTN_NIG_FOR_FUNC) {
 
-BXE_PHY_LOCK(sc);
-
+   

svn commit: r284980 - stable/7/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 20:40:38 2015
New Revision: 284980
URL: https://svnweb.freebsd.org/changeset/base/284980

Log:
  MFC r284470
  In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK()
  In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING
  
  Submitted by:gary.zambr...@qlogic.com

Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/ecore_sp.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Tue Jun 30 20:37:04 2015(r284979)
+++ stable/7/sys/dev/bxe/bxe.c  Tue Jun 30 20:40:38 2015(r284980)
@@ -12546,6 +12546,7 @@ bxe_init_mcast_macs_list(struct bxe_soft
 BLOGE(sc, Failed to allocate temp mcast list\n);
 return (-1);
 }
+bzero(mc_mac, (sizeof(*mc_mac) * mc_count));
 
 TAILQ_FOREACH(ifma, ifp-if_multiaddrs, ifma_link) {
 if (ifma-ifma_addr-sa_family != AF_LINK) {
@@ -12596,6 +12597,7 @@ bxe_set_mc_list(struct bxe_softc *sc)
 rc = ecore_config_mcast(sc, rparam, ECORE_MCAST_CMD_DEL);
 if (rc  0) {
 BLOGE(sc, Failed to clear multicast configuration: %d\n, rc);
+BXE_MCAST_UNLOCK(sc);
 return (rc);
 }
 

Modified: stable/7/sys/dev/bxe/ecore_sp.c
==
--- stable/7/sys/dev/bxe/ecore_sp.c Tue Jun 30 20:37:04 2015
(r284979)
+++ stable/7/sys/dev/bxe/ecore_sp.c Tue Jun 30 20:40:38 2015
(r284980)
@@ -474,7 +474,7 @@ static void __ecore_vlan_mac_h_exec_pend
o-head_exe_request = FALSE;
o-saved_ramrod_flags = 0;
rc = ecore_exe_queue_step(sc, o-exe_queue, ramrod_flags);
-   if (rc != ECORE_SUCCESS) {
+   if ((rc != ECORE_SUCCESS)  (rc != ECORE_PENDING)) {
ECORE_ERR(execution of pending commands failed with rc %d\n,
  rc);
 #ifdef ECORE_STOP_ON_ERROR
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284966 - stable/10/sys/dev/bxe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 18:58:33 2015
New Revision: 284966
URL: https://svnweb.freebsd.org/changeset/base/284966

Log:
  MFC r284739
  tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
  
  Submitted by:attilio@isilon.com

Modified:
  stable/10/sys/dev/bxe/bxe.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jun 30 18:53:42 2015(r284965)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jun 30 18:58:33 2015(r284966)
@@ -6553,10 +6553,14 @@ bxe_free_fp_buffers(struct bxe_softc *sc
 
 #if __FreeBSD_version = 80
 if (fp-tx_br != NULL) {
-struct mbuf *m;
 /* just in case bxe_mq_flush() wasn't called */
-while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL) {
-m_freem(m);
+if (mtx_initialized(fp-tx_mtx)) {
+struct mbuf *m;
+
+BXE_FP_TX_LOCK(fp);
+while ((m = buf_ring_dequeue_sc(fp-tx_br)) != NULL)
+m_freem(m);
+BXE_FP_TX_UNLOCK(fp);
 }
 buf_ring_free(fp-tx_br, M_DEVBUF);
 fp-tx_br = NULL;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r284983 - in stable/9/sys: dev/qlxgbe modules/qlxgbe

2015-06-30 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 30 21:19:27 2015
New Revision: 284983
URL: https://svnweb.freebsd.org/changeset/base/284983

Log:
  MFC r284741
  
  Updated Copyright information
  Added support for the following:
  - iSCSI TLV (requires 64 Tx and 32 Rx rings
  - 9K receive buffers for jumbo frames (feature may be enabled/disabled)
  - builtin firmware, bootloader and minidump template
  - quick stats
  - async event handling for SFP insertion/removal and DCBX changes
  - Configuring DCBX and interrupt coalescing parameters

Added:
  stable/9/sys/dev/qlxgbe/ql_boot.c
 - copied unchanged from r284741, head/sys/dev/qlxgbe/ql_boot.c
  stable/9/sys/dev/qlxgbe/ql_fw.c
 - copied unchanged from r284741, head/sys/dev/qlxgbe/ql_fw.c
  stable/9/sys/dev/qlxgbe/ql_minidump.c
 - copied unchanged from r284741, head/sys/dev/qlxgbe/ql_minidump.c
Modified:
  stable/9/sys/dev/qlxgbe/ql_dbg.c
  stable/9/sys/dev/qlxgbe/ql_dbg.h
  stable/9/sys/dev/qlxgbe/ql_def.h
  stable/9/sys/dev/qlxgbe/ql_glbl.h
  stable/9/sys/dev/qlxgbe/ql_hw.c
  stable/9/sys/dev/qlxgbe/ql_hw.h
  stable/9/sys/dev/qlxgbe/ql_inline.h
  stable/9/sys/dev/qlxgbe/ql_ioctl.c
  stable/9/sys/dev/qlxgbe/ql_ioctl.h
  stable/9/sys/dev/qlxgbe/ql_isr.c
  stable/9/sys/dev/qlxgbe/ql_misc.c
  stable/9/sys/dev/qlxgbe/ql_os.c
  stable/9/sys/dev/qlxgbe/ql_os.h
  stable/9/sys/dev/qlxgbe/ql_reset.c
  stable/9/sys/dev/qlxgbe/ql_tmplt.h
  stable/9/sys/dev/qlxgbe/ql_ver.h
  stable/9/sys/modules/qlxgbe/Makefile
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)
  stable/9/sys/modules/   (props changed)

Copied: stable/9/sys/dev/qlxgbe/ql_boot.c (from r284741, 
head/sys/dev/qlxgbe/ql_boot.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/sys/dev/qlxgbe/ql_boot.c   Tue Jun 30 21:19:27 2015
(r284983, copy of r284741, head/sys/dev/qlxgbe/ql_boot.c)
@@ -0,0 +1,10964 @@
+/*
+ * Copyright (c) 2012-2016 Qlogic Corporation
+ * All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *  2. 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.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * File: ql_boot.c
+ */
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
+#include ql_os.h
+
+unsigned int ql83xx_bootloader_version_major = 5;
+unsigned int ql83xx_bootloader_version_minor = 2;
+unsigned int ql83xx_bootloader_version_sub = 7;
+unsigned char ql83xx_bootloader[] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x04, 0x00, 0x80, 0x82, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x21, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 

svn commit: r285973 - head/sys/dev/bxe

2015-07-28 Thread David C Somayajulu
Author: davidcs
Date: Tue Jul 28 19:15:44 2015
New Revision: 285973
URL: https://svnweb.freebsd.org/changeset/base/285973

Log:
  - Avoid lock contention in the if_transmit callback by using trylock and
   enqueueing the frames when it fails. This way there is some latency
   removed from the transmitting path.
  - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
   enqueue the desired frames and return successful transmit. This way we
   avoid to return errors on transmit side and resulting in
   possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
   everytime we get the threshold ring hit, so this can be happening quite
   often.
  
  Submitted by: attilio@isilon.com
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe.h

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Tue Jul 28 18:41:28 2015(r285972)
+++ head/sys/dev/bxe/bxe.c  Tue Jul 28 19:15:44 2015(r285973)
@@ -5999,19 +5999,26 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 
 rc = tx_count = 0;
 
+BXE_FP_TX_LOCK_ASSERT(fp);
+
 if (!tx_br) {
 BLOGE(sc, Multiqueue TX and no buf_ring!\n);
 return (EINVAL);
 }
 
+if (!sc-link_vars.link_up ||
+(ifp-if_drv_flags 
+(IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) {
+rc = drbr_enqueue_drv(ifp, tx_br, m);
+goto bxe_tx_mq_start_locked_exit;
+}
+
 /* fetch the depth of the driver queue */
 depth = drbr_inuse_drv(ifp, tx_br);
 if (depth  fp-eth_q_stats.tx_max_drbr_queue_depth) {
 fp-eth_q_stats.tx_max_drbr_queue_depth = depth;
 }
 
-BXE_FP_TX_LOCK_ASSERT(fp);
-
 if (m == NULL) {
 /* no new work, check for pending frames */
 next = drbr_dequeue_drv(ifp, tx_br);
@@ -6103,26 +6110,11 @@ bxe_tx_mq_start(struct ifnet *ifp,
 
 fp = sc-fp[fp_index];
 
-if (!(if_getdrvflags(ifp)  IFF_DRV_RUNNING)) {
-BLOGW(sc, Interface not running, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-if (if_getdrvflags(ifp)  IFF_DRV_OACTIVE) {
-BLOGW(sc, Interface TX queue is full, ignoring transmit request\n);
-return (EBUSY);
-}
-
-if (!sc-link_vars.link_up) {
-BLOGW(sc, Interface link is down, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-/* XXX change to TRYLOCK here and if failed then schedule taskqueue */
-
-BXE_FP_TX_LOCK(fp);
-rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
-BXE_FP_TX_UNLOCK(fp);
+if (BXE_FP_TX_TRYLOCK(fp)) {
+rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
+BXE_FP_TX_UNLOCK(fp);
+} else
+rc = drbr_enqueue_drv(ifp, fp-tx_br, m);
 
 return (rc);
 }

Modified: head/sys/dev/bxe/bxe.h
==
--- head/sys/dev/bxe/bxe.h  Tue Jul 28 18:41:28 2015(r285972)
+++ head/sys/dev/bxe/bxe.h  Tue Jul 28 19:15:44 2015(r285973)
@@ -582,6 +582,7 @@ struct bxe_fastpath {
 #define BXE_FP_TX_LOCK(fp)mtx_lock(fp-tx_mtx)
 #define BXE_FP_TX_UNLOCK(fp)  mtx_unlock(fp-tx_mtx)
 #define BXE_FP_TX_LOCK_ASSERT(fp) mtx_assert(fp-tx_mtx, MA_OWNED)
+#define BXE_FP_TX_TRYLOCK(fp) mtx_trylock(fp-tx_mtx)
 
 #define BXE_FP_RX_LOCK(fp)mtx_lock(fp-rx_mtx)
 #define BXE_FP_RX_UNLOCK(fp)  mtx_unlock(fp-rx_mtx)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r286300 - stable/8/sys/dev/bxe

2015-08-04 Thread David C Somayajulu
Author: davidcs
Date: Wed Aug  5 02:08:42 2015
New Revision: 286300
URL: https://svnweb.freebsd.org/changeset/base/286300

Log:
  MFC r285973
  - Avoid lock contention in the if_transmit callback by using trylock and
   enqueueing the frames when it fails. This way there is some latency
   removed from the transmitting path.
  - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
   enqueue the desired frames and return successful transmit. This way we
   avoid to return errors on transmit side and resulting in
   possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
   everytime we get the threshold ring hit, so this can be happening quite
   often.
  
  Submitted by: attilio@isilon.com

Modified:
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/bxe.h
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Wed Aug  5 01:52:52 2015(r286299)
+++ stable/8/sys/dev/bxe/bxe.c  Wed Aug  5 02:08:42 2015(r286300)
@@ -6013,19 +6013,26 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 
 rc = tx_count = 0;
 
+BXE_FP_TX_LOCK_ASSERT(fp);
+
 if (!tx_br) {
 BLOGE(sc, Multiqueue TX and no buf_ring!\n);
 return (EINVAL);
 }
 
+if (!sc-link_vars.link_up ||
+(ifp-if_drv_flags 
+(IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) {
+rc = drbr_enqueue(ifp, tx_br, m);
+goto bxe_tx_mq_start_locked_exit;
+}
+
 /* fetch the depth of the driver queue */
 depth = drbr_inuse(ifp, tx_br);
 if (depth  fp-eth_q_stats.tx_max_drbr_queue_depth) {
 fp-eth_q_stats.tx_max_drbr_queue_depth = depth;
 }
 
-BXE_FP_TX_LOCK_ASSERT(fp);
-
 if (m == NULL) {
 /* no new work, check for pending frames */
 next = drbr_dequeue(ifp, tx_br);
@@ -6118,26 +6125,11 @@ bxe_tx_mq_start(struct ifnet *ifp,
 
 fp = sc-fp[fp_index];
 
-if (!(ifp-if_drv_flags  IFF_DRV_RUNNING)) {
-BLOGW(sc, Interface not running, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-if (ifp-if_drv_flags  IFF_DRV_OACTIVE) {
-BLOGW(sc, Interface TX queue is full, ignoring transmit request\n);
-return (EBUSY);
-}
-
-if (!sc-link_vars.link_up) {
-BLOGW(sc, Interface link is down, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-/* XXX change to TRYLOCK here and if failed then schedule taskqueue */
-
-BXE_FP_TX_LOCK(fp);
-rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
-BXE_FP_TX_UNLOCK(fp);
+if (BXE_FP_TX_TRYLOCK(fp)) {
+rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
+BXE_FP_TX_UNLOCK(fp);
+} else
+rc = drbr_enqueue(ifp, fp-tx_br, m);
 
 return (rc);
 }

Modified: stable/8/sys/dev/bxe/bxe.h
==
--- stable/8/sys/dev/bxe/bxe.h  Wed Aug  5 01:52:52 2015(r286299)
+++ stable/8/sys/dev/bxe/bxe.h  Wed Aug  5 02:08:42 2015(r286300)
@@ -582,6 +582,7 @@ struct bxe_fastpath {
 #define BXE_FP_TX_LOCK(fp)mtx_lock(fp-tx_mtx)
 #define BXE_FP_TX_UNLOCK(fp)  mtx_unlock(fp-tx_mtx)
 #define BXE_FP_TX_LOCK_ASSERT(fp) mtx_assert(fp-tx_mtx, MA_OWNED)
+#define BXE_FP_TX_TRYLOCK(fp) mtx_trylock(fp-tx_mtx)
 
 #define BXE_FP_RX_LOCK(fp)mtx_lock(fp-rx_mtx)
 #define BXE_FP_RX_UNLOCK(fp)  mtx_unlock(fp-rx_mtx)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r286302 - stable/9/sys/dev/bxe

2015-08-04 Thread David C Somayajulu
Author: davidcs
Date: Wed Aug  5 02:19:38 2015
New Revision: 286302
URL: https://svnweb.freebsd.org/changeset/base/286302

Log:
  MFC r285973
- Avoid lock contention in the if_transmit callback by using trylock and
 enqueueing the frames when it fails. This way there is some latency
 removed from the transmitting path.
- If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
 enqueue the desired frames and return successful transmit. This way we
 avoid to return errors on transmit side and resulting in
 possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
 everytime we get the threshold ring hit, so this can be happening quite
 often.
  
  Submitted by: attilio@isilon.com

Modified:
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/bxe.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Wed Aug  5 02:16:11 2015(r286301)
+++ stable/9/sys/dev/bxe/bxe.c  Wed Aug  5 02:19:38 2015(r286302)
@@ -6013,19 +6013,26 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 
 rc = tx_count = 0;
 
+BXE_FP_TX_LOCK_ASSERT(fp);
+
 if (!tx_br) {
 BLOGE(sc, Multiqueue TX and no buf_ring!\n);
 return (EINVAL);
 }
 
+if (!sc-link_vars.link_up ||
+(ifp-if_drv_flags 
+(IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) {
+rc = drbr_enqueue(ifp, tx_br, m);
+goto bxe_tx_mq_start_locked_exit;
+}
+
 /* fetch the depth of the driver queue */
 depth = drbr_inuse(ifp, tx_br);
 if (depth  fp-eth_q_stats.tx_max_drbr_queue_depth) {
 fp-eth_q_stats.tx_max_drbr_queue_depth = depth;
 }
 
-BXE_FP_TX_LOCK_ASSERT(fp);
-
 if (m == NULL) {
 /* no new work, check for pending frames */
 next = drbr_dequeue(ifp, tx_br);
@@ -6118,26 +6125,11 @@ bxe_tx_mq_start(struct ifnet *ifp,
 
 fp = sc-fp[fp_index];
 
-if (!(ifp-if_drv_flags  IFF_DRV_RUNNING)) {
-BLOGW(sc, Interface not running, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-if (ifp-if_drv_flags  IFF_DRV_OACTIVE) {
-BLOGW(sc, Interface TX queue is full, ignoring transmit request\n);
-return (EBUSY);
-}
-
-if (!sc-link_vars.link_up) {
-BLOGW(sc, Interface link is down, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-/* XXX change to TRYLOCK here and if failed then schedule taskqueue */
-
-BXE_FP_TX_LOCK(fp);
-rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
-BXE_FP_TX_UNLOCK(fp);
+if (BXE_FP_TX_TRYLOCK(fp)) {
+rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
+BXE_FP_TX_UNLOCK(fp);
+} else
+rc = drbr_enqueue(ifp, fp-tx_br, m);
 
 return (rc);
 }

Modified: stable/9/sys/dev/bxe/bxe.h
==
--- stable/9/sys/dev/bxe/bxe.h  Wed Aug  5 02:16:11 2015(r286301)
+++ stable/9/sys/dev/bxe/bxe.h  Wed Aug  5 02:19:38 2015(r286302)
@@ -582,6 +582,7 @@ struct bxe_fastpath {
 #define BXE_FP_TX_LOCK(fp)mtx_lock(fp-tx_mtx)
 #define BXE_FP_TX_UNLOCK(fp)  mtx_unlock(fp-tx_mtx)
 #define BXE_FP_TX_LOCK_ASSERT(fp) mtx_assert(fp-tx_mtx, MA_OWNED)
+#define BXE_FP_TX_TRYLOCK(fp) mtx_trylock(fp-tx_mtx)
 
 #define BXE_FP_RX_LOCK(fp)mtx_lock(fp-rx_mtx)
 #define BXE_FP_RX_UNLOCK(fp)  mtx_unlock(fp-rx_mtx)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r286301 - stable/7/sys/dev/bxe

2015-08-04 Thread David C Somayajulu
Author: davidcs
Date: Wed Aug  5 02:16:11 2015
New Revision: 286301
URL: https://svnweb.freebsd.org/changeset/base/286301

Log:
  MFC r285973
- Avoid lock contention in the if_transmit callback by using trylock and
 enqueueing the frames when it fails. This way there is some latency
 removed from the transmitting path.
- If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
 enqueue the desired frames and return successful transmit. This way we
 avoid to return errors on transmit side and resulting in
 possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
 everytime we get the threshold ring hit, so this can be happening quite
 often.
  
  Submitted by: attilio@isilon.com

Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe.h
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Wed Aug  5 02:08:42 2015(r286300)
+++ stable/7/sys/dev/bxe/bxe.c  Wed Aug  5 02:16:11 2015(r286301)
@@ -6015,19 +6015,26 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 
 rc = tx_count = 0;
 
+BXE_FP_TX_LOCK_ASSERT(fp);
+
 if (!tx_br) {
 BLOGE(sc, Multiqueue TX and no buf_ring!\n);
 return (EINVAL);
 }
 
+if (!sc-link_vars.link_up ||
+(ifp-if_drv_flags 
+(IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) {
+rc = drbr_enqueue_drv(ifp, tx_br, m);
+goto bxe_tx_mq_start_locked_exit;
+}
+
 /* fetch the depth of the driver queue */
 depth = drbr_inuse(ifp, tx_br);
 if (depth  fp-eth_q_stats.tx_max_drbr_queue_depth) {
 fp-eth_q_stats.tx_max_drbr_queue_depth = depth;
 }
 
-BXE_FP_TX_LOCK_ASSERT(fp);
-
 if (m == NULL) {
 /* no new work, check for pending frames */
 next = drbr_dequeue(ifp, tx_br);
@@ -6120,26 +6127,11 @@ bxe_tx_mq_start(struct ifnet *ifp,
 
 fp = sc-fp[fp_index];
 
-if (!(ifp-if_drv_flags  IFF_DRV_RUNNING)) {
-BLOGW(sc, Interface not running, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-if (ifp-if_drv_flags  IFF_DRV_OACTIVE) {
-BLOGW(sc, Interface TX queue is full, ignoring transmit request\n);
-return (EBUSY);
-}
-
-if (!sc-link_vars.link_up) {
-BLOGW(sc, Interface link is down, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-/* XXX change to TRYLOCK here and if failed then schedule taskqueue */
-
-BXE_FP_TX_LOCK(fp);
-rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
-BXE_FP_TX_UNLOCK(fp);
+if (BXE_FP_TX_TRYLOCK(fp)) {
+rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
+BXE_FP_TX_UNLOCK(fp);
+} else
+rc = drbr_enqueue_drv(ifp, fp-tx_br, m);
 
 return (rc);
 }

Modified: stable/7/sys/dev/bxe/bxe.h
==
--- stable/7/sys/dev/bxe/bxe.h  Wed Aug  5 02:08:42 2015(r286300)
+++ stable/7/sys/dev/bxe/bxe.h  Wed Aug  5 02:16:11 2015(r286301)
@@ -582,6 +582,7 @@ struct bxe_fastpath {
 #define BXE_FP_TX_LOCK(fp)mtx_lock(fp-tx_mtx)
 #define BXE_FP_TX_UNLOCK(fp)  mtx_unlock(fp-tx_mtx)
 #define BXE_FP_TX_LOCK_ASSERT(fp) mtx_assert(fp-tx_mtx, MA_OWNED)
+#define BXE_FP_TX_TRYLOCK(fp) mtx_trylock(fp-tx_mtx)
 
 #define BXE_FP_RX_LOCK(fp)mtx_lock(fp-rx_mtx)
 #define BXE_FP_RX_UNLOCK(fp)  mtx_unlock(fp-rx_mtx)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r286297 - stable/10/sys/dev/bxe

2015-08-04 Thread David C Somayajulu
Author: davidcs
Date: Wed Aug  5 00:00:06 2015
New Revision: 286297
URL: https://svnweb.freebsd.org/changeset/base/286297

Log:
  MFC r285973
- Avoid lock contention in the if_transmit callback by using trylock and
 enqueueing the frames when it fails. This way there is some latency
 removed from the transmitting path.
- If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just
 enqueue the desired frames and return successful transmit. This way we
 avoid to return errors on transmit side and resulting in
 possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set
 everytime we get the threshold ring hit, so this can be happening quite
 often.
  
  Submitted by: attilio@isilon.com

Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Aug  4 19:46:13 2015(r286296)
+++ stable/10/sys/dev/bxe/bxe.c Wed Aug  5 00:00:06 2015(r286297)
@@ -6005,19 +6005,26 @@ bxe_tx_mq_start_locked(struct bxe_softc 
 
 rc = tx_count = 0;
 
+BXE_FP_TX_LOCK_ASSERT(fp);
+
 if (!tx_br) {
 BLOGE(sc, Multiqueue TX and no buf_ring!\n);
 return (EINVAL);
 }
 
+if (!sc-link_vars.link_up ||
+(ifp-if_drv_flags 
+(IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) {
+rc = drbr_enqueue(ifp, tx_br, m);
+goto bxe_tx_mq_start_locked_exit;
+}
+
 /* fetch the depth of the driver queue */
 depth = drbr_inuse(ifp, tx_br);
 if (depth  fp-eth_q_stats.tx_max_drbr_queue_depth) {
 fp-eth_q_stats.tx_max_drbr_queue_depth = depth;
 }
 
-BXE_FP_TX_LOCK_ASSERT(fp);
-
 if (m == NULL) {
 /* no new work, check for pending frames */
 next = drbr_dequeue(ifp, tx_br);
@@ -6109,26 +6116,11 @@ bxe_tx_mq_start(struct ifnet *ifp,
 
 fp = sc-fp[fp_index];
 
-if (!(ifp-if_drv_flags  IFF_DRV_RUNNING)) {
-BLOGW(sc, Interface not running, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-if (ifp-if_drv_flags  IFF_DRV_OACTIVE) {
-BLOGW(sc, Interface TX queue is full, ignoring transmit request\n);
-return (EBUSY);
-}
-
-if (!sc-link_vars.link_up) {
-BLOGW(sc, Interface link is down, ignoring transmit request\n);
-return (ENETDOWN);
-}
-
-/* XXX change to TRYLOCK here and if failed then schedule taskqueue */
-
-BXE_FP_TX_LOCK(fp);
-rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
-BXE_FP_TX_UNLOCK(fp);
+if (BXE_FP_TX_TRYLOCK(fp)) {
+rc = bxe_tx_mq_start_locked(sc, ifp, fp, m);
+BXE_FP_TX_UNLOCK(fp);
+} else
+rc = drbr_enqueue(ifp, fp-tx_br, m);
 
 return (rc);
 }

Modified: stable/10/sys/dev/bxe/bxe.h
==
--- stable/10/sys/dev/bxe/bxe.h Tue Aug  4 19:46:13 2015(r286296)
+++ stable/10/sys/dev/bxe/bxe.h Wed Aug  5 00:00:06 2015(r286297)
@@ -582,6 +582,7 @@ struct bxe_fastpath {
 #define BXE_FP_TX_LOCK(fp)mtx_lock(fp-tx_mtx)
 #define BXE_FP_TX_UNLOCK(fp)  mtx_unlock(fp-tx_mtx)
 #define BXE_FP_TX_LOCK_ASSERT(fp) mtx_assert(fp-tx_mtx, MA_OWNED)
+#define BXE_FP_TX_TRYLOCK(fp) mtx_trylock(fp-tx_mtx)
 
 #define BXE_FP_RX_LOCK(fp)mtx_lock(fp-rx_mtx)
 #define BXE_FP_RX_UNLOCK(fp)  mtx_unlock(fp-rx_mtx)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r289635 - head/sys/dev/qlxgbe

2015-10-20 Thread David C Somayajulu
Author: davidcs
Date: Tue Oct 20 17:27:11 2015
New Revision: 289635
URL: https://svnweb.freebsd.org/changeset/base/289635

Log:
  ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE
  ql_os.c: removed unnecessary debug printf
  ql_ver.h: updated version number
  MFC after:5 days

Modified:
  head/sys/dev/qlxgbe/ql_hw.c
  head/sys/dev/qlxgbe/ql_os.c
  head/sys/dev/qlxgbe/ql_ver.h

Modified: head/sys/dev/qlxgbe/ql_hw.c
==
--- head/sys/dev/qlxgbe/ql_hw.c Tue Oct 20 16:10:46 2015(r289634)
+++ head/sys/dev/qlxgbe/ql_hw.c Tue Oct 20 17:27:11 2015(r289635)
@@ -387,6 +387,7 @@ ql_hw_add_sysctls(qla_host_t *ha)
"Minidump Utility can start minidump process");
 #ifdef QL_DBG
 
+   ha->err_inject = 0;
 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 OID_AUTO, "err_inject",
@@ -3057,7 +3058,7 @@ ql_hw_check_health(qla_host_t *ha)
val = READ_REG32(ha, Q8_FIRMWARE_HEARTBEAT);
 
if ((val != ha->hw.hbeat_value) &&
-   (!(QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE {
+   (!(QL_ERR_INJECT(ha, INJCT_HEARTBEAT_FAILURE {
ha->hw.hbeat_value = val;
return 0;
}

Modified: head/sys/dev/qlxgbe/ql_os.c
==
--- head/sys/dev/qlxgbe/ql_os.c Tue Oct 20 16:10:46 2015(r289634)
+++ head/sys/dev/qlxgbe/ql_os.c Tue Oct 20 17:27:11 2015(r289635)
@@ -289,8 +289,6 @@ qla_pci_attach(device_t dev)
int i;
uint32_t num_rcvq = 0;
 
-   QL_DPRINT2(ha, (dev, "%s: enter\n", __func__));
-
 if ((ha = device_get_softc(dev)) == NULL) {
 device_printf(dev, "cannot get softc\n");
 return (ENOMEM);

Modified: head/sys/dev/qlxgbe/ql_ver.h
==
--- head/sys/dev/qlxgbe/ql_ver.hTue Oct 20 16:10:46 2015
(r289634)
+++ head/sys/dev/qlxgbe/ql_ver.hTue Oct 20 17:27:11 2015
(r289635)
@@ -36,6 +36,6 @@
 
 #define QLA_VERSION_MAJOR  3
 #define QLA_VERSION_MINOR  10
-#define QLA_VERSION_BUILD   24
+#define QLA_VERSION_BUILD   25
 
 #endif /* #ifndef _QL_VER_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289199 - head/sys/dev/bxe

2015-10-12 Thread David C Somayajulu
Author: davidcs
Date: Mon Oct 12 20:21:17 2015
New Revision: 289199
URL: https://svnweb.freebsd.org/changeset/base/289199

Log:
  Add support for reading device temperature
  
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Mon Oct 12 18:53:37 2015(r289198)
+++ head/sys/dev/bxe/bxe.c  Mon Oct 12 20:21:17 2015(r289199)
@@ -16122,9 +16122,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r292617 - stable/9/sys/dev/qlxgbe

2015-12-22 Thread David C Somayajulu
Author: davidcs
Date: Tue Dec 22 19:41:40 2015
New Revision: 292617
URL: https://svnweb.freebsd.org/changeset/base/292617

Log:
  MFC r289635
  
ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE
ql_os.c: removed unnecessary debug printf
ql_ver.h: updated version number

Modified:
  stable/9/sys/dev/qlxgbe/ql_hw.c
  stable/9/sys/dev/qlxgbe/ql_os.c
  stable/9/sys/dev/qlxgbe/ql_ver.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/qlxgbe/ql_hw.c
==
--- stable/9/sys/dev/qlxgbe/ql_hw.c Tue Dec 22 19:40:34 2015
(r292616)
+++ stable/9/sys/dev/qlxgbe/ql_hw.c Tue Dec 22 19:41:40 2015
(r292617)
@@ -387,6 +387,7 @@ ql_hw_add_sysctls(qla_host_t *ha)
"Minidump Utility can start minidump process");
 #ifdef QL_DBG
 
+   ha->err_inject = 0;
 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 OID_AUTO, "err_inject",
@@ -3057,7 +3058,7 @@ ql_hw_check_health(qla_host_t *ha)
val = READ_REG32(ha, Q8_FIRMWARE_HEARTBEAT);
 
if ((val != ha->hw.hbeat_value) &&
-   (!(QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE {
+   (!(QL_ERR_INJECT(ha, INJCT_HEARTBEAT_FAILURE {
ha->hw.hbeat_value = val;
return 0;
}

Modified: stable/9/sys/dev/qlxgbe/ql_os.c
==
--- stable/9/sys/dev/qlxgbe/ql_os.c Tue Dec 22 19:40:34 2015
(r292616)
+++ stable/9/sys/dev/qlxgbe/ql_os.c Tue Dec 22 19:41:40 2015
(r292617)
@@ -289,8 +289,6 @@ qla_pci_attach(device_t dev)
int i;
uint32_t num_rcvq = 0;
 
-   QL_DPRINT2(ha, (dev, "%s: enter\n", __func__));
-
 if ((ha = device_get_softc(dev)) == NULL) {
 device_printf(dev, "cannot get softc\n");
 return (ENOMEM);

Modified: stable/9/sys/dev/qlxgbe/ql_ver.h
==
--- stable/9/sys/dev/qlxgbe/ql_ver.hTue Dec 22 19:40:34 2015
(r292616)
+++ stable/9/sys/dev/qlxgbe/ql_ver.hTue Dec 22 19:41:40 2015
(r292617)
@@ -36,6 +36,6 @@
 
 #define QLA_VERSION_MAJOR  3
 #define QLA_VERSION_MINOR  10
-#define QLA_VERSION_BUILD   24
+#define QLA_VERSION_BUILD   25
 
 #endif /* #ifndef _QL_VER_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r292639 - head/sys/dev/bxe

2015-12-22 Thread David C Somayajulu
Author: davidcs
Date: Wed Dec 23 03:19:12 2015
New Revision: 292639
URL: https://svnweb.freebsd.org/changeset/base/292639

Log:
  Add support for firmware dump (a.k.a grcdump)
  
  MFC after:5 days

Added:
  head/sys/dev/bxe/bxe_dump.h   (contents, props changed)
  head/sys/dev/bxe/bxe_ioctl.h   (contents, props changed)
Modified:
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe.h
  head/sys/dev/bxe/ecore_init.h

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Wed Dec 23 01:31:32 2015(r292638)
+++ head/sys/dev/bxe/bxe.c  Wed Dec 23 03:19:12 2015(r292639)
@@ -736,6 +736,8 @@ static __noinline int bxe_nic_unload(str
 static void bxe_handle_sp_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
+static int bxe_add_cdev(struct bxe_softc *sc);
+static void bxe_del_cdev(struct bxe_softc *sc);
 
 /* calculate crc32 on a buffer (NOTE: crc32_length MUST be aligned to 8) */
 uint32_t
@@ -4503,7 +4505,7 @@ bxe_nic_unload(struct bxe_softc *sc,
 sc->rx_mode = BXE_RX_MODE_NONE;
 /* XXX set rx mode ??? */
 
-if (IS_PF(sc)) {
+if (IS_PF(sc) && !sc->grcdump_done) {
 /* set ALWAYS_ALIVE bit in shmem */
 sc->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE;
 
@@ -4523,7 +4525,8 @@ bxe_nic_unload(struct bxe_softc *sc,
 ; /* bxe_vfpf_close_vf(sc); */
 } else if (unload_mode != UNLOAD_RECOVERY) {
 /* if this is a normal/close unload need to clean up chip */
-bxe_chip_cleanup(sc, unload_mode, keep_link);
+if (!sc->grcdump_done)
+bxe_chip_cleanup(sc, unload_mode, keep_link);
 } else {
 /* Send the UNLOAD_REQUEST to the MCP */
 bxe_send_unload_req(sc, unload_mode);
@@ -16276,6 +16279,12 @@ bxe_add_sysctls(struct bxe_softc *sc)
 CTLFLAG_RW, >debug,
 "debug logging mode");
 
+sc->trigger_grcdump = 0;
+SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump",
+CTLFLAG_RW, >trigger_grcdump, 0,
+"set by driver when a grcdump is needed");
+
+
 sc->rx_budget = bxe_rx_budget;
 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_budget",
 CTLFLAG_RW, >rx_budget, 0,
@@ -16404,8 +16413,20 @@ bxe_attach(device_t dev)
 return (ENXIO);
 }
 
+if (bxe_add_cdev(sc) != 0) {
+if (sc->ifp != NULL) {
+ether_ifdetach(sc->ifp);
+}
+ifmedia_removeall(>ifmedia);
+bxe_release_mutexes(sc);
+bxe_deallocate_bars(sc);
+pci_disable_busmaster(dev);
+return (ENXIO);
+}
+
 /* allocate device interrupts */
 if (bxe_interrupt_alloc(sc) != 0) {
+bxe_del_cdev(sc);
 if (sc->ifp != NULL) {
 ether_ifdetach(sc->ifp);
 }
@@ -16419,6 +16440,7 @@ bxe_attach(device_t dev)
 /* allocate ilt */
 if (bxe_alloc_ilt_mem(sc) != 0) {
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifp != NULL) {
 ether_ifdetach(sc->ifp);
 }
@@ -16433,6 +16455,7 @@ bxe_attach(device_t dev)
 if (bxe_alloc_hsi_mem(sc) != 0) {
 bxe_free_ilt_mem(sc);
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifp != NULL) {
 ether_ifdetach(sc->ifp);
 }
@@ -16504,6 +16527,8 @@ bxe_detach(device_t dev)
 return(EBUSY);
 }
 
+bxe_del_cdev(sc);
+
 /* stop the periodic callout */
 bxe_periodic_stop(sc);
 
@@ -18824,3 +18849,457 @@ ecore_storm_memset_struct(struct bxe_sof
 }
 }
 
+
+/*
+ * character device - ioctl interface definitions
+ */
+
+
+#include "bxe_dump.h"
+#include "bxe_ioctl.h"
+#include 
+
+static int bxe_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
+struct thread *td);
+
+static struct cdevsw bxe_cdevsw = {
+.d_version = D_VERSION,
+.d_ioctl = bxe_eioctl,
+.d_name = "bxecnic",
+};
+
+#define BXE_PATH(sc)(CHIP_IS_E1x(sc) ? 0 : (sc->pcie_func & 1))
+
+
+#define DUMP_ALL_PRESETS0x1FFF
+#define DUMP_MAX_PRESETS13
+#define IS_E1_REG(chips)((chips & DUMP_CHIP_E1) == DUMP_CHIP_E1)
+#define IS_E1H_REG(chips)   ((chips & DUMP_CHIP_E1H) == DUMP_CHIP_E1H)
+#define IS_E2_REG(chips)((chips & DUMP_CHIP_E2) == DUMP_CHIP_E2)
+#define IS_E3A0_REG(chips)  ((chips & DUMP_CHIP_E3A0) == DUMP_CHIP_E3A0)
+#define IS_E3B0_REG(chips)  ((chips & DUMP_CHIP_E3B0) == DUMP_CHIP_E3B0)
+
+#define IS_REG_IN_PRESET(presets, idx)  \
+((presets & (1 << (idx-1))) == (1 << (idx-1)))
+
+
+static int
+bxe_get_preset_regs_len(struct bxe_softc *sc, uint32_t preset)
+{
+if (CHIP_IS_E1(sc))
+return dump_num_registers[0][preset-1];
+else if (CHIP_IS_E1H(sc))
+return dump_num_registers[1][preset-1];
+else if (CHIP_IS_E2(sc))
+return dump_num_registers[2][preset-1];
+else if 

svn commit: r292638 - head/sys/dev/bxe

2015-12-22 Thread David C Somayajulu
Author: davidcs
Date: Wed Dec 23 01:31:32 2015
New Revision: 292638
URL: https://svnweb.freebsd.org/changeset/base/292638

Log:
  Check for packet_length is greater than 60 bytes as well as packet_length is
  greater than len_on_bd, before invoking the routine to handle jumbo over SGL
  (bxe_service_rxsgl()).
  Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) and
  erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts)
  
  Fix formatting in bxe_sysctl_state()
  
  MFC after:5 days

Modified:
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe_stats.c
  head/sys/dev/bxe/bxe_stats.h

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Tue Dec 22 23:21:06 2015(r292637)
+++ head/sys/dev/bxe/bxe.c  Wed Dec 23 01:31:32 2015(r292638)
@@ -472,6 +472,10 @@ static const struct {
 4, STATS_FLAGS_FUNC, "rx_pkts"},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"},
+{ STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, "rx_erroneous_jumbo_sge_pkts"},
+{ STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, STATS_FLAGS_FUNC, "rx_bxe_service_rxsgl"},
 { STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"},
 { STATS_OFFSET32(rx_soft_errors),
@@ -585,6 +589,10 @@ static const struct {
 4, "rx_pkts"},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, "rx_tpa_pkts"},
+{ Q_STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, "rx_erroneous_jumbo_sge_pkts"},
+{ Q_STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, "rx_bxe_service_rxsgl"},
 { Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, "rx_jumbo_sge_pkts"},
 { Q_STATS_OFFSET32(rx_soft_errors),
@@ -3475,11 +3483,14 @@ bxe_rxeof(struct bxe_softc*sc,
 m_adj(m, pad);
 m->m_pkthdr.len = m->m_len = len;
 
-if (len != lenonbd){
+if ((len > 60) && (len > lenonbd)) {
+fp->eth_q_stats.rx_bxe_service_rxsgl++;
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
 fp->eth_q_stats.rx_jumbo_sge_pkts++;
+} else if (lenonbd < len) {
+fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -16122,12 +16133,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
-   uint32_t  temp;
+uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
 
 BLOGI(sc, "... dumping driver state ...\n");
-   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
-   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
+temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);

Modified: head/sys/dev/bxe/bxe_stats.c
==
--- head/sys/dev/bxe/bxe_stats.cTue Dec 22 23:21:06 2015
(r292637)
+++ head/sys/dev/bxe/bxe_stats.cWed Dec 23 01:31:32 2015
(r292638)
@@ -1227,6 +1227,8 @@ bxe_drv_stats_update(struct bxe_softc *s
 UPDATE_ESTAT_QSTAT(rx_calls);
 UPDATE_ESTAT_QSTAT(rx_pkts);
 UPDATE_ESTAT_QSTAT(rx_tpa_pkts);
+UPDATE_ESTAT_QSTAT(rx_erroneous_jumbo_sge_pkts);
+UPDATE_ESTAT_QSTAT(rx_bxe_service_rxsgl);
 UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts);
 UPDATE_ESTAT_QSTAT(rx_soft_errors);
 UPDATE_ESTAT_QSTAT(rx_hw_csum_errors);

Modified: head/sys/dev/bxe/bxe_stats.h
==
--- head/sys/dev/bxe/bxe_stats.hTue Dec 22 23:21:06 2015
(r292637)
+++ head/sys/dev/bxe/bxe_stats.hWed Dec 23 01:31:32 2015
(r292638)
@@ -218,6 +218,8 @@ struct bxe_eth_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -319,6 +321,8 @@ struct bxe_eth_q_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -413,6 +417,8 @@ struct bxe_eth_q_stats_old {
 uint32_t rx_calls_old;
 uint32_t rx_pkts_old;
 uint32_t rx_tpa_pkts_old;
+uint32_t rx_erroneous_jumbo_sge_pkts_old;
+uint32_t rx_bxe_service_rxsgl_old;
 uint32_t rx_jumbo_sge_pkts_old;
 uint32_t rx_soft_errors_old;
 uint32_t rx_hw_csum_errors_old;
___

svn commit: r292615 - stable/10/sys/dev/qlxgbe

2015-12-22 Thread David C Somayajulu
Author: davidcs
Date: Tue Dec 22 19:34:21 2015
New Revision: 292615
URL: https://svnweb.freebsd.org/changeset/base/292615

Log:
  MFC r289635
  
  ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE
  ql_os.c: removed unnecessary debug printf
  ql_ver.h: updated version number

Modified:
  stable/10/sys/dev/qlxgbe/ql_hw.c
  stable/10/sys/dev/qlxgbe/ql_os.c
  stable/10/sys/dev/qlxgbe/ql_ver.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/qlxgbe/ql_hw.c
==
--- stable/10/sys/dev/qlxgbe/ql_hw.cTue Dec 22 18:39:07 2015
(r292614)
+++ stable/10/sys/dev/qlxgbe/ql_hw.cTue Dec 22 19:34:21 2015
(r292615)
@@ -387,6 +387,7 @@ ql_hw_add_sysctls(qla_host_t *ha)
"Minidump Utility can start minidump process");
 #ifdef QL_DBG
 
+   ha->err_inject = 0;
 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 OID_AUTO, "err_inject",
@@ -3057,7 +3058,7 @@ ql_hw_check_health(qla_host_t *ha)
val = READ_REG32(ha, Q8_FIRMWARE_HEARTBEAT);
 
if ((val != ha->hw.hbeat_value) &&
-   (!(QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE {
+   (!(QL_ERR_INJECT(ha, INJCT_HEARTBEAT_FAILURE {
ha->hw.hbeat_value = val;
return 0;
}

Modified: stable/10/sys/dev/qlxgbe/ql_os.c
==
--- stable/10/sys/dev/qlxgbe/ql_os.cTue Dec 22 18:39:07 2015
(r292614)
+++ stable/10/sys/dev/qlxgbe/ql_os.cTue Dec 22 19:34:21 2015
(r292615)
@@ -289,8 +289,6 @@ qla_pci_attach(device_t dev)
int i;
uint32_t num_rcvq = 0;
 
-   QL_DPRINT2(ha, (dev, "%s: enter\n", __func__));
-
 if ((ha = device_get_softc(dev)) == NULL) {
 device_printf(dev, "cannot get softc\n");
 return (ENOMEM);

Modified: stable/10/sys/dev/qlxgbe/ql_ver.h
==
--- stable/10/sys/dev/qlxgbe/ql_ver.h   Tue Dec 22 18:39:07 2015
(r292614)
+++ stable/10/sys/dev/qlxgbe/ql_ver.h   Tue Dec 22 19:34:21 2015
(r292615)
@@ -36,6 +36,6 @@
 
 #define QLA_VERSION_MAJOR  3
 #define QLA_VERSION_MINOR  10
-#define QLA_VERSION_BUILD   24
+#define QLA_VERSION_BUILD   25
 
 #endif /* #ifndef _QL_VER_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293786 - stable/10/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 22:52:45 2016
New Revision: 293786
URL: https://svnweb.freebsd.org/changeset/base/293786

Log:
  MFC r289199
  Add support for reading device temperature

Modified:
  stable/10/sys/dev/bxe/bxe.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:47:16 2016(r293785)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:52:45 2016(r293786)
@@ -16154,9 +16154,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293789 - stable/9/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 23:26:45 2016
New Revision: 293789
URL: https://svnweb.freebsd.org/changeset/base/293789

Log:
  MFC r289199
Add support for reading device temperature

Modified:
  stable/9/sys/dev/bxe/bxe.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:16:27 2016(r293788)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:26:45 2016(r293789)
@@ -16163,9 +16163,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293787 - stable/10/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 22:58:46 2016
New Revision: 293787
URL: https://svnweb.freebsd.org/changeset/base/293787

Log:
  MFC r292638
Check for packet_length is greater than 60 bytes as well as packet_length is
greater than len_on_bd, before invoking the routine to handle jumbo over SGL
(bxe_service_rxsgl()).
Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) and
erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts)
  
Fix formatting in bxe_sysctl_state()

Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe_stats.c
  stable/10/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:52:45 2016(r293786)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:58:46 2016(r293787)
@@ -483,6 +483,10 @@ static const struct {
 4, STATS_FLAGS_FUNC, "rx_pkts"},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"},
+{ STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, "rx_erroneous_jumbo_sge_pkts"},
+{ STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, STATS_FLAGS_FUNC, "rx_bxe_service_rxsgl"},
 { STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"},
 { STATS_OFFSET32(rx_soft_errors),
@@ -596,6 +600,10 @@ static const struct {
 4, "rx_pkts"},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, "rx_tpa_pkts"},
+{ Q_STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, "rx_erroneous_jumbo_sge_pkts"},
+{ Q_STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, "rx_bxe_service_rxsgl"},
 { Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, "rx_jumbo_sge_pkts"},
 { Q_STATS_OFFSET32(rx_soft_errors),
@@ -3486,11 +3494,14 @@ bxe_rxeof(struct bxe_softc*sc,
 m_adj(m, pad);
 m->m_pkthdr.len = m->m_len = len;
 
-if (len != lenonbd){
+if ((len > 60) && (len > lenonbd)) {
+fp->eth_q_stats.rx_bxe_service_rxsgl++;
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
 fp->eth_q_stats.rx_jumbo_sge_pkts++;
+} else if (lenonbd < len) {
+fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -16154,12 +16165,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
-   uint32_t  temp;
+uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
 
 BLOGI(sc, "... dumping driver state ...\n");
-   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
-   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
+temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);

Modified: stable/10/sys/dev/bxe/bxe_stats.c
==
--- stable/10/sys/dev/bxe/bxe_stats.c   Tue Jan 12 22:52:45 2016
(r293786)
+++ stable/10/sys/dev/bxe/bxe_stats.c   Tue Jan 12 22:58:46 2016
(r293787)
@@ -1227,6 +1227,8 @@ bxe_drv_stats_update(struct bxe_softc *s
 UPDATE_ESTAT_QSTAT(rx_calls);
 UPDATE_ESTAT_QSTAT(rx_pkts);
 UPDATE_ESTAT_QSTAT(rx_tpa_pkts);
+UPDATE_ESTAT_QSTAT(rx_erroneous_jumbo_sge_pkts);
+UPDATE_ESTAT_QSTAT(rx_bxe_service_rxsgl);
 UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts);
 UPDATE_ESTAT_QSTAT(rx_soft_errors);
 UPDATE_ESTAT_QSTAT(rx_hw_csum_errors);

Modified: stable/10/sys/dev/bxe/bxe_stats.h
==
--- stable/10/sys/dev/bxe/bxe_stats.h   Tue Jan 12 22:52:45 2016
(r293786)
+++ stable/10/sys/dev/bxe/bxe_stats.h   Tue Jan 12 22:58:46 2016
(r293787)
@@ -218,6 +218,8 @@ struct bxe_eth_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -319,6 +321,8 @@ struct bxe_eth_q_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -413,6 +417,8 @@ struct bxe_eth_q_stats_old {
 uint32_t rx_calls_old;
 uint32_t rx_pkts_old;
 uint32_t rx_tpa_pkts_old;
+uint32_t rx_erroneous_jumbo_sge_pkts_old;
+uint32_t rx_bxe_service_rxsgl_old;
 uint32_t rx_jumbo_sge_pkts_old;
 uint32_t rx_soft_errors_old;
 

svn commit: r293788 - stable/10/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 23:16:27 2016
New Revision: 293788
URL: https://svnweb.freebsd.org/changeset/base/293788

Log:
  MFC r292639
  Add support for firmware dump (a.k.a grcdump)

Added:
  stable/10/sys/dev/bxe/bxe_dump.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_dump.h
  stable/10/sys/dev/bxe/bxe_ioctl.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_ioctl.h
Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe.h
  stable/10/sys/dev/bxe/ecore_init.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:58:46 2016(r293787)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jan 12 23:16:27 2016(r293788)
@@ -747,6 +747,8 @@ static __noinline int bxe_nic_unload(str
 static void bxe_handle_sp_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
+static int bxe_add_cdev(struct bxe_softc *sc);
+static void bxe_del_cdev(struct bxe_softc *sc);
 
 /* calculate crc32 on a buffer (NOTE: crc32_length MUST be aligned to 8) */
 uint32_t
@@ -4514,7 +4516,7 @@ bxe_nic_unload(struct bxe_softc *sc,
 sc->rx_mode = BXE_RX_MODE_NONE;
 /* XXX set rx mode ??? */
 
-if (IS_PF(sc)) {
+if (IS_PF(sc) && !sc->grcdump_done) {
 /* set ALWAYS_ALIVE bit in shmem */
 sc->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE;
 
@@ -4534,7 +4536,8 @@ bxe_nic_unload(struct bxe_softc *sc,
 ; /* bxe_vfpf_close_vf(sc); */
 } else if (unload_mode != UNLOAD_RECOVERY) {
 /* if this is a normal/close unload need to clean up chip */
-bxe_chip_cleanup(sc, unload_mode, keep_link);
+if (!sc->grcdump_done)
+bxe_chip_cleanup(sc, unload_mode, keep_link);
 } else {
 /* Send the UNLOAD_REQUEST to the MCP */
 bxe_send_unload_req(sc, unload_mode);
@@ -16308,6 +16311,12 @@ bxe_add_sysctls(struct bxe_softc *sc)
 CTLFLAG_RW, >debug,
 "debug logging mode");
 
+sc->trigger_grcdump = 0;
+SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump",
+CTLFLAG_RW, >trigger_grcdump, 0,
+"set by driver when a grcdump is needed");
+
+
 sc->rx_budget = bxe_rx_budget;
 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_budget",
 CTLFLAG_RW, >rx_budget, 0,
@@ -16436,8 +16445,20 @@ bxe_attach(device_t dev)
 return (ENXIO);
 }
 
+if (bxe_add_cdev(sc) != 0) {
+if (sc->ifnet != NULL) {
+ether_ifdetach(sc->ifnet);
+}
+ifmedia_removeall(>ifmedia);
+bxe_release_mutexes(sc);
+bxe_deallocate_bars(sc);
+pci_disable_busmaster(dev);
+return (ENXIO);
+}
+
 /* allocate device interrupts */
 if (bxe_interrupt_alloc(sc) != 0) {
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16451,6 +16472,7 @@ bxe_attach(device_t dev)
 /* allocate ilt */
 if (bxe_alloc_ilt_mem(sc) != 0) {
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16465,6 +16487,7 @@ bxe_attach(device_t dev)
 if (bxe_alloc_hsi_mem(sc) != 0) {
 bxe_free_ilt_mem(sc);
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16536,6 +16559,8 @@ bxe_detach(device_t dev)
 return(EBUSY);
 }
 
+bxe_del_cdev(sc);
+
 /* stop the periodic callout */
 bxe_periodic_stop(sc);
 
@@ -18856,3 +18881,457 @@ ecore_storm_memset_struct(struct bxe_sof
 }
 }
 
+
+/*
+ * character device - ioctl interface definitions
+ */
+
+
+#include "bxe_dump.h"
+#include "bxe_ioctl.h"
+#include 
+
+static int bxe_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
+struct thread *td);
+
+static struct cdevsw bxe_cdevsw = {
+.d_version = D_VERSION,
+.d_ioctl = bxe_eioctl,
+.d_name = "bxecnic",
+};
+
+#define BXE_PATH(sc)(CHIP_IS_E1x(sc) ? 0 : (sc->pcie_func & 1))
+
+
+#define DUMP_ALL_PRESETS0x1FFF
+#define DUMP_MAX_PRESETS13
+#define IS_E1_REG(chips)((chips & DUMP_CHIP_E1) == DUMP_CHIP_E1)
+#define IS_E1H_REG(chips)   ((chips & DUMP_CHIP_E1H) == DUMP_CHIP_E1H)
+#define IS_E2_REG(chips)((chips & DUMP_CHIP_E2) == DUMP_CHIP_E2)
+#define IS_E3A0_REG(chips)  ((chips & DUMP_CHIP_E3A0) == DUMP_CHIP_E3A0)
+#define IS_E3B0_REG(chips)  ((chips & DUMP_CHIP_E3B0) == DUMP_CHIP_E3B0)
+
+#define IS_REG_IN_PRESET(presets, idx)  \
+((presets & (1 << (idx-1))) == (1 << (idx-1)))
+
+
+static int
+bxe_get_preset_regs_len(struct bxe_softc *sc, uint32_t preset)
+{
+if (CHIP_IS_E1(sc))
+return dump_num_registers[0][preset-1];
+

svn commit: r293797 - stable/7/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Wed Jan 13 01:09:32 2016
New Revision: 293797
URL: https://svnweb.freebsd.org/changeset/base/293797

Log:
  MFC r289199
  
  Add support for reading device temperature

Modified:
  stable/7/sys/dev/bxe/bxe.c
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 00:37:28 2016(r293796)
+++ stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 01:09:32 2016(r293797)
@@ -16165,9 +16165,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


  1   2   3   4   >