All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@stratus.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Stanisław Pitucha" <viraptor@gmail.com>,
	"SCSI development list" <linux-scsi@vger.kernel.org>
Subject: Re: OOPS: unplugging western digital passport drive
Date: Mon, 22 Jun 2015 09:14:15 -0400	[thread overview]
Message-ID: <55880A27.2000008@stratus.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1506171505050.1343-100000@iolanthe.rowland.org>

Hi Alan -- last I heard from Stan on this bug was April 14 -- he was on
"long holidays" at that time :)

-- Joe

On 06/17/2015 03:09 PM, Alan Stern wrote:
> Joe or Stanisナ^ツaw:
> 
> I never heard anything back about this.  Does the patch fix the crash?
> 
> Alan Stern
> 
> 
> On Wed, 18 Mar 2015, Alan Stern wrote:
> 
>> On Wed, 18 Mar 2015, Alan Stern wrote:
>>
>>> On Tue, 17 Mar 2015, Joe Lawrence wrote:
>>>
>>>> On 03/11/2015 12:25 AM, Stanisław Pitucha wrote:
>>>>> Hi linux-scsi,
>>>>> I've got another case of reproducible crash when unplugging western
>>>>> digital passport drives. This was mentioned before in
>>>>> http://www.spinics.net/lists/linux-scsi/msg82603.html
>>>
>>> Like it says in that thread, the problem is somehow related to the ses
>>> driver.  If you remove or blacklist that driver, there won't be any
>>> more crashes.
>>
>> Looks like I spoke too soon.  I think the patch below will fix the 
>> problem.  Let me know what happens.
>>
>> Alan Stern
>>
>>
>>
>>
>> Index: usb-4.0/drivers/scsi/scsi_pm.c
>> ===================================================================
>> --- usb-4.0.orig/drivers/scsi/scsi_pm.c
>> +++ usb-4.0/drivers/scsi/scsi_pm.c
>> @@ -217,14 +217,18 @@ static int sdev_runtime_suspend(struct d
>>  {
>>  	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
>>  	struct scsi_device *sdev = to_scsi_device(dev);
>> -	int err;
>> +	struct device *blk_rpm_dev = sdev->request_queue->dev;
>> +	int err = 0;
>>  
>> -	err = blk_pre_runtime_suspend(sdev->request_queue);
>> -	if (err)
>> -		return err;
>> +	if (blk_rpm_dev) {
>> +		err = blk_pre_runtime_suspend(sdev->request_queue);
>> +		if (err)
>> +			return err;
>> +	}
>>  	if (pm && pm->runtime_suspend)
>>  		err = pm->runtime_suspend(dev);
>> -	blk_post_runtime_suspend(sdev->request_queue, err);
>> +	if (blk_rpm_dev)
>> +		blk_post_runtime_suspend(sdev->request_queue, err);
>>  
>>  	return err;
>>  }
>> @@ -246,12 +250,15 @@ static int sdev_runtime_resume(struct de
>>  {
>>  	struct scsi_device *sdev = to_scsi_device(dev);
>>  	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
>> +	struct device *blk_rpm_dev = sdev->request_queue->dev;
>>  	int err = 0;
>>  
>> -	blk_pre_runtime_resume(sdev->request_queue);
>> +	if (blk_rpm_dev)
>> +		blk_pre_runtime_resume(sdev->request_queue);
>>  	if (pm && pm->runtime_resume)
>>  		err = pm->runtime_resume(dev);
>> -	blk_post_runtime_resume(sdev->request_queue, err);
>> +	if (blk_rpm_dev)
>> +		blk_post_runtime_resume(sdev->request_queue, err);
>>  
>>  	return err;
>>  }
>>
>>
>>
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in

  reply	other threads:[~2015-06-22 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11  4:25 OOPS: unplugging western digital passport drive Stanisław Pitucha
2015-03-18  1:36 ` Joe Lawrence
2015-03-18 14:22   ` Alan Stern
2015-03-18 14:49   ` Alan Stern
2015-06-17 19:09     ` Alan Stern
2015-06-22 13:14       ` Joe Lawrence [this message]
2015-06-22 14:43         ` Alan Stern
     [not found] <CAFrYPTP0B5Hxf7PJhYDOt5GHSjZopdBM_91tL5=6S5=1YU+9PQ@mail.gmail.com>
2016-01-05 15:24 ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55880A27.2000008@stratus.com \
    --to=joe.lawrence@stratus.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=viraptor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.