public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Tejun Heo <htejun@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: NV SATA breakage: jgarzik/libata-dev#upstream etc
Date: Mon, 25 Sep 2006 19:15:27 +0200	[thread overview]
Message-ID: <m364fbrhow.fsf@defiant.localdomain> (raw)
In-Reply-To: m3vencjeit.fsf@defiant.localdomain

Ok, rebooted it.

After that commit (fea63e38013ec628ab3f7fddc4c2148064b7910a), it does:

ata1: SATA max UDMA/133 cmd 0xC800 ctl 0xC482 bmdma 0xC000 irq 225

GPF: 0 [1]
RIP: ata_device_add+0x19a/0x530
RAX: 48000002d0b38d48
R14: ffff81003f7cc7e0

Call trace:
nv_init_one+0x190/0x1f0
pci_match_device
pci_device_probe
driver_probe_device
__driver_attach
__driver_attach
bus_for_each_dev
driver_register
__pci_register_driver
nv_init
etc.

ata_device_add:
...
 193:   49 8b 46 08             mov    0x8(%r14),%rax <<<< ap->ops = invalid
 197:   4c 89 f7                mov    %r14,%rdi      <<<< ap
 19a:   ff 90 f8 00 00 00       callq  *0xf8(%rax)    <<<< ap->ops->port_start
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
And it GPFs here (ap->ops->port_start(ap)).

Actually it seems the ap->ops = RAX is invalid but not exactly a NULL ptr.

Now, sata_nv.c: nv_init_one():
	struct ata_port_info *ppi;
	ppi = &nv_port_info[ent->driver_data];
	probe_ent = ata_pci_init_native_mode(pdev, &ppi,
        	ATA_PORT_PRIMARY | ATA_ PORT_SECONDARY);

while
/**
 *      ata_pci_init_native_mode - Initialize native-mode driver
 *      @pdev:  pci device to be initialized
 *      @port:  array[2] of pointers to port info structures.
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Not sure... should the nv_init_one() just read:
	struct ata_port_info *ppi[2];
	ppi[0] = ppi[1] = &nv_port_info[ent->driver_data];
	probe_ent = ata_pci_init_native_mode(pdev, ppi,
        	ATA_PORT_PRIMARY | ATA_ PORT_SECONDARY);

or should
	ppi[1] = NULL?
-- 
Krzysztof Halasa

  reply	other threads:[~2006-09-25 17:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-24 18:57 NV SATA breakage: jgarzik/libata-dev#upstream etc Krzysztof Halasa
2006-09-25  0:25 ` Jeff Garzik
2006-09-25 12:51   ` Krzysztof Halasa
2006-09-25 17:15     ` Krzysztof Halasa [this message]
2006-09-25 22:20       ` Jeff Garzik
2006-09-25 23:50         ` Krzysztof Halasa
2006-09-25 23:52           ` Jeff Garzik
2006-09-26  0:29             ` Krzysztof Halasa

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=m364fbrhow.fsf@defiant.localdomain \
    --to=khc@pm.waw.pl \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    /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