From: "Ewan D. Milne" <emilne@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: Re: [PATCH 1/3] scsi_dh_rdac: switch to scsi_execute_req_flags()
Date: Wed, 02 Nov 2016 11:44:29 -0400 [thread overview]
Message-ID: <1478101469.1001.9.camel@localhost.localdomain> (raw)
In-Reply-To: <1478036978-30583-2-git-send-email-hare@suse.de>
On Tue, 2016-11-01 at 22:49 +0100, Hannes Reinecke wrote:
...
> static int get_lun_info(struct scsi_device *sdev, struct rdac_dh_data *h,
> char *array_name, u8 *array_id)
> {
> - int err, i;
> - struct c8_inquiry *inqp;
> + int err = SCSI_DH_IO, i;
> + struct c8_inquiry *inqp = &h->inq.c8;
>
> - err = submit_inquiry(sdev, 0xC8, sizeof(struct c8_inquiry), h);
> - if (err == SCSI_DH_OK) {
> - inqp = &h->inq.c8;
> + if (!scsi_get_vpd_page(sdev, 0xC8, (unsigned char *)inqp,
> + sizeof(struct c8_inquiry))) {
> if (inqp->page_code != 0xc8)
> return SCSI_DH_NOSYS;
> if (inqp->page_id[0] != 'e' || inqp->page_id[1] != 'd' ||
> @@ -453,20 +382,20 @@ static int get_lun_info(struct scsi_device *sdev, struct rdac_dh_data *h,
> *(array_name+ARRAY_LABEL_LEN-1) = '\0';
> memset(array_id, 0, UNIQUE_ID_LEN);
> memcpy(array_id, inqp->array_unique_id, inqp->array_uniq_id_len);
> + err = SCSI_DH_OK;
> }
> return err;
> }
>
In this and other places the patch changes the code from submitting the
INQUIRY/EVPD command for the page it wants, to calling scsi_get_vpd_page().
scsi_get_vpd_page() will return -EINVAL if the device did not report in
VPD page 0 that the requested page is in the list of supported pages.
Did you actually verify that the RDAC returns all of these VPD pages in
its VPD page 0 list?
I mean, I know it's supposed to, but these are old devices.
-Ewan
next prev parent reply other threads:[~2016-11-02 15:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 21:49 [PATCHv2 0/3] scsi_dh: switch to scsi_execute_req_flags() Hannes Reinecke
2016-11-01 21:49 ` [PATCH 1/3] scsi_dh_rdac: " Hannes Reinecke
2016-11-02 15:06 ` Christoph Hellwig
2016-11-03 13:07 ` Hannes Reinecke
2016-11-02 15:44 ` Ewan D. Milne [this message]
2016-11-02 21:27 ` Hannes Reinecke
2016-11-03 16:11 ` Ewan D. Milne
2016-11-03 22:06 ` Hannes Reinecke
2016-11-01 21:49 ` [PATCH 2/3] scsi_dh_emc: " Hannes Reinecke
2016-11-02 15:08 ` Christoph Hellwig
2016-11-01 21:49 ` [PATCH 3/3] scsi_dh_hp_sw: " Hannes Reinecke
2016-11-02 15:10 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2016-11-03 13:20 [PATCHv3 0/3] scsi_dh: " Hannes Reinecke
2016-11-03 13:20 ` [PATCH 1/3] scsi_dh_rdac: " Hannes Reinecke
2016-10-31 17:59 [PATCH 0/3] scsi_dh: " Hannes Reinecke
2016-10-31 17:59 ` [PATCH 1/3] scsi_dh_rdac: " Hannes Reinecke
2016-11-01 14:47 ` Christoph Hellwig
2016-11-01 19:22 ` Hannes Reinecke
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=1478101469.1001.9.camel@localhost.localdomain \
--to=emilne@redhat.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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