Skip to contentSkip to conversation

mpt2sas: Modify code to support Expander switch

PATCH New Kashyap, Desai 1 participant 1 message Nov 12, 2010 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 5/11 mpt2sas: Modify code to support Expander switch

Issue : Switch swap doesn't work when device missing delay is enabled.

(1) add support to individually add and remove phys to and from existing ports. This replaces the routine _transport_delete_duplicate_port.
(2) _scsih_sas_host_refresh - was modified to change the link rate from zero to 1.5 GB rate when the firmware reports there is an attached device with zero link.
(3) add new function mpt2sas_device_remove, this is wrapper function deletes some redundant code through out driver by combining into one subrountine
(4) two subroutines were modified so the sas_device, raid_device, and port lists are traversed once when objects are deleted from the list. Previously it was looping back each time an object was deleted from the list.

---

drivers/scsi/mpt2sas/mpt2sas_base.h +2 -0
index edf1a02..428a8c2 100644
@@ -849,6 +849,8 @@ int mpt2sas_scsih_issue_tm(struct MPT2SAS_ADAPTER *ioc, u16 handle,
     ulong timeout, struct scsi_cmnd *scmd);
 void mpt2sas_scsih_set_tm_flag(struct MPT2SAS_ADAPTER *ioc, u16 handle);
 void mpt2sas_scsih_clear_tm_flag(struct MPT2SAS_ADAPTER *ioc, u16 handle);
+void mpt2sas_expander_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address);
+void mpt2sas_device_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address);
 struct _sas_node *mpt2sas_scsih_expander_find_by_handle(struct MPT2SAS_ADAPTER *ioc,
     u16 handle);
 struct _sas_node *mpt2sas_scsih_expander_find_by_sas_address(struct MPT2SAS_ADAPTER
drivers/scsi/mpt2sas/mpt2sas_scsih.c +66 -77

236 lines not on this page · raw message

drivers/scsi/mpt2sas/mpt2sas_transport.c +138 -47

221 lines not on this page · raw message