* [PATCH] cciss: add 30 second initial timeout wait on controller reset
@ 2010-03-15 13:13 Tomas Henzl
2010-03-15 13:25 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Henzl @ 2010-03-15 13:13 UTC (permalink / raw)
To: linux-scsi; +Cc: jens.axboe, James.Bottomley, Mike.Miller, scameron
It looks like the patch - cciss: remove 30 second initial timeout on controller reset
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e18cfd04feca78cc08a6b8b71a60a610de81eaa
has caused a regression.
During kdump a box with an 5i controller freezes.
The HP Smart Array 5i Controller probably needs some more time
of inactivity after reset.
To get rid of it we can revert the above mentioned patch or use
the patch below which adds an additional timeout only for this
one controller (HP Smart Array 5i). I haven't seen this with other
cciss controllers.
cciss: add 30 second initial timeout wait on controller reset
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 9e3af30..34ec2c7 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4172,9 +4172,13 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
return -ENODEV;
- /* Now try to get the controller to respond to a no-op. Some
- devices (notably the HP Smart Array 5i Controller) need
- up to 30 seconds to respond. */
+ /* The HP Smart Array 5i Controller needs
+ * at least 20 seconds before first status checking
+ * set it to 30 seconds for this controller to be sure */
+ if (0x4080 == pdev->subsystem_device)
+ schedule_timeout_uninterruptible(30*HZ);
+
+ /* Now try to get the controller to respond to a no-op. */
for (i=0; i<30; i++) {
if (cciss_noop(pdev) == 0)
break;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cciss: add 30 second initial timeout wait on controller reset
2010-03-15 13:13 [PATCH] cciss: add 30 second initial timeout wait on controller reset Tomas Henzl
@ 2010-03-15 13:25 ` James Bottomley
2010-03-15 14:30 ` Tomas Henzl
0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2010-03-15 13:25 UTC (permalink / raw)
To: Tomas Henzl; +Cc: linux-scsi, jens.axboe, Mike.Miller, scameron
On Mon, 2010-03-15 at 14:13 +0100, Tomas Henzl wrote:
> It looks like the patch - cciss: remove 30 second initial timeout on controller reset
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e18cfd04feca78cc08a6b8b71a60a610de81eaa
> has caused a regression.
> During kdump a box with an 5i controller freezes.
> The HP Smart Array 5i Controller probably needs some more time
> of inactivity after reset.
> To get rid of it we can revert the above mentioned patch or use
> the patch below which adds an additional timeout only for this
> one controller (HP Smart Array 5i). I haven't seen this with other
> cciss controllers.
>
> cciss: add 30 second initial timeout wait on controller reset
>
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
>
> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> index 9e3af30..34ec2c7 100644
> --- a/drivers/block/cciss.c
> +++ b/drivers/block/cciss.c
> @@ -4172,9 +4172,13 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
> if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
> return -ENODEV;
>
> - /* Now try to get the controller to respond to a no-op. Some
> - devices (notably the HP Smart Array 5i Controller) need
> - up to 30 seconds to respond. */
> + /* The HP Smart Array 5i Controller needs
> + * at least 20 seconds before first status checking
> + * set it to 30 seconds for this controller to be sure */
> + if (0x4080 == pdev->subsystem_device)
> + schedule_timeout_uninterruptible(30*HZ);
The HZ thing is deprecated, plus if you really want an interruptible
sleep, you need to check for signals going in.
It's far better to use msleep_interruptible, which does all of this for
you (of course, it might be even better if we had ssleep_interruptible).
James
> +
> + /* Now try to get the controller to respond to a no-op. */
> for (i=0; i<30; i++) {
> if (cciss_noop(pdev) == 0)
> break;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cciss: add 30 second initial timeout wait on controller reset
2010-03-15 13:25 ` James Bottomley
@ 2010-03-15 14:30 ` Tomas Henzl
2010-03-15 14:52 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Henzl @ 2010-03-15 14:30 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi, jens.axboe, Mike.Miller, scameron
On 03/15/2010 02:25 PM, James Bottomley wrote:
> On Mon, 2010-03-15 at 14:13 +0100, Tomas Henzl wrote:
>
>> It looks like the patch - cciss: remove 30 second initial timeout on controller reset
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e18cfd04feca78cc08a6b8b71a60a610de81eaa
>> has caused a regression.
>> During kdump a box with an 5i controller freezes.
>> The HP Smart Array 5i Controller probably needs some more time
>> of inactivity after reset.
>> To get rid of it we can revert the above mentioned patch or use
>> the patch below which adds an additional timeout only for this
>> one controller (HP Smart Array 5i). I haven't seen this with other
>> cciss controllers.
>>
>> cciss: add 30 second initial timeout wait on controller reset
>>
>> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
>>
>> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
>> index 9e3af30..34ec2c7 100644
>> --- a/drivers/block/cciss.c
>> +++ b/drivers/block/cciss.c
>> @@ -4172,9 +4172,13 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
>> if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
>> return -ENODEV;
>>
>> - /* Now try to get the controller to respond to a no-op. Some
>> - devices (notably the HP Smart Array 5i Controller) need
>> - up to 30 seconds to respond. */
>> + /* The HP Smart Array 5i Controller needs
>> + * at least 20 seconds before first status checking
>> + * set it to 30 seconds for this controller to be sure */
>> + if (0x4080 == pdev->subsystem_device)
>> + schedule_timeout_uninterruptible(30*HZ);
>>
> The HZ thing is deprecated, plus if you really want an interruptible
> sleep, you need to check for signals going in.
>
> It's far better to use msleep_interruptible, which does all of this for
> you (of course, it might be even better if we had ssleep_interruptible).
>
> James
>
schedule_timeout_uninterruptible is used in this module and this function
so it would keep the style.
I don't want to care about signals so ssleep is fine?
Tomas
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 9e3af30..6696eb6 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4172,9 +4172,13 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
return -ENODEV;
- /* Now try to get the controller to respond to a no-op. Some
- devices (notably the HP Smart Array 5i Controller) need
- up to 30 seconds to respond. */
+ /* The HP Smart Array 5i Controller needs
+ * at least 20 seconds before first status checking
+ * set it to 30 seconds for this controller to be sure */
+ if (0x4080 == pdev->subsystem_device)
+ ssleep(30);
+
+ /* Now try to get the controller to respond to a no-op. */
for (i=0; i<30; i++) {
if (cciss_noop(pdev) == 0)
break;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cciss: add 30 second initial timeout wait on controller reset
2010-03-15 14:30 ` Tomas Henzl
@ 2010-03-15 14:52 ` James Bottomley
2010-05-19 13:38 ` Tomas Henzl
0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2010-03-15 14:52 UTC (permalink / raw)
To: Tomas Henzl; +Cc: linux-scsi, jens.axboe, Mike.Miller, scameron
On Mon, 2010-03-15 at 15:30 +0100, Tomas Henzl wrote:
> On 03/15/2010 02:25 PM, James Bottomley wrote:
> > On Mon, 2010-03-15 at 14:13 +0100, Tomas Henzl wrote:
> >
> >> It looks like the patch - cciss: remove 30 second initial timeout on controller reset
> >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e18cfd04feca78cc08a6b8b71a60a610de81eaa
> >> has caused a regression.
> >> During kdump a box with an 5i controller freezes.
> >> The HP Smart Array 5i Controller probably needs some more time
> >> of inactivity after reset.
> >> To get rid of it we can revert the above mentioned patch or use
> >> the patch below which adds an additional timeout only for this
> >> one controller (HP Smart Array 5i). I haven't seen this with other
> >> cciss controllers.
> >>
> >> cciss: add 30 second initial timeout wait on controller reset
> >>
> >> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> >>
> >> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
> >> index 9e3af30..34ec2c7 100644
> >> --- a/drivers/block/cciss.c
> >> +++ b/drivers/block/cciss.c
> >> @@ -4172,9 +4172,13 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
> >> if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
> >> return -ENODEV;
> >>
> >> - /* Now try to get the controller to respond to a no-op. Some
> >> - devices (notably the HP Smart Array 5i Controller) need
> >> - up to 30 seconds to respond. */
> >> + /* The HP Smart Array 5i Controller needs
> >> + * at least 20 seconds before first status checking
> >> + * set it to 30 seconds for this controller to be sure */
> >> + if (0x4080 == pdev->subsystem_device)
> >> + schedule_timeout_uninterruptible(30*HZ);
> >>
> > The HZ thing is deprecated, plus if you really want an interruptible
> > sleep, you need to check for signals going in.
> >
> > It's far better to use msleep_interruptible, which does all of this for
> > you (of course, it might be even better if we had ssleep_interruptible).
> >
> > James
> >
>
> schedule_timeout_uninterruptible is used in this module and this function
> so it would keep the style.
> I don't want to care about signals so ssleep is fine?
Yes, sorry, we've so many different variants of functions that all do
approximately the same thing that I sometimes get confused ... I misread
the above for schedule_timeout_interruptible (missing the un). So
ssleep is perfect.
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cciss: add 30 second initial timeout wait on controller reset
2010-03-15 14:52 ` James Bottomley
@ 2010-05-19 13:38 ` Tomas Henzl
0 siblings, 0 replies; 5+ messages in thread
From: Tomas Henzl @ 2010-05-19 13:38 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi, jens.axboe, Mike.Miller, scameron
On 03/15/2010 03:52 PM, James Bottomley wrote:
> On Mon, 2010-03-15 at 15:30 +0100, Tomas Henzl wrote:
>
>> On 03/15/2010 02:25 PM, James Bottomley wrote:
>>
>>> On Mon, 2010-03-15 at 14:13 +0100, Tomas Henzl wrote:
>>>
>>>
>>>> It looks like the patch - cciss: remove 30 second initial timeout on controller reset
>>>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e18cfd04feca78cc08a6b8b71a60a610de81eaa
>>>> has caused a regression.
>>>> During kdump a box with an 5i controller freezes.
>>>> The HP Smart Array 5i Controller probably needs some more time
>>>> of inactivity after reset.
>>>> To get rid of it we can revert the above mentioned patch or use
>>>> the patch below which adds an additional timeout only for this
>>>> one controller (HP Smart Array 5i). I haven't seen this with other
>>>> cciss controllers.
>>>>
>>>> cciss: add 30 second initial timeout wait on controller reset
>>>>
>>>> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
>>>>
>>>> diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
>>>> index 9e3af30..34ec2c7 100644
>>>> --- a/drivers/block/cciss.c
>>>> +++ b/drivers/block/cciss.c
>>>> @@ -4172,9 +4172,13 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
>>>> if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
>>>> return -ENODEV;
>>>>
>>>> - /* Now try to get the controller to respond to a no-op. Some
>>>> - devices (notably the HP Smart Array 5i Controller) need
>>>> - up to 30 seconds to respond. */
>>>> + /* The HP Smart Array 5i Controller needs
>>>> + * at least 20 seconds before first status checking
>>>> + * set it to 30 seconds for this controller to be sure */
>>>> + if (0x4080 == pdev->subsystem_device)
>>>> + schedule_timeout_uninterruptible(30*HZ);
>>>>
>>>>
>>> The HZ thing is deprecated, plus if you really want an interruptible
>>> sleep, you need to check for signals going in.
>>>
>>> It's far better to use msleep_interruptible, which does all of this for
>>> you (of course, it might be even better if we had ssleep_interruptible).
>>>
>>> James
>>>
>>>
>> schedule_timeout_uninterruptible is used in this module and this function
>> so it would keep the style.
>> I don't want to care about signals so ssleep is fine?
>>
> Yes, sorry, we've so many different variants of functions that all do
> approximately the same thing that I sometimes get confused ... I misread
> the above for schedule_timeout_interruptible (missing the un). So
> ssleep is perfect.
>
> James
>
Is there something more I could do for this patch?
Tomas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-19 13:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-15 13:13 [PATCH] cciss: add 30 second initial timeout wait on controller reset Tomas Henzl
2010-03-15 13:25 ` James Bottomley
2010-03-15 14:30 ` Tomas Henzl
2010-03-15 14:52 ` James Bottomley
2010-05-19 13:38 ` Tomas Henzl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).