[PATCH] qedi: Limit number for CQ queues.

2017-08-10 Thread Manish Rangankar
[qed_sp_iscsi_func_start:189(host_7-0)]Cannot satisfy CQ amount. Queues requested 8, CQs available 4. Aborting function start Above condition will resolve as management firmware is capable of telling us the number of CQs available for a given PF, qed will communicate the same number to qedi, So

Re: [PATCH 1/3] scsi: allow state transition CREATED_BLOCK -> TRANSPORT_OFFLINE

2017-08-10 Thread James Bottomley
On Thu, 2017-08-10 at 09:05 +0200, Hannes Reinecke wrote: > scsi_internal_device_unblock_nowait() allows a state transition > SDEV_CREATED_BLOCK -> SDEV_TRANSPORT_OFFLINE/SDEV_OFFLINE, > scsi_device_set_state() does not. > So add the missing state transition to scsi_device_set_state(). > >

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

2017-08-10 Thread Bart Van Assche
On Thu, 2017-08-10 at 20:32 +1000, Michael Ellerman wrote: > "Martin K. Petersen" writes: > > > One of the two scsi-mq functions that requeue a request unprepares a > > > request before requeueing (scsi_io_completion()) but the other > > > function not

[PATCH 00/19] hisi_sas: misc fixes, improvements, and new features

2017-08-10 Thread John Garry
This patchset introduces an array of misc changes, most significantly including: - v2 hw reset function - core driver reset handler fixes - DFX feature - some interrupt/tasklet/probe+removal error path cleanup John Garry (4): scsi: hisi_sas: use array for v2 hw ECC errors scsi: hisi_sas:

[PATCH 07/19] scsi: hisi_sas: add irq and tasklet cleanup in v2 hw

2017-08-10 Thread John Garry
From: Xiang Chen This patch adds support to clean-up allocated IRQs and kill tasklets when probe fails and for driver removal. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH 04/19] scsi: hisi_sas: add v2 hw DFX feature

2017-08-10 Thread John Garry
From: Xiaofei Tan Add DFX feature for v2 hw. We are adding support for the following errors: - loss_of_dword_sync_count - invalid_dword_count - phy_reset_problem_count - running_disparity_error_count Signed-off-by: Xiaofei Tan Signed-off-by: John

[PATCH 12/19] scsi: hisi_sas: fix v3 hw channel interrupt processing

2017-08-10 Thread John Garry
From: Xiang Chen The channel interrupt is to process all the interrupts except PHY UP/DOWN and broadcast interrupt. So we need to clear all the interrupts except those 3 interrupts after processing channel interrupts. Signed-off-by: Xiang Chen

Spurious DISK_EVENT_MEDIA_CHANGE on USB DVD hotplug?

2017-08-10 Thread Joe Lawrence
Hi Tejun, Kay, I'm investigating a customer report which manifests itself all the way up in gnome-session when a BMC hotplug-adds a simulated DVD device. The user logs into their server's BMC and enables "media redirection", an emulated DVD device + .iso is dynamically added to the bus... in the

[PATCH 15/19] scsi: hisi_sas: add reset handler for v3 hw

2017-08-10 Thread John Garry
From: Xiang Chen Use ACPI "_RST" method to reset the controller, since FLR is not supported. Function hisi_sas_stop_phys() is introduced to remove some code duplication. Signed-off-by: Xiang Chen Signed-off-by: John Garry

[PATCH 16/19] scsi: hisi_sas: add phy_set_linkrate_v3_hw()

2017-08-10 Thread John Garry
From: Xiang Chen Add function to set linkrate for v3 hw. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 39 ++ 1 file changed, 39

[PATCH 09/19] scsi: hisi_sas: support zone management commands

2017-08-10 Thread John Garry
From: Xiaofei Tan Add two ATA commands, ATA_CMD_ZAC_MGMT_IN and ATA_CMD_ZAC_MGMT_OUT in hisi_sas_get_ata_protocol(), to support SATA SMR disk. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry ---

[PATCH 02/19] scsi: hisi_sas: avoid potential v2 hw interrupt issue

2017-08-10 Thread John Garry
From: Xiang Chen When some interrupts happen together, we need to process every interrupt one-by-one, and should not return immediately when one interrupt process is finished being processed. Signed-off-by: Xiang Chen Signed-off-by: John

[PATCH 10/19] scsi: hisi_sas: add status and command buffer for internal abort

