Skip to contentSkip to conversation

mpt2sas : Add support for RAID Action System Shutdown Initiated at OS shutdown

PATCH RESEND In review Kashyap, Desai 1 participant 2 messages Oct 5, 2009 – Oct 12, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 mpt2sas : Add support for RAID Action System Shutdown Initiated at OS shutdown

Resending patch.
Original patch subject line :
" [PATCH 18/20] mpt2sas : Add support for RAID Action System Shutdown Initiated at OS shutdwon" sent on 09/23/2009.

Consider this patch as update of original patch.

(1) Added new function _scsih_ir_shutdown. This function will issue the MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED request via MPI2_FUNCTION_RAID_ACTION. The function will wait 10 seconds for reply message frame, then print out the ioc status and loginfo. This function is only called when there are raid volumes present.

(2) Add shutdown callback in the struct pci_driver object scsih_driver. This will be called only when the system is shutting down. From this function, we will call _scsih_ir_shutdown mentioned above.

(3) Add support in _scsih_remove to call _scsih_ir_shutdown. The function _scsih_remove will be called when the driver is unloaded (and system is still running).

scsih internal command contex is added to send internal message frames from mpt2sas_scsih.c.

---

drivers/scsi/mpt2sas/mpt2sas_base.h +4 -0
index 7efb6ab..eb51fe9 100644
@@ -492,12 +492,14 @@ typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr);
  * @msix_table_backup: backup msix table
  * @scsi_io_cb_idx: shost generated commands
  * @tm_cb_idx: task management commands
+ * @scsih_cb_idx: scsih internal commands
  * @transport_cb_idx: transport internal commands
  * @ctl_cb_idx: clt internal commands
  * @base_cb_idx: base internal commands
  * @config_cb_idx: base internal commands
  * @base_cmds:
  * @transport_cmds:
+ * @scsih_cmds:
  * @tm_cmds:
  * @ctl_cmds:
  * @config_cmds:
@@ -624,6 +626,7 @@ struct MPT2SAS_ADAPTER {
 	u8		scsi_io_cb_idx;
 	u8		tm_cb_idx;
 	u8		transport_cb_idx;
+	u8		scsih_cb_idx;
 	u8		ctl_cb_idx;
 	u8		base_cb_idx;
 	u8		config_cb_idx;
@@ -631,6 +634,7 @@ struct MPT2SAS_ADAPTER {
 	u8		tm_sas_control_cb_idx;
 	struct _internal_cmd base_cmds;
 	struct _internal_cmd transport_cmds;
+	struct _internal_cmd scsih_cmds;
 	struct _internal_cmd tm_cmds;
 	struct _internal_cmd ctl_cmds;
 	struct _internal_cmd config_cmds;
drivers/scsi/mpt2sas/mpt2sas_scsih.c +132 -1

184 lines not on this page · raw message

#1 lore raw

James,

Any observation on mpt2sas pending patch set?

Thanks,
Kashyap

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kashyap, Desai
Sent: Monday, October 05, 2009 3:57 PM
To: [email protected]
Cc: [email protected]; Moore, Eric; Prakash, Sathya
Subject: [PATCH Resend] mpt2sas : Add support for RAID Action System Shutdown Initiated at OS shutdown

Resending patch.
Original patch subject line :
" [PATCH 18/20] mpt2sas : Add support for RAID Action System Shutdown Initiated at OS shutdwon" sent on 09/23/2009.

Consider this patch as update of original patch.

(1) Added new function _scsih_ir_shutdown. This function will issue the MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED request via MPI2_FUNCTION_RAID_ACTION. The function will wait 10 seconds for reply message frame, then print out the ioc status and loginfo. This function is only called when there are raid volumes present.

(2) Add shutdown callback in the struct pci_driver object scsih_driver. This will be called only when the system is shutting down. From this function, we will call _scsih_ir_shutdown mentioned above.

(3) Add support in _scsih_remove to call _scsih_ir_shutdown. The function _scsih_remove will be called when the driver is unloaded (and system is still running).

scsih internal command contex is added to send internal message frames from mpt2sas_scsih.c.

---

drivers/scsi/mpt2sas/mpt2sas_base.h +4 -0
index 7efb6ab..eb51fe9 100644
@@ -492,12 +492,14 @@ typedef void (*MPT_ADD_SGE)(void *paddr, u32 flags_length, dma_addr_t dma_addr);
  * @msix_table_backup: backup msix table
  * @scsi_io_cb_idx: shost generated commands
  * @tm_cb_idx: task management commands
+ * @scsih_cb_idx: scsih internal commands
  * @transport_cb_idx: transport internal commands
  * @ctl_cb_idx: clt internal commands
  * @base_cb_idx: base internal commands
  * @config_cb_idx: base internal commands
  * @base_cmds:
  * @transport_cmds:
+ * @scsih_cmds:
  * @tm_cmds:
  * @ctl_cmds:
  * @config_cmds:
@@ -624,6 +626,7 @@ struct MPT2SAS_ADAPTER {
 	u8		scsi_io_cb_idx;
 	u8		tm_cb_idx;
 	u8		transport_cb_idx;
+	u8		scsih_cb_idx;
 	u8		ctl_cb_idx;
 	u8		base_cb_idx;
 	u8		config_cb_idx;
@@ -631,6 +634,7 @@ struct MPT2SAS_ADAPTER {
 	u8		tm_sas_control_cb_idx;
 	struct _internal_cmd base_cmds;
 	struct _internal_cmd transport_cmds;
+	struct _internal_cmd scsih_cmds;
 	struct _internal_cmd tm_cmds;
 	struct _internal_cmd ctl_cmds;
 	struct _internal_cmd config_cmds;
drivers/scsi/mpt2sas/mpt2sas_scsih.c +132 -1

184 lines not on this page · raw message

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html