aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvsas/mv_sas.h
diff options
context:
space:
mode:
authorSrinivas <satyasrinivasp@hcl.in>2010-02-15 01:00:00 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 15:44:01 -0400
commit9dc9fd9484c5168d23fe855e6c56543d96b6695b (patch)
tree514bbe305138f21af247441f535e20430c3829b6 /drivers/scsi/mvsas/mv_sas.h
parentc8032216c9607ee8c62a39484711750c1445c6a4 (diff)
[SCSI] mvsas: fix hot plug handling and IO issues
This patch adds a bunch of fixes 1. Reduce sg table size to 64 (SG_MX) instead of default SG_ALL 2. clear task lists on phy down events 3. release all tasks on port deformation 4. release current task for device gone notification 5. Add sata abort handing 6. Add 10ms delay to each port reset (currently done serially and with interrupts disabled) [jejb: whitespace fixes and clean ups plus added description added dummy 94xx_clear_srs_irq function just to prevent the mismatch in the mvs_dispatch structure killing 94xx cards] Signed-off-by: Srinivas <satyasrinivasp@hcl.in> Cc: Andy Yan <ayan@marvell.com> Cc: qswang@marvell.com Cc: jfeng@marvell.com Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mvsas/mv_sas.h')
-rw-r--r--drivers/scsi/mvsas/mv_sas.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/mvsas/mv_sas.h b/drivers/scsi/mvsas/mv_sas.h
index 885858bcc403..77ddc7c1e5f2 100644
--- a/drivers/scsi/mvsas/mv_sas.h
+++ b/drivers/scsi/mvsas/mv_sas.h
@@ -39,6 +39,7 @@
39#include <linux/slab.h> 39#include <linux/slab.h>
40#include <linux/vmalloc.h> 40#include <linux/vmalloc.h>
41#include <scsi/libsas.h> 41#include <scsi/libsas.h>
42#include <scsi/scsi.h>
42#include <scsi/scsi_tcq.h> 43#include <scsi/scsi_tcq.h>
43#include <scsi/sas_ata.h> 44#include <scsi/sas_ata.h>
44#include <linux/version.h> 45#include <linux/version.h>
@@ -49,7 +50,7 @@
49#define _MV_DUMP 0 50#define _MV_DUMP 0
50#define MVS_ID_NOT_MAPPED 0x7f 51#define MVS_ID_NOT_MAPPED 0x7f
51/* #define DISABLE_HOTPLUG_DMA_FIX */ 52/* #define DISABLE_HOTPLUG_DMA_FIX */
52#define MAX_EXP_RUNNING_REQ 2 53// #define MAX_EXP_RUNNING_REQ 2
53#define WIDE_PORT_MAX_PHY 4 54#define WIDE_PORT_MAX_PHY 4
54#define MV_DISABLE_NCQ 0 55#define MV_DISABLE_NCQ 0
55#define mv_printk(fmt, arg ...) \ 56#define mv_printk(fmt, arg ...) \
@@ -129,6 +130,7 @@ struct mvs_dispatch {
129 130
130 void (*get_sas_addr)(void *buf, u32 buflen); 131 void (*get_sas_addr)(void *buf, u32 buflen);
131 void (*command_active)(struct mvs_info *mvi, u32 slot_idx); 132 void (*command_active)(struct mvs_info *mvi, u32 slot_idx);
133 void (*clear_srs_irq)(struct mvs_info *mvi, u8 reg_set, u8 clear_all);
132 void (*issue_stop)(struct mvs_info *mvi, enum mvs_port_type type, 134 void (*issue_stop)(struct mvs_info *mvi, enum mvs_port_type type,
133 u32 tfs); 135 u32 tfs);
134 void (*start_delivery)(struct mvs_info *mvi, u32 tx); 136 void (*start_delivery)(struct mvs_info *mvi, u32 tx);
@@ -236,9 +238,10 @@ struct mvs_device {
236 enum sas_dev_type dev_type; 238 enum sas_dev_type dev_type;
237 struct mvs_info *mvi_info; 239 struct mvs_info *mvi_info;
238 struct domain_device *sas_device; 240 struct domain_device *sas_device;
241 struct timer_list timer;
239 u32 attached_phy; 242 u32 attached_phy;
240 u32 device_id; 243 u32 device_id;
241 u32 runing_req; 244 u32 running_req;
242 u8 taskfileset; 245 u8 taskfileset;
243 u8 dev_status; 246 u8 dev_status;
244 u16 reserved; 247 u16 reserved;
@@ -397,7 +400,9 @@ int mvs_lu_reset(struct domain_device *dev, u8 *lun);
397int mvs_slot_complete(struct mvs_info *mvi, u32 rx_desc, u32 flags); 400int mvs_slot_complete(struct mvs_info *mvi, u32 rx_desc, u32 flags);
398int mvs_I_T_nexus_reset(struct domain_device *dev); 401int mvs_I_T_nexus_reset(struct domain_device *dev);
399int mvs_query_task(struct sas_task *task); 402int mvs_query_task(struct sas_task *task);
400void mvs_release_task(struct mvs_info *mvi, int phy_no, 403void mvs_release_task(struct mvs_info *mvi,
404 struct domain_device *dev);
405void mvs_do_release_task(struct mvs_info *mvi, int phy_no,
401 struct domain_device *dev); 406 struct domain_device *dev);
402void mvs_int_port(struct mvs_info *mvi, int phy_no, u32 events); 407void mvs_int_port(struct mvs_info *mvi, int phy_no, u32 events);
403void mvs_update_phyinfo(struct mvs_info *mvi, int i, int get_st); 408void mvs_update_phyinfo(struct mvs_info *mvi, int i, int get_st);