aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/sa.c
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2005-05-16 21:28:42 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 16:48:00 -0400
commit7c00ffa314bf0fb0e23858bbebad33b48b6abbb9 (patch)
tree4d6b65bb5a2c8fecf48a8c6402c2cc867aa2fe6c /drivers/scsi/aacraid/sa.c
parent672b2d38da4fff4c4452685a25fb88b65243d1a6 (diff)
[SCSI] 2.6 aacraid: Variable FIB size (updated patch)
New code from the Adaptec driver. Performance enhancement for newer adapters. I hope that this isn't too big for a single patch. I believe that other than the few small cleanups mentioned, that the changes are all related. - Added Variable FIB size negotiation for new adapters. - Added support to maximize scatter gather tables and thus permit requests larger than 64KB/each. - Limit Scatter Gather to 34 elements for ROMB platforms. - aac_printf is only enabled with AAC_QUIRK_34SG - Large FIB ioctl support - some minor cleanup Passes sparse check. I have tested it on x86 and ppc64 machines. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/sa.c')
-rw-r--r--drivers/scsi/aacraid/sa.c31
1 files changed, 24 insertions, 7 deletions
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c
index 100c5a0866b4..0680249ab861 100644
--- a/drivers/scsi/aacraid/sa.c
+++ b/drivers/scsi/aacraid/sa.c
@@ -106,7 +106,10 @@ static void aac_sa_notify_adapter(struct aac_dev *dev, u32 event)
106 sa_writew(dev, DoorbellReg_s,DOORBELL_3); 106 sa_writew(dev, DoorbellReg_s,DOORBELL_3);
107 break; 107 break;
108 case HostShutdown: 108 case HostShutdown:
109 //sa_sync_cmd(dev, HOST_CRASHING, 0, &ret); 109 /*
110 sa_sync_cmd(dev, HOST_CRASHING, 0, 0, 0, 0, 0, 0,
111 NULL, NULL, NULL, NULL, NULL);
112 */
110 break; 113 break;
111 case FastIo: 114 case FastIo:
112 sa_writew(dev, DoorbellReg_s,DOORBELL_6); 115 sa_writew(dev, DoorbellReg_s,DOORBELL_6);
@@ -132,7 +135,9 @@ static void aac_sa_notify_adapter(struct aac_dev *dev, u32 event)
132 * for its completion. 135 * for its completion.
133 */ 136 */
134 137
135static int sa_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *ret) 138static int sa_sync_cmd(struct aac_dev *dev, u32 command,
139 u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
140 u32 *ret, u32 *r1, u32 *r2, u32 *r3, u32 *r4)
136{ 141{
137 unsigned long start; 142 unsigned long start;
138 int ok; 143 int ok;
@@ -144,9 +149,10 @@ static int sa_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *ret)
144 * Write the parameters into Mailboxes 1 - 4 149 * Write the parameters into Mailboxes 1 - 4
145 */ 150 */
146 sa_writel(dev, Mailbox1, p1); 151 sa_writel(dev, Mailbox1, p1);
147 sa_writel(dev, Mailbox2, 0); 152 sa_writel(dev, Mailbox2, p2);
148 sa_writel(dev, Mailbox3, 0); 153 sa_writel(dev, Mailbox3, p3);
149 sa_writel(dev, Mailbox4, 0); 154 sa_writel(dev, Mailbox4, p4);
155
150 /* 156 /*
151 * Clear the synch command doorbell to start on a clean slate. 157 * Clear the synch command doorbell to start on a clean slate.
152 */ 158 */
@@ -188,6 +194,14 @@ static int sa_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *ret)
188 */ 194 */
189 if (ret) 195 if (ret)
190 *ret = sa_readl(dev, Mailbox0); 196 *ret = sa_readl(dev, Mailbox0);
197 if (r1)
198 *r1 = sa_readl(dev, Mailbox1);
199 if (r2)
200 *r2 = sa_readl(dev, Mailbox2);
201 if (r3)
202 *r3 = sa_readl(dev, Mailbox3);
203 if (r4)
204 *r4 = sa_readl(dev, Mailbox4);
191 return 0; 205 return 0;
192} 206}
193 207
@@ -201,7 +215,8 @@ static int sa_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *ret)
201static void aac_sa_interrupt_adapter (struct aac_dev *dev) 215static void aac_sa_interrupt_adapter (struct aac_dev *dev)
202{ 216{
203 u32 ret; 217 u32 ret;
204 sa_sync_cmd(dev, BREAKPOINT_REQUEST, 0, &ret); 218 sa_sync_cmd(dev, BREAKPOINT_REQUEST, 0, 0, 0, 0, 0, 0,
219 &ret, NULL, NULL, NULL, NULL);
205} 220}
206 221
207/** 222/**
@@ -233,7 +248,9 @@ static void aac_sa_start_adapter(struct aac_dev *dev)
233 sa_writew(dev, SaDbCSR.PRISETIRQMASK, 0xffff); 248 sa_writew(dev, SaDbCSR.PRISETIRQMASK, 0xffff);
234 sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, (PrintfReady | DOORBELL_1 | DOORBELL_2 | DOORBELL_3 | DOORBELL_4)); 249 sa_writew(dev, SaDbCSR.PRICLEARIRQMASK, (PrintfReady | DOORBELL_1 | DOORBELL_2 | DOORBELL_3 | DOORBELL_4));
235 /* We can only use a 32 bit address here */ 250 /* We can only use a 32 bit address here */
236 sa_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, &ret); 251 sa_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS,
252 (u32)(ulong)dev->init_pa, 0, 0, 0, 0, 0,
253 &ret, NULL, NULL, NULL, NULL);
237} 254}
238 255
239/** 256/**