diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 19:06:29 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 19:06:29 -0400 |
commit | 502c7f1dd566e7ca8aabdb755182664c5fdaebf1 (patch) | |
tree | 31934a4da45c0cb83acd118a181db4c51967ac8a /drivers/scsi/sata_promise.c | |
parent | 2cba582a49f1535c1a12a687cfb3dab713c22cc4 (diff) | |
parent | 8f3d17fb7bcb7c255197d11469fb5e9695c9d2f4 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r-- | drivers/scsi/sata_promise.c | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index ad31b8afec6f..7c4f6ecc1cc9 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -7,21 +7,26 @@ | |||
7 | * | 7 | * |
8 | * Copyright 2003-2004 Red Hat, Inc. | 8 | * Copyright 2003-2004 Red Hat, Inc. |
9 | * | 9 | * |
10 | * The contents of this file are subject to the Open | ||
11 | * Software License version 1.1 that can be found at | ||
12 | * http://www.opensource.org/licenses/osl-1.1.txt and is included herein | ||
13 | * by reference. | ||
14 | * | 10 | * |
15 | * Alternatively, the contents of this file may be used under the terms | 11 | * This program is free software; you can redistribute it and/or modify |
16 | * of the GNU General Public License version 2 (the "GPL") as distributed | 12 | * it under the terms of the GNU General Public License as published by |
17 | * in the kernel source COPYING file, in which case the provisions of | 13 | * the Free Software Foundation; either version 2, or (at your option) |
18 | * the GPL are applicable instead of the above. If you wish to allow | 14 | * any later version. |
19 | * the use of your version of this file only under the terms of the | 15 | * |
20 | * GPL and not to allow others to use your version of this file under | 16 | * This program is distributed in the hope that it will be useful, |
21 | * the OSL, indicate your decision by deleting the provisions above and | 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | * replace them with the notice and other provisions required by the GPL. | 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 | * If you do not delete the provisions above, a recipient may use your | 19 | * GNU General Public License for more details. |
24 | * version of this file under either the OSL or the GPL. | 20 | * |
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; see the file COPYING. If not, write to | ||
23 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | * | ||
25 | * | ||
26 | * libata documentation is available via 'make {ps|pdf}docs', | ||
27 | * as Documentation/DocBook/libata.* | ||
28 | * | ||
29 | * Hardware information only available under NDA. | ||
25 | * | 30 | * |
26 | */ | 31 | */ |
27 | 32 | ||
@@ -206,6 +211,10 @@ static struct pci_device_id pdc_ata_pci_tbl[] = { | |||
206 | board_20319 }, | 211 | board_20319 }, |
207 | { PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 212 | { PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
208 | board_20319 }, | 213 | board_20319 }, |
214 | { PCI_VENDOR_ID_PROMISE, 0x3519, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
215 | board_20319 }, | ||
216 | { PCI_VENDOR_ID_PROMISE, 0x3d17, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
217 | board_20319 }, | ||
209 | { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 218 | { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
210 | board_20319 }, | 219 | board_20319 }, |
211 | 220 | ||
@@ -357,11 +366,15 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc) | |||
357 | 366 | ||
358 | static void pdc_eng_timeout(struct ata_port *ap) | 367 | static void pdc_eng_timeout(struct ata_port *ap) |
359 | { | 368 | { |
369 | struct ata_host_set *host_set = ap->host_set; | ||
360 | u8 drv_stat; | 370 | u8 drv_stat; |
361 | struct ata_queued_cmd *qc; | 371 | struct ata_queued_cmd *qc; |
372 | unsigned long flags; | ||
362 | 373 | ||
363 | DPRINTK("ENTER\n"); | 374 | DPRINTK("ENTER\n"); |
364 | 375 | ||
376 | spin_lock_irqsave(&host_set->lock, flags); | ||
377 | |||
365 | qc = ata_qc_from_tag(ap, ap->active_tag); | 378 | qc = ata_qc_from_tag(ap, ap->active_tag); |
366 | if (!qc) { | 379 | if (!qc) { |
367 | printk(KERN_ERR "ata%u: BUG: timeout without command\n", | 380 | printk(KERN_ERR "ata%u: BUG: timeout without command\n", |
@@ -395,6 +408,7 @@ static void pdc_eng_timeout(struct ata_port *ap) | |||
395 | } | 408 | } |
396 | 409 | ||
397 | out: | 410 | out: |
411 | spin_unlock_irqrestore(&host_set->lock, flags); | ||
398 | DPRINTK("EXIT\n"); | 412 | DPRINTK("EXIT\n"); |
399 | } | 413 | } |
400 | 414 | ||
@@ -477,7 +491,8 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r | |||
477 | VPRINTK("port %u\n", i); | 491 | VPRINTK("port %u\n", i); |
478 | ap = host_set->ports[i]; | 492 | ap = host_set->ports[i]; |
479 | tmp = mask & (1 << (i + 1)); | 493 | tmp = mask & (1 << (i + 1)); |
480 | if (tmp && ap && (!(ap->flags & ATA_FLAG_PORT_DISABLED))) { | 494 | if (tmp && ap && |
495 | !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { | ||
481 | struct ata_queued_cmd *qc; | 496 | struct ata_queued_cmd *qc; |
482 | 497 | ||
483 | qc = ata_qc_from_tag(ap, ap->active_tag); | 498 | qc = ata_qc_from_tag(ap, ap->active_tag); |