[PATCH 10/10] mm: replace access_process_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write parameter from access_process_vm() and replaces it with a gup_flags parameter as use of this function previously _implied_ FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising

[PATCH 06/10] mm: replace get_user_pages() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 05/10] mm: replace get_vaddr_frames() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_vaddr_frames() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write parameter from __access_remote_vm() and replaces it with a gup_flags parameter as use of this function previously _implied_ FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising

[PATCH 09/10] mm: replace access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write parameter from access_remote_vm() and replaces it with a gup_flags parameter as use of this function previously _implied_ FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising

[PATCH 07/10] mm: replace get_user_pages_remote() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_remote() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-12 Thread Laurence Oberman
- Original Message - > From: "Hannes Reinecke" > To: emi...@redhat.com, "vasu dev" , "robert w love" > > Cc: "Laurence Oberman" , "Linux SCSI Mailinglist" > , >

[PATCH 02/10] mm: remove write/force parameters from __get_user_pages_unlocked()

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from __get_user_pages_unlocked() to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes ---

[PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-12 Thread Lorenzo Stoakes
This patch series adjusts functions in the get_user_pages* family such that desired FOLL_* flags are passed as an argument rather than implied by flags. The purpose of this change is to make the use of FOLL_FORCE explicit so it is easier to grep for and clearer to callers that this flag is being

[PATCH 01/10] mm: remove write/force parameters from __get_user_pages_locked()

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from __get_user_pages_locked() to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes --- mm/gup.c |

[PATCH 03/10] mm: replace get_user_pages_unlocked() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_unlocked() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

[PATCH 12/17 v2] lpfc: Revise strings with full lpfc parameter name

2016-10-12 Thread James Smart
Revise strings with full lpfc parameter name Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_attr.c | 23 --- 1 file changed, 12

[PATCH 02/17 v2] lpfc: Correct embedded io wq element size

2016-10-12 Thread James Smart
Correct embedded io wq element size. Embedded element sizes are 128 byte elements Modified per review: change style of selecting wqesize using local variable Signed-off-by: Dick Kennedy Signed-off-by: James Smart ---

[PATCH 13/17 v2] lpfc: Fix lost target in pt-to-pt connect

2016-10-12 Thread James Smart
Fix lost target in pt-to-pt connect Change reject code to something that allows a retry Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_els.c | 2 +- 1

[PATCH 11/17 v2] lpfc: Code cleanup for lpfc_sriov_nr_virtfn parameter

2016-10-12 Thread James Smart
Code cleanup for lpfc_sriov_nr_virtfn parameter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_attr.c | 35 +++ 1 file

[PATCH 17/17 v2] lpfc: lpfc version changed to 11.2.0.2

2016-10-12 Thread James Smart
lpfc version changed to 11.2.0.2 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 16/17 v2] lpfc: Fix fw download on SLI-4 FC adapters

2016-10-12 Thread James Smart
Fix fw download on SLI-4 FC adapters Driver performs a quick validation of magic numbers in the fw download image. Driver needed to be updated for more recent magic numbers. Signed-off-by: Dick Kennedy Signed-off-by: James Smart ---

[PATCH 14/17 v2] lpfc: Correct panics with eh_timeout and eh_deadline

2016-10-12 Thread James Smart
Correct panics with eh_timeout and eh_deadline We were having double completions on our SLI-3 version of adapters. Solved by clearing our command pointer before calling scsi_done. The eh paths potentially ran simulatenously and would see the non-null value and invoke scsi_done again.

[PATCH 10/17 v2] lpfc: Code cleanup for lpfc_max_scsicmpl_time parameter

2016-10-12 Thread James Smart
Code cleanup for lpfc_max_scsicmpl_time parameter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_attr.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 06/17 v2] lpfc: Code clean up for lpfc_iocb_cnt parameter

2016-10-12 Thread James Smart
Code clean up for lpfc_iocb_cnt parameter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_attr.c | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH 15/17 v2] lpfc: Synchronize link speed with boot driver

2016-10-12 Thread James Smart
Synchronize link speed with boot driver Link speed settings set by the boot driver are reported by the hw. Driver will attempt to read them, and if set, will respect their values. The driver can override the settings with its own if instructed by user space (via bsg), with the new values being

[PATCH 07/17 v2] lpfc: Code cleanup for lpfc_enable_rrq parameter

2016-10-12 Thread James Smart
Code cleanup for lpfc_enable_rrq parameter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_attr.c | 8 ++-- 1 file changed, 2 insertions(+), 6

[PATCH 09/17 v2] lpfc: Code cleanup for lpfc_topology parameter

2016-10-12 Thread James Smart
Code cleanup for lpfc_topology parameter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_attr.c | 7 +++ 1 file changed, 3 insertions(+), 4

[PATCH 08/17 v2] lpfc: Code cleanup for lpfc_aer_support parameter

2016-10-12 Thread James Smart
Code cleanup for lpfc_aer_support parameter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_attr.c | 43 +++ 1

[PATCH 01/17 v2] Fix few small typos in lpfc_scsi.c

