diff options
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r-- | drivers/scsi/ahci.c | 42 |
1 files changed, 21 insertions, 21 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) |