From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
Don Brace <don.brace@microsemi.com>, Meelis Roos <mroos@linux.ee>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Hannes Reinecke <hare@suse.com>
Subject: [PATCHv2 4/6] hpsa: do not print errors for unsupported report luns format
Date: Mon, 14 Aug 2017 13:19:13 +0200 [thread overview]
Message-ID: <1502709555-15837-5-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1502709555-15837-1-git-send-email-hare@suse.de>
Legacy boards might not support the 'extended' report luns format,
but as this is to be expected we don't need to print out an error here.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Don Brace <don.brace@microsemi.com>
---
drivers/scsi/hpsa.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index b34ec42..c90a83d 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3601,7 +3601,7 @@ static int hpsa_scsi_do_report_luns(struct ctlr_info *h, int logical,
memset(scsi3addr, 0, sizeof(scsi3addr));
if (fill_cmd(c, logical ? HPSA_REPORT_LOG : HPSA_REPORT_PHYS, h,
buf, bufsize, 0, scsi3addr, TYPE_CMD)) {
- rc = -1;
+ rc = -EAGAIN;
goto out;
}
if (extended_response)
@@ -3614,16 +3614,17 @@ static int hpsa_scsi_do_report_luns(struct ctlr_info *h, int logical,
if (ei->CommandStatus != 0 &&
ei->CommandStatus != CMD_DATA_UNDERRUN) {
hpsa_scsi_interpret_error(h, c);
- rc = -1;
+ rc = -EIO;
} else {
struct ReportLUNdata *rld = buf;
if (rld->extended_response_flag != extended_response) {
- dev_err(&h->pdev->dev,
- "report luns requested format %u, got %u\n",
- extended_response,
- rld->extended_response_flag);
- rc = -1;
+ if (!h->legacy_board)
+ dev_err(&h->pdev->dev,
+ "report luns requested format %u, got %u\n",
+ extended_response,
+ rld->extended_response_flag);
+ rc = -EOPNOTSUPP;
}
}
out:
@@ -3639,7 +3640,10 @@ static inline int hpsa_scsi_do_report_phys_luns(struct ctlr_info *h,
rc = hpsa_scsi_do_report_luns(h, 0, buf, bufsize,
HPSA_REPORT_PHYS_EXTENDED);
- if (!rc || !hpsa_allow_any)
+ if (rc == -EOPNOTSUPP) {
+ if (!h->legacy_board)
+ return rc;
+ } else if (rc < 0)
return rc;
/* REPORT PHYS EXTENDED is not supported */
@@ -6617,7 +6621,6 @@ static int fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h,
default:
dev_warn(&h->pdev->dev, "unknown command 0x%c\n", cmd);
BUG();
- return -1;
}
} else if (cmd_type == TYPE_MSG) {
switch (cmd) {
--
1.8.5.6
next prev parent reply other threads:[~2017-08-14 11:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 11:19 [PATCHv2 0/6] hpsa legacy support Hannes Reinecke
2017-08-14 11:19 ` [PATCHv2 1/6] hpsa: add support for legacy boards Hannes Reinecke
2017-08-14 11:19 ` [PATCHv2 2/6] hpsa: disable volume status check " Hannes Reinecke
2017-08-14 11:19 ` [PATCHv2 3/6] hpsa: Ignore errors for unsupported LV_DEVICE_ID VPD page Hannes Reinecke
2017-08-14 11:19 ` Hannes Reinecke [this message]
2017-08-14 11:19 ` [PATCHv2 5/6] hpsa: handle unsupported devices more gracefully Hannes Reinecke
2017-08-14 11:19 ` [PATCHv2 6/6] cciss: Drop obsolete driver Hannes Reinecke
2017-08-14 18:10 ` Don Brace
2017-08-15 3:39 ` [PATCHv2 0/6] hpsa legacy support Martin K. Petersen
2017-08-15 6: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=1502709555-15837-5-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=don.brace@microsemi.com \
--cc=hare@suse.com \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mroos@linux.ee \
/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.