diff options
Diffstat (limited to 'drivers/scsi/aacraid/sa.c')
-rw-r--r-- | drivers/scsi/aacraid/sa.c | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index bd6c30723fba..0680249ab861 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c | |||
@@ -89,7 +89,7 @@ static irqreturn_t aac_sa_intr(int irq, void *dev_id, struct pt_regs *regs) | |||
89 | * Notify the adapter of an event | 89 | * Notify the adapter of an event |
90 | */ | 90 | */ |
91 | 91 | ||
92 | void aac_sa_notify_adapter(struct aac_dev *dev, u32 event) | 92 | static void aac_sa_notify_adapter(struct aac_dev *dev, u32 event) |
93 | { | 93 | { |
94 | switch (event) { | 94 | switch (event) { |
95 | 95 | ||
@@ -106,7 +106,10 @@ 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 @@ void aac_sa_notify_adapter(struct aac_dev *dev, u32 event) | |||
132 | * for its completion. | 135 | * for its completion. |
133 | */ | 136 | */ |
134 | 137 | ||
135 | static int sa_sync_cmd(struct aac_dev *dev, u32 command, u32 p1, u32 *ret) | 138 | static 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) | |||
201 | static void aac_sa_interrupt_adapter (struct aac_dev *dev) | 215 | static 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 | /** |
@@ -230,10 +245,12 @@ static void aac_sa_start_adapter(struct aac_dev *dev) | |||
230 | * First clear out all interrupts. Then enable the one's that | 245 | * First clear out all interrupts. Then enable the one's that |
231 | * we can handle. | 246 | * we can handle. |
232 | */ | 247 | */ |
233 | sa_writew(dev, SaDbCSR.PRISETIRQMASK, cpu_to_le16(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 | /** |