2017-08-10 Thread John Garry
From: Xiang Chen For v3 hw, internal abort function required status and command buffer to be set, so add necessary code for this. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH 18/19] scsi: hisi_sas: replace kfree with scsi_host_put

2017-08-10 Thread John Garry
Instances of kfree(shost) should be replaced with scsi_host_put(). In addition, a missing scsi_host_put() is added for error path in hisi_sas_shost_alloc_pci() and v3 driver removal. Signed-off-by: Pan Bian # For main.c changes Signed-off-by: John Garry

[PATCH 01/19] scsi: hisi_sas: fix reset and port ID refresh issues

2017-08-10 Thread John Garry
From: Xiaofei Tan This patch provides fixes for the following issues: 1. Fix issue of controller reset required to send commands. For reset process, it may be required to send commands to the controller, but not during soft reset. So add HISI_SAS_NOT_ACCEPT_CMD_BIT to

[PATCH 11/19] scsi: hisi_sas: Modify v3 hw STP_LINK_TIMER setting

2017-08-10 Thread John Garry
From: Xiang Chen Modify STP link timer from 10ms to 500ms. Also add the register address. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +++ 1 file changed, 3

[PATCH 03/19] scsi: hisi_sas: fix v2 hw underflow residual value

2017-08-10 Thread John Garry
From: Xiang Chen The value dw0 is the residual bytes when UNDERFLOW error happens, but we filled the residual with the value of dw3 before. So change the residual from dw3 to dw0. Signed-off-by: Xiang Chen Signed-off-by: John Garry

[PATCH 14/19] scsi: hisi_sas: update some v3 register init settings

2017-08-10 Thread John Garry
From: Xiang Chen This patch updates some register setting according to recommendation from HW designer and experiment. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c |

Re: [PATCH] sd_zbc: Write unlock zone from sd_uninit_cmnd()

2017-08-10 Thread Bart Van Assche
On Thu, 2017-08-10 at 11:14 +0900, Damien Le Moal wrote: > I am currently trying different approaches for this. In the mean time, I > would like to see the unlock change patch be applied to fix the deadlock > problem. Hello Damien, That approach sounds fine to me. Bart.

Re: Increased memory usage with scsi-mq

2017-08-10 Thread Richard W.M. Jones
OK this is looking a bit better now. With scsi-mq enabled: 175 disks virtqueue_size=64: 318 disks * virtqueue_size=16: 775 disks * With scsi-mq disabled: 1755 disks * = new results I also ran the whole libguestfs test suite with

[PATCH 13/19] scsi: hisi_sas: kill tasklet when destroying irq in v3 hw

2017-08-10 Thread John Garry
From: Xiang Chen This patch adds calls to kill CQ takslets v3 hw during probe failure. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 + 1 file changed, 1

[PATCH 17/19] scsi: hisi_sas: remove phy_down_v3_hw() res variable

2017-08-10 Thread John Garry
Variable res only holds value 0, so remove it. This cleans up a coccicheck warning. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

[PATCH 19/19] scsi: hisi_sas: remove driver versioning

2017-08-10 Thread John Garry
The driver version is not updated with changes to the driver, so it has no value, so just get rid of it. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 -- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1

[PATCH 08/19] scsi: hisi_sas: service interrupt ITCT_CLR interrupt in v2 hw

2017-08-10 Thread John Garry
From: Xiang Chen This patch is a fix related to free'ing a device in v2 hw driver. Before, we polled to ITCT CLR interrupt to check if a device is free. This was error prone, as if the interrupt doesn't occur in 10us, we miss processing it. To avoid this situation,

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

2017-08-10 Thread Brian King
On 08/10/2017 10:26 AM, Bart Van Assche wrote: > On Thu, 2017-08-10 at 20:32 +1000, Michael Ellerman wrote: >> "Martin K. Petersen" writes: One of the two scsi-mq functions that requeue a request unprepares a request before requeueing (scsi_io_completion())

Re: [PATCH 3/3] scsi: make 'state' device attribute pollable

2017-08-10 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: [PATCH 2/3] scsi_lib: rework scsi_internal_device_unblock_nowait()

2017-08-10 Thread Johannes Thumshirn
switch()es are so much nicer to read :-) Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix

Re: [PATCH RESEND 0/6] hpsa: support legacy boards

