[PATCH] cxlflash: return -EFAULT if copy_from_user() fails

2017-06-30 Thread Dan Carpenter
The copy_from/to_user() functions return the number of bytes remaining to be copied but we had intended to return -EFAULT here. Fixes: bc88ac47d5cb ("scsi: cxlflash: Support AFU debug") Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/cxlflash/main.c

[PATCH] tcmu: Fix flushing cmd entry dcache page

2017-06-30 Thread lixiubo
From: Xiubo Li When feeding the tcmu's cmd ring, we need to flush the dcache page for the cmd entry to make sure these kernel stores are visible to user space mappings of that page. For the none PAD cmd entry, this will be flushed at the end of the

[PATCH 1/2] scsi: lpfc: spin_lock_irq() is not nestable

2017-06-30 Thread Dan Carpenter
We're calling spin_lock_irq() multiple times, the problem is that on the first spin_unlock_irq() then we will re-enable IRQs and we don't want that. Fixes: 966bb5b71196 ("scsi: lpfc: Break up IO ctx list into a separate get and put list") Signed-off-by: Dan Carpenter

[PATCH 2/2] scsi: lpfc: don't double count abort errors

2017-06-30 Thread Dan Carpenter
If lpfc_nvmet_unsol_fcp_issue_abort() fails then we accidentally increment "tgtp->xmt_abort_rsp_error" and then two lines later we increment it a second time. Fixes: 547077a44b3b ("scsi: lpfc: Adding additional stats counters for nvme.") Signed-off-by: Dan Carpenter

[PATCH 03/15] megaraid_sas: Use synchronize_irq in target reset case

2017-06-30 Thread Shivasharan S
Similar to task abort case, use synchronize_irq API in target reset case. Also, remove redundant call to megasas_complete_cmd_dpc_fusion after calling megasas_sync_irqs in task abort case. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S

[PATCH 10/15] megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead

2017-06-30 Thread Shivasharan S
Fix - After a kill adapter, since the cmd_status is not set the IOCTLs will be hung in driver resulting in application hang. Set cmd_status MFI_STAT_WRONG_STATE when completing pended IOCTLs. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S

[PATCH 05/15] megaraid_sas: Do not re-fire shutdown DCMD after OCR

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c

[PATCH 00/15] megaraid_sas: Updates for scsi-next

2017-06-30 Thread Shivasharan S
Shivasharan S (15): megaraid_sas: mismatch of allocated MFI frame size and length exposed in MFI MPT pass through command megaraid_sas: set minimum value of resetwaittime to be 1 secs megaraid_sas: Use synchronize_irq in target reset case megaraid_sas: Call

[PATCH 09/15] megaraid_sas: use vmalloc for crash dump buffers and driver's local RAID map

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 1 - drivers/scsi/megaraid/megaraid_sas_base.c | 12 ++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 113

[PATCH 15/15] megaraid_sas: driver version upgrade

2017-06-30 Thread Shivasharan S
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 6d9f111..a6722c9 100644 ---

[PATCH 01/15] megaraid_sas: mismatch of allocated MFI frame size and length exposed in MFI MPT pass through command

2017-06-30 Thread Shivasharan S
Fix - Driver allocated 256 byte MFI frames bytes but while sending MFI frame (embedded inside chain frame of MPT frame) to firmware, driver sets the length as 4k. This results in DMA read error messages during boot. Signed-off-by: Kashyap Desai Signed-off-by:

[PATCH 04/15] megaraid_sas: Call megasas_complete_cmd_dpc_fusion every 1 second while there are pending commands

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c

[PATCH 11/15] megaraid_sas: Set device queue_depth same as HBA can_queue value in scsi-mq mode

2017-06-30 Thread Shivasharan S
Currently driver sets default queue_depth for VDs at 256 and JBODs based on interface type, ie., for SAS JBOD QD will be 64, for SATA JBOD QD will be 32. During performance runs with scsi-mq enabled, we are seeing better results by setting QD same as HBA queue_depth. Signed-off-by: Kashyap Desai

[PATCH 14/15] megaraid_sas: call megasas_dump_frame with correct IO frame size

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c

[PATCH 13/15] megaraid_sas: modified few prints in OCR and IOC INIT path

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git

[PATCH 12/15] megaraid_sas: replace internal FALSE/TRUE definitions with false/true

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fp.c | 40 + 1 file changed, 15 insertions(+), 25 deletions(-) diff --git

