From: Jeff Garzik <jgarzik@pobox.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Randy Dunlap <randy_d_dunlap@linux.intel.com>,
lkml <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH 8/13] ATA ACPI: PATA methods
Date: Tue, 28 Feb 2006 07:02:56 -0500 [thread overview]
Message-ID: <44043BF0.5090809@pobox.com> (raw)
In-Reply-To: <20060228115533.GD4081@elf.ucw.cz>
Pavel Machek wrote:
> Hi!
>
>
>>From: Randy Dunlap <randy_d_dunlap@linux.intel.com>
>>
>>Add PATA support to the previous SATA support.
>
>
> Does it make your CONFIG_SATA_ACPI option missnamed?
Yes.
>>--- linux-2616-rc4-ata.orig/drivers/scsi/libata-acpi.c
>>+++ linux-2616-rc4-ata/drivers/scsi/libata-acpi.c
>>@@ -35,6 +35,23 @@ struct taskfile_array {
>> u8 tfa[REGS_PER_GTF]; /* regs. 0x1f1 - 0x1f7 */
>> };
>>
>>+struct GTM_buffer {
>>+ __u32 PIO_speed0;
>>+ __u32 DMA_speed0;
>>+ __u32 PIO_speed1;
>>+ __u32 DMA_speed1;
>>+ __u32 GTM_flags;
>>+};
>
>
> No reason to use __u32 here, u32 should be okay.
Agreed.
>>+static int pata_get_dev_handle(struct device *dev, acpi_handle *handle,
>>+ acpi_integer *pcidevfn)
>>+{
>>+ unsigned int domain, bus, devnum, func;
>>+ acpi_integer addr;
>>+ acpi_handle dev_handle, parent_handle;
>>+ int scanned;
>>+ struct acpi_buffer buffer = {.length = ACPI_ALLOCATE_BUFFER,
>>+ .pointer = NULL};
>>+ acpi_status status;
>>+ struct acpi_device_info *dinfo = NULL;
>>+ int ret = -ENODEV;
>>+
>>+ printk(KERN_DEBUG "%s: ENTER: dev->bus_id='%s'\n",
>>+ __FUNCTION__, dev->bus_id);
>
>
> Have you catched some nasty disease from acpi people or what? Having
> "printk(enter)" at beggining of each function may be nice for your
> development, but should be removed prior to merge.
Mostly agreed: the above should be changed to
if (ata_msg_xxx())
...
prior to merging.
>>+ if ((scanned = sscanf(dev->bus_id, "%x:%x:%x.%x",
>>+ &domain, &bus, &devnum, &func)) != 4) {
>>+ printk(KERN_DEBUG "%s: sscanf ret. %d\n",
>>+ __FUNCTION__, scanned);
>>+ goto err;
>>+ }
>
>
> Is there no other way than to parse back name?
Agreed. Should obtain the struct pci_dev pointer, and access the
elements, rather than parsing a string.
>>+ if (ata_msg_probe(ap))
>>+ printk(KERN_DEBUG
>>+ "%s: ENTER: ap->id: %d, port#: %d, hard_port#: %d\n",
>>+ __FUNCTION__, ap->id,
>>+ ap->port_no, ap->hard_port_no);
>>+
>
>
> Again, please clean your printks.
NAK, the above is better form.
>>@@ -557,11 +701,11 @@ EXPORT_SYMBOL_GPL(do_drive_set_taskfiles
>> */
>> int ata_acpi_exec_tfs(struct ata_port *ap)
>> {
>>- int ix;
>>- int ret;
>>- unsigned int gtf_length;
>>- unsigned long gtf_address;
>>- unsigned long obj_loc;
>>+ int ix;
>>+ int ret;
>>+ unsigned int gtf_length;
>>+ unsigned long gtf_address;
>>+ unsigned long obj_loc;
>>
>> if (ata_msg_probe(ap))
>> printk(KERN_DEBUG "%s: ENTER:\n", __FUNCTION__);
>
>
> Again!
Ditto.
>>+void ata_acpi_get_timing(struct ata_port *ap)
>>+{
>>+ struct device *dev = ap->dev;
>>+ int err;
>>+ acpi_handle dev_handle;
>>+ acpi_integer pcidevfn;
>>+ acpi_handle chan_handle;
>>+ acpi_status status;
>>+ struct acpi_buffer output;
>>+ union acpi_object *out_obj;
>>+ struct GTM_buffer *gtm;
>>+
>>+ if (noacpi)
>>+ goto out;
>>+
>>+ if (ata_msg_probe(ap))
>>+ printk(KERN_DEBUG "%s: ENTER:\n", __FUNCTION__);
>
>
> Again!
Ditto.
>>+void ata_acpi_push_timing(struct ata_port *ap)
>>+{
>>+ struct device *dev = ap->dev;
>>+ int err;
>>+ acpi_handle dev_handle;
>>+ acpi_integer pcidevfn;
>>+ acpi_handle chan_handle;
>>+ acpi_status status;
>>+ struct acpi_object_list input;
>>+ union acpi_object in_params[1];
>>+
>>+ if (noacpi)
>>+ goto out;
>>+
>>+ if (ata_msg_probe(ap))
>>+ printk(KERN_DEBUG "%s: ENTER:\n", __FUNCTION__);
>
>
> And again!
Ditto. All ata_msg_xxx are OK.
Jeff
next prev parent reply other threads:[~2006-02-28 12:03 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060222133241.595a8509.randy_d_dunlap@linux.intel.com>
2006-02-22 21:40 ` [PATCH 1/13] ATA ACPI: Makefile/Kconfig/doc Randy Dunlap
2006-02-22 21:51 ` [PATCH 2/13] ATA ACPI: debugging infrastructure Randy Dunlap
2006-02-28 11:45 ` Pavel Machek
2006-02-28 12:00 ` Jeff Garzik
2006-02-28 12:04 ` Pavel Machek
2006-02-28 12:13 ` Jeff Garzik
2006-02-28 12:18 ` Andrew Morton
2006-02-28 12:31 ` Jeff Garzik
2006-02-28 18:35 ` Andrew Morton
2006-02-28 19:27 ` Jeff Garzik
2006-02-28 14:43 ` Mark Lord
2006-02-28 19:22 ` Randy Dunlap
2006-02-28 17:10 ` Phillip Susi
2006-03-01 10:29 ` James Courtier-Dutton
2006-03-01 10:45 ` Andrew Morton
2006-02-22 21:52 ` [PATCH 3/13] ATA ACPI: SATA methods Randy Dunlap
2006-02-22 21:54 ` [PATCH 4/13] ATA ACPI: add params/docs Randy Dunlap
2006-02-28 11:46 ` Pavel Machek
2006-02-28 11:57 ` Jeff Garzik
2006-02-22 21:55 ` [PATCH 5/13] ATA ACPI: use debugging macros Randy Dunlap
2006-02-28 11:47 ` Pavel Machek
2006-02-28 11:58 ` Jeff Garzik
2006-02-22 21:56 ` [PATCH 6/13] ATA ACPI: use correct acpi_object pointer Randy Dunlap
2006-02-22 21:58 ` [PATCH 7/13] ATA ACPI: more Makefile/Kconfig Randy Dunlap
2006-02-28 11:49 ` Pavel Machek
2006-02-28 12:03 ` Jeff Garzik
2006-02-28 15:27 ` Randy.Dunlap
2006-02-22 21:58 ` [PATCH 8/13] ATA ACPI: PATA methods Randy Dunlap
2006-02-28 11:55 ` Pavel Machek
2006-02-28 12:02 ` Jeff Garzik [this message]
2006-02-22 22:00 ` [PATCH 9/13] ATA ACPI: check SATA/PATA more carefully Randy Dunlap
2006-02-23 0:30 ` Alan Cox
2006-02-22 22:01 ` [PATCH 10/13] ATA ACPI: do taskfile before mode commands Randy Dunlap
2006-02-28 11:57 ` Pavel Machek
2006-02-28 12:05 ` Jeff Garzik
2006-02-28 12:08 ` Pavel Machek
2006-02-28 12:14 ` Jeff Garzik
2006-02-22 22:02 ` [PATCH 11/13] ATA ACPI: fix pata host typo Randy Dunlap
2006-02-22 22:06 ` [PATCH 12/13] ATA ACPI: use scsi_bus_shutdown for SATA/PATA Randy Dunlap
2006-02-28 11:58 ` Pavel Machek
2006-02-28 19:44 ` Randy Dunlap
2006-02-28 20:22 ` Pavel Machek
2006-02-22 22:07 ` [PATCH 13/13] ATA ACPI: enable writing PATA taskfiles Randy Dunlap
2006-02-28 11:59 ` Pavel Machek
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=44043BF0.5090809@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@osdl.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=randy_d_dunlap@linux.intel.com \
/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).