2017-08-10 Thread Hannes Reinecke
On 08/10/2017 12:08 AM, Don Brace wrote: >> -Original Message- >> From: Hannes Reinecke [mailto:h...@suse.de] >> Sent: Tuesday, August 08, 2017 3:35 AM >> To: Martin K. Petersen >> Cc: Don Brace ; Christoph Hellwig >> ;

Re: [PATCH 1/3] scsi: allow state transition CREATED_BLOCK -> TRANSPORT_OFFLINE

2017-08-10 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: [PATCH RESEND 0/6] hpsa: support legacy boards

2017-08-10 Thread Christoph Hellwig
No device support in Linux is unsupported, sorry. I think we're getting into the corporate bullshit game a little too much here.

Re: [PATCHv2] scsi_dh_alua: suppress errors from unsupported devices

2017-08-10 Thread Hannes Reinecke
On 08/09/2017 06:08 PM, Christoph Hellwig wrote: >> index 0962fd5..c3aea06 100644 >> --- a/drivers/scsi/device_handler/scsi_dh_alua.c >> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c >> @@ -1100,6 +1100,8 @@ static int alua_bus_attach(struct scsi_device *sdev) >> err =

Re: [PATCHv2 4/4] scsi_devinfo: fixup string compare

2017-08-10 Thread Hannes Reinecke
On 08/09/2017 07:43 PM, Alan Stern wrote: > On Wed, 9 Aug 2017, Hannes Reinecke wrote: > >> When checking the model and vendor string we need to use the >> minimum value of either string, otherwise we'll miss out on >> wildcard matches. > > This is now true only for the model string, not the

[PATCH 3/3] scsi: make 'state' device attribute pollable

2017-08-10 Thread Hannes Reinecke
While the 'state' attribute can (and will) change occasionally, calling 'poll()' or 'select()' on it fails as sysfs is never notified that the state has changed. With this patch calling 'poll()' or 'select()' will work properly. Signed-off-by: Hannes Reinecke ---

[PATCH 2/3] scsi_lib: rework scsi_internal_device_unblock_nowait()

2017-08-10 Thread Hannes Reinecke
Rework scsi_internal_device_unblock_nowait() into using a switch statement. No functional changes. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/scsi_lib.c

[PATCH 0/3] scsi: pollable 'state' attribute

2017-08-10 Thread Hannes Reinecke
Hi all, here's a small patchset to make the 'state' device attribute pollable. It was supposed to be a small patch, but tnen hch suggested a rework and I found a missing state transition. So there you go. Hannes Reinecke (3): scsi: allow state transition CREATED_BLOCK -> TRANSPORT_OFFLINE

[PATCH 1/3] scsi: allow state transition CREATED_BLOCK -> TRANSPORT_OFFLINE

2017-08-10 Thread Hannes Reinecke
scsi_internal_device_unblock_nowait() allows a state transition SDEV_CREATED_BLOCK -> SDEV_TRANSPORT_OFFLINE/SDEV_OFFLINE, scsi_device_set_state() does not. So add the missing state transition to scsi_device_set_state(). Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c

Re: [RFC PATCH 4/6] bsg: refactor ioctl to use regular BSG-command infrastructure for SG_IO

2017-08-10 Thread Johannes Thumshirn
On Wed, Aug 09, 2017 at 04:11:18PM +0200, Benjamin Block wrote: > + return 0 == (bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); return !(bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); and make the function return bool? I have to admit, this is the 1st time I have seen the above construct. Thanks,

Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr()

2017-08-10 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: [PATCH] ses: Fix wrong page error

