Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1200367
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!diesel.cu.mi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Nicholas Krause <uboot477@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] csiostor:Fix error handling in the function csio_hws_ready |
| Date | Wed, 05 Aug 2015 04:50:01 +0200 |
| Message-ID | <pTWWd-4R3-1@gated-at.bofh.it> (permalink) |
| X-Original-To | JBottomley@odin.com |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=qrbtrzE7GWGlhGCmXlImbYrAYCQeZjWeQJRErUPh1O4=; b=OEOlCPYY+LzVqAB2iXPmD3JdyH+oB7SzexSGodYwgwNkLoTNNcRtA4v9T3wQbhZuE/ 7Wc0X9vZIIE+NliAT3sd85jxacEqaaWFBWX3jQimUaEOtcltSFym0zCGA03EIkOPrtXS wWusWUNcZwz1AQXXK4N/b60Ufd2cQ7u3hROpdlLmWMq1wKGSrmMVvnG3rMvlcrwKtgHr jVNoDL/RKDN6gJ3nPMTM5AFfGaVnT1WqhnMafJXAiP6jP29a9XEZb83eFqSXnI8N0orh GT+Q+zPwbhBoSowiAJhdKP9xDrSIUWxNapk2pLY3hVg66hh8aNtrPjQ37a6W/dPOujxX 64VA== |
| X-Received | by 10.50.97.97 with SMTP id dz1mr3149391igb.64.1438742533096; Tue, 04 Aug 2015 19:42:13 -0700 (PDT) |
| X-Mailer | git-send-email 2.1.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 48 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | davem@davemloft.net, hariprasad@chelsio.com, praveenm@chelsio.com, thenzl@redhat.com, dan.carpenter@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Nicholas Krause <xerofoify@gmail.com> |
| X-Original-Date | Tue, 4 Aug 2015 22:42:06 -0400 |
| X-Original-Message-ID | <1438742526-28530-1-git-send-email-uboot477@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1200367 |
Show key headers only | View raw
From: Nicholas Krause <xerofoify@gmail.com>
This fixes error handling in the function csio_hws_ready for when
this function calls csio_scim_cleanup_io to cleanup outstanding
commands by checking if it cleaned a error code to signal internal
failure and if so tell the user we are unable to clean up the
outstanding io commands by printing this to the console before
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
drivers/scsi/csiostor/csio_hw.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 622bdab..49c47d3 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -2445,11 +2445,17 @@ csio_hws_ready(struct csio_hw *hw, enum csio_hw_ev evt)
csio_set_state(&hw->sm, csio_hws_quiescing);
/* cleanup all outstanding cmds */
if (evt == CSIO_HWE_HBA_RESET ||
- evt == CSIO_HWE_PCIERR_DETECTED)
- csio_scsim_cleanup_io(csio_hw_to_scsim(hw), false);
- else
- csio_scsim_cleanup_io(csio_hw_to_scsim(hw), true);
-
+ evt == CSIO_HWE_PCIERR_DETECTED) {
+ if (csio_scsim_cleanup_io(csio_hw_to_scsim(hw), false)) {
+ csio_err(hw, "Unable to properly cleanup outstanding commands on this device\n");
+ return;
+ }
+ } else {
+ if (csio_scsim_cleanup_io(csio_hw_to_scsim(hw), true)) {
+ csio_err(hw, "Unable to properly cleanup outstanding commands on this device\n");
+ return;
+ }
+ }
csio_hw_intr_disable(hw);
csio_hw_mbm_cleanup(hw);
csio_evtq_stop(hw);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] csiostor:Fix error handling in the function csio_hws_ready Nicholas Krause <uboot477@gmail.com> - 2015-08-05 04:50 +0200
csiph-web