Re: [PATCH net-next] qed*: Utilize Firmware 8.15.3.0

2017-03-10 Thread kbuild test robot
Hi Yuval,

[auto build test WARNING on net-next/master]

url:
https://github.com/0day-ci/linux/commits/Yuval-Mintz/qed-Utilize-Firmware-8-15-3-0/20170310-154337
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   In file included from include/linux/byteorder/big_endian.h:4:0,
from arch/xtensa/include/uapi/asm/byteorder.h:7,
from include/linux/qed/common_hsi.h:36,
from drivers/scsi/qedf/drv_scsi_fw_funcs.h:11,
from drivers/scsi/qedf/drv_fcoe_fw_funcs.h:11,
from drivers/scsi/qedf/drv_fcoe_fw_funcs.c:9:
   drivers/scsi/qedf/drv_fcoe_fw_funcs.c: In function 
'init_initiator_rw_fcoe_task':
   include/uapi/linux/byteorder/big_endian.h:32:26: warning: large integer 
implicitly truncated to unsigned type [-Woverflow]
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
 ^
   include/linux/byteorder/generic.h:87:21: note: in expansion of macro 
'__cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
>> drivers/scsi/qedf/drv_fcoe_fw_funcs.c:63:31: note: in expansion of macro 
>> 'cpu_to_le32'
 t_st_ctx->read_write.rx_id = cpu_to_le32(FCOE_RX_ID);
  ^
   drivers/scsi/qedf/drv_fcoe_fw_funcs.c: In function 
'init_initiator_midpath_unsolicited_fcoe_task':
   include/uapi/linux/byteorder/big_endian.h:32:26: warning: large integer 
implicitly truncated to unsigned type [-Woverflow]
#define __cpu_to_le32(x) ((__force __le32)__swab32((x)))
 ^
   include/linux/byteorder/generic.h:87:21: note: in expansion of macro 
'__cpu_to_le32'
#define cpu_to_le32 __cpu_to_le32
^
   drivers/scsi/qedf/drv_fcoe_fw_funcs.c:155:31: note: in expansion of macro 
'cpu_to_le32'
 t_st_ctx->read_write.rx_id = cpu_to_le32(FCOE_RX_ID);
  ^

vim +/cpu_to_le32 +63 drivers/scsi/qedf/drv_fcoe_fw_funcs.c

 3   *  Copyright (c) 2016 Cavium Inc.
 4   *
 5   *  This software is available under the terms of the GNU General 
Public License
 6   *  (GPL) Version 2, available from the file COPYING in the main 
directory of
 7   *  this source tree.
 8   */
   > 9  #include "drv_fcoe_fw_funcs.h"
