kernels/linux-2.4.0/drivers/ide/ide-dma.c
/*
 *  For both Blacklisted and Whitelisted drives.
 *  This is setup to be called as an extern for future support
 *  to other special driver code.
 */
For both Blacklisted and Whitelisted drives.
This is setup to be called as an extern for future support
to other special driver code.
For both Blacklisted and Whitelisted drives . This is setup to be called as an extern for future support to other special driver code .
int check_drive_lists (ide_drive_t *drive, int good_bad)
{
	struct hd_driveid *id = drive->id;
#ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS
	if (good_bad) {
		return in_drive_list(id, drive_whitelist);
	} else {
		int blacklist = in_drive_list(id, drive_blacklist);
		if (blacklist)
			printk("%s: Disabling (U)DMA for %s\n", drive->name, id->model);
		return(blacklist);
	}
#else 
	const char **list;
	if (good_bad) {
		list = good_dma_drives;
		while (*list) {
			if (!strcmp(*list++,id->model))
				return 1;
		}
	} else {
		list = bad_dma_drives;
		while (*list) {
			if (!strcmp(*list++,id->model)) {
				printk("%s: Disabling (U)DMA for %s\n",
					drive->name, id->model);
				return 1;
			}
		}
	}
#endif 
	return 0;
}
int check_drive_lists ( ide_drive_t * drive , int good_bad ) { struct hd_driveid * id = drive -> id ; #ifdef CONFIG_IDEDMA_NEW_DRIVE_LISTINGS if ( good_bad ) { return in_drive_list ( id , drive_whitelist ) ; } else { int blacklist = in_drive_list ( id , drive_blacklist ) ; if ( blacklist ) printk ( " \n " , drive -> name , id -> model ) ; return ( blacklist ) ; } #else const char * * list ; if ( good_bad ) { list = good_dma_drives ; while ( * list ) { if ( ! strcmp ( * list ++ , id -> model ) ) return 1 ; } } else { list = bad_dma_drives ; while ( * list ) { if ( ! strcmp ( * list ++ , id -> model ) ) { printk ( " \n " , drive -> name , id -> model ) ; return 1 ; } } } #endif return 0 ; }
For both Blacklisted and Whitelisted drives.
For both Blacklisted and Whitelisted drives .
/* !CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */ /* Consult the list of known "good" drives */ /* Consult the list of known "bad" drives */ /* CONFIG_IDEDMA_NEW_DRIVE_LISTINGS */