Received: by 10.213.65.68 with SMTP id h4csp1079852imn; Sat, 31 Mar 2018 18:45:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4//+NFyzPcqU69dILW9IJlILsWIfwM7Nzf26MgrDpq32Wg6+t4x4JvrMCLP0aUWHyKRWh6N X-Received: by 10.101.96.47 with SMTP id p15mr2983155pgu.430.1522547122959; Sat, 31 Mar 2018 18:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522547122; cv=none; d=google.com; s=arc-20160816; b=kTGyr6SNtGH2hKMw8DfUfPWi8pUa6b7ShvwB1aI4wcCUqZeRDTL5LG+fMboNm/KkOl 0ta31NxdG9VOR1XxEAT2x1vCbncYMD3zTtVg/Hbw+SJ6bgs+QtBJ+WKivDUHcUjsmVIG cMaJzAIWTgxgWX9jz2eLnZWy5nsv+bsB+vhHvpvH3XoYwu2rZQIe1Ky+SSeBZ9+kWk2K kZpzorvlDJXsHusyJLgJvtd+LYtQmhx5xXqwOYx2Feg8YKKWLLZFLSdjnhAGUrTsV/Sk wvg7EOaSUwkARFG+9rCtDzFCyzCffyFm/f39ElDb+OxdGbjJZehFRF3SVqtfkfJglZFK LV6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to:arc-authentication-results; bh=kJ1bbpg6IJq2Wd6E+qExFv7RT8nl6+km1K83rfNtpyI=; b=BPCjM3QgCEpyIK4njGew8D32gMBPFJfa76q6Nd3v8q5Nhw5wY9LGz77z5r3Y9Yzxug uAbm9L13meGHPuejY4zYTklyCJ5FNu77BDhh5KCJ7JTFmOT+7HjBGgu/Ksuew2SSLMgQ IKLrynhbp95tPanczDyPb0bP166XdoX10idQKQ3ZuOCqMSuDp03ru/ZTVuwB4gdR/dLK jMaDVF5z+fde/Rpu7/Y+XNeE41uzc4hP6gYgr+Drqn70nocEsEejyen48qThD/A++/6/ IhLxhHMhGjjWZtGTeJf5JLRVD+N/nF/29ayYtydi0Y7KqdfuwzwqBaidATVeroXQo6HG mVZA== 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 70-v6si11783226ple.639.2018.03.31.18.45.09; Sat, 31 Mar 2018 18:45:22 -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 S1753367AbeDABmI (ORCPT + 99 others); Sat, 31 Mar 2018 21:42:08 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:47388 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753105AbeDABlI (ORCPT ); Sat, 31 Mar 2018 21:41:08 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 5CD0722966; Sat, 31 Mar 2018 21:41:05 -0400 (EDT) To: Geert Uytterhoeven Cc: Laurent Vivier , Jens Axboe , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Message-Id: <6b8e15516afd2179cdc1073793d22a7bdb04e32f.1522546571.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH 10/12] block/swim: Check drive type Date: Sat, 31 Mar 2018 21:41:05 -0400 (EDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/block/swim.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/block/swim.c b/drivers/block/swim.c index d69cc5dadbfc..6e3ebf5519e3 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -841,10 +841,12 @@ static int swim_floppy_init(struct swim_priv *swd) /* 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 */ -- 2.16.1