diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 20:24:34 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-30 20:24:34 -0500 |
| commit | 95dbf5c4be080e94880ead13773d1a14eec8f4de (patch) | |
| tree | 9113691b4b6c689989b4528ee0f3df3689c42066 | |
| parent | 054ee8fd39f1b5d50e803f126b63f400d631eea4 (diff) | |
| parent | 6e9d6b8ee4e0c37d3952256e6472c57490d6780d (diff) | |
Merge branch 'master'
| -rw-r--r-- | drivers/pci/quirks.c | 4 | ||||
| -rw-r--r-- | drivers/scsi/ahci.c | 42 | ||||
| -rw-r--r-- | drivers/scsi/ata_piix.c | 15 | ||||
| -rw-r--r-- | drivers/scsi/libata-core.c | 8 | ||||
| -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 | ||||
| -rw-r--r-- | fs/nfs/inode.c | 2 |
18 files changed, 116 insertions, 97 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index bbd9c2323d8c..5627ce1d2b32 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -356,7 +356,7 @@ static void piix4_mem_quirk(struct pci_dev *dev, const char *name, unsigned int | |||
| 356 | /* | 356 | /* |
| 357 | * PIIX4 ACPI: Two IO regions pointed to by longwords at | 357 | * PIIX4 ACPI: Two IO regions pointed to by longwords at |
| 358 | * 0x40 (64 bytes of ACPI registers) | 358 | * 0x40 (64 bytes of ACPI registers) |
| 359 | * 0x90 (32 bytes of SMB registers) | 359 | * 0x90 (16 bytes of SMB registers) |
| 360 | * and a few strange programmable PIIX4 device resources. | 360 | * and a few strange programmable PIIX4 device resources. |
| 361 | */ | 361 | */ |
| 362 | static void __devinit quirk_piix4_acpi(struct pci_dev *dev) | 362 | static void __devinit quirk_piix4_acpi(struct pci_dev *dev) |
| @@ -366,7 +366,7 @@ static void __devinit quirk_piix4_acpi(struct pci_dev *dev) | |||
| 366 | pci_read_config_dword(dev, 0x40, ®ion); | 366 | pci_read_config_dword(dev, 0x40, ®ion); |
| 367 | quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES, "PIIX4 ACPI"); | 367 | quirk_io_region(dev, region, 64, PCI_BRIDGE_RESOURCES, "PIIX4 ACPI"); |
| 368 | pci_read_config_dword(dev, 0x90, ®ion); | 368 | pci_read_config_dword(dev, 0x90, ®ion); |
| 369 | quirk_io_region(dev, region, 32, PCI_BRIDGE_RESOURCES+1, "PIIX4 SMB"); | 369 | quirk_io_region(dev, region, 16, PCI_BRIDGE_RESOURCES+1, "PIIX4 SMB"); |
| 370 | 370 | ||
| 371 | /* Device resource A has enables for some of the other ones */ | 371 | /* Device resource A has enables for some of the other ones */ |
| 372 | pci_read_config_dword(dev, 0x5c, &res_a); | 372 | pci_read_config_dword(dev, 0x5c, &res_a); |
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 25a47d7afa28..8420204c2eaa 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> |
| @@ -682,10 +683,10 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
| 682 | if (!ahci_host_intr(ap, qc)) | 683 | if (!ahci_host_intr(ap, qc)) |
| 683 | if (ata_ratelimit()) { | 684 | if (ata_ratelimit()) { |
| 684 | struct pci_dev *pdev = | 685 | struct pci_dev *pdev = |
| 685 | to_pci_dev(ap->host_set->dev); | 686 | to_pci_dev(ap->host_set->dev); |
| 686 | printk(KERN_WARNING | 687 | dev_printk(KERN_WARNING, &pdev->dev, |
| 687 | "ahci(%s): unhandled interrupt on port %u\n", | 688 | "unhandled interrupt on port %u\n", |
| 688 | pci_name(pdev), i); | 689 | i); |
| 689 | } | 690 | } |
| 690 | 691 | ||
| 691 | VPRINTK("port %u\n", i); | 692 | VPRINTK("port %u\n", i); |
| @@ -693,10 +694,9 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
| 693 | VPRINTK("port %u (no irq)\n", i); | 694 | VPRINTK("port %u (no irq)\n", i); |
| 694 | if (ata_ratelimit()) { | 695 | if (ata_ratelimit()) { |
| 695 | struct pci_dev *pdev = | 696 | struct pci_dev *pdev = |
| 696 | to_pci_dev(ap->host_set->dev); | 697 | to_pci_dev(ap->host_set->dev); |
| 697 | printk(KERN_WARNING | 698 | dev_printk(KERN_WARNING, &pdev->dev, |
| 698 | "ahci(%s): interrupt on disabled port %u\n", | 699 | "interrupt on disabled port %u\n", i); |
| 699 | pci_name(pdev), i); | ||
| 700 | } | 700 | } |
| 701 | } | 701 | } |
| 702 | 702 | ||
| @@ -768,8 +768,8 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) | |||
| 768 | 768 | ||
| 769 | tmp = readl(mmio + HOST_CTL); | 769 | tmp = readl(mmio + HOST_CTL); |
| 770 | if (tmp & HOST_RESET) { | 770 | if (tmp & HOST_RESET) { |
| 771 | printk(KERN_ERR DRV_NAME "(%s): controller reset failed (0x%x)\n", | 771 | dev_printk(KERN_ERR, &pdev->dev, |
| 772 | pci_name(pdev), tmp); | 772 | "controller reset failed (0x%x)\n", tmp); |
| 773 | return -EIO; | 773 | return -EIO; |
| 774 | } | 774 | } |
| 775 | 775 | ||
| @@ -797,22 +797,22 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) | |||
| 797 | if (rc) { | 797 | if (rc) { |
| 798 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 798 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
| 799 | if (rc) { | 799 | if (rc) { |
| 800 | printk(KERN_ERR DRV_NAME "(%s): 64-bit DMA enable failed\n", | 800 | dev_printk(KERN_ERR, &pdev->dev, |
| 801 | pci_name(pdev)); | 801 | "64-bit DMA enable failed\n"); |
| 802 | return rc; | 802 | return rc; |
| 803 | } | 803 | } |
| 804 | } | 804 | } |
| 805 | } else { | 805 | } else { |
| 806 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 806 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
| 807 | if (rc) { | 807 | if (rc) { |
| 808 | printk(KERN_ERR DRV_NAME "(%s): 32-bit DMA enable failed\n", | 808 | dev_printk(KERN_ERR, &pdev->dev, |
| 809 | pci_name(pdev)); | 809 | "32-bit DMA enable failed\n"); |
| 810 | return rc; | 810 | return rc; |
| 811 | } | 811 | } |
| 812 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 812 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
| 813 | if (rc) { | 813 | if (rc) { |
| 814 | printk(KERN_ERR DRV_NAME "(%s): 32-bit consistent DMA enable failed\n", | 814 | dev_printk(KERN_ERR, &pdev->dev, |
| 815 | pci_name(pdev)); | 815 | "32-bit consistent DMA enable failed\n"); |
| 816 | return rc; | 816 | return rc; |
| 817 | } | 817 | } |
| 818 | } | 818 | } |
| @@ -915,10 +915,10 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent) | |||
| 915 | else | 915 | else |
| 916 | scc_s = "unknown"; | 916 | scc_s = "unknown"; |
| 917 | 917 | ||
| 918 | printk(KERN_INFO DRV_NAME "(%s) AHCI %02x%02x.%02x%02x " | 918 | dev_printk(KERN_INFO, &pdev->dev, |
| 919 | "AHCI %02x%02x.%02x%02x " | ||
| 919 | "%u slots %u ports %s Gbps 0x%x impl %s mode\n" | 920 | "%u slots %u ports %s Gbps 0x%x impl %s mode\n" |
| 920 | , | 921 | , |
| 921 | pci_name(pdev), | ||
| 922 | 922 | ||
| 923 | (vers >> 24) & 0xff, | 923 | (vers >> 24) & 0xff, |
| 924 | (vers >> 16) & 0xff, | 924 | (vers >> 16) & 0xff, |
| @@ -931,11 +931,11 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent) | |||
| 931 | impl, | 931 | impl, |
| 932 | scc_s); | 932 | scc_s); |
| 933 | 933 | ||
| 934 | printk(KERN_INFO DRV_NAME "(%s) flags: " | 934 | dev_printk(KERN_INFO, &pdev->dev, |
| 935 | "flags: " | ||
| 935 | "%s%s%s%s%s%s" | 936 | "%s%s%s%s%s%s" |
| 936 | "%s%s%s%s%s%s%s\n" | 937 | "%s%s%s%s%s%s%s\n" |
| 937 | , | 938 | , |
| 938 | pci_name(pdev), | ||
| 939 | 939 | ||
| 940 | cap & (1 << 31) ? "64bit " : "", | 940 | cap & (1 << 31) ? "64bit " : "", |
| 941 | cap & (1 << 30) ? "ncq " : "", | 941 | cap & (1 << 30) ? "ncq " : "", |
| @@ -968,7 +968,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 968 | VPRINTK("ENTER\n"); | 968 | VPRINTK("ENTER\n"); |
| 969 | 969 | ||
| 970 | if (!printed_version++) | 970 | if (!printed_version++) |
| 971 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 971 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
| 972 | 972 | ||
| 973 | rc = pci_enable_device(pdev); | 973 | rc = pci_enable_device(pdev); |
| 974 | if (rc) | 974 | if (rc) |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index be021478f416..7f8aa1b552ce 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | #include <linux/init.h> | 45 | #include <linux/init.h> |
| 46 | #include <linux/blkdev.h> | 46 | #include <linux/blkdev.h> |
| 47 | #include <linux/delay.h> | 47 | #include <linux/delay.h> |
| 48 | #include <linux/device.h> | ||
| 48 | #include "scsi.h" | 49 | #include "scsi.h" |
| 49 | #include <scsi/scsi_host.h> | 50 | #include <scsi/scsi_host.h> |
| 50 | #include <linux/libata.h> | 51 | #include <linux/libata.h> |
| @@ -621,18 +622,19 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 621 | { | 622 | { |
| 622 | static int printed_version; | 623 | static int printed_version; |
| 623 | struct ata_port_info *port_info[2]; | 624 | struct ata_port_info *port_info[2]; |
| 624 | unsigned int combined = 0, n_ports = 1; | 625 | unsigned int combined = 0; |
| 625 | unsigned int pata_chan = 0, sata_chan = 0; | 626 | unsigned int pata_chan = 0, sata_chan = 0; |
| 626 | 627 | ||
| 627 | if (!printed_version++) | 628 | if (!printed_version++) |
| 628 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 629 | dev_printk(KERN_DEBUG, &pdev->dev, |
| 630 | "version " DRV_VERSION "\n"); | ||
| 629 | 631 | ||
| 630 | /* no hotplugging support (FIXME) */ | 632 | /* no hotplugging support (FIXME) */ |
| 631 | if (!in_module_init) | 633 | if (!in_module_init) |
| 632 | return -ENODEV; | 634 | return -ENODEV; |
| 633 | 635 | ||
| 634 | port_info[0] = &piix_port_info[ent->driver_data]; | 636 | port_info[0] = &piix_port_info[ent->driver_data]; |
| 635 | port_info[1] = NULL; | 637 | port_info[1] = &piix_port_info[ent->driver_data]; |
| 636 | 638 | ||
| 637 | if (port_info[0]->host_flags & PIIX_FLAG_AHCI) { | 639 | if (port_info[0]->host_flags & PIIX_FLAG_AHCI) { |
| 638 | u8 tmp; | 640 | u8 tmp; |
| @@ -670,12 +672,13 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 670 | port_info[sata_chan] = &piix_port_info[ent->driver_data]; | 672 | port_info[sata_chan] = &piix_port_info[ent->driver_data]; |
| 671 | port_info[sata_chan]->host_flags |= ATA_FLAG_SLAVE_POSS; | 673 | port_info[sata_chan]->host_flags |= ATA_FLAG_SLAVE_POSS; |
| 672 | port_info[pata_chan] = &piix_port_info[ich5_pata]; | 674 | port_info[pata_chan] = &piix_port_info[ich5_pata]; |
| 673 | n_ports++; | ||
| 674 | 675 | ||
| 675 | printk(KERN_WARNING DRV_NAME ": combined mode detected\n"); | 676 | dev_printk(KERN_WARNING, &pdev->dev, |
| 677 | "combined mode detected (p=%u, s=%u)\n", | ||
| 678 | pata_chan, sata_chan); | ||
| 676 | } | 679 | } |
| 677 | 680 | ||
| 678 | return ata_pci_init_one(pdev, port_info, n_ports); | 681 | return ata_pci_init_one(pdev, port_info, 2); |
| 679 | } | 682 | } |
| 680 | 683 | ||
| 681 | static int __init piix_init(void) | 684 | static int __init piix_init(void) |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 6cab14965cc8..2e022240051e 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
| @@ -4621,11 +4621,11 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int | |||
| 4621 | return probe_ent; | 4621 | return probe_ent; |
| 4622 | } | 4622 | } |
| 4623 | 4623 | ||
| 4624 | static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev, struct ata_port_info **port, int port_num) | 4624 | static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev, struct ata_port_info *port, int port_num) |
| 4625 | { | 4625 | { |
| 4626 | struct ata_probe_ent *probe_ent; | 4626 | struct ata_probe_ent *probe_ent; |
| 4627 | 4627 | ||
| 4628 | probe_ent = ata_probe_ent_alloc(pci_dev_to_dev(pdev), port[0]); | 4628 | probe_ent = ata_probe_ent_alloc(pci_dev_to_dev(pdev), port); |
| 4629 | if (!probe_ent) | 4629 | if (!probe_ent) |
| 4630 | return NULL; | 4630 | return NULL; |
| 4631 | 4631 | ||
| @@ -4772,9 +4772,9 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
| 4772 | 4772 | ||
| 4773 | if (legacy_mode) { | 4773 | if (legacy_mode) { |
| 4774 | if (legacy_mode & (1 << 0)) | 4774 | if (legacy_mode & (1 << 0)) |
| 4775 | probe_ent = ata_pci_init_legacy_port(pdev, port, 0); | 4775 | probe_ent = ata_pci_init_legacy_port(pdev, port[0], 0); |
| 4776 | if (legacy_mode & (1 << 1)) | 4776 | if (legacy_mode & (1 << 1)) |
| 4777 | probe_ent2 = ata_pci_init_legacy_port(pdev, port, 1); | 4777 | probe_ent2 = ata_pci_init_legacy_port(pdev, port[1], 1); |
| 4778 | } else { | 4778 | } else { |
| 4779 | if (n_ports == 2) | 4779 | if (n_ports == 2) |
| 4780 | probe_ent = ata_pci_init_native_mode(pdev, port, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); | 4780 | probe_ent = ata_pci_init_native_mode(pdev, port, ATA_PORT_PRIMARY | ATA_PORT_SECONDARY); |
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c index 988d0d70a277..a50588c60fab 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 a3ab14c79cdd..64af334e71f4 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> |
| @@ -1438,9 +1439,9 @@ static void mv_print_info(struct ata_probe_ent *probe_ent) | |||
| 1438 | else | 1439 | else |
| 1439 | scc_s = "unknown"; | 1440 | scc_s = "unknown"; |
| 1440 | 1441 | ||
| 1441 | printk(KERN_INFO DRV_NAME | 1442 | dev_printk(KERN_INFO, &pdev->dev, |
| 1442 | "(%s) %u slots %u ports %s mode IRQ via %s\n", | 1443 | "%u slots %u ports %s mode IRQ via %s\n", |
| 1443 | pci_name(pdev), (unsigned)MV_MAX_Q_DEPTH, probe_ent->n_ports, | 1444 | (unsigned)MV_MAX_Q_DEPTH, probe_ent->n_ports, |
| 1444 | scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx"); | 1445 | scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx"); |
| 1445 | } | 1446 | } |
| 1446 | 1447 | ||
| @@ -1461,9 +1462,8 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1461 | void __iomem *mmio_base; | 1462 | void __iomem *mmio_base; |
| 1462 | int pci_dev_busy = 0, rc; | 1463 | int pci_dev_busy = 0, rc; |
| 1463 | 1464 | ||
| 1464 | if (!printed_version++) { | 1465 | if (!printed_version++) |
| 1465 | printk(KERN_INFO DRV_NAME " version " DRV_VERSION "\n"); | 1466 | dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n"); |
| 1466 | } | ||
| 1467 | 1467 | ||
| 1468 | rc = pci_enable_device(pdev); | 1468 | rc = pci_enable_device(pdev); |
| 1469 | if (rc) { | 1469 | 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 8c20229b01b4..65502c157a54 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> |
| @@ -602,25 +603,22 @@ static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base) | |||
| 602 | if (rc) { | 603 | if (rc) { |
| 603 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 604 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
| 604 | if (rc) { | 605 | if (rc) { |
| 605 | printk(KERN_ERR DRV_NAME | 606 | dev_printk(KERN_ERR, &pdev->dev, |
| 606 | "(%s): 64-bit DMA enable failed\n", | 607 | "64-bit DMA enable failed\n"); |
| 607 | pci_name(pdev)); | ||
| 608 | return rc; | 608 | return rc; |
| 609 | } | 609 | } |
| 610 | } | 610 | } |
| 611 | } else { | 611 | } else { |
| 612 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 612 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
| 613 | if (rc) { | 613 | if (rc) { |
| 614 | printk(KERN_ERR DRV_NAME | 614 | dev_printk(KERN_ERR, &pdev->dev, |
| 615 | "(%s): 32-bit DMA enable failed\n", | 615 | "32-bit DMA enable failed\n"); |
| 616 | pci_name(pdev)); | ||
| 617 | return rc; | 616 | return rc; |
| 618 | } | 617 | } |
| 619 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 618 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
| 620 | if (rc) { | 619 | if (rc) { |
| 621 | printk(KERN_ERR DRV_NAME | 620 | dev_printk(KERN_ERR, &pdev->dev, |
| 622 | "(%s): 32-bit consistent DMA enable failed\n", | 621 | "32-bit consistent DMA enable failed\n"); |
| 623 | pci_name(pdev)); | ||
| 624 | return rc; | 622 | return rc; |
| 625 | } | 623 | } |
| 626 | } | 624 | } |
| @@ -637,7 +635,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
| 637 | int rc, port_no; | 635 | int rc, port_no; |
| 638 | 636 | ||
| 639 | if (!printed_version++) | 637 | if (!printed_version++) |
| 640 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 638 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
| 641 | 639 | ||
| 642 | rc = pci_enable_device(pdev); | 640 | rc = pci_enable_device(pdev); |
| 643 | if (rc) | 641 | 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 05ce84286aea..211ec7eebc9c 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> |
| @@ -695,7 +696,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 695 | int i, rc; | 696 | int i, rc; |
| 696 | 697 | ||
| 697 | if (!printed_version++) | 698 | if (!printed_version++) |
| 698 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 699 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
| 699 | 700 | ||
| 700 | rc = pci_enable_device(pdev); | 701 | rc = pci_enable_device(pdev); |
| 701 | if (rc) | 702 | if (rc) |
| @@ -755,14 +756,14 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 755 | */ | 756 | */ |
| 756 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 757 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
| 757 | if (rc) { | 758 | if (rc) { |
| 758 | printk(KERN_ERR DRV_NAME "(%s): 32-bit DMA enable failed\n", | 759 | dev_printk(KERN_ERR, &pdev->dev, |
| 759 | pci_name(pdev)); | 760 | "32-bit DMA enable failed\n"); |
| 760 | goto out_free; | 761 | goto out_free; |
| 761 | } | 762 | } |
| 762 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 763 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
| 763 | if (rc) { | 764 | if (rc) { |
| 764 | printk(KERN_ERR DRV_NAME "(%s): 32-bit consistent DMA enable failed\n", | 765 | dev_printk(KERN_ERR, &pdev->dev, |
| 765 | pci_name(pdev)); | 766 | "32-bit consistent DMA enable failed\n"); |
| 766 | goto out_free; | 767 | goto out_free; |
| 767 | } | 768 | } |
| 768 | 769 | ||
| @@ -798,9 +799,8 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 798 | break; | 799 | break; |
| 799 | } | 800 | } |
| 800 | if (tmp & PORT_CS_PORT_RST) | 801 | if (tmp & PORT_CS_PORT_RST) |
| 801 | printk(KERN_ERR DRV_NAME | 802 | dev_printk(KERN_ERR, &pdev->dev, |
| 802 | "(%s): failed to clear port RST\n", | 803 | "failed to clear port RST\n"); |
| 803 | pci_name(pdev)); | ||
| 804 | } | 804 | } |
| 805 | 805 | ||
| 806 | /* Zero error counters. */ | 806 | /* Zero error counters. */ |
| @@ -829,9 +829,8 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 829 | 829 | ||
| 830 | /* Reset itself */ | 830 | /* Reset itself */ |
| 831 | if (__sil24_reset_controller(port)) | 831 | if (__sil24_reset_controller(port)) |
| 832 | printk(KERN_ERR DRV_NAME | 832 | dev_printk(KERN_ERR, &pdev->dev, |
| 833 | "(%s): failed to reset controller\n", | 833 | "failed to reset controller\n"); |
| 834 | pci_name(pdev)); | ||
| 835 | } | 834 | } |
| 836 | 835 | ||
| 837 | /* Turn on interrupts */ | 836 | /* 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 8e2e7b8308c0..f859bbd681ed 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> |
| @@ -1384,7 +1385,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
| 1384 | int rc; | 1385 | int rc; |
| 1385 | 1386 | ||
| 1386 | if (!printed_version++) | 1387 | if (!printed_version++) |
| 1387 | printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); | 1388 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
| 1388 | 1389 | ||
| 1389 | /* | 1390 | /* |
| 1390 | * If this driver happens to only be useful on Apple's K2, then | 1391 | * 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) |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index f2781ca42761..fc0f12ba89cc 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
| @@ -1274,14 +1274,12 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat | |||
| 1274 | } | 1274 | } |
| 1275 | 1275 | ||
| 1276 | if ((fattr->valid & NFS_ATTR_FATTR) == 0) { | 1276 | if ((fattr->valid & NFS_ATTR_FATTR) == 0) { |
| 1277 | spin_unlock(&inode->i_lock); | ||
| 1278 | return 0; | 1277 | return 0; |
| 1279 | } | 1278 | } |
| 1280 | 1279 | ||
| 1281 | /* Has the inode gone and changed behind our back? */ | 1280 | /* Has the inode gone and changed behind our back? */ |
| 1282 | if (nfsi->fileid != fattr->fileid | 1281 | if (nfsi->fileid != fattr->fileid |
| 1283 | || (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) { | 1282 | || (inode->i_mode & S_IFMT) != (fattr->mode & S_IFMT)) { |
| 1284 | spin_unlock(&inode->i_lock); | ||
| 1285 | return -EIO; | 1283 | return -EIO; |
| 1286 | } | 1284 | } |
| 1287 | 1285 | ||
