aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
author <jgarzik@pretzel.yyz.us>2005-05-31 11:50:32 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-31 11:50:32 -0400
commitedb3e182b6f33c91ba8778e2198220c12712d3ad (patch)
tree6b741e144c2c83e901a325e5373dc0b8baf88534 /drivers/scsi
parent8973a585aec125beb2a3de50bb491004299f53d5 (diff)
parent5e485b7975472ba4a408523deb6541e70c451842 (diff)
Automatic merge of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git branch HEAD
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ahci.c3
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.c2
-rw-r--r--drivers/scsi/ata_piix.c2
-rw-r--r--drivers/scsi/ide-scsi.c86
-rw-r--r--drivers/scsi/libata-core.c28
-rw-r--r--drivers/scsi/libata.h2
-rw-r--r--drivers/scsi/sata_nv.c2
-rw-r--r--drivers/scsi/sata_promise.c1
-rw-r--r--drivers/scsi/sata_qstor.c2
-rw-r--r--drivers/scsi/sata_sil.c1
-rw-r--r--drivers/scsi/sata_sis.c1
-rw-r--r--drivers/scsi/sata_svw.c1
-rw-r--r--drivers/scsi/sata_sx4.c2
-rw-r--r--drivers/scsi/sata_uli.c1
-rw-r--r--drivers/scsi/sata_via.c1
-rw-r--r--drivers/scsi/sata_vsc.c2
16 files changed, 89 insertions, 48 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 5e2a1e8b9039..ee53b227c01e 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -32,6 +32,7 @@
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/interrupt.h> 33#include <linux/interrupt.h>
34#include <linux/sched.h> 34#include <linux/sched.h>
35#include <linux/dma-mapping.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>
@@ -291,6 +292,8 @@ static void ahci_host_stop(struct ata_host_set *host_set)
291{ 292{
292 struct ahci_host_priv *hpriv = host_set->private_data; 293 struct ahci_host_priv *hpriv = host_set->private_data;
293 kfree(hpriv); 294 kfree(hpriv);
295
296 ata_host_stop(host_set);
294} 297}
295 298
296static int ahci_port_start(struct ata_port *ap) 299static int ahci_port_start(struct ata_port *ap)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c
index 550c9921691a..7c02b7dc7098 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -2488,7 +2488,7 @@ ahd_linux_dv_thread(void *data)
2488 sprintf(current->comm, "ahd_dv_%d", ahd->unit); 2488 sprintf(current->comm, "ahd_dv_%d", ahd->unit);
2489#else 2489#else
2490 daemonize("ahd_dv_%d", ahd->unit); 2490 daemonize("ahd_dv_%d", ahd->unit);
2491 current->flags |= PF_FREEZE; 2491 current->flags |= PF_NOFREEZE;
2492#endif 2492#endif
2493 unlock_kernel(); 2493 unlock_kernel();
2494 2494
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
158static struct ata_port_operations piix_sata_ops = { 159static 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
185static struct ata_port_info piix_port_info[] = { 187static struct ata_port_info piix_port_info[] = {
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 2e2486b035dd..83f062ed9082 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -179,8 +179,18 @@ static void idescsi_input_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsigne
179 return; 179 return;
180 } 180 }
181 count = min(pc->sg->length - pc->b_count, bcount); 181 count = min(pc->sg->length - pc->b_count, bcount);
182 buf = page_address(pc->sg->page) + pc->sg->offset; 182 if (PageHighMem(pc->sg->page)) {
183 drive->hwif->atapi_input_bytes(drive, buf + pc->b_count, count); 183 unsigned long flags;
184
185 local_irq_save(flags);
186 buf = kmap_atomic(pc->sg->page, KM_IRQ0) + pc->sg->offset;
187 drive->hwif->atapi_input_bytes(drive, buf + pc->b_count, count);
188 kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
189 local_irq_restore(flags);
190 } else {
191 buf = page_address(pc->sg->page) + pc->sg->offset;
192 drive->hwif->atapi_input_bytes(drive, buf + pc->b_count, count);
193 }
184 bcount -= count; pc->b_count += count; 194 bcount -= count; pc->b_count += count;
185 if (pc->b_count == pc->sg->length) { 195 if (pc->b_count == pc->sg->length) {
186 pc->sg++; 196 pc->sg++;
@@ -201,8 +211,18 @@ static void idescsi_output_buffers (ide_drive_t *drive, idescsi_pc_t *pc, unsign
201 return; 211 return;
202 } 212 }
203 count = min(pc->sg->length - pc->b_count, bcount); 213 count = min(pc->sg->length - pc->b_count, bcount);
204 buf = page_address(pc->sg->page) + pc->sg->offset; 214 if (PageHighMem(pc->sg->page)) {
205 drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count); 215 unsigned long flags;
216
217 local_irq_save(flags);
218 buf = kmap_atomic(pc->sg->page, KM_IRQ0) + pc->sg->offset;
219 drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count);
220 kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
221 local_irq_restore(flags);
222 } else {
223 buf = page_address(pc->sg->page) + pc->sg->offset;
224 drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count);
225 }
206 bcount -= count; pc->b_count += count; 226 bcount -= count; pc->b_count += count;
207 if (pc->b_count == pc->sg->length) { 227 if (pc->b_count == pc->sg->length) {
208 pc->sg++; 228 pc->sg++;
@@ -713,7 +733,6 @@ static void idescsi_add_settings(ide_drive_t *drive)
713 */ 733 */
714static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi) 734static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
715{ 735{
716 DRIVER(drive)->busy++;
717 if (drive->id && (drive->id->config & 0x0060) == 0x20) 736 if (drive->id && (drive->id->config & 0x0060) == 0x20)
718 set_bit (IDESCSI_DRQ_INTERRUPT, &scsi->flags); 737 set_bit (IDESCSI_DRQ_INTERRUPT, &scsi->flags);
719 set_bit(IDESCSI_TRANSFORM, &scsi->transform); 738 set_bit(IDESCSI_TRANSFORM, &scsi->transform);
@@ -722,17 +741,16 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
722 set_bit(IDESCSI_LOG_CMD, &scsi->log); 741 set_bit(IDESCSI_LOG_CMD, &scsi->log);
723#endif /* IDESCSI_DEBUG_LOG */ 742#endif /* IDESCSI_DEBUG_LOG */
724 idescsi_add_settings(drive); 743 idescsi_add_settings(drive);
725 DRIVER(drive)->busy--;
726} 744}
727 745
728static int idescsi_cleanup (ide_drive_t *drive) 746static int ide_scsi_remove(struct device *dev)
729{ 747{
748 ide_drive_t *drive = to_ide_device(dev);
730 struct Scsi_Host *scsihost = drive->driver_data; 749 struct Scsi_Host *scsihost = drive->driver_data;
731 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost); 750 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
732 struct gendisk *g = scsi->disk; 751 struct gendisk *g = scsi->disk;
733 752
734 if (ide_unregister_subdriver(drive)) 753 ide_unregister_subdriver(drive, scsi->driver);
735 return 1;
736 754
737 ide_unregister_region(g); 755 ide_unregister_region(g);
738 756
@@ -746,7 +764,7 @@ static int idescsi_cleanup (ide_drive_t *drive)
746 return 0; 764 return 0;
747} 765}
748 766
749static int idescsi_attach(ide_drive_t *drive); 767static int ide_scsi_probe(struct device *);
750 768
751#ifdef CONFIG_PROC_FS 769#ifdef CONFIG_PROC_FS
752static ide_proc_entry_t idescsi_proc[] = { 770static ide_proc_entry_t idescsi_proc[] = {
@@ -757,24 +775,22 @@ static ide_proc_entry_t idescsi_proc[] = {
757# define idescsi_proc NULL 775# define idescsi_proc NULL
758#endif 776#endif
759 777
760/*
761 * IDE subdriver functions, registered with ide.c
762 */
763static ide_driver_t idescsi_driver = { 778static ide_driver_t idescsi_driver = {
764 .owner = THIS_MODULE, 779 .owner = THIS_MODULE,
765 .name = "ide-scsi", 780 .gen_driver = {
781 .name = "ide-scsi",
782 .bus = &ide_bus_type,
783 .probe = ide_scsi_probe,
784 .remove = ide_scsi_remove,
785 },
766 .version = IDESCSI_VERSION, 786 .version = IDESCSI_VERSION,
767 .media = ide_scsi, 787 .media = ide_scsi,
768 .busy = 0,
769 .supports_dsc_overlap = 0, 788 .supports_dsc_overlap = 0,
770 .proc = idescsi_proc, 789 .proc = idescsi_proc,
771 .attach = idescsi_attach,
772 .cleanup = idescsi_cleanup,
773 .do_request = idescsi_do_request, 790 .do_request = idescsi_do_request,
774 .end_request = idescsi_end_request, 791 .end_request = idescsi_end_request,
775 .error = idescsi_atapi_error, 792 .error = idescsi_atapi_error,
776 .abort = idescsi_atapi_abort, 793 .abort = idescsi_atapi_abort,
777 .drives = LIST_HEAD_INIT(idescsi_driver.drives),
778}; 794};
779 795
780static int idescsi_ide_open(struct inode *inode, struct file *filp) 796static int idescsi_ide_open(struct inode *inode, struct file *filp)
@@ -821,8 +837,6 @@ static struct block_device_operations idescsi_ops = {
821 .ioctl = idescsi_ide_ioctl, 837 .ioctl = idescsi_ide_ioctl,
822}; 838};
823 839
824static int idescsi_attach(ide_drive_t *drive);
825
826static int idescsi_slave_configure(struct scsi_device * sdp) 840static int idescsi_slave_configure(struct scsi_device * sdp)
827{ 841{
828 /* Configure detected device */ 842 /* Configure detected device */
@@ -1095,8 +1109,9 @@ static struct scsi_host_template idescsi_template = {
1095 .proc_name = "ide-scsi", 1109 .proc_name = "ide-scsi",
1096}; 1110};
1097 1111
1098static int idescsi_attach(ide_drive_t *drive) 1112static int ide_scsi_probe(struct device *dev)
1099{ 1113{
1114 ide_drive_t *drive = to_ide_device(dev);
1100 idescsi_scsi_t *idescsi; 1115 idescsi_scsi_t *idescsi;
1101 struct Scsi_Host *host; 1116 struct Scsi_Host *host;
1102 struct gendisk *g; 1117 struct gendisk *g;
@@ -1112,7 +1127,7 @@ static int idescsi_attach(ide_drive_t *drive)
1112 !drive->present || 1127 !drive->present ||
1113 drive->media == ide_disk || 1128 drive->media == ide_disk ||
1114 !(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t)))) 1129 !(host = scsi_host_alloc(&idescsi_template,sizeof(idescsi_scsi_t))))
1115 return 1; 1130 return -ENODEV;
1116 1131
1117 g = alloc_disk(1 << PARTN_BITS); 1132 g = alloc_disk(1 << PARTN_BITS);
1118 if (!g) 1133 if (!g)
@@ -1138,20 +1153,19 @@ static int idescsi_attach(ide_drive_t *drive)
1138 idescsi->host = host; 1153 idescsi->host = host;
1139 idescsi->disk = g; 1154 idescsi->disk = g;
1140 g->private_data = &idescsi->driver; 1155 g->private_data = &idescsi->driver;
1141 err = ide_register_subdriver(drive, &idescsi_driver); 1156 ide_register_subdriver(drive, &idescsi_driver);
1157 err = 0;
1158 idescsi_setup(drive, idescsi);
1159 g->fops = &idescsi_ops;
1160 ide_register_region(g);
1161 err = scsi_add_host(host, &drive->gendev);
1142 if (!err) { 1162 if (!err) {
1143 idescsi_setup (drive, idescsi); 1163 scsi_scan_host(host);
1144 g->fops = &idescsi_ops; 1164 return 0;
1145 ide_register_region(g);
1146 err = scsi_add_host(host, &drive->gendev);
1147 if (!err) {
1148 scsi_scan_host(host);
1149 return 0;
1150 }
1151 /* fall through on error */
1152 ide_unregister_region(g);
1153 ide_unregister_subdriver(drive);
1154 } 1165 }
1166 /* fall through on error */
1167 ide_unregister_region(g);
1168 ide_unregister_subdriver(drive, &idescsi_driver);
1155 1169
1156 put_disk(g); 1170 put_disk(g);
1157out_host_put: 1171out_host_put:
@@ -1161,12 +1175,12 @@ out_host_put:
1161 1175
1162static int __init init_idescsi_module(void) 1176static int __init init_idescsi_module(void)
1163{ 1177{
1164 return ide_register_driver(&idescsi_driver); 1178 return driver_register(&idescsi_driver.gen_driver);
1165} 1179}
1166 1180
1167static void __exit exit_idescsi_module(void) 1181static void __exit exit_idescsi_module(void)
1168{ 1182{
1169 ide_unregister_driver(&idescsi_driver); 1183 driver_unregister(&idescsi_driver.gen_driver);
1170} 1184}
1171 1185
1172module_init(init_idescsi_module); 1186module_init(init_idescsi_module);
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index ee9b96da841e..30a88f0e7bd6 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2071,7 +2071,7 @@ void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
2071 sg = qc->sg; 2071 sg = qc->sg;
2072 sg->page = virt_to_page(buf); 2072 sg->page = virt_to_page(buf);
2073 sg->offset = (unsigned long) buf & ~PAGE_MASK; 2073 sg->offset = (unsigned long) buf & ~PAGE_MASK;
2074 sg_dma_len(sg) = buflen; 2074 sg->length = buflen;
2075} 2075}
2076 2076
2077void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, 2077void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
@@ -2101,11 +2101,12 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
2101 dma_addr_t dma_address; 2101 dma_addr_t dma_address;
2102 2102
2103 dma_address = dma_map_single(ap->host_set->dev, qc->buf_virt, 2103 dma_address = dma_map_single(ap->host_set->dev, qc->buf_virt,
2104 sg_dma_len(sg), dir); 2104 sg->length, dir);
2105 if (dma_mapping_error(dma_address)) 2105 if (dma_mapping_error(dma_address))
2106 return -1; 2106 return -1;
2107 2107
2108 sg_dma_address(sg) = dma_address; 2108 sg_dma_address(sg) = dma_address;
2109 sg_dma_len(sg) = sg->length;
2109 2110
2110 DPRINTK("mapped buffer of %d bytes for %s\n", sg_dma_len(sg), 2111 DPRINTK("mapped buffer of %d bytes for %s\n", sg_dma_len(sg),
2111 qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read"); 2112 qc->tf.flags & ATA_TFLAG_WRITE ? "write" : "read");
@@ -2310,7 +2311,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
2310 qc->cursect++; 2311 qc->cursect++;
2311 qc->cursg_ofs++; 2312 qc->cursg_ofs++;
2312 2313
2313 if ((qc->cursg_ofs * ATA_SECT_SIZE) == sg_dma_len(&sg[qc->cursg])) { 2314 if ((qc->cursg_ofs * ATA_SECT_SIZE) == (&sg[qc->cursg])->length) {
2314 qc->cursg++; 2315 qc->cursg++;
2315 qc->cursg_ofs = 0; 2316 qc->cursg_ofs = 0;
2316 } 2317 }
@@ -2347,7 +2348,7 @@ next_page:
2347 page = nth_page(page, (offset >> PAGE_SHIFT)); 2348 page = nth_page(page, (offset >> PAGE_SHIFT));
2348 offset %= PAGE_SIZE; 2349 offset %= PAGE_SIZE;
2349 2350
2350 count = min(sg_dma_len(sg) - qc->cursg_ofs, bytes); 2351 count = min(sg->length - qc->cursg_ofs, bytes);
2351 2352
2352 /* don't cross page boundaries */ 2353 /* don't cross page boundaries */
2353 count = min(count, (unsigned int)PAGE_SIZE - offset); 2354 count = min(count, (unsigned int)PAGE_SIZE - offset);
@@ -2358,7 +2359,7 @@ next_page:
2358 qc->curbytes += count; 2359 qc->curbytes += count;
2359 qc->cursg_ofs += count; 2360 qc->cursg_ofs += count;
2360 2361
2361 if (qc->cursg_ofs == sg_dma_len(sg)) { 2362 if (qc->cursg_ofs == sg->length) {
2362 qc->cursg++; 2363 qc->cursg++;
2363 qc->cursg_ofs = 0; 2364 qc->cursg_ofs = 0;
2364 } 2365 }
@@ -2371,7 +2372,7 @@ next_page:
2371 kunmap(page); 2372 kunmap(page);
2372 2373
2373 if (bytes) { 2374 if (bytes) {
2374 if (qc->cursg_ofs < sg_dma_len(sg)) 2375 if (qc->cursg_ofs < sg->length)
2375 goto next_page; 2376 goto next_page;
2376 goto next_sg; 2377 goto next_sg;
2377 } 2378 }
@@ -3321,6 +3322,13 @@ void ata_port_stop (struct ata_port *ap)
3321 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);
3322} 3323}
3323 3324
3325void 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
3324/** 3332/**
3325 * ata_host_remove - Unregister SCSI host structure with upper layers 3333 * ata_host_remove - Unregister SCSI host structure with upper layers
3326 * @ap: Port to unregister 3334 * @ap: Port to unregister
@@ -3877,10 +3885,6 @@ void ata_pci_remove_one (struct pci_dev *pdev)
3877 } 3885 }
3878 3886
3879 free_irq(host_set->irq, host_set); 3887 free_irq(host_set->irq, host_set);
3880 if (host_set->ops->host_stop)
3881 host_set->ops->host_stop(host_set);
3882 if (host_set->mmio_base)
3883 iounmap(host_set->mmio_base);
3884 3888
3885 for (i = 0; i < host_set->n_ports; i++) { 3889 for (i = 0; i < host_set->n_ports; i++) {
3886 ap = host_set->ports[i]; 3890 ap = host_set->ports[i];
@@ -3899,6 +3903,9 @@ void ata_pci_remove_one (struct pci_dev *pdev)
3899 scsi_host_put(ap->host); 3903 scsi_host_put(ap->host);
3900 } 3904 }
3901 3905
3906 if (host_set->ops->host_stop)
3907 host_set->ops->host_stop(host_set);
3908
3902 kfree(host_set); 3909 kfree(host_set);
3903 3910
3904 pci_release_regions(pdev); 3911 pci_release_regions(pdev);
@@ -3996,6 +4003,7 @@ EXPORT_SYMBOL_GPL(ata_chk_err);
3996EXPORT_SYMBOL_GPL(ata_exec_command); 4003EXPORT_SYMBOL_GPL(ata_exec_command);
3997EXPORT_SYMBOL_GPL(ata_port_start); 4004EXPORT_SYMBOL_GPL(ata_port_start);
3998EXPORT_SYMBOL_GPL(ata_port_stop); 4005EXPORT_SYMBOL_GPL(ata_port_stop);
4006EXPORT_SYMBOL_GPL(ata_host_stop);
3999EXPORT_SYMBOL_GPL(ata_interrupt); 4007EXPORT_SYMBOL_GPL(ata_interrupt);
4000EXPORT_SYMBOL_GPL(ata_qc_prep); 4008EXPORT_SYMBOL_GPL(ata_qc_prep);
4001EXPORT_SYMBOL_GPL(ata_bmdma_setup); 4009EXPORT_SYMBOL_GPL(ata_bmdma_setup);
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index 6518226b8f87..d90430bbb0de 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -26,7 +26,7 @@
26#define __LIBATA_H__ 26#define __LIBATA_H__
27 27
28#define DRV_NAME "libata" 28#define DRV_NAME "libata"
29#define DRV_VERSION "1.10" /* must be exactly four chars */ 29#define DRV_VERSION "1.11" /* must be exactly four chars */
30 30
31struct ata_scsi_args { 31struct ata_scsi_args {
32 u16 *id; 32 u16 *id;
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
334static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) 336static 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
127static struct ata_port_info pdc_port_info[] = { 128static 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
541static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe) 543static 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
166static struct ata_port_info sil_port_info[] = { 167static 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
119static struct ata_port_info sis_port_info = { 120static 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
318static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) 319static 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
250static int pdc_port_start(struct ata_port *ap) 252static 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
118static struct ata_port_info uli_port_info = { 119static 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
139static struct ata_port_info svia_port_info = { 140static struct ata_port_info svia_port_info = {
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
index 2c28f0ad73c2..c5e09dc6f3de 100644
--- a/drivers/scsi/sata_vsc.c
+++ b/drivers/scsi/sata_vsc.c
@@ -21,6 +21,7 @@
21#include <linux/blkdev.h> 21#include <linux/blkdev.h>
22#include <linux/delay.h> 22#include <linux/delay.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/dma-mapping.h>
24#include "scsi.h" 25#include "scsi.h"
25#include <scsi/scsi_host.h> 26#include <scsi/scsi_host.h>
26#include <linux/libata.h> 27#include <linux/libata.h>
@@ -230,6 +231,7 @@ static struct ata_port_operations vsc_sata_ops = {
230 .scr_write = vsc_sata_scr_write, 231 .scr_write = vsc_sata_scr_write,
231 .port_start = ata_port_start, 232 .port_start = ata_port_start,
232 .port_stop = ata_port_stop, 233 .port_stop = ata_port_stop,
234 .host_stop = ata_host_stop,
233}; 235};
234 236
235static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) 237static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base)