diff options
author | Moore, Eric <Eric.Moore@lsil.com> | 2006-01-25 20:05:15 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-31 15:39:39 -0500 |
commit | 79de278e86121cd4473c276409f834aee87f3195 (patch) | |
tree | 56b8d88d9b4bfd79c612bf81a133246b2131d5bc | |
parent | 7d3eecf7b2195c64d26f7e7d105d00e5a6dd702e (diff) |
[SCSI] fusion: move sas persistent event handling over to the mptsas module
This moves code intented for SAS from
the generic mptscsih module over to the
mptsas module.
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/message/fusion/mptbase.h | 1 | ||||
-rw-r--r-- | drivers/message/fusion/mptsas.c | 16 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 19 |
3 files changed, 17 insertions, 19 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index 47053ac65068..5c2ce949fe80 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -631,6 +631,7 @@ typedef struct _MPT_ADAPTER | |||
631 | struct mutex sas_topology_mutex; | 631 | struct mutex sas_topology_mutex; |
632 | MPT_SAS_MGMT sas_mgmt; | 632 | MPT_SAS_MGMT sas_mgmt; |
633 | int num_ports; | 633 | int num_ports; |
634 | struct work_struct mptscsih_persistTask; | ||
634 | 635 | ||
635 | struct list_head fc_rports; | 636 | struct list_head fc_rports; |
636 | spinlock_t fc_rport_lock; /* list and ri flags */ | 637 | spinlock_t fc_rport_lock; /* list and ri flags */ |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 190bd940bb01..90660bfa148c 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -1534,6 +1534,16 @@ mptscsih_send_raid_event(MPT_ADAPTER *ioc, | |||
1534 | schedule_work(&ev->work); | 1534 | schedule_work(&ev->work); |
1535 | } | 1535 | } |
1536 | 1536 | ||
1537 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | ||
1538 | /* work queue thread to clear the persitency table */ | ||
1539 | static void | ||
1540 | mptscsih_sas_persist_clear_table(void * arg) | ||
1541 | { | ||
1542 | MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; | ||
1543 | |||
1544 | mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT); | ||
1545 | } | ||
1546 | |||
1537 | static int | 1547 | static int |
1538 | mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) | 1548 | mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) |
1539 | { | 1549 | { |
@@ -1552,6 +1562,12 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) | |||
1552 | mptscsih_send_raid_event(ioc, | 1562 | mptscsih_send_raid_event(ioc, |
1553 | (EVENT_DATA_RAID *)reply->Data); | 1563 | (EVENT_DATA_RAID *)reply->Data); |
1554 | break; | 1564 | break; |
1565 | case MPI_EVENT_PERSISTENT_TABLE_FULL: | ||
1566 | INIT_WORK(&ioc->mptscsih_persistTask, | ||
1567 | mptscsih_sas_persist_clear_table, | ||
1568 | (void *)ioc); | ||
1569 | schedule_work(&ioc->mptscsih_persistTask); | ||
1570 | break; | ||
1555 | default: | 1571 | default: |
1556 | rc = mptscsih_event_process(ioc, reply); | 1572 | rc = mptscsih_event_process(ioc, reply); |
1557 | break; | 1573 | break; |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index cdac5578fdf2..56c3d1f78f05 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -162,8 +162,6 @@ static void mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice); | |||
162 | static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget); | 162 | static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget); |
163 | static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id); | 163 | static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id); |
164 | 164 | ||
165 | static struct work_struct mptscsih_persistTask; | ||
166 | |||
167 | #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION | 165 | #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION |
168 | static int mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io); | 166 | static int mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io); |
169 | static void mptscsih_domainValidation(void *hd); | 167 | static void mptscsih_domainValidation(void *hd); |
@@ -2585,16 +2583,6 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
2585 | } | 2583 | } |
2586 | 2584 | ||
2587 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 2585 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
2588 | /* work queue thread to clear the persitency table */ | ||
2589 | static void | ||
2590 | mptscsih_sas_persist_clear_table(void * arg) | ||
2591 | { | ||
2592 | MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg; | ||
2593 | |||
2594 | mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT); | ||
2595 | } | ||
2596 | |||
2597 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | ||
2598 | int | 2586 | int |
2599 | mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) | 2587 | mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) |
2600 | { | 2588 | { |
@@ -2656,13 +2644,6 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) | |||
2656 | break; | 2644 | break; |
2657 | } | 2645 | } |
2658 | 2646 | ||
2659 | /* Persistent table is full. */ | ||
2660 | case MPI_EVENT_PERSISTENT_TABLE_FULL: | ||
2661 | INIT_WORK(&mptscsih_persistTask, | ||
2662 | mptscsih_sas_persist_clear_table,(void *)ioc); | ||
2663 | schedule_work(&mptscsih_persistTask); | ||
2664 | break; | ||
2665 | |||
2666 | case MPI_EVENT_NONE: /* 00 */ | 2647 | case MPI_EVENT_NONE: /* 00 */ |
2667 | case MPI_EVENT_LOG_DATA: /* 01 */ | 2648 | case MPI_EVENT_LOG_DATA: /* 01 */ |
2668 | case MPI_EVENT_STATE_CHANGE: /* 02 */ | 2649 | case MPI_EVENT_STATE_CHANGE: /* 02 */ |