[PATCH 02/15] megaraid_sas: set minimum value of resetwaittime to be 1 secs

2017-06-30 Thread Shivasharan S
Setting resetwaittime to 0 will result in driver not calling the OCR during a FW fault state. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: sta...@vger.kernel.org --- drivers/scsi/megaraid/megaraid_sas_base.c

[PATCH 06/15] megaraid_sas: Fix endianness issues in DCMD handling

2017-06-30 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c

Re: [PATCH 04/47] aacraid: use aac_tmf_callback for reset fib

2017-06-30 Thread Hannes Reinecke
On 06/29/2017 10:06 PM, Raghava Aditya Renukunta wrote: > [.] >> @@ -879,8 +906,12 @@ static int aac_eh_dev_reset(struct scsi_cmnd *cmd) > [..] >> bus = aac_logical_to_phys(scmd_channel(cmd)); >> cid = scmd_id(cmd); >> + info = >hba_map[bus][cid]; >> if (bus

Re: [PATCH v5 0/6] g_NCR5380: PDMA fixes and cleanup

2017-06-30 Thread Finn Thain
On Thu, 29 Jun 2017, Ondrej Zary wrote: > The write corruption is still there. I'm afraid it can't be fixed > without rolling "start" back (or inceasing residual) if an error > occured, something like this: > > --- a/drivers/scsi/g_NCR5380.c > +++ b/drivers/scsi/g_NCR5380.c > @@ -619,6 +621,9

Re: [PATCH v4 0/5] tcmu: Add Type of reconfig into netlink

2017-06-30 Thread Nicholas A. Bellinger
Hey MNC, On Mon, 2017-06-12 at 01:43 -0500, Mike Christie wrote: > On 06/11/2017 04:02 PM, Mike Christie wrote: > > On 06/09/2017 01:11 AM, Nicholas A. Bellinger wrote: > >> Hi Bryant & Co, > >> > >> On Tue, 2017-06-06 at 09:28 -0500, Bryant G. Ly wrote: > >>> From: "Bryant G. Ly"

[PATCH 07/15] megaraid_sas: Check valid aen class range to avoid kernel panic

2017-06-30 Thread Shivasharan S
An application sending out of range AEN class code for registration, will result in kernel panic in MR driver. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Cc: sta...@vger.kernel.org ---

[PATCH 08/15] megaraid_sas: Use SMID for Task abort case only

2017-06-30 Thread Shivasharan S
Fix - In TM code, smid_task is valid only in case of task aborts. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 2/2] megaraid: drop the 'new driver' statements

2017-06-30 Thread Hannes Reinecke
This driver is hardly new; it has been supersede by at least four other generations of megaraid RAID HBAs. Signed-off-by: Hannes Reinecke --- drivers/scsi/megaraid/Kconfig.megaraid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 0/2] Drop legacy megaraid implementation

2017-06-30 Thread Hannes Reinecke
The legacy megaraid implementation is ancient, and support for most boards has been moved to megaraid_mm anyway. So drop the legacy implementation. And do not refer to 'megaraid_mm' as a 'new driver'; it's close to be obsoleted itself. Hannes Reinecke (2): Drop legacy megaraid controller

[PATCH 1/2] Drop legacy megaraid controller

2017-06-30 Thread Hannes Reinecke
The hardware is ancient, and support for most cards has been moved to megaraid_mbox. So drop it. Signed-off-by: Hannes Reinecke --- MAINTAINERS|1 - drivers/scsi/Makefile |1 - drivers/scsi/megaraid.c| 4730

[PATCH] scsi: snic: fix a couple of spelling mistakes/typos

2017-06-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes/typos: "Allodating" -> "Allocating" "incative" -> "inactive" Signed-off-by: Colin Ian King --- drivers/scsi/snic/snic_isr.c | 4 ++-- drivers/scsi/snic/snic_scsi.c | 2 +- 2 files

NAK: [PATCH] scsi: snic: fix a couple of spelling mistakes/typos

2017-06-30 Thread Colin Ian King
Incorrect commit message, I'll resend. On 30/06/17 14:54, Colin King wrote: > From: Colin Ian King > > Trivial fix to spelling mistakes/typos: > > "Allodating" -> "Allocating" > "incative" -> "inactive" > > Signed-off-by: Colin Ian King >

