* [PATCH 3/9] ata_piix.c conversion
@ 2006-06-29 16:09 Borislav Petkov
2006-06-29 16:32 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2006-06-29 16:09 UTC (permalink / raw)
To: linux-ide; +Cc: Jeff Garzik, Tejun Heo
This converts the relevant places of ata_piix.c to the new scheme.
Signed-off-by: <petkov@math.uni-muenster.de>
--- libata-dev/drivers/scsi/ata_piix.c.orig 2006-06-28 09:28:59.000000000 +0200
+++ libata-dev/drivers/scsi/ata_piix.c 2006-06-29 17:34:55.000000000 +0200
@@ -474,7 +474,7 @@ static int piix_pata_prereset(struct ata
struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->hard_port_no])) {
- ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n");
+ ata_port_printk(ap, ATA_MSG_DRV, "port disabled. ignoring.\n");
ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
return 0;
}
@@ -515,7 +515,8 @@ static int piix_sata_prereset(struct ata
u8 pcs;
pci_read_config_byte(pdev, ICH5_PCS, &pcs);
- DPRINTK("ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base);
+ ata_port_printk(ap, ATA_MSG_CMD,
+ "ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base);
/* enable all ports on this ap and wait for them to settle */
for (i = 0; i < 2; i++) {
@@ -544,11 +545,11 @@ static int piix_sata_prereset(struct ata
if (!(ap->flags & PIIX_FLAG_AHCI))
pci_write_config_byte(pdev, ICH5_PCS, pcs);
- DPRINTK("ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n",
+ ata_port_printk(ap, ATA_MSG_CMD, "ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n",
ap->id, pcs, present_mask);
if (!present_mask) {
- ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n");
+ ata_port_printk(ap, ATA_MSG_DRV, "SATA port has no device.\n");
ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
return 0;
}
@@ -642,7 +643,7 @@ static void piix_set_dmamode (struct ata
u8 reg48, reg54, reg55;
pci_read_config_word(dev, maslave, ®4042);
- DPRINTK("reg4042 = 0x%04x\n", reg4042);
+ ata_port_printk(ap, ATA_MSG_CMD, "reg4042 = 0x%04x\n", reg4042);
sitre = (reg4042 & 0x4000) ? 1 : 0;
pci_read_config_byte(dev, 0x48, ®48);
pci_read_config_word(dev, 0x4a, ®4a);
@@ -741,7 +742,8 @@ static int __devinit piix_check_450nx_er
u8 rev;
int no_piix_dma = 0;
- while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL)
+ while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL)
{
/* Look for 450NX PXB. Check for problem configurations
A PCI quirk checks bit 6 already */
@@ -755,9 +757,11 @@ static int __devinit piix_check_450nx_er
no_piix_dma = 2;
}
if (no_piix_dma)
- dev_printk(KERN_WARNING, &ata_dev->dev, "450NX errata present, disabling IDE DMA.\n");
+ dev_printk(KERN_WARNING, &ata_dev->dev,
+ "450NX errata present, disabling IDE DMA.\n");
if (no_piix_dma == 2)
- dev_printk(KERN_WARNING, &ata_dev->dev, "A BIOS update may resolve this.\n");
+ dev_printk(KERN_WARNING, &ata_dev->dev,
+ "A BIOS update may resolve this.\n");
return no_piix_dma;
}
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 3/9] ata_piix.c conversion
2006-06-29 16:09 [PATCH 3/9] ata_piix.c conversion Borislav Petkov
@ 2006-06-29 16:32 ` Tejun Heo
0 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2006-06-29 16:32 UTC (permalink / raw)
To: Borislav Petkov; +Cc: linux-ide, Jeff Garzik
Borislav Petkov wrote:
> @@ -515,7 +515,8 @@ static int piix_sata_prereset(struct ata
> u8 pcs;
>
> pci_read_config_byte(pdev, ICH5_PCS, &pcs);
> - DPRINTK("ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base);
> + ata_port_printk(ap, ATA_MSG_CMD,
> + "ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base);
Again, not CMD.
>
> /* enable all ports on this ap and wait for them to settle */
> for (i = 0; i < 2; i++) {
> @@ -544,11 +545,11 @@ static int piix_sata_prereset(struct ata
> if (!(ap->flags & PIIX_FLAG_AHCI))
> pci_write_config_byte(pdev, ICH5_PCS, pcs);
>
> - DPRINTK("ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n",
> + ata_port_printk(ap, ATA_MSG_CMD, "ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n",
> ap->id, pcs, present_mask);
Ditto.
> @@ -642,7 +643,7 @@ static void piix_set_dmamode (struct ata
> u8 reg48, reg54, reg55;
>
> pci_read_config_word(dev, maslave, ®4042);
> - DPRINTK("reg4042 = 0x%04x\n", reg4042);
> + ata_port_printk(ap, ATA_MSG_CMD, "reg4042 = 0x%04x\n", reg4042);
Ditto.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/9] ata_piix.c conversion
@ 2006-06-30 6:46 Borislav Petkov
0 siblings, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2006-06-30 6:46 UTC (permalink / raw)
To: linux-ide; +Cc: Jeff Garzik, Tejun Heo
This converts the relevant places of ata_piix.c to the new scheme.
Signed-off-by: <petkov@math.uni-muenster.de>
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 94b1261..4524a2d 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -474,7 +474,7 @@ static int piix_pata_prereset(struct ata
struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->hard_port_no])) {
- ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n");
+ ata_port_printk(ap, ATA_MSG_INFO, "port disabled. ignoring.\n");
ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
return 0;
}
@@ -515,7 +515,8 @@ static int piix_sata_prereset(struct ata
u8 pcs;
pci_read_config_byte(pdev, ICH5_PCS, &pcs);
- DPRINTK("ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base);
+ ata_port_printk(ap, ATA_MSG_TRACE,
+ "ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base);
/* enable all ports on this ap and wait for them to settle */
for (i = 0; i < 2; i++) {
@@ -544,11 +545,12 @@ static int piix_sata_prereset(struct ata
if (!(ap->flags & PIIX_FLAG_AHCI))
pci_write_config_byte(pdev, ICH5_PCS, pcs);
- DPRINTK("ata%u: LEAVE, pcs=0x%x present_mask=0x%x\n",
- ap->id, pcs, present_mask);
+ ata_port_printk(ap, ATA_MSG_TRACE, "ata%u: LEAVE, pcs=0x%x "
+ "present_mask=0x%x\n",
+ ap->id, pcs, present_mask);
if (!present_mask) {
- ata_port_printk(ap, KERN_INFO, "SATA port has no device.\n");
+ ata_port_printk(ap, ATA_MSG_INFO, "SATA port has no device.\n");
ap->eh_context.i.action &= ~ATA_EH_RESET_MASK;
return 0;
}
@@ -642,7 +644,7 @@ static void piix_set_dmamode (struct ata
u8 reg48, reg54, reg55;
pci_read_config_word(dev, maslave, ®4042);
- DPRINTK("reg4042 = 0x%04x\n", reg4042);
+ ata_port_printk(ap, ATA_MSG_DEBUG, "reg4042 = 0x%04x\n", reg4042);
sitre = (reg4042 & 0x4000) ? 1 : 0;
pci_read_config_byte(dev, 0x48, ®48);
pci_read_config_word(dev, 0x4a, ®4a);
@@ -741,7 +743,8 @@ static int __devinit piix_check_450nx_er
u8 rev;
int no_piix_dma = 0;
- while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL)
+ while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL)
{
/* Look for 450NX PXB. Check for problem configurations
A PCI quirk checks bit 6 already */
@@ -755,9 +758,11 @@ static int __devinit piix_check_450nx_er
no_piix_dma = 2;
}
if (no_piix_dma)
- dev_printk(KERN_WARNING, &ata_dev->dev, "450NX errata present, disabling IDE DMA.\n");
+ dev_printk(KERN_WARNING, &ata_dev->dev,
+ "450NX errata present, disabling IDE DMA.\n");
if (no_piix_dma == 2)
- dev_printk(KERN_WARNING, &ata_dev->dev, "A BIOS update may resolve this.\n");
+ dev_printk(KERN_WARNING, &ata_dev->dev,
+ "A BIOS update may resolve this.\n");
return no_piix_dma;
}
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-30 6:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-29 16:09 [PATCH 3/9] ata_piix.c conversion Borislav Petkov
2006-06-29 16:32 ` Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2006-06-30 6:46 Borislav Petkov
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).