2017-08-10 Thread Christoph Hellwig
On Tue, Aug 01, 2017 at 01:45:36PM -0500, Brian King wrote: > If a SES device returns an error on a requested diagnostic page, > we are currently printing an error indicating the wrong page > was received. Fix this up to simply return a failure and only > check the returned page when the

Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-10 Thread Christoph Hellwig
On Wed, Aug 02, 2017 at 10:16:17AM +0200, Johannes Thumshirn wrote: > On Tue, Aug 01, 2017 at 03:12:39PM -0700, James Smart wrote: > > @@ -463,9 +472,9 @@ static struct nvmet_fc_fcp_iod * > > nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue) > > { > > static struct nvmet_fc_fcp_iod

Re: [PATCH 1/2] nvmet_fc: add defer_req callback for deferment of cmd buffer return

2017-08-10 Thread Christoph Hellwig
> @@ -463,9 +472,9 @@ static struct nvmet_fc_fcp_iod * > nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue) > { > static struct nvmet_fc_fcp_iod *fod; This isn't new, but is this really supposed to be a static variable, that is all instances of this code sharing it use the same?

Re: nvmf question - synchronization between target/initiator regarding partitions

2017-08-10 Thread Christoph Hellwig
On Mon, Aug 07, 2017 at 02:29:47PM -0300, Guilherme G. Piccoli wrote: > Thanks for your feedback Hannes, agreed! And btw, you'll see similar results with the SCSI target or nbd, so it's not really nvme specific.

Re: [RFC PATCH 6/6] bsg: reduce unnecessary arguments for blk_complete_sgv4_hdr_rq()

2017-08-10 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: [PATCH 2/2] lpfc: support nvmet_fc defer_rcv callback

2017-08-10 Thread Christoph Hellwig
Applied to nvme-4.13 with the void casts removed, but the strings left as the surrounding code.

Re: [PATCH 1/3] scsi: allow state transition CREATED_BLOCK -> TRANSPORT_OFFLINE

2017-08-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] arcmsr: add const to bin_attribute structures

2017-08-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 3/3] scsi: make 'state' device attribute pollable

2017-08-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 2/3] scsi_lib: rework scsi_internal_device_unblock_nowait()

2017-08-10 Thread Christoph Hellwig
On Thu, Aug 10, 2017 at 09:05:30AM +0200, Hannes Reinecke wrote: > Rework scsi_internal_device_unblock_nowait() into using a > switch statement. > No functional changes. > > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/scsi_lib.c | 18 -- > 1 file changed,

Re: [RFC PATCH 2/6] bsg: assign sense_len instead of fixed SCSI_SENSE_BUFFERSIZE

2017-08-10 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-10 Thread Christoph Hellwig
We can't use an on-stack buffer for the sense data, as drivers will dma to it. So we should reuse the SCSI init_rq_fn() for the BSG queues and/or implement the same scheme.

Re: [RFC PATCH 3/6] bsg: scsi-transport: add compile-tests to prevent reply-buffer overflows

2017-08-10 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [RFC PATCH 4/6] bsg: refactor ioctl to use regular BSG-command infrastructure for SG_IO

2017-08-10 Thread Christoph Hellwig
On Thu, Aug 10, 2017 at 10:24:56AM +0200, Johannes Thumshirn wrote: > On Wed, Aug 09, 2017 at 04:11:18PM +0200, Benjamin Block wrote: > > + return 0 == (bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); > > return !(bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); and make the function return > bool? I have to admit,

Re: [PATCH RESEND 0/6] hpsa: support legacy boards

2017-08-10 Thread Hannes Reinecke
On 08/10/2017 09:09 AM, Christoph Hellwig wrote: > No device support in Linux is unsupported, sorry. I think we're > getting into the corporate bullshit game a little too much here. > Well, yes and no. My intention with the 'unsupported' flag was to differentiate legit errors / warnings from

Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr()

2017-08-10 Thread Christoph Hellwig
On Wed, Aug 09, 2017 at 04:11:19PM +0200, Benjamin Block wrote: > Since struct bsg_command is now used in every calling case, we don't > need separation of arguments anymore that are contained in the same > bsg_command. > > Signed-off-by: Benjamin Block > --- >

Re: [RFC PATCH 6/6] bsg: reduce unnecessary arguments for blk_complete_sgv4_hdr_rq()

2017-08-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: Increased memory usage with scsi-mq

