aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorMichael Reed <mdr@sgi.com>2006-01-13 15:31:54 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-14 11:55:02 -0500
commit05e8ec17f4d11ba13795e878fc389cb04d1fdadd (patch)
tree0b7a7360e37be4851ce823450cabbce97bc28eea /drivers/message/fusion/mptscsih.c
parentd158d26167a3f6a910ec3e0eda23cc0cd437c689 (diff)
[SCSI] mptfusion - fc transport attributes
Signed-off-by: Michael Reed <mdr@sgi.com> Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 525d9aea2012..cdac5578fdf2 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -893,6 +893,7 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
893 * when a lun is disable by mid-layer. 893 * when a lun is disable by mid-layer.
894 * Do NOT access the referenced scsi_cmnd structure or 894 * Do NOT access the referenced scsi_cmnd structure or
895 * members. Will cause either a paging or NULL ptr error. 895 * members. Will cause either a paging or NULL ptr error.
896 * (BUT, BUT, BUT, the code does reference it! - mdr)
896 * @hd: Pointer to a SCSI HOST structure 897 * @hd: Pointer to a SCSI HOST structure
897 * @vdevice: per device private data 898 * @vdevice: per device private data
898 * 899 *
@@ -2557,13 +2558,25 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
2557 hd->cmdPtr = NULL; 2558 hd->cmdPtr = NULL;
2558 } 2559 }
2559 2560
2560 /* 7. Set flag to force DV and re-read IOC Page 3 2561 /* 7. SPI: Set flag to force DV and re-read IOC Page 3
2561 */ 2562 */
2562 if (ioc->bus_type == SPI) { 2563 if (ioc->bus_type == SPI) {
2563 ioc->spi_data.forceDv = MPT_SCSICFG_NEED_DV | MPT_SCSICFG_RELOAD_IOC_PG3; 2564 ioc->spi_data.forceDv = MPT_SCSICFG_NEED_DV | MPT_SCSICFG_RELOAD_IOC_PG3;
2564 ddvtprintk(("Set reload IOC Pg3 Flag\n")); 2565 ddvtprintk(("Set reload IOC Pg3 Flag\n"));
2565 } 2566 }
2566 2567
2568 /* 7. FC: Rescan for blocked rports which might have returned.
2569 */
2570 else if (ioc->bus_type == FC) {
2571 int work_count;
2572 unsigned long flags;
2573
2574 spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags);
2575 work_count = ++ioc->fc_rescan_work_count;
2576 spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags);
2577 if (work_count == 1)
2578 schedule_work(&ioc->fc_rescan_work);
2579 }
2567 dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name)); 2580 dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name));
2568 2581
2569 } 2582 }
@@ -2587,6 +2600,8 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
2587{ 2600{
2588 MPT_SCSI_HOST *hd; 2601 MPT_SCSI_HOST *hd;
2589 u8 event = le32_to_cpu(pEvReply->Event) & 0xFF; 2602 u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
2603 int work_count;
2604 unsigned long flags;
2590 2605
2591 devtprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n", 2606 devtprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n",
2592 ioc->name, event)); 2607 ioc->name, event));
@@ -2608,11 +2623,18 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
2608 /* FIXME! */ 2623 /* FIXME! */
2609 break; 2624 break;
2610 2625
2626 case MPI_EVENT_RESCAN: /* 06 */
2627 spin_lock_irqsave(&ioc->fc_rescan_work_lock, flags);
2628 work_count = ++ioc->fc_rescan_work_count;
2629 spin_unlock_irqrestore(&ioc->fc_rescan_work_lock, flags);
2630 if (work_count == 1)
2631 schedule_work(&ioc->fc_rescan_work);
2632 break;
2633
2611 /* 2634 /*
2612 * CHECKME! Don't think we need to do 2635 * CHECKME! Don't think we need to do
2613 * anything for these, but... 2636 * anything for these, but...
2614 */ 2637 */
2615 case MPI_EVENT_RESCAN: /* 06 */
2616 case MPI_EVENT_LINK_STATUS_CHANGE: /* 07 */ 2638 case MPI_EVENT_LINK_STATUS_CHANGE: /* 07 */
2617 case MPI_EVENT_LOOP_STATE_CHANGE: /* 08 */ 2639 case MPI_EVENT_LOOP_STATE_CHANGE: /* 08 */
2618 /* 2640 /*
@@ -3952,8 +3974,6 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice)
3952 3974
3953/* Search IOC page 3 to determine if this is hidden physical disk 3975/* Search IOC page 3 to determine if this is hidden physical disk
3954 */ 3976 */
3955/* Search IOC page 3 to determine if this is hidden physical disk
3956 */
3957static int 3977static int
3958mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id) 3978mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id)
3959{ 3979{