raid class support for mptfusion
Subsystems (2)
RFC 1/1 raid class support for mptfusion
This adds both raid class support and SPI transport class support (the raid classes are built on top of the SPI transport class support, so it just seemed easier to combine the two patches). The raid class features are quite primitive, but it can now show the state of the raid array and the resync completion fraction. The next project will be to add a piece state model allowing the individual raid pieces to be taken on and offline.
James
drivers/message/fusion/Kconfig +2 -0
@@ -9,6 +9,8 @@ config FUSION_SPI tristate "Fusion MPT ScsiHost drivers for SPI" depends on PCI && SCSI select FUSION + select SCSI_SPI_ATTRS + select RAID_ATTRS ---help--- SCSI HOST support for a parallel SCSI host adapters.
drivers/message/fusion/mptbase.h +11 -5
@@ -333,6 +333,8 @@ typedef struct _SYSIF_REGS*/ typedef struct _VirtDevice { struct scsi_device *device; + RaidVolumePage0_t *raidVolume; /* set, if RAID Volume */ + int raidpg0size; u8 tflags; u8 ioc_id; u8 target_id;
@@ -341,7 +343,6 @@ typedef struct _VirtDevice {u8 maxOffset;/* 0 if async */ u8 maxWidth;/* 0 if narrow, 1 if wide */ u8 negoFlags;/* bit field, see above */ -u8 raidVolume;/* set, if RAID Volume */ u8 type;/* byte 0 of Inquiry data */ u8 cflags;/* controller flags */ u8 rsvd1raid;
@@ -861,10 +862,15 @@ typedef struct _mpt_sge {typedef struct _MPT_LOCAL_REPLY {ConfigPageHeader_t header;int completion; -u8 sense[SCSI_STD_SENSE_BYTES ]; -u8 scsiStatus; -u8 skip; -u32 pad; +union { +struct { +u8 sense[SCSI_STD_SENSE_BYTES ]; +u8 scsiStatus; +u8 skip; +u32 pad; + } s; +u64 r[6 ]; + } u; }MPT_LOCAL_REPLY ;#define MPT_HOST_BUS_UNKNOWN (0xFF)
drivers/message/fusion/mptscsih.c +196 -1933
2,400 lines not on this page · raw message
drivers/message/fusion/mptscsih.h +15 -10
@@ -60,16 +60,6 @@#define MPT_SCSI_MAX_SECTORS 8192 -/* To disable domain validation, uncomment the -* following line. No effect for FC devices. -* For SCSI devices, driver will negotiate to -* NVRAM settings (if available) or to maximum adapter -* capabilities. -*/ - -#define MPTSCSIH_ENABLE_DOMAIN_VALIDATION - -/* SCSI driver setup structure. Settings can be overridden * by command line options. */
@@ -106,3 +96,18 @@ extern int mptscsih_event_process(MPT_ADextern int mptscsih_ioc_reset (MPT_ADAPTER *ioc,int post_reset);extern int mptscsih_change_queue_depth (struct scsi_device *sdev,int qdepth);extern void mptscsih_timer_expired (unsigned long data); +extern int mptscsih_raid_action (MPT_SCSI_HOST *hd,int action,int volume, +int volbus,MpiRaidActionReply_t *pRep, +int repLen); +extern int mptscsih_read_raid_page0 (struct scsi_device *sdev, +struct _CONFIG_PAGE_RAID_VOL_0 *pass_pg0, +int pg0len,int version); + +extern struct _VirtDevice * +mptscsih_find_raid_device (struct _MPT_SCSI_HOST *hd,int physDiskBus, +int physDiskID); + +static inline VirtDevice *mpt_target (MPT_SCSI_HOST *hd,int channel,int id) +{ +return hd->Targets[id + (channel * hd->ioc->sh->max_id)]; +}
drivers/message/fusion/mptspi.c +647 -42
524 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.