[PATCH][V2] scsi: snic: fix a couple of spelling mistakes/typos

2017-06-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes/typos: "requrest_irq" -> "request_irq" "Firmwqre" -> "Firmware" Signed-off-by: Colin Ian King --- drivers/scsi/snic/snic_isr.c | 4 ++-- drivers/scsi/snic/snic_scsi.c | 2 +- 2 files

Re: [PATCH 03/15] megaraid_sas: Use synchronize_irq in target reset case

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:29 AM, Shivasharan S wrote: > Similar to task abort case, use synchronize_irq API in target reset case. > Also, remove redundant call to megasas_complete_cmd_dpc_fusion > after calling megasas_sync_irqs in task abort case. > > Signed-off-by: Kashyap Desai

Re: [PATCH 02/15] megaraid_sas: set minimum value of resetwaittime to be 1 secs

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:29 AM, Shivasharan S wrote: > Setting resetwaittime to 0 will result in driver not calling the OCR > during a FW fault state. > > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > Cc:

Re: [PATCH 09/15] megaraid_sas: use vmalloc for crash dump buffers and driver's local RAID map

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas.h| 1 - > drivers/scsi/megaraid/megaraid_sas_base.c | 12 ++- >

Re: [PATCH 12/15] megaraid_sas: replace internal FALSE/TRUE definitions with false/true

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas_fp.c | 40 > + > 1 file changed, 15

Re: [PATCH 11/15] megaraid_sas: Set device queue_depth same as HBA can_queue value in scsi-mq mode

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Currently driver sets default queue_depth for VDs at 256 and JBODs based on > interface type, > ie., for SAS JBOD QD will be 64, for SATA JBOD QD will be 32. > During performance runs with scsi-mq enabled, we are seeing better results by > setting QD

Re: [PATCH 15/15] megaraid_sas: driver version upgrade

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > 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 >

Re: [PATCH 14/15] megaraid_sas: call megasas_dump_frame with correct IO frame size

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH 13/15] megaraid_sas: modified few prints in OCR and IOC INIT path

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas_fusion.c | 22 +- > 1 file changed, 13 insertions(+), 9

Re: [PATCH 01/15] megaraid_sas: mismatch of allocated MFI frame size and length exposed in MFI MPT pass through command

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:29 AM, Shivasharan S wrote: > Fix - Driver allocated 256 byte MFI frames bytes but while sending MFI > frame (embedded inside chain frame of MPT frame) to firmware, driver > sets the length as 4k. This results in DMA read error messages during > boot. > > Signed-off-by:

Re: [PATCH 06/15] megaraid_sas: Fix endianness issues in DCMD handling

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas_base.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) >

[PATCH][scsi-next] scsi: qla2xxx: fix a bunch of typos and spelling mistakes

2017-06-30 Thread Colin King
From: Colin Ian King Fix the following typos/spelling mistakes: "attribure" -> "attribute" "suppored" -> "supported" "Symobilic" -> "Symbolic" "iteself" -> "itself" "reqeust" -> "request" "nvme_wait_on_comand" -> "nvme_wait_on_command" "bount" -> "bound" "captrue_mask"

Re: [PATCH v4 0/5] tcmu: Add Type of reconfig into netlink

2017-06-30 Thread Mike Christie
On 06/30/2017 02:31 AM, Nicholas A. Bellinger wrote: > Hey MNC, > > On Mon, 2017-06-12 at 01:43 -0500, Mike Christie wrote: >> On 06/11/2017 04:02 PM, Mike Christie wrote: >>> On 06/09/2017 01:11 AM, Nicholas A. Bellinger wrote: Hi Bryant & Co, On Tue, 2017-06-06 at 09:28 -0500,

Re: [PATCH v4 0/5] tcmu: Add Type of reconfig into netlink

2017-06-30 Thread Mike Christie
On 06/30/2017 11:58 AM, Mike Christie wrote: > On 06/30/2017 02:31 AM, Nicholas A. Bellinger wrote: >> Hey MNC, >> >> On Mon, 2017-06-12 at 01:43 -0500, Mike Christie wrote: >>> On 06/11/2017 04:02 PM, Mike Christie wrote: On 06/09/2017 01:11 AM, Nicholas A. Bellinger wrote: > Hi Bryant &

[PATCH 6/7] aacraid: add fib flag to mark scsi command callback

