lkml.org 
[lkml]   [2009]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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




\
 
 \ /
  Last update: 2009-01-04 22:15    [W:0.057 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site