Received: by 10.192.165.148 with SMTP id m20csp800888imm; Fri, 27 Apr 2018 07:44:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpmeLVZIz9cIOgK3oFR5Vr5Z/0fcFUEruIinTUx4sD4DU/KAxjAH8qVsCP3l2A4+ndHde0E X-Received: by 2002:a17:902:5914:: with SMTP id o20-v6mr2607162pli.40.1524840258047; Fri, 27 Apr 2018 07:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524840258; cv=none; d=google.com; s=arc-20160816; b=R6BM84n7NKj911prNYhDDja/TO5SwzhnhmRtyZEEKVcNLSeH6PqYG+8ObVN+9kQmC7 3O7Qlr0D/wQGDWCywpySM9I2N15rDfnQx45ycj1JIT8WzOKvc7W53HlCOk9UdLOxfW17 dqA1P4VYRUYNT+f3ZF3Oi7Q5c5M1lVOxDlk3W2+bu7zWUt2FRjFi8Y4SFfmD/7mGHIfT 7hbbo9nRb6tnYKE+r8FurzhExYYFanepwNWSWVXBtI5jOMxHhZX7xndr0cg0cImhMyzk Xryxy85/X2qF4KVGIAWW/6TQeuEuXeV0j+ZLloi2vmYnk3QcOPGLeiSwT4wIbMnHRc26 yvHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=qEfvoZC5IgwosccPFNw3XQo2irI5848DQUB3ih+9wWI=; b=MgOFDW0fxjDyAWe44+1O9XoMN1B2mRGFUaaDWWk2y3T0R9OCf+6E6JzZZDCZ6uFE9E wGtWvaOgYEmj5MQ1bclsh4gJPuwn20qRysI9cDjf7/Am21R2QLIwb8NlEX3xObP4nUP2 Y8ofXVcMOk8Skl5LyOtiIaZ2oafC0c06IsTFZbbE2+becVTtt0iSfACFcpXXk5tWCko4 kktDlip0XkCHnbYXxBoOApEYtCAYOPzg6/a6+INnlIbgSKFDJ9fYGOipVhfOthpObqOZ HqtXMYItbusbSYuB0FG3IKpOo8Lq17WSXXP69xPPPhUhcGBbHSluH/BmG9cLy10fXU96 uffA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si1317604pld.412.2018.04.27.07.44.03; Fri, 27 Apr 2018 07:44:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934577AbeD0OIw (ORCPT + 99 others); Fri, 27 Apr 2018 10:08:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:54262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933961AbeD0OIo (ORCPT ); Fri, 27 Apr 2018 10:08:44 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E3B5B21892; Fri, 27 Apr 2018 14:08:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E3B5B21892 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Vivier , Jens Axboe , Stan Johnson , Finn Thain Subject: [PATCH 4.14 69/80] block/swim: Check drive type Date: Fri, 27 Apr 2018 15:59:02 +0200 Message-Id: <20180427135736.453851864@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135732.928644313@linuxfoundation.org> References: <20180427135732.928644313@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Finn Thain commit 8a500df63d07d8aee44b7ee2c54e462e47ce93ec upstream. The SWIM chip is compatible with GCR-mode Sony 400K/800K drives but this driver only supports MFM mode. Therefore only Sony FDHD drives are supported. Skip incompatible drives. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/block/swim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -834,10 +834,12 @@ static int swim_floppy_init(struct swim_ /* scan floppy drives */ swim_drive(base, INTERNAL_DRIVE); - if (swim_readbit(base, DRIVE_PRESENT)) + if (swim_readbit(base, DRIVE_PRESENT) && + !swim_readbit(base, ONEMEG_DRIVE)) swim_add_floppy(swd, INTERNAL_DRIVE); swim_drive(base, EXTERNAL_DRIVE); - if (swim_readbit(base, DRIVE_PRESENT)) + if (swim_readbit(base, DRIVE_PRESENT) && + !swim_readbit(base, ONEMEG_DRIVE)) swim_add_floppy(swd, EXTERNAL_DRIVE); /* register floppy drives */