2017-06-30 Thread Hannes Reinecke
To correctly identify which fib has a scsi command callback this patch implements a flag FIB_CONTEXT_FLAG_SCSI_CMD. Signed-off-by: Hannes Reinecke Reviewed-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aacraid.h | 1 +

[PATCH 2/7] aacraid: split off host reset

2017-06-30 Thread Hannes Reinecke
Split off the host reset parts of aac_eh_reset() into a separate host reset function. Signed-off-by: Hannes Reinecke Reviewed-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 33 ++--- 1 file

[PATCH 7/7] aacraid: complete all commands during bus reset

2017-06-30 Thread Hannes Reinecke
When issuing a bus reset we should complete all commands, not just the command triggering the reset. Signed-off-by: Hannes Reinecke Reviewed-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 34

[PATCH 5/7] aacraid: enable sending of TMFs from aac_hba_send()

2017-06-30 Thread Hannes Reinecke
aac_hba_send() will return FAILED for any non-SCSI command requests, failing any TMFs. This patch updates the check to allow TMFs. Signed-off-by: Hannes Reinecke Reviewed-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/commsup.c | 2

[PATCH 1/7] aacraid: split off functions to generate reset FIB

2017-06-30 Thread Hannes Reinecke
Split off reset FIB generation into separate functions. Signed-off-by: Hannes Reinecke Reviewed-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 83 ++-- 1 file changed, 50

[PATCH 4/7] aacraid: use aac_tmf_callback for reset fib

2017-06-30 Thread Hannes Reinecke
When sending a reset fib we shouldn't rely on the scsi command, but rather set the TMF status in the map_info->reset_state variable. That allows us to send a TMF independent on a scsi command. Signed-off-by: Hannes Reinecke --- drivers/scsi/aacraid/linit.c | 99

[PATCH 3/7] aacraid: split off device, target, and bus reset

2017-06-30 Thread Hannes Reinecke
Split off device, target, and bus reset functionality into individual functions. Signed-off-by: Hannes Reinecke Reviewed-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 141 +++ 1

[PATCH 0/7] aacraid: split off EH functions

2017-06-30 Thread Hannes Reinecke
Hi all, this patchset is a split off from the original patchset to rework SCSI EH function parameters. As it's pretty much independent and an improvement to the existing EH callback function, so I'm posting it separately. As usual, comments and reviews are welcome. Hannes Reinecke (7):

Re: [PATCH 1/2] Drop legacy megaraid controller

2017-06-30 Thread Christoph Hellwig
On Fri, Jun 30, 2017 at 01:05:53PM +0200, Hannes Reinecke wrote: > The hardware is ancient, and support for most cards has been moved > to megaraid_mbox. So drop it. This seems to drop support for the PCI_DEVICE_ID_AMI_MEGARAID and PCI_DEVICE_ID_AMI_MEGARAID2 cards. Do we have any suggestions

