diff options
Diffstat (limited to 'drivers/scsi/sata_svw.c')
-rw-r--r-- | drivers/scsi/sata_svw.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 858e07185dbd..19d3bb3b0fb6 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -13,21 +13,26 @@ | |||
13 | * This driver probably works with non-Apple versions of the | 13 | * This driver probably works with non-Apple versions of the |
14 | * Broadcom chipset... | 14 | * Broadcom chipset... |
15 | * | 15 | * |
16 | * The contents of this file are subject to the Open | ||
17 | * Software License version 1.1 that can be found at | ||
18 | * http://www.opensource.org/licenses/osl-1.1.txt and is included herein | ||
19 | * by reference. | ||
20 | * | 16 | * |
21 | * Alternatively, the contents of this file may be used under the terms | 17 | * This program is free software; you can redistribute it and/or modify |
22 | * of the GNU General Public License version 2 (the "GPL") as distributed | 18 | * it under the terms of the GNU General Public License as published by |
23 | * in the kernel source COPYING file, in which case the provisions of | 19 | * the Free Software Foundation; either version 2, or (at your option) |
24 | * the GPL are applicable instead of the above. If you wish to allow | 20 | * any later version. |
25 | * the use of your version of this file only under the terms of the | 21 | * |
26 | * GPL and not to allow others to use your version of this file under | 22 | * This program is distributed in the hope that it will be useful, |
27 | * the OSL, indicate your decision by deleting the provisions above and | 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
28 | * replace them with the notice and other provisions required by the GPL. | 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
29 | * If you do not delete the provisions above, a recipient may use your | 25 | * GNU General Public License for more details. |
30 | * version of this file under either the OSL or the GPL. | 26 | * |
27 | * You should have received a copy of the GNU General Public License | ||
28 | * along with this program; see the file COPYING. If not, write to | ||
29 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
30 | * | ||
31 | * | ||
32 | * libata documentation is available via 'make {ps|pdf}docs', | ||
33 | * as Documentation/DocBook/libata.* | ||
34 | * | ||
35 | * Hardware documentation available under NDA. | ||
31 | * | 36 | * |
32 | */ | 37 | */ |
33 | 38 | ||
@@ -195,18 +200,18 @@ static void k2_bmdma_start_mmio (struct ata_queued_cmd *qc) | |||
195 | /* start host DMA transaction */ | 200 | /* start host DMA transaction */ |
196 | dmactl = readb(mmio + ATA_DMA_CMD); | 201 | dmactl = readb(mmio + ATA_DMA_CMD); |
197 | writeb(dmactl | ATA_DMA_START, mmio + ATA_DMA_CMD); | 202 | writeb(dmactl | ATA_DMA_START, mmio + ATA_DMA_CMD); |
198 | /* There is a race condition in certain SATA controllers that can | 203 | /* There is a race condition in certain SATA controllers that can |
199 | be seen when the r/w command is given to the controller before the | 204 | be seen when the r/w command is given to the controller before the |
200 | host DMA is started. On a Read command, the controller would initiate | 205 | host DMA is started. On a Read command, the controller would initiate |
201 | the command to the drive even before it sees the DMA start. When there | 206 | the command to the drive even before it sees the DMA start. When there |
202 | are very fast drives connected to the controller, or when the data request | 207 | are very fast drives connected to the controller, or when the data request |
203 | hits in the drive cache, there is the possibility that the drive returns a part | 208 | hits in the drive cache, there is the possibility that the drive returns a part |
204 | or all of the requested data to the controller before the DMA start is issued. | 209 | or all of the requested data to the controller before the DMA start is issued. |
205 | In this case, the controller would become confused as to what to do with the data. | 210 | In this case, the controller would become confused as to what to do with the data. |
206 | In the worst case when all the data is returned back to the controller, the | 211 | In the worst case when all the data is returned back to the controller, the |
207 | controller could hang. In other cases it could return partial data returning | 212 | controller could hang. In other cases it could return partial data returning |
208 | in data corruption. This problem has been seen in PPC systems and can also appear | 213 | in data corruption. This problem has been seen in PPC systems and can also appear |
209 | on an system with very fast disks, where the SATA controller is sitting behind a | 214 | on an system with very fast disks, where the SATA controller is sitting behind a |
210 | number of bridges, and hence there is significant latency between the r/w command | 215 | number of bridges, and hence there is significant latency between the r/w command |
211 | and the start command. */ | 216 | and the start command. */ |
212 | /* issue r/w command if the access is to ATA*/ | 217 | /* issue r/w command if the access is to ATA*/ |
@@ -214,7 +219,7 @@ static void k2_bmdma_start_mmio (struct ata_queued_cmd *qc) | |||
214 | ap->ops->exec_command(ap, &qc->tf); | 219 | ap->ops->exec_command(ap, &qc->tf); |
215 | } | 220 | } |
216 | 221 | ||
217 | 222 | ||
218 | static u8 k2_stat_check_status(struct ata_port *ap) | 223 | static u8 k2_stat_check_status(struct ata_port *ap) |
219 | { | 224 | { |
220 | return readl((void *) ap->ioaddr.status_addr); | 225 | return readl((void *) ap->ioaddr.status_addr); |