Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28cfd8af authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: include PCI device name in messages from IDE PCI host drivers



While at it:

* Apply small fixes to messages (s/dma/DMA/, remove trailing '.', etc).

* Fix printk() call in ide_setup_pci_baseregs() to use KERN_INFO.

* Move printk() call from ide_pci_clear_simplex() to the caller.

* Cleanup do_ide_setup_pci_device() a bit.

* amd74xx.c: remove superfluous PCI device revision information.

* hpt366.c: fix two printk() calls in ->init_chipset to use KERN_INFO.

* pdc202xx_new.c: fix printk() call in ->init_chipset to use KERN_INFO.

* pdc202xx_old.c: fix driver message in pdc202xx_init_one().

* via82cxxx.c: fix driver warning message in via_init_one().

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 2a8f7450
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -129,9 +129,9 @@ static void __devinit amd7411_cable_detect(struct pci_dev *dev,
	amd_80w = ((t & 0x3) ? 1 : 0) | ((t & 0xc) ? 2 : 0);
	for (i = 24; i >= 0; i -= 8)
		if (((u >> i) & 4) && !(amd_80w & (1 << (1 - (i >> 4))))) {
			printk(KERN_WARNING "%s: BIOS didn't set cable bits "
			printk(KERN_WARNING "%s %s: BIOS didn't set cable bits "
				"correctly. Enabling workaround.\n",
					    name);
				name, pci_name(dev));
			amd_80w |= (1 << (1 - (i >> 4)));
		}
}
@@ -280,9 +280,8 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
			d.udma_mask = ATA_UDMA5;
	}

	printk(KERN_INFO "%s: %s (rev %02x) UDMA%s controller\n",
			 d.name, pci_name(dev), dev->revision,
			 amd_dma[fls(d.udma_mask) - 1]);
	printk(KERN_INFO "%s %s: UDMA%s controller\n",
		d.name, pci_name(dev), amd_dma[fls(d.udma_mask) - 1]);

	/*
	* Determine the system bus clock.
+2 −2
Original line number Diff line number Diff line
@@ -134,8 +134,8 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
		u16 command;
		pci_read_config_word(dev, PCI_COMMAND, &command);
		if (!(command & PCI_COMMAND_IO)) {
			printk(KERN_INFO "Skipping disabled %s IDE "
					"controller.\n", d->name);
			printk(KERN_INFO "%s %s: skipping disabled "
				"controller\n", d->name, pci_name(dev));
			goto out;
		}
	}
+19 −12
Original line number Diff line number Diff line
@@ -1044,8 +1044,8 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
		if ((temp & 0xFFFFF000) != 0xABCDE000) {
			int i;

			printk(KERN_WARNING "%s: no clock data saved by BIOS\n",
			       name);
			printk(KERN_WARNING "%s %s: no clock data saved by "
				"BIOS\n", name, pci_name(dev));

			/* Calculate the average value of f_CNT. */
			for (temp = i = 0; i < 128; i++) {
@@ -1070,8 +1070,9 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
		else
			pci_clk = 66;

		printk(KERN_INFO "%s: DPLL base: %d MHz, f_CNT: %d, "
		       "assuming %d MHz PCI\n", name, dpll_clk, f_cnt, pci_clk);
		printk(KERN_INFO "%s %s: DPLL base: %d MHz, f_CNT: %d, "
			"assuming %d MHz PCI\n", name, pci_name(dev),
			dpll_clk, f_cnt, pci_clk);
	} else {
		u32 itr1 = 0;

@@ -1137,7 +1138,8 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
		}

		if (info->timings->clock_table[clock] == NULL) {
			printk(KERN_ERR "%s: unknown bus timing!\n", name);
			printk(KERN_ERR "%s %s: unknown bus timing!\n",
				name, pci_name(dev));
			return -EIO;
		}

@@ -1163,16 +1165,19 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const cha
				f_low += adjust >> 1;
		}
		if (adjust == 8) {
			printk(KERN_ERR "%s: DPLL did not stabilize!\n", name);
			printk(KERN_ERR "%s %s: DPLL did not stabilize!\n",
				name, pci_name(dev));
			return -EIO;
		}

		printk("%s: using %d MHz DPLL clock\n", name, dpll_clk);
		printk(KERN_INFO "%s %s: using %d MHz DPLL clock\n",
			name, pci_name(dev), dpll_clk);
	} else {
		/* Mark the fact that we're not using the DPLL. */
		dpll_clk = 0;

		printk("%s: using %d MHz PCI clock\n", name, pci_clk);
		printk(KERN_INFO "%s %s: using %d MHz PCI clock\n",
			name, pci_name(dev), pci_clk);
	}

	/* Store the clock frequencies. */
@@ -1357,7 +1362,8 @@ static void __devinit hpt374_init(struct pci_dev *dev, struct pci_dev *dev2)
	if (dev2->irq != dev->irq) {
		/* FIXME: we need a core pci_set_interrupt() */
		dev2->irq = dev->irq;
		printk(KERN_INFO "HPT374: PCI config space interrupt fixed\n");
		printk(KERN_INFO "HPT374 %s: PCI config space interrupt "
			"fixed\n", pci_name(dev2));
	}
}