Re: [PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap

2017-06-30 Thread Madhani, Himanshu
> On Jun 30, 2017, at 9:41 AM, James Bottomley wrote: > > On Fri, 2017-06-30 at 18:10 +0200, Arnd Bergmann wrote: >> cont_pkt->entry_type is an 8-bit field, so doing a 32-bit byteswap >> on it will store incorrect data: >> >> drivers/scsi/qla2xxx/qla_nvme.c: In

[PATCH 2/2] scsi: qla2xxx: avoid unused-function warning

2017-06-30 Thread Arnd Bergmann
When NVMe support is disabled, we get a couple of harmless warnings: drivers/scsi/qla2xxx/qla_nvme.c:667:13: error: 'qla_nvme_unregister_remote_port' defined but not used [-Werror=unused-function] drivers/scsi/qla2xxx/qla_nvme.c:634:13: error: 'qla_nvme_abort_all' defined but not used

[PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap

2017-06-30 Thread Arnd Bergmann
cont_pkt->entry_type is an 8-bit field, so doing a 32-bit byteswap on it will store incorrect data: drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq': include/uapi/linux/byteorder/big_endian.h:32:26: error: large integer implicitly truncated to unsigned type [-Werror=overflow]

Re: [PATCH 1/2] scsi: lpfc: spin_lock_irq() is not nestable

2017-06-30 Thread James Smart
On 6/30/2017 1:02 AM, Dan Carpenter wrote: We're calling spin_lock_irq() multiple times, the problem is that on the first spin_unlock_irq() then we will re-enable IRQs and we don't want that. Fixes: 966bb5b71196 ("scsi: lpfc: Break up IO ctx list into a separate get and put list")

Re: [PATCH 2/2] scsi: lpfc: don't double count abort errors

2017-06-30 Thread James Smart
On 6/30/2017 1:03 AM, Dan Carpenter wrote: If lpfc_nvmet_unsol_fcp_issue_abort() fails then we accidentally increment "tgtp->xmt_abort_rsp_error" and then two lines later we increment it a second time. Fixes: 547077a44b3b ("scsi: lpfc: Adding additional stats counters for nvme.") Signed-off-by:

Re: [PATCH 1/2] scsi: qla2xxx: remove incorrect byte swap

2017-06-30 Thread James Bottomley
On Fri, 2017-06-30 at 18:10 +0200, Arnd Bergmann wrote: > cont_pkt->entry_type is an 8-bit field, so doing a 32-bit byteswap > on it will store incorrect data: > > drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq': > include/uapi/linux/byteorder/big_endian.h:32:26: error: large

RE: [PATCH 26/28] visorhba: sanitze private device data allocation

2017-06-30 Thread Kershner, David A
> -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Wednesday, June 28, 2017 4:25 AM > To: Christoph Hellwig > Cc: Martin K. Petersen ; James Bottomley > ; linux-scsi@vger.kernel.org; >

Re: [PATCH v5 0/6] g_NCR5380: PDMA fixes and cleanup

2017-06-30 Thread Ondrej Zary
On Friday 30 June 2017 09:12:37 Finn Thain wrote: > On Thu, 29 Jun 2017, Ondrej Zary wrote: > > The write corruption is still there. I'm afraid it can't be fixed > > without rolling "start" back (or inceasing residual) if an error > > occured, something like this: > > > > ---

Re: [PATCH 1/2] Drop legacy megaraid controller

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 07:33 PM, Christoph Hellwig wrote: > On Fri, Jun 30, 2017 at 01:05:53PM +0200, Hannes Reinecke wrote: >> The hardware is ancient, and support for most cards has been moved >> to megaraid_mbox. So drop it. > > > This seems to drop support for the PCI_DEVICE_ID_AMI_MEGARAID > and

Re: [PATCH] qla2xxx: Fix compile warning

2017-06-30 Thread James Bottomley
OK, the subject is technically true, but to most people "fix compile warning" means yet another pointless patch.  This patch isn't pointless, though, is it?  The driver is actually broken on big endian systems without it, so the subject should probably say this because it's important for distros

Re: [PATCH 2/2] scsi: qla2xxx: avoid unused-function warning

2017-06-30 Thread Madhani, Himanshu
> On Jun 30, 2017, at 9:10 AM, Arnd Bergmann wrote: > > When NVMe support is disabled, we get a couple of harmless warnings: > > drivers/scsi/qla2xxx/qla_nvme.c:667:13: error: > 'qla_nvme_unregister_remote_port' defined but not used > [-Werror=unused-function] >

[PATCH v6 4/6] g_NCR5380: Use unambiguous terminology for PDMA send and receive

2017-06-30 Thread Finn Thain
The word "read" may be used to mean "DMA read operation" or "SCSI READ command", though a READ command implies writing to memory. Signed-off-by: Finn Thain --- drivers/scsi/g_NCR5380.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v6 5/6] g_NCR5380: Re-work PDMA loops

2017-06-30 Thread Finn Thain
From: Ondrej Zary The polling loops in pread() and pwrite() can easily become infinite loops and hang the machine. Merge the IRQ check into host buffer wait loop and add polling limit. Also place a limit on polling for 53C80 registers accessibility. [Use

[PATCH v6 0/6] g_NCR5380: PDMA fixes and cleanup

2017-06-30 Thread Finn Thain
Ondrej, would you please test this new series? Changed since v1: - PDMA transfer residual is calculated earlier. - End of DMA flag check is now polled (if there is any residual). Changed since v2: - Bail out of transfer loops when Gated IRQ gets asserted. - Make udelay conditional on board type.

[PATCH v6 6/6] g_NCR5380: Various DTC436 workarounds

2017-06-30 Thread Finn Thain
From: Ondrej Zary Limit PDMA send to 512 B to avoid data corruption on DTC3181E. The corruption is always the same: one byte missing at the beginning of a 128 B block. It happens only with slow Quantum LPS 240 drive, not with faster IBM DORS-32160. It's not clear what

[PATCH v6 2/6] g_NCR5380: End PDMA transfer correctly on target disconnection

2017-06-30 Thread Finn Thain
From: Ondrej Zary When an IRQ arrives during PDMA transfer, pread() and pwrite() return without waiting for the 53C80 registers to be ready and this ends up messing up the chip state. This was observed with SONY CDU-55S which is slow enough to disconnect during

[PATCH v6 3/6] g_NCR5380: Cleanup comments and whitespace

2017-06-30 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/scsi/g_NCR5380.c | 61 ++-- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 911a4300ea51..dedaed2d16e4 100644

[PATCH v6 1/6] g_NCR5380: Fix PDMA transfer size

2017-06-30 Thread Finn Thain
From: Ondrej Zary generic_NCR5380_dma_xfer_len() incorrectly uses cmd->transfersize which causes rescan-scsi-bus and CD-ROM access to hang the system. Use cmd->SCp.this_residual instead, like other NCR5380 drivers. Signed-off-by: Ondrej Zary

[PATCH] qla2xxx: Fix compile warning

2017-06-30 Thread Himanshu Madhani
drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq': 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))) Signed-off-by: Himanshu Madhani

Re: [PATCH] tcmu: Fix flushing cmd entry dcache page

2017-06-30 Thread Mike Christie
On 06/30/2017 03:14 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > When feeding the tcmu's cmd ring, we need to flush the dcache page > for the cmd entry to make sure these kernel stores are visible to > user space mappings of that page. > > For the

Re: [PATCH][scsi-next] scsi: qla2xxx: fix a bunch of typos and spelling mistakes

2017-06-30 Thread Madhani, Himanshu
> On Jun 30, 2017, at 6:47 AM, Colin King wrote: > > From: Colin Ian King > > Fix the following typos/spelling mistakes: > > "attribure" -> "attribute" > "suppored" -> "supported" > "Symobilic" -> "Symbolic" > "iteself" -> "itself" >

[PATCH v2] qla2xxx: Fix NVMe entry_type for iocb packet on BE system

2017-06-30 Thread Himanshu Madhani
This patch fixes incorrect assignment for entry_type field for Continuation Type iocb packet on BE system. This was caught by -Woverflow warning on BE system compilation. For Continuation Type iocb driver needs to write complete 32 bit value to initialize other field members in stucture to 0.

Re: [PATCH v5 0/6] g_NCR5380: PDMA fixes and cleanup

2017-06-30 Thread Finn Thain
On Fri, 30 Jun 2017, Ondrej Zary wrote: > > > No more log spamming on DTC but reads are corrupted even more than > > > before. The IRQ check after data transfer increases the chance of > > > catching an IRQ before the buffer could become ready. > > > > If we delay the IRQ check, that just means

Re: [PATCH 04/15] megaraid_sas: Call megasas_complete_cmd_dpc_fusion every 1 second while there are pending commands

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:29 AM, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff

Re: [PATCH 05/15] megaraid_sas: Do not re-fire shutdown DCMD after OCR

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:29 AM, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git

Re: [PATCH 08/15] megaraid_sas: Use SMID for Task abort case only

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Fix - In TM code, smid_task is valid only in case of task aborts. > > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- >

Re: [PATCH 07/15] megaraid_sas: Check valid aen class range to avoid kernel panic

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > An application sending out of range AEN class code for > registration, will result in kernel panic in MR driver. > > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S >

Re: [PATCH 10/15] megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead

2017-06-30 Thread Hannes Reinecke
On 06/30/2017 10:30 AM, Shivasharan S wrote: > Fix - After a kill adapter, since the cmd_status is not set the > IOCTLs will be hung in driver resulting in application hang. > Set cmd_status MFI_STAT_WRONG_STATE when completing pended IOCTLs. > > Signed-off-by: Kashyap Desai

Re: [PATCH 09/15] megaraid_sas: use vmalloc for crash dump buffers and driver's local RAID map

2017-06-30 Thread Tomas Henzl
On 30.6.2017 10:30, Shivasharan S wrote: > Signed-off-by: Kashyap Desai > Signed-off-by: Shivasharan S > --- > drivers/scsi/megaraid/megaraid_sas.h| 1 - > drivers/scsi/megaraid/megaraid_sas_base.c | 12 ++- >