slic_link_event_handler() issues command READ_LINK_STATUS to be executed
asynchronously, which is followed by UP configuration write command. But
it can fail while setting up the command and in that case the link will
not be up. Lets check the status and return it.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* will also complete asynchronously.
*
*/
-static void slic_link_event_handler(struct adapter *adapter)
+static int slic_link_event_handler(struct adapter *adapter)
{
int status;
struct slic_shmem *pshmem;
if (adapter->state != ADAPT_UP) {
/* Adapter is not operational. Ignore. */
- return;
+ return -ENODEV;
}
pshmem = (struct slic_shmem *)(unsigned long)adapter->phys_shmem;
(u32) &pshmem->linkstatus, /* no 4GB wrap guaranteed */
0, 0, 0);
#endif
+ return status;
}
static void slic_init_cleanup(struct adapter *adapter)