[PATCH 3/5] scsi/esp_scsi: Clean up control flow and dead code

2017-08-03 Thread Finn Thain
This patch improves readability. There are no functional changes. Since this touches on a questionable ESP_INTR_DC conditional, add some commentary to help others who may (as I did) find themselves chasing an "Invalid Command" error after the device flags this condition. This cleanup also

[PATCH 4/5] scsi/esp_scsi: Avoid sending ABORT TASK SET messages

2017-08-03 Thread Finn Thain
If an LLD aborts a task set, it should complete the affected commands with the appropriate result code. In a couple of cases esp_scsi doesn't do so. When the initiator receives an unhandled message, just respond by sending a MESSAGE REJECT instead of ABORT TASK SET, and thus avoid the issue.

[PATCH 5/5] scsi/esp_scsi: Always clear msg_out_len after MESSAGE OUT phase

2017-08-03 Thread Finn Thain
After sending a message, always clear esp->msg_out_len. Otherwise, eh_abort_handler may subsequently fail to send an ABORT TASK SET message. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/scsi/esp_scsi.c | 2 ++ 1 file changed, 2

[PATCH 1/5] scsi/mac_esp: Avoid type warning from sparse

2017-08-03 Thread Finn Thain
Avoid the following warning from "make C=1": CHECK drivers/scsi/mac_esp.c drivers/scsi/mac_esp.c:357:30: warning: incorrect type in initializer (different address spaces) drivers/scsi/mac_esp.c:357:30:expected unsigned char [usertype] *fifo drivers/scsi/mac_esp.c:357:30:got void

[PATCH 2/5] scsi/mac_esp: Fix PIO transfers for MESSAGE IN phase

2017-08-03 Thread Finn Thain
When in MESSAGE IN phase, the ESP device does not automatically acknowledge each byte that is transferred by PIO. The mac_esp driver neglects to explicitly ack them, which causes a timeout during messages larger than one byte (e.g. tag bytes during reconnect). Fix this with an ESP_CMD_MOK command

[PATCH 0/5] esp_scsi, mac_esp: Various fixes and cleanups

2017-08-03 Thread Finn Thain
This series has been tested on m68k Macs (ESP236 equivalent). Some more testing with different targets and devices (FAS236 etc) might be nice. Being that the esp_scsi fixes are on error paths, more review may actually be more valuable than more testing... Finn Thain (5): scsi/mac_esp: Avoid

[PATCH] aacraid: Fix out of bounds in aac_get_name_resp

2017-08-03 Thread Raghava Aditya Renukunta
We terminate the aac_get_name_resp on a byte that is outside the bounds of the structure. Extend the return response by one byte to remove the appearance of out of bounds reference. Thank you Dan for reporting the issue. Thank you Bart Van Assche for suggesting the

[PATCH v2 1/5] aic7xxx: remove empty function

2017-08-03 Thread Michał Mirosław
ahc_platform_dump_card_state() does nothing. Remove it. Signed-off-by: Michał Mirosław --- drivers/scsi/aic7xxx/aic7xxx_core.c | 1 - drivers/scsi/aic7xxx/aic7xxx_osm.c | 5 - drivers/scsi/aic7xxx/aic7xxx_osm.h | 1 - 3 files changed, 7 deletions(-) diff --git

[PATCH v2 5/5] aic7[9x]xx: printk() lines unbroken

2017-08-03 Thread Michał Mirosław
Current code is not SMP-friendly and since now each printk() call generates a separate line in the log, the output is mostly unreadable. Make it better formatted. Signed-off-by: Michał Mirosław --- drivers/scsi/Kconfig | 3 +-

[PATCH v2 0/4] aic7xxx: fix debugging printks