2016-10-12 Thread James Smart
From: "Milan P. Gandhi" This patch does a cleanup and fixes few small typos in lpfc_scsi.c Signed-off-by: Milan P. Gandhi Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_scsi.c | 21 - 1 file

[PATCH 05/17 v2] lpfc: Make lpfc_prot_xxx params per hba parameters

2016-10-12 Thread James Smart
Make lpfc_prot_mask and lpfc_prot_guard per hba parameters Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc.h | 2 ++ drivers/scsi/lpfc/lpfc_attr.c

[PATCH 04/17 v2] lpfc: Set driver environment data on adapter

2016-10-12 Thread James Smart
Set driver environment data on adapter Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_hw4.h | 12 drivers/scsi/lpfc/lpfc_sli.c | 29

[PATCH 03/17 v2] lpfc: Fix sg_reset on SCSI device causing kernel crash

2016-10-12 Thread James Smart
Fix sg_reset on SCSI device causing kernel crash Driver could reference stale node pointers in task mgmt call. Changed to use resetting cmd and look up node pointer in task mgmt function. Modified per review: Revised lpfc_send_taskmgmt() to check rdata Signed-off-by: Dick Kennedy

[PATCH 00/17 v2] lpfc: Update driver to version 11.2.0.2

2016-10-12 Thread James Smart
This patch set updates the lpfc driver to revision 11.2.0.2 The patches were cut against scsi-misc James Smart (17): Fix few small typos in lpfc_scsi.c originally posted by Milan Gandhi lpfc: Correct embedded io wq element size lpfc: Fix sg_reset on SCSI device causing kernel

Re: [PATCH v2 00/16] Convert FibreChannel bsg code to use bsg-lib

2016-10-12 Thread Steffen Maier
Hi Johannes, On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: This series converts the current bsg usage in the FibreChannel drivers over to use bsg-lib. SAS will follow once FC is in a good enough shape. I did take some inspiration from a similar patchset from Mike Christie dating back to

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-12 Thread Hannes Reinecke
On 10/12/2016 05:26 PM, Ewan D. Milne wrote: On Tue, 2016-10-11 at 10:51 -0400, Ewan D. Milne wrote: On Sat, 2016-10-08 at 19:35 +0200, Hannes Reinecke wrote: You might actually be hitting a limitation in the exchange manager code. The libfc exchange manager tries to be really clever and will

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-12 Thread Ewan D. Milne
On Tue, 2016-10-11 at 10:51 -0400, Ewan D. Milne wrote: > On Sat, 2016-10-08 at 19:35 +0200, Hannes Reinecke wrote: > > You might actually be hitting a limitation in the exchange manager code. > > The libfc exchange manager tries to be really clever and will assign a > > per-cpu exchange manager

Re: [PATCH v1 1/3] Synchronization of cmds during termination conditions

2016-10-12 Thread Bryant G. Ly
On 10/11/16 5:58 PM, Michael Cyr wrote: Signed-off-by: Michael Cyr --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1082 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h |5 +- 2 files changed, 486 insertions(+), 601 deletions(-) I would make

[PATCH v2 14/16] block: add bsg_job_put() and bsg_job_get()

2016-10-12 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transport_fc.c | 4 ++-- include/linux/bsg-lib.h | 3 ++- 3

[PATCH v2 11/16] scsi: fc: Use bsg_destroy_job

2016-10-12 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 20 ++-- include/linux/bsg-lib.h | 1 + 3 files

[PATCH v2 12/16] scsi: fc: use bsg_softirq_done

2016-10-12 Thread Johannes Thumshirn
bsg_softirq_done() and fc_bsg_softirq_done() are copies of each other, so ditch the fc specific one. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 16 ++-- include/linux/bsg-lib.h | 1

[PATCH v2 16/16] block: unexport bsg_softirq_done() again

2016-10-12 Thread Johannes Thumshirn
Unexport bsg_softirq_done() again, we don't need it outside of bsg-lib.c anymore now that scsi_transport_fc is a pure bsg-lib client. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 +-- include/linux/bsg-lib.h | 1 - 2 files changed, 1 insertion(+), 3

[PATCH v2 07/16] scsi: libfc: don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone()

2016-10-12 Thread Johannes Thumshirn
Don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone() as fc_bsg_jobdone() calls blk_complete_requeust() which raises a soft-IRQ that ends up in fc_bsg_sofirq_done() and fc_bsg_softirq_done() sets the FC_RQST_STATE_DONE flag. Signed-off-by: Johannes Thumshirn ---

[PATCH v2 15/16] scsi: fc: move FC transport's bsg code to bsg-lib

2016-10-12 Thread Johannes Thumshirn
Now that all conversions are done, move the FibreChannel bsg code over to the bsg library. Note that CONFIG_SCSI_FC_ATTRS now needs to select BLK_DEV_BSGLIB in order to build correctly. This patch is derived from work done by Mike Christie in 2011 [1] but only the iscsi parts got merged back

[PATCH v2 00/16] Convert FibreChannel bsg code to use bsg-lib

