Skip to content

Commit

Permalink
Release v1.4.28
Browse files Browse the repository at this point in the history
  • Loading branch information
ec-support committed Jan 15, 2024
1 parent f5654fa commit 52667a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
16 changes: 14 additions & 2 deletions atemsys.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ static int ioctl_pci_configure_device(ATEMSYS_T_DEVICE_DESC* pDevDesc, unsigned

switch (dwAtemsysApiVersion)
{
case sizeof(ATEMSYS_T_PCI_SELECT_DESC_v1_0_00):
case EC_ATEMSYSVERSION(1,0,0):
{
ATEMSYS_T_PCI_SELECT_DESC_v1_0_00 oPciDesc_v1_0_00;
memset(&oPciDesc_v1_0_00, 0, sizeof(ATEMSYS_T_PCI_SELECT_DESC_v1_0_00));
Expand Down Expand Up @@ -2581,8 +2581,11 @@ static int device_mmap(struct file* filp, struct vm_area_struct* vma)
}

dwLen = PAGE_UP(vma->vm_end - vma->vm_start);

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
vm_flags_set(vma, VM_RESERVED | VM_LOCKED | VM_DONTCOPY);
#else
vma->vm_flags |= VM_RESERVED | VM_LOCKED | VM_DONTCOPY;
#endif

if (vma->vm_pgoff != 0)
{
Expand Down Expand Up @@ -2639,7 +2642,12 @@ static int device_mmap(struct file* filp, struct vm_area_struct* vma)
#endif /* CONFIG_PCI */

/* avoid swapping, request IO memory */

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
vm_flags_set(vma, VM_IO);
#else
vma->vm_flags |= VM_IO;
#endif

/*
* avoid caching (this is at least needed for POWERPC,
Expand Down Expand Up @@ -4758,7 +4766,11 @@ int init_module(void)
}
#endif

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0))
S_pDevClass = class_create(ATEMSYS_DEVICE_NAME);
#else
S_pDevClass = class_create(THIS_MODULE, ATEMSYS_DEVICE_NAME);
#endif
if (IS_ERR(S_pDevClass))
{
INF("class_create failed\n");
Expand Down
8 changes: 5 additions & 3 deletions atemsys.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@
* Add ATEMSYS_IOCTL_CPSWG_CMD to configure K3_UDMA_CPSWG Channels, Flows and Rings
* V1.4.27 - Fix ATEMSYS_IOCTL_CPSWG_CMD kernel version,
* Add Device Tree Ethernet driver support for CPSWG
* V1.4.28 - Fix for PCIe compatibility with Atemsys before V1.3.5,
* - Fix for Kernel > 6.05.00
* atemsys is shared across EC-Master V2.7+
*----------------------------------------------------------------------------*/
Expand All @@ -132,10 +134,10 @@
#define EC_ATEMSYSVERSION(a,b,c) (((a)<<2*8)+((b)<<1*8)+((c)<<0*8))
#endif

#define ATEMSYS_VERSION_STR "1.4.27"
#define ATEMSYS_VERSION_NUM 1,4,27
#define ATEMSYS_VERSION_STR "1.4.28"
#define ATEMSYS_VERSION_NUM 1,4,28
#if (defined ATEMSYS_C)
#define USE_ATEMSYS_API_VERSION EC_ATEMSYSVERSION(1,4,27)
#define USE_ATEMSYS_API_VERSION EC_ATEMSYSVERSION(1,4,28)
#endif

/* support selection */
Expand Down

0 comments on commit 52667a5

Please sign in to comment.