diff options
author | <jgarzik@pretzel.yyz.us> | 2005-05-29 14:24:57 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-29 14:24:57 -0400 |
commit | d582c4ea307873503a68d6d7ab72ee8599e032a9 (patch) | |
tree | 30b5ea37ba5803fe25815d14ee248be309975cb5 /drivers | |
parent | 87507cfdd2cde397c9da8f6e7ec23b2b47ec53d6 (diff) | |
parent | aa8f0dc6c3dbf1cf3ff58f3e945c981be134814d (diff) |
Automatic merge of /spare/repo/netdev-2.6 branch use-after-unmap
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/ahci.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ata_piix.c | 2 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 15 | ||||
-rw-r--r-- | drivers/scsi/sata_nv.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sata_promise.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_qstor.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sata_sil.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_sis.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_svw.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_sx4.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sata_uli.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_via.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sata_vsc.c | 1 |
13 files changed, 28 insertions, 4 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 8263b3a5d8d7..fc5263c6b102 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -290,6 +290,8 @@ static void ahci_host_stop(struct ata_host_set *host_set) | |||
290 | { | 290 | { |
291 | struct ahci_host_priv *hpriv = host_set->private_data; | 291 | struct ahci_host_priv *hpriv = host_set->private_data; |
292 | kfree(hpriv); | 292 | kfree(hpriv); |
293 | |||
294 | ata_host_stop(host_set); | ||
293 | } | 295 | } |
294 | 296 | ||
295 | static int ahci_port_start(struct ata_port *ap) | 297 | static int ahci_port_start(struct ata_port *ap) |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 3867f91ef8c7..54c52349adc5 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -153,6 +153,7 @@ static struct ata_port_operations piix_pata_ops = { | |||
153 | 153 | ||
154 | .port_start = ata_port_start, | 154 | .port_start = ata_port_start, |
155 | .port_stop = ata_port_stop, | 155 | .port_stop = ata_port_stop, |
156 | .host_stop = ata_host_stop, | ||
156 | }; | 157 | }; |
157 | 158 | ||
158 | static struct ata_port_operations piix_sata_ops = { | 159 | static struct ata_port_operations piix_sata_ops = { |
@@ -180,6 +181,7 @@ static struct ata_port_operations piix_sata_ops = { | |||
180 | 181 | ||
181 | .port_start = ata_port_start, | 182 | .port_start = ata_port_start, |
182 | .port_stop = ata_port_stop, | 183 | .port_stop = ata_port_stop, |
184 | .host_stop = ata_host_stop, | ||
183 | }; | 185 | }; |
184 | 186 | ||
185 | static struct ata_port_info piix_port_info[] = { | 187 | static struct ata_port_info piix_port_info[] = { |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 63d3f70d06e1..30a88f0e7bd6 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3322,6 +3322,13 @@ void ata_port_stop (struct ata_port *ap) | |||
3322 | dma_free_coherent(dev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma); | 3322 | dma_free_coherent(dev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma); |
3323 | } | 3323 | } |
3324 | 3324 | ||
3325 | void ata_host_stop (struct ata_host_set *host_set) | ||
3326 | { | ||
3327 | if (host_set->mmio_base) | ||
3328 | iounmap(host_set->mmio_base); | ||
3329 | } | ||
3330 | |||
3331 | |||
3325 | /** | 3332 | /** |
3326 | * ata_host_remove - Unregister SCSI host structure with upper layers | 3333 | * ata_host_remove - Unregister SCSI host structure with upper layers |
3327 | * @ap: Port to unregister | 3334 | * @ap: Port to unregister |
@@ -3878,10 +3885,6 @@ void ata_pci_remove_one (struct pci_dev *pdev) | |||
3878 | } | 3885 | } |
3879 | 3886 | ||
3880 | free_irq(host_set->irq, host_set); | 3887 | free_irq(host_set->irq, host_set); |
3881 | if (host_set->ops->host_stop) | ||
3882 | host_set->ops->host_stop(host_set); | ||
3883 | if (host_set->mmio_base) | ||
3884 | iounmap(host_set->mmio_base); | ||
3885 | 3888 | ||
3886 | for (i = 0; i < host_set->n_ports; i++) { | 3889 | for (i = 0; i < host_set->n_ports; i++) { |
3887 | ap = host_set->ports[i]; | 3890 | ap = host_set->ports[i]; |
@@ -3900,6 +3903,9 @@ void ata_pci_remove_one (struct pci_dev *pdev) | |||
3900 | scsi_host_put(ap->host); | 3903 | scsi_host_put(ap->host); |
3901 | } | 3904 | } |
3902 | 3905 | ||
3906 | if (host_set->ops->host_stop) | ||
3907 | host_set->ops->host_stop(host_set); | ||
3908 | |||
3903 | kfree(host_set); | 3909 | kfree(host_set); |
3904 | 3910 | ||
3905 | pci_release_regions(pdev); | 3911 | pci_release_regions(pdev); |
@@ -3997,6 +4003,7 @@ EXPORT_SYMBOL_GPL(ata_chk_err); | |||
3997 | EXPORT_SYMBOL_GPL(ata_exec_command); | 4003 | EXPORT_SYMBOL_GPL(ata_exec_command); |
3998 | EXPORT_SYMBOL_GPL(ata_port_start); | 4004 | EXPORT_SYMBOL_GPL(ata_port_start); |
3999 | EXPORT_SYMBOL_GPL(ata_port_stop); | 4005 | EXPORT_SYMBOL_GPL(ata_port_stop); |
4006 | EXPORT_SYMBOL_GPL(ata_host_stop); | ||
4000 | EXPORT_SYMBOL_GPL(ata_interrupt); | 4007 | EXPORT_SYMBOL_GPL(ata_interrupt); |
4001 | EXPORT_SYMBOL_GPL(ata_qc_prep); | 4008 | EXPORT_SYMBOL_GPL(ata_qc_prep); |
4002 | EXPORT_SYMBOL_GPL(ata_bmdma_setup); | 4009 | EXPORT_SYMBOL_GPL(ata_bmdma_setup); |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 69009f853a49..b0403ccd8a25 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -329,6 +329,8 @@ static void nv_host_stop (struct ata_host_set *host_set) | |||
329 | host->host_desc->disable_hotplug(host_set); | 329 | host->host_desc->disable_hotplug(host_set); |
330 | 330 | ||
331 | kfree(host); | 331 | kfree(host); |
332 | |||
333 | ata_host_stop(host_set); | ||
332 | } | 334 | } |
333 | 335 | ||
334 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 336 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index c4e9e0298122..b18c90582e67 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -122,6 +122,7 @@ static struct ata_port_operations pdc_ata_ops = { | |||
122 | .scr_write = pdc_sata_scr_write, | 122 | .scr_write = pdc_sata_scr_write, |
123 | .port_start = pdc_port_start, | 123 | .port_start = pdc_port_start, |
124 | .port_stop = pdc_port_stop, | 124 | .port_stop = pdc_port_stop, |
125 | .host_stop = ata_host_stop, | ||
125 | }; | 126 | }; |
126 | 127 | ||
127 | static struct ata_port_info pdc_port_info[] = { | 128 | static struct ata_port_info pdc_port_info[] = { |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index dfd362104717..1383e8a28d72 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -536,6 +536,8 @@ static void qs_host_stop(struct ata_host_set *host_set) | |||
536 | 536 | ||
537 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ | 537 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ |
538 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ | 538 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ |
539 | |||
540 | ata_host_stop(host_set); | ||
539 | } | 541 | } |
540 | 542 | ||
541 | static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe) | 543 | static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe) |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 2b2ff48be396..238580d244e6 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -161,6 +161,7 @@ static struct ata_port_operations sil_ops = { | |||
161 | .scr_write = sil_scr_write, | 161 | .scr_write = sil_scr_write, |
162 | .port_start = ata_port_start, | 162 | .port_start = ata_port_start, |
163 | .port_stop = ata_port_stop, | 163 | .port_stop = ata_port_stop, |
164 | .host_stop = ata_host_stop, | ||
164 | }; | 165 | }; |
165 | 166 | ||
166 | static struct ata_port_info sil_port_info[] = { | 167 | static struct ata_port_info sil_port_info[] = { |
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c index 5105ddd08447..e418b89c6b9d 100644 --- a/drivers/scsi/sata_sis.c +++ b/drivers/scsi/sata_sis.c | |||
@@ -114,6 +114,7 @@ static struct ata_port_operations sis_ops = { | |||
114 | .scr_write = sis_scr_write, | 114 | .scr_write = sis_scr_write, |
115 | .port_start = ata_port_start, | 115 | .port_start = ata_port_start, |
116 | .port_stop = ata_port_stop, | 116 | .port_stop = ata_port_stop, |
117 | .host_stop = ata_host_stop, | ||
117 | }; | 118 | }; |
118 | 119 | ||
119 | static struct ata_port_info sis_port_info = { | 120 | static struct ata_port_info sis_port_info = { |
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 05075bd3a893..edef1fa969fc 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -313,6 +313,7 @@ static struct ata_port_operations k2_sata_ops = { | |||
313 | .scr_write = k2_sata_scr_write, | 313 | .scr_write = k2_sata_scr_write, |
314 | .port_start = ata_port_start, | 314 | .port_start = ata_port_start, |
315 | .port_stop = ata_port_stop, | 315 | .port_stop = ata_port_stop, |
316 | .host_stop = ata_host_stop, | ||
316 | }; | 317 | }; |
317 | 318 | ||
318 | static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) | 319 | static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index 70118650c461..140cea05de3f 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -245,6 +245,8 @@ static void pdc20621_host_stop(struct ata_host_set *host_set) | |||
245 | 245 | ||
246 | iounmap(dimm_mmio); | 246 | iounmap(dimm_mmio); |
247 | kfree(hpriv); | 247 | kfree(hpriv); |
248 | |||
249 | ata_host_stop(host_set); | ||
248 | } | 250 | } |
249 | 251 | ||
250 | static int pdc_port_start(struct ata_port *ap) | 252 | static int pdc_port_start(struct ata_port *ap) |
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c index 0bff4f475f26..a71fb54eebd3 100644 --- a/drivers/scsi/sata_uli.c +++ b/drivers/scsi/sata_uli.c | |||
@@ -113,6 +113,7 @@ static struct ata_port_operations uli_ops = { | |||
113 | 113 | ||
114 | .port_start = ata_port_start, | 114 | .port_start = ata_port_start, |
115 | .port_stop = ata_port_stop, | 115 | .port_stop = ata_port_stop, |
116 | .host_stop = ata_host_stop, | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | static struct ata_port_info uli_port_info = { | 119 | static struct ata_port_info uli_port_info = { |
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c index 3a7830667277..f43183c19a12 100644 --- a/drivers/scsi/sata_via.c +++ b/drivers/scsi/sata_via.c | |||
@@ -134,6 +134,7 @@ static struct ata_port_operations svia_sata_ops = { | |||
134 | 134 | ||
135 | .port_start = ata_port_start, | 135 | .port_start = ata_port_start, |
136 | .port_stop = ata_port_stop, | 136 | .port_stop = ata_port_stop, |
137 | .host_stop = ata_host_stop, | ||
137 | }; | 138 | }; |
138 | 139 | ||
139 | static struct ata_port_info svia_port_info = { | 140 | static struct ata_port_info svia_port_info = { |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 05e0130a9f3c..c5e09dc6f3de 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -231,6 +231,7 @@ static struct ata_port_operations vsc_sata_ops = { | |||
231 | .scr_write = vsc_sata_scr_write, | 231 | .scr_write = vsc_sata_scr_write, |
232 | .port_start = ata_port_start, | 232 | .port_start = ata_port_start, |
233 | .port_stop = ata_port_stop, | 233 | .port_stop = ata_port_stop, |
234 | .host_stop = ata_host_stop, | ||
234 | }; | 235 | }; |
235 | 236 | ||
236 | static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) | 237 | static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) |