diff options
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_config.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_config.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_config.c b/drivers/scsi/mpt2sas/mpt2sas_config.c index ab8c560865d8..594a389c6526 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_config.c +++ b/drivers/scsi/mpt2sas/mpt2sas_config.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * This module provides common API for accessing firmware configuration pages | 2 | * This module provides common API for accessing firmware configuration pages |
3 | * | 3 | * |
4 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.c | 4 | * This code is based on drivers/scsi/mpt2sas/mpt2_base.c |
5 | * Copyright (C) 2007-2008 LSI Corporation | 5 | * Copyright (C) 2007-2009 LSI Corporation |
6 | * (mailto:DL-MPTFusionLinux@lsi.com) | 6 | * (mailto:DL-MPTFusionLinux@lsi.com) |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
@@ -227,23 +227,25 @@ _config_free_config_dma_memory(struct MPT2SAS_ADAPTER *ioc, | |||
227 | * mpt2sas_config_done - config page completion routine | 227 | * mpt2sas_config_done - config page completion routine |
228 | * @ioc: per adapter object | 228 | * @ioc: per adapter object |
229 | * @smid: system request message index | 229 | * @smid: system request message index |
230 | * @VF_ID: virtual function id | 230 | * @msix_index: MSIX table index supplied by the OS |
231 | * @reply: reply message frame(lower 32bit addr) | 231 | * @reply: reply message frame(lower 32bit addr) |
232 | * Context: none. | 232 | * Context: none. |
233 | * | 233 | * |
234 | * The callback handler when using _config_request. | 234 | * The callback handler when using _config_request. |
235 | * | 235 | * |
236 | * Return nothing. | 236 | * Return 1 meaning mf should be freed from _base_interrupt |
237 | * 0 means the mf is freed from this function. | ||
237 | */ | 238 | */ |
238 | void | 239 | u8 |
239 | mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 reply) | 240 | mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 msix_index, |
241 | u32 reply) | ||
240 | { | 242 | { |
241 | MPI2DefaultReply_t *mpi_reply; | 243 | MPI2DefaultReply_t *mpi_reply; |
242 | 244 | ||
243 | if (ioc->config_cmds.status == MPT2_CMD_NOT_USED) | 245 | if (ioc->config_cmds.status == MPT2_CMD_NOT_USED) |
244 | return; | 246 | return 1; |
245 | if (ioc->config_cmds.smid != smid) | 247 | if (ioc->config_cmds.smid != smid) |
246 | return; | 248 | return 1; |
247 | ioc->config_cmds.status |= MPT2_CMD_COMPLETE; | 249 | ioc->config_cmds.status |= MPT2_CMD_COMPLETE; |
248 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); | 250 | mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); |
249 | if (mpi_reply) { | 251 | if (mpi_reply) { |
@@ -257,6 +259,7 @@ mpt2sas_config_done(struct MPT2SAS_ADAPTER *ioc, u16 smid, u8 VF_ID, u32 reply) | |||
257 | #endif | 259 | #endif |
258 | ioc->config_cmds.smid = USHORT_MAX; | 260 | ioc->config_cmds.smid = USHORT_MAX; |
259 | complete(&ioc->config_cmds.done); | 261 | complete(&ioc->config_cmds.done); |
262 | return 1; | ||
260 | } | 263 | } |
261 | 264 | ||
262 | /** | 265 | /** |
@@ -303,6 +306,9 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t | |||
303 | retry_count = 0; | 306 | retry_count = 0; |
304 | memset(&mem, 0, sizeof(struct config_request)); | 307 | memset(&mem, 0, sizeof(struct config_request)); |
305 | 308 | ||
309 | mpi_request->VF_ID = 0; /* TODO */ | ||
310 | mpi_request->VP_ID = 0; | ||
311 | |||
306 | if (config_page) { | 312 | if (config_page) { |
307 | mpi_request->Header.PageVersion = mpi_reply->Header.PageVersion; | 313 | mpi_request->Header.PageVersion = mpi_reply->Header.PageVersion; |
308 | mpi_request->Header.PageNumber = mpi_reply->Header.PageNumber; | 314 | mpi_request->Header.PageNumber = mpi_reply->Header.PageNumber; |
@@ -380,7 +386,7 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t | |||
380 | _config_display_some_debug(ioc, smid, "config_request", NULL); | 386 | _config_display_some_debug(ioc, smid, "config_request", NULL); |
381 | #endif | 387 | #endif |
382 | init_completion(&ioc->config_cmds.done); | 388 | init_completion(&ioc->config_cmds.done); |
383 | mpt2sas_base_put_smid_default(ioc, smid, config_request->VF_ID); | 389 | mpt2sas_base_put_smid_default(ioc, smid); |
384 | timeleft = wait_for_completion_timeout(&ioc->config_cmds.done, | 390 | timeleft = wait_for_completion_timeout(&ioc->config_cmds.done, |
385 | timeout*HZ); | 391 | timeout*HZ); |
386 | if (!(ioc->config_cmds.status & MPT2_CMD_COMPLETE)) { | 392 | if (!(ioc->config_cmds.status & MPT2_CMD_COMPLETE)) { |