[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,

[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 --- drivers/sc

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 a

[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

[PATCHv3 03/14] libata/libsas: Define ATA_CMD_NCQ_NON_DATA

2016-04-25 Thread Hannes Reinecke
Define the NCQ NON DATA command and update libsas to handle it correctly. Signed-off-by: Hannes Reinecke --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 1 + drivers/scsi/isci/request.c| 3 ++- drivers/scsi/libsas/sas_ata.c | 3 ++- drivers/scsi/mvsas/mv_sas.c| 3 ++

[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 --- a/drivers/a

[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: Shau

[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 --- dr

[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 insertions(+) diff --git a/

[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 + i

[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 b/drivers/ata/libata-core.c index 7b

[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 100644 --- a/include/

[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 +- dr

[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 VP

[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 -- drivers/scsi/mvsas/mv_sas.c

[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: g

[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 b/include/linux/libata.h ind

[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| 16 +

[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| 10 +++ incl

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 t

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 h

[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] 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 > qla2x00_get_starget_

[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 | 1162

[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. Sig

[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 insertions(+), 23 deletion

[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 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. In

[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, 151 insertions(+), 163 del

[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 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 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 allowing

[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 +++--- 1 file c

[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 a/drivers/scsi/scsi_debu

[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 | 662 +

[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&action=edit source file -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscrib

[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. Signed-off-

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 QL

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 h

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: SA

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 driver") > Signed-off-b

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 https://lkml.o

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 Documentation/SubmittingPatch

[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

[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 --git a/drivers/scsi/megaraid/megaraid_sas_base.c b

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 c

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 > b/drivers/scsi/megaraid/megara

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 redesigned through "mpt2sas: [Resend

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 Linux Engineering -- To uns

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 Engineering -- To unsubscribe

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 Oracle Linux E

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. -- Martin K. Petersen

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 SYNOLOGY volumes that are a

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 4.7/scsi-queue. -- Martin K. Pete

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. Petersen Oracle Lin

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 other get_unaligned_be

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 'lib

[PATCH] sd: get disk reference in sd_check_events()

2016-04-25 Thread Hannes Reinecke
sd_check_events() is called asynchronously, and might race with device removal. So always take a disk reference when processing the event to avoid the device being removed while the event is processed. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 9 +++-- 1 file changed, 7 insertio

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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 dela

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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 +++-

[PATCH 00/10] aacraid: Patchset for aacraid driver version 41066

2016-04-25 Thread Raghava Aditya Renukunta
This patchset contains the following changes(bug fixes, features and code refactors) specific to the aacraid driver --- Raghava Aditya Renukunta (10): [SCSI] aacraid: Removed unnecessary checks for NULL [SCSI] aacraid: Fix incorrectly named MACRO [SCSI] aacraid: Start adapter after updating

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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 > ++

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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 fin

Re: [PATCH 08/12] scsi_debug: rework resp_report_luns

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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 |

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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. > Ad

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

2016-04-25 Thread Hannes Reinecke
On 04/25/2016 06:16 PM, Douglas Gilbert wrote: > 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 insert

[PATCH 02/10] aacraid: Fix incorrectly named MACRO

2016-04-25 Thread Raghava Aditya Renukunta
Suggested-by: Seymour, Shane M Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aacraid.h |2 +- drivers/scsi/aacraid/comminit.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index ef

[PATCH 09/10] aacraid: Fix for KDUMP driver hang

2016-04-25 Thread Raghava Aditya Renukunta
When KDUMP is triggered the driver first talks to the firmware in INTX mode, but the adapter firmware is still in MSIX mode. Therefore the first driver command hangs since the driver is waiting for an INTX response and firmware gives a MSIX response. If when the OS is installed on a RAID drive crea

[PATCH 01/10] aacraid: Removed unnecessary checks for NULL

2016-04-25 Thread Raghava Aditya Renukunta
Current driver checks for NULL return from aac_fib_alloc_tag, but it not possible for it to return NULL. Fixed by: Remove all the checks for NULL returns from aac_fib_alloc_tag Suggested-by: Tomas Henzl Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aachba.c | 22 --

[PATCH 05/10] aacraid: Disable MSI mode for series 6, 7, 8 cards

2016-04-25 Thread Raghava Aditya Renukunta
As the firmware for series 6, 7, 8 cards does not support msi, remove it in the driver Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/comminit.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/sc

[PATCH 04/10] aacraid: Relinquish CPU during timeout wait

2016-04-25 Thread Raghava Aditya Renukunta
aac_fib_send has a special function case for initial commands during driver initialization using wait < 0(pseudo sync mode). In this case, the command does not sleep but rather spins checking for timeout.This loop is calls cpu_relax() in an attempt to allow other processes/threads to use the CPU, b

[PATCH 03/10] aacraid: Start adapter after updating number of MSIX vectors

2016-04-25 Thread Raghava Aditya Renukunta
The adapter has to be started after updating the number of MSIX Vectors Fixes: ecc479e00db8 (aacraid: Set correct MSIX count for EEH recovery) Cc: sta...@vger.kernel.org Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c |2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 06/10] aacraid: Fix for aac_command_thread hang

2016-04-25 Thread Raghava Aditya Renukunta
Typically under error conditions, it is possible for aac_command_thread() to miss the wakeup from kthread_stop() and go back to sleep, causing it to hang aac_shutdown. In the observed scenario, the adapter is not functioning correctly and so aac_fib_send() never completes (or time-outs depending o

[PATCH 10/10] aacraid: Update driver version

2016-04-25 Thread Raghava Aditya Renukunta
Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aacraid.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 0ba8f61..8f90d9e 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/a

[PATCH 08/10] aacraid: Remove code to needlessly complete fib

2016-04-25 Thread Raghava Aditya Renukunta
Currently driver completes double completed or spurious interrupted fibs. This is not necessary and causes the SCSI mid layer to issue aborts and resets, since completing a fib prematurely might trigger a race condition resulting in the driver not calling the scsi_done callback. Fixed by removin

[PATCH 07/10] aacraid: Log firmware AIF messages

2016-04-25 Thread Raghava Aditya Renukunta
Firmware AIF messages about cache loss and data recovery are being missed by the driver since currently they are not captured but rather let go. This patch to capture those messages and log them for the user. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aacraid.h |4