Re: [PATCHv3 00/14] libata: ZAC support

2016-04-25 Thread Hannes Reinecke
On 04/26/2016 02:42 AM, Damien Le Moal wrote: > > Hannes, > >> Hi all, >> >> here's a patchset implementing ZAC support for libata. >> >> This is the second part of a larger patchset for ZAC/ZBC support; >> it requires the scsi trace fixes queued for in mkp/4.7/scsi-queue and >> the patchset

Re: [PATCH] scsi: fc: force inlining of wwn conversion functions

2016-04-25 Thread James Bottomley
On Mon, 2016-04-25 at 22:40 -0400, Martin K. Petersen wrote: > > > > > > "Josh" == Josh Poimboeuf writes: > > Josh> Can you merge this patch for 4.6? > > I am really not a big fan of working around compiler bugs in a device > driver. Me neither > Are we sure there are no

Re: [PATCH] scsi: fc: force inlining of wwn conversion functions

2016-04-25 Thread Martin K. Petersen
> "Josh" == Josh Poimboeuf writes: Josh> Can you merge this patch for 4.6? I am really not a big fan of working around compiler bugs in a device driver. Are we sure there are no other get_unaligned_be64() calls in the kernel that suffer the same fate? -- Martin K.

Re: [PATCH] MAINTAINERS: Update the file list for the NCR 5380 entry

2016-04-25 Thread Martin K. Petersen
> "Finn" == Finn Thain writes: Finn> The file atari_NCR5380.c has been removed from the tree so remove Finn> it from the MAINTAINERS file as well. Finn> While we are here, add the file dtc3x80.txt as it is only relevant Finn> to the dtc driver. Applied to

Re: [PATCH 1/1] scsi: add Synology DSM 6.0 and higher to 1024 sector blacklist

2016-04-25 Thread Martin K. Petersen
> "Michel" == Michel Meyers writes: Michel> I am currently running tests with an unmodified Debian Michel> 4.4.0-1-amd64 kernel, so unless I can reproduce the problem, I Michel> suggest we leave the current blacklist as is (thereby only Michel> quirking the pre-6.0

Re: [PATCH] st: clear ILI if Medium Error

2016-04-25 Thread Martin K. Petersen
> "Kai" == Kai Makisara writes: Kai> Some drives set the ILI flag together with MEDIUM ERROR sense Kai> code. Clear the ILI flag in this case so that the medium error will Kai> be handled. The problem was reported by Maurizio Lombardi. Applied to 4.7/scsi-queue.

Re: [PATCH] lpfc: remove incorrect lockdep assertion

2016-04-25 Thread Martin K. Petersen
> "Sebastian" == Sebastian Herbszt writes: Sebastian> Remove incorrect lockdep assertion from Sebastian> lpfc_sli_hbqbuf_find() which acquires the hbalock itself. Fix Sebastian> the comment which resulted in this mistake. Applied to 4.7/scsi-queue. -- Martin K. Petersen

Re: [patch] bnx2i: silence uninitialized variable warnings

2016-04-25 Thread Martin K. Petersen
> "Dan" == Dan Carpenter writes: Dan> Presumably it isn't possible to have empty lists here, but my Dan> static checker doesn't know that and complains that "ep" can be Dan> used uninitialized. Applied to 4.7/scsi-queue. -- Martin K. Petersen Oracle Linux

Re: [patch] hpsa: set the enclosure identifier to zero

2016-04-25 Thread Martin K. Petersen
> "Dan" == Dan Carpenter writes: Dan> This has only called from show_sas_rphy_enclosure_identifier(). Dan> The caller expects that we set an identifier, otherwise it uses an Dan> unintialized variable. Applied to 4.7/scsi-queue. -- Martin K. Petersen Oracle

Re: [PATCH v2] mpt3sas - remove unused fw_event_work elements

2016-04-25 Thread Martin K. Petersen
> "Joe" == Joe Lawrence writes: Joe> Firmware events are queued up using the fw_event_work's struct Joe> work, not its delayed_work member. The initial driver for SAS2 Joe> controllers had handled firmware reset using the rescan barrier and Joe> was later

Re: [PATCH] megaraid_sas: trivial fix, add missing space in dev_err message

2016-04-25 Thread Joe Perches
On Mon, 2016-04-25 at 22:58 +0100, Colin King wrote: > From: Colin Ian King > > Add a missing space in dev_err message, missed because the string > spans a few lines. This is a dev_notice() not dev_err(). > diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c >

Re: [PATCHv3 00/14] libata: ZAC support

2016-04-25 Thread Damien Le Moal
Hannes, >Hi all, > >here's a patchset implementing ZAC support for libata. > >This is the second part of a larger patchset for ZAC/ZBC support; >it requires the scsi trace fixes queued for in mkp/4.7/scsi-queue and >the patchset 'libata: SATL update' queued in tj/for-4.7-zac. >The full patchset

[PATCH] megaraid_sas: trivial fix, add missing space in dev_err message

2016-04-25 Thread Colin King
From: Colin Ian King Add a missing space in dev_err message, missed because the string spans a few lines. Signed-off-by: Colin Ian King --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] iscsi-target: graceful disconnect on invalid mapping to iovec

