[scsi:for-next 1/10] qedi_main.c:undefined reference to `iscsi_boot_destroy_kset'

2017-07-14 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next head: 6f37e2102778d3437a416684680cc5ce295f2042 commit: c57ec8fb7c025322f25a077afc94e0ef18cc3d89 [1/10] scsi: qedi: Add support for Boot from SAN over iSCSI offload config: x86_64-randconfig-s0-07150752 (attached as

[PATCH 3/6] block: don't call blk_mq_delay_run_hw_queue() in case of BLK_STS_RESOURCE

2017-07-14 Thread Ming Lei
If .queue_rq() returns BLK_STS_RESOURCE, blk-mq will rerun the queue in the three situations: 1) if BLK_MQ_S_SCHED_RESTART is set - queue is rerun after one rq is completed, see blk_mq_sched_restart() which is run from blk_mq_free_request() 2) BLK_MQ_S_TAG_WAITING is set - queue is rerun after

[PATCH 2/6] SCSI: use blk_mq_run_hw_queues() in scsi_kick_queue()

2017-07-14 Thread Ming Lei
Now SCSI won't stop queue at all, and not necessary to use blk_mq_start_hw_queues() to clear the state of 'stopped', so switch to blk_mq_run_hw_queues() instead. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc:

Re: [PATCH 13/22] liquidio: fix possible eeprom format string overflow

2017-07-14 Thread Burla, Satananda
The 07/14/2017 09:04, David Miller wrote: > From: Arnd Bergmann > Date: Fri, 14 Jul 2017 14:07:05 +0200 > > > gcc reports that the temporary buffer for computing the > > string length may be too small here: > > > > drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function >

Re: [for-4.14 RFC PATCH 1/2] dm rq: avoid deadlock if dm-mq is stacked on old .request_fn device(s)

2017-07-14 Thread Mike Snitzer
On Fri, Jul 14 2017 at 1:17pm -0400, Ewan D. Milne wrote: > On Fri, 2017-07-14 at 10:19 -0400, Mike Snitzer wrote: > > > > Do you see a benefit to extracting that portion of your WIP patch > > (removing the ->complete handler entirely)? > > > > Or leave well enough alone

Re: [PATCH 18/22] gpio: acpi: fix string overflow for large pin numbers

2017-07-14 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 2:52 PM, Andy Shevchenko wrote: > On Fri, 2017-07-14 at 14:07 +0200, Arnd Bergmann wrote: >> gcc-7 notices that the pin_table is an array of 16-bit numbers, >> but we assume it can be printed as a two-character hexadecimal >> string: >>

Re: [PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

2017-07-14 Thread Andy Shevchenko
On Fri, Jul 14, 2017 at 10:37 PM, Arnd Bergmann wrote: > On Fri, Jul 14, 2017 at 9:18 PM, Andy Shevchenko > wrote: >> On Fri, Jul 14, 2017 at 3:07 PM, Arnd Bergmann wrote: >>> gcc points out a possible format string overflow for a large

Re: [PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

2017-07-14 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 9:18 PM, Andy Shevchenko wrote: > On Fri, Jul 14, 2017 at 3:07 PM, Arnd Bergmann wrote: >> gcc points out a possible format string overflow for a large value of 'zone': >> >> drivers/platform/x86/alienware-wmi.c: In function

Re: [PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

2017-07-14 Thread Andy Shevchenko
On Fri, Jul 14, 2017 at 3:07 PM, Arnd Bergmann wrote: > gcc points out a possible format string overflow for a large value of 'zone': > > drivers/platform/x86/alienware-wmi.c: In function 'alienware_wmi_init': > drivers/platform/x86/alienware-wmi.c:461:24: error: '%02X' directive

RE: [PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

2017-07-14 Thread Mario.Limonciello
> -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Friday, July 14, 2017 7:07 AM > To: linux-ker...@vger.kernel.org; Darren Hart ; Andy > Shevchenko > Cc: Greg Kroah-Hartman ; Linus Torvalds >

Re: [PATCH blktests] sg: add regression test for patch scsi: sg: fix SG_DXFER_FROM_DEV transfers

2017-07-14 Thread Omar Sandoval
On Thu, Jul 06, 2017 at 02:09:21PM +0200, Johannes Thumshirn wrote: > Add a regression test for the patch titled "scsi: sg: fix > SG_DXFER_FROM_DEV transfers" which reassembles the syscalls done by Nero > Burning ROM to discover CD and DVD burners. Fixed up a few things below and applied, thanks!

Re: [for-4.14 RFC PATCH 1/2] dm rq: avoid deadlock if dm-mq is stacked on old .request_fn device(s)

2017-07-14 Thread Ewan D. Milne
On Fri, 2017-07-14 at 10:19 -0400, Mike Snitzer wrote: > > Do you see a benefit to extracting that portion of your WIP patch > (removing the ->complete handler entirely)? > > Or leave well enough alone and just continue to disable dm-mq's ability > to stack on .request_fn paths? > > Given

Re: [PATCH 08/22] isdn: divert: fix sprintf buffer overflow warning

2017-07-14 Thread David Miller
From: Arnd Bergmann Date: Fri, 14 Jul 2017 14:07:00 +0200 > One string we pass into the cs->info buffer might be too long, > as pointed out by gcc: > > drivers/isdn/divert/isdn_divert.c: In function 'll_callback': > drivers/isdn/divert/isdn_divert.c:488:22: error: '%d' directive

Re: [PATCH 09/22] net: niu: fix format string overflow warning:

2017-07-14 Thread David Miller
From: Arnd Bergmann Date: Fri, 14 Jul 2017 14:07:01 +0200 > We get a warning for the port_name string that might be longer than > six characters if we had more than 10 ports: > > drivers/net/ethernet/sun/niu.c: In function 'niu_put_parent': >

Re: [PATCH 10/22] bnx2x: fix format overflow warning

2017-07-14 Thread David Miller
From: Arnd Bergmann Date: Fri, 14 Jul 2017 14:07:02 +0200 > gcc notices that large queue numbers would overflow the queue name > string: > > drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c: In function > 'bnx2x_get_strings': >

Re: [PATCH 11/22] net: thunder_bgx: avoid format string overflow warning

2017-07-14 Thread David Miller
From: Arnd Bergmann Date: Fri, 14 Jul 2017 14:07:03 +0200 > gcc warns that the temporary buffer might be too small here: > > drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_probe': > drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1020:16: error: '%d' >

Re: [PATCH 13/22] liquidio: fix possible eeprom format string overflow

2017-07-14 Thread David Miller
From: Arnd Bergmann Date: Fri, 14 Jul 2017 14:07:05 +0200 > gcc reports that the temporary buffer for computing the > string length may be too small here: > > drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function > 'lio_get_eeprom_len': >

Re: [PATCH 12/22] vmxnet3: avoid format strint overflow warning

2017-07-14 Thread David Miller
From: Arnd Bergmann Date: Fri, 14 Jul 2017 14:07:04 +0200 > gcc-7 notices that "-event-%d" could be more than 11 characters long > if we had larger 'vector' numbers: > > drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_activate_dev': >

Re: [for-4.14 RFC PATCH 1/2] dm rq: avoid deadlock if dm-mq is stacked on old .request_fn device(s)

2017-07-14 Thread Mike Snitzer
On Fri, Jul 14 2017 at 3:22am -0400, Christoph Hellwig wrote: > The problem here is the following: > > blk_finish_request must always be called with the queue lock held, > it even has an assert. > > Without blk-mq used by dm-rq, dm uses the block softirq to execute the >

Re: [PATCH 15/22] hwmon: applesmc: fix format string overflow

2017-07-14 Thread Guenter Roeck
On 07/14/2017 05:07 AM, Arnd Bergmann wrote: gcc-7 warns that the key might exceed five bytes for lage index values: drivers/hwmon/applesmc.c: In function 'applesmc_show_fan_position': drivers/hwmon/applesmc.c:906:18: error: '%d' directive writing between 1 and 5 bytes into a region of size 4

Re: [PATCH 19/22] block: DAC960: shut up format-overflow warning

2017-07-14 Thread Jens Axboe
On 07/14/2017 06:07 AM, Arnd Bergmann wrote: > gcc-7 points out that a large controller number would overflow the > string length for the procfs name and the firmware version string: > > drivers/block/DAC960.c: In function 'DAC960_Probe': > drivers/block/DAC960.c:6591:38: warning: 'sprintf' may

Re: [for-4.14 RFC PATCH 0/2] dm rq: eliminate historic blk-mq and .request_fn queue stacking restrictions

2017-07-14 Thread Mike Snitzer
On Fri, Jul 14 2017 at 3:12am -0400, Christoph Hellwig wrote: > Btw, we might want to expedite this to 4.13, a 4.13 now defaults > to blk-mq for scsi, and this patch would make sure that dm keeps > on just working with that switch. Don't think we need to rush anything in response

Re: [PATCH 22/22] IB/mlx4: fix sprintf format warning

2017-07-14 Thread Leon Romanovsky
On Fri, Jul 14, 2017 at 02:07:14PM +0200, Arnd Bergmann wrote: > gcc-7 points out that a negative port_num value would overflow > the string buffer: > > drivers/infiniband/hw/mlx4/sysfs.c: In function > 'mlx4_ib_device_register_sysfs': > drivers/infiniband/hw/mlx4/sysfs.c:251:16: error: 'sprintf'

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

2017-07-14 Thread Suganath Prabu S
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 +++- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 647 +-

Re: [PATCH 02/13] mpt3sas: SGL to PRP Translation for I/Os to NVMe devices

2017-07-14 Thread Suganath Prabu Subramani
Hi Keith, We have made change and submitted V2 of patch set. Thanks, Suganath Prabu S On Wed, Jul 12, 2017 at 5:34 AM, Keith Busch wrote: > On Tue, Jul 11, 2017 at 01:55:02AM -0700, Suganath Prabu S wrote: >> +/** >> + * _base_check_pcie_native_sgl - This function is

[PATCH v2 03/13] mpt3sas: SGL to PRP Translation for I/Os to NVMe devices

2017-07-14 Thread Suganath Prabu S
* Added support for translating the SGLs associated with incoming commands either to IEE SGL or NVMe PRPs for NVMe devices. * The hardware translation of IEEE SGL to NVMe PRPs has limitation and if a command cannot be translated by hardware then it will go to firmware and the firmware needs to

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

2017-07-14 Thread Suganath Prabu S
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 --- drivers/scsi/mpt3sas/mpt3sas_scsih.c |

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

2017-07-14 Thread Suganath Prabu S
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 target_alloc,slave_alloc,target destroy and slave destroy.

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

2017-07-14 Thread Suganath Prabu S
* 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 ability to translate the commands to NVMe equivalent. *

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

2017-07-14 Thread Suganath Prabu S
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 mpt3sas_get_pdev_by_handle mpt3sas_config_get_pcie_device_pg0

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

2017-07-14 Thread Suganath Prabu S
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 | 83 - 1 files changed,

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

2017-07-14 Thread Suganath Prabu S
* 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. * The PCIe device state change events are sent when the firmware

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

2017-07-14 Thread Suganath Prabu S
After Controller reset, Scan and add nvme device back to the topology. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 194 +- 1 files

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

2017-07-14 Thread Suganath Prabu S
* 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 Prabu S ---

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

2017-07-14 Thread Suganath Prabu S
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 files changed, 2 insertions(+), 2 deletions(-) diff --git

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

2017-07-14 Thread Suganath Prabu S
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 -- 1 files changed, 16 insertions(+), 6

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

2017-07-14 Thread Suganath Prabu S
Sets nvme device queue depth, name and displays device capabilities Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.h |2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 40

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

2017-07-14 Thread Suganath Prabu S
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 level support for NVMe devices and PCIe switches. Suganath Prabu S (13): mpt3sas: Update MPI Header

Re: [PATCH 18/22] gpio: acpi: fix string overflow for large pin numbers

2017-07-14 Thread Andy Shevchenko
On Fri, 2017-07-14 at 14:07 +0200, Arnd Bergmann wrote: > gcc-7 notices that the pin_table is an array of 16-bit numbers, > but we assume it can be printed as a two-character hexadecimal > string: > > drivers/gpio/gpiolib-acpi.c: In function > 'acpi_gpiochip_request_interrupt': >

Re: [PATCH] scsi: default to scsi-mq

2017-07-14 Thread h...@lst.de
On Fri, Jul 14, 2017 at 05:56:41PM +0800, Jonathan Cameron wrote: > Just wondering if you had any thoughts on how we can proceed with tracking > down this regression? > > I'm not familiar enough with the multiqueue code to really know where > to start. > > If there are any other tests that would

Re: [PATCH 11/22] net: thunder_bgx: avoid format string overflow warning

2017-07-14 Thread Robin Murphy
On 14/07/17 13:07, Arnd Bergmann wrote: > gcc warns that the temporary buffer might be too small here: > > drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_probe': > drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1020:16: error: '%d' > directive writing between 1 and 10

Re: [PATCH 20/22] sound: pci: avoid string overflow warnings

2017-07-14 Thread Takashi Iwai
On Fri, 14 Jul 2017 14:07:12 +0200, Arnd Bergmann wrote: > > With gcc-7, we get various warnings about a possible string overflow: > > sound/pci/rme9652/hdspm.c: In function 'snd_hdspm_create_alsa_devices': > sound/pci/rme9652/hdspm.c:2123:17: error: ' MIDIoverMADI' directive writing > 13 bytes

[PATCH 05/22] scsi: gdth: avoid buffer overflow warning

2017-07-14 Thread Arnd Bergmann
gcc notices that we would overflow the buffer for the inquiry of the product name if we have too many adapters: drivers/scsi/gdth.c: In function 'gdth_next': drivers/scsi/gdth.c:2357:29: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]

[PATCH 03/22] scsi: mpt3sas: fix format overflow warning

2017-07-14 Thread Arnd Bergmann
We print the driver name into one string and then add and ID and copy it into a second string of the same length, at which point gcc complains about a possible overflow: drivers/scsi/mpt3sas/mpt3sas_scsih.c: In function '_scsih_probe': drivers/scsi/mpt3sas/mpt3sas_scsih.c:8884:21: error: '_cm'

[PATCH 07/22] scsi: gdth: increase the procfs event buffer size

2017-07-14 Thread Arnd Bergmann
We print a 256 byte event string into a buffer that is only 161 bytes long, this is clearly wrong: drivers/scsi/gdth_proc.c: In function 'gdth_show_info': drivers/scsi/gdth.c:3660:41: error: '%s' directive writing up to 255 bytes into a region of size between 141 and 150

[PATCH 11/22] net: thunder_bgx: avoid format string overflow warning

2017-07-14 Thread Arnd Bergmann
gcc warns that the temporary buffer might be too small here: drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function 'bgx_probe': drivers/net/ethernet/cavium/thunder/thunder_bgx.c:1020:16: error: '%d' directive writing between 1 and 10 bytes into a region of size between 9 and 11

[PATCH 10/22] bnx2x: fix format overflow warning

2017-07-14 Thread Arnd Bergmann
gcc notices that large queue numbers would overflow the queue name string: drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c: In function 'bnx2x_get_strings': drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c:3165:25: error: '%d' directive writing between 1 and 10 bytes into a region of

[PATCH 13/22] liquidio: fix possible eeprom format string overflow

2017-07-14 Thread Arnd Bergmann
gcc reports that the temporary buffer for computing the string length may be too small here: drivers/net/ethernet/cavium/liquidio/lio_ethtool.c: In function 'lio_get_eeprom_len': /drivers/net/ethernet/cavium/liquidio/lio_ethtool.c:345:21: error: 'sprintf' may write a terminating nul past the

[PATCH 14/22] [media] usbvision-i2c: fix format overflow warning

2017-07-14 Thread Arnd Bergmann
gcc-7 notices that we copy a fixed length string into another string of the same size, with additional characters: drivers/media/usb/usbvision/usbvision-i2c.c: In function 'usbvision_i2c_register': drivers/media/usb/usbvision/usbvision-i2c.c:190:36: error: '%d' directive writing between 1 and

[PATCH 18/22] gpio: acpi: fix string overflow for large pin numbers

2017-07-14 Thread Arnd Bergmann
gcc-7 notices that the pin_table is an array of 16-bit numbers, but we assume it can be printed as a two-character hexadecimal string: drivers/gpio/gpiolib-acpi.c: In function 'acpi_gpiochip_request_interrupt': drivers/gpio/gpiolib-acpi.c:206:24: warning: '%02X' directive writing between 2 and 4

[PATCH 20/22] sound: pci: avoid string overflow warnings

2017-07-14 Thread Arnd Bergmann
With gcc-7, we get various warnings about a possible string overflow: sound/pci/rme9652/hdspm.c: In function 'snd_hdspm_create_alsa_devices': sound/pci/rme9652/hdspm.c:2123:17: error: ' MIDIoverMADI' directive writing 13 bytes into a region of size between 1 and 32 [-Werror=format-overflow=]

[PATCH 22/22] IB/mlx4: fix sprintf format warning

2017-07-14 Thread Arnd Bergmann
gcc-7 points out that a negative port_num value would overflow the string buffer: drivers/infiniband/hw/mlx4/sysfs.c: In function 'mlx4_ib_device_register_sysfs': drivers/infiniband/hw/mlx4/sysfs.c:251:16: error: 'sprintf' may write a terminating nul past the end of the destination

[PATCH 19/22] block: DAC960: shut up format-overflow warning

2017-07-14 Thread Arnd Bergmann
gcc-7 points out that a large controller number would overflow the string length for the procfs name and the firmware version string: drivers/block/DAC960.c: In function 'DAC960_Probe': drivers/block/DAC960.c:6591:38: warning: 'sprintf' may write a terminating nul past the end of the destination

[PATCH 21/22] fscache: fix fscache_objlist_show format processing

2017-07-14 Thread Arnd Bergmann
gcc points out a minor bug in the handling of unknown cookie types, which could result in a string overflow when the integer is copied into a 3-byte string: fs/fscache/object-list.c: In function 'fscache_objlist_show': fs/fscache/object-list.c:265:19: error: 'sprintf' may write a terminating nul

[PATCH 16/22] x86: intel-mid: fix a format string overflow warning

2017-07-14 Thread Arnd Bergmann
We have space for exactly one character for the index in "max7315_%d_base", but as gcc points out having more would cause an string overflow: arch/x86/platform/intel-mid/device_libs/platform_max7315.c: In function 'max7315_platform_data':

[PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

2017-07-14 Thread Arnd Bergmann
gcc points out a possible format string overflow for a large value of 'zone': drivers/platform/x86/alienware-wmi.c: In function 'alienware_wmi_init': drivers/platform/x86/alienware-wmi.c:461:24: error: '%02X' directive writing between 2 and 8 bytes into a region of size 6

[PATCH 15/22] hwmon: applesmc: fix format string overflow

2017-07-14 Thread Arnd Bergmann
gcc-7 warns that the key might exceed five bytes for lage index values: drivers/hwmon/applesmc.c: In function 'applesmc_show_fan_position': drivers/hwmon/applesmc.c:906:18: error: '%d' directive writing between 1 and 5 bytes into a region of size 4 [-Werror=format-overflow=] sprintf(newkey,

[PATCH 08/22] isdn: divert: fix sprintf buffer overflow warning

2017-07-14 Thread Arnd Bergmann
One string we pass into the cs->info buffer might be too long, as pointed out by gcc: drivers/isdn/divert/isdn_divert.c: In function 'll_callback': drivers/isdn/divert/isdn_divert.c:488:22: error: '%d' directive writing between 1 and 3 bytes into a region of size between 1 and 69

[PATCH 09/22] net: niu: fix format string overflow warning:

2017-07-14 Thread Arnd Bergmann
We get a warning for the port_name string that might be longer than six characters if we had more than 10 ports: drivers/net/ethernet/sun/niu.c: In function 'niu_put_parent': drivers/net/ethernet/sun/niu.c:9563:21: error: '%d' directive writing between 1 and 3 bytes into a region of size 2

[PATCH 12/22] vmxnet3: avoid format strint overflow warning

2017-07-14 Thread Arnd Bergmann
gcc-7 notices that "-event-%d" could be more than 11 characters long if we had larger 'vector' numbers: drivers/net/vmxnet3/vmxnet3_drv.c: In function 'vmxnet3_activate_dev': drivers/net/vmxnet3/vmxnet3_drv.c:2095:40: error: 'sprintf' may write a terminating nul past the end of the destination

[PATCH 06/22] scsi: fnic: fix format string overflow warning

2017-07-14 Thread Arnd Bergmann
The MSI interrupt name can require 11 bytes in addition to the device name, for a total of 23 bytes: drivers/scsi/fnic/fnic_isr.c: In function 'fnic_request_intr': drivers/scsi/fnic/fnic_isr.c:192:4: error: '-fcs-rq' directive writing 7 bytes into a region of size between 5 and 16

[PATCH 02/22] scsi: megaraid: fix format-overflow warning

2017-07-14 Thread Arnd Bergmann
gcc-7 complains that the firmware version strings might overflow for some values: drivers/scsi/megaraid.c: In function 'megaraid_probe_one': drivers/scsi/megaraid.c:314:33: error: '%d' directive writing between 1 and 2 bytes into a region of size between 1 and 2 [-Werror=format-overflow=]

[PATCH 01/22] kbuild: disable -Wformat-truncation warnings by default

2017-07-14 Thread Arnd Bergmann
With x86 allmodconfig, we currently get 233 -Wformat-truncation warnings, which makes the entire warnings rather useless. This turns off the warning by default, unless we specify W=1 or higher Signed-off-by: Arnd Bergmann --- scripts/Makefile.extrawarn | 3 +++ 1 file changed, 3

[PATCH 04/22] scsi: fusion: fix string overflow warning

2017-07-14 Thread Arnd Bergmann
gcc points out a theorerical string overflow: drivers/message/fusion/mptbase.c: In function 'mpt_detach': drivers/message/fusion/mptbase.c:2103:17: error: '%s' directive writing up to 31 bytes into a region of size 28 [-Werror=format-overflow=] sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/summary",

[PATCH 00/22] gcc-7 -Wformat-* warnings

2017-07-14 Thread Arnd Bergmann
This series addresses all warnings that gcc-7 introduces for -Wformat-overflow= and turns off the -Wformat-truncation by default (they remain enabled with "make W=1"). The -Wformat-overflow patches take varying approaches: - When the final use of the buffer is not limited and we print into an

Re: [PATCH] scsi: default to scsi-mq

2017-07-14 Thread Jonathan Cameron
On Wed, 12 Jul 2017 23:54:01 +0800 Jonathan Cameron wrote: > On Wed, 12 Jul 2017 14:18:14 + > Bart Van Assche wrote: > > > On Wed, 2017-07-12 at 09:26 +0100, John Garry wrote: > > > > > What block driver controls the block device for

Re: [PATCH blktests] sg: add regression test for patch scsi: sg: fix SG_DXFER_FROM_DEV transfers

2017-07-14 Thread Johannes Thumshirn
Omar, ping? -- 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ürnberg) Key fingerprint = EC38

Re: [bug report] scsi: sg: fix SG_DXFER_FROM_DEV transfers

2017-07-14 Thread Dan Carpenter
On Fri, Jul 14, 2017 at 11:01:11AM +0200, Johannes Thumshirn wrote: > On Fri, Jul 14, 2017 at 10:46:03AM +0300, Dan Carpenter wrote: > >761 case SG_DXFER_FROM_DEV: > >762 if (hp->dxfer_len < 0) > > ^ > > Not possible. >

Re: [PATCH] scsi: qedf: Limit number of CQs

2017-07-14 Thread Johannes Thumshirn
Looks good, 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

Re: [bug report] scsi: sg: fix SG_DXFER_FROM_DEV transfers

2017-07-14 Thread Johannes Thumshirn
On Fri, Jul 14, 2017 at 10:46:03AM +0300, Dan Carpenter wrote: >761 case SG_DXFER_FROM_DEV: >762 if (hp->dxfer_len < 0) > ^ > Not possible. Yup and thanks to: 647 else 648 hp->dxfer_direction =

Re: [PATCH v3 4/7] libsas: add sas event wait-complete support

2017-07-14 Thread John Garry
On 14/07/2017 07:51, Hannes Reinecke wrote: #ifdef CONFIG_SCSI_SAS_HOST_SMP > extern int sas_smp_host_handler(struct Scsi_Host *shost, struct request *req, >struct request *rsp); > diff --git a/drivers/scsi/libsas/sas_port.c b/drivers/scsi/libsas/sas_port.c > index

Re: [PATCH v3 7/7] libsas: release disco mutex during waiting in sas_ex_discover_end_dev

2017-07-14 Thread John Garry
On 14/07/2017 02:44, wangyijing wrote: 在 2017/7/14 0:10, John Garry 写道: On 10/07/2017 08:06, Yijing Wang wrote: Disco mutex was introudced to prevent domain rediscovery competing with ata error handling(87c8331). If we have already hold the lock in sas_revalidate_domain and sync executing

[PATCH 1/4] scsi: scsi_transport_iscsi: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: textdata bss dec hex filename 40380 10422 44 50846c69e

[PATCH 3/4] scsi: scsi_transport_fc: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: textdata bss dec hex filename 341221932 4 360588cda

[PATCH 4/4] scsi: scsi_transport_spi: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by and work with const attribute_group. So mark the non-const structs as const. File size before: textdata bss dec hex filename 154441616 0 1706042a4

[PATCH 2/4] scsi: iscsi_boot_sysfs: constify attribute_group structures.

2017-07-14 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: textdata bss dec hex filename 25481768 0431610dc

[PATCH 0/4] constify scsi attribute_group structures.

2017-07-14 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. So mark the non-const structs as const. Arvind Yadav (4): [PATCH 1/4] scsi: scsi_transport_iscsi: constify attribute_group structures. [PATCH 2/4] scsi: iscsi_boot_sysfs: constify attribute_group structures. [PATCH 3/4] scsi:

Re: [PATCH v3 0/7] Enhance libsas hotplug feature

2017-07-14 Thread wangyijing
Hi, I'm sorry to say that I have to stop the libsas hotplug improvement work, I will resign from Huawei, so I have no time and hardware to continue to work at this issue. John is very familiar with this work, and provide a lot of good suggestions. So if John like, I am glad he could join to

Re: [PATCH v3 4/7] libsas: add sas event wait-complete support

2017-07-14 Thread wangyijing
在 2017/7/14 14:51, Hannes Reinecke 写道: > On 07/10/2017 09:06 AM, Yijing Wang wrote: >> Introduce wait-complete for libsas sas event processing, >> execute sas port create/destruct in sync. >> >> Signed-off-by: Yijing Wang >> CC: John Garry >> CC:

[bug report] scsi: sg: fix SG_DXFER_FROM_DEV transfers

2017-07-14 Thread Dan Carpenter
Hello Johannes Thumshirn, The patch 68c59fcea1f2: "scsi: sg: fix SG_DXFER_FROM_DEV transfers" from Jul 7, 2017, leads to the following static checker warning: drivers/scsi/sg.c:762 sg_is_valid_dxfer() warn: unsigned 'hp->dxfer_len' is never less than zero. drivers/scsi/sg.c

Re: [for-4.14 RFC PATCH 1/2] dm rq: avoid deadlock if dm-mq is stacked on old .request_fn device(s)

2017-07-14 Thread Christoph Hellwig
The problem here is the following: blk_finish_request must always be called with the queue lock held, it even has an assert. Without blk-mq used by dm-rq, dm uses the block softirq to execute the completion, which means we always have a different execution context and can take the queue lock

Re: [for-4.14 RFC PATCH 0/2] dm rq: eliminate historic blk-mq and .request_fn queue stacking restrictions

2017-07-14 Thread Christoph Hellwig
Btw, we might want to expedite this to 4.13, a 4.13 now defaults to blk-mq for scsi, and this patch would make sure that dm keeps on just working with that switch.

Re: [PATCH v3 7/7] libsas: release disco mutex during waiting in sas_ex_discover_end_dev

2017-07-14 Thread Hannes Reinecke
On 07/10/2017 09:06 AM, Yijing Wang wrote: > Disco mutex was introudced to prevent domain rediscovery competing > with ata error handling(87c8331). If we have already hold the lock > in sas_revalidate_domain and sync executing probe, deadlock caused, > because, sas_probe_sata() also need hold

Re: [PATCH v3 6/7] libsas: add wait-complete support to sync discovery event

2017-07-14 Thread Hannes Reinecke
On 07/10/2017 09:06 AM, Yijing Wang wrote: > Introduce a sync flag to tag discovery event whether need to > sync execute, per-event wait-complete ensure sync. > > Signed-off-by: Yijing Wang > CC: John Garry > CC: Johannes Thumshirn

Re: [PATCH v3 5/7] libsas: add a new workqueue to run probe/destruct discovery event

2017-07-14 Thread Hannes Reinecke
On 07/10/2017 09:06 AM, Yijing Wang wrote: > Sometimes, we want sync libsas probe or destruct in sas discovery work, > like when libsas revalidate domain. We need to split probe and destruct > work from the scsi host workqueue. > > Signed-off-by: Yijing Wang > CC: John

Re: [PATCH v3 4/7] libsas: add sas event wait-complete support

2017-07-14 Thread Hannes Reinecke
On 07/10/2017 09:06 AM, Yijing Wang wrote: > Introduce wait-complete for libsas sas event processing, > execute sas port create/destruct in sync. > > Signed-off-by: Yijing Wang > CC: John Garry > CC: Johannes Thumshirn > CC:

Re: [PATCH v3 3/7] libsas: Use new workqueue to run sas event

2017-07-14 Thread Hannes Reinecke
On 07/10/2017 09:06 AM, Yijing Wang wrote: > Now all libsas works are queued to scsi host workqueue, > include sas event work post by LLDD and sas discovery > work, and a sas hotplug flow may be divided into several > works, e.g libsas receive a PORTE_BYTES_DMAED event, > now we process it as

Re: [PATCH v3 1/7] libsas: Use static sas event pool to appease sas event lost

2017-07-14 Thread Hannes Reinecke
On 07/10/2017 09:06 AM, Yijing Wang wrote: > Now libsas hotplug work is static, every sas event type has its own > static work, LLDD driver queue the hotplug work into shost->work_q. > If LLDD driver burst post lots hotplug events to libsas, the hotplug > events may pending in the workqueue like >

Re: [PATCH v3 2/7] libsas: remove unused port_gone_completion

2017-07-14 Thread Hannes Reinecke
On 07/10/2017 09:06 AM, Yijing Wang wrote: > No one uses the port_gone_completion in struct asd_sas_port, > clean it out. > > Signed-off-by: Yijing Wang > --- > include/scsi/libsas.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/include/scsi/libsas.h