From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Yy1M6-0001xZ-Qa for mharc-grub-devel@gnu.org; Thu, 28 May 2015 13:12:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy1M4-0001td-Qx for grub-devel@gnu.org; Thu, 28 May 2015 13:12:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy1M1-0000VV-LR for grub-devel@gnu.org; Thu, 28 May 2015 13:12:28 -0400 Received: from mail.gw90.de ([2a01:4f8:100:7463::3]:54246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy1M1-0000VO-Fc for grub-devel@gnu.org; Thu, 28 May 2015 13:12:25 -0400 Received: from p5de4146c.dip0.t-ipconnect.de ([93.228.20.108] helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Yy1M1-00039N-AP for grub-devel@gnu.org; Thu, 28 May 2015 17:12:25 +0000 Message-ID: <1432833132.3378.8.camel@users.sourceforge.net> Subject: [PATCH v2] disk/ahci.c: Add port number to port debug messages From: Paul Menzel To: grub-devel@gnu.org Date: Thu, 28 May 2015 19:12:12 +0200 In-Reply-To: <1432760717.17208.12.camel@users.sourceforge.net> References: <1432760717.17208.12.camel@users.sourceforge.net> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-pnkpXjd/HwksDMoCsn1f" X-Mailer: Evolution 3.12.12-1 Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:4f8:100:7463::3 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2015 17:12:30 -0000 --=-pnkpXjd/HwksDMoCsn1f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 27 May 2015 22:48:57 +0200 Currently, some messages cannot be mapped to the port they belong to as the port number is missing from the output. So add `port: n` to the debug messages. --- grub-core/disk/ahci.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c index 7f75724..a764008 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 =3D 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); =20 adevs[i]->command_list_chunk =3D grub_memalign_dma32 (1024, sizeof (struc= t grub_ahci_cmd_head) * 32); @@ -440,7 +440,7 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].intstatus =3D ~0; // adevs[i]->hba->ports[adevs[i]->port].fbs =3D 0; =20 - 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); =20 adevs[i]->rfis =3D grub_memalign_dma32 (4096,=20 @@ -480,7 +480,7 @@ grub_ahci_pciinit (grub_pci_device_t dev, for (i =3D 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 |=3D (1 << i); =20 @@ -488,7 +488,7 @@ grub_ahci_pciinit (grub_pci_device_t dev, adevs[i]->hba->ports[adevs[i]->port].command |=3D GRUB_AHCI_HBA_PORT_CMD_= POWER_ON; adevs[i]->hba->ports[adevs[i]->port].command |=3D 1 << 28; =20 - 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); } =20 @@ -515,26 +515,26 @@ grub_ahci_pciinit (grub_pci_device_t dev, for (i =3D 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); =20 adevs[i]->hba->ports[adevs[i]->port].command |=3D GRUB_AHCI_HBA_PORT_CMD_= POWER_ON; adevs[i]->hba->ports[adevs[i]->port].command |=3D GRUB_AHCI_HBA_PORT_CMD_= SPIN_UP; =20 - 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); =20 adevs[i]->hba->ports[adevs[i]->port].sata_error =3D ~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); =20 - 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_da= ta -=20 (char *) adevs[i]->hba), adevs[i]->hba->ports[adevs[i]->port].task_file_data, adevs[i]->hba->ports[adevs[i]->port].command); =20 - 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); } =20 @@ -542,13 +542,13 @@ grub_ahci_pciinit (grub_pci_device_t dev, for (i =3D 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_da= ta -=20 (char *) adevs[i]->hba), adevs[i]->hba->ports[adevs[i]->port].task_file_data, adevs[i]->hba->ports[adevs[i]->port].command); =20 - 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); =20 adevs[i]->hba->ports[adevs[i]->port].command --=20 2.1.4 --=-pnkpXjd/HwksDMoCsn1f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlVnTHYACgkQPX1aK2wOHVjHUgCfc23XDILSvuNtBJwJkAsY+4n4 IiUAni8cpEq/PGqN5AJUHFwzIA+SF3VK =a+18 -----END PGP SIGNATURE----- --=-pnkpXjd/HwksDMoCsn1f--