From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YxiWG-0005eP-Ic for mharc-grub-devel@gnu.org; Wed, 27 May 2015 17:05:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxiWD-0005e7-1O for grub-devel@gnu.org; Wed, 27 May 2015 17:05:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxiW9-0000DA-Ji for grub-devel@gnu.org; Wed, 27 May 2015 17:05:40 -0400 Received: from mail.gw90.de ([2a01:4f8:100:7463::3]:52127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxiW8-00009k-US for grub-devel@gnu.org; Wed, 27 May 2015 17:05:37 -0400 Received: from p5de416cf.dip0.t-ipconnect.de ([93.228.22.207] helo=mattotaupa) by mail.gw90.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YxiW1-0001U6-Q7 for grub-devel@gnu.org; Wed, 27 May 2015 21:05:30 +0000 Message-ID: <1432760717.17208.12.camel@users.sourceforge.net> Subject: [PATCH] disk/ahci.c: Add port number to port debug messages From: Paul Menzel To: grub-devel@gnu.org Date: Wed, 27 May 2015 23:05:17 +0200 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-OO0aHtiHbKZsjC0twSG1" 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: Wed, 27 May 2015 21:05:42 -0000 --=-OO0aHtiHbKZsjC0twSG1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =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); @@ -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,7 +542,7 @@ 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, --=20 2.1.4 --=-OO0aHtiHbKZsjC0twSG1 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 iEYEABECAAYFAlVmMZUACgkQPX1aK2wOHViwqgCdHjr7QMv7qwXAml+/jikOJ8jv ZzYAn2n4q/sHoT5ZTs4TRK4yBQORF7gR =cf0o -----END PGP SIGNATURE----- --=-OO0aHtiHbKZsjC0twSG1--