Received: by 10.192.165.148 with SMTP id m20csp781105imm; Fri, 27 Apr 2018 07:25:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqENbmN6d5J2Ju0TCFNc99OZ8zg/T1lr14/uivfaqygsfIyRrCSYmNvxgWQrEQS7JqIbmsU X-Received: by 2002:a17:902:8692:: with SMTP id g18-v6mr2528748plo.152.1524839145612; Fri, 27 Apr 2018 07:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524839145; cv=none; d=google.com; s=arc-20160816; b=eOnKl126jjahTdnh10h/txEQFBW++Sqe/M8T8+V4lE3xj0r9CeB1XqDFKhDszBcbz5 djsXl6qtIasXkcs8t8lttBDYG4Mb3uPOub2lfS2bPvZCq67rY9/AEyQ3V/EeiHliyB5f gT2aYK82OVtsD1ciG/xq31Z4p5NbWoPHkp2dy1HQxqCmL71+OYeHRJzdMIaEDlljskZq KE/ywguRjItcUBqnn2sgufZXgN3y71CE21GjP8RSCjP6nWzpPmtzpqWBUA9a7Cbrfqp/ /NGb+n1XaCRiwKDXnkh3twC2P5m8wEQ9eLOBPGmP5OgGZT7uDnLzwQCk0z3Zxcff3f5c eBYg== 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=ilEv5cfjTyqB6KQ7QdXIBDizAOn8Xii82YOSdatPX+c=; b=E9tDVbwLUfOERjOcQSBAc1KjzJxu4lC84ycbInUglXvcODJmk6RpGs1Mi/PxAdt1uf zuxb3p8vJ39mPjKPLjyJ6dXZu2qznN9/W0PdoB0/tpgYAAdRD+Hnp6G5dPe6imFYGG9Y dPvHj4EVBgMBbaKSfcx9RV2jFr9JazLBSDjVRk9fmrRbJVred9tdr+1BPJalJ5CJsPp6 zuO7nIsJ8EwbLBKHGdaVhd+GRavTbf+0sVLmcyD4fj4hSzdonPfxekDXscdv4UXiq6FC +kwrft5EFjrITAB24Xaw8ux2beFSE5xn8abUtjSQP24Z4+tCUoEzDNojGknclB43qMCS JAHg== 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 a92-v6si1402787pla.291.2018.04.27.07.25.31; Fri, 27 Apr 2018 07:25:45 -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 S935152AbeD0OMU (ORCPT + 99 others); Fri, 27 Apr 2018 10:12:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:56862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934912AbeD0OMR (ORCPT ); Fri, 27 Apr 2018 10:12:17 -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 C2A0F21895; Fri, 27 Apr 2018 14:12:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2A0F21895 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.16 66/81] block/swim: Check drive type Date: Fri, 27 Apr 2018 15:59:08 +0200 Message-Id: <20180427135747.149951028@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135743.216853156@linuxfoundation.org> References: <20180427135743.216853156@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.16-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 */