mptscsih.c (f0cd91a68acdc9b49d7f6738b514a426da627649) mptscsih.c (80d3ac77a84987d5132726f3d7cef342a280f7d9)
1/*
2 * linux/drivers/message/fusion/mptscsih.c
3 * For use with LSI Logic PCI chip/adapter(s)
4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
5 *
6 * Copyright (c) 1999-2005 LSI Logic Corporation
7 * (mailto:mpt_linux_developer@lsil.com)
8 *

--- 2507 unchanged lines hidden (view full) ---

2516 */
2517 hd->pLocal = &hd->localReply;
2518 hd->pLocal->completion = MPT_SCANDV_DID_RESET;
2519 hd->scandv_wait_done = 1;
2520 wake_up(&hd->scandv_waitq);
2521 hd->cmdPtr = NULL;
2522 }
2523
1/*
2 * linux/drivers/message/fusion/mptscsih.c
3 * For use with LSI Logic PCI chip/adapter(s)
4 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
5 *
6 * Copyright (c) 1999-2005 LSI Logic Corporation
7 * (mailto:mpt_linux_developer@lsil.com)
8 *

--- 2507 unchanged lines hidden (view full) ---

2516 */
2517 hd->pLocal = &hd->localReply;
2518 hd->pLocal->completion = MPT_SCANDV_DID_RESET;
2519 hd->scandv_wait_done = 1;
2520 wake_up(&hd->scandv_waitq);
2521 hd->cmdPtr = NULL;
2522 }
2523
2524 /* 7. FC: Rescan for blocked rports which might have returned.
2525 */
2526 if (ioc->bus_type == FC) {
2527 spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags);
2528 if (ioc->fc_rescan_work_q) {
2529 if (ioc->fc_rescan_work_count++ == 0) {
2530 queue_work(ioc->fc_rescan_work_q,
2531 &ioc->fc_rescan_work);
2532 }
2533 }
2534 spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags);
2535 }
2536 dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name));
2537
2538 }
2539
2540 return 1; /* currently means nothing really */
2541}
2542
2543/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
2544int
2545mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
2546{
2547 MPT_SCSI_HOST *hd;
2548 u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
2524 dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name));
2525
2526 }
2527
2528 return 1; /* currently means nothing really */
2529}
2530
2531/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
2532int
2533mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
2534{
2535 MPT_SCSI_HOST *hd;
2536 u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
2549 unsigned long flags;
2550
2551 devtverboseprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n",
2552 ioc->name, event));
2553
2554 if (ioc->sh == NULL ||
2555 ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL))
2556 return 1;
2557

--- 6 unchanged lines hidden (view full) ---

2564 if (hd && (ioc->bus_type == SPI) && (hd->soft_resets < -1))
2565 hd->soft_resets++;
2566 break;
2567 case MPI_EVENT_LOGOUT: /* 09 */
2568 /* FIXME! */
2569 break;
2570
2571 case MPI_EVENT_RESCAN: /* 06 */
2537
2538 devtverboseprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n",
2539 ioc->name, event));
2540
2541 if (ioc->sh == NULL ||
2542 ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL))
2543 return 1;
2544

--- 6 unchanged lines hidden (view full) ---

2551 if (hd && (ioc->bus_type == SPI) && (hd->soft_resets < -1))
2552 hd->soft_resets++;
2553 break;
2554 case MPI_EVENT_LOGOUT: /* 09 */
2555 /* FIXME! */
2556 break;
2557
2558 case MPI_EVENT_RESCAN: /* 06 */
2572 spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags);
2573 if (ioc->fc_rescan_work_q) {
2574 if (ioc->fc_rescan_work_count++ == 0) {
2575 queue_work(ioc->fc_rescan_work_q,
2576 &ioc->fc_rescan_work);
2577 }
2578 }
2579 spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags);
2580 break;
2581
2582 /*
2583 * CHECKME! Don't think we need to do
2584 * anything for these, but...
2585 */
2586 case MPI_EVENT_LINK_STATUS_CHANGE: /* 07 */
2587 case MPI_EVENT_LOOP_STATE_CHANGE: /* 08 */

--- 839 unchanged lines hidden ---
2559 break;
2560
2561 /*
2562 * CHECKME! Don't think we need to do
2563 * anything for these, but...
2564 */
2565 case MPI_EVENT_LINK_STATUS_CHANGE: /* 07 */
2566 case MPI_EVENT_LOOP_STATE_CHANGE: /* 08 */

--- 839 unchanged lines hidden ---