Commit 45f769b2 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: hpsa: do not print errors for unsupported report luns format

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: default avatarHannes Reinecke <hare@suse.com>
Acked-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 65e8697e
...@@ -3601,7 +3601,7 @@ static int hpsa_scsi_do_report_luns(struct ctlr_info *h, int logical, ...@@ -3601,7 +3601,7 @@ static int hpsa_scsi_do_report_luns(struct ctlr_info *h, int logical,
memset(scsi3addr, 0, sizeof(scsi3addr)); memset(scsi3addr, 0, sizeof(scsi3addr));
if (fill_cmd(c, logical ? HPSA_REPORT_LOG : HPSA_REPORT_PHYS, h, if (fill_cmd(c, logical ? HPSA_REPORT_LOG : HPSA_REPORT_PHYS, h,
buf, bufsize, 0, scsi3addr, TYPE_CMD)) { buf, bufsize, 0, scsi3addr, TYPE_CMD)) {
rc = -1; rc = -EAGAIN;
goto out; goto out;
} }
if (extended_response) if (extended_response)
...@@ -3614,16 +3614,19 @@ static int hpsa_scsi_do_report_luns(struct ctlr_info *h, int logical, ...@@ -3614,16 +3614,19 @@ static int hpsa_scsi_do_report_luns(struct ctlr_info *h, int logical,
if (ei->CommandStatus != 0 && if (ei->CommandStatus != 0 &&
ei->CommandStatus != CMD_DATA_UNDERRUN) { ei->CommandStatus != CMD_DATA_UNDERRUN) {
hpsa_scsi_interpret_error(h, c); hpsa_scsi_interpret_error(h, c);
rc = -1; rc = -EIO;
} else { } else {
struct ReportLUNdata *rld = buf; struct ReportLUNdata *rld = buf;
if (rld->extended_response_flag != extended_response) { if (rld->extended_response_flag != extended_response) {
dev_err(&h->pdev->dev, if (!h->legacy_board) {
"report luns requested format %u, got %u\n", dev_err(&h->pdev->dev,
extended_response, "report luns requested format %u, got %u\n",
rld->extended_response_flag); extended_response,
rc = -1; rld->extended_response_flag);
rc = -EINVAL;
} else
rc = -EOPNOTSUPP;
} }
} }
out: out:
...@@ -3639,7 +3642,7 @@ static inline int hpsa_scsi_do_report_phys_luns(struct ctlr_info *h, ...@@ -3639,7 +3642,7 @@ static inline int hpsa_scsi_do_report_phys_luns(struct ctlr_info *h,
rc = hpsa_scsi_do_report_luns(h, 0, buf, bufsize, rc = hpsa_scsi_do_report_luns(h, 0, buf, bufsize,
HPSA_REPORT_PHYS_EXTENDED); HPSA_REPORT_PHYS_EXTENDED);
if (!rc || !hpsa_allow_any) if (!rc || rc != -EOPNOTSUPP)
return rc; return rc;
/* REPORT PHYS EXTENDED is not supported */ /* REPORT PHYS EXTENDED is not supported */
...@@ -6617,7 +6620,6 @@ static int fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h, ...@@ -6617,7 +6620,6 @@ static int fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h,
default: default:
dev_warn(&h->pdev->dev, "unknown command 0x%c\n", cmd); dev_warn(&h->pdev->dev, "unknown command 0x%c\n", cmd);
BUG(); BUG();
return -1;
} }
} else if (cmd_type == TYPE_MSG) { } else if (cmd_type == TYPE_MSG) {
switch (cmd) { switch (cmd) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment