Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-31 Thread Sergei Shtylyov
Hello. On 31-05-2013 10:53, Clemens Ladisch wrote: +const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array "static", otherwise the compiler will build the array every time this function is called. No, *const* specifier is enough to not

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-31 Thread Tejun Heo
On Fri, May 31, 2013 at 08:53:37AM +0200, Clemens Ladisch wrote: > Sergei Shtylyov wrote: > > On 30-05-2013 18:26, Timur Tabi wrote: > >>> +const unsigned long timing[] = { 5, 100, 500}; > > > >> You'll save space and time if you also make this array "static", > >> otherwise the compiler will

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-31 Thread Clemens Ladisch
Sergei Shtylyov wrote: > On 30-05-2013 18:26, Timur Tabi wrote: >>> +const unsigned long timing[] = { 5, 100, 500}; > >> You'll save space and time if you also make this array "static", >> otherwise the compiler will build the array every time this function is >> called. > > No, *const*

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-31 Thread Clemens Ladisch
Sergei Shtylyov wrote: On 30-05-2013 18:26, Timur Tabi wrote: +const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array static, otherwise the compiler will build the array every time this function is called. No, *const* specifier is enough

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-31 Thread Tejun Heo
On Fri, May 31, 2013 at 08:53:37AM +0200, Clemens Ladisch wrote: Sergei Shtylyov wrote: On 30-05-2013 18:26, Timur Tabi wrote: +const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array static, otherwise the compiler will build the array

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-31 Thread Sergei Shtylyov
Hello. On 31-05-2013 10:53, Clemens Ladisch wrote: +const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array static, otherwise the compiler will build the array every time this function is called. No, *const* specifier is enough to not

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Tejun Heo
On Thu, May 30, 2013 at 09:18:29AM -0500, Mark Langsdorf wrote: > The Calxeda SATA phy intermittently fails to bring up a link with Gen3 > Retrying the phy hard reset can work around the issue, but the drive > may fail again. In less than 150 out of 15000 test runs, it took more > than 10 tries

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Timur Tabi
On 05/30/2013 09:38 AM, Sergei Shtylyov wrote: >>> >> -const unsigned long *timing = >>> >> sata_ehc_deb_timing(>eh_context); >>> >> +const unsigned long timing[] = { 5, 100, 500}; >> > You'll save space and time if you also make this array "static", >> > otherwise the compiler

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Sergei Shtylyov
Hello. On 30-05-2013 18:26, Timur Tabi wrote: - const unsigned long *timing = sata_ehc_deb_timing(>eh_context); + const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array "static", otherwise the compiler will build the array every

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Timur Tabi
On 05/30/2013 09:18 AM, Mark Langsdorf wrote: > - const unsigned long *timing = sata_ehc_deb_timing(>eh_context); > + const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array "static", otherwise the compiler will build the array every time this

[PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Mark Langsdorf
The Calxeda SATA phy intermittently fails to bring up a link with Gen3 Retrying the phy hard reset can work around the issue, but the drive may fail again. In less than 150 out of 15000 test runs, it took more than 10 tries for the link to be established (but never more than 35). Triple the

[PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Mark Langsdorf
The Calxeda SATA phy intermittently fails to bring up a link with Gen3 Retrying the phy hard reset can work around the issue, but the drive may fail again. In less than 150 out of 15000 test runs, it took more than 10 tries for the link to be established (but never more than 35). Triple the

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Timur Tabi
On 05/30/2013 09:18 AM, Mark Langsdorf wrote: - const unsigned long *timing = sata_ehc_deb_timing(link-eh_context); + const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array static, otherwise the compiler will build the array every time this

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Sergei Shtylyov
Hello. On 30-05-2013 18:26, Timur Tabi wrote: - const unsigned long *timing = sata_ehc_deb_timing(link-eh_context); + const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array static, otherwise the compiler will build the array every

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Timur Tabi
On 05/30/2013 09:38 AM, Sergei Shtylyov wrote: -const unsigned long *timing = sata_ehc_deb_timing(link-eh_context); +const unsigned long timing[] = { 5, 100, 500}; You'll save space and time if you also make this array static, otherwise the compiler will build the array

Re: [PATCH v2] ata: increase retry count but shorten duration for Calxeda controller

2013-05-30 Thread Tejun Heo
On Thu, May 30, 2013 at 09:18:29AM -0500, Mark Langsdorf wrote: The Calxeda SATA phy intermittently fails to bring up a link with Gen3 Retrying the phy hard reset can work around the issue, but the drive may fail again. In less than 150 out of 15000 test runs, it took more than 10 tries for