diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-08-10 07:22:08 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-10 07:22:08 -0400 |
commit | fb8231a8b139035476f2a8aaac837d0099b66dad (patch) | |
tree | 2875806beb96ea0cdab292146767a5085721dc6a /drivers/scsi | |
parent | 426d31071ac476ea62c62656b242930c17b58c00 (diff) | |
parent | f6cec0ae58c17522a7bc4e2f39dae19f199ab534 (diff) |
Merge branch 'master' into for-next
Conflicts:
arch/arm/mach-omap1/board-nokia770.c
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_attr.c | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 1 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/aha152x_stub.c | 17 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/fdomain_stub.c | 15 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 61 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/qlogic_stub.c | 33 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/sym53c500_cs.c | 31 | ||||
-rw-r--r-- | drivers/scsi/qlogicpti.c | 8 | ||||
-rw-r--r-- | drivers/scsi/scsi_priv.h | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sun_esp.c | 6 |
11 files changed, 83 insertions, 96 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_attr.c b/drivers/scsi/arcmsr/arcmsr_attr.c index 07fdfe57e38e..a4e04c50c436 100644 --- a/drivers/scsi/arcmsr/arcmsr_attr.c +++ b/drivers/scsi/arcmsr/arcmsr_attr.c | |||
@@ -192,7 +192,6 @@ static struct bin_attribute arcmsr_sysfs_message_read_attr = { | |||
192 | .attr = { | 192 | .attr = { |
193 | .name = "mu_read", | 193 | .name = "mu_read", |
194 | .mode = S_IRUSR , | 194 | .mode = S_IRUSR , |
195 | .owner = THIS_MODULE, | ||
196 | }, | 195 | }, |
197 | .size = 1032, | 196 | .size = 1032, |
198 | .read = arcmsr_sysfs_iop_message_read, | 197 | .read = arcmsr_sysfs_iop_message_read, |
@@ -202,7 +201,6 @@ static struct bin_attribute arcmsr_sysfs_message_write_attr = { | |||
202 | .attr = { | 201 | .attr = { |
203 | .name = "mu_write", | 202 | .name = "mu_write", |
204 | .mode = S_IWUSR, | 203 | .mode = S_IWUSR, |
205 | .owner = THIS_MODULE, | ||
206 | }, | 204 | }, |
207 | .size = 1032, | 205 | .size = 1032, |
208 | .write = arcmsr_sysfs_iop_message_write, | 206 | .write = arcmsr_sysfs_iop_message_write, |
@@ -212,7 +210,6 @@ static struct bin_attribute arcmsr_sysfs_message_clear_attr = { | |||
212 | .attr = { | 210 | .attr = { |
213 | .name = "mu_clear", | 211 | .name = "mu_clear", |
214 | .mode = S_IWUSR, | 212 | .mode = S_IWUSR, |
215 | .owner = THIS_MODULE, | ||
216 | }, | 213 | }, |
217 | .size = 1, | 214 | .size = 1, |
218 | .write = arcmsr_sysfs_iop_message_clear, | 215 | .write = arcmsr_sysfs_iop_message_clear, |
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 868874c28f99..162704cf6a96 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -2778,7 +2778,6 @@ static struct bin_attribute sysfs_drvr_stat_data_attr = { | |||
2778 | .attr = { | 2778 | .attr = { |
2779 | .name = "lpfc_drvr_stat_data", | 2779 | .name = "lpfc_drvr_stat_data", |
2780 | .mode = S_IRUSR, | 2780 | .mode = S_IRUSR, |
2781 | .owner = THIS_MODULE, | ||
2782 | }, | 2781 | }, |
2783 | .size = LPFC_MAX_TARGET * MAX_STAT_DATA_SIZE_PER_TARGET, | 2782 | .size = LPFC_MAX_TARGET * MAX_STAT_DATA_SIZE_PER_TARGET, |
2784 | .read = sysfs_drvr_stat_data_read, | 2783 | .read = sysfs_drvr_stat_data_read, |
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index 9d70aef99227..61f49bdcc0c2 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include <scsi/scsi_host.h> | 49 | #include <scsi/scsi_host.h> |
50 | #include "aha152x.h" | 50 | #include "aha152x.h" |
51 | 51 | ||
52 | #include <pcmcia/cs_types.h> | ||
53 | #include <pcmcia/cs.h> | 52 | #include <pcmcia/cs.h> |
54 | #include <pcmcia/cistpl.h> | 53 | #include <pcmcia/cistpl.h> |
55 | #include <pcmcia/ds.h> | 54 | #include <pcmcia/ds.h> |
@@ -101,9 +100,8 @@ static int aha152x_probe(struct pcmcia_device *link) | |||
101 | info->p_dev = link; | 100 | info->p_dev = link; |
102 | link->priv = info; | 101 | link->priv = info; |
103 | 102 | ||
104 | link->io.NumPorts1 = 0x20; | 103 | link->resource[0]->end = 0x20; |
105 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 104 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
106 | link->io.IOAddrLines = 10; | ||
107 | link->conf.Attributes = CONF_ENABLE_IRQ; | 105 | link->conf.Attributes = CONF_ENABLE_IRQ; |
108 | link->conf.IntType = INT_MEMORY_AND_IO; | 106 | link->conf.IntType = INT_MEMORY_AND_IO; |
109 | link->conf.Present = PRESENT_OPTION; | 107 | link->conf.Present = PRESENT_OPTION; |
@@ -131,15 +129,16 @@ static int aha152x_config_check(struct pcmcia_device *p_dev, | |||
131 | unsigned int vcc, | 129 | unsigned int vcc, |
132 | void *priv_data) | 130 | void *priv_data) |
133 | { | 131 | { |
132 | p_dev->io_lines = 10; | ||
134 | /* For New Media T&J, look for a SCSI window */ | 133 | /* For New Media T&J, look for a SCSI window */ |
135 | if (cfg->io.win[0].len >= 0x20) | 134 | if (cfg->io.win[0].len >= 0x20) |
136 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 135 | p_dev->resource[0]->start = cfg->io.win[0].base; |
137 | else if ((cfg->io.nwin > 1) && | 136 | else if ((cfg->io.nwin > 1) && |
138 | (cfg->io.win[1].len >= 0x20)) | 137 | (cfg->io.win[1].len >= 0x20)) |
139 | p_dev->io.BasePort1 = cfg->io.win[1].base; | 138 | p_dev->resource[0]->start = cfg->io.win[1].base; |
140 | if ((cfg->io.nwin > 0) && | 139 | if ((cfg->io.nwin > 0) && |
141 | (p_dev->io.BasePort1 < 0xffff)) { | 140 | (p_dev->resource[0]->start < 0xffff)) { |
142 | if (!pcmcia_request_io(p_dev, &p_dev->io)) | 141 | if (!pcmcia_request_io(p_dev)) |
143 | return 0; | 142 | return 0; |
144 | } | 143 | } |
145 | return -EINVAL; | 144 | return -EINVAL; |
@@ -168,7 +167,7 @@ static int aha152x_config_cs(struct pcmcia_device *link) | |||
168 | /* Set configuration options for the aha152x driver */ | 167 | /* Set configuration options for the aha152x driver */ |
169 | memset(&s, 0, sizeof(s)); | 168 | memset(&s, 0, sizeof(s)); |
170 | s.conf = "PCMCIA setup"; | 169 | s.conf = "PCMCIA setup"; |
171 | s.io_port = link->io.BasePort1; | 170 | s.io_port = link->resource[0]->start; |
172 | s.irq = link->irq; | 171 | s.irq = link->irq; |
173 | s.scsiid = host_id; | 172 | s.scsiid = host_id; |
174 | s.reconnect = reconnect; | 173 | s.reconnect = reconnect; |
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index 21b141151dfc..13dbe5c48492 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <scsi/scsi_host.h> | 46 | #include <scsi/scsi_host.h> |
47 | #include "fdomain.h" | 47 | #include "fdomain.h" |
48 | 48 | ||
49 | #include <pcmcia/cs_types.h> | ||
50 | #include <pcmcia/cs.h> | 49 | #include <pcmcia/cs.h> |
51 | #include <pcmcia/cistpl.h> | 50 | #include <pcmcia/cistpl.h> |
52 | #include <pcmcia/ds.h> | 51 | #include <pcmcia/ds.h> |
@@ -84,9 +83,8 @@ static int fdomain_probe(struct pcmcia_device *link) | |||
84 | 83 | ||
85 | info->p_dev = link; | 84 | info->p_dev = link; |
86 | link->priv = info; | 85 | link->priv = info; |
87 | link->io.NumPorts1 = 0x10; | 86 | link->resource[0]->end = 0x10; |
88 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 87 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
89 | link->io.IOAddrLines = 10; | ||
90 | link->conf.Attributes = CONF_ENABLE_IRQ; | 88 | link->conf.Attributes = CONF_ENABLE_IRQ; |
91 | link->conf.IntType = INT_MEMORY_AND_IO; | 89 | link->conf.IntType = INT_MEMORY_AND_IO; |
92 | link->conf.Present = PRESENT_OPTION; | 90 | link->conf.Present = PRESENT_OPTION; |
@@ -113,8 +111,9 @@ static int fdomain_config_check(struct pcmcia_device *p_dev, | |||
113 | unsigned int vcc, | 111 | unsigned int vcc, |
114 | void *priv_data) | 112 | void *priv_data) |
115 | { | 113 | { |
116 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 114 | p_dev->io_lines = 10; |
117 | return pcmcia_request_io(p_dev, &p_dev->io); | 115 | p_dev->resource[0]->start = cfg->io.win[0].base; |
116 | return pcmcia_request_io(p_dev); | ||
118 | } | 117 | } |
119 | 118 | ||
120 | 119 | ||
@@ -138,10 +137,10 @@ static int fdomain_config(struct pcmcia_device *link) | |||
138 | goto failed; | 137 | goto failed; |
139 | 138 | ||
140 | /* A bad hack... */ | 139 | /* A bad hack... */ |
141 | release_region(link->io.BasePort1, link->io.NumPorts1); | 140 | release_region(link->resource[0]->start, resource_size(link->resource[0])); |
142 | 141 | ||
143 | /* Set configuration options for the fdomain driver */ | 142 | /* Set configuration options for the fdomain driver */ |
144 | sprintf(str, "%d,%d", link->io.BasePort1, link->irq); | 143 | sprintf(str, "%d,%d", (unsigned int) link->resource[0]->start, link->irq); |
145 | fdomain_setup(str); | 144 | fdomain_setup(str); |
146 | 145 | ||
147 | host = __fdomain_16x0_detect(&fdomain_driver_template); | 146 | host = __fdomain_16x0_detect(&fdomain_driver_template); |
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 0f0e112c3f8e..dd9b40306f3d 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <scsi/scsi.h> | 47 | #include <scsi/scsi.h> |
48 | #include <scsi/scsi_ioctl.h> | 48 | #include <scsi/scsi_ioctl.h> |
49 | 49 | ||
50 | #include <pcmcia/cs_types.h> | ||
51 | #include <pcmcia/cs.h> | 50 | #include <pcmcia/cs.h> |
52 | #include <pcmcia/cistpl.h> | 51 | #include <pcmcia/cistpl.h> |
53 | #include <pcmcia/cisreg.h> | 52 | #include <pcmcia/cisreg.h> |
@@ -1559,9 +1558,8 @@ static int nsp_cs_probe(struct pcmcia_device *link) | |||
1559 | nsp_dbg(NSP_DEBUG_INIT, "info=0x%p", info); | 1558 | nsp_dbg(NSP_DEBUG_INIT, "info=0x%p", info); |
1560 | 1559 | ||
1561 | /* The io structure describes IO port mapping */ | 1560 | /* The io structure describes IO port mapping */ |
1562 | link->io.NumPorts1 = 0x10; | 1561 | link->resource[0]->end = 0x10; |
1563 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 1562 | link->resource[0]->flags = IO_DATA_PATH_WIDTH_AUTO; |
1564 | link->io.IOAddrLines = 10; /* not used */ | ||
1565 | 1563 | ||
1566 | /* General socket configuration */ | 1564 | /* General socket configuration */ |
1567 | link->conf.Attributes = CONF_ENABLE_IRQ; | 1565 | link->conf.Attributes = CONF_ENABLE_IRQ; |
@@ -1642,29 +1640,27 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev, | |||
1642 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; | 1640 | p_dev->conf.Attributes |= CONF_ENABLE_IRQ; |
1643 | 1641 | ||
1644 | /* IO window settings */ | 1642 | /* IO window settings */ |
1645 | p_dev->io.NumPorts1 = p_dev->io.NumPorts2 = 0; | 1643 | p_dev->resource[0]->end = p_dev->resource[1]->end = 0; |
1646 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 1644 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
1647 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; | 1645 | cistpl_io_t *io = (cfg->io.nwin) ? &cfg->io : &dflt->io; |
1648 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 1646 | p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK; |
1649 | if (!(io->flags & CISTPL_IO_8BIT)) | 1647 | p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; |
1650 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_16; | 1648 | p_dev->resource[0]->flags |= |
1651 | if (!(io->flags & CISTPL_IO_16BIT)) | 1649 | pcmcia_io_cfg_data_width(io->flags); |
1652 | p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 1650 | p_dev->resource[0]->start = io->win[0].base; |
1653 | p_dev->io.IOAddrLines = io->flags & CISTPL_IO_LINES_MASK; | 1651 | p_dev->resource[0]->end = io->win[0].len; |
1654 | p_dev->io.BasePort1 = io->win[0].base; | ||
1655 | p_dev->io.NumPorts1 = io->win[0].len; | ||
1656 | if (io->nwin > 1) { | 1652 | if (io->nwin > 1) { |
1657 | p_dev->io.Attributes2 = p_dev->io.Attributes1; | 1653 | p_dev->resource[1]->flags = |
1658 | p_dev->io.BasePort2 = io->win[1].base; | 1654 | p_dev->resource[0]->flags; |
1659 | p_dev->io.NumPorts2 = io->win[1].len; | 1655 | p_dev->resource[1]->start = io->win[1].base; |
1656 | p_dev->resource[1]->end = io->win[1].len; | ||
1660 | } | 1657 | } |
1661 | /* This reserves IO space but doesn't actually enable it */ | 1658 | /* This reserves IO space but doesn't actually enable it */ |
1662 | if (pcmcia_request_io(p_dev, &p_dev->io) != 0) | 1659 | if (pcmcia_request_io(p_dev) != 0) |
1663 | goto next_entry; | 1660 | goto next_entry; |
1664 | } | 1661 | } |
1665 | 1662 | ||
1666 | if ((cfg->mem.nwin > 0) || (dflt->mem.nwin > 0)) { | 1663 | if ((cfg->mem.nwin > 0) || (dflt->mem.nwin > 0)) { |
1667 | memreq_t map; | ||
1668 | cistpl_mem_t *mem = | 1664 | cistpl_mem_t *mem = |
1669 | (cfg->mem.nwin) ? &cfg->mem : &dflt->mem; | 1665 | (cfg->mem.nwin) ? &cfg->mem : &dflt->mem; |
1670 | cfg_mem->req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM; | 1666 | cfg_mem->req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM; |
@@ -1676,8 +1672,8 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev, | |||
1676 | cfg_mem->req.AccessSpeed = 0; | 1672 | cfg_mem->req.AccessSpeed = 0; |
1677 | if (pcmcia_request_window(p_dev, &cfg_mem->req, &p_dev->win) != 0) | 1673 | if (pcmcia_request_window(p_dev, &cfg_mem->req, &p_dev->win) != 0) |
1678 | goto next_entry; | 1674 | goto next_entry; |
1679 | map.Page = 0; map.CardOffset = mem->win[0].card_addr; | 1675 | if (pcmcia_map_mem_page(p_dev, p_dev->win, |
1680 | if (pcmcia_map_mem_page(p_dev, p_dev->win, &map) != 0) | 1676 | mem->win[0].card_addr) != 0) |
1681 | goto next_entry; | 1677 | goto next_entry; |
1682 | 1678 | ||
1683 | cfg_mem->data->MmioAddress = (unsigned long) ioremap_nocache(cfg_mem->req.Base, cfg_mem->req.Size); | 1679 | cfg_mem->data->MmioAddress = (unsigned long) ioremap_nocache(cfg_mem->req.Base, cfg_mem->req.Size); |
@@ -1720,17 +1716,19 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
1720 | goto cs_failed; | 1716 | goto cs_failed; |
1721 | 1717 | ||
1722 | if (free_ports) { | 1718 | if (free_ports) { |
1723 | if (link->io.BasePort1) { | 1719 | if (link->resource[0]) { |
1724 | release_region(link->io.BasePort1, link->io.NumPorts1); | 1720 | release_region(link->resource[0]->start, |
1721 | resource_size(link->resource[0])); | ||
1725 | } | 1722 | } |
1726 | if (link->io.BasePort2) { | 1723 | if (link->resource[1]) { |
1727 | release_region(link->io.BasePort2, link->io.NumPorts2); | 1724 | release_region(link->resource[1]->start, |
1725 | resource_size(link->resource[1])); | ||
1728 | } | 1726 | } |
1729 | } | 1727 | } |
1730 | 1728 | ||
1731 | /* Set port and IRQ */ | 1729 | /* Set port and IRQ */ |
1732 | data->BaseAddress = link->io.BasePort1; | 1730 | data->BaseAddress = link->resource[0]->start; |
1733 | data->NumAddress = link->io.NumPorts1; | 1731 | data->NumAddress = resource_size(link->resource[0]); |
1734 | data->IrqNumber = link->irq; | 1732 | data->IrqNumber = link->irq; |
1735 | 1733 | ||
1736 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", | 1734 | nsp_dbg(NSP_DEBUG_INIT, "I/O[0x%x+0x%x] IRQ %d", |
@@ -1765,13 +1763,10 @@ static int nsp_cs_config(struct pcmcia_device *link) | |||
1765 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { | 1763 | if (link->conf.Attributes & CONF_ENABLE_IRQ) { |
1766 | printk(", irq %d", link->irq); | 1764 | printk(", irq %d", link->irq); |
1767 | } | 1765 | } |
1768 | if (link->io.NumPorts1) { | 1766 | if (link->resource[0]) |
1769 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 1767 | printk(", io %pR", link->resource[0]); |
1770 | link->io.BasePort1+link->io.NumPorts1-1); | 1768 | if (link->resource[1]) |
1771 | } | 1769 | printk(" & %pR", link->resource[1]); |
1772 | if (link->io.NumPorts2) | ||
1773 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
1774 | link->io.BasePort2+link->io.NumPorts2-1); | ||
1775 | if (link->win) | 1770 | if (link->win) |
1776 | printk(", mem 0x%06lx-0x%06lx", cfg_mem->req.Base, | 1771 | printk(", mem 0x%06lx-0x%06lx", cfg_mem->req.Base, |
1777 | cfg_mem->req.Base+cfg_mem->req.Size-1); | 1772 | cfg_mem->req.Base+cfg_mem->req.Size-1); |
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index f0fc6baed9fc..eb775f1a523c 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include <scsi/scsi_host.h> | 48 | #include <scsi/scsi_host.h> |
49 | #include "../qlogicfas408.h" | 49 | #include "../qlogicfas408.h" |
50 | 50 | ||
51 | #include <pcmcia/cs_types.h> | ||
52 | #include <pcmcia/cs.h> | 51 | #include <pcmcia/cs.h> |
53 | #include <pcmcia/cistpl.h> | 52 | #include <pcmcia/cistpl.h> |
54 | #include <pcmcia/ds.h> | 53 | #include <pcmcia/ds.h> |
@@ -157,9 +156,8 @@ static int qlogic_probe(struct pcmcia_device *link) | |||
157 | return -ENOMEM; | 156 | return -ENOMEM; |
158 | info->p_dev = link; | 157 | info->p_dev = link; |
159 | link->priv = info; | 158 | link->priv = info; |
160 | link->io.NumPorts1 = 16; | 159 | link->resource[0]->end = 16; |
161 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 160 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
162 | link->io.IOAddrLines = 10; | ||
163 | link->conf.Attributes = CONF_ENABLE_IRQ; | 161 | link->conf.Attributes = CONF_ENABLE_IRQ; |
164 | link->conf.IntType = INT_MEMORY_AND_IO; | 162 | link->conf.IntType = INT_MEMORY_AND_IO; |
165 | link->conf.Present = PRESENT_OPTION; | 163 | link->conf.Present = PRESENT_OPTION; |
@@ -186,13 +184,14 @@ static int qlogic_config_check(struct pcmcia_device *p_dev, | |||
186 | unsigned int vcc, | 184 | unsigned int vcc, |
187 | void *priv_data) | 185 | void *priv_data) |
188 | { | 186 | { |
189 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 187 | p_dev->io_lines = 10; |
190 | p_dev->io.NumPorts1 = cfg->io.win[0].len; | 188 | p_dev->resource[0]->start = cfg->io.win[0].base; |
189 | p_dev->resource[0]->end = cfg->io.win[0].len; | ||
191 | 190 | ||
192 | if (p_dev->io.BasePort1 == 0) | 191 | if (p_dev->resource[0]->start == 0) |
193 | return -ENODEV; | 192 | return -ENODEV; |
194 | 193 | ||
195 | return pcmcia_request_io(p_dev, &p_dev->io); | 194 | return pcmcia_request_io(p_dev); |
196 | } | 195 | } |
197 | 196 | ||
198 | static int qlogic_config(struct pcmcia_device * link) | 197 | static int qlogic_config(struct pcmcia_device * link) |
@@ -216,18 +215,18 @@ static int qlogic_config(struct pcmcia_device * link) | |||
216 | 215 | ||
217 | if ((info->manf_id == MANFID_MACNICA) || (info->manf_id == MANFID_PIONEER) || (info->manf_id == 0x0098)) { | 216 | if ((info->manf_id == MANFID_MACNICA) || (info->manf_id == MANFID_PIONEER) || (info->manf_id == 0x0098)) { |
218 | /* set ATAcmd */ | 217 | /* set ATAcmd */ |
219 | outb(0xb4, link->io.BasePort1 + 0xd); | 218 | outb(0xb4, link->resource[0]->start + 0xd); |
220 | outb(0x24, link->io.BasePort1 + 0x9); | 219 | outb(0x24, link->resource[0]->start + 0x9); |
221 | outb(0x04, link->io.BasePort1 + 0xd); | 220 | outb(0x04, link->resource[0]->start + 0xd); |
222 | } | 221 | } |
223 | 222 | ||
224 | /* The KXL-810AN has a bigger IO port window */ | 223 | /* The KXL-810AN has a bigger IO port window */ |
225 | if (link->io.NumPorts1 == 32) | 224 | if (resource_size(link->resource[0]) == 32) |
226 | host = qlogic_detect(&qlogicfas_driver_template, link, | 225 | host = qlogic_detect(&qlogicfas_driver_template, link, |
227 | link->io.BasePort1 + 16, link->irq); | 226 | link->resource[0]->start + 16, link->irq); |
228 | else | 227 | else |
229 | host = qlogic_detect(&qlogicfas_driver_template, link, | 228 | host = qlogic_detect(&qlogicfas_driver_template, link, |
230 | link->io.BasePort1, link->irq); | 229 | link->resource[0]->start, link->irq); |
231 | 230 | ||
232 | if (!host) { | 231 | if (!host) { |
233 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); | 232 | printk(KERN_INFO "%s: no SCSI devices found\n", qlogic_name); |
@@ -269,9 +268,9 @@ static int qlogic_resume(struct pcmcia_device *link) | |||
269 | if ((info->manf_id == MANFID_MACNICA) || | 268 | if ((info->manf_id == MANFID_MACNICA) || |
270 | (info->manf_id == MANFID_PIONEER) || | 269 | (info->manf_id == MANFID_PIONEER) || |
271 | (info->manf_id == 0x0098)) { | 270 | (info->manf_id == 0x0098)) { |
272 | outb(0x80, link->io.BasePort1 + 0xd); | 271 | outb(0x80, link->resource[0]->start + 0xd); |
273 | outb(0x24, link->io.BasePort1 + 0x9); | 272 | outb(0x24, link->resource[0]->start + 0x9); |
274 | outb(0x04, link->io.BasePort1 + 0xd); | 273 | outb(0x04, link->resource[0]->start + 0xd); |
275 | } | 274 | } |
276 | /* Ugggglllyyyy!!! */ | 275 | /* Ugggglllyyyy!!! */ |
277 | qlogicfas408_bus_reset(NULL); | 276 | qlogicfas408_bus_reset(NULL); |
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index a51164171179..321e390c9120 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -71,7 +71,6 @@ | |||
71 | #include <scsi/scsi.h> | 71 | #include <scsi/scsi.h> |
72 | #include <scsi/scsi_host.h> | 72 | #include <scsi/scsi_host.h> |
73 | 73 | ||
74 | #include <pcmcia/cs_types.h> | ||
75 | #include <pcmcia/cs.h> | 74 | #include <pcmcia/cs.h> |
76 | #include <pcmcia/cistpl.h> | 75 | #include <pcmcia/cistpl.h> |
77 | #include <pcmcia/ds.h> | 76 | #include <pcmcia/ds.h> |
@@ -691,13 +690,14 @@ static int SYM53C500_config_check(struct pcmcia_device *p_dev, | |||
691 | unsigned int vcc, | 690 | unsigned int vcc, |
692 | void *priv_data) | 691 | void *priv_data) |
693 | { | 692 | { |
694 | p_dev->io.BasePort1 = cfg->io.win[0].base; | 693 | p_dev->io_lines = 10; |
695 | p_dev->io.NumPorts1 = cfg->io.win[0].len; | 694 | p_dev->resource[0]->start = cfg->io.win[0].base; |
695 | p_dev->resource[0]->end = cfg->io.win[0].len; | ||
696 | 696 | ||
697 | if (p_dev->io.BasePort1 == 0) | 697 | if (p_dev->resource[0]->start == 0) |
698 | return -ENODEV; | 698 | return -ENODEV; |
699 | 699 | ||
700 | return pcmcia_request_io(p_dev, &p_dev->io); | 700 | return pcmcia_request_io(p_dev); |
701 | } | 701 | } |
702 | 702 | ||
703 | static int | 703 | static int |
@@ -734,9 +734,9 @@ SYM53C500_config(struct pcmcia_device *link) | |||
734 | (info->manf_id == MANFID_PIONEER) || | 734 | (info->manf_id == MANFID_PIONEER) || |
735 | (info->manf_id == 0x0098)) { | 735 | (info->manf_id == 0x0098)) { |
736 | /* set ATAcmd */ | 736 | /* set ATAcmd */ |
737 | outb(0xb4, link->io.BasePort1 + 0xd); | 737 | outb(0xb4, link->resource[0]->start + 0xd); |
738 | outb(0x24, link->io.BasePort1 + 0x9); | 738 | outb(0x24, link->resource[0]->start + 0x9); |
739 | outb(0x04, link->io.BasePort1 + 0xd); | 739 | outb(0x04, link->resource[0]->start + 0xd); |
740 | } | 740 | } |
741 | 741 | ||
742 | /* | 742 | /* |
@@ -749,7 +749,7 @@ SYM53C500_config(struct pcmcia_device *link) | |||
749 | * 0x130, 0x230, 0x280, 0x290, | 749 | * 0x130, 0x230, 0x280, 0x290, |
750 | * 0x320, 0x330, 0x340, 0x350 | 750 | * 0x320, 0x330, 0x340, 0x350 |
751 | */ | 751 | */ |
752 | port_base = link->io.BasePort1; | 752 | port_base = link->resource[0]->start; |
753 | irq_level = link->irq; | 753 | irq_level = link->irq; |
754 | 754 | ||
755 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", | 755 | DEB(printk("SYM53C500: port_base=0x%x, irq=%d, fast_pio=%d\n", |
@@ -822,15 +822,15 @@ static int sym53c500_resume(struct pcmcia_device *link) | |||
822 | if ((info->manf_id == MANFID_MACNICA) || | 822 | if ((info->manf_id == MANFID_MACNICA) || |
823 | (info->manf_id == MANFID_PIONEER) || | 823 | (info->manf_id == MANFID_PIONEER) || |
824 | (info->manf_id == 0x0098)) { | 824 | (info->manf_id == 0x0098)) { |
825 | outb(0x80, link->io.BasePort1 + 0xd); | 825 | outb(0x80, link->resource[0]->start + 0xd); |
826 | outb(0x24, link->io.BasePort1 + 0x9); | 826 | outb(0x24, link->resource[0]->start + 0x9); |
827 | outb(0x04, link->io.BasePort1 + 0xd); | 827 | outb(0x04, link->resource[0]->start + 0xd); |
828 | } | 828 | } |
829 | /* | 829 | /* |
830 | * If things don't work after a "resume", | 830 | * If things don't work after a "resume", |
831 | * this is a good place to start looking. | 831 | * this is a good place to start looking. |
832 | */ | 832 | */ |
833 | SYM53C500_int_host_reset(link->io.BasePort1); | 833 | SYM53C500_int_host_reset(link->resource[0]->start); |
834 | 834 | ||
835 | return 0; | 835 | return 0; |
836 | } | 836 | } |
@@ -859,9 +859,8 @@ SYM53C500_probe(struct pcmcia_device *link) | |||
859 | return -ENOMEM; | 859 | return -ENOMEM; |
860 | info->p_dev = link; | 860 | info->p_dev = link; |
861 | link->priv = info; | 861 | link->priv = info; |
862 | link->io.NumPorts1 = 16; | 862 | link->resource[0]->end = 16; |
863 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO; | 863 | link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; |
864 | link->io.IOAddrLines = 10; | ||
865 | link->conf.Attributes = CONF_ENABLE_IRQ; | 864 | link->conf.Attributes = CONF_ENABLE_IRQ; |
866 | link->conf.IntType = INT_MEMORY_AND_IO; | 865 | link->conf.IntType = INT_MEMORY_AND_IO; |
867 | 866 | ||
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index ca5c15c779cf..53d7ed0dc169 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
@@ -729,7 +729,7 @@ static int __devinit qpti_register_irq(struct qlogicpti *qpti) | |||
729 | { | 729 | { |
730 | struct of_device *op = qpti->op; | 730 | struct of_device *op = qpti->op; |
731 | 731 | ||
732 | qpti->qhost->irq = qpti->irq = op->irqs[0]; | 732 | qpti->qhost->irq = qpti->irq = op->archdata.irqs[0]; |
733 | 733 | ||
734 | /* We used to try various overly-clever things to | 734 | /* We used to try various overly-clever things to |
735 | * reduce the interrupt processing overhead on | 735 | * reduce the interrupt processing overhead on |
@@ -1302,7 +1302,7 @@ static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_devic | |||
1302 | /* Sometimes Antares cards come up not completely | 1302 | /* Sometimes Antares cards come up not completely |
1303 | * setup, and we get a report of a zero IRQ. | 1303 | * setup, and we get a report of a zero IRQ. |
1304 | */ | 1304 | */ |
1305 | if (op->irqs[0] == 0) | 1305 | if (op->archdata.irqs[0] == 0) |
1306 | return -ENODEV; | 1306 | return -ENODEV; |
1307 | 1307 | ||
1308 | host = scsi_host_alloc(tpnt, sizeof(struct qlogicpti)); | 1308 | host = scsi_host_alloc(tpnt, sizeof(struct qlogicpti)); |
@@ -1467,12 +1467,12 @@ static struct of_platform_driver qpti_sbus_driver = { | |||
1467 | 1467 | ||
1468 | static int __init qpti_init(void) | 1468 | static int __init qpti_init(void) |
1469 | { | 1469 | { |
1470 | return of_register_driver(&qpti_sbus_driver, &of_bus_type); | 1470 | return of_register_platform_driver(&qpti_sbus_driver); |
1471 | } | 1471 | } |
1472 | 1472 | ||
1473 | static void __exit qpti_exit(void) | 1473 | static void __exit qpti_exit(void) |
1474 | { | 1474 | { |
1475 | of_unregister_driver(&qpti_sbus_driver); | 1475 | of_unregister_platform_driver(&qpti_sbus_driver); |
1476 | } | 1476 | } |
1477 | 1477 | ||
1478 | MODULE_DESCRIPTION("QlogicISP SBUS driver"); | 1478 | MODULE_DESCRIPTION("QlogicISP SBUS driver"); |
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h index 026295e2c539..b4056d14f812 100644 --- a/drivers/scsi/scsi_priv.h +++ b/drivers/scsi/scsi_priv.h | |||
@@ -148,8 +148,6 @@ static inline void scsi_netlink_exit(void) {} | |||
148 | /* scsi_pm.c */ | 148 | /* scsi_pm.c */ |
149 | #ifdef CONFIG_PM_OPS | 149 | #ifdef CONFIG_PM_OPS |
150 | extern const struct dev_pm_ops scsi_bus_pm_ops; | 150 | extern const struct dev_pm_ops scsi_bus_pm_ops; |
151 | #else /* CONFIG_PM_OPS */ | ||
152 | #define scsi_bus_pm_ops (*NULL) | ||
153 | #endif | 151 | #endif |
154 | #ifdef CONFIG_PM_RUNTIME | 152 | #ifdef CONFIG_PM_RUNTIME |
155 | extern void scsi_autopm_get_target(struct scsi_target *); | 153 | extern void scsi_autopm_get_target(struct scsi_target *); |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 562fb3bce261..c3f67373a4f8 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -381,7 +381,9 @@ struct bus_type scsi_bus_type = { | |||
381 | .name = "scsi", | 381 | .name = "scsi", |
382 | .match = scsi_bus_match, | 382 | .match = scsi_bus_match, |
383 | .uevent = scsi_bus_uevent, | 383 | .uevent = scsi_bus_uevent, |
384 | #ifdef CONFIG_PM_OPS | ||
384 | .pm = &scsi_bus_pm_ops, | 385 | .pm = &scsi_bus_pm_ops, |
386 | #endif | ||
385 | }; | 387 | }; |
386 | EXPORT_SYMBOL_GPL(scsi_bus_type); | 388 | EXPORT_SYMBOL_GPL(scsi_bus_type); |
387 | 389 | ||
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index 386dd9d602b6..89ba6fe02f80 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
@@ -116,7 +116,7 @@ static int __devinit esp_sbus_register_irq(struct esp *esp) | |||
116 | struct Scsi_Host *host = esp->host; | 116 | struct Scsi_Host *host = esp->host; |
117 | struct of_device *op = esp->dev; | 117 | struct of_device *op = esp->dev; |
118 | 118 | ||
119 | host->irq = op->irqs[0]; | 119 | host->irq = op->archdata.irqs[0]; |
120 | return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); | 120 | return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); |
121 | } | 121 | } |
122 | 122 | ||
@@ -644,12 +644,12 @@ static struct of_platform_driver esp_sbus_driver = { | |||
644 | 644 | ||
645 | static int __init sunesp_init(void) | 645 | static int __init sunesp_init(void) |
646 | { | 646 | { |
647 | return of_register_driver(&esp_sbus_driver, &of_bus_type); | 647 | return of_register_platform_driver(&esp_sbus_driver); |
648 | } | 648 | } |
649 | 649 | ||
650 | static void __exit sunesp_exit(void) | 650 | static void __exit sunesp_exit(void) |
651 | { | 651 | { |
652 | of_unregister_driver(&esp_sbus_driver); | 652 | of_unregister_platform_driver(&esp_sbus_driver); |
653 | } | 653 | } |
654 | 654 | ||
655 | MODULE_DESCRIPTION("Sun ESP SCSI driver"); | 655 | MODULE_DESCRIPTION("Sun ESP SCSI driver"); |