Sun Dec 23 12:32:33 2018 UTC ()
Use ___STRING instead of __STRING to expand driver version numbers properly


(jmcneill)
diff -r1.6 -r1.7 src/sys/dev/pci/if_enavar.h

cvs diff -r1.6 -r1.7 src/sys/dev/pci/if_enavar.h (expand / switch to unified diff)

--- src/sys/dev/pci/if_enavar.h 2018/11/30 14:07:30 1.6
+++ src/sys/dev/pci/if_enavar.h 2018/12/23 12:32:33 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_enavar.h,v 1.6 2018/11/30 14:07:30 jmcneill Exp $ */ 1/* $NetBSD: if_enavar.h,v 1.7 2018/12/23 12:32:33 jmcneill Exp $ */
2 2
3/*- 3/*-
4 * BSD LICENSE 4 * BSD LICENSE
5 * 5 *
6 * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates. 6 * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 12 *
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -39,29 +39,29 @@ @@ -39,29 +39,29 @@
39#include <sys/types.h> 39#include <sys/types.h>
40 40
41#include "external/bsd/ena-com/ena_com.h" 41#include "external/bsd/ena-com/ena_com.h"
42#include "external/bsd/ena-com/ena_eth_com.h" 42#include "external/bsd/ena-com/ena_eth_com.h"
43 43
44#define DRV_MODULE_VER_MAJOR 0 44#define DRV_MODULE_VER_MAJOR 0
45#define DRV_MODULE_VER_MINOR 8 45#define DRV_MODULE_VER_MINOR 8
46#define DRV_MODULE_VER_SUBMINOR 1 46#define DRV_MODULE_VER_SUBMINOR 1
47 47
48#define DRV_MODULE_NAME "ena" 48#define DRV_MODULE_NAME "ena"
49 49
50#ifndef DRV_MODULE_VERSION 50#ifndef DRV_MODULE_VERSION
51#define DRV_MODULE_VERSION \ 51#define DRV_MODULE_VERSION \
52 __STRING(DRV_MODULE_VER_MAJOR) "." \ 52 ___STRING(DRV_MODULE_VER_MAJOR) "." \
53 __STRING(DRV_MODULE_VER_MINOR) "." \ 53 ___STRING(DRV_MODULE_VER_MINOR) "." \
54 __STRING(DRV_MODULE_VER_SUBMINOR) 54 ___STRING(DRV_MODULE_VER_SUBMINOR)
55#endif 55#endif
56#define DEVICE_NAME "Elastic Network Adapter (ENA)" 56#define DEVICE_NAME "Elastic Network Adapter (ENA)"
57#define DEVICE_DESC "ENA adapter" 57#define DEVICE_DESC "ENA adapter"
58 58
59/* Calculate DMA mask - width for ena cannot exceed 48, so it is safe */ 59/* Calculate DMA mask - width for ena cannot exceed 48, so it is safe */
60#define ENA_DMA_BIT_MASK(x) ((1ULL << (x)) - 1ULL) 60#define ENA_DMA_BIT_MASK(x) ((1ULL << (x)) - 1ULL)
61 61
62/* 1 for AENQ + ADMIN */ 62/* 1 for AENQ + ADMIN */
63#define ENA_ADMIN_MSIX_VEC 1 63#define ENA_ADMIN_MSIX_VEC 1
64#define ENA_MAX_MSIX_VEC(io_queues) (ENA_ADMIN_MSIX_VEC + (io_queues)) 64#define ENA_MAX_MSIX_VEC(io_queues) (ENA_ADMIN_MSIX_VEC + (io_queues))
65 65
66#define ENA_REG_BAR PCI_BAR(0) 66#define ENA_REG_BAR PCI_BAR(0)
67#define ENA_MEM_BAR PCI_BAR(2) 67#define ENA_MEM_BAR PCI_BAR(2)