2017-08-03 Thread Michał Mirosław
This series aims to clean up printing of card state after a problem event. Currently, the output is pretty much unreadable, as it is spread over a lot of single-word lines. This series compiles (on x86), but is not tested, yet. v2: rebased after 516b7db593 ("scsi: aic7xxx: fix firmware build

[PATCH v2 4/5] aic7xxx: regenerate firmware files

2017-08-03 Thread Michał Mirosław
Regenerate firmware files to make cleaner base for following fix. This removes some unused definitions and reorders some #defines, but the code remains the same. Signed-off-by: Michał Mirosław --- drivers/scsi/aic7xxx/aic79xx_reg.h_shipped | 1267

[PATCH v2 3/5] aic7xxx: remove rules for shipped files

2017-08-03 Thread Michał Mirosław
There are Kbuild rules for that already. Signed-off-by: Michał Mirosław --- drivers/scsi/aic7xxx/Makefile | 4 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile index b03ba0df7a83..1a5509d40f8a 100644 ---

[PATCH v2 2/5] aic7xxx: fix firmware build deps

2017-08-03 Thread Michał Mirosław
We need to override Kbuild rules for copying shipped files, otherwise aic7xxx_reg.h and aic7xxx_reg_print.c will be ovewritten by old versions. Fixes: 516b7db593f3a541e2e98867575c3c697f41a247 Signed-off-by: Michał Mirosław --- drivers/scsi/aic7xxx/Makefile | 6 -- 1

[PATCH] scsi-mq: Always unprepare before requeuing a request

2017-08-03 Thread Bart Van Assche
One of the two scsi-mq functions that requeue a request unprepares a request before requeueing (scsi_io_completion()) but the other function not (__scsi_queue_insert()). Make sure that a request is unprepared before requeuing it. Fixes: commit d285203cf647 ("scsi: add support for a blk-mq based

Re: [PATCH] scsi: sg: Prevent potential double frees in sg driver

2017-08-03 Thread Greg KH
On Thu, Aug 03, 2017 at 12:34:51PM -0700, Nick Desaulniers wrote: > > Why no one on the to: line? > > I usually cc everyone from get_maintainer.pl. Should I be using > --to= then explicitly for named folks, and --cc= for lists? That's usually a good idea, many email clients throw away stuff if

Re: [PATCH] scsi: sg: Prevent potential double frees in sg driver

2017-08-03 Thread Nick Desaulniers
> Why no one on the to: line? I usually cc everyone from get_maintainer.pl. Should I be using --to= then explicitly for named folks, and --cc= for lists? > And do you want this in the stable kernel trees? Looks like I can follow up on option #2 once this patch has been reviewed+merged by

Re: [PATCH] scsi: sg: Prevent potential double frees in sg driver

2017-08-03 Thread Greg KH
On Thu, Aug 03, 2017 at 12:02:47PM -0700, Nick Desaulniers wrote: > From: Robb Glasser > > sg_ioctl could be spammed by requests, leading to a double free in > __free_pages. This protects the entry points of sg_ioctl where the > memory could be corrupted by a double call to

[PATCH] scsi: sg: Prevent potential double frees in sg driver

2017-08-03 Thread Nick Desaulniers
From: Robb Glasser sg_ioctl could be spammed by requests, leading to a double free in __free_pages. This protects the entry points of sg_ioctl where the memory could be corrupted by a double call to __free_pages if multiple requests are happening concurrently.

[Regression 4.13-rc1] Resume does not work on Lenovo X60t

2017-08-03 Thread Paul Menzel
Dear Linux folks, Since the merge windows opened for Linux 4.13, I am unable to resume from ACPI S3 suspend on a Lenovo X60t. The graphics comes back, but I am unable to enter anything, and the system seems to be hung. Magic SysRq keys still work though, but powering the system of doesn’t

Re: [PATCH] tcmu: Oops in unmap_thread_fn()

2017-08-03 Thread Mike Christie
On 08/01/2017 03:09 PM, Dan Carpenter wrote: > Calling list_del() on the iterator pointer in list_for_each_entry() will > cause an oops. We need to user the _safe() version for that. > > Fixes: c73d02f63c16 ("tcmu: Add fifo type waiter list support to avoid > starvation") > Signed-off-by: Dan

Re: [PATCH 04/14] blk-mq-sched: improve dispatching from sw queue

2017-08-03 Thread Bart Van Assche
On Thu, 2017-08-03 at 11:13 +0800, Ming Lei wrote: > On Thu, Aug 03, 2017 at 01:35:29AM +, Bart Van Assche wrote: > > On Wed, 2017-08-02 at 11:31 +0800, Ming Lei wrote: > > > On Tue, Aug 01, 2017 at 03:11:42PM +, Bart Van Assche wrote: > > > > On Tue, 2017-08-01 at 18:50 +0800, Ming Lei

Re: [PATCH 01/21] lpfc: Fix opps when ExpressLane is enabled

2017-08-03 Thread Nikola Pajkovsky
James Smart writes: > From: Dick Kennedy > > Null pointer dereference in lpfc_sli4_fof_intr_handler > > The driver does not set up cq->assoc_qp for sli4_hba->oas_cq > > Initialize cq->assoc_qp before accessing it > > Signed-off-by: Dick Kennedy

Re: [PATCH v2 09/13] mpt3sas: scan and add nvme device after controller reset

2017-08-03 Thread Sreekanth Reddy
On Thu, Aug 3, 2017 at 12:10 PM, Hannes Reinecke wrote: > On 07/14/2017 03:22 PM, Suganath Prabu S wrote: >> After Controller reset, Scan and add nvme device back to the topology. >> >> Signed-off-by: Chaitra P B >> Signed-off-by: Suganath Prabu S

Re: [PATCH v2 02/13] mpt3sas: Add nvme device support in slave alloc, target alloc and probe

2017-08-03 Thread Sreekanth Reddy
On Thu, Aug 3, 2017 at 11:57 AM, Hannes Reinecke wrote: > On 07/14/2017 03:22 PM, Suganath Prabu S wrote: >> 1) Added support for probing pcie device and adding NVMe drives to >> SML and driver's internal list pcie_device_list. >> >> 2) Added support for determing NVMe as boot

Re: [PATCH v2 08/13] mpt3sas: Set NVMe device queue depth as 128

2017-08-03 Thread Sreekanth Reddy
On Thu, Aug 3, 2017 at 12:09 PM, Hannes Reinecke wrote: > On 07/14/2017 03:22 PM, Suganath Prabu S wrote: >> Sets nvme device queue depth, name and displays device capabilities >> >> Signed-off-by: Chaitra P B >> Signed-off-by: Suganath Prabu S

Re: [PATCH v2 01/13] mpt3sas: Update MPI Header

2017-08-03 Thread Sreekanth Reddy
On Thu, Aug 3, 2017 at 1:25 PM, Johannes Thumshirn wrote: > On Thu, Aug 03, 2017 at 08:24:59AM +0200, Hannes Reinecke wrote: >> > + U32 >> > + IOCLogInfo; /*0x10 */ >> > + U16 >> > + ErrorResponseCount; /*0x14 */ >> > +

Re: [PATCH v2 01/13] mpt3sas: Update MPI Header

2017-08-03 Thread Johannes Thumshirn
On Thu, Aug 03, 2017 at 08:24:59AM +0200, Hannes Reinecke wrote: > > + U32 > > + IOCLogInfo; /*0x10 */ > > + U16 > > + ErrorResponseCount; /*0x14 */ > > + U16 > > + Reserved4; /*0x16 */ > > +}

