Commit 79de278e authored by Moore, Eric's avatar Moore, Eric Committed by James Bottomley

[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: default avatarEric Moore <Eric.Moore@lsil.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 7d3eecf7
...@@ -631,6 +631,7 @@ typedef struct _MPT_ADAPTER ...@@ -631,6 +631,7 @@ typedef struct _MPT_ADAPTER
struct mutex sas_topology_mutex; struct mutex sas_topology_mutex;
MPT_SAS_MGMT sas_mgmt; MPT_SAS_MGMT sas_mgmt;
int num_ports; int num_ports;
struct work_struct mptscsih_persistTask;
struct list_head fc_rports; struct list_head fc_rports;
spinlock_t fc_rport_lock; /* list and ri flags */ spinlock_t fc_rport_lock; /* list and ri flags */
......
...@@ -1534,6 +1534,16 @@ mptscsih_send_raid_event(MPT_ADAPTER *ioc, ...@@ -1534,6 +1534,16 @@ mptscsih_send_raid_event(MPT_ADAPTER *ioc,
schedule_work(&ev->work); schedule_work(&ev->work);
} }
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* work queue thread to clear the persitency table */
static void
mptscsih_sas_persist_clear_table(void * arg)
{
MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg;
mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
}
static int static int
mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
{ {
...@@ -1552,6 +1562,12 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) ...@@ -1552,6 +1562,12 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
mptscsih_send_raid_event(ioc, mptscsih_send_raid_event(ioc,
(EVENT_DATA_RAID *)reply->Data); (EVENT_DATA_RAID *)reply->Data);
break; break;
case MPI_EVENT_PERSISTENT_TABLE_FULL:
INIT_WORK(&ioc->mptscsih_persistTask,
mptscsih_sas_persist_clear_table,
(void *)ioc);
schedule_work(&ioc->mptscsih_persistTask);
break;
default: default:
rc = mptscsih_event_process(ioc, reply); rc = mptscsih_event_process(ioc, reply);
break; break;
......
...@@ -162,8 +162,6 @@ static void mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice); ...@@ -162,8 +162,6 @@ static void mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, VirtDevice *vdevice);
static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget); static void mptscsih_negotiate_to_asyn_narrow(MPT_SCSI_HOST *hd, VirtTarget *vtarget);
static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id); static int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id);
static struct work_struct mptscsih_persistTask;
#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
static int mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io); static int mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io);
static void mptscsih_domainValidation(void *hd); static void mptscsih_domainValidation(void *hd);
...@@ -2584,16 +2582,6 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) ...@@ -2584,16 +2582,6 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
return 1; /* currently means nothing really */ return 1; /* currently means nothing really */
} }
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* work queue thread to clear the persitency table */
static void
mptscsih_sas_persist_clear_table(void * arg)
{
MPT_ADAPTER *ioc = (MPT_ADAPTER *)arg;
mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
int int
mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
...@@ -2656,13 +2644,6 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) ...@@ -2656,13 +2644,6 @@ mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
break; break;
} }
/* Persistent table is full. */
case MPI_EVENT_PERSISTENT_TABLE_FULL:
INIT_WORK(&mptscsih_persistTask,
mptscsih_sas_persist_clear_table,(void *)ioc);
schedule_work(&mptscsih_persistTask);
break;
case MPI_EVENT_NONE: /* 00 */ case MPI_EVENT_NONE: /* 00 */
case MPI_EVENT_LOG_DATA: /* 01 */ case MPI_EVENT_LOG_DATA: /* 01 */
case MPI_EVENT_STATE_CHANGE: /* 02 */ case MPI_EVENT_STATE_CHANGE: /* 02 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment