From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
To: jejb@linux.vnet.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org
Cc: David.Carroll@microsemi.com, Gana.Sridaran@microsemi.com,
Scott.Benesh@microsemi.com, jthumshirn@suse.de
Subject: [PATCH V4 09/24] aacraid: Added support for read medium error
Date: Thu, 2 Feb 2017 15:53:23 -0800 [thread overview]
Message-ID: <20170202235338.14724-10-RaghavaAditya.Renukunta@microsemi.com> (raw)
In-Reply-To: <20170202235338.14724-1-RaghavaAditya.Renukunta@microsemi.com>
This patch processes Raw IO read medium errors.
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: Dave Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
---
Changes in V2:
None
Changes in V3:
None
Changes in V4:
None
drivers/scsi/aacraid/aachba.c | 10 ++++++++++
drivers/scsi/aacraid/aacraid.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 7eec260..04e4a1f 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -62,6 +62,7 @@
#define SENCODE_END_OF_DATA 0x00
#define SENCODE_BECOMING_READY 0x04
#define SENCODE_INIT_CMD_REQUIRED 0x04
+#define SENCODE_UNRECOVERED_READ_ERROR 0x11
#define SENCODE_PARAM_LIST_LENGTH_ERROR 0x1A
#define SENCODE_INVALID_COMMAND 0x20
#define SENCODE_LBA_OUT_OF_RANGE 0x21
@@ -1997,6 +1998,15 @@ static void io_callback(void *context, struct fib * fibptr)
min_t(size_t, sizeof(dev->fsa_dev[cid].sense_data),
SCSI_SENSE_BUFFERSIZE));
break;
+ case ST_MEDERR:
+ scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 |
+ SAM_STAT_CHECK_CONDITION;
+ set_sense(&dev->fsa_dev[cid].sense_data, MEDIUM_ERROR,
+ SENCODE_UNRECOVERED_READ_ERROR, ASENCODE_NO_SENSE, 0, 0);
+ memcpy(scsicmd->sense_buffer, &dev->fsa_dev[cid].sense_data,
+ min_t(size_t, sizeof(dev->fsa_dev[cid].sense_data),
+ SCSI_SENSE_BUFFERSIZE));
+ break;
default:
#ifdef AAC_DETAILED_STATUS_INFO
printk(KERN_WARNING "io_callback: io failed, status = %d\n",
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index d1f5a66..b54c1bf 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1462,6 +1462,7 @@ struct aac_dev
#define ST_IO 5
#define ST_NXIO 6
#define ST_E2BIG 7
+#define ST_MEDERR 8
#define ST_ACCES 13
#define ST_EXIST 17
#define ST_XDEV 18
--
2.7.4
next prev parent reply other threads:[~2017-02-03 6:30 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 23:53 [PATCH V4 00/24] aacraid: Patchset for Smart Family Support Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 01/24] aacraid: Remove duplicate irq management code Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 02/24] aacraid: Added aacraid.h include guard Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 03/24] aacraid: added support for init_struct_8 Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 04/24] aacraid: Added sa firmware support Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 05/24] aacraid: Retrieve and update the device types Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 06/24] aacraid: Reworked scsi command submission path Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 07/24] aacraid: Process Error for response I/O Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 08/24] aacraid: Added support for response path Raghava Aditya Renukunta
2017-02-03 9:05 ` Johannes Thumshirn
2017-02-02 23:53 ` Raghava Aditya Renukunta [this message]
2017-02-02 23:53 ` [PATCH V4 10/24] aacraid: Reworked aac_command_thread Raghava Aditya Renukunta
2017-02-03 9:09 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 11/24] aacraid: Added support for periodic wellness sync Raghava Aditya Renukunta
2017-02-03 9:12 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 12/24] aacraid: Retrieve Queue Depth from Adapter FW Raghava Aditya Renukunta
2017-02-03 9:14 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 13/24] aacraid: Added support to set QD of attached drives Raghava Aditya Renukunta
2017-02-03 9:16 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 14/24] aacraid: Added support for hotplug Raghava Aditya Renukunta
2017-02-03 9:17 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 15/24] aacraid: Include HBA direct interface Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 16/24] aacraid: Add task management functionality Raghava Aditya Renukunta
2017-02-03 9:22 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 17/24] aacraid: Added support to abort cmd and reset lun Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 18/24] aacraid: VPD 83 type3 support Raghava Aditya Renukunta
2017-02-03 9:23 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 19/24] aacraid: Added new IWBR reset Raghava Aditya Renukunta
2017-02-03 9:26 ` Johannes Thumshirn
2017-02-02 23:53 ` [PATCH V4 20/24] aacraid: Added ioctl to trigger IOP/IWBR reset Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 21/24] aacraid: Retrieve HBA host information ioctl Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 22/24] aacraid: Update copyrights Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 23/24] aacraid: Change Driver Version Prefix Raghava Aditya Renukunta
2017-02-02 23:53 ` [PATCH V4 24/24] aacraid: update version Raghava Aditya Renukunta
2017-02-07 0:18 ` [PATCH V4 00/24] aacraid: Patchset for Smart Family Support Martin K. Petersen
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=20170202235338.14724-10-RaghavaAditya.Renukunta@microsemi.com \
--to=raghavaaditya.renukunta@microsemi.com \
--cc=David.Carroll@microsemi.com \
--cc=Gana.Sridaran@microsemi.com \
--cc=Scott.Benesh@microsemi.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=jthumshirn@suse.de \
--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 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.