Re: [PATCH] scsi: Always retry internal target error

2017-10-17 Thread Christoph Hellwig
On Wed, Oct 18, 2017 at 08:15:46AM +0200, Hannes Reinecke wrote: > > It's decidedly awful to have vendor/model-specific triggers in > > scsi_error. > > > > What are the drawbacks of just always refiring on AC/0x44/ITF? > > > Hmm. 'Internal target failure' is not very descriptive, so it could mean

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Christoph Hellwig
On Tue, Oct 17, 2017 at 11:10:42PM -0400, Martin K. Petersen wrote: > Please take a look at this. It missed 4.15 because I've been fighting a > hardware bug the last several weeks. However, I'd still like to get it > in shape for 4.16: > > https://git.kernel.org/pub/scm/linux/kernel/git/mkp/linux.

Re: [PATCH] scsi: Always retry internal target error

2017-10-17 Thread Hannes Reinecke
On 10/18/2017 04:58 AM, Martin K. Petersen wrote: > > Hannes, > >> +if (!strncmp(scmd->device->vendor, "EMC", 3) && >> +!strncmp(scmd->device->model, "SYMMETRIX", 9) && >> +(sshdr.asc == 0x44) && (sshdr.ascq == 0x0)) { >> +/* >> +

[PATCH V4 6/9] pm80xx : modified port reset timer value for PM8006 card

2017-10-17 Thread Viswas G
Added port reset timer value as 2000ms for PM8006 sata controller. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm80xx_hwi.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80x

[PATCH V4 1/9] pm80xx : redefine sas_identify_frame structure

2017-10-17 Thread Viswas G
sas_identify structure defined by pm80xx doesn't have CRC field. So added a new sas_identify structure without CRC. v2: - Since the structure changes is applicable for only pm80xx, sas_identify_frame_local structure moved to pm80xx_hwi.h. Signed-off-by: Raj Dinesh Signed-off-by

[PATCH V4 9/9] pm80xx : corrected linkrate value.

2017-10-17 Thread Viswas G
Corrected the value defined for LINKRATE_60 (6 Gig). Signed-off-by: Raj Dinesh Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm80xx_hwi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi

[PATCH V4 8/9] pm80xx : panic on ncq error cleaning up the read log.

2017-10-17 Thread Viswas G
when there's an error in 'ncq mode' the host has to read the ncq error log (10h) to clear the error state. however, the ccb that is setup for doing this doesn't setup the ccb so that the previous state is cleared. if the ccb was previously used for an IO n_elems is set and pm8001_ccb_task_free() tr

[PATCH V4 7/9] pm80xx : corrected SATA abort handling sequence.

2017-10-17 Thread Viswas G
Modified SATA abort handling with following steps: 1) Set device state as recovery. 2) Send phy reset. 3) Wait for reset completion. 4) After successful reset, abort all IO's to the device. 5) After aborting all IO's to device, set device state as operational. Signed-off-by: Deepak Ukey Signed-of

[PATCH V4 0/9] pm80xx updates

2017-10-17 Thread Viswas G
This patch set include some bug fixes and enhancement for pm80xx driver. Changes from V3: - Fixed kbuild warnings for patch 4 and 5. Changes from V2: - Corrected date. Changes from V1: - sas_identify_frame_local structure moved to pm80xx_hwi.h - sata abort hand

[PATCH V4 5/9] pm80xx : cleanup in pm8001_abort_task function.

2017-10-17 Thread Viswas G
v4: -Removed the unused variable ccb in pm8001_abort_task. -Removed the unused label out which is not used Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_sas.c | 51 ++-

[PATCH V4 2/9] pm80xx : ILA and inactive firmware version through sysfs

2017-10-17 Thread Viswas G
Added support to read ILA version and inactive firmware version from MPI configuration table and export through sysfs. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_ctl.c | 54 drivers/scsi/pm8001

[PATCH V4 3/9] pm80xx : Different SAS addresses for phys.

2017-10-17 Thread Viswas G
Different SAS addresses are assigned for each set of phys. Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_init.c | 13 + drivers/scsi/pm8001/pm80xx_hwi.c | 3 +-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/pm8001/pm800

[PATCH V4 4/9] pm80xx : tag allocation for phy control request.

2017-10-17 Thread Viswas G
tag is taken from the tag pool instead of using the hardcoded tag value(1). v4: - Removed the unused variable ret in pm80xx_chip_phy_ctl_req. Signed-off-by: Deepak Ukey Signed-off-by: Viswas G Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_hwi.c | 3 +++ drivers/scsi/p

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 10:18 PM, Bart Van Assche wrote: > On Tue, 2017-10-17 at 08:33 +0200, Hannes Reinecke wrote: >> How do you ensure that PREEMPT requests are not stuck in the queue >> _behind_ non-PREEMPT requests? >> Once they are in the queue the request are already allocated, so your >> deferred all

Re: [PATCH] sd: always retry READ CAPACITY for ALUA state transition

2017-10-17 Thread Hannes Reinecke
On 10/17/2017 03:57 PM, James Bottomley wrote: > On Tue, 2017-10-17 at 09:11 +0200, Hannes Reinecke wrote: >> During ALUA state transitions the device might return >> a sense code 02/04/0a (Logical unit not accessible, asymmetric >> access state transition). As this is a transient error >> we shoul

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Oleksandr Natalenko
I've indeed tested some previous versions of this patchset, but still use Ming's solution. Can it be clarified which one (Bart's or Ming's) is a correct approach? On středa 18. října 2017 1:28:14 CEST Jens Axboe wrote: > On 10/17/2017 05:26 PM, Bart Van Assche wrote: > > Hello Jens, > > > > It

Re: [PATCH 1/1] qla2xxx: Initialize Work element before requesting IRQs

2017-10-17 Thread Bart Van Assche
On Mon, 2017-10-16 at 11:26 -0700, Madhani, Himanshu wrote: > diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c > index 937209805baf..3bd956d3bc5d 100644 > --- a/drivers/scsi/qla2xxx/qla_os.c > +++ b/drivers/scsi/qla2xxx/qla_os.c > @@ -3061,6 +3061,8 @@ qla2x00_probe_one(st

[Bug 195285] qla2xxx FW immediatly crashing after target start

2017-10-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=195285 --- Comment #14 from himanshu.madh...@cavium.com --- I am OOO. I will respond to your message when i am back at work. Thanks, Himanshu -- You are receiving this mail because: You are watching the assignee of the bug.

[Bug 195285] qla2xxx FW immediatly crashing after target start

2017-10-17 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=195285 Anthony (anthony.blood...@gmail.com) changed: What|Removed |Added Status|NEW |RESOLVED R

Re: [PATCH] scsi: gdth: Convert timers to use timer_setup()

2017-10-17 Thread Kees Cook
On Tue, Oct 17, 2017 at 8:06 PM, Martin K. Petersen wrote: > > Kees, > >> Thanks for the reviews! Do you want the timer tree to carry these >> patches, or can you pick them up in the scsi tree? > > Up to you. I'm not going to rebase my 4.15 queue this late in the cycle > so the patches would end u

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Martin K. Petersen
Bart, > Only compute 'threshold' if .last_sector_bug has been set. Reduce > the number of branches that has to be taken to check the starting > LBA and transfer length alignment. Optimize the encoding of the > READ(10), WRITE(10), READ(16), WRITE(16), READ(32) and WRITE(32) > CDB encoding. Pleas

Re: [PATCH] scsi: gdth: Convert timers to use timer_setup()

2017-10-17 Thread Martin K. Petersen
Kees, > Thanks for the reviews! Do you want the timer tree to carry these > patches, or can you pick them up in the scsi tree? Up to you. I'm not going to rebase my 4.15 queue this late in the cycle so the patches would end up going in at the end of the merge window. If you prefer to have them h

Re: [PATCH] scsi: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry

2017-10-17 Thread Martin K. Petersen
Hannes, > All EMC SYMMETRIX support REPORT_LUNS, even if configured to report > SCSI-2 for whatever reason. Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: Always retry internal target error

2017-10-17 Thread Martin K. Petersen
Hannes, > + if (!strncmp(scmd->device->vendor, "EMC", 3) && > + !strncmp(scmd->device->model, "SYMMETRIX", 9) && > + (sshdr.asc == 0x44) && (sshdr.ascq == 0x0)) { > + /* > + * EMC Symmetrix returns 'Internal targ

Re: [PATCH] scsi: Do not retry invalid function error

2017-10-17 Thread Martin K. Petersen
Hannes, > Hitachi USP-V returns 'Invalid function' when the internal staging > mechanism encountered an error. These errors should not be retried on > another path. s/invalid/illegal/ Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: Add TRY_VPD_PAGES to HITACHI OPEN-V blacklist entry

2017-10-17 Thread Martin K. Petersen
Hannes, > HITACHI is always supporting VPD pages, even though it's claiming to > support SCSI Revision 3 only. Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: Add 'AIX VDASD' to blacklist

2017-10-17 Thread Martin K. Petersen
Hannes, > The AIX VDASD devices do support VPD pages, but implement only SPC. So > set BLIST_TRY_VPD_PAGS to correctly display the VPD information in > sysfs. Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: sg: Re-fix off by one in sg_fill_request_table()

2017-10-17 Thread Martin K. Petersen
Ben, > Commit 109bade9c625 ("scsi: sg: use standard lists for sg_requests") > introduced an off-by-one error in sg_ioctl(), which was fixed by > commit bd46fc406b30 ("scsi: sg: off by one in sg_ioctl()"). > > Unfortunately commit 4759df905a47 ("scsi: sg: factor out > sg_fill_request_table()") mov

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Jens Axboe
On 10/17/2017 05:40 PM, Bart Van Assche wrote: > On Tue, 2017-10-17 at 17:28 -0600, Jens Axboe wrote: >> On 10/17/2017 05:26 PM, Bart Van Assche wrote: >>> It is known that during the resume following a hibernate, especially when >>> using an md RAID1 array created on top of SCSI devices, sometimes

Re: [PATCH 0/2] block/SCSI MQ: two RESTART related patches

2017-10-17 Thread Ming Lei
On Tue, Oct 17, 2017 at 04:47:23PM +0100, John Garry wrote: > On 17/10/2017 06:12, Ming Lei wrote: > > On Tue, Oct 17, 2017 at 01:04:16PM +0800, Ming Lei wrote: > > > Hi Jens, > > > > > > The 1st patch runs idle hctx after dealy in scsi_mq_get_budget(), > > > so that we can keep same behaviour wit

Re: [PATCH V8 4/5] libsas: Align SMP req/resp todma_get_cache_alignment()

2017-10-17 Thread 陈华才
Hi, Marek, Yes, I know in include/linux/slab.h, there is #define KMALLOC_MIN_SIZE ARCH_DMA_MINALIGN But I observed that the req/resp isn't aligned to ARCH_DMA_MINALIGN and I don't know why. Problems I experienced is: In non-coherent mode, mvsas with an expander cannot detect any disks. Huacai

Re: [PATCH V8 5/5] libata: Align DMA buffer todma_get_cache_alignment()

2017-10-17 Thread 陈华才
Hi, Sergei, Without this patch, in non-coherent mode, ata_do_set_mode() return with "no PIO support", and disk detection fails. Huacai -- Original -- From: "Sergei Shtylyov"; Date: Tue, Oct 17, 2017 05:43 PM To: "Huacai Chen"; "Christoph Hellwig"; Cc: "Ma

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 17:28 -0600, Jens Axboe wrote: > On 10/17/2017 05:26 PM, Bart Van Assche wrote: > > It is known that during the resume following a hibernate, especially when > > using an md RAID1 array created on top of SCSI devices, sometimes the system > > hangs instead of coming up properl

Re: [PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Jens Axboe
On 10/17/2017 05:26 PM, Bart Van Assche wrote: > Hello Jens, > > It is known that during the resume following a hibernate, especially when > using an md RAID1 array created on top of SCSI devices, sometimes the system > hangs instead of coming up properly. This patch series fixes that > problem. T

[PATCH v10 02/10] md: Introduce md_stop_all_writes()

2017-10-17 Thread Bart Van Assche
Introduce md_stop_all_writes() because the next patch will add a second caller for this function. This patch does not change any functionality. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Shaohua Li Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Cc:

[PATCH v10 10/10] block, nvme: Introduce blk_mq_req_flags_t

2017-10-17 Thread Bart Van Assche
Several block layer and NVMe core functions accept a combination of BLK_MQ_REQ_* flags through the 'flags' argument but there is no verification at compile time whether the right type of block layer flags is passed. Make it possible for sparse to verify this. This patch does not change any function

[PATCH v10 05/10] block: Introduce blk_get_request_flags()

2017-10-17 Thread Bart Van Assche
A side effect of this patch is that the GFP mask that is passed to several allocation functions in the legacy block layer is changed from GFP_KERNEL into __GFP_DIRECT_RECLAIM. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Cc: Christoph Hellwig Cc: Mi

[PATCH v10 06/10] block: Introduce BLK_MQ_REQ_PREEMPT

2017-10-17 Thread Bart Van Assche
Set RQF_PREEMPT if BLK_MQ_REQ_PREEMPT is passed to blk_get_request_flags(). Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Cc: Christoph Hellwig Cc: Ming Lei Cc: Johannes Thumshirn --- block/blk-core.c | 4 +++- block/blk-mq.c | 2 ++

[PATCH v10 07/10] ide, scsi: Tell the block layer at request allocation time about preempt requests

2017-10-17 Thread Bart Van Assche
Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request_flags(q, op, BLK_MQ_PREEMPT). This patch does not change any functionality. Signed-off-by: Bart Van Assche Tested-by: Martin Steigerwald Acked-by: David S. Miller [ for IDE ] Acked-by: Martin K. Petersen Reviewed-by: Hannes Rei

[PATCH v10 01/10] md: Rename md_notifier into md_reboot_notifier

2017-10-17 Thread Bart Van Assche
This avoids confusion with the pm notifier that will be added through a later patch. Signed-off-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Shaohua Li Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Cc: linux-r...@vger.kernel.org Cc: Ming Lei Cc: Christoph Hel

[PATCH v10 08/10] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag

2017-10-17 Thread Bart Van Assche
This flag will be used in the next patch to let the block layer core know whether or not a SCSI request queue has been quiesced. A quiesced SCSI queue namely only processes RQF_PREEMPT requests. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Tested-by: Martin Steigerwald Cc: Ming L

[PATCH v10 04/10] block: Make q_usage_counter also track legacy requests

2017-10-17 Thread Bart Van Assche
From: Ming Lei This patch makes it possible to pause request allocation for the legacy block layer by calling blk_mq_freeze_queue() and blk_mq_unfreeze_queue(). Signed-off-by: Ming Lei [ bvanassche: Combined two patches into one, edited a comment and made sure REQ_NOWAIT is handled properly i

[PATCH v10 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Bart Van Assche
The contexts from which a SCSI device can be quiesced or resumed are: * Writing into /sys/class/scsi_device/*/device/state. * SCSI parallel (SPI) domain validation. * The SCSI device power management methods. See also scsi_bus_pm_ops. It is essential during suspend and resume that neither the file

[PATCH v10 03/10] md: Neither resync nor reshape while the system is frozen

2017-10-17 Thread Bart Van Assche
Some people use the md driver on laptops and use the suspend and resume functionality. Since it is essential that submitting of new I/O requests stops before a hibernation image is created, interrupt the md resync and reshape actions if the system is being frozen. Note: the resync and reshape will

[PATCH v10 00/10] block, scsi, md: Improve suspend and resume

2017-10-17 Thread Bart Van Assche
Hello Jens, It is known that during the resume following a hibernate, especially when using an md RAID1 array created on top of SCSI devices, sometimes the system hangs instead of coming up properly. This patch series fixes that problem. These patches have been tested on top of the block layer for

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 18:17 -0400, Douglas Gilbert wrote: > On 2017-10-17 05:03 PM, Bart Van Assche wrote: > > @@ -1025,7 +1025,6 @@ static int sd_setup_read_write_cmnd(struct scsi_cmnd > > *SCpnt) > > struct gendisk *disk = rq->rq_disk; > > struct scsi_disk *sdkp = scsi_disk(disk); > >

Re: [PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Douglas Gilbert
On 2017-10-17 05:03 PM, Bart Van Assche wrote: Only compute 'threshold' if .last_sector_bug has been set. Reduce the number of branches that has to be taken to check the starting LBA and transfer length alignment. Optimize the encoding of the READ(10), WRITE(10), READ(16), WRITE(16), READ(32) and

Re: integer overflow in aic7xxx (was [bug report] Linux-2.6.12-rc2)

2017-10-17 Thread Dan Carpenter
Argh... My script chose a stupid subject. Sorry for not catching that. regards, dan carpenter On Wed, Oct 18, 2017 at 12:52:49AM +0300, Dan Carpenter wrote: > Hey, > > This code is older than git is so it probably doesn't matter. But just > for laughs does anyone know what this should be? >

[bug report] Linux-2.6.12-rc2

2017-10-17 Thread Dan Carpenter
Hey, This code is older than git is so it probably doesn't matter. But just for laughs does anyone know what this should be? drivers/scsi/aic7xxx/aic7xxx_core.c:4807 ahc_init_scbdata() warn: integer overflow (literal): u32max + 1 drivers/scsi/aic7xxx/aic7xxx_core.c 4794 47

Re: [PATCH v4 2/5] dt-bindings: scsi: ufs: add document for hisi-ufs

2017-10-17 Thread Rob Herring
On Fri, Oct 13, 2017 at 03:49:33PM +0800, Li Wei wrote: > add ufs node document for Hisilicon. > > Signed-off-by: Li Wei > --- > Documentation/devicetree/bindings/ufs/ufs-hisi.txt | 47 > ++ > 1 file changed, 47 insertions(+) > create mode 100644 Documentation/devicetree/bi

[PATCH] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-17 Thread Bart Van Assche
Only compute 'threshold' if .last_sector_bug has been set. Reduce the number of branches that has to be taken to check the starting LBA and transfer length alignment. Optimize the encoding of the READ(10), WRITE(10), READ(16), WRITE(16), READ(32) and WRITE(32) CDB encoding. Signed-off-by: Bart Van

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:33 +0200, Hannes Reinecke wrote: > How do you ensure that PREEMPT requests are not stuck in the queue > _behind_ non-PREEMPT requests? > Once they are in the queue the request are already allocated, so your > deferred allocation won't work. > _And_ deferred requests will be

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:43 +0800, Ming Lei wrote: > On Mon, Oct 16, 2017 at 04:29:04PM -0700, Bart Van Assche wrote: > > [ ... ] > > int > > scsi_device_quiesce(struct scsi_device *sdev) > > { > > + struct request_queue *q = sdev->request_queue; > > int err; > > > > + /* > > +* It

Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-17 Thread Bart Van Assche
On 10/16/17 23:38, Hannes Reinecke wrote: Again, these are just some pre-defined values to avoid I/O starvation when having several LUNs. _if_ we can guarantee I/O fairness between several (hundreds!) devices all sharing the same tagspace we wouldn't need these variables. I think we already hav

[PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-17 Thread Cathy Avery
When running multipath on a VM if all available paths go down the driver can schedule large amounts of storvsc_remove_lun work items to the same lun. In response to the failing paths typically storvsc responds by taking host->scan_mutex and issuing a TUR per lun. If there has been heavy IO to the f

[PATCH] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-17 Thread Cathy Avery
When running multipath on a VM if all available paths go down the driver can schedule large amounts of storvsc_remove_lun work items to the same lun. In response to the failing paths typically storvsc responds by taking host->scan_mutex and issuing a TUR per lun. If there has been heavy IO to the f

Re: [PATCH] scsi: libiscsi: Convert timers to use timer_setup()

2017-10-17 Thread Chris Leech
Reviewed-by: Chris Leech - Original Message - > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Lee Duncan > Cc: Chris Leech > Cc:

Re: [PATCH 0/2] block/SCSI MQ: two RESTART related patches

2017-10-17 Thread John Garry
On 17/10/2017 06:12, Ming Lei wrote: On Tue, Oct 17, 2017 at 01:04:16PM +0800, Ming Lei wrote: Hi Jens, The 1st patch runs idle hctx after dealy in scsi_mq_get_budget(), so that we can keep same behaviour with before, and it can be thought as a fix. The 2nd patch cleans up RESTART, and removes

[GIT PULL] SCSI fixes for 4.14-rc5

2017-10-17 Thread James Bottomley
Four mostly error leg fixes and one more important regression in a prior commit (the qla2xxx one). The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Hannes Reinecke (1):   scsi: fixup kernel warning during rmmod() Jo

Re: scsi: Add TRY_VPD_PAGES to HITACHI OPEN-V blacklist entry

2017-10-17 Thread Xose Vazquez Perez
On 10/17/2017 09:10 AM, Hannes Reinecke wrote: > HITACHI is always supporting VPD pages, even though it's claiming > to support SCSI Revision 3 only. "HP/OPEN-" is also affected. HP XP is a rebrand of HITACHI VSP. {"HP", "OPEN-", "*", BLIST_REPORTLUN2}, /* HP XP Arrays */ > Signed-off-by: Han

Re: [PATCH] scsi: gdth: Convert timers to use timer_setup()

2017-10-17 Thread Kees Cook
On Mon, Oct 16, 2017 at 9:09 PM, Martin K. Petersen wrote: > > Kees, > >> In preparation for unconditionally passing the struct timer_list >> pointer to all timer callbacks, switch to using the new timer_setup() >> and from_timer() to pass the timer pointer explicitly. > > Reviewed-by: Martin K. P

Re: [PATCH] scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP

2017-10-17 Thread Laurence Oberman
On Tue, 2017-10-17 at 10:26 -0400, Laurence Oberman wrote: > On Fri, 2017-09-29 at 10:01 -0400, Laurence Oberman wrote: > > On Fri, 2017-09-29 at 09:21 -0400, Martin K. Petersen wrote: > > > Laurence, > > > > > > > I am testing this but its not being picked up so I want to know > > > > if > > > >

Re: [PATCH v2 5/8] target: Use sgl_alloc_order() and sgl_free()

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:14 +0200, Hannes Reinecke wrote: > On 10/17/2017 12:49 AM, Bart Van Assche wrote: > > [ ... ] > > void target_free_sgl(struct scatterlist *sgl, int nents) > > { > > - struct scatterlist *sg; > > - int count; > > - > > - for_each_sg(sgl, sg, nents, count) > > -

Re: [PATCH v2 7/8] scsi/pmcraid: Remove an unused structure member

2017-10-17 Thread Bart Van Assche
On Tue, 2017-10-17 at 08:21 +0200, Hannes Reinecke wrote: > On 10/17/2017 12:49 AM, Bart Van Assche wrote: > > Signed-off-by: Bart Van Assche > > Reviewed-by: Johannes Thumshirn > > Cc: linux-scsi@vger.kernel.org > > Cc: Martin K. Petersen > > Cc: Anil Ravindranath > > --- > > drivers/scsi/pmc

Re: [PATCH] scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP

2017-10-17 Thread Laurence Oberman
On Fri, 2017-09-29 at 10:01 -0400, Laurence Oberman wrote: > On Fri, 2017-09-29 at 09:21 -0400, Martin K. Petersen wrote: > > Laurence, > > > > > I am testing this but its not being picked up so I want to know > > > if > > > I > > > have the kernel command line wrong here. > > > > > > scsi_dev_fl

Re: [PATCH] sd: always retry READ CAPACITY for ALUA state transition

2017-10-17 Thread James Bottomley
On Tue, 2017-10-17 at 09:11 +0200, Hannes Reinecke wrote: > During ALUA state transitions the device might return > a sense code 02/04/0a (Logical unit not accessible, asymmetric > access state transition). As this is a transient error > we should just retry the READ CAPACITY call until > the state

Re: [PATCH] scsi: sg: Re-fix off by one in sg_fill_request_table()

2017-10-17 Thread Douglas Gilbert
On 2017-10-15 01:16 PM, Ben Hutchings wrote: Commit 109bade9c625 ("scsi: sg: use standard lists for sg_requests") introduced an off-by-one error in sg_ioctl(), which was fixed by commit bd46fc406b30 ("scsi: sg: off by one in sg_ioctl()"). Unfortunately commit 4759df905a47 ("scsi: sg: factor out

Re: [PATCH V8 4/5] libsas: Align SMP req/resp to dma_get_cache_alignment()

2017-10-17 Thread Marek Szyprowski
Hi Huacai, On 2017-10-17 10:05, Huacai Chen wrote: In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so libsas's SMP request/response should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if

Re: [PATCH v2 12/15] RDMA/cma: make config_item_type const

2017-10-17 Thread Leon Romanovsky
On Mon, Oct 16, 2017 at 05:18:51PM +0200, Bhumika Goyal wrote: > Make these structures const as they are either passed to the functions > having the argument as const or stored as a reference in the "ci_type" > const field of a config_item structure. > > Signed-off-by: Bhumika Goyal > --- > * Chan

Re: [PATCH v9 09/10] block, scsi: Make SCSI quiesce and resume work reliably

2017-10-17 Thread Ming Lei
On Tue, Oct 17, 2017 at 08:33:36AM +0200, Hannes Reinecke wrote: > On 10/17/2017 01:29 AM, Bart Van Assche wrote: > > The contexts from which a SCSI device can be quiesced or resumed are: > > * Writing into /sys/class/scsi_device/*/device/state. > > * SCSI parallel (SPI) domain validation. > > * Th

Re: [PATCH v2 07/15] usb: gadget: configfs: make config_item_type const

2017-10-17 Thread Felipe Balbi
Bhumika Goyal writes: > Make config_item_type structures const as they are either passed to a > function having the argument as const or stored in the const "ci_type" > field of a config_item structure. > > Done using Coccinelle. > > Signed-off-by: Bhumika Goyal Acked-by: Felipe Balbi -- bal

Re: [PATCH v2 11/15] stm class: make config_item_type const

2017-10-17 Thread Greg KH
On Mon, Oct 16, 2017 at 05:18:50PM +0200, Bhumika Goyal wrote: > Make config_item_type structures const as they are either passed to a > function having the argument as const or used inside a if statement or > stored in the const "ci_type" field of a config_item structure. > > Done using Coccinell

Re: [PATCH v2 01/15] configfs: make ci_type field, some pointers and function arguments const

2017-10-17 Thread Greg KH
On Mon, Oct 16, 2017 at 05:18:40PM +0200, Bhumika Goyal wrote: > The ci_type field of the config_item structure do not modify the fields > of the config_item_type structure it points to. And the other pointers > initialized with ci_type do not modify the fields as well. > So, make the ci_type field

Re: [PATCH v2 00/15] make structure field, function arguments and structures const

2017-10-17 Thread Greg KH
On Tue, Oct 17, 2017 at 12:16:18PM +0200, Julia Lawall wrote: > > > On Tue, 17 Oct 2017, Greg KH wrote: > > > On Mon, Oct 16, 2017 at 05:18:39PM +0200, Bhumika Goyal wrote: > > > Make the ci_type field and some function arguments as const. After this > > > change, make config_item_type structure

Re: [PATCH v2 08/15] nvmet: make config_item_type const

2017-10-17 Thread Sagi Grimberg
Acked-by: Sagi Grimberg

Re: [PATCH v2 00/15] make structure field, function arguments and structures const

2017-10-17 Thread Julia Lawall
On Tue, 17 Oct 2017, Greg KH wrote: > On Mon, Oct 16, 2017 at 05:18:39PM +0200, Bhumika Goyal wrote: > > Make the ci_type field and some function arguments as const. After this > > change, make config_item_type structures as const. > > > > * Changes in v2- Combine all the followup patches and th

Re: [PATCH v2 00/15] make structure field, function arguments and structures const

2017-10-17 Thread Greg KH
On Mon, Oct 16, 2017 at 05:18:39PM +0200, Bhumika Goyal wrote: > Make the ci_type field and some function arguments as const. After this > change, make config_item_type structures as const. > > * Changes in v2- Combine all the followup patches and the constification > patches into a series. Who d

Re: [PATCH V8 5/5] libata: Align DMA buffer to dma_get_cache_alignment()

2017-10-17 Thread Sergei Shtylyov
On 10/17/2017 11:05 AM, Huacai Chen wrote: In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so in ata_do_dev_read_id() the DMA buffer should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and i

Re: [PATCH V7 4/6] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-17 Thread Ming Lei
On Tue, Oct 17, 2017 at 08:38:01AM +0200, Hannes Reinecke wrote: > On 10/17/2017 03:29 AM, Ming Lei wrote: > > On Mon, Oct 16, 2017 at 01:30:09PM +0200, Hannes Reinecke wrote: > >> On 10/13/2017 07:29 PM, Ming Lei wrote: > >>> On Fri, Oct 13, 2017 at 05:08:52PM +, Bart Van Assche wrote: >

Re: [PATCH v2 1/8] lib/scatterlist: Introduce sgl_alloc() and sgl_free()

2017-10-17 Thread Johannes Thumshirn
Thanks Bart, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-17 Thread Felipe Balbi
Hi, Bhumika Goyal writes: > Make these structures const as they are only passed to the const > argument of the functions config_{group/item}_init_type_name. > > Signed-off-by: Bhumika Goyal > --- > * Changes in v2- Combine all the followup patches and the constification > patches into a series.

[PATCH V8 2/5] MIPS: Implement dma_map_ops::get_cache_alignment()

2017-10-17 Thread Huacai Chen
Currently, MIPS is an architecture which support coherent & noncoherent devices co-exist. So implement get_cache_alignment() function pointer in 'struct dma_map_ops' to return different dma alignments. Cc: sta...@vger.kernel.org Signed-off-by: Huacai Chen --- arch/mips/cavium-octeon/dma-octeon.c

[PATCH V8 4/5] libsas: Align SMP req/resp to dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so libsas's SMP request/response should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data, cache_invalidate

[PATCH V8 3/5] scsi: Align block queue to dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so scsi's block queue should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data, cache_invalidate (no writeb

[PATCH V8 5/5] libata: Align DMA buffer to dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so in ata_do_dev_read_id() the DMA buffer should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data, cache_i

[PATCH V8 1/5] dma-mapping: Rework dma_get_cache_alignment()

2017-10-17 Thread Huacai Chen
Make dma_get_cache_alignment() to accept a 'dev' argument. As a result, it can return different alignments due to different devices' I/O cache coherency. Currently, ARM/ARM64 and MIPS support coherent & noncoherent devices co-exist. This may be extended in the future, so add a new function pointer

Re: [PATCH] scsi: libfc: Convert timers to use timer_setup()

2017-10-17 Thread Johannes Thumshirn
Looks good, Acked-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürn

[PATCH] scsi: Add 'AIX VDASD' to blacklist

2017-10-17 Thread Hannes Reinecke
The AIX VDASD devices do support VPD pages, but implement only SPC. So set BLIST_TRY_VPD_PAGS to correctly display the VPD information in sysfs. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_devinfo.c b/driver

[PATCH] scsi: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry

2017-10-17 Thread Hannes Reinecke
From: Kurt Garloff All EMC SYMMETRIX support REPORT_LUNS, even if configured to report SCSI-2 for whatever reason. Signed-off-by: Kurt Garloff Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_d

[PATCH] scsi: Add TRY_VPD_PAGES to HITACHI OPEN-V blacklist entry

2017-10-17 Thread Hannes Reinecke
HITACHI is always supporting VPD pages, even though it's claiming to support SCSI Revision 3 only. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index ae

[PATCH] scsi: Always retry internal target error

2017-10-17 Thread Hannes Reinecke
EMC Symmetrix is returning 'internal target error' for a variety of conditions, most of which will be transient. So we should always retry it, even with failfast set. Otherwise we'd get spurious path flaps with multipath. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_error.c | 13

[PATCH] sd: always retry READ CAPACITY for ALUA state transition

2017-10-17 Thread Hannes Reinecke
During ALUA state transitions the device might return a sense code 02/04/0a (Logical unit not accessible, asymmetric access state transition). As this is a transient error we should just retry the READ CAPACITY call until the state transition finishes and the correct capacity can be returned. Sign

[PATCH] scsi: Handle power-on reset unit attention

2017-10-17 Thread Hannes Reinecke
As per SAM there is a status precedence, with any sense code 29/XX taking second place just after an ACA ACTIVE status. Additionally, each target might prefer to not queue any unit attention conditions, but just report one. Due to the above this will be that one with the highest precedence. This re

[PATCH] scsi: Do not retry invalid function error

2017-10-17 Thread Hannes Reinecke
Hitachi USP-V returns 'Invalid function' when the internal staging mechanism encountered an error. These errors should not be retried on another path. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_error.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/scsi_error.c b/driv