From patchwork Wed Oct 12 05:25:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 9372087 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 28B0A60865 for ; Wed, 12 Oct 2016 05:26:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C3CC28F46 for ; Wed, 12 Oct 2016 05:26:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 110B228F50; Wed, 12 Oct 2016 05:26:04 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 A92CD28F4C for ; Wed, 12 Oct 2016 05:26:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751970AbcJLF0A (ORCPT ); Wed, 12 Oct 2016 01:26:00 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33052 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751529AbcJLFZ6 (ORCPT ); Wed, 12 Oct 2016 01:25:58 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u9C5Nl35126526 for ; Wed, 12 Oct 2016 01:25:40 -0400 Received: from e24smtp02.br.ibm.com (e24smtp02.br.ibm.com [32.104.18.86]) by mx0a-001b2d01.pphosted.com with ESMTP id 261dxxjnp7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 12 Oct 2016 01:25:39 -0400 Received: from localhost by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Oct 2016 02:25:37 -0300 Received: from d24dlp02.br.ibm.com (9.18.248.206) by e24smtp02.br.ibm.com (10.172.0.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 12 Oct 2016 02:25:35 -0300 Received: from d24relay04.br.ibm.com (d24relay04.br.ibm.com [9.18.232.146]) by d24dlp02.br.ibm.com (Postfix) with ESMTP id 995031DC0054 for ; Wed, 12 Oct 2016 01:25:34 -0400 (EDT) Received: from d24av03.br.ibm.com (d24av03.br.ibm.com [9.8.31.95]) by d24relay04.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u9C5PY9939911650 for ; Wed, 12 Oct 2016 02:25:34 -0300 Received: from d24av03.br.ibm.com (localhost [127.0.0.1]) by d24av03.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u9C5PYFN004707 for ; Wed, 12 Oct 2016 02:25:34 -0300 Received: from localhost ([9.85.134.72]) by d24av03.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u9C5PWLa004703; Wed, 12 Oct 2016 02:25:33 -0300 From: Gabriel Krisman Bertazi To: jejb@linux.vnet.ibm.com Cc: brking@linux.vnet.ibm.com, linux-scsi@vger.kernel.org, Gabriel Krisman Bertazi Subject: [PATCH 2/2] sr: Drop custom handling of unit attention Date: Wed, 12 Oct 2016 02:25:21 -0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476249921-17017-1-git-send-email-krisman@linux.vnet.ibm.com> References: <1476249921-17017-1-git-send-email-krisman@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16101205-0020-0000-0000-0000024FD1EE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16101205-0021-0000-0000-000030553A32 Message-Id: <1476249921-17017-2-git-send-email-krisman@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-10-12_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610120088 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 This is no longer necessary, since we handle it in scsi_execute. Signed-off-by: Gabriel Krisman Bertazi --- drivers/scsi/sr_ioctl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index 03054c0e7689..f7724e52fd0f 100644 --- a/drivers/scsi/sr_ioctl.c +++ b/drivers/scsi/sr_ioctl.c @@ -179,8 +179,7 @@ static int sr_play_trkind(struct cdrom_device_info *cdi, } /* We do our own retries because we want to know what the specific - error code is. Normally the UNIT_ATTENTION code will automatically - clear after one error */ + error code is. */ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) { @@ -220,8 +219,6 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc) if (!cgc->quiet) sr_printk(KERN_INFO, cd, "disc change detected.\n"); - if (retries++ < 10) - goto retry; err = -ENOMEDIUM; break; case NOT_READY: /* This happens if there is no disc in drive */