[GIT PULL] SCSI fixes for 4.3-rc4

2015-10-30 Thread James Bottomley
This is three essential bug fixes for various SCSI parts. The only affected users are SCSI multi-path via device handler (basically all the enterprise) and mvsas users. The dh bugs are an async entanglement in boot resulting in a serious WARN_ON trip and a use after free on remove leading to a cr

[PATCH] sg: Fix double-free when drives detach during SG_IO

2015-10-30 Thread Calvin Owens
In sg_common_write(), we free the block request and return -ENODEV if the device is detached in the middle of the SG_IO ioctl(). Unfortunately, sg_finish_rem_req() also tries to free srp->rq, so we end up freeing rq->cmd in the already free rq object, and then free the object itself out from under

Re: [Y2038] [RESEND PATCH v3] scsi: stex: Remove use of struct timeval

2015-10-30 Thread Arnd Bergmann
On Friday 30 October 2015 01:54:10 Tina Ruchandani wrote: > > > > Thanks for the conversion. Can you please check if other (scsi) drivers > > have the same y2038 issues? A quick "git grep do_gettimeofday > > drivers/scsi/ | wc -l" reveals 30 occurrences (of cause not all are > > problematic). In

Re: [PATCH 1 24/25] hpsa: add in sas transport class

2015-10-30 Thread Matthew R. Ochs
> On Oct 30, 2015, at 5:00 PM, Don Brace wrote: > On 10/30/2015 03:07 PM, Matthew R. Ochs wrote: >>> On Oct 28, 2015, at 5:06 PM, Don Brace wrote: >>> >>> From: Kevin Barnett >>> >>> Reviewed-by: Scott Teel >>> Reviewed-by: Justin Lindley >>> Reviewed-by: Kevin Barnett >>> Signed-off-by: Do

Re: [PATCH] megaraid_sas : Add locking to megasas_aen_polling

2015-10-30 Thread Ben Guthro
Apologies for missing that - it has been a while since submitting to the stable tree. I'll resubmit the same patch with the Cc: sta...@vger.kernel.org in the sign-off area. Regards, Ben On Fri, Oct 30, 2015 at 5:20 PM, Greg KH wrote: > On Fri, Oct 30, 2015 at 01:47:50PM -0400, Ben Guthro wrot

[PATCH 2/2] Restart list search after unlock in scsi_remove_target

