diff options
-rw-r--r-- | drivers/scsi/ahci.c | 42 | ||||
-rw-r--r-- | drivers/scsi/pdc_adma.c | 13 | ||||
-rw-r--r-- | drivers/scsi/sata_mv.c | 12 | ||||
-rw-r--r-- | drivers/scsi/sata_nv.c | 3 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 3 | ||||
-rw-r--r-- | drivers/scsi/sata_qstor.c | 18 | ||||
-rw-r--r-- | drivers/scsi/sata_sil.c | 7 | ||||
-rw-r--r-- | drivers/scsi/sata_sil24.c | 21 | ||||
-rw-r--r-- | drivers/scsi/sata_sis.c | 13 | ||||
-rw-r--r-- | drivers/scsi/sata_svw.c | 3 | ||||
-rw-r--r-- | drivers/scsi/sata_sx4.c | 3 | ||||
-rw-r--r-- | drivers/scsi/sata_uli.c | 5 | ||||
-rw-r--r-- | drivers/scsi/sata_via.c | 38 | ||||
-rw-r--r-- | drivers/scsi/sata_vsc.c | 3 |
14 files changed, 101 insertions, 83 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 5efb3c50aa8a..e2a5657d5fdb 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/dma-mapping.h> | 43 | #include <linux/dma-mapping.h> |
44 | #include <linux/device.h> | ||
44 | #include "scsi.h" | 45 | #include "scsi.h" |
45 | #include <scsi/scsi_host.h> | 46 | #include <scsi/scsi_host.h> |
46 | #include <linux/libata.h> | 47 | #include <linux/libata.h> |
@@ -674,10 +675,10 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
674 | if (!ahci_host_intr(ap, qc)) | 675 | if (!ahci_host_intr(ap, qc)) |
675 | if (ata_ratelimit()) { | 676 | if (ata_ratelimit()) { |
676 | struct pci_dev *pdev = | 677 | struct pci_dev *pdev = |
677 | to_pci_dev(ap->host_set->dev); | 678 | to_pci_dev(ap->host_set->dev); |
678 | printk(KERN_WARNING | 679 | dev_printk(KERN_WARNING, &pdev->dev, |
679 | "ahci(%s): unhandled interrupt on port %u\n", | 680 | "unhandled interrupt on port %u\n", |
680 | pci_name(pdev), i); | 681 | i); |
681 | } | 682 | } |
682 | 683 | ||
683 | VPRINTK("port %u\n", i); | 684 | VPRINTK("port %u\n", i); |
@@ -685,10 +686,9 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
685 | VPRINTK("port %u (no irq)\n", i); | 686 | VPRINTK("port %u (no irq)\n", i); |
686 | if (ata_ratelimit()) { | 687 | if (ata_ratelimit()) { |
687 | struct pci_dev *pdev = | 688 | struct pci_dev *pdev = |
688 | to_pci_dev(ap->host_set->dev); | 689 | to_pci_dev(ap->host_set->dev); |
689 | printk(KERN_WARNING | 690 | dev_printk(KERN_WARNING, &pdev->dev, |
690 | "ahci(%s): interrupt on disabled port %u\n", | 691 | "interrupt on disabled port %u\n", i); |
691 | pci_name(pdev), i); | ||
692 | } | 692 | } |
693 | } | 693 | } |
694 | 694 | ||
@@ -760,8 +760,8 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) | |||
760 | 760 | ||
761 | tmp = readl(mmio + HOST_CTL); | 761 | tmp = readl(mmio + HOST_CTL); |
762 | if (tmp & HOST_RESET) { | 762 | if (tmp & HOST_RESET) { |
763 | printk(KERN_ERR DRV_NAME "(%s): controller reset failed (0x%x)\n", | 763 | dev_printk(KERN_ERR, &pdev->dev, |
764 | pci_name(pdev), tmp); | 764 | "controller reset failed (0x%x)\n", tmp); |
765 | return -EIO; | 765 | return -EIO; |
766 | } | 766 | } |
767 | 767 | ||
@@ -789,22 +789,22 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) | |||
789 | if (rc) { | 789 | if (rc) { |
790 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 790 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
791 | if (rc) { | 791 | if (rc) { |
792 | printk(KERN_ERR DRV_NAME "(%s): 64-bit DMA enable failed\n", | 792 | dev_printk(KERN_ERR, &pdev->dev, |
793 | pci_name(pdev)); | 793 | "64-bit DMA enable failed\n"); |
794 | return rc; | 794 | return rc; |
795 | } | 795 | } |
796 | } | 796 | } |
797 | } else { | 797 | } else { |
798 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 798 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
799 | if (rc) { | 799 | if (rc) { |
800 | printk(KERN_ERR DRV_NAME "(%s): 32-bit DMA enable failed\n", | 800 | dev_printk(KERN_ERR, &pdev->dev, |
801 | pci_name(pdev)); | 801 | "32-bit DMA enable failed\n"); |
802 | return rc; | 802 | return rc; |
803 | } | 803 | } |
804 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 804 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
805 | if (rc) { | 805 | if (rc) { |
806 | printk(KERN_ERR DRV_NAME "(%s): 32-bit consistent DMA enable failed\n", | 806 | dev_printk(KERN_ERR, &pdev->dev, |
807 | pci_name(pdev)); | 807 | "32-bit consistent DMA enable failed\n"); |
808 | return rc; | 808 | return rc; |
809 | } | 809 | } |
810 | } | 810 | } |
@@ -907,10 +907,10 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent) | |||
907 | else | 907 | else |
908 | scc_s = "unknown"; | 908 | scc_s = "unknown"; |
909 | 909 | ||
910 | printk(KERN_INFO DRV_NAME "(%s) AHCI %02x%02x.%02x%02x " | 910 | dev_printk(KERN_INFO, &pdev->dev, |
911 | "AHCI %02x%02x.%02x%02x " | ||
911 | "%u slots %u ports %s Gbps 0x%x impl %s mode\n" | 912 | "%u slots %u ports %s Gbps 0x%x impl %s mode\n" |
912 | , | 913 | , |
913 | pci_name(pdev), | ||
914 | 914 | ||
915 | (vers >> 24) & 0xff, | 915 | (vers >> 24) & 0xff, |
916 | (vers >> 16) & 0xff, | 916 | (vers >> 16) & 0xff, |
@@ -923,11 +923,11 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent) | |||
923 | impl, | 923 | impl, |
924 | scc_s); | 924 | scc_s); |
925 | 925 | ||
926 | printk(KERN_INFO DRV_NAME "(%s) flags: " | 926 | dev_printk(KERN_INFO, &pdev->dev, |
927 | "flags: " | ||
927 | "%s%s%s%s%s%s" | 928 | "%s%s%s%s%s%s" |
928 | "%s%s%s%s%s%s%s\n" | 929 | "%s%s%s%s%s%s%s\n" |
929 | , | 930 | , |
930 | pci_name(pdev), | ||
931 | 931 | ||
932 | cap & (1 << 31) ? "64bit " : "", | 932 | cap & (1 << 31) ? "64bit " : "", |
933 | cap & (1 << 30) ? "ncq " : "", | 933 | cap & (1 << 30) ? "ncq " : "", |
@@ -960,7 +960,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
960 | VPRINTK("ENTER\n"); | 960 | VPRINTK("ENTER\n"); |
961 | 961 | ||
962 | if (!printed_version++) | 962 | if (!printed_version++) |
963 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 963 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
964 | 964 | ||
965 | rc = pci_enable_device(pdev); | 965 | rc = pci_enable_device(pdev); |
966 | if (rc) | 966 | if (rc) |
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c index 74b3b2c629b6..665017eda8a6 100644 --- a/drivers/scsi/pdc_adma.c +++ b/drivers/scsi/pdc_adma.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/sched.h> | 42 | #include <linux/sched.h> |
43 | #include <linux/device.h> | ||
43 | #include "scsi.h" | 44 | #include "scsi.h" |
44 | #include <scsi/scsi_host.h> | 45 | #include <scsi/scsi_host.h> |
45 | #include <asm/io.h> | 46 | #include <asm/io.h> |
@@ -626,16 +627,14 @@ static int adma_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base) | |||
626 | 627 | ||
627 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 628 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
628 | if (rc) { | 629 | if (rc) { |
629 | printk(KERN_ERR DRV_NAME | 630 | dev_printk(KERN_ERR, &pdev->dev, |
630 | "(%s): 32-bit DMA enable failed\n", | 631 | "32-bit DMA enable failed\n"); |
631 | pci_name(pdev)); | ||
632 | return rc; | 632 | return rc; |
633 | } | 633 | } |
634 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 634 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
635 | if (rc) { | 635 | if (rc) { |
636 | printk(KERN_ERR DRV_NAME | 636 | dev_printk(KERN_ERR, &pdev->dev, |
637 | "(%s): 32-bit consistent DMA enable failed\n", | 637 | "32-bit consistent DMA enable failed\n"); |
638 | pci_name(pdev)); | ||
639 | return rc; | 638 | return rc; |
640 | } | 639 | } |
641 | return 0; | 640 | return 0; |
@@ -651,7 +650,7 @@ static int adma_ata_init_one(struct pci_dev *pdev, | |||
651 | int rc, port_no; | 650 | int rc, port_no; |
652 | 651 | ||
653 | if (!printed_version++) | 652 | if (!printed_version++) |
654 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 653 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
655 | 654 | ||
656 | rc = pci_enable_device(pdev); | 655 | rc = pci_enable_device(pdev); |
657 | if (rc) | 656 | if (rc) |
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 936d1ce5575f..46dbdee79f77 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
32 | #include <linux/device.h> | ||
32 | #include "scsi.h" | 33 | #include "scsi.h" |
33 | #include <scsi/scsi_host.h> | 34 | #include <scsi/scsi_host.h> |
34 | #include <linux/libata.h> | 35 | #include <linux/libata.h> |
@@ -1437,9 +1438,9 @@ static void mv_print_info(struct ata_probe_ent *probe_ent) | |||
1437 | else | 1438 | else |
1438 | scc_s = "unknown"; | 1439 | scc_s = "unknown"; |
1439 | 1440 | ||
1440 | printk(KERN_INFO DRV_NAME | 1441 | dev_printk(KERN_INFO, &pdev->dev, |
1441 | "(%s) %u slots %u ports %s mode IRQ via %s\n", | 1442 | "%u slots %u ports %s mode IRQ via %s\n", |
1442 | pci_name(pdev), (unsigned)MV_MAX_Q_DEPTH, probe_ent->n_ports, | 1443 | (unsigned)MV_MAX_Q_DEPTH, probe_ent->n_ports, |
1443 | scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx"); | 1444 | scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx"); |
1444 | } | 1445 | } |
1445 | 1446 | ||
@@ -1460,9 +1461,8 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1460 | void __iomem *mmio_base; | 1461 | void __iomem *mmio_base; |
1461 | int pci_dev_busy = 0, rc; | 1462 | int pci_dev_busy = 0, rc; |
1462 | 1463 | ||
1463 | if (!printed_version++) { | 1464 | if (!printed_version++) |
1464 | printk(KERN_INFO DRV_NAME " version " DRV_VERSION "\n"); | 1465 | dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); |
1465 | } | ||
1466 | 1466 | ||
1467 | rc = pci_enable_device(pdev); | 1467 | rc = pci_enable_device(pdev); |
1468 | if (rc) { | 1468 | if (rc) { |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 1a56d6c79ddd..d573888eda76 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <linux/blkdev.h> | 61 | #include <linux/blkdev.h> |
62 | #include <linux/delay.h> | 62 | #include <linux/delay.h> |
63 | #include <linux/interrupt.h> | 63 | #include <linux/interrupt.h> |
64 | #include <linux/device.h> | ||
64 | #include "scsi.h" | 65 | #include "scsi.h" |
65 | #include <scsi/scsi_host.h> | 66 | #include <scsi/scsi_host.h> |
66 | #include <linux/libata.h> | 67 | #include <linux/libata.h> |
@@ -383,7 +384,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
383 | return -ENODEV; | 384 | return -ENODEV; |
384 | 385 | ||
385 | if (!printed_version++) | 386 | if (!printed_version++) |
386 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 387 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
387 | 388 | ||
388 | rc = pci_enable_device(pdev); | 389 | rc = pci_enable_device(pdev); |
389 | if (rc) | 390 | if (rc) |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 8f41702275db..b41c977d6fab 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | #include <linux/device.h> | ||
41 | #include "scsi.h" | 42 | #include "scsi.h" |
42 | #include <scsi/scsi_host.h> | 43 | #include <scsi/scsi_host.h> |
43 | #include <linux/libata.h> | 44 | #include <linux/libata.h> |
@@ -633,7 +634,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
633 | int rc; | 634 | int rc; |
634 | 635 | ||
635 | if (!printed_version++) | 636 | if (!printed_version++) |
636 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 637 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
637 | 638 | ||
638 | /* | 639 | /* |
639 | * If this driver happens to only be useful on Apple's K2, then | 640 | * If this driver happens to only be useful on Apple's K2, then |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index d95a02fa7afb..9938dae782b6 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
38 | #include <linux/device.h> | ||
38 | #include "scsi.h" | 39 | #include "scsi.h" |
39 | #include <scsi/scsi_host.h> | 40 | #include <scsi/scsi_host.h> |
40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
@@ -600,25 +601,22 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base) | |||
600 | if (rc) { | 601 | if (rc) { |
601 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 602 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
602 | if (rc) { | 603 | if (rc) { |
603 | printk(KERN_ERR DRV_NAME | 604 | dev_printk(KERN_ERR, &pdev->dev, |
604 | "(%s): 64-bit DMA enable failed\n", | 605 | "64-bit DMA enable failed\n"); |
605 | pci_name(pdev)); | ||
606 | return rc; | 606 | return rc; |
607 | } | 607 | } |
608 | } | 608 | } |
609 | } else { | 609 | } else { |
610 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 610 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
611 | if (rc) { | 611 | if (rc) { |
612 | printk(KERN_ERR DRV_NAME | 612 | dev_printk(KERN_ERR, &pdev->dev, |
613 | "(%s): 32-bit DMA enable failed\n", | 613 | "32-bit DMA enable failed\n"); |
614 | pci_name(pdev)); | ||
615 | return rc; | 614 | return rc; |
616 | } | 615 | } |
617 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 616 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
618 | if (rc) { | 617 | if (rc) { |
619 | printk(KERN_ERR DRV_NAME | 618 | dev_printk(KERN_ERR, &pdev->dev, |
620 | "(%s): 32-bit consistent DMA enable failed\n", | 619 | "32-bit consistent DMA enable failed\n"); |
621 | pci_name(pdev)); | ||
622 | return rc; | 620 | return rc; |
623 | } | 621 | } |
624 | } | 622 | } |
@@ -635,7 +633,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
635 | int rc, port_no; | 633 | int rc, port_no; |
636 | 634 | ||
637 | if (!printed_version++) | 635 | if (!printed_version++) |
638 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 636 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
639 | 637 | ||
640 | rc = pci_enable_device(pdev); | 638 | rc = pci_enable_device(pdev); |
641 | if (rc) | 639 | if (rc) |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 3a056173fb95..435f7e0085ec 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/blkdev.h> | 41 | #include <linux/blkdev.h> |
42 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/device.h> | ||
44 | #include "scsi.h" | 45 | #include "scsi.h" |
45 | #include <scsi/scsi_host.h> | 46 | #include <scsi/scsi_host.h> |
46 | #include <linux/libata.h> | 47 | #include <linux/libata.h> |
@@ -386,7 +387,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
386 | u8 cls; | 387 | u8 cls; |
387 | 388 | ||
388 | if (!printed_version++) | 389 | if (!printed_version++) |
389 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 390 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
390 | 391 | ||
391 | /* | 392 | /* |
392 | * If this driver happens to only be useful on Apple's K2, then | 393 | * If this driver happens to only be useful on Apple's K2, then |
@@ -463,8 +464,8 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
463 | writeb(cls, mmio_base + SIL_FIFO_W3); | 464 | writeb(cls, mmio_base + SIL_FIFO_W3); |
464 | } | 465 | } |
465 | } else | 466 | } else |
466 | printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n", | 467 | dev_printk(KERN_WARNING, &pdev->dev, |
467 | pci_name(pdev)); | 468 | "cache line size not set. Driver may not function\n"); |
468 | 469 | ||
469 | if (ent->driver_data == sil_3114) { | 470 | if (ent->driver_data == sil_3114) { |
470 | irq_mask = SIL_MASK_4PORT; | 471 | irq_mask = SIL_MASK_4PORT; |
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c index 4afe2b15b803..c66548025657 100644 --- a/drivers/scsi/sata_sil24.c +++ b/drivers/scsi/sata_sil24.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/interrupt.h> | 36 | #include <linux/interrupt.h> |
37 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |
38 | #include <linux/device.h> | ||
38 | #include <scsi/scsi_host.h> | 39 | #include <scsi/scsi_host.h> |
39 | #include "scsi.h" | 40 | #include "scsi.h" |
40 | #include <linux/libata.h> | 41 | #include <linux/libata.h> |
@@ -690,7 +691,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
690 | int i, rc; | 691 | int i, rc; |
691 | 692 | ||
692 | if (!printed_version++) | 693 | if (!printed_version++) |
693 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 694 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
694 | 695 | ||
695 | rc = pci_enable_device(pdev); | 696 | rc = pci_enable_device(pdev); |
696 | if (rc) | 697 | if (rc) |
@@ -750,14 +751,14 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
750 | */ | 751 | */ |
751 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 752 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
752 | if (rc) { | 753 | if (rc) { |
753 | printk(KERN_ERR DRV_NAME "(%s): 32-bit DMA enable failed\n", | 754 | dev_printk(KERN_ERR, &pdev->dev, |
754 | pci_name(pdev)); | 755 | "32-bit DMA enable failed\n"); |
755 | goto out_free; | 756 | goto out_free; |
756 | } | 757 | } |
757 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 758 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
758 | if (rc) { | 759 | if (rc) { |
759 | printk(KERN_ERR DRV_NAME "(%s): 32-bit consistent DMA enable failed\n", | 760 | dev_printk(KERN_ERR, &pdev->dev, |
760 | pci_name(pdev)); | 761 | "32-bit consistent DMA enable failed\n"); |
761 | goto out_free; | 762 | goto out_free; |
762 | } | 763 | } |
763 | 764 | ||
@@ -793,9 +794,8 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
793 | break; | 794 | break; |
794 | } | 795 | } |
795 | if (tmp & PORT_CS_PORT_RST) | 796 | if (tmp & PORT_CS_PORT_RST) |
796 | printk(KERN_ERR DRV_NAME | 797 | dev_printk(KERN_ERR, &pdev->dev, |
797 | "(%s): failed to clear port RST\n", | 798 | "failed to clear port RST\n"); |
798 | pci_name(pdev)); | ||
799 | } | 799 | } |
800 | 800 | ||
801 | /* Zero error counters. */ | 801 | /* Zero error counters. */ |
@@ -824,9 +824,8 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
824 | 824 | ||
825 | /* Reset itself */ | 825 | /* Reset itself */ |
826 | if (__sil24_reset_controller(port)) | 826 | if (__sil24_reset_controller(port)) |
827 | printk(KERN_ERR DRV_NAME | 827 | dev_printk(KERN_ERR, &pdev->dev, |
828 | "(%s): failed to reset controller\n", | 828 | "failed to reset controller\n"); |
829 | pci_name(pdev)); | ||
830 | } | 829 | } |
831 | 830 | ||
832 | /* Turn on interrupts */ | 831 | /* Turn on interrupts */ |
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 057f7b98b6c4..42288be0e561 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/blkdev.h> | 38 | #include <linux/blkdev.h> |
39 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
40 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
41 | #include <linux/device.h> | ||
41 | #include "scsi.h" | 42 | #include "scsi.h" |
42 | #include <scsi/scsi_host.h> | 43 | #include <scsi/scsi_host.h> |
43 | #include <linux/libata.h> | 44 | #include <linux/libata.h> |
@@ -237,6 +238,7 @@ static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
237 | 238 | ||
238 | static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 239 | static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
239 | { | 240 | { |
241 | static int printed_version; | ||
240 | struct ata_probe_ent *probe_ent = NULL; | 242 | struct ata_probe_ent *probe_ent = NULL; |
241 | int rc; | 243 | int rc; |
242 | u32 genctl; | 244 | u32 genctl; |
@@ -245,6 +247,9 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
245 | u8 pmr; | 247 | u8 pmr; |
246 | u8 port2_start; | 248 | u8 port2_start; |
247 | 249 | ||
250 | if (!printed_version++) | ||
251 | dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); | ||
252 | |||
248 | rc = pci_enable_device(pdev); | 253 | rc = pci_enable_device(pdev); |
249 | if (rc) | 254 | if (rc) |
250 | return rc; | 255 | return rc; |
@@ -288,16 +293,18 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
288 | pci_read_config_byte(pdev, SIS_PMR, &pmr); | 293 | pci_read_config_byte(pdev, SIS_PMR, &pmr); |
289 | if (ent->device != 0x182) { | 294 | if (ent->device != 0x182) { |
290 | if ((pmr & SIS_PMR_COMBINED) == 0) { | 295 | if ((pmr & SIS_PMR_COMBINED) == 0) { |
291 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in SATA mode\n"); | 296 | dev_printk(KERN_INFO, &pdev->dev, |
297 | "Detected SiS 180/181 chipset in SATA mode\n"); | ||
292 | port2_start = 64; | 298 | port2_start = 64; |
293 | } | 299 | } |
294 | else { | 300 | else { |
295 | printk(KERN_INFO "sata_sis: Detected SiS 180/181 chipset in combined mode\n"); | 301 | dev_printk(KERN_INFO, &pdev->dev, |
302 | "Detected SiS 180/181 chipset in combined mode\n"); | ||
296 | port2_start=0; | 303 | port2_start=0; |
297 | } | 304 | } |
298 | } | 305 | } |
299 | else { | 306 | else { |
300 | printk(KERN_INFO "sata_sis: Detected SiS 182 chipset\n"); | 307 | dev_printk(KERN_INFO, &pdev->dev, "Detected SiS 182 chipset\n"); |
301 | port2_start = 0x20; | 308 | port2_start = 0x20; |
302 | } | 309 | } |
303 | 310 | ||
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 46208f52d0e1..db615ff794d8 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/blkdev.h> | 44 | #include <linux/blkdev.h> |
45 | #include <linux/delay.h> | 45 | #include <linux/delay.h> |
46 | #include <linux/interrupt.h> | 46 | #include <linux/interrupt.h> |
47 | #include <linux/device.h> | ||
47 | #include "scsi.h" | 48 | #include "scsi.h" |
48 | #include <scsi/scsi_host.h> | 49 | #include <scsi/scsi_host.h> |
49 | #include <linux/libata.h> | 50 | #include <linux/libata.h> |
@@ -362,7 +363,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
362 | int i; | 363 | int i; |
363 | 364 | ||
364 | if (!printed_version++) | 365 | if (!printed_version++) |
365 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 366 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
366 | 367 | ||
367 | /* | 368 | /* |
368 | * If this driver happens to only be useful on Apple's K2, then | 369 | * If this driver happens to only be useful on Apple's K2, then |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index d9a8baff0d4d..0ec21e09f5d8 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
39 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | #include <linux/device.h> | ||
41 | #include "scsi.h" | 42 | #include "scsi.h" |
42 | #include <scsi/scsi_host.h> | 43 | #include <scsi/scsi_host.h> |
43 | #include <linux/libata.h> | 44 | #include <linux/libata.h> |
@@ -1385,7 +1386,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1385 | int rc; | 1386 | int rc; |
1386 | 1387 | ||
1387 | if (!printed_version++) | 1388 | if (!printed_version++) |
1388 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 1389 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
1389 | 1390 | ||
1390 | /* | 1391 | /* |
1391 | * If this driver happens to only be useful on Apple's K2, then | 1392 | * If this driver happens to only be useful on Apple's K2, then |
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index d68dc7d3422c..a5e245c098e1 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/blkdev.h> | 32 | #include <linux/blkdev.h> |
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/interrupt.h> | 34 | #include <linux/interrupt.h> |
35 | #include <linux/device.h> | ||
35 | #include "scsi.h" | 36 | #include "scsi.h" |
36 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
37 | #include <linux/libata.h> | 38 | #include <linux/libata.h> |
@@ -178,12 +179,16 @@ static void uli_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
178 | 179 | ||
179 | static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 180 | static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
180 | { | 181 | { |
182 | static int printed_version; | ||
181 | struct ata_probe_ent *probe_ent; | 183 | struct ata_probe_ent *probe_ent; |
182 | struct ata_port_info *ppi; | 184 | struct ata_port_info *ppi; |
183 | int rc; | 185 | int rc; |
184 | unsigned int board_idx = (unsigned int) ent->driver_data; | 186 | unsigned int board_idx = (unsigned int) ent->driver_data; |
185 | int pci_dev_busy = 0; | 187 | int pci_dev_busy = 0; |
186 | 188 | ||
189 | if (!printed_version++) | ||
190 | dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); | ||
191 | |||
187 | rc = pci_enable_device(pdev); | 192 | rc = pci_enable_device(pdev); |
188 | if (rc) | 193 | if (rc) |
189 | return rc; | 194 | return rc; |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 80e291a909a9..b3ecdbe400e9 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/blkdev.h> | 42 | #include <linux/blkdev.h> |
43 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
44 | #include <linux/device.h> | ||
44 | #include "scsi.h" | 45 | #include "scsi.h" |
45 | #include <scsi/scsi_host.h> | 46 | #include <scsi/scsi_host.h> |
46 | #include <linux/libata.h> | 47 | #include <linux/libata.h> |
@@ -259,15 +260,15 @@ static void svia_configure(struct pci_dev *pdev) | |||
259 | u8 tmp8; | 260 | u8 tmp8; |
260 | 261 | ||
261 | pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, &tmp8); | 262 | pci_read_config_byte(pdev, PCI_INTERRUPT_LINE, &tmp8); |
262 | printk(KERN_INFO DRV_NAME "(%s): routed to hard irq line %d\n", | 263 | dev_printk(KERN_INFO, &pdev->dev, "routed to hard irq line %d\n", |
263 | pci_name(pdev), | ||
264 | (int) (tmp8 & 0xf0) == 0xf0 ? 0 : tmp8 & 0x0f); | 264 | (int) (tmp8 & 0xf0) == 0xf0 ? 0 : tmp8 & 0x0f); |
265 | 265 | ||
266 | /* make sure SATA channels are enabled */ | 266 | /* make sure SATA channels are enabled */ |
267 | pci_read_config_byte(pdev, SATA_CHAN_ENAB, &tmp8); | 267 | pci_read_config_byte(pdev, SATA_CHAN_ENAB, &tmp8); |
268 | if ((tmp8 & ALL_PORTS) != ALL_PORTS) { | 268 | if ((tmp8 & ALL_PORTS) != ALL_PORTS) { |
269 | printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channels (0x%x)\n", | 269 | dev_printk(KERN_DEBUG, &pdev->dev, |
270 | pci_name(pdev), (int) tmp8); | 270 | "enabling SATA channels (0x%x)\n", |
271 | (int) tmp8); | ||
271 | tmp8 |= ALL_PORTS; | 272 | tmp8 |= ALL_PORTS; |
272 | pci_write_config_byte(pdev, SATA_CHAN_ENAB, tmp8); | 273 | pci_write_config_byte(pdev, SATA_CHAN_ENAB, tmp8); |
273 | } | 274 | } |
@@ -275,8 +276,9 @@ static void svia_configure(struct pci_dev *pdev) | |||
275 | /* make sure interrupts for each channel sent to us */ | 276 | /* make sure interrupts for each channel sent to us */ |
276 | pci_read_config_byte(pdev, SATA_INT_GATE, &tmp8); | 277 | pci_read_config_byte(pdev, SATA_INT_GATE, &tmp8); |
277 | if ((tmp8 & ALL_PORTS) != ALL_PORTS) { | 278 | if ((tmp8 & ALL_PORTS) != ALL_PORTS) { |
278 | printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channel interrupts (0x%x)\n", | 279 | dev_printk(KERN_DEBUG, &pdev->dev, |
279 | pci_name(pdev), (int) tmp8); | 280 | "enabling SATA channel interrupts (0x%x)\n", |
281 | (int) tmp8); | ||
280 | tmp8 |= ALL_PORTS; | 282 | tmp8 |= ALL_PORTS; |
281 | pci_write_config_byte(pdev, SATA_INT_GATE, tmp8); | 283 | pci_write_config_byte(pdev, SATA_INT_GATE, tmp8); |
282 | } | 284 | } |
@@ -284,8 +286,9 @@ static void svia_configure(struct pci_dev *pdev) | |||
284 | /* make sure native mode is enabled */ | 286 | /* make sure native mode is enabled */ |
285 | pci_read_config_byte(pdev, SATA_NATIVE_MODE, &tmp8); | 287 | pci_read_config_byte(pdev, SATA_NATIVE_MODE, &tmp8); |
286 | if ((tmp8 & NATIVE_MODE_ALL) != NATIVE_MODE_ALL) { | 288 | if ((tmp8 & NATIVE_MODE_ALL) != NATIVE_MODE_ALL) { |
287 | printk(KERN_DEBUG DRV_NAME "(%s): enabling SATA channel native mode (0x%x)\n", | 289 | dev_printk(KERN_DEBUG, &pdev->dev, |
288 | pci_name(pdev), (int) tmp8); | 290 | "enabling SATA channel native mode (0x%x)\n", |
291 | (int) tmp8); | ||
289 | tmp8 |= NATIVE_MODE_ALL; | 292 | tmp8 |= NATIVE_MODE_ALL; |
290 | pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8); | 293 | pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8); |
291 | } | 294 | } |
@@ -303,7 +306,7 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
303 | u8 tmp8; | 306 | u8 tmp8; |
304 | 307 | ||
305 | if (!printed_version++) | 308 | if (!printed_version++) |
306 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 309 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
307 | 310 | ||
308 | rc = pci_enable_device(pdev); | 311 | rc = pci_enable_device(pdev); |
309 | if (rc) | 312 | if (rc) |
@@ -318,8 +321,9 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
318 | if (board_id == vt6420) { | 321 | if (board_id == vt6420) { |
319 | pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8); | 322 | pci_read_config_byte(pdev, SATA_PATA_SHARING, &tmp8); |
320 | if (tmp8 & SATA_2DEV) { | 323 | if (tmp8 & SATA_2DEV) { |
321 | printk(KERN_ERR DRV_NAME "(%s): SATA master/slave not supported (0x%x)\n", | 324 | dev_printk(KERN_ERR, &pdev->dev, |
322 | pci_name(pdev), (int) tmp8); | 325 | "SATA master/slave not supported (0x%x)\n", |
326 | (int) tmp8); | ||
323 | rc = -EIO; | 327 | rc = -EIO; |
324 | goto err_out_regions; | 328 | goto err_out_regions; |
325 | } | 329 | } |
@@ -332,10 +336,11 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
332 | for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++) | 336 | for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++) |
333 | if ((pci_resource_start(pdev, i) == 0) || | 337 | if ((pci_resource_start(pdev, i) == 0) || |
334 | (pci_resource_len(pdev, i) < bar_sizes[i])) { | 338 | (pci_resource_len(pdev, i) < bar_sizes[i])) { |
335 | printk(KERN_ERR DRV_NAME "(%s): invalid PCI BAR %u (sz 0x%lx, val 0x%lx)\n", | 339 | dev_printk(KERN_ERR, &pdev->dev, |
336 | pci_name(pdev), i, | 340 | "invalid PCI BAR %u (sz 0x%lx, val 0x%lx)\n", |
337 | pci_resource_start(pdev, i), | 341 | i, |
338 | pci_resource_len(pdev, i)); | 342 | pci_resource_start(pdev, i), |
343 | pci_resource_len(pdev, i)); | ||
339 | rc = -ENODEV; | 344 | rc = -ENODEV; |
340 | goto err_out_regions; | 345 | goto err_out_regions; |
341 | } | 346 | } |
@@ -353,8 +358,7 @@ static int svia_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
353 | probe_ent = vt6421_init_probe_ent(pdev); | 358 | probe_ent = vt6421_init_probe_ent(pdev); |
354 | 359 | ||
355 | if (!probe_ent) { | 360 | if (!probe_ent) { |
356 | printk(KERN_ERR DRV_NAME "(%s): out of memory\n", | 361 | dev_printk(KERN_ERR, &pdev->dev, "out of memory\n"); |
357 | pci_name(pdev)); | ||
358 | rc = -ENOMEM; | 362 | rc = -ENOMEM; |
359 | goto err_out_regions; | 363 | goto err_out_regions; |
360 | } | 364 | } |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 54273e0063c7..bb84ba0c7e83 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/dma-mapping.h> | 44 | #include <linux/dma-mapping.h> |
45 | #include <linux/device.h> | ||
45 | #include "scsi.h" | 46 | #include "scsi.h" |
46 | #include <scsi/scsi_host.h> | 47 | #include <scsi/scsi_host.h> |
47 | #include <linux/libata.h> | 48 | #include <linux/libata.h> |
@@ -295,7 +296,7 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d | |||
295 | int rc; | 296 | int rc; |
296 | 297 | ||
297 | if (!printed_version++) | 298 | if (!printed_version++) |
298 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 299 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
299 | 300 | ||
300 | rc = pci_enable_device(pdev); | 301 | rc = pci_enable_device(pdev); |
301 | if (rc) | 302 | if (rc) |