/[packages]/updates/1/kernel/current/PATCHES/patches/scsi-isci-change-sas-phy-timeouts-from-54us-to-59us.patch
ViewVC logotype

Contents of /updates/1/kernel/current/PATCHES/patches/scsi-isci-change-sas-phy-timeouts-from-54us-to-59us.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 162471 - (show annotations) (download)
Thu Nov 3 18:35:16 2011 UTC (12 years, 4 months ago) by tmb
File size: 3526 byte(s)
- scsi/isci: fix sata response handling
- scsi/isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n
- scsi/isci: change sas phy timeouts from 54us to 59us
- scsi/isci: fix sgpio register definitions
- scsi/isci: fix support for large smp requests
- scsi/isci: fix missed unlock in apc_agent_timeout()


1 From 985af6f70dbb8a33b3af8a7c7df508d924650e37 Mon Sep 17 00:00:00 2001
2 From: Marcin Tomczak <marcin.tomczak@intel.com>
3 Date: Fri, 29 Jul 2011 17:16:50 -0700
4 Subject: [PATCH] [SCSI] isci: change sas phy timeouts from 54us to 59us
5
6 Need the following workaround in the driver for interoperability with
7 the older Intel SSD drives and any other SATA drive that may exhibit the
8 same behavior. This is a corner case where SCU speed is limited to
9 either 3G or 1.5G and the drive has a period of DC idle when it switches
10 speed during SATA speed negotiation. Workaround :change PHYTOV[31:24]
11 from 0x36 to 0x3B.
12
13 Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com>
14 Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
16 ---
17 drivers/scsi/isci/phy.c | 13 +++++++++++++
18 drivers/scsi/isci/registers.h | 12 ++++++++++++
19 2 files changed, 25 insertions(+), 0 deletions(-)
20
21 diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
22 index 79313a7..430fc8f 100644
23 --- a/drivers/scsi/isci/phy.c
24 +++ b/drivers/scsi/isci/phy.c
25 @@ -104,6 +104,7 @@ sci_phy_link_layer_initialization(struct isci_phy *iphy,
26 u32 parity_count = 0;
27 u32 llctl, link_rate;
28 u32 clksm_value = 0;
29 + u32 sp_timeouts = 0;
30
31 iphy->link_layer_registers = reg;
32
33 @@ -211,6 +212,18 @@ sci_phy_link_layer_initialization(struct isci_phy *iphy,
34 llctl |= SCU_SAS_LLCTL_GEN_VAL(MAX_LINK_RATE, link_rate);
35 writel(llctl, &iphy->link_layer_registers->link_layer_control);
36
37 + sp_timeouts = readl(&iphy->link_layer_registers->sas_phy_timeouts);
38 +
39 + /* Clear the default 0x36 (54us) RATE_CHANGE timeout value. */
40 + sp_timeouts &= ~SCU_SAS_PHYTOV_GEN_VAL(RATE_CHANGE, 0xFF);
41 +
42 + /* Set RATE_CHANGE timeout value to 0x3B (59us). This ensures SCU can
43 + * lock with 3Gb drive when SCU max rate is set to 1.5Gb.
44 + */
45 + sp_timeouts |= SCU_SAS_PHYTOV_GEN_VAL(RATE_CHANGE, 0x3B);
46 +
47 + writel(sp_timeouts, &iphy->link_layer_registers->sas_phy_timeouts);
48 +
49 if (is_a2(ihost->pdev)) {
50 /* Program the max ARB time for the PHY to 700us so we inter-operate with
51 * the PMC expander which shuts down PHYs if the expander PHY generates too
52 diff --git a/drivers/scsi/isci/registers.h b/drivers/scsi/isci/registers.h
53 index 9b266c7..00afc73 100644
54 --- a/drivers/scsi/isci/registers.h
55 +++ b/drivers/scsi/isci/registers.h
56 @@ -1299,6 +1299,18 @@ struct scu_transport_layer_registers {
57 #define SCU_AFE_XCVRCR_OFFSET 0x00DC
58 #define SCU_AFE_LUTCR_OFFSET 0x00E0
59
60 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_ALIGN_DETECTION_SHIFT (0UL)
61 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_ALIGN_DETECTION_MASK (0x000000FFUL)
62 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_HOT_PLUG_SHIFT (8UL)
63 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_HOT_PLUG_MASK (0x0000FF00UL)
64 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_COMSAS_DETECTION_SHIFT (16UL)
65 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_COMSAS_DETECTION_MASK (0x00FF0000UL)
66 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_RATE_CHANGE_SHIFT (24UL)
67 +#define SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_RATE_CHANGE_MASK (0xFF000000UL)
68 +
69 +#define SCU_SAS_PHYTOV_GEN_VAL(name, value) \
70 + SCU_GEN_VALUE(SCU_SAS_PHY_TIMER_TIMEOUT_VALUES_##name, value)
71 +
72 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_SHIFT (0)
73 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_MASK (0x00000003)
74 #define SCU_SAS_LINK_LAYER_CONTROL_MAX_LINK_RATE_GEN1 (0)
75 --
76 1.7.7.2
77

  ViewVC Help
Powered by ViewVC 1.1.30