From patchwork Mon Nov 9 22:03:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gianluca X-Patchwork-Id: 38015 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 351A9B7B68 for ; Tue, 10 Nov 2009 10:53:23 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753189AbZKIWQQ (ORCPT ); Mon, 9 Nov 2009 17:16:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753248AbZKIWQQ (ORCPT ); Mon, 9 Nov 2009 17:16:16 -0500 Received: from smtp-OUT05A.alice.it ([85.33.3.5]:2275 "EHLO smtp-OUT05A.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753189AbZKIWQQ (ORCPT ); Mon, 9 Nov 2009 17:16:16 -0500 X-Greylist: delayed 612 seconds by postgrey-1.27 at vger.kernel.org; Mon, 09 Nov 2009 17:16:16 EST Received: from FBCMMO01.fbc.local ([192.168.68.195]) by smtp-OUT05A.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2009 23:06:07 +0100 Received: from FBCMCL01B05.fbc.local ([192.168.69.86]) by FBCMMO01.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2009 23:06:07 +0100 Received: from mail.seek.priv ([87.0.18.120]) by FBCMCL01B05.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Mon, 9 Nov 2009 23:03:42 +0100 Received: from mail.seek.priv (localhost.seek.priv [127.0.0.1]) by mail.seek.priv (Postfix) with ESMTP id 2523A2F011D; Mon, 9 Nov 2009 23:03:39 +0100 (CET) Received: by mail.seek.priv (Postfix, from userid 1000) id 01A7F2F016C; Mon, 9 Nov 2009 23:03:38 +0100 (CET) Date: Mon, 9 Nov 2009 23:03:38 +0100 From: gianluca To: linux-ide@vger.kernel.org Cc: gianluca@sottospazio.it Subject: pata_ali can't detect partitions Message-ID: <20091109220338.GA1604@seek.priv> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: ClamAV using ClamSMTP X-OriginalArrivalTime: 09 Nov 2009 22:03:42.0780 (UTC) FILETIME=[8033B7C0:01CA6188] Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Hello, yesterday I tried to install archlinux-i586 on a old computer I have. It's a K6-3 with a ALI chipset. I noticed that the system was able to find the disk as sda but could not recognize the partitions on the drive. This happens with the 2.6.30-ARCH kernel of the archlinux-i586 installer. I noticed also that with an older kernel (2.6.28 IIRC) the system could detect all the partitions. So yesterday I had some spare time to try to bisect the problem with git bisect. The result of the bisection was the following commit: commit 1b2c357c301b76118973763e886d9f70a7f50f7e pata_ali: force initialise a few bits I tried to backout the commit but that didn't succeed. So I looked carefully at the diff and I came out with the attached patch which seems to fix the problem (at least now the kernel detects the partitions correctly). Since I saw that the above commit is fixing some real bugs (sunblade related) I don't know whether the attached patch is right or is backing out the intended fix. All I know is that it works for me and for this reason I'm reporting it. Thanks, Gianluca --- linux-2.6.31/drivers/ata/pata_ali.c.orig 2009-11-08 19:01:14.000000000 +0100 +++ linux-2.6.31/drivers/ata/pata_ali.c 2009-11-09 08:30:42.000000000 +0100 @@ -453,7 +453,7 @@ /* Clear CD-ROM DMA write bit */ tmp &= 0x7F; /* Cable and UDMA */ - pci_write_config_byte(pdev, 0x4B, tmp | 0x09); + pci_write_config_byte(pdev, 0x4B, tmp | 0x08); /* * CD_ROM DMA on (0x53 bit 0). Enable this even if we want * to use PIO. 0x53 bit 1 (rev 20 only) - enable FIFO control