linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Prager <linux@matthiasprager.de>
To: Tejun Heo <tj@kernel.org>
Cc: Robert Trace <maillist@farcaster.org>,
	linux-scsi@vger.kernel.org, Jens Axboe <jaxboe@fusionio.com>,
	Eric Moore <Eric.Moore@lsi.com>,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	Alan <alan@lxorguk.ukuu.org.uk>,
	"Darrick J. Wong" <djwong@us.ibm.com>
Subject: Re: 'Device not ready' issue on mpt2sas since 3.1.10
Date: Sat, 21 Jul 2012 14:15:56 +0200	[thread overview]
Message-ID: <500A9D7C.8080801@matthiasprager.de> (raw)
In-Reply-To: <20120717200136.GC24336@google.com>

Am 17.07.2012 22:01, schrieb Tejun Heo:
> On Tue, Jul 17, 2012 at 09:39:41PM +0200, Matthias Prager wrote:
>> I could not however reproduce the issue on any other device than a LSI
>> SAS controller (using SATA disks) - on a regular ICH10 using AHCI and a
>> SATA drive I don't see these i/o errors. But since I'm experiencing
>> these issues on two different systems (both with lsi controllers while
>> running vmware-guests on them) and Robert sees them on his
>> (non-virtualized) system with the same lsi controller (9211-8i), I'm
>> inclined to make the following assumptions:
>> Either it is an issue which is limited to this controller and possibly
>> sata disks hanging off it or it is a more general issue with sas
>> controllers and sata disks (again it could well affect sas disks too).
>> Lacking other controllers or sas disks I can't be sure.
> 
> So, nothing in the libata stack generates NOT_READY - "initializing
> command required".  I suppose it's LSI firmware / driver translating
> TUR to CHECK_POWER_MODE and generating NOT_READY.  I don't know what
> SAT says about this but this can't be correct.  An ATA device in
> standby mode is ready to process any commands.  It should be able to
> come back to full operation on demand as necessary and that's why it
> can be transparently enabled from device side.  Eric?
> 

While reading the linux-scsi mailing list I stumbled upon

'[Bug 16070] Fail to issue Start/Stop Unit'
<http://marc.info/?l=linux-scsi&m=134278835822649&w=2>
(bugtracker: <https://bugzilla.kernel.org/show_bug.cgi?id=16070>)

which lead me to trying to enable the 'allow_restart' flag for my disks.
With this workaround a vanilla kernel 3.4.5 does not exhibit the i/o
errors on sleeping sata disks hanging off sas controllers.


I'm currently running one of my systems with a

'echo 1 | tee /sys/block/sd?/device/scsi_disk/*/allow_restart >/dev/null'

line added to the init scripts. This way I can use the untouched kernel
sources and still get around the i/o errors. But I reckon this is no
solution.


I'm no expert on scsi/sas/ata internals, so please take the following
thoughts with a grain of salt:

As far as I can see (and Tejun confirmed that - I think) Tejun commit
85ef06d1d252f6a2e73b678591ab71caad4667bb somehow exposes a bug, which
lies deeper in the sas/ata code. The 'sas_slave_configure()' function in
'drivers/scsi/libsas/sas_scsi_host.c' sets the 'allow_restart' flag for
sas disks hanging off sas controllers. But if it encounters a sata disk
it calls 'ata_sas_slave_configure()' in 'drivers/ata/libata_scsi.c'
instead and returns without enabling the 'allow_restart' flag. A simple
fix would be to set allow_restart=1 after having called
'ata_sas_slave_configure()' but before returning (in
'sas_slave_configure()').

Now I'm not sure this isn't taping over another bug. Which leads me to
my question: What is the correct behavior?

#1 Issuing a separate spin-up command (START UNIT?) prior to sending i/o
by setting allow_restart=1 for sata disks on sas controllers

or

#2 Teaching the sas drivers they do not need spin-up commands and can
simply start issuing i/o to sata disks

--
Matthias

  reply	other threads:[~2012-07-21 12:16 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 11:19 'Device not ready' issue on mpt2sas since 3.1.10 Matthias Prager
2012-07-09 14:40 ` Matthias Prager
2012-07-09 19:37   ` Robert Trace
2012-07-09 20:45     ` Darrick J. Wong
2012-07-09 22:24       ` Robert Trace
2012-07-10  0:21         ` Matthias Prager
2012-07-10  1:56           ` Robert Trace
2012-07-10 16:54         ` Darrick J. Wong
2012-07-10  0:12     ` Matthias Prager
2012-07-10  1:51       ` Robert Trace
2012-07-10 23:27         ` Robert Trace
2012-07-11 12:19           ` Matthias Prager
2012-07-11 13:48             ` Matthias Prager
2012-07-17 18:09               ` Tejun Heo
2012-07-17 19:39                 ` Matthias Prager
2012-07-17 20:01                   ` Tejun Heo
2012-07-21 12:15                     ` Matthias Prager [this message]
2012-07-22 17:31                       ` Tejun Heo
2012-07-22 23:14                         ` Matthias Prager
2012-07-23 15:26                           ` Tejun Heo
2012-07-24 22:04                             ` Matthias Prager
2012-07-25 10:26                               ` Reddy, Sreekanth
2012-07-25 14:19                         ` James Bottomley
2012-07-25 17:17                           ` Tejun Heo
2012-07-25 19:55                             ` James Bottomley
2012-07-25 23:56                               ` Matthias Prager
2012-07-26 19:16                                 ` Robert Trace
2012-08-16 18:26                               ` Robert Trace
2012-08-16 20:24                                 ` Matthias Prager
2012-08-16 20:33                                   ` Robert Trace
2012-07-25 22:35                         ` tomm
2012-07-26 19:20                           ` Robert Trace
2012-07-09 22:08   ` NeilBrown
2012-07-10  0:03     ` Matthias Prager
  -- strict thread matches above, loose matches on Subject: below --
2015-11-27 10:28 Felix Matouschek

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=500A9D7C.8080801@matthiasprager.de \
    --to=linux@matthiasprager.de \
    --cc=Eric.Moore@lsi.com \
    --cc=JBottomley@parallels.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=djwong@us.ibm.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=maillist@farcaster.org \
    --cc=tj@kernel.org \
    /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 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).