aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/rx.c
diff options
context:
space:
mode:
authorMahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com>2011-03-17 05:10:32 -0400
committerJames Bottomley <James.Bottomley@suse.de>2011-03-23 12:36:58 -0400
commite8b12f0fb8352237525961f14ec933e915848840 (patch)
treecdbf1209bdb6dc300434a6608e5ac73d536e47c0 /drivers/scsi/aacraid/rx.c
parent0a2385cea9a715e11df10fce1f1442d933008a40 (diff)
[SCSI] aacraid: Add new code for PMC-Sierra's SRC based controller family
Added new hardware device 0x28b interface for PMC-Sierra's SRC based controller family. - new src.c file for 0x28b specific functions - new XPORT header required - sync. command interface: doorbell bits shifted (SRC_ODR_SHIFT, SRC_IDR_SHIFT) - async. Interface: different inbound queue handling, no outbound I2O queue available, using doorbell ("PmDoorBellResponseSent") and response buffer on the host ("host_rrq") for status - changed AIF (adapter initiated FIBs) interface: "DoorBellAifPending" bit to inform about pending AIF, "AifRequest" command to read AIF, "NoMoreAifDataAvailable" to mark the end of the AIFs Signed-off-by: Mahesh Rajashekhara <aacraid@pmc-sierra.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/aacraid/rx.c')
-rw-r--r--drivers/scsi/aacraid/rx.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index 84d77fd86e5b..ce530f113fdb 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -5,7 +5,8 @@
5 * based on the old aacraid driver that is.. 5 * based on the old aacraid driver that is..
6 * Adaptec aacraid device driver for Linux. 6 * Adaptec aacraid device driver for Linux.
7 * 7 *
8 * Copyright (c) 2000-2007 Adaptec, Inc. (aacraid@adaptec.com) 8 * Copyright (c) 2000-2010 Adaptec, Inc.
9 * 2010 PMC-Sierra, Inc. (aacraid@pmc-sierra.com)
9 * 10 *
10 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
@@ -84,15 +85,35 @@ static irqreturn_t aac_rx_intr_producer(int irq, void *dev_id)
84 85
85static irqreturn_t aac_rx_intr_message(int irq, void *dev_id) 86static irqreturn_t aac_rx_intr_message(int irq, void *dev_id)
86{ 87{
88 int isAif, isFastResponse, isSpecial;
87 struct aac_dev *dev = dev_id; 89 struct aac_dev *dev = dev_id;
88 u32 Index = rx_readl(dev, MUnit.OutboundQueue); 90 u32 Index = rx_readl(dev, MUnit.OutboundQueue);
89 if (unlikely(Index == 0xFFFFFFFFL)) 91 if (unlikely(Index == 0xFFFFFFFFL))
90 Index = rx_readl(dev, MUnit.OutboundQueue); 92 Index = rx_readl(dev, MUnit.OutboundQueue);
91 if (likely(Index != 0xFFFFFFFFL)) { 93 if (likely(Index != 0xFFFFFFFFL)) {
92 do { 94 do {
93 if (unlikely(aac_intr_normal(dev, Index))) { 95 isAif = isFastResponse = isSpecial = 0;
94 rx_writel(dev, MUnit.OutboundQueue, Index); 96 if (Index & 0x00000002L) {
95 rx_writel(dev, MUnit.ODR, DoorBellAdapterNormRespReady); 97 isAif = 1;
98 if (Index == 0xFFFFFFFEL)
99 isSpecial = 1;
100 Index &= ~0x00000002L;
101 } else {
102 if (Index & 0x00000001L)
103 isFastResponse = 1;
104 Index >>= 2;
105 }
106 if (!isSpecial) {
107 if (unlikely(aac_intr_normal(dev,
108 Index, isAif,
109 isFastResponse, NULL))) {
110 rx_writel(dev,
111 MUnit.OutboundQueue,
112 Index);
113 rx_writel(dev,
114 MUnit.ODR,
115 DoorBellAdapterNormRespReady);
116 }
96 } 117 }
97 Index = rx_readl(dev, MUnit.OutboundQueue); 118 Index = rx_readl(dev, MUnit.OutboundQueue);
98 } while (Index != 0xFFFFFFFFL); 119 } while (Index != 0xFFFFFFFFL);
@@ -631,6 +652,10 @@ int _aac_rx_init(struct aac_dev *dev)
631 name, instance); 652 name, instance);
632 goto error_iounmap; 653 goto error_iounmap;
633 } 654 }
655 dev->dbg_base = dev->scsi_host_ptr->base;
656 dev->dbg_base_mapped = dev->base;
657 dev->dbg_size = dev->base_size;
658
634 aac_adapter_enable_int(dev); 659 aac_adapter_enable_int(dev);
635 /* 660 /*
636 * Tell the adapter that all is configured, and it can 661 * Tell the adapter that all is configured, and it can