* Re: [PATCH 10/13] sl82c105: add ->speedproc support
[not found] ` <45F551E5.8010904@ru.mvista.com>
@ 2007-03-14 20:51 ` Sergei Shtylyov
2007-03-15 14:22 ` Woody Suwalski
2007-03-15 21:51 ` Bartlomiej Zolnierkiewicz
0 siblings, 2 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2007-03-14 20:51 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, linux-kernel
Hello, I wrote:
>>> Bartlomiej Zolnierkiewicz wrote:
>>>> [PATCH] sl82c105: add ->speedproc support
>>>> * add sl82c105_tunepio() wrapper for sl82c105_tune_drive()
>>>> (just to get the error value)
>>>> * add sl82c105_tune_chipset() (->speedproc method) for setting
>>>> transfer mode
>>> Thanks for the patch!
>>> > Index: b/drivers/ide/pci/sl82c105.c
>>>> ===================================================================
>>>> --- a/drivers/ide/pci/sl82c105.c
>>>> +++ b/drivers/ide/pci/sl82c105.c
> [...]
>>>> @@ -114,17 +114,45 @@ static void sl82c105_tune_drive(ide_driv
>>>> */
>>>> drive->io_32bit = 1;
>>>> drive->unmask = 1;
>>>> +
>>>> + return 0;
>>>> +}
>>>> +
>>>> +static void sl82c105_tune_drive(ide_drive_t *drive, u8 pio)
>>>> +{
>>>> + /*
>>>> + * TODO: find best PIO mode and set device speed here
>>>> + * (requires adding helper function for getting PIO cycle
>>>> time)
>>>> + */
>>> I thought we were doing it by calling ide_get_best_pio_mode() above...
>> We are also using ide_get_best_pio_mode() to get PIO cycle time
>> so we can't move it here ATM.
> I've found/used quite convenient workaround for that -- return PIO
> mode actually selected from xxx_tune_pio(), then call
> ide_config_drive_speed() from the real tuneproc() method.
Works like charm with ignoring the result, since ide_get_best_pio_mode()
returns the same explicit mode as was passed to it -- so is good for the
speedproc() methods also...
>>>> + (void)sl82c105_tunepio(drive, pio);
>>> Erm, I thought afterwards that I vainly folded one into another. I
>>> think it's worth moving those io_32bit and unmask flag assignments
>>> above back there... May also recast my patch. :-)
>> Moving them to ->init_hwif where they belong would be even better... ;-)
> Well, I wasn't sure where they belong... :-)
> So, OK to recast that patch?
Recasted it and reworked your patch atop of it (adding MWDMA 0/1 support as
a bonus! :-) -- now need to conduct some testing on a remote target...
>>>> +static int sl82c105_tune_chipset(ide_drive_t *drive, u8 mode)
>>>> +{
>>>> + mode = ide_rate_filter(drive, mode);
>>>> +
>>>> + if (mode >= XFER_PIO_0 && mode <= XFER_PIO_5)
>>>> + return sl82c105_tunepio(drive, mode - XFER_PIO_0);
>>>> +
>>>> + /*
>>>> + * TODO: add MWDMA0/1 support
>>>> + */
>>>> + BUG_ON(mode != XFER_MW_DMA_2);
I wonder is there are some W83C554 users anywhere -- that chipset also
supports UltraDMA...
MBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 10/13] sl82c105: add ->speedproc support
2007-03-14 20:51 ` [PATCH 10/13] sl82c105: add ->speedproc support Sergei Shtylyov
@ 2007-03-15 14:22 ` Woody Suwalski
2007-03-15 17:36 ` Russell King
2007-03-15 21:51 ` Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 5+ messages in thread
From: Woody Suwalski @ 2007-03-15 14:22 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-kernel
Sergei Shtylyov wrote:
> Hello, I wrote:
>
>>>> Bartlomiej Zolnierkiewicz wrote:
>
>>>>> [PATCH] sl82c105: add ->speedproc support
>
>>>>> * add sl82c105_tunepio() wrapper for sl82c105_tune_drive()
>>>>> (just to get the error value)
>
>>>>> * add sl82c105_tune_chipset() (->speedproc method) for setting
>>>>> transfer mode
>
>>>> Thanks for the patch!
>
>>>> > Index: b/drivers/ide/pci/sl82c105.c
>
>>>>> ===================================================================
>>>>> --- a/drivers/ide/pci/sl82c105.c
>>>>> +++ b/drivers/ide/pci/sl82c105.c
>
>> [...]
>
>>>>> @@ -114,17 +114,45 @@ static void sl82c105_tune_drive(ide_driv
>>>>> */
>>>>> drive->io_32bit = 1;
>>>>> drive->unmask = 1;
>>>>> +
>>>>> + return 0;
>>>>> +}
>>>>> +
>>>>> +static void sl82c105_tune_drive(ide_drive_t *drive, u8 pio)
>>>>> +{
>>>>> + /*
>>>>> + * TODO: find best PIO mode and set device speed here
>>>>> + * (requires adding helper function for getting PIO
>>>>> cycle time)
>>>>> + */
>
>>>> I thought we were doing it by calling ide_get_best_pio_mode()
>>>> above...
>
>>> We are also using ide_get_best_pio_mode() to get PIO cycle time
>>> so we can't move it here ATM.
>
>> I've found/used quite convenient workaround for that -- return PIO
>> mode actually selected from xxx_tune_pio(), then call
>> ide_config_drive_speed() from the real tuneproc() method.
>
> Works like charm with ignoring the result, since
> ide_get_best_pio_mode() returns the same explicit mode as was passed
> to it -- so is good for the speedproc() methods also...
>
>>>>> + (void)sl82c105_tunepio(drive, pio);
>
>>>> Erm, I thought afterwards that I vainly folded one into another.
>>>> I think it's worth moving those io_32bit and unmask flag
>>>> assignments above back there... May also recast my patch. :-)
>
>>> Moving them to ->init_hwif where they belong would be even better...
>>> ;-)
>
>> Well, I wasn't sure where they belong... :-)
>> So, OK to recast that patch?
>
> Recasted it and reworked your patch atop of it (adding MWDMA 0/1
> support as a bonus! :-) -- now need to conduct some testing on a
> remote target...
>
>>>>> +static int sl82c105_tune_chipset(ide_drive_t *drive, u8 mode)
>>>>> +{
>>>>> + mode = ide_rate_filter(drive, mode);
>>>>> +
>>>>> + if (mode >= XFER_PIO_0 && mode <= XFER_PIO_5)
>>>>> + return sl82c105_tunepio(drive, mode - XFER_PIO_0);
>>>>> +
>>>>> + /*
>>>>> + * TODO: add MWDMA0/1 support
>>>>> + */
>>>>> + BUG_ON(mode != XFER_MW_DMA_2);
>
> I wonder is there are some W83C554 users anywhere -- that chipset
> also supports UltraDMA...
>
> MBR, Sergei
Sergei,
ARM Netwinder machines are running hard disk IDE on SL82c105.
Could you send me the actual source file to try (or a patch)?
Thanks, Woody
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 10/13] sl82c105: add ->speedproc support
2007-03-15 14:22 ` Woody Suwalski
@ 2007-03-15 17:36 ` Russell King
2007-03-15 17:40 ` Sergei Shtylyov
0 siblings, 1 reply; 5+ messages in thread
From: Russell King @ 2007-03-15 17:36 UTC (permalink / raw)
To: Woody Suwalski
Cc: Sergei Shtylyov, Bartlomiej Zolnierkiewicz, linux-ide,
linux-kernel
On Thu, Mar 15, 2007 at 10:22:44AM -0400, Woody Suwalski wrote:
> Sergei Shtylyov wrote:
> > I wonder is there are some W83C554 users anywhere -- that chipset
> >also supports UltraDMA...
> >
> >MBR, Sergei
> Sergei,
>
> ARM Netwinder machines are running hard disk IDE on SL82c105.
> Could you send me the actual source file to try (or a patch)?
That's actually a W83C553 which does not support UDMA in any shape or
form according to the documents.
I guess it's an enhancement found on W83C554, and in that case any
attempt to add UDMA support to the SL82C105 driver should be done
such that these older chipsets continue to work.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 10/13] sl82c105: add ->speedproc support
2007-03-15 17:36 ` Russell King
@ 2007-03-15 17:40 ` Sergei Shtylyov
0 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2007-03-15 17:40 UTC (permalink / raw)
To: Russell King
Cc: Woody Suwalski, Bartlomiej Zolnierkiewicz, linux-ide,
linux-kernel
Hello.
Russell King wrote:
>>> I wonder is there are some W83C554 users anywhere -- that chipset
>>>also supports UltraDMA...
>>Sergei,
>>ARM Netwinder machines are running hard disk IDE on SL82c105.
>>Could you send me the actual source file to try (or a patch)?
> That's actually a W83C553 which does not support UDMA in any shape or
> form according to the documents.
> I guess it's an enhancement found on W83C554, and in that case any
> attempt to add UDMA support to the SL82C105 driver should be done
> such that these older chipsets continue to work.
I had no plans of adding it so far since there seemed to be no designs
using that chip but decided to ask if somebody is interested just in case...
MBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 10/13] sl82c105: add ->speedproc support
2007-03-14 20:51 ` [PATCH 10/13] sl82c105: add ->speedproc support Sergei Shtylyov
2007-03-15 14:22 ` Woody Suwalski
@ 2007-03-15 21:51 ` Bartlomiej Zolnierkiewicz
1 sibling, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-03-15 21:51 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linux-ide, linux-kernel
On Wednesday 14 March 2007, Sergei Shtylyov wrote:
> Hello, I wrote:
>
> >>> Bartlomiej Zolnierkiewicz wrote:
>
> >>>> [PATCH] sl82c105: add ->speedproc support
>
> >>>> * add sl82c105_tunepio() wrapper for sl82c105_tune_drive()
> >>>> (just to get the error value)
>
> >>>> * add sl82c105_tune_chipset() (->speedproc method) for setting
> >>>> transfer mode
>
> >>> Thanks for the patch!
>
> >>> > Index: b/drivers/ide/pci/sl82c105.c
>
> >>>> ===================================================================
> >>>> --- a/drivers/ide/pci/sl82c105.c
> >>>> +++ b/drivers/ide/pci/sl82c105.c
>
> > [...]
>
> >>>> @@ -114,17 +114,45 @@ static void sl82c105_tune_drive(ide_driv
> >>>> */
> >>>> drive->io_32bit = 1;
> >>>> drive->unmask = 1;
> >>>> +
> >>>> + return 0;
> >>>> +}
> >>>> +
> >>>> +static void sl82c105_tune_drive(ide_drive_t *drive, u8 pio)
> >>>> +{
> >>>> + /*
> >>>> + * TODO: find best PIO mode and set device speed here
> >>>> + * (requires adding helper function for getting PIO cycle
> >>>> time)
> >>>> + */
>
> >>> I thought we were doing it by calling ide_get_best_pio_mode() above...
>
> >> We are also using ide_get_best_pio_mode() to get PIO cycle time
> >> so we can't move it here ATM.
>
> > I've found/used quite convenient workaround for that -- return PIO
> > mode actually selected from xxx_tune_pio(), then call
> > ide_config_drive_speed() from the real tuneproc() method.
>
> Works like charm with ignoring the result, since ide_get_best_pio_mode()
> returns the same explicit mode as was passed to it -- so is good for the
> speedproc() methods also...
>
> >>>> + (void)sl82c105_tunepio(drive, pio);
>
> >>> Erm, I thought afterwards that I vainly folded one into another. I
> >>> think it's worth moving those io_32bit and unmask flag assignments
> >>> above back there... May also recast my patch. :-)
>
> >> Moving them to ->init_hwif where they belong would be even better... ;-)
>
> > Well, I wasn't sure where they belong... :-)
> > So, OK to recast that patch?
>
> Recasted it and reworked your patch atop of it (adding MWDMA 0/1 support as
> a bonus! :-) -- now need to conduct some testing on a remote target...
Great. :)
Bart
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-15 21:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200703102209.59918.bzolnier@gmail.com>
[not found] ` <45F32860.8040901@ru.mvista.com>
[not found] ` <200703102332.12716.bzolnier@gmail.com>
[not found] ` <45F551E5.8010904@ru.mvista.com>
2007-03-14 20:51 ` [PATCH 10/13] sl82c105: add ->speedproc support Sergei Shtylyov
2007-03-15 14:22 ` Woody Suwalski
2007-03-15 17:36 ` Russell King
2007-03-15 17:40 ` Sergei Shtylyov
2007-03-15 21:51 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox