bus/pci: change IOVA as VA flag name
[dpdk.git] / drivers / net / sfc / base / efx_nic.c
index cea32b7..c1285bf 100644 (file)
@@ -228,7 +228,8 @@ efx_nic_create(
                    EFX_FEATURE_PIO_BUFFERS |
                    EFX_FEATURE_FW_ASSISTED_TSO |
                    EFX_FEATURE_FW_ASSISTED_TSO_V2 |
-                   EFX_FEATURE_PACKED_STREAM;
+                   EFX_FEATURE_PACKED_STREAM |
+                   EFX_FEATURE_TXQ_CKSUM_OP_DESC;
                break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
@@ -248,7 +249,8 @@ efx_nic_create(
                    EFX_FEATURE_MCDI_DMA |
                    EFX_FEATURE_PIO_BUFFERS |
                    EFX_FEATURE_FW_ASSISTED_TSO_V2 |
-                   EFX_FEATURE_PACKED_STREAM;
+                   EFX_FEATURE_PACKED_STREAM |
+                   EFX_FEATURE_TXQ_CKSUM_OP_DESC;
                break;
 #endif /* EFSYS_OPT_MEDFORD */
 
@@ -264,7 +266,8 @@ efx_nic_create(
                    EFX_FEATURE_MCDI_DMA |
                    EFX_FEATURE_PIO_BUFFERS |
                    EFX_FEATURE_FW_ASSISTED_TSO_V2 |
-                   EFX_FEATURE_PACKED_STREAM;
+                   EFX_FEATURE_PACKED_STREAM |
+                   EFX_FEATURE_TXQ_CKSUM_OP_DESC;
                break;
 #endif /* EFSYS_OPT_MEDFORD2 */
 
@@ -376,6 +379,41 @@ fail1:
        return (rc);
 }
 
+       __checkReturn   efx_rc_t
+efx_nic_set_drv_version(
+       __inout                 efx_nic_t *enp,
+       __in_ecount(length)     char const *verp,
+       __in                    size_t length)
+{
+       efx_rc_t rc;
+
+       EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+       EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_PROBE));
+
+       /*
+        * length is the string content length in bytes.
+        * Accept any content which fits into the version
+        * buffer, excluding the last byte. This is reserved
+        * for an appended NUL terminator.
+        */
+       if (length >= sizeof (enp->en_drv_version)) {
+               rc = E2BIG;
+               goto fail1;
+       }
+
+       (void) memset(enp->en_drv_version, 0,
+           sizeof (enp->en_drv_version));
+       memcpy(enp->en_drv_version, verp, length);
+
+       return (0);
+
+fail1:
+       EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+       return (rc);
+}
+
+
        __checkReturn   efx_rc_t
 efx_nic_get_bar_region(
        __in            efx_nic_t *enp,
@@ -592,7 +630,7 @@ fail1:
 
                        const efx_nic_cfg_t *
 efx_nic_cfg_get(
-       __in            efx_nic_t *enp)
+       __in            const efx_nic_t *enp)
 {
        EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
        EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);