2016-10-12 Thread Johannes Thumshirn
This series converts the current bsg usage in the FibreChannel drivers over to use bsg-lib. SAS will follow once FC is in a good enough shape. I did take some inspiration from a similar patchset from Mike Christie dating back to 2011 but it's not a 1:1 copy. Patch 15/16 is heavily based on his

[PATCH v2 13/16] scsi: fc: use bsg_job_done

2016-10-12 Thread Johannes Thumshirn
fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one instead of the FC private implementation. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 4 ++-- drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v2 01/16] scsi: Get rid of struct fc_bsg_buffer

2016-10-12 Thread Johannes Thumshirn
struct fc_bsg_buffer is just a clone of struct bsg_buffer from bsg-lib, so use this one instead. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 2 +- include/scsi/scsi_transport_fc.h | 12 +++- 3

[PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-12 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 9 +-

[PATCH v2 06/16] scsi: fc: provide fc_bsg_to_rport() helper

2016-10-12 Thread Johannes Thumshirn
Provide fc_bsg_to_rport() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also move all LLDDs to use the new helper. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 5 +++--

Re: [PATCH 1/2] scsi: Handle Unit Attention when issuing SCSI command

2016-10-12 Thread James Bottomley
On Wed, 2016-10-12 at 02:25 -0300, Gabriel Krisman Bertazi wrote: > Usually, re-sending the SCSI command is enough to recover from a Unit > Attention (UA). This adds a generic retry code to the SCSI command > path in case of an UA, before giving up and returning the error > condition to the

[PATCH v2 04/16] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done

2016-10-12 Thread Johannes Thumshirn
Unify the interfaces of fc_bsg_jobdone and bsg_job_done. This will reduce the diff when moving from 'struct fc_bsg_job' to a plain 'struct bsg_job' later on. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 6

[PATCH v2 09/16] block: add reference counting for struct bsg_job

2016-10-12 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files changed, 7

[PATCH v2 05/16] scsi: fc: provide fc_bsg_to_shost() helper

2016-10-12 Thread Johannes Thumshirn
Provide fc_bsg_to_shost() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 4 +-- drivers/scsi/bfa/bfad_bsg.c

[PATCH v2 10/16] scsi: change FC drivers to use 'struct bsg_job'

2016-10-12 Thread Johannes Thumshirn
Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_ext.h | 4 +-- drivers/s390/scsi/zfcp_fc.c | 15

[PATCH v2 03/16] scsi: fc: Export fc_bsg_jobdone and use it in FC drivers

2016-10-12 Thread Johannes Thumshirn
Export fc_bsg_jobdone so drivers can use it directly instead of doing the round-trip via struct fc_bsg_job::job_done() and use it in the LLDDs. As we've converted all LLDDs over to use fc_bsg_jobdone() directly, we can remove the function pointer from struct fc_bsg_job as well. Signed-off-by:

[PATCH v2 08/16] scsi: fc: implement kref backed reference counting

2016-10-12 Thread Johannes Thumshirn
Implement kref backed reference counting instead of rolling our own. This elimnates the need of the following fields in 'struct fc_bsg_job': * ref_cnt * state_flags * job_lock bringing us close to unification of 'struct fc_bsg_job' and 'struct bsg_job'. Signed-off-by: Johannes Thumshirn

Re: [bug report] scsi: hisi_sas: add internal abort to hisi_sas_abort_task()

2016-10-12 Thread John Garry
On 12/10/2016 14:12, Dan Carpenter wrote: Hello John Garry, The patch dc8a49cabc73: "scsi: hisi_sas: add internal abort to hisi_sas_abort_task()" from Aug 24, 2016, leads to the following static checker warning: drivers/scsi/hisi_sas/hisi_sas_main.c:848 hisi_sas_abort_task()

Re: [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib

2016-10-12 Thread Johannes Thumshirn
On Tue, Oct 11, 2016 at 09:49:38AM -0700, Christoph Hellwig wrote: > Hi Johannes, > > this looks great to me. But is there a chance to consolidate it into > a more manageable set of patches? E.g. all the patches to call > export fc_bsg_jobdone, use it directly and remove the function pointer >

Re: [PATCH v1 1/3] Synchronization of cmds during termination conditions

2016-10-12 Thread Greg KH
On Tue, Oct 11, 2016 at 05:58:03PM -0500, Michael Cyr wrote: > Signed-off-by: Michael Cyr I almost never accept patches with no changelog information. For a patch that changes 1082 lines in a non-trivial way, you would think that you could explain why you are doing this

[bug report] scsi: hisi_sas: add internal abort to hisi_sas_abort_task()

2016-10-12 Thread Dan Carpenter
Hello John Garry, The patch dc8a49cabc73: "scsi: hisi_sas: add internal abort to hisi_sas_abort_task()" from Aug 24, 2016, leads to the following static checker warning: drivers/scsi/hisi_sas/hisi_sas_main.c:848 hisi_sas_abort_task() error: we previously assumed 'slot' could be