Messages in this thread | | | Date | Mon, 05 Jan 2009 00:13:18 +0300 | From | Sergei Shtylyov <> | Subject | Re: [PATCH] ide: motherboard-info based blacklist for ide-dma |
| |
Hello, I wrote:
>>>> drive->hwif->dma_ops->dma_host_set(drive, 1); >>>> } >>>> >>>> +static int __ide_dma_bad_adaptor(ide_drive_t *drive) >>>> +{ >>>> + const struct board_blacklist_entry *table = board_blacklist; >>>> + >>>> + const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); >>>> + const char *board_name = dmi_get_system_info(DMI_BOARD_NAME); >>>> + >>>> + if (!board_vendor || !board_name) >>>> + return 0; >>>> + >>>> + for ( ; table->board_name ; table++) >>>> + if ((!strcmp(board_vendor, table->board_vendor)) && >>>> + (!strcmp(board_name, table->board_name)) && >>>> + (!strcmp(drive->name, table->drive_name))) { >>>> + printk(KERN_WARNING "%s: Disabling (U)DMA for %s " >>>> + "(Board %s %s is blacklisted)\n", drive->name, >>>> + (char *)&drive->id[ATA_ID_PROD], board_vendor, >>>> + board_name); >>>> + return 1; >>>> + } >>>> + >>>> + return 0; >>>> +} >>>> + >>>> >>> This code doesn't anyhow discriminate the case of on-board CF >>> and say > @@ -207,6 +222,30 @@ void ide_dma_on(ide_drive_t *drive) > > Hm, previously I failed to notice that the patch tries to > discriminate this case based on applying the workaround only to the > drive with certain name ("hdc"). However, it still seems wrong to > place this workaround in __ide_dma_bad_drive() as it's not actually > connected to the deficiency of a specific drive but to the definciency > of the CF slot itself. Moreover, depending on the PCI cards plugged, > the drive's name may change...
Oh, and the master/slave mode of the CF drive is selectable by on-board switch -- via the -CSEL signal I guess. :-)
MBR, Sergei
| |