public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Linton <jlinton@tributary.com>
To: "Elliott, Robert (Server Storage)" <Elliott@hp.com>
Cc: Rob Evers <revers@redhat.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"michaelc@cs.wisc.edu" <michaelc@cs.wisc.edu>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"emilne@redhat.com" <emilne@redhat.com>
Subject: Re: [PATCH V3 1/4] Encapsulate scsi_do_report_luns
Date: Thu, 7 Mar 2013 10:06:55 -0600	[thread overview]
Message-ID: <5138BB1F.9080904@tributary.com> (raw)
In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B402950DA726C@G9W0745.americas.hpqcorp.net>

On 3/7/2013 9:47 AM, Elliott, Robert (Server Storage) wrote:

>> +int scsi_do_report_luns(struct scsi_device *sdev, int length, +	 * We
>> can get a UNIT ATTENTION, for example a power on/reset, so +	 * retry a
>> few times (like sd.c does for TEST UNIT READY). +	 * Experience shows
>> some combinations of adapter/devices get at +	 * least two power
>> on/resets. +	for (retries = 0; retries < 3; retries++) { +
>> SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO "scsi scan: Sending" +				  "
>> REPORT LUNS to %s (try %d)\n", devname, +				  retries)); +		result =
>> scsi_execute_req(sdev, scsi_cmd, DMA_FROM_DEVICE, +					  lun_data,
>> length, &sshdr, +					  SCSI_TIMEOUT + 4 * HZ, 3, NULL);
> 
> There's no guarantee that you'll get no more than two unit attention
> conditions at any particular time;

	Actually, if your getting any unit attentions from a report luns the device
is broken. SAM5 5.14

"if a REPORT LUNS command enters the enabled command state, the device server
shall process the REPORTS LUNS command and shall not report any unit attention
conditions"

This is not new behavior either.


There are a couple other places that say similar things, INQUIRY and REPORT
LUNS get special status for UA. Which is how you can scan a target/lun
configuration without interfering with its operation. Personally, I think the
TUR in the mid layer is incorrect as the TUR functionality needs to be hoisted
higher up the stack and the mid layer needs to use inquiry to validate device
communications. (got a patch for that too, but no point in posting it, as it
will be ignored).



  reply	other threads:[~2013-03-07 16:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 13:38 [PATCH V3 0/4] Configure number of LUs reported by 'report-luns' Rob Evers
2013-03-07 13:38 ` [PATCH V3 1/4] Encapsulate scsi_do_report_luns Rob Evers
2013-03-07 15:47   ` Elliott, Robert (Server Storage)
2013-03-07 16:06     ` Jeremy Linton [this message]
2013-03-07 17:01       ` Elliott, Robert (Server Storage)
2013-03-07 17:30         ` James Bottomley
2013-03-07 17:38           ` Elliott, Robert (Server Storage)
2013-03-07 17:48             ` James Bottomley
2013-03-07 17:42           ` Jeremy Linton
2013-03-07 13:38 ` [PATCH V3 2/4] Configure reported luns Rob Evers
2013-03-07 13:38 ` [PATCH V3 3/4] Change kmallocs in report_luns to use GFP_KERNEL Rob Evers
2013-03-07 13:38 ` [PATCH V3 4/4] Use set/get_unaligned_be32 in report_luns Rob Evers
2013-03-07 14:31 ` [PATCH V3 0/4] Configure number of LUs reported by 'report-luns' Ewan Milne
2013-03-07 17:01 ` Rob Evers

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=5138BB1F.9080904@tributary.com \
    --to=jlinton@tributary.com \
    --cc=Elliott@hp.com \
    --cc=bvanassche@acm.org \
    --cc=emilne@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    --cc=revers@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox