aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_promise.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sata_promise.c')
-rw-r--r--drivers/scsi/sata_promise.c47
1 files changed, 31 insertions, 16 deletions
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
index 5c1d4411457a..4d8201422a12 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
@@ -40,7 +45,7 @@
40#include "sata_promise.h" 45#include "sata_promise.h"
41 46
42#define DRV_NAME "sata_promise" 47#define DRV_NAME "sata_promise"
43#define DRV_VERSION "1.01" 48#define DRV_VERSION "1.02"
44 49
45 50
46enum { 51enum {
@@ -181,6 +186,10 @@ static struct pci_device_id pdc_ata_pci_tbl[] = {
181 board_20319 }, 186 board_20319 },
182 { PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 187 { PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
183 board_20319 }, 188 board_20319 },
189 { PCI_VENDOR_ID_PROMISE, 0x3519, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
190 board_20319 },
191 { PCI_VENDOR_ID_PROMISE, 0x3d17, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
192 board_20319 },
184 { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 193 { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
185 board_20319 }, 194 board_20319 },
186 195
@@ -321,11 +330,15 @@ static void pdc_qc_prep(struct ata_queued_cmd *qc)
321 330
322static void pdc_eng_timeout(struct ata_port *ap) 331static void pdc_eng_timeout(struct ata_port *ap)
323{ 332{
333 struct ata_host_set *host_set = ap->host_set;
324 u8 drv_stat; 334 u8 drv_stat;
325 struct ata_queued_cmd *qc; 335 struct ata_queued_cmd *qc;
336 unsigned long flags;
326 337
327 DPRINTK("ENTER\n"); 338 DPRINTK("ENTER\n");
328 339
340 spin_lock_irqsave(&host_set->lock, flags);
341
329 qc = ata_qc_from_tag(ap, ap->active_tag); 342 qc = ata_qc_from_tag(ap, ap->active_tag);
330 if (!qc) { 343 if (!qc) {
331 printk(KERN_ERR "ata%u: BUG: timeout without command\n", 344 printk(KERN_ERR "ata%u: BUG: timeout without command\n",
@@ -359,6 +372,7 @@ static void pdc_eng_timeout(struct ata_port *ap)
359 } 372 }
360 373
361out: 374out:
375 spin_unlock_irqrestore(&host_set->lock, flags);
362 DPRINTK("EXIT\n"); 376 DPRINTK("EXIT\n");
363} 377}
364 378
@@ -441,7 +455,8 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r
441 VPRINTK("port %u\n", i); 455 VPRINTK("port %u\n", i);
442 ap = host_set->ports[i]; 456 ap = host_set->ports[i];
443 tmp = mask & (1 << (i + 1)); 457 tmp = mask & (1 << (i + 1));
444 if (tmp && ap && (!(ap->flags & ATA_FLAG_PORT_DISABLED))) { 458 if (tmp && ap &&
459 !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) {
445 struct ata_queued_cmd *qc; 460 struct ata_queued_cmd *qc;
446 461
447 qc = ata_qc_from_tag(ap, ap->active_tag); 462 qc = ata_qc_from_tag(ap, ap->active_tag);