Re: [Resend PATCH 1/3] scsi:stex.c Support to Pegasus series.

2016-02-10 Thread Martin K. Petersen
> "Charles" == Charles Chiou  writes:

Charles,

Charles> Pegasus is a high performace hardware RAID solution designed to
Charles> unleash the raw power of Thunderbolt technology.

Please address Oliver's concerns about power management.

Also, I was going to merge the first two patches in the series but your
mailer mangled them and they did not apply. Please use git send-email to
submit patches.

Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


Re: [Resend PATCH 1/3] scsi:stex.c Support to Pegasus series.

2016-02-10 Thread Martin K. Petersen
> "Charles" == Charles Chiou  writes:

Charles,

Charles> Pegasus is a high performace hardware RAID solution designed to
Charles> unleash the raw power of Thunderbolt technology.

Please address Oliver's concerns about power management.

Also, I was going to merge the first two patches in the series but your
mailer mangled them and they did not apply. Please use git send-email to
submit patches.

Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering


[Resend PATCH 1/3] scsi:stex.c Support to Pegasus series.

2016-02-04 Thread Charles Chiou

From 9d7973dfa05a7785d0eb1e9bcfb0fb6d2c493209 Mon Sep 17 00:00:00 2001
From: Charles 
Date: Wed, 2 Sep 2015 20:41:56 +0800
Subject: [PATCH 1/3] scsi:stex.c Support to Pegasus series.

Pegasus is a high performace hardware RAID solution designed to unleash
the raw power of Thunderbolt technology.

1. Add code to distinct SuperTrack and Pegasus series by sub device ID.
It should support backward compatibility.

2. Change the driver version.

V2: Remove blank lines

Signed-off-by: Charles Chiou 
Reviewed-by: Johannes Thumshirn 

---
  drivers/scsi/stex.c | 32 ++--
  1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 98a62bc..0c93f1f 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1,7 +1,7 @@
  /*
   * SuperTrak EX Series Storage Controller driver for Linux
   *
- *Copyright (C) 2005-2009 Promise Technology Inc.
+ *Copyright (C) 2005-2015 Promise Technology Inc.
   *
   *This program is free software; you can redistribute it and/or
   *modify it under the terms of the GNU General Public License
@@ -37,11 +37,11 @@
  #include 

  #define DRV_NAME "stex"
-#define ST_DRIVER_VERSION "4.6..4"
-#define ST_VER_MAJOR4
-#define ST_VER_MINOR6
-#define ST_OEM0
-#define ST_BUILD_VER4
+#define ST_DRIVER_VERSION"5.00..01"
+#define ST_VER_MAJOR5
+#define ST_VER_MINOR00
+#define ST_OEM
+#define ST_BUILD_VER01

  enum {
  /* MU register offset */
@@ -327,6 +327,7 @@ struct st_hba {
  u16 rq_count;
  u16 rq_size;
  u16 sts_count;
+u8  supports_pm;
  };

  struct st_card_info {
@@ -1568,6 +1569,25 @@ static int stex_probe(struct pci_dev *pdev, const 
struct

pci_device_id *id)

  hba->cardtype = (unsigned int) id->driver_data;
  ci = _card_info[hba->cardtype];
+switch (id->subdevice) {
+case 0x4221:
+case 0x4222:
+case 0x4223:
+case 0x4224:
+case 0x4225:
+case 0x4226:
+case 0x4227:
+case 0x4261:
+case 0x4262:
+case 0x4263:
+case 0x4264:
+case 0x4265:
+break;
+default:
+if (hba->cardtype == st_yel)
+hba->supports_pm = 1;
+}
+
  sts_offset = scratch_offset = (ci->rq_count+1) * ci->rq_size;
  if (hba->cardtype == st_yel)
  sts_offset += (ci->sts_count+1) * sizeof(u32);


[Resend PATCH 1/3] scsi:stex.c Support to Pegasus series.

2016-02-04 Thread Charles Chiou

From 9d7973dfa05a7785d0eb1e9bcfb0fb6d2c493209 Mon Sep 17 00:00:00 2001
From: Charles 
Date: Wed, 2 Sep 2015 20:41:56 +0800
Subject: [PATCH 1/3] scsi:stex.c Support to Pegasus series.

Pegasus is a high performace hardware RAID solution designed to unleash
the raw power of Thunderbolt technology.

1. Add code to distinct SuperTrack and Pegasus series by sub device ID.
It should support backward compatibility.

2. Change the driver version.

V2: Remove blank lines

Signed-off-by: Charles Chiou 
Reviewed-by: Johannes Thumshirn 

---
  drivers/scsi/stex.c | 32 ++--
  1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 98a62bc..0c93f1f 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1,7 +1,7 @@
  /*
   * SuperTrak EX Series Storage Controller driver for Linux
   *
- *Copyright (C) 2005-2009 Promise Technology Inc.
+ *Copyright (C) 2005-2015 Promise Technology Inc.
   *
   *This program is free software; you can redistribute it and/or
   *modify it under the terms of the GNU General Public License
@@ -37,11 +37,11 @@
  #include 

  #define DRV_NAME "stex"
-#define ST_DRIVER_VERSION "4.6..4"
-#define ST_VER_MAJOR4
-#define ST_VER_MINOR6
-#define ST_OEM0
-#define ST_BUILD_VER4
+#define ST_DRIVER_VERSION"5.00..01"
+#define ST_VER_MAJOR5
+#define ST_VER_MINOR00
+#define ST_OEM
+#define ST_BUILD_VER01

  enum {
  /* MU register offset */
@@ -327,6 +327,7 @@ struct st_hba {
  u16 rq_count;
  u16 rq_size;
  u16 sts_count;
+u8  supports_pm;
  };

  struct st_card_info {
@@ -1568,6 +1569,25 @@ static int stex_probe(struct pci_dev *pdev, const 
struct

pci_device_id *id)

  hba->cardtype = (unsigned int) id->driver_data;
  ci = _card_info[hba->cardtype];
+switch (id->subdevice) {
+case 0x4221:
+case 0x4222:
+case 0x4223:
+case 0x4224:
+case 0x4225:
+case 0x4226:
+case 0x4227:
+case 0x4261:
+case 0x4262:
+case 0x4263:
+case 0x4264:
+case 0x4265:
+break;
+default:
+if (hba->cardtype == st_yel)
+hba->supports_pm = 1;
+}
+
  sts_offset = scratch_offset = (ci->rq_count+1) * ci->rq_size;
  if (hba->cardtype == st_yel)
  sts_offset += (ci->sts_count+1) * sizeof(u32);