From patchwork Fri Jun 10 21:37:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian King X-Patchwork-Id: 9170487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 86E7D607D9 for ; Fri, 10 Jun 2016 21:38:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7908128210 for ; Fri, 10 Jun 2016 21:38:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DB882833F; Fri, 10 Jun 2016 21:38:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B5A928210 for ; Fri, 10 Jun 2016 21:38:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753111AbcFJViA (ORCPT ); Fri, 10 Jun 2016 17:38:00 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:25769 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753281AbcFJVh7 (ORCPT ); Fri, 10 Jun 2016 17:37:59 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u5ALXe6b043825 for ; Fri, 10 Jun 2016 17:37:58 -0400 Received: from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159]) by mx0b-001b2d01.pphosted.com with ESMTP id 23g1e5nnga-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 10 Jun 2016 17:37:58 -0400 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Jun 2016 15:37:57 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 10 Jun 2016 15:37:54 -0600 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: brking@linux.vnet.ibm.com X-IBM-RcptTo: tj@kernel.org; linux-ide@vger.kernel.org; linux-scsi@vger.kernel.org Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id D5B5919D8047; Fri, 10 Jun 2016 15:37:33 -0600 (MDT) Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u5ALbrOv52756702; Fri, 10 Jun 2016 21:37:53 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8BE0AAE05C; Fri, 10 Jun 2016 17:37:53 -0400 (EDT) Received: from [9.10.86.84] (unknown [9.10.86.84]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id 5C792AE058; Fri, 10 Jun 2016 17:37:53 -0400 (EDT) Subject: [RFC] [PATCH 2/3] scsi: Export SCSI EH commands To: Tejun Heo , "linux-scsi@vger.kernel.org" , linux-ide References: <57470450.3070000@linux.vnet.ibm.com> <575B3215.5070602@linux.vnet.ibm.com> From: Brian King Date: Fri, 10 Jun 2016 16:37:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <575B3215.5070602@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16061021-0028-0000-0000-000004EBDC6F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16061021-0029-0000-0000-00002C8B1453 Message-Id: <575B3331.6030707@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-06-10_12:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606100240 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Export the following EH commands so that ipr can be converted to use libata's new EH. Signed-off-by: Brian King --- drivers/scsi/scsi_error.c | 5 +++-- include/scsi/scsi_eh.h | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff -puN drivers/scsi/scsi_error.c~scsi_eh_export_scsi_eh_abort_cmds drivers/scsi/scsi_error.c --- linux-2.6.git/drivers/scsi/scsi_error.c~scsi_eh_export_scsi_eh_abort_cmds 2016-06-10 15:50:03.191155441 -0500 +++ linux-2.6.git-bjking1/drivers/scsi/scsi_error.c 2016-06-10 15:50:03.201155322 -0500 @@ -1320,8 +1320,8 @@ static int scsi_eh_test_devices(struct l * no sense to try and abort the command, since as far as the shost * adapter is concerned, it isn't running. */ -static int scsi_eh_abort_cmds(struct list_head *work_q, - struct list_head *done_q) +int scsi_eh_abort_cmds(struct list_head *work_q, + struct list_head *done_q) { struct scsi_cmnd *scmd, *next; LIST_HEAD(check_list); @@ -1361,6 +1361,7 @@ static int scsi_eh_abort_cmds(struct lis return scsi_eh_test_devices(&check_list, work_q, done_q, 0); } +EXPORT_SYMBOL_GPL(scsi_eh_abort_cmds); /** * scsi_eh_try_stu - Send START_UNIT to device. diff -puN include/scsi/scsi_eh.h~scsi_eh_export_scsi_eh_abort_cmds include/scsi/scsi_eh.h --- linux-2.6.git/include/scsi/scsi_eh.h~scsi_eh_export_scsi_eh_abort_cmds 2016-06-10 15:50:03.195155394 -0500 +++ linux-2.6.git-bjking1/include/scsi/scsi_eh.h 2016-06-10 15:50:03.201155322 -0500 @@ -17,6 +17,11 @@ extern int scsi_block_when_processing_er extern bool scsi_command_normalize_sense(const struct scsi_cmnd *cmd, struct scsi_sense_hdr *sshdr); extern int scsi_check_sense(struct scsi_cmnd *); +extern int scsi_eh_abort_cmds(struct list_head *work_q, + struct list_head *done_q); +extern void scsi_eh_ready_devs(struct Scsi_Host *shost, + struct list_head *work_q, + struct list_head *done_q); static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr) {