aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/rkt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/aacraid/rkt.c')
-rw-r--r--drivers/scsi/aacraid/rkt.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c
index 2d8ecd7f1479..7d68b7825137 100644
--- a/drivers/scsi/aacraid/rkt.c
+++ b/drivers/scsi/aacraid/rkt.c
@@ -98,7 +98,9 @@ static irqreturn_t aac_rkt_intr(int irq, void *dev_id, struct pt_regs *regs)
98 * for its completion. 98 * for its completion.
99 */ 99 */
100 100
101static int rkt_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *status) 101static int rkt_sync_cmd(struct aac_dev *dev, u32 command,
102 u32 p1, u32 p2, u32 p3, u32 p4, u32 p5, u32 p6,
103 u32 *status, u32 *r1, u32 *r2, u32 *r3, u32 *r4)
102{ 104{
103 unsigned long start; 105 unsigned long start;
104 int ok; 106 int ok;
@@ -107,12 +109,12 @@ static int rkt_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *status)
107 */ 109 */
108 rkt_writel(dev, InboundMailbox0, command); 110 rkt_writel(dev, InboundMailbox0, command);
109 /* 111 /*
110 * Write the parameters into Mailboxes 1 - 4 112 * Write the parameters into Mailboxes 1 - 6
111 */ 113 */
112 rkt_writel(dev, InboundMailbox1, p1); 114 rkt_writel(dev, InboundMailbox1, p1);
113 rkt_writel(dev, InboundMailbox2, 0); 115 rkt_writel(dev, InboundMailbox2, p2);
114 rkt_writel(dev, InboundMailbox3, 0); 116 rkt_writel(dev, InboundMailbox3, p3);
115 rkt_writel(dev, InboundMailbox4, 0); 117 rkt_writel(dev, InboundMailbox4, p4);
116 /* 118 /*
117 * Clear the synch command doorbell to start on a clean slate. 119 * Clear the synch command doorbell to start on a clean slate.
118 */ 120 */
@@ -169,6 +171,14 @@ static int rkt_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *status)
169 */ 171 */
170 if (status) 172 if (status)
171 *status = rkt_readl(dev, IndexRegs.Mailbox[0]); 173 *status = rkt_readl(dev, IndexRegs.Mailbox[0]);
174 if (r1)
175 *r1 = rkt_readl(dev, IndexRegs.Mailbox[1]);
176 if (r2)
177 *r2 = rkt_readl(dev, IndexRegs.Mailbox[2]);
178 if (r3)
179 *r3 = rkt_readl(dev, IndexRegs.Mailbox[3]);
180 if (r4)
181 *r4 = rkt_readl(dev, IndexRegs.Mailbox[4]);
172 /* 182 /*
173 * Clear the synch command doorbell. 183 * Clear the synch command doorbell.
174 */ 184 */
@@ -190,8 +200,8 @@ static int rkt_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *status)
190 200
191static void aac_rkt_interrupt_adapter(struct aac_dev *dev) 201static void aac_rkt_interrupt_adapter(struct aac_dev *dev)
192{ 202{
193 u32 ret; 203 rkt_sync_cmd(dev, BREAKPOINT_REQUEST, 0, 0, 0, 0, 0, 0,
194 rkt_sync_cmd(dev, BREAKPOINT_REQUEST, 0, &ret); 204 NULL, NULL, NULL, NULL, NULL);
195} 205}
196 206
197/** 207/**
@@ -220,7 +230,8 @@ static void aac_rkt_notify_adapter(struct aac_dev *dev, u32 event)
220 rkt_writel(dev, MUnit.IDR,INBOUNDDOORBELL_3); 230 rkt_writel(dev, MUnit.IDR,INBOUNDDOORBELL_3);
221 break; 231 break;
222 case HostShutdown: 232 case HostShutdown:
223// rkt_sync_cmd(dev, HOST_CRASHING, 0, 0, 0, 0, &ret); 233// rkt_sync_cmd(dev, HOST_CRASHING, 0, 0, 0, 0, 0, 0,
234// NULL, NULL, NULL, NULL, NULL);
224 break; 235 break;
225 case FastIo: 236 case FastIo:
226 rkt_writel(dev, MUnit.IDR,INBOUNDDOORBELL_6); 237 rkt_writel(dev, MUnit.IDR,INBOUNDDOORBELL_6);
@@ -243,17 +254,11 @@ static void aac_rkt_notify_adapter(struct aac_dev *dev, u32 event)
243 254
244static void aac_rkt_start_adapter(struct aac_dev *dev) 255static void aac_rkt_start_adapter(struct aac_dev *dev)
245{ 256{
246 u32 status;
247 struct aac_init *init; 257 struct aac_init *init;
248 258
249 init = dev->init; 259 init = dev->init;
250 init->HostElapsedSeconds = cpu_to_le32(get_seconds()); 260 init->HostElapsedSeconds = cpu_to_le32(get_seconds());
251 /* 261 /*
252 * Tell the adapter we are back and up and running so it will scan
253 * its command queues and enable our interrupts
254 */
255 dev->irq_mask = (DoorBellPrintfReady | OUTBOUNDDOORBELL_1 | OUTBOUNDDOORBELL_2 | OUTBOUNDDOORBELL_3 | OUTBOUNDDOORBELL_4);
256 /*
257 * First clear out all interrupts. Then enable the one's that we 262 * First clear out all interrupts. Then enable the one's that we
258 * can handle. 263 * can handle.
259 */ 264 */
@@ -263,7 +268,8 @@ static void aac_rkt_start_adapter(struct aac_dev *dev)
263 rkt_writeb(dev, MUnit.OIMR, dev->OIMR = 0xfb); 268 rkt_writeb(dev, MUnit.OIMR, dev->OIMR = 0xfb);
264 269
265 // We can only use a 32 bit address here 270 // We can only use a 32 bit address here
266 rkt_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa, &status); 271 rkt_sync_cmd(dev, INIT_STRUCT_BASE_ADDRESS, (u32)(ulong)dev->init_pa,
272 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL);
267} 273}
268 274
269/** 275/**
@@ -310,7 +316,8 @@ static int aac_rkt_check_health(struct aac_dev *dev)
310 post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS); 316 post->Post_Command = cpu_to_le32(COMMAND_POST_RESULTS);
311 post->Post_Address = cpu_to_le32(baddr); 317 post->Post_Address = cpu_to_le32(baddr);
312 rkt_writel(dev, MUnit.IMRx[0], paddr); 318 rkt_writel(dev, MUnit.IMRx[0], paddr);
313 rkt_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, &status); 319 rkt_sync_cmd(dev, COMMAND_POST_RESULTS, baddr, 0, 0, 0, 0, 0,
320 NULL, NULL, NULL, NULL, NULL);
314 pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS), 321 pci_free_consistent(dev->pdev, sizeof(struct POSTSTATUS),
315 post, paddr); 322 post, paddr);
316 if ((buffer[0] == '0') && (buffer[1] == 'x')) { 323 if ((buffer[0] == '0') && (buffer[1] == 'x')) {