10  #include "drv_scsi_fw_funcs.h"
11  
12  #define FCOE_RX_ID 0x
13  
14  static inline void init_common_sqe(struct fcoe_task_params *task_params,
15 enum fcoe_sqe_request_type 
request_type)
16  {
17  memset(task_params->sqe, 0, sizeof(*(task_params->sqe)));
18  SET_FIELD(task_params->sqe->flags, FCOE_WQE_REQ_TYPE,
19request_type);
20  task_params->sqe->task_id = task_params->itid;
21  }
22  
23  int init_initiator_rw_fcoe_task(struct fcoe_task_params *task_params,
24  struct scsi_sgl_task_params 
*sgl_task_params,
25  struct regpair 
sense_data_buffer_phys_addr,
26  u32 task_retry_id,
27  u8 fcp_cmd_payload[32])
28  {
29  struct fcoe_task_context *ctx = task_params->context;
30  struct ystorm_fcoe_task_st_ctx *y_st_ctx;
31  struct tstorm_fcoe_task_st_ctx *t_st_ctx;
32  struct ustorm_fcoe_task_ag_ctx *u_ag_ctx;
33  struct mstorm_fcoe_task_st_ctx *m_st_ctx;
34  u32 io_size, val;
35  bool slow_sgl;
36  
37  memset(ctx, 0, sizeof(*(ctx)));
38  slow_sgl = scsi_is_slow_sgl(sgl_task_params->num_sges,
39  sgl_task_params->small_mid_sge);
40  io_size = (task_params->task_type == 
FCOE_TASK_TYPE_WRITE_INITIATOR ?
41 task_params->tx_io_size : task_params->rx_io_size);
42  
43  /* Ystorm ctx */
44  y_st_ctx = >ystorm_st_context;
45  y_st_ctx->data_2_trns_rem = cpu_to_le32(io_size);
46  y_st_ctx->task_rety_identifier = cpu_to_le32(task_retry_id);
47  y_st_ctx->task_type = task_params->task_type;
48  memcpy((void *)_st_ctx->tx_info_union.fcp_cmd_payload,
49 fcp_cmd_payload, sizeof(struct 
fcoe_fcp_cmd_payload));
50  
51  /* Tstorm ctx */
52  t_st_ctx = >tstorm_st_context;
53  t_st_ctx->read_only.dev_type = (task_p

Re: [PATCH 0/4 v2] block: Fixes for bdi handling

2017-03-10 Thread Jan Kara
On Thu 09-03-17 09:41:01, Jens Axboe wrote:
> On 03/09/2017 03:16 AM, Jan Kara wrote:
> > Hi!
> > 
> > this is a second revision of the series fixing the most urgent bugs that 
> > were
> > introduced by commit 165a5e22fafb "block: Move bdi_unregister() to
> > del_gendisk()" and by 0dba1314d4f8 "scsi, block: fix duplicate bdi name
> > registration crashes".  In fact before these commits we had a different set 
> > of
> > problems in the code but they were less visible :).
> 
> It was rather urgent to get those fixes in, so I already sent them off.
> Not a huge deal, but it would be nice to add the atomic init fix as a
> separate patch later on.

OK, actually my followup fixes remove the counter completely so I guess we
can just leave it as is.

Honza
-- 
Jan Kara 
SUSE Labs, CR


Re: [PATCH 1/3] hpsa: update check for logical volume status

2017-03-10 Thread Tomas Henzl
On 6.3.2017 22:24, Don Brace wrote:
>  - Add in a new case for volume offline. Resolves internal
>testing bug for multilun array management.
>  - Return correct status for failed TURs.
>
> Reviewed-by: Scott Benesh 
> Reviewed-by: Scott Teel 
> Signed-off-by: Don Brace 
> ---
>  drivers/scsi/hpsa.c |   26 +-
>  drivers/scsi/hpsa_cmd.h |2 ++
>  2 files changed, 15 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 524a0c7..1adc4ec 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -3735,7 +3735,7 @@ static int hpsa_volume_offline(struct ctlr_info *h,
>   DEFAULT_TIMEOUT);
>   if (rc) {
>   cmd_free(h, c);

Hi Don,
patch is ok, but this function returns a mix of either HPSA_LV_*
values or some magic numbers. 
Could you replace the 0xff with HPSA_VPD_LV_STATUS_UNSUPPORTED
(like it is in hpsa_get_volume_status)
and in case of success return HPSA_LV_OK ?

Also it would make sense to change the return value 
from 'int' to 'unsigned char' and to drop 
this test 
volume_offline = hpsa_volume_offline(h, scsi3addr);
if (volume_offline < 0 || volume_offline > 0xff)
volume_offline = HPSA_VPD_LV_STATUS_UNSUPPORTED;
this_device->volume_offline = volume_offline & 0xff;

from hpsa_update_device_info since the condition is never met.
Switching volume_offline to an unsigned char everywhere might be also possible.

tomash

> - return 0;
> + return 0xff;
>   }
>   sense = c->err_info->SenseInfo;
>   if (c->err_info->SenseLen > sizeof(c->err_info->SenseInfo))
> @@ -3746,19 +3746,13 @@ static int hpsa_volume_offline(struct ctlr_info *h,
>   cmd_status = c->err_info->CommandStatus;
>   scsi_status = c->err_info->ScsiStatus;
>   cmd_free(h, c);
> - /* Is the volume 'not ready'? */
> - if (cmd_status != CMD_TARGET_STATUS ||
> - scsi_status != SAM_STAT_CHECK_CONDITION ||
> - sense_key != NOT_READY ||
> - asc != ASC_LUN_NOT_READY)  {
> - return 0;
> - }
>  
>   /* Determine the reason for not ready state */
>   ldstat = hpsa_get_volume_status(h, scsi3addr);
>  
>   /* Keep volume offline in certain cases: */
>   switch (ldstat) {
> + case HPSA_LV_FAILED:
>   case HPSA_LV_UNDERGOING_ERASE:
>   case HPSA_LV_NOT_AVAILABLE:
>   case HPSA_LV_UNDERGOING_RPI:
> @@ -3853,10 +3847,10 @@ static int hpsa_update_device_info(struct ctlr_info 
> *h,
>   /* Do an inquiry to the device to see what it is. */
>   if (hpsa_scsi_do_inquiry(h, scsi3addr, 0, inq_buff,
>   (unsigned char) OBDR_TAPE_INQ_SIZE) != 0) {
> - /* Inquiry failed (msg printed already) */
>   dev_err(>pdev->dev,
> - "hpsa_update_device_info: inquiry failed\n");
> - rc = -EIO;
> + "%s: inquiry failed, device will be skipped.\n",
> + __func__);
> + rc = HPSA_INQUIRY_FAILED;
>   goto bail_out;
>   }
>  
> @@ -3894,6 +3888,13 @@ static int hpsa_update_device_info(struct ctlr_info *h,
>   if (volume_offline < 0 || volume_offline > 0xff)
>   volume_offline = HPSA_VPD_LV_STATUS_UNSUPPORTED;
>   this_device->volume_offline = volume_offline & 0xff;
> + if (volume_offline == HPSA_LV_FAILED) {
> + rc = HPSA_LV_FAILED;
> + dev_err(>pdev->dev,
> + "%s: LV failed, device will be skipped.\n",
> + __func__);
> + goto bail_out;
> + }
>   } else {
>   this_device->raid_level = RAID_UNKNOWN;
>   this_device->offload_config = 0;
> @@ -4379,8 +4380,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info 
> *h)
>   goto out;
>   }
>   if (rc) {
> - dev_warn(>pdev->dev,
> - "Inquiry failed, skipping device.\n");
> + h->drv_req_rescan = 1;
>   continue;
>   }
>  
> diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h
> index a584cdf..5961705 100644
> --- a/drivers/scsi/hpsa_cmd.h
> +++ b/drivers/scsi/hpsa_cmd.h
> @@ -156,6 +156,7 @@
>  #define CFGTBL_BusType_Fibre2G  0x0200l
>  
>  /* VPD Inquiry types */
> +#define HPSA_INQUIRY_FAILED  0x02
>  #define HPSA_VPD_SUPPORTED_PAGES0x00
>  #define HPSA_VPD_LV_DEVICE_ID   0x83
>  #define HPSA_VPD_LV_DEVICE_GEOMETRY 0xC1
> @@ -166,6 +167,7 @@
>  /* Logical volume states */
>  #define HPSA_VPD_LV_STATUS_UNSUPPORTED   0xff
>  #define HPSA_LV_OK 

Re: [PATCH 2/3] hpsa: limit outstanding rescans

2017-03-10 Thread Tomas Henzl
On 6.3.2017 22:24, Don Brace wrote:
> avoid rescan storms. No need to queue another
> if one is pending.
>
> Reviewed-by: Scott Benesh 
> Reviewed-by: Scott Teel 
> Signed-off-by: Don Brace 
> ---
>  drivers/scsi/hpsa.c |   16 +++-
>  drivers/scsi/hpsa.h |1 +
>  2 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 1adc4ec..a36d3a6 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -5558,7 +5558,7 @@ static void hpsa_scan_complete(struct ctlr_info *h)
>  
>   spin_lock_irqsave(>scan_lock, flags);
>   h->scan_finished = 1;
> - wake_up_all(>scan_wait_queue);
> + wake_up(>scan_wait_queue);
>   spin_unlock_irqrestore(>scan_lock, flags);
>  }
>  
> @@ -5576,11 +5576,23 @@ static void hpsa_scan_start(struct Scsi_Host *sh)
>   if (unlikely(lockup_detected(h)))
>   return hpsa_scan_complete(h);
>  
> + /*
> +  * If a scan is alreay waiting to run, no need to add another
> +  */
> + spin_lock_irqsave(>scan_lock, flags);
> + if (h->scan_waiting) {
> + spin_unlock_irqrestore(>scan_lock, flags);
> + return;
> + }
> +
> + spin_unlock_irqrestore(>scan_lock, flags);
> +
>   /* wait until any scan already in progress is finished. */
>   while (1) {
>   spin_lock_irqsave(>scan_lock, flags);

Placing the test to this place would save few lines
+   if (h->scan_waiting) {
+   spin_unlock_irqrestore(>scan_lock, flags);
+   return
but I agree with your version too.

Reviewed-by: Tomas Henzl 
tomash



Re: [PATCH 3/3] hpsa: do not timeout reset operations

2017-03-10 Thread Tomas Henzl
On 6.3.2017 22:24, Don Brace wrote:
> resets can take longer than DEFAULT_TIMEOUT
>
> Reviewed-by: Scott Benesh 
> Reviewed-by: Scott Teel 
> Signed-off-by: Don Brace 

Reviewed-by: Tomas Henzl 
tomash



RE: [PATCH 1/3] hpsa: update check for logical volume status

2017-03-10 Thread Don Brace

> -Original Message-
> From: Tomas Henzl [mailto:the...@redhat.com]
> Sent: Friday, March 10, 2017 7:24 AM
> To: Don Brace ; joseph.szczy...@hpe.com;
> Gerry Morong ; John Hall
> ; j...@linux.vnet.ibm.com; Kevin Barnett
> ; Mahesh Rajashekhara
> ; Bader Ali - Saleh
> ; h...@infradead.org; Scott Teel
> ; Viswas G ; Justin
> Lindley ; Scott Benesh
> ; posw...@suse.com
> Cc: linux-scsi@vger.kernel.org
> Subject: Re: [PATCH 1/3] hpsa: update check for logical volume status
> 
> EXTERNAL EMAIL
> 
> 
> On 6.3.2017 22:24, Don Brace wrote:
> >  - Add in a new case for volume offline. Resolves internal
> >testing bug for multilun array management.
> >  - Return correct status for failed TURs.
> >
> > Reviewed-by: Scott Benesh 
> > Reviewed-by: Scott Teel 
> > Signed-off-by: Don Brace 
> > ---
> >  drivers/scsi/hpsa.c |   26 +-
> >  drivers/scsi/hpsa_cmd.h |2 ++
> >  2 files changed, 15 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> > index 524a0c7..1adc4ec 100644
> > --- a/drivers/scsi/hpsa.c
> > +++ b/drivers/scsi/hpsa.c
> > @@ -3735,7 +3735,7 @@ static int hpsa_volume_offline(struct ctlr_info
> *h,
> >   DEFAULT_TIMEOUT);
> >   if (rc) {
> >   cmd_free(h, c);
> 
> Hi Don,
> patch is ok, but this function returns a mix of either HPSA_LV_*
> values or some magic numbers.
> Could you replace the 0xff with HPSA_VPD_LV_STATUS_UNSUPPORTED
> (like it is in hpsa_get_volume_status)
> and in case of success return HPSA_LV_OK ?
> 
> Also it would make sense to change the return value
> from 'int' to 'unsigned char' and to drop
> this test
> volume_offline = hpsa_volume_offline(h, scsi3addr);
> if (volume_offline < 0 || volume_offline > 0xff)
> volume_offline = HPSA_VPD_LV_STATUS_UNSUPPORTED;
> this_device->volume_offline = volume_offline & 0xff;
> 
> from hpsa_update_device_info since the condition is never met.
> Switching volume_offline to an unsigned char everywhere might be also
> possible.
> 
> tomash

Agreed, be up in a V2.
And thank-you for your reviews.

Thanks,
Don Brace
ESC - Smart Storage
Microsemi Corporation

> 
> > - return 0;
> > + return 0xff;
> >   }
> >   sense = c->err_info->SenseInfo;
> >   if (c->err_info->SenseLen > sizeof(c->err_info->SenseInfo))
> > @@ -3746,19 +3746,13 @@ static int hpsa_volume_offline(struct
> ctlr_info *h,
> >   cmd_status = c->err_info->CommandStatus;
> >   scsi_status = c->err_info->ScsiStatus;
> >   cmd_free(h, c);
> > - /* Is the volume 'not ready'? */
> > - if (cmd_status != CMD_TARGET_STATUS ||
> > - scsi_status != SAM_STAT_CHECK_CONDITION ||
> > - sense_key != NOT_READY ||
> > - asc != ASC_LUN_NOT_READY)  {
> > - return 0;
> > - }
> >
> >   /* Determine the reason for not ready state */
> >   ldstat = hpsa_get_volume_status(h, scsi3addr);
> >
> >   /* Keep volume offline in certain cases: */
> >   switch (ldstat) {
> > + case HPSA_LV_FAILED:
> >   case HPSA_LV_UNDERGOING_ERASE:
> >   case HPSA_LV_NOT_AVAILABLE:
> >   case HPSA_LV_UNDERGOING_RPI:
> > @@ -3853,10 +3847,10 @@ static int hpsa_update_device_info(struct
> ctlr_info *h,
> >   /* Do an inquiry to the device to see what it is. */
> >   if (hpsa_scsi_do_inquiry(h, scsi3addr, 0, inq_buff,
> >   (unsigned char) OBDR_TAPE_INQ_SIZE) != 0) {
> > - /* Inquiry failed (msg printed already) */
> >   dev_err(>pdev->dev,
> > - "hpsa_update_device_info: inquiry failed\n");
> > - rc = -EIO;
> > + "%s: inquiry failed, device will be skipped.\n",
> > + __func__);
> > + rc = HPSA_INQUIRY_FAILED;
> >   goto bail_out;
> >   }
> >
> > @@ -3894,6 +3888,13 @@ static int hpsa_update_device_info(struct
> ctlr_info *h,
> >   if (volume_offline < 0 || volume_offline > 0xff)
> >   volume_offline = HPSA_VPD_LV_STATUS_UNSUPPORTED;
> >   this_device->volume_offline = volume_offline & 0xff;
> > + if (volume_offline == HPSA_LV_FAILED) {
> > + rc = HPSA_LV_FAILED;
> > + dev_err(>pdev->dev,
> > + "%s: LV failed, device will be skipped.\n",
> > + __func__);
> > + goto bail_out;
> > + }
> >   } else {
> >   

Re: [PATCH 4/4] megaraid_sas: Driver version upgrade

2017-03-10 Thread Tomas Henzl
On 10.3.2017 12:22, Shivasharan S wrote:
> Signed-off-by: Kashyap Desai 
> Signed-off-by: Shivasharan S 

Reviewed-by: Tomas Henzl 
tomash



Re: [PATCH 2/4] megaraid_sas: add correct return type check for ldio hint logic for raid1

2017-03-10 Thread Tomas Henzl
On 10.3.2017 12:22, Shivasharan S wrote:
> Return value check of atomic_dec_if_positive is required as it returns old 
> value minus one.
> Without this fix, driver will send small ios to firmware path and that will 
> be a performance issue.
>
> Not a critical, but good to have r1_ldio_hint as default value in sdev 
> private.
>
> Signed-off-by: Kashyap Desai 
> Signed-off-by: Shivasharan S 

Reviewed-by: Tomas Henzl 
tomash



Re: [PATCH 1/4] megaraid_sas: enable intx only if msix request fails

2017-03-10 Thread Tomas Henzl
On 10.3.2017 12:22, Shivasharan S wrote:
> Without this fix, driver will enable INTx Interrupt pin even though
> MSI-x vectors are enabled. See below lspci output. DisINTx is unset
> for MSIx setup.
>
> lspci -s 85:00.0 -vvv |grep INT |grep Control
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
>
> After applying this fix, driver will enable INTx Interrupt pin only
> if Legacy interrupt method is required.
> See below lspci output. DisINTx is set for MSIx setup.
> lspci -s 85:00.0 -vvv |grep INT |grep Control
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx+
>
> Signed-off-by: Kashyap Desai 

Reviewed-by: Tomas Henzl 
tomash



Re: [PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5

2017-03-10 Thread Tomas Henzl
On 10.3.2017 12:22, Shivasharan S wrote:
> Without this fix, raid6 performance will not be an optimal.
>
> Signed-off-by: Kashyap Desai 
> Signed-off-by: Shivasharan S 

Reviewed-by: Tomas Henzl 
tomash



[PATCH V2 0/3] hpsa updates

2017-03-10 Thread Don Brace
These patches are based on Linus's tree

The changes are:
 - add in a new offline volume status
 - limit the number of outstanding rescan operation
 - do not timeout reset operations

Changes since V1:
 - hpsa-update-check-for-volume-status
   - changed return type of hpsa_volume_offline from
 int to unsigned char
   - return more specific values.
   - removed unnecessary code
   Based on review from: Tomas Henzl 

---

Don Brace (3):
  hpsa: update check for logical volume status
  hpsa: limit outstanding rescans
  hpsa: do not timeout reset operations


 drivers/scsi/hpsa.c |   53 ---
 drivers/scsi/hpsa.h |1 +
 drivers/scsi/hpsa_cmd.h |2 ++
 3 files changed, 35 insertions(+), 21 deletions(-)

--
Signature


[PATCH V2 3/3] hpsa: do not timeout reset operations

2017-03-10 Thread Don Brace
resets can take longer than DEFAULT_TIMEOUT

Reviewed-by: Scott Benesh 
Reviewed-by: Scott Teel 
Reviewed-by: Tomas Henzl  review
Signed-off-by: Don Brace 
---
 drivers/scsi/hpsa.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index e4f57b8..ba725be 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2956,7 +2956,7 @@ static int hpsa_send_reset(struct ctlr_info *h, unsigned 
char *scsi3addr,
/* fill_cmd can't fail here, no data buffer to map. */
(void) fill_cmd(c, reset_type, h, NULL, 0, 0,
scsi3addr, TYPE_MSG);
-   rc = hpsa_scsi_do_simple_cmd(h, c, reply_queue, DEFAULT_TIMEOUT);
+   rc = hpsa_scsi_do_simple_cmd(h, c, reply_queue, NO_TIMEOUT);
if (rc) {
dev_warn(>pdev->dev, "Failed to send reset command\n");
goto out;



[PATCH V2 2/3] hpsa: limit outstanding rescans

2017-03-10 Thread Don Brace
avoid rescan storms. No need to queue another
if one is pending.

Reviewed-by: Scott Benesh 
Reviewed-by: Scott Teel 
Reviewed-by: Tomas Henzl  review
Signed-off-by: Don Brace 
---
 drivers/scsi/hpsa.c |   16 +++-
 drivers/scsi/hpsa.h |1 +
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 90b76c4..e4f57b8 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -,7 +,7 @@ static void hpsa_scan_complete(struct ctlr_info *h)
 
spin_lock_irqsave(>scan_lock, flags);
h->scan_finished = 1;
-   wake_up_all(>scan_wait_queue);
+   wake_up(>scan_wait_queue);
spin_unlock_irqrestore(>scan_lock, flags);
 }
 
@@ -5573,11 +5573,23 @@ static void hpsa_scan_start(struct Scsi_Host *sh)
if (unlikely(lockup_detected(h)))
return hpsa_scan_complete(h);
 
+   /*
+* If a scan is alreay waiting to run, no need to add another
+*/
+   spin_lock_irqsave(>scan_lock, flags);
+   if (h->scan_waiting) {
+   spin_unlock_irqrestore(>scan_lock, flags);
+   return;
+   }
+
+   spin_unlock_irqrestore(>scan_lock, flags);
+
/* wait until any scan already in progress is finished. */
while (1) {
spin_lock_irqsave(>scan_lock, flags);
if (h->scan_finished)
break;
+   h->scan_waiting = 1;
spin_unlock_irqrestore(>scan_lock, flags);
wait_event(h->scan_wait_queue, h->scan_finished);
/* Note: We don't need to worry about a race between this
@@ -5587,6 +5599,7 @@ static void hpsa_scan_start(struct Scsi_Host *sh)
 */
}
h->scan_finished = 0; /* mark scan as in progress */
+   h->scan_waiting = 0;
spin_unlock_irqrestore(>scan_lock, flags);
 
if (unlikely(lockup_detected(h)))
@@ -8789,6 +8802,7 @@ static int hpsa_init_one(struct pci_dev *pdev, const 
struct pci_device_id *ent)
init_waitqueue_head(>event_sync_wait_queue);
mutex_init(>reset_mutex);
h->scan_finished = 1; /* no scan currently in progress */
+   h->scan_waiting = 0;
 
pci_set_drvdata(pdev, h);
h->ndevices = 0;
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
index bf6cdc1..6f04f2a 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -201,6 +201,7 @@ struct ctlr_info {
dma_addr_t  errinfo_pool_dhandle;
unsigned long   *cmd_pool_bits;
int scan_finished;
+   u8  scan_waiting : 1;
spinlock_t  scan_lock;
wait_queue_head_t   scan_wait_queue;
 



[PATCH V2 1/3] hpsa: update check for logical volume status

2017-03-10 Thread Don Brace
 - Add in a new case for volume offline. Resolves internal
   testing bug for multilun array management.
 - Return correct status for failed TURs.

Reviewed-by: Scott Benesh 
Reviewed-by: Scott Teel 
Signed-off-by: Don Brace 
---
 drivers/scsi/hpsa.c |   35 ---
 drivers/scsi/hpsa_cmd.h |2 ++
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 524a0c7..90b76c4 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3714,7 +3714,7 @@ static int hpsa_get_volume_status(struct ctlr_info *h,
  *  # (integer code indicating one of several NOT READY states
  * describing why a volume is to be kept offline)
  */
-static int hpsa_volume_offline(struct ctlr_info *h,
+static unsigned char hpsa_volume_offline(struct ctlr_info *h,
unsigned char scsi3addr[])
 {
struct CommandList *c;
@@ -3735,7 +3735,7 @@ static int hpsa_volume_offline(struct ctlr_info *h,
DEFAULT_TIMEOUT);
if (rc) {
cmd_free(h, c);
-   return 0;
+   return HPSA_VPD_LV_STATUS_UNSUPPORTED;
}
sense = c->err_info->SenseInfo;
if (c->err_info->SenseLen > sizeof(c->err_info->SenseInfo))
@@ -3746,19 +3746,13 @@ static int hpsa_volume_offline(struct ctlr_info *h,
cmd_status = c->err_info->CommandStatus;
scsi_status = c->err_info->ScsiStatus;
cmd_free(h, c);
-   /* Is the volume 'not ready'? */
-   if (cmd_status != CMD_TARGET_STATUS ||
-   scsi_status != SAM_STAT_CHECK_CONDITION ||
-   sense_key != NOT_READY ||
-   asc != ASC_LUN_NOT_READY)  {
-   return 0;
-   }
 
/* Determine the reason for not ready state */
ldstat = hpsa_get_volume_status(h, scsi3addr);
 
/* Keep volume offline in certain cases: */
switch (ldstat) {
+   case HPSA_LV_FAILED:
case HPSA_LV_UNDERGOING_ERASE:
case HPSA_LV_NOT_AVAILABLE:
case HPSA_LV_UNDERGOING_RPI:
@@ -3780,7 +3774,7 @@ static int hpsa_volume_offline(struct ctlr_info *h,
default:
break;
}
-   return 0;
+   return HPSA_LV_OK;
 }
 
 /*
@@ -3853,10 +3847,10 @@ static int hpsa_update_device_info(struct ctlr_info *h,
/* Do an inquiry to the device to see what it is. */
if (hpsa_scsi_do_inquiry(h, scsi3addr, 0, inq_buff,
(unsigned char) OBDR_TAPE_INQ_SIZE) != 0) {
-   /* Inquiry failed (msg printed already) */
dev_err(>pdev->dev,
-   "hpsa_update_device_info: inquiry failed\n");
-   rc = -EIO;
+   "%s: inquiry failed, device will be skipped.\n",
+   __func__);
+   rc = HPSA_INQUIRY_FAILED;
goto bail_out;
}
 
@@ -3885,15 +3879,19 @@ static int hpsa_update_device_info(struct ctlr_info *h,
if ((this_device->devtype == TYPE_DISK ||
this_device->devtype == TYPE_ZBC) &&
is_logical_dev_addr_mode(scsi3addr)) {
-   int volume_offline;
+   unsigned char volume_offline;
 
hpsa_get_raid_level(h, scsi3addr, _device->raid_level);
if (h->fw_support & MISC_FW_RAID_OFFLOAD_BASIC)
hpsa_get_ioaccel_status(h, scsi3addr, this_device);
volume_offline = hpsa_volume_offline(h, scsi3addr);
-   if (volume_offline < 0 || volume_offline > 0xff)
-   volume_offline = HPSA_VPD_LV_STATUS_UNSUPPORTED;
-   this_device->volume_offline = volume_offline & 0xff;
+   if (volume_offline == HPSA_LV_FAILED) {
+   rc = HPSA_LV_FAILED;
+   dev_err(>pdev->dev,
+   "%s: LV failed, device will be skipped.\n",
+   __func__);
+   goto bail_out;
+   }
} else {
this_device->raid_level = RAID_UNKNOWN;
this_device->offload_config = 0;
@@ -4379,8 +4377,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
goto out;
}
if (rc) {
-   dev_warn(>pdev->dev,
-   "Inquiry failed, skipping device.\n");
+   h->drv_req_rescan = 1;
continue;
}
 
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h
index a584cdf..5961705 100644
--- a/drivers/scsi/hpsa_cmd.h
+++ b/drivers/scsi/hpsa_cmd.h
@@ -156,6 +156,7 @@
 #define CFGTBL_BusType_Fibre2G  0x0200l
 
 /* VPD Inquiry types */
+#define HPSA_INQUIRY_FAILED0x02
 #define HPSA_VPD_SUPPORTED_PAGES0x00
 #define 

[PATCH V3 3/3] hpsa: do not timeout reset operations

2017-03-10 Thread Don Brace
resets can take longer than DEFAULT_TIMEOUT

Reviewed-by: Scott Benesh 
Reviewed-by: Scott Teel 
Reviewed-by: Tomas Henzl  review
Signed-off-by: Don Brace 
---
 drivers/scsi/hpsa.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 0a8ac68..0d0be77 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2956,7 +2956,7 @@ static int hpsa_send_reset(struct ctlr_info *h, unsigned 
char *scsi3addr,
/* fill_cmd can't fail here, no data buffer to map. */
(void) fill_cmd(c, reset_type, h, NULL, 0, 0,
scsi3addr, TYPE_MSG);
-   rc = hpsa_scsi_do_simple_cmd(h, c, reply_queue, DEFAULT_TIMEOUT);
+   rc = hpsa_scsi_do_simple_cmd(h, c, reply_queue, NO_TIMEOUT);
if (rc) {
dev_warn(>pdev->dev, "Failed to send reset command\n");
goto out;



[PATCH V3 1/3] hpsa: update check for logical volume status

2017-03-10 Thread Don Brace
 - Add in a new case for volume offline. Resolves internal
   testing bug for multilun array management.
 - Return correct status for failed TURs.

Reviewed-by: Scott Benesh 
Reviewed-by: Scott Teel 
Signed-off-by: Don Brace 
---
 drivers/scsi/hpsa.c |   35 ---
 drivers/scsi/hpsa_cmd.h |2 ++
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 524a0c7..90b76c4 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3714,7 +3714,7 @@ static int hpsa_get_volume_status(struct ctlr_info *h,
  *  # (integer code indicating one of several NOT READY states
  * describing why a volume is to be kept offline)
  */
-static int hpsa_volume_offline(struct ctlr_info *h,
+static unsigned char hpsa_volume_offline(struct ctlr_info *h,
unsigned char scsi3addr[])
 {
struct CommandList *c;
@@ -3735,7 +3735,7 @@ static int hpsa_volume_offline(struct ctlr_info *h,
DEFAULT_TIMEOUT);
if (rc) {
cmd_free(h, c);
-   return 0;
+   return HPSA_VPD_LV_STATUS_UNSUPPORTED;
}
sense = c->err_info->SenseInfo;
if (c->err_info->SenseLen > sizeof(c->err_info->SenseInfo))
@@ -3746,19 +3746,13 @@ static int hpsa_volume_offline(struct ctlr_info *h,
cmd_status = c->err_info->CommandStatus;
scsi_status = c->err_info->ScsiStatus;
cmd_free(h, c);
-   /* Is the volume 'not ready'? */
-   if (cmd_status != CMD_TARGET_STATUS ||
-   scsi_status != SAM_STAT_CHECK_CONDITION ||
-   sense_key != NOT_READY ||
-   asc != ASC_LUN_NOT_READY)  {
-   return 0;
-   }
 
/* Determine the reason for not ready state */
ldstat = hpsa_get_volume_status(h, scsi3addr);
 
/* Keep volume offline in certain cases: */
switch (ldstat) {
+   case HPSA_LV_FAILED:
case HPSA_LV_UNDERGOING_ERASE:
case HPSA_LV_NOT_AVAILABLE:
case HPSA_LV_UNDERGOING_RPI:
@@ -3780,7 +3774,7 @@ static int hpsa_volume_offline(struct ctlr_info *h,
default:
break;
}
-   return 0;
+   return HPSA_LV_OK;
 }
 
 /*
@@ -3853,10 +3847,10 @@ static int hpsa_update_device_info(struct ctlr_info *h,
/* Do an inquiry to the device to see what it is. */
if (hpsa_scsi_do_inquiry(h, scsi3addr, 0, inq_buff,
(unsigned char) OBDR_TAPE_INQ_SIZE) != 0) {
-   /* Inquiry failed (msg printed already) */
dev_err(>pdev->dev,
-   "hpsa_update_device_info: inquiry failed\n");
-   rc = -EIO;
+   "%s: inquiry failed, device will be skipped.\n",
+   __func__);
+   rc = HPSA_INQUIRY_FAILED;
goto bail_out;
}
 
@@ -3885,15 +3879,19 @@ static int hpsa_update_device_info(struct ctlr_info *h,
if ((this_device->devtype == TYPE_DISK ||
this_device->devtype == TYPE_ZBC) &&
is_logical_dev_addr_mode(scsi3addr)) {
-   int volume_offline;
+   unsigned char volume_offline;
 
hpsa_get_raid_level(h, scsi3addr, _device->raid_level);
if (h->fw_support & MISC_FW_RAID_OFFLOAD_BASIC)
hpsa_get_ioaccel_status(h, scsi3addr, this_device);
volume_offline = hpsa_volume_offline(h, scsi3addr);
-   if (volume_offline < 0 || volume_offline > 0xff)
-   volume_offline = HPSA_VPD_LV_STATUS_UNSUPPORTED;
-   this_device->volume_offline = volume_offline & 0xff;
+   if (volume_offline == HPSA_LV_FAILED) {
+   rc = HPSA_LV_FAILED;
+   dev_err(>pdev->dev,
+   "%s: LV failed, device will be skipped.\n",
+   __func__);
+   goto bail_out;
+   }
} else {
this_device->raid_level = RAID_UNKNOWN;
this_device->offload_config = 0;
@@ -4379,8 +4377,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
goto out;
}
if (rc) {
-   dev_warn(>pdev->dev,
-   "Inquiry failed, skipping device.\n");
+   h->drv_req_rescan = 1;
continue;
}
 
diff --git a/drivers/scsi/hpsa_cmd.h b/drivers/scsi/hpsa_cmd.h
index a584cdf..5961705 100644
--- a/drivers/scsi/hpsa_cmd.h
+++ b/drivers/scsi/hpsa_cmd.h
@@ -156,6 +156,7 @@
 #define CFGTBL_BusType_Fibre2G  0x0200l
 
 /* VPD Inquiry types */
+#define HPSA_INQUIRY_FAILED0x02
 #define HPSA_VPD_SUPPORTED_PAGES0x00
 #define 

[PATCH V3 0/3] hpsa updates

2017-03-10 Thread Don Brace
These patches are based on Linus's tree

The changes are:
 - add in a new offline volume status
 - limit the number of outstanding rescan operation
 - do not timeout reset operations

Changes since V1:
 - hpsa-update-check-for-volume-status
   - changed return type of hpsa_volume_offline from
 int to unsigned char
   - return more specific values.
   - removed unnecessary code
   Based on review from: Tomas Henzl 

Changes since V2:
 - hpsa-limit-outstanding-rescans
   corrected a comment typo (alreay - already)

---

Don Brace (3):
  hpsa: update check for logical volume status
  hpsa: limit outstanding rescans
  hpsa: do not timeout reset operations


 drivers/scsi/hpsa.c |   53 ---
 drivers/scsi/hpsa.h |1 +
 drivers/scsi/hpsa_cmd.h |2 ++
 3 files changed, 35 insertions(+), 21 deletions(-)

--
Signature


[PATCH V3 2/3] hpsa: limit outstanding rescans

2017-03-10 Thread Don Brace
avoid rescan storms. No need to queue another
if one is pending.

Reviewed-by: Scott Benesh 
Reviewed-by: Scott Teel 
Reviewed-by: Tomas Henzl  review
Signed-off-by: Don Brace 
---
 drivers/scsi/hpsa.c |   16 +++-
 drivers/scsi/hpsa.h |1 +
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 90b76c4..0a8ac68 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -,7 +,7 @@ static void hpsa_scan_complete(struct ctlr_info *h)
 
spin_lock_irqsave(>scan_lock, flags);
h->scan_finished = 1;
-   wake_up_all(>scan_wait_queue);
+   wake_up(>scan_wait_queue);
spin_unlock_irqrestore(>scan_lock, flags);
 }
 
@@ -5573,11 +5573,23 @@ static void hpsa_scan_start(struct Scsi_Host *sh)
if (unlikely(lockup_detected(h)))
return hpsa_scan_complete(h);
 
+   /*
+* If a scan is already waiting to run, no need to add another
+*/
+   spin_lock_irqsave(>scan_lock, flags);
+   if (h->scan_waiting) {
+   spin_unlock_irqrestore(>scan_lock, flags);
+   return;
+   }
+
+   spin_unlock_irqrestore(>scan_lock, flags);
+
/* wait until any scan already in progress is finished. */
while (1) {
spin_lock_irqsave(>scan_lock, flags);
if (h->scan_finished)
break;
+   h->scan_waiting = 1;
spin_unlock_irqrestore(>scan_lock, flags);
wait_event(h->scan_wait_queue, h->scan_finished);
/* Note: We don't need to worry about a race between this
@@ -5587,6 +5599,7 @@ static void hpsa_scan_start(struct Scsi_Host *sh)
 */
}
h->scan_finished = 0; /* mark scan as in progress */
+   h->scan_waiting = 0;
spin_unlock_irqrestore(>scan_lock, flags);
 
if (unlikely(lockup_detected(h)))
@@ -8789,6 +8802,7 @@ static int hpsa_init_one(struct pci_dev *pdev, const 
struct pci_device_id *ent)
init_waitqueue_head(>event_sync_wait_queue);
mutex_init(>reset_mutex);
h->scan_finished = 1; /* no scan currently in progress */
+   h->scan_waiting = 0;
 
pci_set_drvdata(pdev, h);
h->ndevices = 0;
diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h
index bf6cdc1..6f04f2a 100644
--- a/drivers/scsi/hpsa.h
+++ b/drivers/scsi/hpsa.h
@@ -201,6 +201,7 @@ struct ctlr_info {
dma_addr_t  errinfo_pool_dhandle;
unsigned long   *cmd_pool_bits;
int scan_finished;
+   u8  scan_waiting : 1;
spinlock_t  scan_lock;
wait_queue_head_t   scan_wait_queue;
 



Re: [LFS/MM TOPIC][LFS/MM ATTEND]: - Storage Stack and Driver Testing methodology.

2017-03-10 Thread Bart Van Assche
On Tue, 2017-01-10 at 22:40 +, Chaitanya Kulkarni wrote:
> Participants:-
> --
> I'd like to invite developers from different subsystems to discuss an 
> approach towards 
> a unified testing methodology for storage stack and device drivers belongs to 
> different subsystems.
> 
> Topics for Discussion:-
> --
> As a part of discussion following are some of the key points which we can 
> focus on:-
> 1. What are the common components of the kernel used by the various 
> subsystems?
> 2. What are the potential target drivers which can benefit from this 
> approach? 
>   (e.g. NVMe, NVMe Over Fabric, Open Channel Solid State Drives etc.)
> 3. What are the desired features that can be implemented in this Framework?
>   (code coverage, unit tests, stress testings, regression, generating 
> Coccinelle reports etc.) 
> 4. Desirable Report generation mechanism?
> 5. Basic performance validation?
> 6. Whether QEMU can be used to emulate some of the H/W functionality to 
> create a test 
>   platform? (Optional subsystem specific)

Regarding existing test software: the SRP test software is a thorough test of
the Linux block layer, SCSI core, dm-mpath driver, dm core, SRP initiator and
target drivers and also of the asynchronous I/O subsystem. This test suite
includes experimental support for the NVMeOF drivers. This test suite supports
the rdma_rxe driver which means that an Ethernet adapter is sufficient to run
these tests.

Note: the focus of this test suite is the regular I/O path and device removal.
This test suite neither replaces the libiscsi tests nor xfstests.

See also https://github.com/bvanassche/srp-test.

Bart.

RE

2017-03-10 Thread Aleena Aasim Abdulaziz




Assalam Alaikum, how are you doing my friend? my name is Madam Aleena  
Aasim Abdulaziz from Turkey and i have something very important to  
discuss with you please contact me now on my private email:  
aleen@hotmail.com




[PATCH 0/4] megaraid_sas: Bug fixes and improvements for 4.11-rc

2017-03-10 Thread Shivasharan S
This patchset fixes few issues introduced during previous set of
patch submissions for 4.11

Shivasharan S (4):
  megaraid_sas: enable intx only if msix request fails
  megaraid_sas: add correct return type check for ldio hint logic for
raid1
  megaraid_sas: raid6 also require cpuSel check same as raid5
  megaraid_sas: Driver version upgrade

 drivers/scsi/megaraid/megaraid_sas.h|  4 ++--
 drivers/scsi/megaraid/megaraid_sas_base.c   | 17 -
 drivers/scsi/megaraid/megaraid_sas_fusion.c |  4 ++--
 3 files changed, 16 insertions(+), 9 deletions(-)

-- 
2.8.3



[PATCH 1/4] megaraid_sas: enable intx only if msix request fails

2017-03-10 Thread Shivasharan S
Without this fix, driver will enable INTx Interrupt pin even though
MSI-x vectors are enabled. See below lspci output. DisINTx is unset
for MSIx setup.

lspci -s 85:00.0 -vvv |grep INT |grep Control
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx-

After applying this fix, driver will enable INTx Interrupt pin only
if Legacy interrupt method is required.
See below lspci output. DisINTx is set for MSIx setup.
lspci -s 85:00.0 -vvv |grep INT |grep Control
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx+

Signed-off-by: Kashyap Desai 
---
V2 changes - As Christoph Hellwig suggested, use pci_alloc_irq_vectors
with PCI_IRQ_LEGACY flag in place of pci_intx().

 drivers/scsi/megaraid/megaraid_sas_base.c | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c 
b/drivers/scsi/megaraid/megaraid_sas_base.c
index 7ac9a9e..016ffce 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -5034,10 +5034,12 @@ megasas_setup_irqs_msix(struct megasas_instance 
*instance, u8 is_probe)
 >irq_context[j]);
/* Retry irq register for IO_APIC*/
instance->msix_vectors = 0;
-   if (is_probe)
+   if (is_probe) {
+   pci_free_irq_vectors(instance->pdev);
return megasas_setup_irqs_ioapic(instance);
-   else
+   } else {
return -1;
+   }
}
}
return 0;
@@ -5277,9 +5279,11 @@ static int megasas_init_fw(struct megasas_instance 
*instance)
MPI2_REPLY_POST_HOST_INDEX_OFFSET);
}
 
-   i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_LEGACY);
-   if (i < 0)
-   goto fail_setup_irqs;
+   if (!instance->msix_vectors) {
+   i = pci_alloc_irq_vectors(instance->pdev, 1, 1, PCI_IRQ_LEGACY);
+   if (i < 0)
+   goto fail_setup_irqs;
+   }
 
dev_info(>pdev->dev,
"firmware supports msix\t: (%d)", fw_msix_count);
-- 
2.8.3



[PATCH 3/4] megaraid_sas: raid6 also require cpuSel check same as raid5

2017-03-10 Thread Shivasharan S
Without this fix, raid6 performance will not be an optimal.

Signed-off-by: Kashyap Desai 
Signed-off-by: Shivasharan S 
---
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c 
b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index ebd746e..f990ab4d 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -2159,7 +2159,7 @@ megasas_set_raidflag_cpu_affinity(union 
RAID_CONTEXT_UNION *praid_context,
cpu_sel = MR_RAID_CTX_CPUSEL_1;
 
if (is_stream_detected(rctx_g35) &&
-   (raid->level == 5) &&
+   ((raid->level == 5) || (raid->level == 6)) &&
(raid->writeMode == MR_RL_WRITE_THROUGH_MODE) &&
(cpu_sel == MR_RAID_CTX_CPUSEL_FCFS))
cpu_sel = MR_RAID_CTX_CPUSEL_0;
-- 
2.8.3



[PATCH 4/4] megaraid_sas: Driver version upgrade

2017-03-10 Thread Shivasharan S
Signed-off-by: Kashyap Desai 
Signed-off-by: Shivasharan S 
---
 drivers/scsi/megaraid/megaraid_sas.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas.h 
b/drivers/scsi/megaraid/megaraid_sas.h
index e7e5974..2b209bb 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -35,8 +35,8 @@
 /*
  * MegaRAID SAS Driver meta data
  */
-#define MEGASAS_VERSION"07.701.16.00-rc1"
-#define MEGASAS_RELDATE"February 2, 2017"
+#define MEGASAS_VERSION"07.701.17.00-rc1"
+#define MEGASAS_RELDATE"March 2, 2017"
 
 /*
  * Device IDs
-- 
2.8.3



Re: [PATCH v5 01/19] block: DAC960: Replace PCI pool old API

2017-03-10 Thread kbuild test robot
Hi Romain,

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v4.11-rc1 next-20170310]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Romain-Perier/Replace-PCI-pool-by-DMA-pool-API/20170311-133849
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next


coccinelle warnings: (new ones prefixed by >>)

>> drivers/block/DAC960.c:441:3-19: WARNING: NULL check before freeing 
>> functions like kfree, debugfs_remove, debugfs_remove_recursive or 
>> usb_free_urb is not needed. Maybe consider reorganizing relevant code to 
>> avoid passing NULL values.
   drivers/block/DAC960.c:446:1-17: WARNING: NULL check before freeing 
functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb 
is not needed. Maybe consider reorganizing relevant code to avoid passing NULL 
values.

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


[PATCH] block: DAC960: fix ifnullfree.cocci warnings

2017-03-10 Thread kbuild test robot
drivers/block/DAC960.c:441:3-19: WARNING: NULL check before freeing functions 
like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not 
needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
drivers/block/DAC960.c:446:1-17: WARNING: NULL check before freeing functions 
like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not 
needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

CC: Romain Perier 
Signed-off-by: Fengguang Wu 
---

 DAC960.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -437,13 +437,11 @@ static void DAC960_DestroyAuxiliaryStruc
   Controller->CurrentStatusBuffer = NULL;
 }
 
-  if (ScatterGatherPool != NULL)
-   dma_pool_destroy(ScatterGatherPool);
+  dma_pool_destroy(ScatterGatherPool);
   if (Controller->FirmwareType == DAC960_V1_Controller)
return;
 
-  if (RequestSensePool != NULL)
-   dma_pool_destroy(RequestSensePool);
+  dma_pool_destroy(RequestSensePool);
 
   for (i = 0; i < DAC960_MaxLogicalDrives; i++) {
kfree(Controller->V2.LogicalDeviceInformation[i]);