Changeset 519 for GPL/branches/uniaud32-2.1.x/drv32/strategy.c
- Timestamp:
- Jul 20, 2010, 5:52:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-2.1.x/drv32/strategy.c
r504 r519 24 24 25 25 #define INCL_NOPMAPI 26 #define INCL_DOSINFOSEG 26 #define INCL_DOSINFOSEG // Need Global info seg in rm.cpp algorithms 27 27 #include <os2.h> 28 28 … … 51 51 } 52 52 numOS2Opens++; 53 53 return RPDONE; 54 54 } 55 55 //****************************************************************************** … … 66 66 ULONG StratInit(RP __far* _rp) 67 67 { 68 69 70 71 72 73 68 ULONG rc; 69 70 RPInit __far* rp = (RPInit __far*)_rp; 71 rc = DiscardableInit(rp); 72 dprintf(("StratInit End rc=%d", rc)); 73 return rc; 74 74 } 75 75 //****************************************************************************** … … 77 77 #ifdef ACPI 78 78 // See desription in irq.cpp 79 #include "irqos2.h" 79 #include "irqos2.h" //PS+++ 80 80 #ifdef __cplusplus 81 81 extern "C" { 82 82 #endif 83 ULONG InitCompleteWas = 0; 83 ULONG InitCompleteWas = 0; //PS+++ Indication of InitComplete call 84 84 struct SaveIRQForSlot 85 85 { 86 87 88 89 86 ULONG ulSlotNo; 87 BYTE LowIRQ; 88 BYTE HighIRQ; 89 BYTE Pin; 90 90 }; 91 91 extern struct SaveIRQForSlot sISRHigh[]; 92 extern int 92 extern int SaveIRQCounter; 93 93 #ifdef __cplusplus 94 94 } … … 102 102 #ifdef ACPI 103 103 //PS+++ Begin 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 104 ULONG i, rc = 0; 105 106 InitCompleteWas = 1; 107 for (i = 0; i < SaveIRQCounter; i++) 108 { 109 dprintf(("Close IRQ%d - Open IRQ%d",(ULONG)sISRHigh[i].LowIRQ,(ULONG)sISRHigh[i].HighIRQ)); 110 if (sISRHigh[i].HighIRQ) 111 { 112 ALSA_FreeIrq(sISRHigh[i].LowIRQ); 113 if (!ALSA_SetIrq(sISRHigh[i].HighIRQ, sISRHigh[i].ulSlotNo, 1)) 114 { 115 return (RPERR_COMMAND | RPDONE); 116 } 117 } 118 } 119 119 #endif 120 120 //PS++ End 121 #ifdef DEBUG 122 dprintf(("StratInitComplete")); 123 #endif 121 dprintf(("StratInitComplete")); 124 122 return(RPDONE); 125 123 } … … 130 128 #pragma on (unreferenced) 131 129 { 132 RPShutdown __far *rp = (RPShutdown __far *)_rp; 133 134 #ifdef DEBUG 135 dprintf(("StratShutdown %d", rp->Function)); 136 #endif 137 if(rp->Function == 1) {//end of shutdown 138 OSS32_Shutdown(); 139 } 130 RPShutdown __far *rp = (RPShutdown __far *)_rp; 131 132 dprintf(("StratShutdown Start %d", rp->Function)); 133 if(rp->Function == 1) {//end of shutdown 134 OSS32_Shutdown(); 135 } 136 dprintf(("StratShutdown End")); 140 137 return(RPDONE); 141 138 } … … 155 152 RPHandler StratDispatch[] = 156 153 { 157 StratInit, 158 StratError, 159 StratError, 160 StratError, 161 StratRead, 162 StratError, 163 StratError, 164 StratError, 165 StratWrite, 166 StratError, 167 StratError, 168 StratError, 169 StratError, 170 StratOpen, 171 StratClose, 172 StratError, 173 StratIOCtl, 174 StratError, 175 StratError, 176 StratError, 177 StratError, 178 StratError, 179 StratError, 180 StratError, 181 StratError, 182 StratError, 183 StratError, 184 StratError, 185 StratShutdown, 186 StratError, 187 StratError, 188 StratInitComplete 154 StratInit, // 00 (BC): Initialization 155 StratError, // 01 (B ): Media check 156 StratError, // 02 (B ): Build BIOS parameter block 157 StratError, // 03 ( ): Unused 158 StratRead, // 04 (BC): Read 159 StratError, // 05 ( C): Nondestructive read with no wait 160 StratError, // 06 ( C): Input status 161 StratError, // 07 ( C): Input flush 162 StratWrite, // 08 (BC): Write 163 StratError, // 09 (BC): Write verify 164 StratError, // 0A ( C): Output status 165 StratError, // 0B ( C): Output flush 166 StratError, // 0C ( ): Unused 167 StratOpen, // 0D (BC): Open 168 StratClose, // 0E (BC): Close 169 StratError, // 0F (B ): Removable media check 170 StratIOCtl, // 10 (BC): IO Control 171 StratError, // 11 (B ): Reset media 172 StratError, // 12 (B ): Get logical unit 173 StratError, // 13 (B ): Set logical unit 174 StratError, // 14 ( C): Deinstall character device driver 175 StratError, // 15 ( ): Unused 176 StratError, // 16 (B ): Count partitionable fixed disks 177 StratError, // 17 (B ): Get logical unit mapping of fixed disk 178 StratError, // 18 ( ): Unused 179 StratError, // 19 ( ): Unused 180 StratError, // 1A ( ): Unused 181 StratError, // 1B ( ): Unused 182 StratShutdown, // 1C (BC): Notify start or end of system shutdown 183 StratError, // 1D (B ): Get driver capabilities 184 StratError, // 1E ( ): Unused 185 StratInitComplete // 1F (BC): Notify end of initialization 189 186 }; 190 187 //****************************************************************************** … … 199 196 { 200 197 if (rp->Command < sizeof(StratDispatch)/sizeof(StratDispatch[0])) 201 198 return(StratDispatch[rp->Command](rp)); 202 199 else return(RPERR_COMMAND | RPDONE); 203 200 }
Note:
See TracChangeset
for help on using the changeset viewer.