@@ -65,7 +65,7 @@ BOOL ata_RegisterVolume(ULONG StartCyl, ULONG EndCyl, struct ata_Unit *unit)
6565 dosdevname [1 ] = 'D' ;
6666 break ;
6767 default :
68- D (bug ("[ATA>>]:-ata_RegisterVolume called on unknown devicetype\n" ));
68+ DATAINIT (bug ("[ATA>>]:-ata_RegisterVolume called on unknown devicetype\n" ));
6969 }
7070
7171 if (unit -> au_UnitNum < 10 ) dosdevname [5 ] += unit -> au_UnitNum % 10 ;
@@ -96,15 +96,15 @@ BOOL ata_RegisterVolume(ULONG StartCyl, ULONG EndCyl, struct ata_Unit *unit)
9696
9797 if (devnode )
9898 {
99- D (bug ("[ATA>>]:-ata_RegisterVolume=%b, DosType=0x%08lx | LowCyl=%d | HighCyl=%d | Heads=%d | Blocksize=%d | BlockPerTrack=%d .. " ,
99+ DATAINIT (bug ("[ATA>>]:-ata_RegisterVolume=%b, DosType=0x%08lx | LowCyl=%d | HighCyl=%d | Heads=%d | Blocksize=%d | BlockPerTrack=%d .. " ,
100100 devnode -> dn_Name , pp [DE_DOSTYPE + 4 ], StartCyl , EndCyl , unit -> au_Heads , 1 << unit -> au_SectorShift , unit -> au_Sectors ));
101101
102102 if (unit -> au_DevType == DG_DIRECT_ACCESS ) // && ((unit->au_Flags & AF_Removable) == 0))
103103 {
104104 AddBootNode (pp [DE_BOOTPRI + 4 ], ADNF_STARTPROC , devnode , NULL );
105- D (bug ("BootNode (Direct Access Medium)\n" ));
105+ DATAINIT (bug ("BootNode (Direct Access Medium)\n" ));
106106 } else {
107- D (bug ("DosNode (CD/DVD or other Non-Direct Access Medium)\n" ));
107+ DATAINIT (bug ("DosNode (CD/DVD or other Non-Direct Access Medium)\n" ));
108108 }
109109
110110 return TRUE;
@@ -141,7 +141,7 @@ static int ATA_init(struct ataBase *ATABase)
141141{
142142 struct BootLoaderBase * BootLoaderBase ;
143143
144- D (bug ("[ATA--] %s: ata.device Initialization\n" , __func__ ));
144+ DATAINIT (bug ("[ATA--] %s: ata.device Initialization\n" , __func__ ));
145145
146146 /* Prepare the list of detected controllers */
147147 NEWLIST (& ATABase -> ata_Controllers );
@@ -157,7 +157,7 @@ static int ATA_init(struct ataBase *ATABase)
157157 * obtain kernel parameters
158158 */
159159 BootLoaderBase = OpenResource ("bootloader.resource" );
160- D (bug ("[ATA--] %s: BootloaderBase = %p\n" , __func__ , BootLoaderBase ));
160+ DATAINIT (bug ("[ATA--] %s: BootloaderBase = %p\n" , __func__ , BootLoaderBase ));
161161 if (BootLoaderBase != NULL )
162162 {
163163 struct List * list ;
@@ -174,27 +174,27 @@ static int ATA_init(struct ataBase *ATABase)
174174
175175 if (strstr (CmdLine , "disable" ))
176176 {
177- D (bug ("[ATA ] %s: Disabling ATA support\n" , __func__ ));
177+ DATAINIT (bug ("[ATA ] %s: Disabling ATA support\n" , __func__ ));
178178 return FALSE;
179179 }
180180 if (strstr (CmdLine , "32bit" ))
181181 {
182- D (bug ("[ATA ] %s: Using 32-bit IO transfers\n" , __func__ ));
182+ DATAINIT (bug ("[ATA ] %s: Using 32-bit IO transfers\n" , __func__ ));
183183 ATABase -> ata_32bit = TRUE;
184184 }
185185 if (strstr (CmdLine , "nomulti" ))
186186 {
187- D (bug ("[ATA ] %s: Disabled multisector transfers\n" , __func__ ));
187+ DATAINIT (bug ("[ATA ] %s: Disabled multisector transfers\n" , __func__ ));
188188 ATABase -> ata_NoMulti = TRUE;
189189 }
190190 if (strstr (CmdLine , "nodma" ))
191191 {
192- D (bug ("[ATA ] %s: Disabled DMA transfers\n" , __func__ ));
192+ DATAINIT (bug ("[ATA ] %s: Disabled DMA transfers\n" , __func__ ));
193193 ATABase -> ata_NoDMA = TRUE;
194194 }
195195 if (strstr (CmdLine , "poll" ))
196196 {
197- D (bug ("[ATA ] %s: Using polling to detect end of busy state\n" , __func__ ));
197+ DATAINIT (bug ("[ATA ] %s: Using polling to detect end of busy state\n" , __func__ ));
198198 ATABase -> ata_Poll = TRUE;
199199 }
200200 }
@@ -219,7 +219,7 @@ static int ATA_init(struct ataBase *ATABase)
219219 return FALSE;
220220 }
221221
222- D (bug ("[ATA--] %s: MemPool @ %p\n" , __func__ , ATABase -> ata_MemPool ));
222+ DATAINIT (bug ("[ATA--] %s: MemPool @ %p\n" , __func__ , ATABase -> ata_MemPool ));
223223
224224 /*
225225 * ata drive cache memory allocation
@@ -231,7 +231,7 @@ static int ATA_init(struct ataBase *ATABase)
231231 return FALSE;
232232 }
233233
234- D (bug ("[ATA--] %s: CacheData @ %p\n" , __func__ , ATABase -> ata_CacheData ));
234+ DATAINIT (bug ("[ATA--] %s: CacheData @ %p\n" , __func__ , ATABase -> ata_CacheData ));
235235
236236 ATABase -> ata_CacheTags = AllocMem (CACHE_SIZE * 8 , MEMF_CLEAR | MEMF_PUBLIC );
237237 if (ATABase -> ata_CacheTags == NULL )
@@ -244,15 +244,15 @@ static int ATA_init(struct ataBase *ATABase)
244244 ATABase -> ata_CacheTags [i ] = 0xfffffffffffffffful ;
245245 }
246246
247- D (bug ("[ATA--] %s: CacheTags @ %p\n" , __func__ , ATABase -> ata_CacheTags ));
247+ DATAINIT (bug ("[ATA--] %s: CacheTags @ %p\n" , __func__ , ATABase -> ata_CacheTags ));
248248
249249#if defined(__OOP_NOATTRBASES__ )
250250 if (OOP_ObtainAttrBasesArray (& ATABase -> unitAttrBase , attrBaseIDs ))
251251 {
252252 bug ("[ATA--] %s: Failed to obtain AttrBases!\n" , __func__ );
253253 return FALSE;
254254 }
255- D (
255+ DATAINIT (
256256 bug ("[ATA--] %s: HiddBusAB %x @ 0x%p\n" , __func__ , HiddBusAB , & HiddBusAB );
257257 bug ("[ATA--] %s: HiddATABusAB %x @ 0x%p\n" , __func__ , HiddATABusAB , & HiddATABusAB );
258258 )
@@ -274,7 +274,7 @@ static int ATA_init(struct ataBase *ATABase)
274274
275275 InitSemaphore (& ATABase -> DetectionSem );
276276
277- D (bug ("[ATA ] %s: Base ATA Hidd Class @ 0x%p\n" , __func__ , ATABase -> ataClass ));
277+ DATAINIT (bug ("[ATA ] %s: Base ATA Hidd Class @ 0x%p\n" , __func__ , ATABase -> ataClass ));
278278
279279 return TRUE;
280280}
@@ -300,27 +300,27 @@ static int ata_expunge(struct ataBase *ATABase)
300300 /* Destroy our singletone */
301301 OOP_MethodID disp_msg = OOP_GetMethodID (IID_Root , moRoot_Dispose );
302302
303- D (bug ("[ATA ] ata_expunge: destroying subystem object\n" ));
303+ DATAINIT (bug ("[ATA ] ata_expunge: destroying subystem object\n" ));
304304 OOP_DoSuperMethod (ataNode -> ac_Class , ataNode -> ac_Object , & disp_msg );
305305 FreeMem (ataNode , sizeof (struct ata_Controller ));
306306 }
307307 else
308308 {
309309 /* Our subsystem is in use, we have some bus driver(s) around. */
310- D (bug ("[ATA ] ata_expunge: ATA subsystem is in use\n" ));
310+ DATAINIT (bug ("[ATA ] ata_expunge: ATA subsystem is in use\n" ));
311311 return FALSE;
312312 }
313313 }
314314
315315#if defined(__OOP_NOATTRBASES__ )
316- D (bug ("[ATA ] ata_expunge: Releasing attribute bases\n" ));
316+ DATAINIT (bug ("[ATA ] ata_expunge: Releasing attribute bases\n" ));
317317 OOP_ReleaseAttrBasesArray (& ATABase -> unitAttrBase , attrBaseIDs );
318318#endif
319319
320320 if (ATABase -> ata_UtilityBase )
321321 CloseLibrary (ATABase -> ata_UtilityBase );
322322
323- D (bug ("[ATA ] ata_expunge: Exiting\n" ));
323+ DATAINIT (bug ("[ATA ] ata_expunge: Exiting\n" ));
324324 return TRUE;
325325}
326326
@@ -343,7 +343,7 @@ static int open(struct ataBase *ATABase, struct IORequest *iorq, ULONG unitnum,
343343 {
344344 HIDD_StorageController_EnumBuses (ataNode -> ac_Object , & searchHook , (APTR )(IPTR )unitnum );
345345 }
346- D (bug ("[ATA%02d] Open result: %d\n" , unitnum , iorq -> io_Error ));
346+ DATAINIT (bug ("[ATA%02d] Open result: %d\n" , unitnum , iorq -> io_Error ));
347347
348348 /* If found, io_Error will be reset to zero */
349349 return iorq -> io_Error ? FALSE : TRUE;
0 commit comments