From: Paul Menzel <paulepanter@users.sourceforge.net>
To: grub-devel@gnu.org
Subject: [PATCH] disk/ahci.c: Add port number to port debug messages
Date: Wed, 27 May 2015 23:05:17 +0200 [thread overview]
Message-ID: <1432760717.17208.12.camel@users.sourceforge.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 3500 bytes --]
Date: Wed, 27 May 2015 22:48:57 +0200
Currently, some AHCI debug messages cannot be mapped to the port they
belong to as the port number is missing from the output. So prepend
these debug messages with `port: n`.
---
grub-core/disk/ahci.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
index 7f75724..2994562 100644
--- a/grub-core/disk/ahci.c
+++ b/grub-core/disk/ahci.c
@@ -355,7 +355,7 @@ grub_ahci_pciinit (grub_pci_device_t dev,
if (adevs[i])
{
adevs[i]->hba->ports[adevs[i]->port].sata_error = adevs[i]->hba->ports[adevs[i]->port].sata_error;
- grub_dprintf ("ahci", "err: %x\n",
+ grub_dprintf ("ahci", "port: %d, err: %x\n", adevs[i]->port,
adevs[i]->hba->ports[adevs[i]->port].sata_error);
adevs[i]->command_list_chunk = grub_memalign_dma32 (1024, sizeof (struct grub_ahci_cmd_head) * 32);
@@ -480,7 +480,7 @@ grub_ahci_pciinit (grub_pci_device_t dev,
for (i = 0; i < nports; i++)
if (adevs[i])
{
- grub_dprintf ("ahci", "err: %x\n",
+ grub_dprintf ("ahci", "port: %d, err: %x\n", adevs[i]->port,
adevs[i]->hba->ports[adevs[i]->port].sata_error);
fr_running |= (1 << i);
@@ -488,7 +488,7 @@ grub_ahci_pciinit (grub_pci_device_t dev,
adevs[i]->hba->ports[adevs[i]->port].command |= GRUB_AHCI_HBA_PORT_CMD_POWER_ON;
adevs[i]->hba->ports[adevs[i]->port].command |= 1 << 28;
- grub_dprintf ("ahci", "err: %x\n",
+ grub_dprintf ("ahci", "port: %d, err: %x\n", adevs[i]->port,
adevs[i]->hba->ports[adevs[i]->port].sata_error);
}
@@ -515,26 +515,26 @@ grub_ahci_pciinit (grub_pci_device_t dev,
for (i = 0; i < nports; i++)
if (adevs[i])
{
- grub_dprintf ("ahci", "err: %x\n",
+ grub_dprintf ("ahci", "port %d, err: %x\n", adevs[i]->port,
adevs[i]->hba->ports[adevs[i]->port].sata_error);
adevs[i]->hba->ports[adevs[i]->port].command |= GRUB_AHCI_HBA_PORT_CMD_POWER_ON;
adevs[i]->hba->ports[adevs[i]->port].command |= GRUB_AHCI_HBA_PORT_CMD_SPIN_UP;
- grub_dprintf ("ahci", "err: %x\n",
+ grub_dprintf ("ahci", "port %d, err: %x\n", adevs[i]->port,
adevs[i]->hba->ports[adevs[i]->port].sata_error);
adevs[i]->hba->ports[adevs[i]->port].sata_error = ~0;
- grub_dprintf ("ahci", "err: %x\n",
+ grub_dprintf ("ahci", "port %d, err: %x\n", adevs[i]->port,
adevs[i]->hba->ports[adevs[i]->port].sata_error);
- grub_dprintf ("ahci", "offset: %x, tfd:%x, CMD: %x\n",
+ grub_dprintf ("ahci", "port %d, offset: %x, tfd:%x, CMD: %x\n", adevs[i]->port,
(int) ((char *) &adevs[i]->hba->ports[adevs[i]->port].task_file_data -
(char *) adevs[i]->hba),
adevs[i]->hba->ports[adevs[i]->port].task_file_data,
adevs[i]->hba->ports[adevs[i]->port].command);
- grub_dprintf ("ahci", "err: %x\n",
+ grub_dprintf ("ahci", "port %d, err: %x\n", adevs[i]->port,
adevs[i]->hba->ports[adevs[i]->port].sata_error);
}
@@ -542,7 +542,7 @@ grub_ahci_pciinit (grub_pci_device_t dev,
for (i = 0; i < nports; i++)
if (adevs[i])
{
- grub_dprintf ("ahci", "offset: %x, tfd:%x, CMD: %x\n",
+ grub_dprintf ("ahci", "port %d, offset: %x, tfd:%x, CMD: %x\n", adevs[i]->port,
(int) ((char *) &adevs[i]->hba->ports[adevs[i]->port].task_file_data -
(char *) adevs[i]->hba),
adevs[i]->hba->ports[adevs[i]->port].task_file_data,
--
2.1.4
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next reply other threads:[~2015-05-27 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 21:05 Paul Menzel [this message]
2015-05-28 17:12 ` [PATCH v2] disk/ahci.c: Add port number to port debug messages Paul Menzel
2015-05-31 6:29 ` Andrei Borzenkov
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=1432760717.17208.12.camel@users.sourceforge.net \
--to=paulepanter@users.sourceforge.net \
--cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.