lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Apr 2007 23:46:55 +0400
From:	Sergei Shtylyov <sshtylyov@...mvista.com>
To:	Sergei Shtylyov <sshtylyov@...mvista.com>
CC:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/15] ide: rework the code for selecting the best DMA
 transfer mode

Hello, I wrote:
>> Bartlomiej Zolnierkiewicz wrote:

>>> [PATCH] ide: rework the code for selecting the best DMA transfer mode 

>>> Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.

>>   I'm now trying to rewrite hpt366.c to benefit more from these 
>> patches...
>> and alas, this very patch seems to be breaking filtering (at least) in 
>> this driver. :-]

>>> Index: b/drivers/ide/ide-dma.c
>>> ===================================================================
>>> --- a/drivers/ide/ide-dma.c
>>> +++ b/drivers/ide/ide-dma.c
>>> @@ -705,6 +705,80 @@ int ide_use_dma(ide_drive_t *drive)
>>>  
>>>  EXPORT_SYMBOL_GPL(ide_use_dma);
>>>  
>>> +static const u8 xfer_mode_bases[] = {
>>> +    XFER_UDMA_0,
>>> +    XFER_MW_DMA_0,
>>> +    XFER_SW_DMA_0,
>>> +};
>>> +
>>> +static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base)
>>> +{
>>> +    struct hd_driveid *id = drive->id;
>>> +    ide_hwif_t *hwif = drive->hwif;
>>> +    unsigned int mask = 0;
>>> +
>>> +    switch(base) {
>>> +    case XFER_UDMA_0:
>>> +        if ((id->field_valid & 4) == 0)
>>> +            break;
>>> +
>>> +        mask = id->dma_ultra & hwif->ultra_mask;
>>> +
>>> +        if (hwif->udma_filter)
>>> +            mask &= hwif->udma_filter(drive);
>>> +
>>> +        if ((mask & 0x78) && (eighty_ninty_three(drive) == 0))
>>> +            mask &= 0x07;
> 
> 
>>   Note the subtle difference between the old and new behavior: the old 
>> driver code was applying UltraDMA filter *after*
>> the cable type limit, and the new code does it *before*.

>   Was there any particular reason to change that order?

   Ah, I see. Cable-reduced mask can't be passed back to driver's filter. This needs changing.

MBR, Sergei
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