Skip to content

Commit e084ce3

Browse files
committed
Version 2.5.0d4 - Fixes a problem which may cause the kext to refuse unload requests.
1 parent a9f1284 commit e084ce3

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

RealtekRTL8111.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -3668,7 +3668,7 @@
36683668
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
36693669
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
36703670
CODE_SIGN_STYLE = Manual;
3671-
CURRENT_PROJECT_VERSION = 2.5.0d3;
3671+
CURRENT_PROJECT_VERSION = 2.5.0d4;
36723672
DEBUG_INFORMATION_FORMAT = dwarf;
36733673
DEVELOPMENT_TEAM = FZX87E5QBD;
36743674
"DEVELOPMENT_TEAM[sdk=macosx*]" = "";
@@ -3682,7 +3682,7 @@
36823682
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2013 Laura Müller. All rights reserved.";
36833683
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
36843684
MACOSX_DEPLOYMENT_TARGET = 10.13;
3685-
MARKETING_VERSION = 2.5.0d3;
3685+
MARKETING_VERSION = 2.5.0d4;
36863686
MODULE_NAME = com.insanelymac.RealtekRTL8111;
36873687
MODULE_START = 0;
36883688
MODULE_STOP = 0;
@@ -3715,7 +3715,7 @@
37153715
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
37163716
CODE_SIGN_STYLE = Manual;
37173717
COPY_PHASE_STRIP = NO;
3718-
CURRENT_PROJECT_VERSION = 2.5.0d3;
3718+
CURRENT_PROJECT_VERSION = 2.5.0d4;
37193719
DEVELOPMENT_TEAM = FZX87E5QBD;
37203720
"DEVELOPMENT_TEAM[sdk=macosx*]" = "";
37213721
ENABLE_NS_ASSERTIONS = NO;
@@ -3729,7 +3729,7 @@
37293729
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2013 Laura Müller. All rights reserved.";
37303730
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
37313731
MACOSX_DEPLOYMENT_TARGET = 10.13;
3732-
MARKETING_VERSION = 2.5.0d3;
3732+
MARKETING_VERSION = 2.5.0d4;
37333733
MODULE_NAME = com.insanelymac.RealtekRTL8111;
37343734
MODULE_START = 0;
37353735
MODULE_STOP = 0;

RealtekRTL8111/RealtekRTL8111.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ void RTL8111::free()
135135
linuxData.mmio_addr = NULL;
136136

137137
RELEASE(pciDevice);
138-
freeTxResources();
139-
freeRxResources();
140-
freeStatResources();
141138

142139
DebugLog("free() <===\n");
143140

RealtekRTL8111/RealtekRTL8111Setup.cpp

+20-17
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,13 @@ bool RTL8111::setupStatResources()
525525
void RTL8111::freeRxResources()
526526
{
527527
UInt32 i;
528-
528+
529+
if (rxDescDmaCmd) {
530+
rxDescDmaCmd->complete();
531+
rxDescDmaCmd->clearMemoryDescriptor();
532+
rxDescDmaCmd->release();
533+
rxDescDmaCmd = NULL;
534+
}
529535
if (rxBufDesc) {
530536
rxBufDesc->complete();
531537
rxBufDesc->release();
@@ -540,31 +546,27 @@ void RTL8111::freeRxResources()
540546
rxMbufArray[i] = NULL;
541547
}
542548
}
543-
if (rxDescDmaCmd) {
544-
rxDescDmaCmd->clearMemoryDescriptor();
545-
rxDescDmaCmd->release();
546-
rxDescDmaCmd = NULL;
547-
}
548549
if (rxBufArrayMem) {
549-
IOFree(txBufArrayMem, kRxBufArraySize);
550+
IOFree(rxBufArrayMem, kRxBufArraySize);
550551
rxBufArrayMem = NULL;
551552
rxMbufArray = NULL;
552553
}
553554
}
554555

555556
void RTL8111::freeTxResources()
556557
{
558+
if (txDescDmaCmd) {
559+
txDescDmaCmd->complete();
560+
txDescDmaCmd->clearMemoryDescriptor();
561+
txDescDmaCmd->release();
562+
txDescDmaCmd = NULL;
563+
}
557564
if (txBufDesc) {
558565
txBufDesc->complete();
559566
txBufDesc->release();
560567
txBufDesc = NULL;
561568
txPhyAddr = (IOPhysicalAddress64)NULL;
562569
}
563-
if (txDescDmaCmd) {
564-
txDescDmaCmd->clearMemoryDescriptor();
565-
txDescDmaCmd->release();
566-
txDescDmaCmd = NULL;
567-
}
568570
if (txBufArrayMem) {
569571
IOFree(txBufArrayMem, kTxBufArraySize);
570572
txBufArrayMem = NULL;
@@ -575,17 +577,18 @@ void RTL8111::freeTxResources()
575577

576578
void RTL8111::freeStatResources()
577579
{
580+
if (statDescDmaCmd) {
581+
statDescDmaCmd->complete();
582+
statDescDmaCmd->clearMemoryDescriptor();
583+
statDescDmaCmd->release();
584+
statDescDmaCmd = NULL;
585+
}
578586
if (statBufDesc) {
579587
statBufDesc->complete();
580588
statBufDesc->release();
581589
statBufDesc = NULL;
582590
statPhyAddr = (IOPhysicalAddress64)NULL;
583591
}
584-
if (statDescDmaCmd) {
585-
statDescDmaCmd->clearMemoryDescriptor();
586-
statDescDmaCmd->release();
587-
statDescDmaCmd = NULL;
588-
}
589592
}
590593

591594

0 commit comments

Comments
 (0)