public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: sekharan@us.ibm.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Add 'tpgs' sysfs attribute for SCSI devices
Date: Wed, 18 Mar 2009 15:02:30 +0100	[thread overview]
Message-ID: <49C0FEF6.6050507@suse.de> (raw)
In-Reply-To: <1237384735.3350.0.camel@localhost.localdomain>

James Bottomley wrote:
> On Wed, 2009-03-18 at 13:02 +0100, Hannes Reinecke wrote:
>> We need to export the 'TGPS' setting of the
>> inquiry data to properly support ALUA.
>>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> ---
>>  drivers/scsi/scsi_scan.c   |    1 +
>>  drivers/scsi/scsi_sysfs.c  |    2 ++
>>  include/scsi/scsi_device.h |    3 ++-
>>  3 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
>> index a14d245..d1619ed 100644
>> --- a/drivers/scsi/scsi_scan.c
>> +++ b/drivers/scsi/scsi_scan.c
>> @@ -836,6 +836,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
>>  	sdev->inq_periph_qual = (inq_result[0] >> 5) & 7;
>>  	sdev->lockable = sdev->removable;
>>  	sdev->soft_reset = (inq_result[7] & 1) && ((inq_result[3] & 7) == 2);
>> +	sdev->tpgs = (inq_result[5] >> 4) & 3;
> 
> As far as I can tell, this is a read only parameter, isn't it?
> 
> In that case, why not just do what we do for the SPI inquiry data and
> have a wrapper pulling it out of sdev->inquiry instead of a new flag in
> sdev?
> 
Because we're evaluating it later on from the device_handler.
But honestly I didn't inquire in that direction.
I'll be checking.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
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

  reply	other threads:[~2009-03-18 14:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-18 12:02 [PATCH] Add 'tpgs' sysfs attribute for SCSI devices Hannes Reinecke
2009-03-18 13:58 ` James Bottomley
2009-03-18 14:02   ` Hannes Reinecke [this message]
2009-03-18 14:09     ` James Bottomley

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=49C0FEF6.6050507@suse.de \
    --to=hare@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sekharan@us.ibm.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