Message ID | 20220426081731.823926698@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31C8EC433F5 for <stable@archiver.kernel.org>; Tue, 26 Apr 2022 08:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344615AbiDZI0E (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 26 Apr 2022 04:26:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344299AbiDZI0C (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 26 Apr 2022 04:26:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1770D39B8F; Tue, 26 Apr 2022 01:22:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A7EB26179E; Tue, 26 Apr 2022 08:22:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2A0CC385A0; Tue, 26 Apr 2022 08:22:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650961375; bh=yx8av04Y5xxLJJnNv+WtjSdUDUvPluHDdTSScXGxX4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eH01vc+/dD+5dznQIdPe/TJ4fF+Mu44+rhak/8KVRGl+bNDqLTxsxIEpw9jjU6W71 iiwXBCGL0WoXjHty6c1GROqwyFQIEKyLFh9MFpToLFvl7KoTbRntWWIZ2ksUqwKMdZ edj/uUKf2zPXWQ9jcKiOB5lPeITdRusUdoX2rV1o= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Zheyu Ma <zheyuma97@gmail.com>, Damien Le Moal <damien.lemoal@opensource.wdc.com> Subject: [PATCH 4.9 15/24] ata: pata_marvell: Check the bmdma_addr beforing reading Date: Tue, 26 Apr 2022 10:21:09 +0200 Message-Id: <20220426081731.823926698@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081731.370823950@linuxfoundation.org> References: <20220426081731.370823950@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c @@ -82,6 +82,8 @@ static int marvell_cable_detect(struct a switch(ap->port_no) { case 0: + if (!ap->ioaddr.bmdma_addr) + return ATA_CBL_PATA_UNK; if (ioread8(ap->ioaddr.bmdma_addr + 1) & 1) return ATA_CBL_PATA40; return ATA_CBL_PATA80;