From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: [patch 10/21] ide: fix drive side 80c cable check Date: Tue, 20 Feb 2007 17:37:41 -0800 Message-ID: <20070221013741.GK30227@kroah.com> References: <20070221012758.925122216@mini.kroah.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline; filename="ide-fix-drive-side-80c-cable-check.patch" In-Reply-To: <20070221013619.GA30227@kroah.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-kernel@vger.kernel.org, stable@kernel.org, Alan Cc: Justin Forbes , Zwane Mwaikambo , Theodore Ts'o , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@linux-foundation.org, akpm@linux-foundation.org, linux-ide@vger.kernel.org, bzolnier@gmail.com, Tejun Heo List-Id: linux-ide@vger.kernel.org -stable review patch. If anyone has any objections, please let us know. ------------------ eighty_ninty_three() had word 93 validitity check but not the 80c bit test itself (bit 12). This increases the chance of incorrect wire detection especially because host side cable detection is often unreliable and we sometimes soley depend on drive side cable detection. Fix it. Signed-off-by: Tejun Heo Acked-by: Alan Signed-off-by: Greg Kroah-Hartman --- drivers/ide/ide-iops.c | 2 ++ 1 file changed, 2 insertions(+) --- linux-2.6.19.4.orig/drivers/ide/ide-iops.c +++ linux-2.6.19.4/drivers/ide/ide-iops.c @@ -607,6 +607,8 @@ u8 eighty_ninty_three (ide_drive_t *driv if(!(drive->id->hw_config & 0x4000)) return 0; #endif /* CONFIG_IDEDMA_IVB */ + if (!(drive->id->hw_config & 0x2000)) + return 0; return 1; } --