linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Komuro <komurojun-mbn@nifty.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	jgarzik@redhat.com, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-pcmcia <linux-pcmcia@lists.infradead.org>,
	Kristoffer Ericson <kristoffer.ericson@gmail.com>
Subject: Re: [KERNEL 2.6.26-rc4]  bugreport : pata_pcmcia with Sandisk Extreme III 8GB
Date: Mon, 16 Jun 2008 12:07:14 +0900	[thread overview]
Message-ID: <4855D8E2.10409@gmail.com> (raw)
In-Reply-To: <20080614213612.96873c25.komurojun-mbn@nifty.com>

[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

Hello,

Komuro wrote:
> On Sat, 14 Jun 2008 03:20:41 -0400
> Jeff Garzik <jeff@garzik.org> wrote:
> 
> 
> After removing the 3-lines below in ata_eh_reset
> the pata_pcmcia works properly.
> 
> 
> -       spin_lock_irqsave(link->ap->lock, flags);
> -       link->eh_info.serror = 0;
> -       spin_unlock_irqrestore(link->ap->lock, flags);
> 
> Please fix this problem.

Thanks for diagnosing the problem but it doesn't make any sense at all.
 Those three lines just clear cached SError value.  pata_pcmcia being a
PATA driver, SError is not implemented and always zero.

Also the init_one error is -ENOMEM.  For the above change to make any
difference, EH should have been entered which is invoked deep into
ata_host_register() and once control reaches that point it never returns
error code.  I have difficult time imagining any way the above diff can
have anything to do with the reported failure.

Please apply the attached patch and report the log after probe failure.

Thanks.

-- 
tejun

[-- Attachment #2: pata_pcmcia-debug.patch --]
[-- Type: text/x-patch, Size: 1776 bytes --]

diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 3d39f9d..d5bcdc2 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -177,8 +177,10 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
 	struct ata_port_operations *ops = &pcmcia_port_ops;
 
 	info = kzalloc(sizeof(*info), GFP_KERNEL);
-	if (info == NULL)
+	if (info == NULL) {
+		printk("XXX info alloc failed\n");
 		return -ENOMEM;
+	}
 
 	/* Glue stuff together. FIXME: We may be able to get rid of info with care */
 	info->pdev = pdev;
@@ -196,8 +198,10 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
 	/* Allocate resoure probing structures */
 
 	stk = kzalloc(sizeof(*stk), GFP_KERNEL);
-	if (!stk)
+	if (!stk) {
+		printk("XXX stk alloc failed\n");
 		goto out1;
+	}
 
 	cfg = &stk->parse.cftable_entry;
 
@@ -290,8 +294,11 @@ next_entry:
 	ret = -ENOMEM;
 	io_addr = devm_ioport_map(&pdev->dev, io_base, 8);
 	ctl_addr = devm_ioport_map(&pdev->dev, ctl_base, 1);
-	if (!io_addr || !ctl_addr)
+	if (!io_addr || !ctl_addr) {
+		printk("XXX ioport_map failed io_addr=%p ctl_addr=%p\n",
+		       io_addr, ctl_addr);
 		goto failed;
+	}
 
 	/* Success. Disable the IRQ nIEN line, do quirks */
 	iowrite8(0x02, ctl_addr);
@@ -311,8 +318,10 @@ next_entry:
 	 */
 	ret = -ENOMEM;
 	host = ata_host_alloc(&pdev->dev, n_ports);
-	if (!host)
+	if (!host) {
+		printk("XXX host alloc failed\n");
 		goto failed;
+	}
 
 	for (p = 0; p < n_ports; p++) {
 		ap = host->ports[p];
@@ -331,8 +340,10 @@ next_entry:
 	/* activate */
 	ret = ata_host_activate(host, pdev->irq.AssignedIRQ, ata_sff_interrupt,
 				IRQF_SHARED, &pcmcia_sht);
-	if (ret)
+	if (ret) {
+		printk("XXX host activate failed ret=%d\n", ret);
 		goto failed;
+	}
 
 	info->ndev = 1;
 	kfree(stk);

  reply	other threads:[~2008-06-16  3:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080528225049.9a134e0d.Kristoffer.Ericson@Gmail.com>
     [not found] ` <20080528222740.GB20893@isilmar.linta.de>
     [not found]   ` <20080530135728.be02d3dc.Kristoffer.Ericson@Gmail.com>
     [not found]     ` <20080607223716.7d142072.komurojun-mbn@nifty.com>
2008-06-11  7:20       ` [KERNEL 2.6.26-rc4] bugreport : pata_pcmcia with Sandisk Extreme III 8GB Dominik Brodowski
2008-06-14  3:00         ` Komuro
2008-06-14  7:20           ` Jeff Garzik
2008-06-14 12:36             ` Komuro
2008-06-16  3:07               ` Tejun Heo [this message]
2008-06-16 13:11                 ` Komuro
2008-06-16 13:24                   ` Tejun Heo
2008-06-17 12:23                     ` Komuro
2008-06-17 14:09                       ` Tejun Heo
2008-06-17 14:15                         ` Dominik Brodowski
2008-06-18 12:23                         ` Komuro
2008-07-06  1:37                       ` Komuro
2008-07-06 14:19                         ` Tejun Heo
2008-07-07 12:42                           ` Komuro
2008-07-09  4:10                             ` Tejun Heo
2008-07-12  2:39                               ` Komuro
2008-06-22  1:07                 ` Komuro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4855D8E2.10409@gmail.com \
    --to=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=jgarzik@redhat.com \
    --cc=komurojun-mbn@nifty.com \
    --cc=kristoffer.ericson@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux@dominikbrodowski.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).