@@ -1392,8 +1398,8 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2)
	pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin2);

	if (pin1 != pin2 && dev->irq == dev2->irq) {
		printk(KERN_INFO "HPT36x: onboard version of chipset, "
				 "pin1=%d pin2=%d\n", pin1, pin2);
		printk(KERN_INFO "HPT36x %s: onboard version of chipset, "
			"pin1=%d pin2=%d\n", pci_name(dev), pin1, pin2);
		return 1;
	}

@@ -1591,7 +1597,8 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic

	dyn_info = kzalloc(sizeof(*dyn_info) * (dev2 ? 2 : 1), GFP_KERNEL);
	if (dyn_info == NULL) {
		printk(KERN_ERR "%s: out of memory!\n", d.name);
		printk(KERN_ERR "%s %s: out of memory!\n",
			d.name, pci_name(dev));
		pci_dev_put(dev2);
		return -ENOMEM;
	}
+7 −4
Original line number Diff line number Diff line
@@ -569,7 +569,8 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
		idev->timing10 = 1;
		hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA;
		if (idev->smart == 0)
			printk(KERN_WARNING "it821x: Revision 0x10, workarounds activated.\n");
			printk(KERN_WARNING "it821x %s: revision 0x10, "
				"workarounds activated\n", pci_name(dev));
	}

	if (idev->smart == 0) {
@@ -609,11 +610,13 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha

	/* Force the card into bypass mode if so requested */
	if (it8212_noraid) {
		printk(KERN_INFO "it8212: forcing bypass mode.\n");
		printk(KERN_INFO "it821x %s: forcing bypass mode\n",
			pci_name(dev));
		it8212_disable_raid(dev);
	}
	pci_read_config_byte(dev, 0x50, &conf);
	printk(KERN_INFO "it821x: controller in %s mode.\n", mode[conf & 1]);
	printk(KERN_INFO "it821x %s: controller in %s mode\n",
		pci_name(dev), mode[conf & 1]);
	return 0;
}

@@ -654,7 +657,7 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic

	itdevs = kzalloc(2 * sizeof(*itdevs), GFP_KERNEL);
	if (itdevs == NULL) {
		printk(KERN_ERR "it821x: out of memory\n");
		printk(KERN_ERR "it821x %s: out of memory\n", pci_name(dev));
		return -ENOMEM;
	}

+12 −9
Original line number Diff line number Diff line
@@ -358,12 +358,13 @@ static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev, const cha
	 * registers setting.
	 */
	pll_input = detect_pll_input_clock(dma_base);
	printk("%s: PLL input clock is %ld kHz\n", name, pll_input / 1000);
	printk(KERN_INFO "%s %s: PLL input clock is %ld kHz\n",
		name, pci_name(dev), pll_input / 1000);

	/* Sanity check */
	if (unlikely(pll_input < 5000000L || pll_input > 70000000L)) {
		printk(KERN_ERR "%s: Bad PLL input clock %ld Hz, giving up!\n",
		       name, pll_input);
		printk(KERN_ERR "%s %s: Bad PLL input clock %ld Hz, giving up!"
			"\n", name, pci_name(dev), pll_input);
		goto out;
	}

@@ -399,7 +400,8 @@ static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev, const cha
		r = 0x00;
	} else {
		/* Invalid ratio */
		printk(KERN_ERR "%s: Bad ratio %ld, giving up!\n", name, ratio);
		printk(KERN_ERR "%s %s: Bad ratio %ld, giving up!\n",
			name, pci_name(dev), ratio);
		goto out;
	}

@@ -409,7 +411,8 @@ static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev, const cha

	if (unlikely(f < 0 || f > 127)) {
		/* Invalid F */
		printk(KERN_ERR "%s: F[%d] invalid!\n", name, f);
		printk(KERN_ERR "%s %s: F[%d] invalid!\n",
			name, pci_name(dev), f);
		goto out;
	}

@@ -455,8 +458,8 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)

		if (dev2->irq != dev->irq) {
			dev2->irq = dev->irq;
			printk(KERN_INFO "PDC20270: PCI config space "
					 "interrupt fixed\n");
			printk(KERN_INFO "PDC20270 %s: PCI config space "
				"interrupt fixed\n", pci_name(dev));
		}

		return dev2;
@@ -535,8 +538,8 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
	    bridge->vendor == PCI_VENDOR_ID_INTEL &&
	    (bridge->device == PCI_DEVICE_ID_INTEL_I960 ||
	     bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) {
		printk(KERN_INFO "PDC20276: attached to I2O RAID controller, "
				 "skipping\n");
		printk(KERN_INFO "PDC20276 %s: attached to I2O RAID controller,"
			" skipping\n", pci_name(dev));
		return -ENODEV;
	}

Loading