lkml.org 
[lkml]   [2007]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pata_it821x: sync with IDE it821x driver
Bartlomiej Zolnierkiewicz wrote:
>>> @@ -258,8 +259,14 @@ static void it821x_passthru_set_piomode(
>>> static const u8 pio_want[] = { ATA_66, ATA_66, ATA_66, ATA_66, ATA_ANY };
>>>
>>> struct it821x_dev *itdev = ap->private_data;
>>> + struct ata_device *pair = ata_dev_pair(adev);
>>> int unit = adev->devno;
>>> - int mode_wanted = adev->pio_mode - XFER_PIO_0;
>>> + int mode_wanted = adev->pio_mode;
>>> +
>>> + if (pair && adev->pio_mode > pair->pio_mode)
>>> + mode_wanted = pair->pio_mode;
>>> +
>>> + mode_wanted -= XFER_PIO_0;
>> I think this is better done by mode_filter callback which is guaranteed
>> to be called before any actual mode configuration is performed and in
>> device order (master then slave).
>
> I was thinking about using ->mode_filter but since all other PATA host
> drivers are doing PIO filtering in ->set_piomode methods and also since it
> seemed that using ->mode_filter method would result in slightly more complex
> code I opted for coherency / simplicity. However if you (or somebody else)
> want to make a follow-up change to this driver (and preferably other PATA
> host drivers ie. pata_sil680) to use ->mode_filter I'm also fine with that.

Hmmm... indeed. Alan, is there any reason we do that in ->set_piomode
not ->mode_filter? We end up with mismatching configuration between the
controller and the higher speed drive.

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

\
 
 \ /
  Last update: 2007-06-10 06:53    [W:0.232 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site