Re: [PATCH v2 00/13] mpt3sas driver NVMe support:

2017-08-03 Thread Hannes Reinecke
On 08/02/2017 10:14 AM, Hannes Reinecke wrote: > On 07/14/2017 03:22 PM, Suganath Prabu S wrote: >> Ventura Series controller are Tri-mode. The controller and >> firmware are capable of supporting NVMe devices and >> PCIe switches to be connected with the controller. This >> patch set adds driver

Re: [PATCH v2 13/13] mpt3sas: Update mpt3sas driver version.

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > Updated mpt3sas driver version to 15.101.00.00 > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath Prabu S > --- > drivers/scsi/mpt3sas/mpt3sas_base.h |4 ++-- > 1

Re: [PATCH v2 11/13] mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > * Added debug prints for pcie devices in ioctl debug path. Which > will be helpful for debugging. > * Added PCIe device support for ioctl BTDHMAPPING ioctl. > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath

Re: [PATCH v2 12/13] mpt3sas: Fix nvme drives checking for tlr.

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > Check for NVMe drives before enabling or checking tlr. > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath Prabu S > --- > drivers/scsi/mpt3sas/mpt3sas_scsih.c | 22

Re: [PATCH v2 10/13] mpt3as: Add-Task-management-debug-info-for-NVMe-drives.

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > Added debug information for NVMe/PCIe drives in target rest path. > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath Prabu S > --- > drivers/scsi/mpt3sas/mpt3sas_scsih.c

Re: [PATCH v2 09/13] mpt3sas: scan and add nvme device after controller reset

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > After Controller reset, Scan and add nvme device back to the topology. > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath Prabu S > --- >

Re: [PATCH v2 08/13] mpt3sas: Set NVMe device queue depth as 128

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > Sets nvme device queue depth, name and displays device capabilities > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath Prabu S > --- >

Re: [PATCH v2 07/13] mpt3sas: Handle NVMe PCIe device related events generated from firmware.

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > * The controller firmware sends separate events for NVMe devices and > PCIe switches similar to existing SAS events. > > * NVMe device detection, addition and removal are reported by the > firmware through PCIe Topology Change list events. > > *

Re: [PATCH v2 06/13] mpt3sas: API's to remove nvme drive from sml

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > Below API's are included in nvme drive remove path. > _scsih_pcie_device_remove_by_handle > _scsih_pcie_device_remove_from_sml > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath Prabu S

Re: [PATCH v2 05/13] mpt3sas: API 's to support NVMe drive addition to SML

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > Below Functions are added in various paths to support NVMe > drive addition. > > _scsih_pcie_add_device > _scsih_pcie_device_add > _scsih_pcie_device_init_add > _scsih_check_pcie_access_status > _scsih_pcie_check_device > >

Re: [PATCH v2 04/13] mpt3sas: Added support for nvme encapsulated request message.

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > * Mpt3sas driver uses the NVMe Encapsulated Request message to > send an NVMe command to an NVMe device attached to the IOC. > > * Normal I/O commands like reads and writes are passed to the > controller as SCSI commands and the controller has the

Re: [PATCH v2 02/13] mpt3sas: Add nvme device support in slave alloc, target alloc and probe

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > 1) Added support for probing pcie device and adding NVMe drives to > SML and driver's internal list pcie_device_list. > > 2) Added support for determing NVMe as boot device. > > 3) Added nvme device support for call back functions scan_finished >

Re: [PATCH v2 01/13] mpt3sas: Update MPI Header

2017-08-03 Thread Hannes Reinecke
On 07/14/2017 03:22 PM, Suganath Prabu S wrote: > Update MPI Files for NVMe support > > Signed-off-by: Chaitra P B > Signed-off-by: Suganath Prabu S > --- > drivers/scsi/mpt3sas/mpi/mpi2.h | 43 +++- >