2016-04-25 Thread Imran Haider
Ensures the first page entry is within bounds. A failed check would terminate the iSCSI connection instead of causing a NULL-dereference. This violation seems to happen with certain iSCSI commands where the computed CDB length is zero but the expected transfer length is non-zero. The real problem

Re: [PATCH]sd: Don't treat succeeded SYNC as error

2016-04-25 Thread Bart Van Assche
On 04/25/2016 03:36 AM, Jinpu Wang wrote: We hit IO error on fsync, it turns out was because sd treat succeeded SYNC as error. From what I checked in SBC spec there is no indication we should fail IO in this case, so we create this patch. Please follow the rules in

Re: [PATCH] libfc: replace 'rp_mutex' with 'rp_lock'

2016-04-25 Thread Ewan D. Milne
On Mon, 2016-04-25 at 10:01 +0200, Hannes Reinecke wrote: > We cannot use an embedded mutex in a structure with reference > counting, as mutex unlock might be delayed, and the waiters > might then access an already freed memory area. > So convert it to a spinlock. > > For details cf

Re: [PATCH] cxgbi: fix uninitialized flowi6

2016-04-25 Thread David Miller
From: Jiri Benc Date: Fri, 22 Apr 2016 13:09:13 +0200 > ip6_route_output looks into different fields in the passed flowi6 structure, > yet cxgbi passes garbage in nearly all those fields. Zero the structure out > first. > > Fixes: fc8d0590d9142 ("libcxgbi: Add ipv6 api to

Re: [PATCHv3 00/14] libata: ZAC support

2016-04-25 Thread Tejun Heo
Hello, On Mon, Apr 25, 2016 at 12:45:42PM +0200, Hannes Reinecke wrote: > here's a patchset implementing ZAC support for libata. > > This is the second part of a larger patchset for ZAC/ZBC support; > it requires the scsi trace fixes queued for in mkp/4.7/scsi-queue and > the patchset 'libata:

Re: [PATCH v4] qla1280: Reduce can_queue to 512

2016-04-25 Thread James Bottomley
On Mon, 2016-04-25 at 16:44 +0200, Johannes Thumshirn wrote: > The qla1280 driver sets the scsi_host_template's can_queue field to > 0xf > which results in an allocation failure when allocating the block > layer tags > for the driver's queues like the one shown below: > > [4.804166] scsi

Re: [PATCH v4] qla1280: Reduce can_queue to 512

2016-04-25 Thread Lee Duncan
On 04/25/2016 07:44 AM, Johannes Thumshirn wrote: > The qla1280 driver sets the scsi_host_template's can_queue field to 0xf > which results in an allocation failure when allocating the block layer tags > for the driver's queues like the one shown below: > > [4.804166] scsi host0: QLogic

[PATCH 03/12] scsi_debug: replace jiffy timers with hr timers

2016-04-25 Thread Douglas Gilbert
The driver supports two command delay interfaces, the original one whose unit is a jiffy, and a newer one whose unit is a nanosecond. Each had different implementations. Keep both interfaces but simplify the implemenation to use a single delay mechanism based on high resolution timers.

[Bug 116751] Double-Fetch bug in Linux-4.5/drivers/scsi/aacraid/commctrl.c

2016-04-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=116751 --- Comment #1 from Pengfei Wang --- Created attachment 214111 --> https://bugzilla.kernel.org/attachment.cgi?id=214111=edit source file -- You are receiving this mail because: You are watching the assignee of the

[PATCH 08/12] scsi_debug: rework resp_report_luns

2016-04-25 Thread Douglas Gilbert
Based on "[PATH V2] scsi_debug: rework resp_report_luns" patch sent by Tomas Winkler on Thursday, 26 Feb 2015. His notes: 1. Remove duplicated boundary checks which simplify the fill-in loop 2. Use more of scsi generic API Replace fixed length response array a with heap allocation

[PATCH 10/12] scsi_debug: vpd and mode page work

2016-04-25 Thread Douglas Gilbert
Cleanup some mode and vpd pages. Stop reporting SBC (disk) pages when peripheral type is something else (e.g. tape). Update version descriptors. Expand LBPRZ flag handling. Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_debug.c | 167

[PATCH 12/12] scsi_debug: use locally assigned naa

2016-04-25 Thread Douglas Gilbert
Change NAA addresses used for SAS addresses from fake IEEE registered NAA (5) to locally assigned NAA (3). Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_debug.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git

[PATCH 09/12] scsi_debug: add multiple queue support

2016-04-25 Thread Douglas Gilbert
Add submit_queue parameter (minimum and default: 1; maximum: nr_cpu_ids) that controls how many queues are built, each with their own lock and in_use bit vector. Add statistics parameter which is default on. Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_debug.c |

[PATCH 11/12] scsi_debug: uuid for lu name

2016-04-25 Thread Douglas Gilbert
Permit changing of a LU name from a (fake) IEEE registered NAA (5) to a locally assigned UUID. Using a UUID (RFC 4122) for a SCSI designator descriptor (e.g. a LU name) was added in spc5r08.pdf (a draft INCITS standard) on 25 January 2016. Add parameter uuid_ctl to use a separate UUID for each LU

[PATCH 07/12] scsi_debug: use likely hints on fast path

2016-04-25 Thread Douglas Gilbert
The most common commands in normal use are the READ and WRITE SCSI commands. Use likely and unlikely hints along the path taken by these commands. Rename check_readiness() to make_ua() and remove associated dead code. Rename devInfoReg() to find_build_dev_info(). Signed-off-by: Douglas Gilbert

[PATCH 06/12] scsi_debug: re-order file scope declarations

2016-04-25 Thread Douglas Gilbert
Group most defines together first; followed by struct definitions and then table and variable definitions. Normalize all function headers. Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_debug.c | 314 ++ 1 file changed,

[PATCH 00/12] scsi_debug: multiple queue support and cleanup

2016-04-25 Thread Douglas Gilbert
Primary reason for this patch series is to add multi queue support modelled on the null_blk driver. Ignore host_lock option but keep parameter for backward compatibility. Use high resolution timers to implement both the jiffy and nanosecond delay parameters. Replace the tasklets with work items.

[PATCH 04/12] scsi_debug: make jiffy delay name clearer

2016-04-25 Thread Douglas Gilbert
Add 'j' to delay names to make it clearer that its unit is jiffies and to differentiate it from sdebug_ndelay whose unit is nanoseconds. Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_debug.c | 46 +++--- 1 file changed, 23

[PATCH 02/12] scsi_debug: ignore host lock option

2016-04-25 Thread Douglas Gilbert
Remove logic to optionally hold host_lock while each command is queued. Keep module and sysfs host_lock parameters for backward compatibility. Note in module parameter description that host_lock is ignored. Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_debug.c | 44

[PATCH 05/12] scsi_debug: replace tasklet with work queue

2016-04-25 Thread Douglas Gilbert
When a negative value was placed in the delay parameter, a tasklet was scheduled. Change the tasklet to a work queue. Previously a delay of -1 scheduled a high priority tasklet; since there are no high priority work queues, treat -1 like other negative values in delay and schedule a work item.

[PATCH 01/12] scsi_debug: cleanup naming and bit crunching

2016-04-25 Thread Douglas Gilbert
Shorten file scope static and constant names. Use more get/put_unaligned calls to hide bit banging. Introduce sdebug_verbose boolean to replace frequent masking of option bit flags. Add GPL and bump version. Signed-off-by: Douglas Gilbert --- drivers/scsi/scsi_debug.c |

Re: [PATCH] scsi: fc: force inlining of wwn conversion functions

2016-04-25 Thread Josh Poimboeuf
James, Can you merge this patch for 4.6? On Tue, Apr 19, 2016 at 08:56:00AM -0500, Josh Poimboeuf wrote: > objtool reports [1] the following warning: > > drivers/scsi/qla2xxx/qla_attr.o: warning: objtool: > qla2x00_get_host_fabric_name() falls through to next function >

[PATCH v4] qla1280: Reduce can_queue to 512

2016-04-25 Thread Johannes Thumshirn
The qla1280 driver sets the scsi_host_template's can_queue field to 0xf which results in an allocation failure when allocating the block layer tags for the driver's queues like the one shown below: [4.804166] scsi host0: QLogic QLA1040 PCI to SCSI Host Adapter Firmware version: 7.65.06,

Re: [PATCH v3] qla1280: Reduce can_queue to 512

2016-04-25 Thread James Bottomley
On Mon, 2016-04-25 at 09:16 +0200, Johannes Thumshirn wrote: > The qla1280 driver sets the scsi_host_template's can_queue field to > 0xf > which results in an allocation failure when allocating the block > layer tags > for the driver's queues like the one shown below: > > [4.804166] scsi

Re: [PATCHv3 13/14] libata: support device-managed ZAC devices

2016-04-25 Thread Sergei Shtylyov
Hello. On 4/25/2016 1:45 PM, Hannes Reinecke wrote: Device-managed ZAC devices just set the zoned capabilities field in INQUIRY byte 69 (cf ACS-4). This corresponds to the 'zoned' field in the block device characteristics VPD page. As this is only defined in SPC-5/SBC-4 we also need to update

[PATCHv3 14/14] libata: support host-aware and host-managed ZAC devices

2016-04-25 Thread Hannes Reinecke
Byte 69 bits 0:1 in the IDENTIFY DEVICE data indicate a host-aware ZAC device. Host-managed ZAC devices have their own individual signature, and to not set the bits in the IDENTIFY DEVICE data. And whenever we detect a ZAC-compatible device we should be displaying the zoned block characteristics

[PATCHv3 02/14] libsas: enable FPDMA SEND/RECEIVE

2016-04-25 Thread Hannes Reinecke
Update libsas and dependent drivers to handle FPDMA SEND/RECEIVE correctly. Signed-off-by: Hannes Reinecke --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 ++ drivers/scsi/isci/request.c| 4 +++- drivers/scsi/libsas/sas_ata.c | 6 --

[PATCHv3 00/14] libata: ZAC support

2016-04-25 Thread Hannes Reinecke
Hi all, here's a patchset implementing ZAC support for libata. This is the second part of a larger patchset for ZAC/ZBC support; it requires the scsi trace fixes queued for in mkp/4.7/scsi-queue and the patchset 'libata: SATL update' queued in tj/for-4.7-zac. The full patchset can be found at:

[PATCHv3 10/14] libata: implement ZBC IN translation

2016-04-25 Thread Hannes Reinecke
ZAC drives implement a 'ZAC Management In' command template, which maps onto the ZBC IN command. Signed-off-by: Hannes Reinecke --- drivers/ata/libata-eh.c | 1 + drivers/ata/libata-scsi.c | 157 ++ drivers/ata/libata-trace.c

[PATCHv3 04/14] libata: Separate out ata_dev_config_ncq_send_recv()

2016-04-25 Thread Hannes Reinecke
Move NCQ SEND/RECEIVE checks into a separate function. Signed-off-by: Hannes Reinecke --- drivers/ata/libata-core.c | 47 +++ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers/ata/libata-core.c

[PATCHv3 05/14] libata: Add command definitions for NCQ Encapsulation for READ LOG DMA EXT

2016-04-25 Thread Hannes Reinecke
ACS-4 defines an NCQ encapsulation for READ LOG DMA EXT. Signed-off-by: Hannes Reinecke --- include/linux/ata.h| 5 + include/linux/libata.h | 7 +++ 2 files changed, 12 insertions(+) diff --git a/include/linux/ata.h b/include/linux/ata.h index b84210a..94ccde5

[PATCHv3 12/14] libata: NCQ encapsulation for ZAC MANAGEMENT OUT

2016-04-25 Thread Hannes Reinecke
Add NCQ encapsulation for ZAC MANAGEMENT OUT and evaluate NCQ Non-Data log pages to figure out if NCQ encapsulation is supported. Signed-off-by: Hannes Reinecke --- drivers/ata/libata-core.c | 43 --- drivers/ata/libata-scsi.c | 18

[PATCHv3 09/14] libata: fixup ZAC device disabling

2016-04-25 Thread Hannes Reinecke
libata device disabling is ... curious. So add the correct definitions that we can disable ZAC devices properly. Signed-off-by: Hannes Reinecke --- include/linux/libata.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/libata.h

[PATCHv3 11/14] libata: Implement ZBC OUT translation

2016-04-25 Thread Hannes Reinecke
ZAC drives implement a 'ZAC Management Out' command template, which maps onto the ZBC OUT command. Signed-off-by: Hannes Reinecke --- drivers/ata/libata-eh.c | 1 + drivers/ata/libata-scsi.c | 67 +++ drivers/ata/libata-trace.c

[PATCHv3 08/14] libata-scsi: Generate sense code for disabled devices

2016-04-25 Thread Hannes Reinecke
If a device is disabled after error recovery it doesn't make any sense to generate an ATA sense, but we should rather return a generic sense code indicating the device is gone. Signed-off-by: Hannes Reinecke --- drivers/ata/libata-scsi.c | 6 ++ 1 file changed, 6

[PATCHv3 07/14] libata-trace: decode subcommands

2016-04-25 Thread Hannes Reinecke
Some commands like FPDMA RECEIVE or NCQ NON DATA can encapsulate other commands to NCQ transport. So decode the subcmds, too. Signed-off-by: Hannes Reinecke --- drivers/ata/libata-trace.c| 43 +++ include/linux/ata.h | 17

[PATCHv3 01/14] libata: do not attempt to retrieve sense code twice

2016-04-25 Thread Hannes Reinecke
Do not call ata_request_sense() if the sense code is already present. Signed-off-by: Hannes Reinecke --- drivers/ata/libata-eh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 5b340ce..e816619 100644

[PATCHv3 13/14] libata: support device-managed ZAC devices

2016-04-25 Thread Hannes Reinecke
Device-managed ZAC devices just set the zoned capabilities field in INQUIRY byte 69 (cf ACS-4). This corresponds to the 'zoned' field in the block device characteristics VPD page. As this is only defined in SPC-5/SBC-4 we also need to update the supported SCSI version descriptor. Reviewed-by:

[PATCHv3 06/14] libata: Check log page directory before accessing pages

2016-04-25 Thread Hannes Reinecke
When reading the NCQ Send/Recv log it might actually not supported, thereby causing irritating messages 'READ LOG DMA EXT failed'. Instead we should be reading the log directory first to figure out if the log is actually supported before trying to access it. Signed-off-by: Hannes Reinecke

[PATCH]sd: Don't treat succeeded SYNC as error

2016-04-25 Thread Jinpu Wang
Hi, all We hit IO error on fsync, it turns out was because sd treat succeeded SYNC as error. From what I checked in SBC spec there is no indication we should fail IO in this case, so we create this patch. Best Regards, Jack Wang From 5d1f72d9643ce61cd9f3d312377378c43f171d0c Mon Sep 17 00:00:00

Re: [PATCH] libfc: unsafe refcounting in fc_rport_work()

2016-04-25 Thread Hannes Reinecke
On 04/20/2016 09:03 PM, James Bottomley wrote: > On Wed, 2016-04-20 at 15:24 +0200, Hannes Reinecke wrote: >> When pushing items on a workqueue we cannot take reference >> when the workqueue item is executed, as the structure might >> already been freed at that time. >> So instead we need to take

[PATCH] libfc: replace 'rp_mutex' with 'rp_lock'

2016-04-25 Thread Hannes Reinecke
We cannot use an embedded mutex in a structure with reference counting, as mutex unlock might be delayed, and the waiters might then access an already freed memory area. So convert it to a spinlock. For details cf https://lkml.org/lkml/2015/2/11/245 Signed-off-by: Hannes Reinecke

[PATCH v3] qla1280: Reduce can_queue to 512

2016-04-25 Thread Johannes Thumshirn
The qla1280 driver sets the scsi_host_template's can_queue field to 0xf which results in an allocation failure when allocating the block layer tags for the driver's queues like the one shown below: [4.804166] scsi host0: QLogic QLA1040 PCI to SCSI Host Adapter Firmware version: 7.65.06,

Re: uas: order 7 page allocation failure in init_tag_map()

2016-04-25 Thread Hans de Goede
Hi, On 23-04-16 23:10, Johannes Stezenbach wrote: Hi, I bought a new backup disk which turned out to be UAS capable, but when I plugged it in I got an order 7 page allocation failure. My hunch is that the .can_queue = 65536 in drivers/usb/storage/uas.c is much too large. Maybe 256 would be a