aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r--drivers/message/fusion/mptctl.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index bece386f1d4b..22b75cb647e8 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -221,7 +221,7 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
221 dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_reply() NULL Reply " 221 dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "mptctl_reply() NULL Reply "
222 "Function=%x!\n", ioc->name, cmd)); 222 "Function=%x!\n", ioc->name, cmd));
223 223
224 ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD; 224 ioc->ioctl->status |= MPT_MGMT_STATUS_COMMAND_GOOD;
225 ioc->ioctl->reset &= ~MPTCTL_RESET_OK; 225 ioc->ioctl->reset &= ~MPTCTL_RESET_OK;
226 226
227 /* We are done, issue wake up 227 /* We are done, issue wake up
@@ -237,14 +237,14 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
237 */ 237 */
238 memcpy(ioc->ioctl->ReplyFrame, reply, 238 memcpy(ioc->ioctl->ReplyFrame, reply,
239 min(ioc->reply_sz, 4*reply->u.reply.MsgLength)); 239 min(ioc->reply_sz, 4*reply->u.reply.MsgLength));
240 ioc->ioctl->status |= MPT_IOCTL_STATUS_RF_VALID; 240 ioc->ioctl->status |= MPT_MGMT_STATUS_RF_VALID;
241 241
242 /* Set the command status to GOOD if IOC Status is GOOD 242 /* Set the command status to GOOD if IOC Status is GOOD
243 * OR if SCSI I/O cmd and data underrun or recovered error. 243 * OR if SCSI I/O cmd and data underrun or recovered error.
244 */ 244 */
245 iocStatus = le16_to_cpu(reply->u.reply.IOCStatus) & MPI_IOCSTATUS_MASK; 245 iocStatus = le16_to_cpu(reply->u.reply.IOCStatus) & MPI_IOCSTATUS_MASK;
246 if (iocStatus == MPI_IOCSTATUS_SUCCESS) 246 if (iocStatus == MPI_IOCSTATUS_SUCCESS)
247 ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD; 247 ioc->ioctl->status |= MPT_MGMT_STATUS_COMMAND_GOOD;
248 248
249 if (iocStatus || reply->u.reply.IOCLogInfo) 249 if (iocStatus || reply->u.reply.IOCLogInfo)
250 dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\tiocstatus (0x%04X), " 250 dctlprintk(ioc, printk(MYIOC_s_DEBUG_FMT "\tiocstatus (0x%04X), "
@@ -268,7 +268,8 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
268 268
269 if ((iocStatus == MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) || 269 if ((iocStatus == MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) ||
270 (iocStatus == MPI_IOCSTATUS_SCSI_RECOVERED_ERROR)) { 270 (iocStatus == MPI_IOCSTATUS_SCSI_RECOVERED_ERROR)) {
271 ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD; 271 ioc->ioctl->status |=
272 MPT_MGMT_STATUS_COMMAND_GOOD;
272 } 273 }
273 } 274 }
274 275
@@ -284,7 +285,7 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply)
284 ((u8 *)ioc->sense_buf_pool + 285 ((u8 *)ioc->sense_buf_pool +
285 (req_index * MPT_SENSE_BUFFER_ALLOC)); 286 (req_index * MPT_SENSE_BUFFER_ALLOC));
286 memcpy(ioc->ioctl->sense, sense_data, sz); 287 memcpy(ioc->ioctl->sense, sense_data, sz);
287 ioc->ioctl->status |= MPT_IOCTL_STATUS_SENSE_VALID; 288 ioc->ioctl->status |= MPT_MGMT_STATUS_SENSE_VALID;
288 } 289 }
289 290
290 if (cmd == MPI_FUNCTION_SCSI_TASK_MGMT) 291 if (cmd == MPI_FUNCTION_SCSI_TASK_MGMT)
@@ -483,10 +484,10 @@ mptctl_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
483 484
484 switch(reset_phase) { 485 switch(reset_phase) {
485 case MPT_IOC_SETUP_RESET: 486 case MPT_IOC_SETUP_RESET:
486 ioctl->status |= MPT_IOCTL_STATUS_DID_IOCRESET; 487 ioctl->status |= MPT_MGMT_STATUS_DID_IOCRESET;
487 break; 488 break;
488 case MPT_IOC_POST_RESET: 489 case MPT_IOC_POST_RESET:
489 ioctl->status &= ~MPT_IOCTL_STATUS_DID_IOCRESET; 490 ioctl->status &= ~MPT_MGMT_STATUS_DID_IOCRESET;
490 break; 491 break;
491 case MPT_IOC_PRE_RESET: 492 case MPT_IOC_PRE_RESET:
492 default: 493 default:
@@ -1791,7 +1792,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
1791 "No memory available during driver init.\n", 1792 "No memory available during driver init.\n",
1792 __FILE__, __LINE__); 1793 __FILE__, __LINE__);
1793 return -ENOMEM; 1794 return -ENOMEM;
1794 } else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) { 1795 } else if (ioc->ioctl->status & MPT_MGMT_STATUS_DID_IOCRESET) {
1795 printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - " 1796 printk(KERN_ERR MYNAM "%s@%d::mptctl_do_mpt_command - "
1796 "Busy with IOC Reset \n", __FILE__, __LINE__); 1797 "Busy with IOC Reset \n", __FILE__, __LINE__);
1797 return -EBUSY; 1798 return -EBUSY;
@@ -2231,7 +2232,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
2231 /* If a valid reply frame, copy to the user. 2232 /* If a valid reply frame, copy to the user.
2232 * Offset 2: reply length in U32's 2233 * Offset 2: reply length in U32's
2233 */ 2234 */
2234 if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) { 2235 if (ioc->ioctl->status & MPT_MGMT_STATUS_RF_VALID) {
2235 if (karg.maxReplyBytes < ioc->reply_sz) { 2236 if (karg.maxReplyBytes < ioc->reply_sz) {
2236 sz = min(karg.maxReplyBytes, 4*ioc->ioctl->ReplyFrame[2]); 2237 sz = min(karg.maxReplyBytes, 4*ioc->ioctl->ReplyFrame[2]);
2237 } else { 2238 } else {
@@ -2253,7 +2254,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
2253 2254
2254 /* If valid sense data, copy to user. 2255 /* If valid sense data, copy to user.
2255 */ 2256 */
2256 if (ioc->ioctl->status & MPT_IOCTL_STATUS_SENSE_VALID) { 2257 if (ioc->ioctl->status & MPT_MGMT_STATUS_SENSE_VALID) {
2257 sz = min(karg.maxSenseBytes, MPT_SENSE_BUFFER_SIZE); 2258 sz = min(karg.maxSenseBytes, MPT_SENSE_BUFFER_SIZE);
2258 if (sz > 0) { 2259 if (sz > 0) {
2259 if (copy_to_user(karg.senseDataPtr, ioc->ioctl->sense, sz)) { 2260 if (copy_to_user(karg.senseDataPtr, ioc->ioctl->sense, sz)) {
@@ -2270,7 +2271,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
2270 /* If the overall status is _GOOD and data in, copy data 2271 /* If the overall status is _GOOD and data in, copy data
2271 * to user. 2272 * to user.
2272 */ 2273 */
2273 if ((ioc->ioctl->status & MPT_IOCTL_STATUS_COMMAND_GOOD) && 2274 if ((ioc->ioctl->status & MPT_MGMT_STATUS_COMMAND_GOOD) &&
2274 (karg.dataInSize > 0) && (bufIn.kptr)) { 2275 (karg.dataInSize > 0) && (bufIn.kptr)) {
2275 2276
2276 if (copy_to_user(karg.dataInBufPtr, 2277 if (copy_to_user(karg.dataInBufPtr,
@@ -2285,9 +2286,9 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
2285 2286
2286done_free_mem: 2287done_free_mem:
2287 2288
2288 ioc->ioctl->status &= ~(MPT_IOCTL_STATUS_COMMAND_GOOD | 2289 ioc->ioctl->status &= ~(MPT_MGMT_STATUS_COMMAND_GOOD |
2289 MPT_IOCTL_STATUS_SENSE_VALID | 2290 MPT_MGMT_STATUS_SENSE_VALID |
2290 MPT_IOCTL_STATUS_RF_VALID ); 2291 MPT_MGMT_STATUS_RF_VALID);
2291 2292
2292 /* Free the allocated memory. 2293 /* Free the allocated memory.
2293 */ 2294 */
@@ -2527,7 +2528,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
2527 * bays have drives in them 2528 * bays have drives in them
2528 * pbuf[3] = Checksum (0x100 = (byte0 + byte2 + byte3) 2529 * pbuf[3] = Checksum (0x100 = (byte0 + byte2 + byte3)
2529 */ 2530 */
2530 if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) 2531 if (ioc->ioctl->status & MPT_MGMT_STATUS_RF_VALID)
2531 karg.rsvd = *(u32 *)pbuf; 2532 karg.rsvd = *(u32 *)pbuf;
2532 2533
2533 out: 2534 out: