diff options
author | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 08:50:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 08:50:36 -0400 |
commit | 94f8c66e5e543d79231abf203d6e514ecb668688 (patch) | |
tree | 79f240cb13dd3da5879a7cf52ca1beca4650311d | |
parent | da1f136c26d45c57e8b2d711bf17a6e5ec4de2d1 (diff) | |
parent | d0bd99299bf933ae006d2dc6a31ffcba482ae3f2 (diff) |
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
-rw-r--r-- | drivers/scsi/ahci.c | 52 | ||||
-rw-r--r-- | drivers/scsi/ata_piix.c | 11 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 15 | ||||
-rw-r--r-- | drivers/scsi/libata-scsi.c | 8 | ||||
-rw-r--r-- | drivers/scsi/libata.h | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_nv.c | 9 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 20 | ||||
-rw-r--r-- | drivers/scsi/sata_qstor.c | 8 | ||||
-rw-r--r-- | drivers/scsi/sata_sil.c | 12 | ||||
-rw-r--r-- | drivers/scsi/sata_svw.c | 7 | ||||
-rw-r--r-- | drivers/scsi/sata_sx4.c | 54 | ||||
-rw-r--r-- | drivers/scsi/sata_vsc.c | 5 | ||||
-rw-r--r-- | include/linux/libata.h | 2 |
13 files changed, 104 insertions, 100 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 179c95c878ac..31065261de8e 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -189,7 +189,6 @@ static void ahci_irq_clear(struct ata_port *ap); | |||
189 | static void ahci_eng_timeout(struct ata_port *ap); | 189 | static void ahci_eng_timeout(struct ata_port *ap); |
190 | static int ahci_port_start(struct ata_port *ap); | 190 | static int ahci_port_start(struct ata_port *ap); |
191 | static void ahci_port_stop(struct ata_port *ap); | 191 | static void ahci_port_stop(struct ata_port *ap); |
192 | static void ahci_host_stop(struct ata_host_set *host_set); | ||
193 | static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | 192 | static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf); |
194 | static void ahci_qc_prep(struct ata_queued_cmd *qc); | 193 | static void ahci_qc_prep(struct ata_queued_cmd *qc); |
195 | static u8 ahci_check_status(struct ata_port *ap); | 194 | static u8 ahci_check_status(struct ata_port *ap); |
@@ -242,7 +241,6 @@ static struct ata_port_operations ahci_ops = { | |||
242 | 241 | ||
243 | .port_start = ahci_port_start, | 242 | .port_start = ahci_port_start, |
244 | .port_stop = ahci_port_stop, | 243 | .port_stop = ahci_port_stop, |
245 | .host_stop = ahci_host_stop, | ||
246 | }; | 244 | }; |
247 | 245 | ||
248 | static struct ata_port_info ahci_port_info[] = { | 246 | static struct ata_port_info ahci_port_info[] = { |
@@ -296,17 +294,9 @@ static inline unsigned long ahci_port_base_ul (unsigned long base, unsigned int | |||
296 | return base + 0x100 + (port * 0x80); | 294 | return base + 0x100 + (port * 0x80); |
297 | } | 295 | } |
298 | 296 | ||
299 | static inline void *ahci_port_base (void *base, unsigned int port) | 297 | static inline void __iomem *ahci_port_base (void __iomem *base, unsigned int port) |
300 | { | 298 | { |
301 | return (void *) ahci_port_base_ul((unsigned long)base, port); | 299 | return (void __iomem *) ahci_port_base_ul((unsigned long)base, port); |
302 | } | ||
303 | |||
304 | static void ahci_host_stop(struct ata_host_set *host_set) | ||
305 | { | ||
306 | struct ahci_host_priv *hpriv = host_set->private_data; | ||
307 | kfree(hpriv); | ||
308 | |||
309 | ata_host_stop(host_set); | ||
310 | } | 300 | } |
311 | 301 | ||
312 | static int ahci_port_start(struct ata_port *ap) | 302 | static int ahci_port_start(struct ata_port *ap) |
@@ -314,8 +304,9 @@ static int ahci_port_start(struct ata_port *ap) | |||
314 | struct device *dev = ap->host_set->dev; | 304 | struct device *dev = ap->host_set->dev; |
315 | struct ahci_host_priv *hpriv = ap->host_set->private_data; | 305 | struct ahci_host_priv *hpriv = ap->host_set->private_data; |
316 | struct ahci_port_priv *pp; | 306 | struct ahci_port_priv *pp; |
317 | void *mem, *mmio = ap->host_set->mmio_base; | 307 | void __iomem *mmio = ap->host_set->mmio_base; |
318 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 308 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
309 | void *mem; | ||
319 | dma_addr_t mem_dma; | 310 | dma_addr_t mem_dma; |
320 | 311 | ||
321 | pp = kmalloc(sizeof(*pp), GFP_KERNEL); | 312 | pp = kmalloc(sizeof(*pp), GFP_KERNEL); |
@@ -383,8 +374,8 @@ static void ahci_port_stop(struct ata_port *ap) | |||
383 | { | 374 | { |
384 | struct device *dev = ap->host_set->dev; | 375 | struct device *dev = ap->host_set->dev; |
385 | struct ahci_port_priv *pp = ap->private_data; | 376 | struct ahci_port_priv *pp = ap->private_data; |
386 | void *mmio = ap->host_set->mmio_base; | 377 | void __iomem *mmio = ap->host_set->mmio_base; |
387 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 378 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
388 | u32 tmp; | 379 | u32 tmp; |
389 | 380 | ||
390 | tmp = readl(port_mmio + PORT_CMD); | 381 | tmp = readl(port_mmio + PORT_CMD); |
@@ -546,8 +537,8 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) | |||
546 | 537 | ||
547 | static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) | 538 | static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) |
548 | { | 539 | { |
549 | void *mmio = ap->host_set->mmio_base; | 540 | void __iomem *mmio = ap->host_set->mmio_base; |
550 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 541 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
551 | u32 tmp; | 542 | u32 tmp; |
552 | int work; | 543 | int work; |
553 | 544 | ||
@@ -595,8 +586,8 @@ static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) | |||
595 | static void ahci_eng_timeout(struct ata_port *ap) | 586 | static void ahci_eng_timeout(struct ata_port *ap) |
596 | { | 587 | { |
597 | struct ata_host_set *host_set = ap->host_set; | 588 | struct ata_host_set *host_set = ap->host_set; |
598 | void *mmio = host_set->mmio_base; | 589 | void __iomem *mmio = host_set->mmio_base; |
599 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 590 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
600 | struct ata_queued_cmd *qc; | 591 | struct ata_queued_cmd *qc; |
601 | unsigned long flags; | 592 | unsigned long flags; |
602 | 593 | ||
@@ -626,8 +617,8 @@ static void ahci_eng_timeout(struct ata_port *ap) | |||
626 | 617 | ||
627 | static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | 618 | static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) |
628 | { | 619 | { |
629 | void *mmio = ap->host_set->mmio_base; | 620 | void __iomem *mmio = ap->host_set->mmio_base; |
630 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 621 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
631 | u32 status, serr, ci; | 622 | u32 status, serr, ci; |
632 | 623 | ||
633 | serr = readl(port_mmio + PORT_SCR_ERR); | 624 | serr = readl(port_mmio + PORT_SCR_ERR); |
@@ -663,7 +654,7 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
663 | struct ata_host_set *host_set = dev_instance; | 654 | struct ata_host_set *host_set = dev_instance; |
664 | struct ahci_host_priv *hpriv; | 655 | struct ahci_host_priv *hpriv; |
665 | unsigned int i, handled = 0; | 656 | unsigned int i, handled = 0; |
666 | void *mmio; | 657 | void __iomem *mmio; |
667 | u32 irq_stat, irq_ack = 0; | 658 | u32 irq_stat, irq_ack = 0; |
668 | 659 | ||
669 | VPRINTK("ENTER\n"); | 660 | VPRINTK("ENTER\n"); |
@@ -709,7 +700,7 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
709 | static int ahci_qc_issue(struct ata_queued_cmd *qc) | 700 | static int ahci_qc_issue(struct ata_queued_cmd *qc) |
710 | { | 701 | { |
711 | struct ata_port *ap = qc->ap; | 702 | struct ata_port *ap = qc->ap; |
712 | void *port_mmio = (void *) ap->ioaddr.cmd_addr; | 703 | void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; |
713 | 704 | ||
714 | writel(1, port_mmio + PORT_CMD_ISSUE); | 705 | writel(1, port_mmio + PORT_CMD_ISSUE); |
715 | readl(port_mmio + PORT_CMD_ISSUE); /* flush */ | 706 | readl(port_mmio + PORT_CMD_ISSUE); /* flush */ |
@@ -894,7 +885,7 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent) | |||
894 | { | 885 | { |
895 | struct ahci_host_priv *hpriv = probe_ent->private_data; | 886 | struct ahci_host_priv *hpriv = probe_ent->private_data; |
896 | struct pci_dev *pdev = to_pci_dev(probe_ent->dev); | 887 | struct pci_dev *pdev = to_pci_dev(probe_ent->dev); |
897 | void *mmio = probe_ent->mmio_base; | 888 | void __iomem *mmio = probe_ent->mmio_base; |
898 | u32 vers, cap, impl, speed; | 889 | u32 vers, cap, impl, speed; |
899 | const char *speed_s; | 890 | const char *speed_s; |
900 | u16 cc; | 891 | u16 cc; |
@@ -967,7 +958,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
967 | struct ata_probe_ent *probe_ent = NULL; | 958 | struct ata_probe_ent *probe_ent = NULL; |
968 | struct ahci_host_priv *hpriv; | 959 | struct ahci_host_priv *hpriv; |
969 | unsigned long base; | 960 | unsigned long base; |
970 | void *mmio_base; | 961 | void __iomem *mmio_base; |
971 | unsigned int board_idx = (unsigned int) ent->driver_data; | 962 | unsigned int board_idx = (unsigned int) ent->driver_data; |
972 | int have_msi, pci_dev_busy = 0; | 963 | int have_msi, pci_dev_busy = 0; |
973 | int rc; | 964 | int rc; |
@@ -1004,8 +995,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1004 | probe_ent->dev = pci_dev_to_dev(pdev); | 995 | probe_ent->dev = pci_dev_to_dev(pdev); |
1005 | INIT_LIST_HEAD(&probe_ent->node); | 996 | INIT_LIST_HEAD(&probe_ent->node); |
1006 | 997 | ||
1007 | mmio_base = ioremap(pci_resource_start(pdev, AHCI_PCI_BAR), | 998 | mmio_base = pci_iomap(pdev, AHCI_PCI_BAR, 0); |
1008 | pci_resource_len(pdev, AHCI_PCI_BAR)); | ||
1009 | if (mmio_base == NULL) { | 999 | if (mmio_base == NULL) { |
1010 | rc = -ENOMEM; | 1000 | rc = -ENOMEM; |
1011 | goto err_out_free_ent; | 1001 | goto err_out_free_ent; |
@@ -1049,7 +1039,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1049 | err_out_hpriv: | 1039 | err_out_hpriv: |
1050 | kfree(hpriv); | 1040 | kfree(hpriv); |
1051 | err_out_iounmap: | 1041 | err_out_iounmap: |
1052 | iounmap(mmio_base); | 1042 | pci_iounmap(pdev, mmio_base); |
1053 | err_out_free_ent: | 1043 | err_out_free_ent: |
1054 | kfree(probe_ent); | 1044 | kfree(probe_ent); |
1055 | err_out_msi: | 1045 | err_out_msi: |
@@ -1089,7 +1079,8 @@ static void ahci_remove_one (struct pci_dev *pdev) | |||
1089 | scsi_host_put(ap->host); | 1079 | scsi_host_put(ap->host); |
1090 | } | 1080 | } |
1091 | 1081 | ||
1092 | host_set->ops->host_stop(host_set); | 1082 | kfree(hpriv); |
1083 | pci_iounmap(pdev, host_set->mmio_base); | ||
1093 | kfree(host_set); | 1084 | kfree(host_set); |
1094 | 1085 | ||
1095 | if (have_msi) | 1086 | if (have_msi) |
@@ -1106,7 +1097,6 @@ static int __init ahci_init(void) | |||
1106 | return pci_module_init(&ahci_pci_driver); | 1097 | return pci_module_init(&ahci_pci_driver); |
1107 | } | 1098 | } |
1108 | 1099 | ||
1109 | |||
1110 | static void __exit ahci_exit(void) | 1100 | static void __exit ahci_exit(void) |
1111 | { | 1101 | { |
1112 | pci_unregister_driver(&ahci_pci_driver); | 1102 | pci_unregister_driver(&ahci_pci_driver); |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index fb28c1261848..deec0cef88d9 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -583,8 +583,7 @@ static void pci_enable_intx(struct pci_dev *pdev) | |||
583 | #define AHCI_ENABLE (1 << 31) | 583 | #define AHCI_ENABLE (1 << 31) |
584 | static int piix_disable_ahci(struct pci_dev *pdev) | 584 | static int piix_disable_ahci(struct pci_dev *pdev) |
585 | { | 585 | { |
586 | void *mmio; | 586 | void __iomem *mmio; |
587 | unsigned long addr; | ||
588 | u32 tmp; | 587 | u32 tmp; |
589 | int rc = 0; | 588 | int rc = 0; |
590 | 589 | ||
@@ -592,11 +591,11 @@ static int piix_disable_ahci(struct pci_dev *pdev) | |||
592 | * works because this device is usually set up by BIOS. | 591 | * works because this device is usually set up by BIOS. |
593 | */ | 592 | */ |
594 | 593 | ||
595 | addr = pci_resource_start(pdev, AHCI_PCI_BAR); | 594 | if (!pci_resource_start(pdev, AHCI_PCI_BAR) || |
596 | if (!addr || !pci_resource_len(pdev, AHCI_PCI_BAR)) | 595 | !pci_resource_len(pdev, AHCI_PCI_BAR)) |
597 | return 0; | 596 | return 0; |
598 | 597 | ||
599 | mmio = ioremap(addr, 64); | 598 | mmio = pci_iomap(pdev, AHCI_PCI_BAR, 64); |
600 | if (!mmio) | 599 | if (!mmio) |
601 | return -ENOMEM; | 600 | return -ENOMEM; |
602 | 601 | ||
@@ -610,7 +609,7 @@ static int piix_disable_ahci(struct pci_dev *pdev) | |||
610 | rc = -EIO; | 609 | rc = -EIO; |
611 | } | 610 | } |
612 | 611 | ||
613 | iounmap(mmio); | 612 | pci_iounmap(pdev, mmio); |
614 | return rc; | 613 | return rc; |
615 | } | 614 | } |
616 | 615 | ||
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index dee4b12b0342..9fb9814525a3 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -75,6 +75,10 @@ static void __ata_qc_complete(struct ata_queued_cmd *qc); | |||
75 | static unsigned int ata_unique_id = 1; | 75 | static unsigned int ata_unique_id = 1; |
76 | static struct workqueue_struct *ata_wq; | 76 | static struct workqueue_struct *ata_wq; |
77 | 77 | ||
78 | int atapi_enabled = 0; | ||
79 | module_param(atapi_enabled, int, 0444); | ||
80 | MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); | ||
81 | |||
78 | MODULE_AUTHOR("Jeff Garzik"); | 82 | MODULE_AUTHOR("Jeff Garzik"); |
79 | MODULE_DESCRIPTION("Library module for ATA devices"); | 83 | MODULE_DESCRIPTION("Library module for ATA devices"); |
80 | MODULE_LICENSE("GPL"); | 84 | MODULE_LICENSE("GPL"); |
@@ -4200,6 +4204,15 @@ ata_probe_ent_alloc(struct device *dev, struct ata_port_info *port) | |||
4200 | 4204 | ||
4201 | 4205 | ||
4202 | 4206 | ||
4207 | #ifdef CONFIG_PCI | ||
4208 | |||
4209 | void ata_pci_host_stop (struct ata_host_set *host_set) | ||
4210 | { | ||
4211 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
4212 | |||
4213 | pci_iounmap(pdev, host_set->mmio_base); | ||
4214 | } | ||
4215 | |||
4203 | /** | 4216 | /** |
4204 | * ata_pci_init_native_mode - Initialize native-mode driver | 4217 | * ata_pci_init_native_mode - Initialize native-mode driver |
4205 | * @pdev: pci device to be initialized | 4218 | * @pdev: pci device to be initialized |
@@ -4212,7 +4225,6 @@ ata_probe_ent_alloc(struct device *dev, struct ata_port_info *port) | |||
4212 | * ata_probe_ent structure should then be freed with kfree(). | 4225 | * ata_probe_ent structure should then be freed with kfree(). |
4213 | */ | 4226 | */ |
4214 | 4227 | ||
4215 | #ifdef CONFIG_PCI | ||
4216 | struct ata_probe_ent * | 4228 | struct ata_probe_ent * |
4217 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port) | 4229 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port) |
4218 | { | 4230 | { |
@@ -4595,6 +4607,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_simulate); | |||
4595 | 4607 | ||
4596 | #ifdef CONFIG_PCI | 4608 | #ifdef CONFIG_PCI |
4597 | EXPORT_SYMBOL_GPL(pci_test_config_bits); | 4609 | EXPORT_SYMBOL_GPL(pci_test_config_bits); |
4610 | EXPORT_SYMBOL_GPL(ata_pci_host_stop); | ||
4598 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); | 4611 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); |
4599 | EXPORT_SYMBOL_GPL(ata_pci_init_one); | 4612 | EXPORT_SYMBOL_GPL(ata_pci_init_one); |
4600 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); | 4613 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 346eb36b1e31..104fd9a63e73 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -1470,10 +1470,10 @@ ata_scsi_find_dev(struct ata_port *ap, struct scsi_device *scsidev) | |||
1470 | if (unlikely(!ata_dev_present(dev))) | 1470 | if (unlikely(!ata_dev_present(dev))) |
1471 | return NULL; | 1471 | return NULL; |
1472 | 1472 | ||
1473 | #ifndef ATA_ENABLE_ATAPI | 1473 | if (!atapi_enabled) { |
1474 | if (unlikely(dev->class == ATA_DEV_ATAPI)) | 1474 | if (unlikely(dev->class == ATA_DEV_ATAPI)) |
1475 | return NULL; | 1475 | return NULL; |
1476 | #endif | 1476 | } |
1477 | 1477 | ||
1478 | return dev; | 1478 | return dev; |
1479 | } | 1479 | } |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index 809c634afbcd..d608b3a0f6fe 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -38,6 +38,7 @@ struct ata_scsi_args { | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | /* libata-core.c */ | 40 | /* libata-core.c */ |
41 | extern int atapi_enabled; | ||
41 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, | 42 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, |
42 | struct ata_device *dev); | 43 | struct ata_device *dev); |
43 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 44 | extern void ata_qc_free(struct ata_queued_cmd *qc); |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 03d9bc6e69df..a1d62dee3be6 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -351,6 +351,7 @@ static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
351 | static void nv_host_stop (struct ata_host_set *host_set) | 351 | static void nv_host_stop (struct ata_host_set *host_set) |
352 | { | 352 | { |
353 | struct nv_host *host = host_set->private_data; | 353 | struct nv_host *host = host_set->private_data; |
354 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
354 | 355 | ||
355 | // Disable hotplug event interrupts. | 356 | // Disable hotplug event interrupts. |
356 | if (host->host_desc->disable_hotplug) | 357 | if (host->host_desc->disable_hotplug) |
@@ -358,7 +359,8 @@ static void nv_host_stop (struct ata_host_set *host_set) | |||
358 | 359 | ||
359 | kfree(host); | 360 | kfree(host); |
360 | 361 | ||
361 | ata_host_stop(host_set); | 362 | if (host_set->mmio_base) |
363 | pci_iounmap(pdev, host_set->mmio_base); | ||
362 | } | 364 | } |
363 | 365 | ||
364 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 366 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
@@ -420,8 +422,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
420 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) { | 422 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) { |
421 | unsigned long base; | 423 | unsigned long base; |
422 | 424 | ||
423 | probe_ent->mmio_base = ioremap(pci_resource_start(pdev, 5), | 425 | probe_ent->mmio_base = pci_iomap(pdev, 5, 0); |
424 | pci_resource_len(pdev, 5)); | ||
425 | if (probe_ent->mmio_base == NULL) { | 426 | if (probe_ent->mmio_base == NULL) { |
426 | rc = -EIO; | 427 | rc = -EIO; |
427 | goto err_out_free_host; | 428 | goto err_out_free_host; |
@@ -457,7 +458,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
457 | 458 | ||
458 | err_out_iounmap: | 459 | err_out_iounmap: |
459 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) | 460 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) |
460 | iounmap(probe_ent->mmio_base); | 461 | pci_iounmap(pdev, probe_ent->mmio_base); |
461 | err_out_free_host: | 462 | err_out_free_host: |
462 | kfree(host); | 463 | kfree(host); |
463 | err_out_free_ent: | 464 | err_out_free_ent: |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 7c4f6ecc1cc9..538ad727bd2e 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -92,6 +92,7 @@ static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); | |||
92 | static void pdc_irq_clear(struct ata_port *ap); | 92 | static void pdc_irq_clear(struct ata_port *ap); |
93 | static int pdc_qc_issue_prot(struct ata_queued_cmd *qc); | 93 | static int pdc_qc_issue_prot(struct ata_queued_cmd *qc); |
94 | 94 | ||
95 | |||
95 | static Scsi_Host_Template pdc_ata_sht = { | 96 | static Scsi_Host_Template pdc_ata_sht = { |
96 | .module = THIS_MODULE, | 97 | .module = THIS_MODULE, |
97 | .name = DRV_NAME, | 98 | .name = DRV_NAME, |
@@ -132,7 +133,7 @@ static struct ata_port_operations pdc_sata_ops = { | |||
132 | .scr_write = pdc_sata_scr_write, | 133 | .scr_write = pdc_sata_scr_write, |
133 | .port_start = pdc_port_start, | 134 | .port_start = pdc_port_start, |
134 | .port_stop = pdc_port_stop, | 135 | .port_stop = pdc_port_stop, |
135 | .host_stop = ata_host_stop, | 136 | .host_stop = ata_pci_host_stop, |
136 | }; | 137 | }; |
137 | 138 | ||
138 | static struct ata_port_operations pdc_pata_ops = { | 139 | static struct ata_port_operations pdc_pata_ops = { |
@@ -153,7 +154,7 @@ static struct ata_port_operations pdc_pata_ops = { | |||
153 | 154 | ||
154 | .port_start = pdc_port_start, | 155 | .port_start = pdc_port_start, |
155 | .port_stop = pdc_port_stop, | 156 | .port_stop = pdc_port_stop, |
156 | .host_stop = ata_host_stop, | 157 | .host_stop = ata_pci_host_stop, |
157 | }; | 158 | }; |
158 | 159 | ||
159 | static struct ata_port_info pdc_port_info[] = { | 160 | static struct ata_port_info pdc_port_info[] = { |
@@ -282,7 +283,7 @@ static void pdc_port_stop(struct ata_port *ap) | |||
282 | 283 | ||
283 | static void pdc_reset_port(struct ata_port *ap) | 284 | static void pdc_reset_port(struct ata_port *ap) |
284 | { | 285 | { |
285 | void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT; | 286 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_CTLSTAT; |
286 | unsigned int i; | 287 | unsigned int i; |
287 | u32 tmp; | 288 | u32 tmp; |
288 | 289 | ||
@@ -418,7 +419,7 @@ static inline unsigned int pdc_host_intr( struct ata_port *ap, | |||
418 | u8 status; | 419 | u8 status; |
419 | unsigned int handled = 0, have_err = 0; | 420 | unsigned int handled = 0, have_err = 0; |
420 | u32 tmp; | 421 | u32 tmp; |
421 | void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; | 422 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; |
422 | 423 | ||
423 | tmp = readl(mmio); | 424 | tmp = readl(mmio); |
424 | if (tmp & PDC_ERR_MASK) { | 425 | if (tmp & PDC_ERR_MASK) { |
@@ -447,7 +448,7 @@ static inline unsigned int pdc_host_intr( struct ata_port *ap, | |||
447 | static void pdc_irq_clear(struct ata_port *ap) | 448 | static void pdc_irq_clear(struct ata_port *ap) |
448 | { | 449 | { |
449 | struct ata_host_set *host_set = ap->host_set; | 450 | struct ata_host_set *host_set = ap->host_set; |
450 | void *mmio = host_set->mmio_base; | 451 | void __iomem *mmio = host_set->mmio_base; |
451 | 452 | ||
452 | readl(mmio + PDC_INT_SEQMASK); | 453 | readl(mmio + PDC_INT_SEQMASK); |
453 | } | 454 | } |
@@ -459,7 +460,7 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r | |||
459 | u32 mask = 0; | 460 | u32 mask = 0; |
460 | unsigned int i, tmp; | 461 | unsigned int i, tmp; |
461 | unsigned int handled = 0; | 462 | unsigned int handled = 0; |
462 | void *mmio_base; | 463 | void __iomem *mmio_base; |
463 | 464 | ||
464 | VPRINTK("ENTER\n"); | 465 | VPRINTK("ENTER\n"); |
465 | 466 | ||
@@ -581,7 +582,7 @@ static void pdc_ata_setup_port(struct ata_ioports *port, unsigned long base) | |||
581 | 582 | ||
582 | static void pdc_host_init(unsigned int chip_id, struct ata_probe_ent *pe) | 583 | static void pdc_host_init(unsigned int chip_id, struct ata_probe_ent *pe) |
583 | { | 584 | { |
584 | void *mmio = pe->mmio_base; | 585 | void __iomem *mmio = pe->mmio_base; |
585 | u32 tmp; | 586 | u32 tmp; |
586 | 587 | ||
587 | /* | 588 | /* |
@@ -624,7 +625,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
624 | static int printed_version; | 625 | static int printed_version; |
625 | struct ata_probe_ent *probe_ent = NULL; | 626 | struct ata_probe_ent *probe_ent = NULL; |
626 | unsigned long base; | 627 | unsigned long base; |
627 | void *mmio_base; | 628 | void __iomem *mmio_base; |
628 | unsigned int board_idx = (unsigned int) ent->driver_data; | 629 | unsigned int board_idx = (unsigned int) ent->driver_data; |
629 | int pci_dev_busy = 0; | 630 | int pci_dev_busy = 0; |
630 | int rc; | 631 | int rc; |
@@ -663,8 +664,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
663 | probe_ent->dev = pci_dev_to_dev(pdev); | 664 | probe_ent->dev = pci_dev_to_dev(pdev); |
664 | INIT_LIST_HEAD(&probe_ent->node); | 665 | INIT_LIST_HEAD(&probe_ent->node); |
665 | 666 | ||
666 | mmio_base = ioremap(pci_resource_start(pdev, 3), | 667 | mmio_base = pci_iomap(pdev, 3, 0); |
667 | pci_resource_len(pdev, 3)); | ||
668 | if (mmio_base == NULL) { | 668 | if (mmio_base == NULL) { |
669 | rc = -ENOMEM; | 669 | rc = -ENOMEM; |
670 | goto err_out_free_ent; | 670 | goto err_out_free_ent; |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 9c99ab433bd3..029c2482e127 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -538,11 +538,12 @@ static void qs_port_stop(struct ata_port *ap) | |||
538 | static void qs_host_stop(struct ata_host_set *host_set) | 538 | static void qs_host_stop(struct ata_host_set *host_set) |
539 | { | 539 | { |
540 | void __iomem *mmio_base = host_set->mmio_base; | 540 | void __iomem *mmio_base = host_set->mmio_base; |
541 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
541 | 542 | ||
542 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ | 543 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ |
543 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ | 544 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ |
544 | 545 | ||
545 | ata_host_stop(host_set); | 546 | pci_iounmap(pdev, mmio_base); |
546 | } | 547 | } |
547 | 548 | ||
548 | static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe) | 549 | static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe) |
@@ -646,8 +647,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
646 | goto err_out_regions; | 647 | goto err_out_regions; |
647 | } | 648 | } |
648 | 649 | ||
649 | mmio_base = ioremap(pci_resource_start(pdev, 4), | 650 | mmio_base = pci_iomap(pdev, 4, 0); |
650 | pci_resource_len(pdev, 4)); | ||
651 | if (mmio_base == NULL) { | 651 | if (mmio_base == NULL) { |
652 | rc = -ENOMEM; | 652 | rc = -ENOMEM; |
653 | goto err_out_regions; | 653 | goto err_out_regions; |
@@ -697,7 +697,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
697 | return 0; | 697 | return 0; |
698 | 698 | ||
699 | err_out_iounmap: | 699 | err_out_iounmap: |
700 | iounmap(mmio_base); | 700 | pci_iounmap(pdev, mmio_base); |
701 | err_out_regions: | 701 | err_out_regions: |
702 | pci_release_regions(pdev); | 702 | pci_release_regions(pdev); |
703 | err_out: | 703 | err_out: |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 71d49548f0a3..ba98a175ee3a 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -86,6 +86,7 @@ static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg); | |||
86 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | 86 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); |
87 | static void sil_post_set_mode (struct ata_port *ap); | 87 | static void sil_post_set_mode (struct ata_port *ap); |
88 | 88 | ||
89 | |||
89 | static struct pci_device_id sil_pci_tbl[] = { | 90 | static struct pci_device_id sil_pci_tbl[] = { |
90 | { 0x1095, 0x3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, | 91 | { 0x1095, 0x3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, |
91 | { 0x1095, 0x0240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, | 92 | { 0x1095, 0x0240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, |
@@ -172,7 +173,7 @@ static struct ata_port_operations sil_ops = { | |||
172 | .scr_write = sil_scr_write, | 173 | .scr_write = sil_scr_write, |
173 | .port_start = ata_port_start, | 174 | .port_start = ata_port_start, |
174 | .port_stop = ata_port_stop, | 175 | .port_stop = ata_port_stop, |
175 | .host_stop = ata_host_stop, | 176 | .host_stop = ata_pci_host_stop, |
176 | }; | 177 | }; |
177 | 178 | ||
178 | static struct ata_port_info sil_port_info[] = { | 179 | static struct ata_port_info sil_port_info[] = { |
@@ -231,6 +232,7 @@ MODULE_LICENSE("GPL"); | |||
231 | MODULE_DEVICE_TABLE(pci, sil_pci_tbl); | 232 | MODULE_DEVICE_TABLE(pci, sil_pci_tbl); |
232 | MODULE_VERSION(DRV_VERSION); | 233 | MODULE_VERSION(DRV_VERSION); |
233 | 234 | ||
235 | |||
234 | static unsigned char sil_get_device_cache_line(struct pci_dev *pdev) | 236 | static unsigned char sil_get_device_cache_line(struct pci_dev *pdev) |
235 | { | 237 | { |
236 | u8 cache_line = 0; | 238 | u8 cache_line = 0; |
@@ -242,7 +244,8 @@ static void sil_post_set_mode (struct ata_port *ap) | |||
242 | { | 244 | { |
243 | struct ata_host_set *host_set = ap->host_set; | 245 | struct ata_host_set *host_set = ap->host_set; |
244 | struct ata_device *dev; | 246 | struct ata_device *dev; |
245 | void *addr = host_set->mmio_base + sil_port[ap->port_no].xfer_mode; | 247 | void __iomem *addr = |
248 | host_set->mmio_base + sil_port[ap->port_no].xfer_mode; | ||
246 | u32 tmp, dev_mode[2]; | 249 | u32 tmp, dev_mode[2]; |
247 | unsigned int i; | 250 | unsigned int i; |
248 | 251 | ||
@@ -375,7 +378,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
375 | static int printed_version; | 378 | static int printed_version; |
376 | struct ata_probe_ent *probe_ent = NULL; | 379 | struct ata_probe_ent *probe_ent = NULL; |
377 | unsigned long base; | 380 | unsigned long base; |
378 | void *mmio_base; | 381 | void __iomem *mmio_base; |
379 | int rc; | 382 | int rc; |
380 | unsigned int i; | 383 | unsigned int i; |
381 | int pci_dev_busy = 0; | 384 | int pci_dev_busy = 0; |
@@ -425,8 +428,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
425 | probe_ent->irq_flags = SA_SHIRQ; | 428 | probe_ent->irq_flags = SA_SHIRQ; |
426 | probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; | 429 | probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; |
427 | 430 | ||
428 | mmio_base = ioremap(pci_resource_start(pdev, 5), | 431 | mmio_base = pci_iomap(pdev, 5, 0); |
429 | pci_resource_len(pdev, 5)); | ||
430 | if (mmio_base == NULL) { | 432 | if (mmio_base == NULL) { |
431 | rc = -ENOMEM; | 433 | rc = -ENOMEM; |
432 | goto err_out_free_ent; | 434 | goto err_out_free_ent; |
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 19d3bb3b0fb6..d89d968bedac 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -318,7 +318,7 @@ static struct ata_port_operations k2_sata_ops = { | |||
318 | .scr_write = k2_sata_scr_write, | 318 | .scr_write = k2_sata_scr_write, |
319 | .port_start = ata_port_start, | 319 | .port_start = ata_port_start, |
320 | .port_stop = ata_port_stop, | 320 | .port_stop = ata_port_stop, |
321 | .host_stop = ata_host_stop, | 321 | .host_stop = ata_pci_host_stop, |
322 | }; | 322 | }; |
323 | 323 | ||
324 | static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) | 324 | static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) |
@@ -346,7 +346,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
346 | static int printed_version; | 346 | static int printed_version; |
347 | struct ata_probe_ent *probe_ent = NULL; | 347 | struct ata_probe_ent *probe_ent = NULL; |
348 | unsigned long base; | 348 | unsigned long base; |
349 | void *mmio_base; | 349 | void __iomem *mmio_base; |
350 | int pci_dev_busy = 0; | 350 | int pci_dev_busy = 0; |
351 | int rc; | 351 | int rc; |
352 | int i; | 352 | int i; |
@@ -392,8 +392,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
392 | probe_ent->dev = pci_dev_to_dev(pdev); | 392 | probe_ent->dev = pci_dev_to_dev(pdev); |
393 | INIT_LIST_HEAD(&probe_ent->node); | 393 | INIT_LIST_HEAD(&probe_ent->node); |
394 | 394 | ||
395 | mmio_base = ioremap(pci_resource_start(pdev, 5), | 395 | mmio_base = pci_iomap(pdev, 5, 0); |
396 | pci_resource_len(pdev, 5)); | ||
397 | if (mmio_base == NULL) { | 396 | if (mmio_base == NULL) { |
398 | rc = -ENOMEM; | 397 | rc = -ENOMEM; |
399 | goto err_out_free_ent; | 398 | goto err_out_free_ent; |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index c72fcc46f0fa..540a85191172 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -245,13 +245,14 @@ static struct pci_driver pdc_sata_pci_driver = { | |||
245 | 245 | ||
246 | static void pdc20621_host_stop(struct ata_host_set *host_set) | 246 | static void pdc20621_host_stop(struct ata_host_set *host_set) |
247 | { | 247 | { |
248 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
248 | struct pdc_host_priv *hpriv = host_set->private_data; | 249 | struct pdc_host_priv *hpriv = host_set->private_data; |
249 | void *dimm_mmio = hpriv->dimm_mmio; | 250 | void *dimm_mmio = hpriv->dimm_mmio; |
250 | 251 | ||
251 | iounmap(dimm_mmio); | 252 | pci_iounmap(pdev, dimm_mmio); |
252 | kfree(hpriv); | 253 | kfree(hpriv); |
253 | 254 | ||
254 | ata_host_stop(host_set); | 255 | pci_iounmap(pdev, host_set->mmio_base); |
255 | } | 256 | } |
256 | 257 | ||
257 | static int pdc_port_start(struct ata_port *ap) | 258 | static int pdc_port_start(struct ata_port *ap) |
@@ -451,9 +452,9 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc) | |||
451 | struct scatterlist *sg = qc->sg; | 452 | struct scatterlist *sg = qc->sg; |
452 | struct ata_port *ap = qc->ap; | 453 | struct ata_port *ap = qc->ap; |
453 | struct pdc_port_priv *pp = ap->private_data; | 454 | struct pdc_port_priv *pp = ap->private_data; |
454 | void *mmio = ap->host_set->mmio_base; | 455 | void __iomem *mmio = ap->host_set->mmio_base; |
455 | struct pdc_host_priv *hpriv = ap->host_set->private_data; | 456 | struct pdc_host_priv *hpriv = ap->host_set->private_data; |
456 | void *dimm_mmio = hpriv->dimm_mmio; | 457 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
457 | unsigned int portno = ap->port_no; | 458 | unsigned int portno = ap->port_no; |
458 | unsigned int i, last, idx, total_len = 0, sgt_len; | 459 | unsigned int i, last, idx, total_len = 0, sgt_len; |
459 | u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; | 460 | u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; |
@@ -513,9 +514,9 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) | |||
513 | { | 514 | { |
514 | struct ata_port *ap = qc->ap; | 515 | struct ata_port *ap = qc->ap; |
515 | struct pdc_port_priv *pp = ap->private_data; | 516 | struct pdc_port_priv *pp = ap->private_data; |
516 | void *mmio = ap->host_set->mmio_base; | 517 | void __iomem *mmio = ap->host_set->mmio_base; |
517 | struct pdc_host_priv *hpriv = ap->host_set->private_data; | 518 | struct pdc_host_priv *hpriv = ap->host_set->private_data; |
518 | void *dimm_mmio = hpriv->dimm_mmio; | 519 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
519 | unsigned int portno = ap->port_no; | 520 | unsigned int portno = ap->port_no; |
520 | unsigned int i; | 521 | unsigned int i; |
521 | 522 | ||
@@ -565,7 +566,7 @@ static void __pdc20621_push_hdma(struct ata_queued_cmd *qc, | |||
565 | { | 566 | { |
566 | struct ata_port *ap = qc->ap; | 567 | struct ata_port *ap = qc->ap; |
567 | struct ata_host_set *host_set = ap->host_set; | 568 | struct ata_host_set *host_set = ap->host_set; |
568 | void *mmio = host_set->mmio_base; | 569 | void __iomem *mmio = host_set->mmio_base; |
569 | 570 | ||
570 | /* hard-code chip #0 */ | 571 | /* hard-code chip #0 */ |
571 | mmio += PDC_CHIP0_OFS; | 572 | mmio += PDC_CHIP0_OFS; |
@@ -639,7 +640,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) | |||
639 | struct ata_port *ap = qc->ap; | 640 | struct ata_port *ap = qc->ap; |
640 | struct ata_host_set *host_set = ap->host_set; | 641 | struct ata_host_set *host_set = ap->host_set; |
641 | unsigned int port_no = ap->port_no; | 642 | unsigned int port_no = ap->port_no; |
642 | void *mmio = host_set->mmio_base; | 643 | void __iomem *mmio = host_set->mmio_base; |
643 | unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE); | 644 | unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE); |
644 | u8 seq = (u8) (port_no + 1); | 645 | u8 seq = (u8) (port_no + 1); |
645 | unsigned int port_ofs; | 646 | unsigned int port_ofs; |
@@ -699,7 +700,7 @@ static int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc) | |||
699 | static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | 700 | static inline unsigned int pdc20621_host_intr( struct ata_port *ap, |
700 | struct ata_queued_cmd *qc, | 701 | struct ata_queued_cmd *qc, |
701 | unsigned int doing_hdma, | 702 | unsigned int doing_hdma, |
702 | void *mmio) | 703 | void __iomem *mmio) |
703 | { | 704 | { |
704 | unsigned int port_no = ap->port_no; | 705 | unsigned int port_no = ap->port_no; |
705 | unsigned int port_ofs = | 706 | unsigned int port_ofs = |
@@ -778,7 +779,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
778 | static void pdc20621_irq_clear(struct ata_port *ap) | 779 | static void pdc20621_irq_clear(struct ata_port *ap) |
779 | { | 780 | { |
780 | struct ata_host_set *host_set = ap->host_set; | 781 | struct ata_host_set *host_set = ap->host_set; |
781 | void *mmio = host_set->mmio_base; | 782 | void __iomem *mmio = host_set->mmio_base; |
782 | 783 | ||
783 | mmio += PDC_CHIP0_OFS; | 784 | mmio += PDC_CHIP0_OFS; |
784 | 785 | ||
@@ -792,7 +793,7 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re | |||
792 | u32 mask = 0; | 793 | u32 mask = 0; |
793 | unsigned int i, tmp, port_no; | 794 | unsigned int i, tmp, port_no; |
794 | unsigned int handled = 0; | 795 | unsigned int handled = 0; |
795 | void *mmio_base; | 796 | void __iomem *mmio_base; |
796 | 797 | ||
797 | VPRINTK("ENTER\n"); | 798 | VPRINTK("ENTER\n"); |
798 | 799 | ||
@@ -940,9 +941,9 @@ static void pdc20621_get_from_dimm(struct ata_probe_ent *pe, void *psource, | |||
940 | u16 idx; | 941 | u16 idx; |
941 | u8 page_mask; | 942 | u8 page_mask; |
942 | long dist; | 943 | long dist; |
943 | void *mmio = pe->mmio_base; | 944 | void __iomem *mmio = pe->mmio_base; |
944 | struct pdc_host_priv *hpriv = pe->private_data; | 945 | struct pdc_host_priv *hpriv = pe->private_data; |
945 | void *dimm_mmio = hpriv->dimm_mmio; | 946 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
946 | 947 | ||
947 | /* hard-code chip #0 */ | 948 | /* hard-code chip #0 */ |
948 | mmio += PDC_CHIP0_OFS; | 949 | mmio += PDC_CHIP0_OFS; |
@@ -996,9 +997,9 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
996 | u16 idx; | 997 | u16 idx; |
997 | u8 page_mask; | 998 | u8 page_mask; |
998 | long dist; | 999 | long dist; |
999 | void *mmio = pe->mmio_base; | 1000 | void __iomem *mmio = pe->mmio_base; |
1000 | struct pdc_host_priv *hpriv = pe->private_data; | 1001 | struct pdc_host_priv *hpriv = pe->private_data; |
1001 | void *dimm_mmio = hpriv->dimm_mmio; | 1002 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
1002 | 1003 | ||
1003 | /* hard-code chip #0 */ | 1004 | /* hard-code chip #0 */ |
1004 | mmio += PDC_CHIP0_OFS; | 1005 | mmio += PDC_CHIP0_OFS; |
@@ -1044,7 +1045,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1044 | static unsigned int pdc20621_i2c_read(struct ata_probe_ent *pe, u32 device, | 1045 | static unsigned int pdc20621_i2c_read(struct ata_probe_ent *pe, u32 device, |
1045 | u32 subaddr, u32 *pdata) | 1046 | u32 subaddr, u32 *pdata) |
1046 | { | 1047 | { |
1047 | void *mmio = pe->mmio_base; | 1048 | void __iomem *mmio = pe->mmio_base; |
1048 | u32 i2creg = 0; | 1049 | u32 i2creg = 0; |
1049 | u32 status; | 1050 | u32 status; |
1050 | u32 count =0; | 1051 | u32 count =0; |
@@ -1103,7 +1104,7 @@ static int pdc20621_prog_dimm0(struct ata_probe_ent *pe) | |||
1103 | u32 data = 0; | 1104 | u32 data = 0; |
1104 | int size, i; | 1105 | int size, i; |
1105 | u8 bdimmsize; | 1106 | u8 bdimmsize; |
1106 | void *mmio = pe->mmio_base; | 1107 | void __iomem *mmio = pe->mmio_base; |
1107 | static const struct { | 1108 | static const struct { |
1108 | unsigned int reg; | 1109 | unsigned int reg; |
1109 | unsigned int ofs; | 1110 | unsigned int ofs; |
@@ -1166,7 +1167,7 @@ static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe) | |||
1166 | { | 1167 | { |
1167 | u32 data, spd0; | 1168 | u32 data, spd0; |
1168 | int error, i; | 1169 | int error, i; |
1169 | void *mmio = pe->mmio_base; | 1170 | void __iomem *mmio = pe->mmio_base; |
1170 | 1171 | ||
1171 | /* hard-code chip #0 */ | 1172 | /* hard-code chip #0 */ |
1172 | mmio += PDC_CHIP0_OFS; | 1173 | mmio += PDC_CHIP0_OFS; |
@@ -1220,7 +1221,7 @@ static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe) | |||
1220 | u32 ticks=0; | 1221 | u32 ticks=0; |
1221 | u32 clock=0; | 1222 | u32 clock=0; |
1222 | u32 fparam=0; | 1223 | u32 fparam=0; |
1223 | void *mmio = pe->mmio_base; | 1224 | void __iomem *mmio = pe->mmio_base; |
1224 | 1225 | ||
1225 | /* hard-code chip #0 */ | 1226 | /* hard-code chip #0 */ |
1226 | mmio += PDC_CHIP0_OFS; | 1227 | mmio += PDC_CHIP0_OFS; |
@@ -1344,7 +1345,7 @@ static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe) | |||
1344 | static void pdc_20621_init(struct ata_probe_ent *pe) | 1345 | static void pdc_20621_init(struct ata_probe_ent *pe) |
1345 | { | 1346 | { |
1346 | u32 tmp; | 1347 | u32 tmp; |
1347 | void *mmio = pe->mmio_base; | 1348 | void __iomem *mmio = pe->mmio_base; |
1348 | 1349 | ||
1349 | /* hard-code chip #0 */ | 1350 | /* hard-code chip #0 */ |
1350 | mmio += PDC_CHIP0_OFS; | 1351 | mmio += PDC_CHIP0_OFS; |
@@ -1377,7 +1378,8 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1377 | static int printed_version; | 1378 | static int printed_version; |
1378 | struct ata_probe_ent *probe_ent = NULL; | 1379 | struct ata_probe_ent *probe_ent = NULL; |
1379 | unsigned long base; | 1380 | unsigned long base; |
1380 | void *mmio_base, *dimm_mmio = NULL; | 1381 | void __iomem *mmio_base; |
1382 | void __iomem *dimm_mmio = NULL; | ||
1381 | struct pdc_host_priv *hpriv = NULL; | 1383 | struct pdc_host_priv *hpriv = NULL; |
1382 | unsigned int board_idx = (unsigned int) ent->driver_data; | 1384 | unsigned int board_idx = (unsigned int) ent->driver_data; |
1383 | int pci_dev_busy = 0; | 1385 | int pci_dev_busy = 0; |
@@ -1417,8 +1419,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1417 | probe_ent->dev = pci_dev_to_dev(pdev); | 1419 | probe_ent->dev = pci_dev_to_dev(pdev); |
1418 | INIT_LIST_HEAD(&probe_ent->node); | 1420 | INIT_LIST_HEAD(&probe_ent->node); |
1419 | 1421 | ||
1420 | mmio_base = ioremap(pci_resource_start(pdev, 3), | 1422 | mmio_base = pci_iomap(pdev, 3, 0); |
1421 | pci_resource_len(pdev, 3)); | ||
1422 | if (mmio_base == NULL) { | 1423 | if (mmio_base == NULL) { |
1423 | rc = -ENOMEM; | 1424 | rc = -ENOMEM; |
1424 | goto err_out_free_ent; | 1425 | goto err_out_free_ent; |
@@ -1432,8 +1433,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1432 | } | 1433 | } |
1433 | memset(hpriv, 0, sizeof(*hpriv)); | 1434 | memset(hpriv, 0, sizeof(*hpriv)); |
1434 | 1435 | ||
1435 | dimm_mmio = ioremap(pci_resource_start(pdev, 4), | 1436 | dimm_mmio = pci_iomap(pdev, 4, 0); |
1436 | pci_resource_len(pdev, 4)); | ||
1437 | if (!dimm_mmio) { | 1437 | if (!dimm_mmio) { |
1438 | kfree(hpriv); | 1438 | kfree(hpriv); |
1439 | rc = -ENOMEM; | 1439 | rc = -ENOMEM; |
@@ -1480,9 +1480,9 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1480 | 1480 | ||
1481 | err_out_iounmap_dimm: /* only get to this label if 20621 */ | 1481 | err_out_iounmap_dimm: /* only get to this label if 20621 */ |
1482 | kfree(hpriv); | 1482 | kfree(hpriv); |
1483 | iounmap(dimm_mmio); | 1483 | pci_iounmap(pdev, dimm_mmio); |
1484 | err_out_iounmap: | 1484 | err_out_iounmap: |
1485 | iounmap(mmio_base); | 1485 | pci_iounmap(pdev, mmio_base); |
1486 | err_out_free_ent: | 1486 | err_out_free_ent: |
1487 | kfree(probe_ent); | 1487 | kfree(probe_ent); |
1488 | err_out_regions: | 1488 | err_out_regions: |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 3985f344da4d..cf94e0158a8d 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -252,7 +252,7 @@ static struct ata_port_operations vsc_sata_ops = { | |||
252 | .scr_write = vsc_sata_scr_write, | 252 | .scr_write = vsc_sata_scr_write, |
253 | .port_start = ata_port_start, | 253 | .port_start = ata_port_start, |
254 | .port_stop = ata_port_stop, | 254 | .port_stop = ata_port_stop, |
255 | .host_stop = ata_host_stop, | 255 | .host_stop = ata_pci_host_stop, |
256 | }; | 256 | }; |
257 | 257 | ||
258 | static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) | 258 | static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) |
@@ -326,8 +326,7 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d | |||
326 | probe_ent->dev = pci_dev_to_dev(pdev); | 326 | probe_ent->dev = pci_dev_to_dev(pdev); |
327 | INIT_LIST_HEAD(&probe_ent->node); | 327 | INIT_LIST_HEAD(&probe_ent->node); |
328 | 328 | ||
329 | mmio_base = ioremap(pci_resource_start(pdev, 0), | 329 | mmio_base = pci_iomap(pdev, 0, 0); |
330 | pci_resource_len(pdev, 0)); | ||
331 | if (mmio_base == NULL) { | 330 | if (mmio_base == NULL) { |
332 | rc = -ENOMEM; | 331 | rc = -ENOMEM; |
333 | goto err_out_free_ent; | 332 | goto err_out_free_ent; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index fc05a9899288..022105c745fc 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
43 | #undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */ | ||
44 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some | 43 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some |
45 | * low-level drivers */ | 44 | * low-level drivers */ |
46 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ | 45 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ |
@@ -450,6 +449,7 @@ struct pci_bits { | |||
450 | unsigned long val; | 449 | unsigned long val; |
451 | }; | 450 | }; |
452 | 451 | ||
452 | extern void ata_pci_host_stop (struct ata_host_set *host_set); | ||
453 | extern struct ata_probe_ent * | 453 | extern struct ata_probe_ent * |
454 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); | 454 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); |
455 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); | 455 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); |