2015-10-30 Thread Bart Van Assche
When dropping a lock while iterating a list we must restart the search as other threads could have manipulated the list under us. Without this we can get stuck in an endless loop. This is a slightly modified version of a patch from Christoph Hellwig (see also https://www.spinics.net/lists/linux-sc

Re: [PATCH 3/5] ipr: Inquiry IOA page 0xC4 during initialization.

2015-10-30 Thread Brian King
On 10/30/2015 11:49 AM, Gabriel Krisman Bertazi wrote: > diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h > index 69257c4..f0238cc 100644 > --- a/drivers/scsi/ipr.h > +++ b/drivers/scsi/ipr.h > @@ -849,6 +849,16 @@ struct ipr_inquiry_page0 { > u8 page[IPR_INQUIRY_PAGE0_ENTRIES]; > }__att

[PATCH 1/2] Separate target visibility from reaped state information

2015-10-30 Thread Bart Van Assche
Instead of representing the states "visible in sysfs" and "has been removed from the target list" by a single state variable, use two variables to represent this information. Signed-off-by: Bart Van Assche Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Dan Williams Cc: stable --- drivers/s

[PATCH 0/2] Fix a hard lockup in scsi_remove_target()

2015-10-30 Thread Bart Van Assche
On October 2, 2015 Johannes Thumshirn reported the following hard lockup (see also http://thread.gmane.org/gmane.linux.kernel/2052359): Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 0 [...] Call Trace: [] dump_trace+0x7d/0x2d0 [] show_stack_log_lvl+0x94/0x170 [] show_stack+

Re: [PATCH 1 24/25] hpsa: add in sas transport class

2015-10-30 Thread Don Brace
On 10/30/2015 03:07 PM, Matthew R. Ochs wrote: On Oct 28, 2015, at 5:06 PM, Don Brace wrote: From: Kevin Barnett Reviewed-by: Scott Teel Reviewed-by: Justin Lindley Reviewed-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/hpsa.c | 535 +

Re: [PATCH] megaraid_sas : Add locking to megasas_aen_polling

2015-10-30 Thread Greg KH
On Fri, Oct 30, 2015 at 01:47:50PM -0400, Ben Guthro wrote: > From: Glenn Watkins > > Under conditions of offlining drives, and rescanning the scsi host, > we can get into situations that the megasas_aen_polling kthread > can crash(GPF) in the megasas_aen_polling work queue: > > [ 1206.568641] g

Re: [PATCH 1 21/25] hpsa: disable report lun data caching

2015-10-30 Thread Don Brace
On 10/30/2015 09:25 AM, Tomas Henzl wrote: On 28.10.2015 23:06, Don Brace wrote: From: Scott Teel When external target arrays are present, disable the firmware's normal behavior of returning a cached copy of the report lun data, and force it to collect new data each time we request a report lu

Re: [PATCH 1 15/25] hpsa: enhance hpsa_get_device_id

2015-10-30 Thread Don Brace
On 10/30/2015 03:08 AM, Hannes Reinecke wrote: On 10/28/2015 11:06 PM, Don Brace wrote: use an index into vpd data for SAS/SATA drives Reviewed-by: Scott Teel Reviewed-by: Justin Lindley Reviewed-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/hpsa.c | 23 +++

Re: [PATCH v4.3-rc7] be2iscsi : Fix bogus WARN_ON length check

2015-10-30 Thread Johannes Thumshirn
Hi Tim, tim.gard...@canonical.com writes: > From: Tim Gardner > > drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous': > drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied > to the left hand side of comparison [-Wlogical-not-parentheses] > WARN_ON

Re: [PATCH 1 08/25] hpsa: fix hpsa_adjust_hpsa_scsi_table

2015-10-30 Thread Don Brace
On 10/30/2015 02:57 AM, Hannes Reinecke wrote: On 10/28/2015 11:05 PM, Don Brace wrote: Fix a NULL pointer issue in the driver when devices are removed during a reset. Signed-off-by: Don Brace --- drivers/block/cciss.h |1 + drivers/scsi/hpsa.c | 16 drivers/scsi

Re: [PATCH 1 06/25] hpsa: abandon rescans on memory alloaction failures.

2015-10-30 Thread Don Brace
On 10/30/2015 02:53 AM, Hannes Reinecke wrote: On 10/28/2015 11:05 PM, Don Brace wrote: Abandon and reschedule rescan process only if device inquiries fail due to mem alloc failures, which are likely to occur for all devices. Otherwise, skip device if inquiry fails for other reasons, and cont

Re: Blk-mq/scsi-mq Tuning

2015-10-30 Thread Mike Christie
On 10/30/2015 10:00 AM, Hannes Reinecke wrote: > On 10/30/2015 03:12 PM, Chad Dupuis wrote: >> >> >> On Fri, 30 Oct 2015, Hannes Reinecke wrote: >> >>> On 10/30/2015 02:25 PM, Chad Dupuis wrote: On Fri, 30 Oct 2015, Hannes Reinecke wrote: > On 10/28/2015 09:11 PM, Chad Dupui

Re: [PATCH 1 25/25] hpsa: bump the driver version

2015-10-30 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1 24/25] hpsa: add in sas transport class

2015-10-30 Thread Matthew R. Ochs
> On Oct 28, 2015, at 5:06 PM, Don Brace wrote: > > From: Kevin Barnett > > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c | 535 +-- > drivers/scsi/hp

[PATCH] pm80xx: remove the SCSI host before detaching from SAS transport

2015-10-30 Thread Benjamin Rood
Previously, when this module was unloaded via 'rmmod' with at least one drive attached, the SCSI error handler thread would become stuck in an infinite recovery loop and lockup the system, necessitating a reboot. Once the SAS layer is detached, the driver will fail any subsequent commands since th

Re: [PATCH v4.3-rc7] be2iscsi : Fix bogus WARN_ON length check

2015-10-30 Thread Manoj Kumar
Tim: Reviewed-by: Manoj Kumar --- Manoj Kumar On 10/30/2015 1:22 PM, tim.gard...@canonical.com wrote: From: Tim Gardner drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous': drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied to the left hand si

[PATCH v4.3-rc7] be2iscsi : Fix bogus WARN_ON length check

2015-10-30 Thread tim . gardner
From: Tim Gardner drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous': drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] WARN_ON(!length > 0); gcc version 5.2.1 Cc: Jayamohan Kalli

[PATCH] sd: Clear PS bit before Mode Select.

2015-10-30 Thread Gabriel Krisman Bertazi
According to SPC-4, in a Mode Select, the PS bit in Mode Pages is reserved and must be set to 0 by the driver. In the sd implementation, function cache_type_store does a Mode Sense, which might set the PS bit on the read buffer, followed by a Mode Select, which receives the same buffer, without ex

Re: [PATCH 2/5] ipr: Clear NO_ULEN_CHK bit when resource is a vset.

2015-10-30 Thread Manoj Kumar
On 10/30/2015 11:49 AM, Gabriel Krisman Bertazi wrote: if (ipr_is_gscsi(res) || ipr_is_vset_device(res)) { - if (scsi_cmd->underflow == 0) + if (scsi_cmd->underflow == 0 && !ipr_is_vset_device(res)) This section is getting quite convoluted. If there isn't re

[PATCH] megaraid_sas : Add locking to megasas_aen_polling

2015-10-30 Thread Ben Guthro
From: Glenn Watkins Under conditions of offlining drives, and rescanning the scsi host, we can get into situations that the megasas_aen_polling kthread can crash(GPF) in the megasas_aen_polling work queue: [ 1206.568641] general protection fault: [#1] SMP [ 1206.569479] Modules linked in: x

Re: [PATCH 1 23/25] hpsa: fix multiple issues in path_info_show

2015-10-30 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 25/32] scsi: hisi_sas: add abnormal irq handler

2015-10-30 Thread John Garry
On 30/10/2015 14:10, Arnd Bergmann wrote: On Monday 26 October 2015 22:14:56 John Garry wrote: Add abnormal irq handler. This handler is concerned with phy down event. Also add port formed and port deformed handlers. Signed-off-by: John Garry I noticed a couple more coding style issues in th

Re: [PATCH 1 22/25] hpsa: enhance device messages

2015-10-30 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/5] ipr: Add delay to ensure coherent dumps.

2015-10-30 Thread Gabriel Krisman Bertazi
Add a holding pattern prior to collecting dump data, to wait for the IOA indication that the Mailbox register is stable and won't change without an explicit reset. This ensures we'll be collecting meaningful dump data, even when dumping right after an adapter reset. In the event of a timeout, we

[PATCH 2/5] ipr: Clear NO_ULEN_CHK bit when resource is a vset.

2015-10-30 Thread Gabriel Krisman Bertazi
According to the IPR specification, Inhibit Underlength Checking bit must be disabled when sending commands to vsets. Enabling this bit for vset might cause SCSI commands to fail with an Illegal Request. Signed-off-by: Gabriel Krisman Bertazi --- drivers/scsi/ipr.c | 2 +- 1 file changed, 1 ins

[PATCH 3/5] ipr: Inquiry IOA page 0xC4 during initialization.

2015-10-30 Thread Gabriel Krisman Bertazi
Add an IOA Inquiry command for Page 0xC4 during IOA initialization to collect cache capabilities, particularly to check if Sync IOA Write Cache is supported. Inquiry will happen right after Cap Inquiry on page 0xD0; and will execute only if the "Supported Pages" field in Inquiry Page 0x0 shows sup

[PATCH 4/5] ipr: Issue Configure Cache Parameters command.

2015-10-30 Thread Gabriel Krisman Bertazi
Some new adapters require a special Configure Cache Parameters command to enable the adapter write cache, so send this during the adapter initialization if the adapter requires it. Signed-off-by: Gabriel Krisman Bertazi --- drivers/scsi/ipr.c | 59

[PATCH 5/5] ipr: Driver version 2.6.3.

2015-10-30 Thread Gabriel Krisman Bertazi
Signed-off-by: Gabriel Krisman Bertazi --- drivers/scsi/ipr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index aab5c6d..ce49ca9 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h @@ -39,8 +39,8 @@ /* * Literals */ -#d

Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-10-30 Thread John Garry
On 30/10/2015 13:53, Arnd Bergmann wrote: On Monday 26 October 2015 22:14:58 John Garry wrote: + /* + * DMA-map SMP request, response buffers + */ + /* req */ + sg_req = &task->smp_task.smp_req; + elem = dma_map_sg(dev, sg_req, 1, DMA_TO_DEVICE); + if (

Re: [PATCH 1 21/25] hpsa: disable report lun data caching

2015-10-30 Thread Matthew R. Ochs
> On Oct 28, 2015, at 5:06 PM, Don Brace wrote: > > From: Scott Teel > > When external target arrays are present, disable the firmware's > normal behavior of returning a cached copy of the report lun data, > and force it to collect new data each time we request a report luns. > > This is nece

Re: [PATCH 1 20/25] hpsa: add discovery polling for PT RAID devices.

2015-10-30 Thread Matthew R. Ochs
> On Oct 30, 2015, at 9:08 AM, Don Brace wrote: > > On 10/29/2015 03:59 PM, Matthew R. Ochs wrote: >>> On Oct 29, 2015, at 3:51 PM, Don Brace wrote: >>> On 10/29/2015 03:20 PM, Matthew R. Ochs wrote: > On Oct 28, 2015, at 5:06 PM, Don Brace > wrote: > > From: Scott Teel >

Re: [PATCH 1 17/25] hpsa: move scsi_add_device and scsi_remove_device calls to new function

2015-10-30 Thread Matthew R. Ochs
> On Oct 29, 2015, at 3:30 PM, Don Brace wrote: > > On 10/29/2015 12:21 PM, Matthew R. Ochs wrote: >>> On Oct 28, 2015, at 5:06 PM, Don Brace wrote: >>> >>> From: Kevin Barnett >>> >>> preparation for adding the sas transport class >>> >>> Reviewed-by: Scott Teel >>> Reviewed-by: Justin Lin

Re: Blk-mq/scsi-mq Tuning

2015-10-30 Thread Hannes Reinecke
On 10/30/2015 03:12 PM, Chad Dupuis wrote: > > > On Fri, 30 Oct 2015, Hannes Reinecke wrote: > >> On 10/30/2015 02:25 PM, Chad Dupuis wrote: >>> >>> >>> On Fri, 30 Oct 2015, Hannes Reinecke wrote: >>> On 10/28/2015 09:11 PM, Chad Dupuis wrote: > Hi Folks, > > We¹ve begun to expl

[PATCH 2/8] pm80xx: add support for PMC Sierra 8070 and PMC Sierra 8072 SAS controllers

2015-10-30 Thread Benjamin Rood
These SAS controllers support speeds up to 12Gb. Signed-off-by: Benjamin Rood --- drivers/scsi/pm8001/pm8001_defs.h | 2 ++ drivers/scsi/pm8001/pm8001_init.c | 4 +++- drivers/scsi/pm8001/pm8001_sas.h | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pm8001/p

[PATCH 4/8] pm80xx: add support for ATTO devices during SAS address initiailization

2015-10-30 Thread Benjamin Rood
ATTO SAS controllers retrieve the SAS address from the NVRAM in a location different from non-ATTO PMC Sierra SAS controllers. This patch makes the necessary adjustments in order to retrieve the SAS address on these types of adapters. Signed-off-by: Benjamin Rood --- drivers/scsi/pm8001/pm8001_

[PATCH 5/8] pm80xx: set PHY profiles for ATTO 12Gb SAS controllers

2015-10-30 Thread Benjamin Rood
PHY profiles are not saved in NVRAM on ATTO 12Gb SAS controllers. Therefore, in order for the controller to function in a wide range of configurations, the PHY profiles must be statically set. This patch provides the necessary functionality to do so. Signed-off-by: Benjamin Rood --- drivers/scs

[PATCH 6/8] pm80xx: do not examine registers for iButton feature if ATTO adapter

2015-10-30 Thread Benjamin Rood
ATTO adapters do not support this feature. If the firmware fails to be ready, it should not check the examined registers in order to examine the state of the feature in order to prevent undefined behavior. Signed-off-by: Benjamin Rood --- drivers/scsi/pm8001/pm80xx_hwi.c | 2 ++ 1 file changed,

[PATCH 8/8] pm80xx: avoid a panic if MSI(X) interrupts are disabled

2015-10-30 Thread Benjamin Rood
If MSI(X) interrupts are disabled via the kernel command line (pci=nomsi), the pm8001 driver will kernel panic because it does not detect that MSI interrupts are disabled and will soldier on and attempt to configure MSI interrupts anyways. This leads to a kernel panic, most likely because a requir

[PATCH 3/8] pm80xx: add ATTO PCI IDs to pm8001_pci_table

2015-10-30 Thread Benjamin Rood
These PCI IDs allow the pm8001 driver to load against ATTO 12Gb SAS controllers that use PMC Sierra 8070 and PMC Sierra 8072 SAS chips. Signed-off-by: Benjamin Rood --- drivers/scsi/pm8001/pm8001_init.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/pm8001/pm800

[PATCH 1/8] pm80xx: configure PHY settings based on subsystem vendor ID

2015-10-30 Thread Benjamin Rood
Previuosly, all PMC Sierra 80xx controllers are assumed to be a motherboard controller, except if the subsystem vendor ID was equal to PCI_VENDOR_ID_ADAPTEC. The driver then attempts to load PHY settings from NVRAM. While this may be correct behavior for most controllers, it does not work with Ad

[PATCH 7/8] pm80xx: wait a minimum of 500ms before issuing commands to SPCv

2015-10-30 Thread Benjamin Rood
The documentation for the 8070 and 8072 SPCv chip explicitly states that a minimum of 500ms must elapse before issuing commands, otherwise the SPCv may not process them and the firmware may get into an unrecoverable state requiring a reboot. While the Linux guys will probably think this is 'racy',

[PATCH 0/8] pm80xx: Add ATTO 12Gb HBA support and fix various issues

2015-10-30 Thread Benjamin Rood
The following series of patches are primarily aimed at adding support for ATTO's 12Gb SAS adapters, which are based off of the PMC-Sierra 8070/8072 series chips. I have also addressed other various issues that were discovered during our testing and verification phase, mainly with resume-from-sleep

Re: [PATCH 1 25/25] hpsa: bump the driver version

2015-10-30 Thread Tomas Henzl
On 28.10.2015 23:07, Don Brace wrote: > Reviewed-by: Justin Lindley > Reviewed-by: Scott Teel > Reviewed-by: Kevin Barnett > Reviewed-by: Gerry Morong > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scs

Re: [PATCH 1 24/25] hpsa: add in sas transport class

2015-10-30 Thread Tomas Henzl
On 28.10.2015 23:06, Don Brace wrote: > From: Kevin Barnett > > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace Reviewed-by: Tomas Henzl Tomas -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body

Re: [PATCH 1 23/25] hpsa: fix multiple issues in path_info_show

2015-10-30 Thread Tomas Henzl
On 28.10.2015 23:06, Don Brace wrote: > From: Rasmus Villemoes > > path_info_show() seems to be broken in multiple ways. > > First, there's > > 817 return snprintf(buf, output_len+1, "%s%s%s%s%s%s%s%s", > 818 path[0], path[1], path[2], path[3], > 819 path[4], path[5], path[6], pa

Re: [PATCH 1 22/25] hpsa: enhance device messages

2015-10-30 Thread Tomas Henzl
On 28.10.2015 23:06, Don Brace wrote: > Reviewed-by: Justin Lindley > Reviewed-by: Scott Teel > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c | 45 - > 1 file changed, 40 insertions(+), 5 deletions(-) > > diff --

Re: [PATCH 1 21/25] hpsa: disable report lun data caching

2015-10-30 Thread Tomas Henzl
On 28.10.2015 23:06, Don Brace wrote: > From: Scott Teel > > When external target arrays are present, disable the firmware's > normal behavior of returning a cached copy of the report lun data, > and force it to collect new data each time we request a report luns. > > This is necessary for externa

Re: [PATCH 1 03/25] hpsa: check for null arguments to dev_printk

2015-10-30 Thread Don Brace
On 10/30/2015 02:47 AM, Hannes Reinecke wrote: On 10/28/2015 11:04 PM, Don Brace wrote: Check for NULLs. Signed-off-by: Don Brace --- drivers/scsi/hpsa.c |6 ++ drivers/scsi/hpsa.h |2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/driver

Re: Blk-mq/scsi-mq Tuning

2015-10-30 Thread Chad Dupuis
On Fri, 30 Oct 2015, Hannes Reinecke wrote: On 10/30/2015 02:25 PM, Chad Dupuis wrote: On Fri, 30 Oct 2015, Hannes Reinecke wrote: On 10/28/2015 09:11 PM, Chad Dupuis wrote: Hi Folks, We¹ve begun to explore blk-mq and scsi-mq and wanted to know if there were any best practices in terms

Re: [PATCH 1 18/25] External array LUNs must use target and lun numbers assigned by the

2015-10-30 Thread Tomas Henzl
On 28.10.2015 23:06, Don Brace wrote: > From: Scott Teel > > external array. So the driver must treat these differently from > local LUNs when assigning lun/target. > > LUN's 'model' field has been used to detect Lun types that need > special treatment, but the desire is to eliminate the need to r

Re: [PATCH 1 19/25] hpsa: eliminate fake lun0 enclosures

2015-10-30 Thread Tomas Henzl
On 28.10.2015 23:06, Don Brace wrote: > From: Scott Teel > > We don't need to create fake enclosure devices at Lun0 > in external target array configurations anymore. > This was done to support Pre-SCSI rev 5 controllers > that didn't suppoprt report luns commands, so the > SCSI layer had to scan

Re: [PATCH v2 25/32] scsi: hisi_sas: add abnormal irq handler

2015-10-30 Thread Arnd Bergmann
On Monday 26 October 2015 22:14:56 John Garry wrote: > Add abnormal irq handler. This handler is concerned with > phy down event. > Also add port formed and port deformed handlers. > > Signed-off-by: John Garry I noticed a couple more coding style issues in this patch than elsewhere, so here

Re: [PATCH 1 20/25] hpsa: add discovery polling for PT RAID devices.

2015-10-30 Thread Don Brace
On 10/29/2015 03:59 PM, Matthew R. Ochs wrote: On Oct 29, 2015, at 3:51 PM, Don Brace wrote: On 10/29/2015 03:20 PM, Matthew R. Ochs wrote: On Oct 28, 2015, at 5:06 PM, Don Brace wrote: From: Scott Teel There are problems with getting configuration change notification in pass-through RAI

Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-10-30 Thread Arnd Bergmann
On Monday 26 October 2015 22:14:58 John Garry wrote: > + /* > + * DMA-map SMP request, response buffers > + */ > + /* req */ > + sg_req = &task->smp_task.smp_req; > + elem = dma_map_sg(dev, sg_req, 1, DMA_TO_DEVICE); > + if (!elem) > + return

Re: Blk-mq/scsi-mq Tuning

2015-10-30 Thread Hannes Reinecke
On 10/30/2015 02:25 PM, Chad Dupuis wrote: > > > On Fri, 30 Oct 2015, Hannes Reinecke wrote: > >> On 10/28/2015 09:11 PM, Chad Dupuis wrote: >>> Hi Folks, >>> >>> We¹ve begun to explore blk-mq and scsi-mq and wanted to know if there >>> were >>> any best practices in terms of block layer setting

Re: Blk-mq/scsi-mq Tuning

2015-10-30 Thread Chad Dupuis
On Fri, 30 Oct 2015, Hannes Reinecke wrote: On 10/28/2015 09:11 PM, Chad Dupuis wrote: Hi Folks, We¹ve begun to explore blk-mq and scsi-mq and wanted to know if there were any best practices in terms of block layer settings. We¹re looking specifically at the FCoE and iSCSI protocols. A lit

Re: [PATCH v3 RESEND] scsi: report 'INQUIRY result too short' once per host

2015-10-30 Thread Vitaly Kuznetsov
Hannes Reinecke writes: > On 10/30/2015 12:40 PM, Vitaly Kuznetsov wrote: >> Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the >> SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at >> least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi sc

Re: [RESEND PATCH v3] scsi: stex: Remove use of struct timeval

2015-10-30 Thread Arnd Bergmann
On Friday 30 October 2015 12:58:33 Hannes Reinecke wrote: > > @@ -1076,7 +1069,7 @@ static int stex_ss_handshake(struct st_hba *hba) > > h->req_cnt = cpu_to_le16(hba->rq_count+1); > > h->status_sz = cpu_to_le16(sizeof(struct status_msg)); > > h->status_cnt = cpu_to_le16(hba->sts_c

Re: [PATCH v6 00/15] Big fixes, retries, handle a race condition

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 02:13 PM, Yaniv Gardi wrote: > Important: > This serie of 15 small patches should be pushed after the series of 8 patches > "Fix error message and present UFS variant probe" > > V6: > update Reviewed-by from various reviewers > > V5: > removed un-necessary wmb() > > V4: > fixing a

Re: [PATCH v6 07/15] scsi: ufs: set REQUEST_SENSE command size to 18 bytes

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 02:13 PM, Yaniv Gardi wrote: > According to UFS device specification REQUEST_SENSE command can > only report back up to 18 bytes of data. > > Reviewed-by: Dolev Raviv > Signed-off-by: Gilad Broner > Signed-off-by: Yaniv Gardi > Really? The spec only says that the inline sense cod

[PATCH RESEND] scsi: Export SCSI Inquiry data to sysfs

2015-10-30 Thread Johannes Thumshirn
Export the RAW SCSI Inquiry to sysfs as binfile. This way the data can be used by userland without the need to have and ioctl or use the sg_inq tool. Here is an example of the provided data linux:~ # hexdump /sys/class/scsi_device/1\:0\:0\:0/device/inquiry 000 8005 3205 001f 4551 554d 20

Re: [RESEND PATCH v3] scsi: stex: Remove use of struct timeval

2015-10-30 Thread Hannes Reinecke
On 10/30/2015 09:30 AM, Tina Ruchandani wrote: > Function stex_gettime uses 'struct timeval' whose tv_sec value > will overflow on 32-bit systems in year 2038 and beyond. This patch > replaces the use of struct timeval and do_gettimeofday with > ktime_get_real_seconds, which returns a 64-bit second

Re: [PATCH v3 RESEND] scsi: report 'INQUIRY result too short' once per host

2015-10-30 Thread Hannes Reinecke
On 10/30/2015 12:40 PM, Vitaly Kuznetsov wrote: > Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the > SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at > least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan: > INQUIRY result too short

[PATCH v3 RESEND] scsi: report 'INQUIRY result too short' once per host

2015-10-30 Thread Vitaly Kuznetsov
Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan: INQUIRY result too short (5), using 36' messages on console. This can be problema

[PATCH RESEND] scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice

2015-10-30 Thread Vitaly Kuznetsov
The only user of scsi_prep_async_scan() is scsi_scan_host() and it handles the situation correctly. Move 'called twice' reporting to debug level as well. The issue is observed on Hyper-V: on any device add/remove event storvsc driver calls scsi_scan_host() and in case previous scan is still runnin

[PATCH v3 RESEND] scsi: report 'INQUIRY result too short' once per host

2015-10-30 Thread Vitaly Kuznetsov
Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan: INQUIRY result too short (5), using 36' messages on console. This can be problema

Re: [RESEND PATCH] [SCSI] mvumi: 64bit value for seconds_since1970

2015-10-30 Thread Johannes Thumshirn
On Fri, 2015-10-30 at 02:11 -0700, Tina Ruchandani wrote: > struct mvumi_hs_page2 stores a "seconds_since1970" field which is of > type u64. It is however, written to, using 'struct timeval' which has > a 32-bit seconds field and whose value will overflow in year 2038. > This patch uses ktime_get_r

Re: [RESEND PATCH] qla2xxx: Remove use of 'struct timeval'

2015-10-30 Thread Johannes Thumshirn
On Fri, 2015-10-30 at 02:15 -0700, Tina Ruchandani wrote: > struct register_host_info stores a 64-bit UTC system time timestamp. > This patch removes the use of 'struct timeval' to obtain that > timestamp > as its tv_sec value will overflow on 32-bit systems in year 2038 > beyond. > The patch uses

Re: [RESEND PATCH] mpt2sas: Remove usage of 'struct timeval'

2015-10-30 Thread Tina Ruchandani
> Can you wait a cycle on this? Martin Petersen is on a mission to wrangle the > mpt2/3sas merger in this window, which will conflict with this. > James, No issues. Making a note here though that the patches for mpt2sas_base.c and mpt3sas_base.c are identical, I submitted the latter before I saw

[RESEND PATCH] qla2xxx: Remove use of 'struct timeval'

2015-10-30 Thread Tina Ruchandani
struct register_host_info stores a 64-bit UTC system time timestamp. This patch removes the use of 'struct timeval' to obtain that timestamp as its tv_sec value will overflow on 32-bit systems in year 2038 beyond. The patch uses ktime_get_real_seconds() which returns a 64-bit seconds value. Signed

Re: [RESEND PATCH] mpt2sas: Remove usage of 'struct timeval'

2015-10-30 Thread James Bottomley
On October 30, 2015 6:05:15 PM GMT+09:00, Tina Ruchandani wrote: >'struct timeval' will have its tv_sec value overflow on 32-bit systems >in year 2038 and beyond. This patch replaces the use of struct timeval >for computing mpi_request.TimeStamp, and instead uses ktime_t which >provides >64-bit

[RESEND PATCH] [SCSI] mvumi: 64bit value for seconds_since1970

2015-10-30 Thread Tina Ruchandani
struct mvumi_hs_page2 stores a "seconds_since1970" field which is of type u64. It is however, written to, using 'struct timeval' which has a 32-bit seconds field and whose value will overflow in year 2038. This patch uses ktime_get_real_seconds() instead since it provides a 64-bit seconds value, wh

[RESEND PATCH] mpt3sas: Remove usage of 'struct timeval'

2015-10-30 Thread Tina Ruchandani
'struct timeval' will have its tv_sec value overflow on 32-bit systems in year 2038 and beyond. This patch replaces the use of struct timeval for computing mpi_request.TimeStamp, and instead uses ktime_t which provides 64-bit seconds value. The timestamp computed remains unaffected (milliseconds si

[RESEND PATCH] mpt2sas: Remove usage of 'struct timeval'

2015-10-30 Thread Tina Ruchandani
'struct timeval' will have its tv_sec value overflow on 32-bit systems in year 2038 and beyond. This patch replaces the use of struct timeval for computing mpi_request.TimeStamp, and instead uses ktime_t which provides 64-bit seconds value. The timestamp computed remains unaffected (milliseconds si

Re: [RESEND PATCH v3] scsi: stex: Remove use of struct timeval

2015-10-30 Thread Tina Ruchandani
> > Thanks for the conversion. Can you please check if other (scsi) drivers > have the same y2038 issues? A quick "git grep do_gettimeofday > drivers/scsi/ | wc -l" reveals 30 occurrences (of cause not all are > problematic). > Hi Johannes, Yes, there are quite a few occurrences of timeval within

Re: [RESEND PATCH v3] scsi: stex: Remove use of struct timeval

2015-10-30 Thread Johannes Thumshirn
Hi, On Fri, 2015-10-30 at 01:30 -0700, Tina Ruchandani wrote: > Function stex_gettime uses 'struct timeval' whose tv_sec value > will overflow on 32-bit systems in year 2038 and beyond. This patch > replaces the use of struct timeval and do_gettimeofday with > ktime_get_real_seconds, which returns

Re: [PATCH v9 1/8] phy: qcom-ufs: fix build error when the component is built as a module

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > Export the following functions in order to avoid build errors > when the component PHY_QCOM_UFS is compiled as a module: > > ERROR: "ufs_qcom_phy_disable_ref_clk" > [drivers/scsi/ufs/ufs-qcom.ko] undefined! > ERROR: "ufs_qcom_phy_enable_ref_clk" >

Re: [PATCH v9 2/8] scsi: ufs-qcom: fix compilation warning if compiled as a module

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > This change fixes a compilation warning that happens if SCSI_UFS_QCOM > is compiled as a module. > Also this patch fixes an error happens when insmod the module: > "ufs_qcom: module license 'unspecified' taints kernel." > > Reviewed-by: Akinobu Mita >

Re: [PATCH v9 5/8] scsi: ufs: creates wrapper functions for vops

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > In order to simplify the code a set of wrapper functions is created > to test and call each of the variant operations. > > Reviewed-by: Akinobu Mita > Reviewed-by: Subhash Jadavani > Reviewed-by: Gilad Broner > Signed-off-by: Yaniv Gardi > > --- >

Re: [PATCH v9 7/8] scsi: ufs-qcom: add debug prints for test bus

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > Adds support for configuring and reading the test bus and debug > registers. This change also adds another vops in order to print the > debug registers. > > Reviewed-by: Subhash Jadavani > Reviewed-by: Gilad Broner > Signed-off-by: Yaniv Gardi > Rev

Re: [PATCH v9 8/8] scsi: ufs-qcom: add QUniPro hardware support and power optimizations

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > New revisions of UFS host controller supports the new UniPro > hardware controller (referred as QUniPro). This patch adds > the support to enable this new UniPro controller hardware. > > This change also adds power optimization for bus scaling feature,

[RESEND PATCH v3] scsi: stex: Remove use of struct timeval

2015-10-30 Thread Tina Ruchandani
Function stex_gettime uses 'struct timeval' whose tv_sec value will overflow on 32-bit systems in year 2038 and beyond. This patch replaces the use of struct timeval and do_gettimeofday with ktime_get_real_seconds, which returns a 64-bit seconds value. Suggested-by: Arnd Bergmann Signed-off-by: T

Re: [PATCH v9 6/8] scsi: ufs: make the UFS variant a platform device

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > This change turns the UFS variant (SCSI_UFS_QCOM) into a UFS > a platform device. > In order to do so a few additional changes are required: > 1. The ufshcd-pltfrm is no longer serves as a platform device. >Now it only serves as a group of platform A

Re: [PATCH v9 4/8] scsi: ufs: add ufshcd_get_variant ufshcd_set_variant

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > This patch adds ufshcd_get_variant() and ufshcd_set_variant() > routines in order to get/set the variant specific data. > > Reviewed-by: Akinobu Mita > Reviewed-by: Subhash Jadavani > Reviewed-by: Gilad Broner > Signed-off-by: Yaniv Gardi > Reviewe

Re: [PATCH v9 3/8] scsi: ufs-qcom: update configuration option of SCSI_UFS_QCOM component

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 12:15 PM, Yaniv Gardi wrote: > This change is required in order to be able to build the component > as a module. > > Reviewed-by: Akinobu Mita > Reviewed-by: Subhash Jadavani > Reviewed-by: Gilad Broner > Signed-off-by: Yaniv Gardi > > --- > drivers/scsi/ufs/Kconfig | 2 +- > 1

Re: [PATCH] scsi: restart list search after unlock in scsi_remove_target

2015-10-30 Thread Johannes Thumshirn
Hi Bart, On Tue, 2015-10-27 at 13:14 -0700, Bart Van Assche wrote: > On 10/26/2015 01:35 AM, Johannes Thumshirn wrote: > > I haven't heard anything from the original reporter of the lockup > > but > > my test's went all O.K., so > > > > Tested-by: Johannes Thumshirn > > Reviewed-by: Johannes Thum

Re: [PATCH 1 25/25] hpsa: bump the driver version

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:07 PM, Don Brace wrote: > Reviewed-by: Justin Lindley > Reviewed-by: Scott Teel > Reviewed-by: Kevin Barnett > Reviewed-by: Gerry Morong > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Hannes Re

Re: [PATCH 1 24/25] hpsa: add in sas transport class

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > From: Kevin Barnett > > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c | 535 > +-- > drivers/scsi/hpsa.h

Re: [PATCH 1 23/25] hpsa: fix multiple issues in path_info_show

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > From: Rasmus Villemoes > > path_info_show() seems to be broken in multiple ways. > > First, there's > > 817 return snprintf(buf, output_len+1, "%s%s%s%s%s%s%s%s", > 818 path[0], path[1], path[2], path[3], > 819 path[4], path[5], path[

Re: [PATCH 1 22/25] hpsa: enhance device messages

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > Reviewed-by: Justin Lindley > Reviewed-by: Scott Teel > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c | 45 - > 1 file changed, 40 insertions(+), 5 deletions(-) > Revie

Re: [PATCH 1 21/25] hpsa: disable report lun data caching

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > From: Scott Teel > > When external target arrays are present, disable the firmware's > normal behavior of returning a cached copy of the report lun data, > and force it to collect new data each time we request a report luns. > > This is necessary for ex

Re: [PATCH 1 20/25] hpsa: add discovery polling for PT RAID devices.

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > From: Scott Teel > > There are problems with getting configuration change notification > in pass-through RAID environments. So, activate flag > h->discovery_polling when one of these devices is detected in > update_scsi_devices. > > After discovery_pol

Re: [PATCH 1 19/25] hpsa: eliminate fake lun0 enclosures

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > From: Scott Teel > > We don't need to create fake enclosure devices at Lun0 > in external target array configurations anymore. > This was done to support Pre-SCSI rev 5 controllers > that didn't suppoprt report luns commands, so the > SCSI layer had to s

Re: [PATCH 1 18/25] External array LUNs must use target and lun numbers assigned by the

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > From: Scott Teel > > external array. So the driver must treat these differently from > local LUNs when assigning lun/target. > Please fixup the description; looks like it has been incorrectly broken up during git commit. > LUN's 'model' field has been

Re: [PATCH 1 16/25] hpsa: refactor hpsa_figure_bus_target_lun

2015-10-30 Thread Hannes Reinecke
On 10/28/2015 11:06 PM, Don Brace wrote: > From: Kevin Barnett > > setup for sas transport. Need to set the > bus and target accordingly. > > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c | 25

  1   2   >