2017-08-10 Thread Richard W.M. Jones
On Thu, Aug 10, 2017 at 02:53:58PM +0200, Paolo Bonzini wrote: > can_queue and cmd_per_lun are different. can_queue should be set to the > value of vq->vring.num where vq is the command virtqueue (the first one > is okay if there's >1). > > If you want to change it, you'll have to do so in QEMU.

Re: Increased memory usage with scsi-mq

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 16:16, Richard W.M. Jones wrote: > On Thu, Aug 10, 2017 at 02:53:58PM +0200, Paolo Bonzini wrote: >> can_queue and cmd_per_lun are different. can_queue should be set to the >> value of vq->vring.num where vq is the command virtqueue (the first one >> is okay if there's >1). >> >> If

[PATCH 05/19] scsi: hisi_sas: use array for v2 hw ECC errors

2017-08-10 Thread John Garry
The code to print ECC errors in v2 hw driver is very repetitive. This patch condensed the code by looping an array of errors. Signed-off-by: John Garry Signed-off-by: Shiju Jose --- drivers/scsi/hisi_sas/hisi_sas.h | 8 +

[PATCH 06/19] scsi: hisi_sas: remove repeated device config in v2 hw

2017-08-10 Thread John Garry
From: Xiang Chen This patch removes some repeated configurations: (1) The device id of the device is already set in the alloc function, so we don't need to modify in free device function. (2) Field dev_type and dev_status are configured in hisi_sas_dev_gone(), so there

Re: Increased memory usage with scsi-mq

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 17:40, Richard W.M. Jones wrote: > OK this is looking a bit better now. > > With scsi-mq enabled: 175 disks > virtqueue_size=64: 318 disks * > virtqueue_size=16: 775 disks * > With scsi-mq disabled: 1755 disks > * = new results

[PATCH 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Richard W.M. Jones
Since switching to blk-mq as the default in commit 5c279bd9e406 ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as much kernel memory. qemu currently allocates a fixed 128 entry virtqueue. can_queue currently is set to 1024. But with indirect descriptors, each command in the

[PATCH v2 0/2] virtio_scsi: Set can_queue based on size of virtqueue.

2017-08-10 Thread Richard W.M. Jones
v1 was here: https://lkml.org/lkml/2017/8/10/689 v1 -> v2: Remove .can_queue field from the templates. Rich.

[PATCH] scsi-sysfs: correct errno for host_reset

2017-08-10 Thread weiping zhang
if scsi_host_template->host_reset is NULL, when user "echo adapter > /sys/class/scsi_host/hostx/host_reset", -EINVAL will return even string compare successfully. It make user confuse. change to: -EINVAL if string not match "adapter" / "firmware"; -EOPNOTSUPP if string match but not

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 18:40, Richard W.M. Jones wrote: > If using indirect descriptors, you can make the total_sg as large as > you want. If not, BUG is too serious because the function later > returns -ENOSPC. > > Thanks Paolo Bonzini, Christoph Hellwig. > > Signed-off-by: Richard W.M. Jones

Re: [PATCH 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Paolo Bonzini
On 10/08/2017 18:40, Richard W.M. Jones wrote: > Since switching to blk-mq as the default in commit 5c279bd9e406 > ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as > much kernel memory. > > qemu currently allocates a fixed 128 entry virtqueue. can_queue > currently is set to

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2017 at 05:40:34PM +0100, Richard W.M. Jones wrote: > If using indirect descriptors, you can make the total_sg as large as > you want. That would be a spec violation though, even if it happens to work on current QEMU. The spec says: A driver MUST NOT create a descriptor

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:21:16AM +0300, Michael S. Tsirkin wrote: > On Thu, Aug 10, 2017 at 05:40:34PM +0100, Richard W.M. Jones wrote: > > If using indirect descriptors, you can make the total_sg as large as > > you want. > > That would be a spec violation though, even if it happens to > work

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2017 at 10:30:38PM +0100, Richard W.M. Jones wrote: > On Fri, Aug 11, 2017 at 12:21:16AM +0300, Michael S. Tsirkin wrote: > > On Thu, Aug 10, 2017 at 05:40:34PM +0100, Richard W.M. Jones wrote: > > > If using indirect descriptors, you can make the total_sg as large as > > > you

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > Then we probably should fail probe if vq size is too small. What does this mean? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog:

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2017 at 10:35:11PM +0100, Richard W.M. Jones wrote: > On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > > Then we probably should fail probe if vq size is too small. > > What does this mean? > > Rich. We must prevent driver from submitting s/g lists > vq size

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:41:47AM +0300, Michael S. Tsirkin wrote: > On Thu, Aug 10, 2017 at 10:35:11PM +0100, Richard W.M. Jones wrote: > > On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > > > Then we probably should fail probe if vq size is too small. > > > > What does

Re: SCSI Oops: Unable to handle kernel NULL ptr dereference

2017-08-10 Thread Ewan D. Milne
[cc's snipped to linux-scsi ] On Thu, 2017-08-10 at 17:05 +, man...@openmail.cc wrote: > Hello, > > I'd like to report this rare panic I experienced today. I've been on > 4.12.3 since it was released and got this panic totally unexpected, > probably when terminating my WL compositor. I

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-10 Thread Benjamin Block
On Thu, Aug 10, 2017 at 11:32:17AM +0200, Christoph Hellwig wrote: > We can't use an on-stack buffer for the sense data, as drivers will > dma to it. So we should reuse the SCSI init_rq_fn() for the BSG > queues and/or implement the same scheme. > BSG is odd in this regard. Here is the data

Re: [RFC PATCH 4/6] bsg: refactor ioctl to use regular BSG-command infrastructure for SG_IO

2017-08-10 Thread Benjamin Block
On Thu, Aug 10, 2017 at 10:24:56AM +0200, Johannes Thumshirn wrote: > On Wed, Aug 09, 2017 at 04:11:18PM +0200, Benjamin Block wrote: > > + return 0 == (bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); > > return !(bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); and make the function return > bool? I have to admit,

Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr()

2017-08-10 Thread Benjamin Block
On Thu, Aug 10, 2017 at 11:35:31AM +0200, Christoph Hellwig wrote: > On Wed, Aug 09, 2017 at 04:11:19PM +0200, Benjamin Block wrote: > > Since struct bsg_command is now used in every calling case, we don't > > need separation of arguments anymore that are contained in the same > > bsg_command. > >

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-10 Thread Benjamin Block
On Fri, Aug 11, 2017 at 12:10:38AM +0200, Benjamin Block wrote: > On Thu, Aug 10, 2017 at 11:32:17AM +0200, Christoph Hellwig wrote: > > We can't use an on-stack buffer for the sense data, as drivers will > > dma to it. So we should reuse the SCSI init_rq_fn() for the BSG > > queues and/or

Re: [PATCH] arcmsr: add const to bin_attribute structures

2017-08-10 Thread Martin K. Petersen
Christoph, > Looks good, > > Reviewed-by: Christoph Hellwig Applied to 4.14/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

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

2017-08-10 Thread Martin K. Petersen
Finn, > 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... Applied to

Re: [PATCH 0/7] smartpqi updates

2017-08-10 Thread Martin K. Petersen
Don, > These patches are based on Linus's tree > > The changes are: > > - smartpqi-add-pqi-reset-quiesce-support >- allow driver to confirm completion of a reset. > - smartpqi-enhance-bmic-cache-flush >- can now distinguish between shutdown and power > management operation. > -

Re: [PATCH 0/5] qcom-ufs: phy/hcd: Refactor phy initialization code

2017-08-10 Thread Martin K. Petersen
Vivek, > Can you kindly review this patch series (for UFS controller changes) > and consider giving your Ack so that Kishon can pull in the series > through phy tree. SCSI piece looks OK. Would still like Subhash to review the rest. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2] scsi: megaraid_sas: fix allocate instance->pd_info twice

2017-08-10 Thread Martin K. Petersen
weiping, > fix allocate instance->pd_info twice which was introduced by > 96188a89cc6d. Applied to 4.14/scsi-queue, thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: scsi: mvsas: replace kfree with scsi_host_put

2017-08-10 Thread Martin K. Petersen
Pan, > The return value of scsi_host_alloc() should be released by > scsi_host_put(). However, in function mvs_pci_init(), kfree() > is used. This patch replaces kfree() with scsi_host_put() to avoid > possible memory leaks. Applied to 4.14/scsi-queue. -- Martin K. Petersen Oracle Linux

Re: scsi: pm8001: fix double free in pm8001_pci_probe

2017-08-10 Thread Martin K. Petersen
Pan, > In function pm8001_pci_probe(), on errors that the control flow jumps to > label err_out_ha_free, function pm8001_free() is called. In pm8001_free(), > scsi_host_put() is called to release shost, which keeps the return value > of scsi_host_alloc(). After pm8001_free() returns, kfree() is

Re: scsi: qla2xxx: use dma_mapping_error to check map errors

2017-08-10 Thread Martin K. Petersen
Pan, > The return value of dma_map_single() should be checked by > dma_mapping_error(). However, in function qla26xx_dport_diagnostics(), > its return value is checked against NULL, which could result in > failures. Applied to 4.14/scsi-queue. -- Martin K. Petersen Oracle Linux

Re: [ezIX] #753: LSHW Causing Rewinds On LTO7 Drives

2017-08-10 Thread ezIX
#753: LSHW Causing Rewinds On LTO7 Drives --+- Reporter: a.richman@… | Owner: lyonel Type: defect | Status: new Priority: major| Milestone: Component: lshw |Version: Resolution:

[ezIX] #753: LSHW Causing Rewinds On LTO7 Drives

2017-08-10 Thread ezIX
#753: LSHW Causing Rewinds On LTO7 Drives -+ Reporter: a.richman@… | Owner: lyonel Type: defect | Status: new Priority: major| Milestone: Component: lshw |Version: Keywords: lto lto7

Re: [PATCH RESEND 0/6] hpsa: support legacy boards

2017-08-10 Thread Hannes Reinecke
On 08/10/2017 04:06 PM, James Bottomley wrote: > On Thu, 2017-08-10 at 09:09 +0200, Christoph Hellwig wrote: >> No device support in Linux is unsupported, sorry. I think we're >> getting into the corporate bullshit game a little too much here. > > I think there are two different definitions of

Re: [PATCH RESEND 0/6] hpsa: support legacy boards

2017-08-10 Thread James Bottomley
On Thu, 2017-08-10 at 09:09 +0200, Christoph Hellwig wrote: > No device support in Linux is unsupported, sorry.  I think we're > getting into the corporate bullshit game a little too much here. I think there are two different definitions of supported here.  To us, any device to which the driver

[PATCH 5/7] smartpqi: update kexec and power down support

2017-08-10 Thread Don Brace
From: Kevin Barnett add PQI reset to driver shutdown callback to work around controller bug. During an 1.) OS shutdown or 2.) kexec outside of a kdump, the Linux kernel will clear BME on our controller. If BME is cleared during a controller/host PCIe transfer, the

[PATCH 4/7] smartpqi: cleanup doorbell register usage.

2017-08-10 Thread Don Brace
From: Kevin Barnett Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 11 ++-

[PATCH 1/7] smartpqi: add pqi reset quiesce support

2017-08-10 Thread Don Brace
From: Kevin Barnett Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi.h | 23 +

[PATCH 6/7] smartpqi: add in new controller ids

2017-08-10 Thread Don Brace
From: Kevin Barnett Update the driver’s PCI IDs to match the latest Microsemi controllers Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace ---

[PATCH 0/7] smartpqi updates

2017-08-10 Thread Don Brace
These patches are based on Linus's tree The changes are: - smartpqi-add-pqi-reset-quiesce-support - allow driver to confirm completion of a reset. - smartpqi-enhance-bmic-cache-flush - can now distinguish between shutdown and power management operation. -

[PATCH 3/7] smartpqi: update pqi passthru ioctl

2017-08-10 Thread Don Brace
From: Kevin Barnett - make pass-thru requests bi-directional Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace ---

[PATCH 2/7] smartpqi: enhance BMIC cache flush

2017-08-10 Thread Don Brace
From: Kevin Barnett - distinguish between shutdown and non-shutdown. Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace ---

[PATCH 7/7] smartpqi: change driver version to 1.1.2-125

2017-08-10 Thread Don Brace
From: Kevin Barnett Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c |8 1 file changed, 4

[PATCH] sym53c8xx: Avoid undefined behaviour in drivers/scsi/sym53c8xx_2/sym_hipd.c:762

2017-08-10 Thread Helge Deller
On parisc I see this UBSAN warning with a sym53c896: UBSAN: Undefined behaviour in ./drivers/scsi/sym53c8xx_2/sym_hipd.c:762:24 index -1903078336 is out of range for type 'u32 [7]' Avoid this warning by switching to dev64_ul(). Signed-off-by: Helge Deller diff --git

[PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
If using indirect descriptors, you can make the total_sg as large as you want. If not, BUG is too serious because the function later returns -ENOSPC. Thanks Paolo Bonzini, Christoph Hellwig. Signed-off-by: Richard W.M. Jones --- drivers/virtio/virtio_ring.c | 5 +++-- 1

[PATCH 0/2] virtio_scsi: Set can_queue based on size of virtqueue.

2017-08-10 Thread Richard W.M. Jones
Earlier discussion: https://lkml.org/lkml/2017/8/4/601 "Increased memory usage with scsi-mq" Downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1478201

[PATCH v2 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Richard W.M. Jones
Since switching to blk-mq as the default in commit 5c279bd9e406 ("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as much kernel memory. qemu currently allocates a fixed 128 entry virtqueue. can_queue currently is set to 1024. But with indirect descriptors, each command in the

  1   2   >