[PATCH 5/16] ufs: fix error return code

2015-04-05 Thread Julia Lawall
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ identifier ret; expression e1,e2; @@ ( if (\(ret 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when !=

Re: [PATCH 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-05 Thread Akinobu Mita
2015-04-05 19:10 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/4/2015 3:24 PM, Akinobu Mita wrote: The scatterlist for protection information which is passed to sbc_dif_verify_read() or sbc_dif_verify_write() requires that neighboring scatterlist entries are contiguous or chained so

[PATCH v2 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-05 Thread Akinobu Mita
The scatterlist for protection information which is passed to sbc_dif_verify_read() or sbc_dif_verify_write() requires that neighboring scatterlist entries are contiguous or chained so that they can be iterated by sg_next(). However, the protection information for RD-MCP backends could be located

[PATCH v2 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-05 Thread Akinobu Mita
Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg

[PATCH 0/16] fix error return code

2015-04-05 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @ok exists@ identifier f,ret,i; expression e; constant c; @@ // identify a function that returns a negative return value at least once. f(...) { ... when any ( return -c@i; | ret = -c@i; ...

Re: [PATCH 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-05 Thread Akinobu Mita
2015-04-05 19:01 GMT+09:00 Sagi Grimberg sa...@dev.mellanox.co.il: On 4/4/2015 3:24 PM, Akinobu Mita wrote: Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off-by:

Re: [PATCH 10/21] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command

2015-04-05 Thread Sebastian Herbszt
James Smart wrote: Fix provide host name and OS name in RSNN-NN FC-GS command Signed-off-by: Dick Kennedy dick.kenn...@emulex.com Signed-off-by: James Smart james.sm...@emulex.com --- drivers/scsi/lpfc/lpfc_ct.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-)

Re: [PATCH 01/21] lpfc: Fix the iteration count to match the 30 sec comment in the routine lpfc_pci_function_reset

2015-04-05 Thread Sebastian Herbszt
James Smart wrote: Fix the iteration count to match the 30 sec comment in the routine lpfc_pci_function_reset Signed-off-by: Dick Kennedy dick.kenn...@emulex.com Signed-off-by: James Smart james.sm...@emulex.com --- drivers/scsi/lpfc/lpfc_init.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-05 Thread Sagi Grimberg
On 4/4/2015 3:24 PM, Akinobu Mita wrote: Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger

Re: [PATCH 15/21] lpfc: Implement support for wire-only DIF devices

2015-04-05 Thread Sebastian Herbszt
James Smart wrote: Implement support for wire-only DIF devices This patch adds the ability to support auto-enablement of wire-only DIF (DIF is generated on TX to target, stripped on RX; OS unaware DIF in use) for a select set of devices. Currently, there is only 1 device vendor supported:

Re: [PATCH 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-05 Thread Sagi Grimberg
On 4/4/2015 3:24 PM, Akinobu Mita wrote: The scatterlist for protection information which is passed to sbc_dif_verify_read() or sbc_dif_verify_write() requires that neighboring scatterlist entries are contiguous or chained so that they can be iterated by sg_next(). However, the protection

Re: [PATCH 3/7] scsi: add scsi-mq helpers to retrieve pdu and check started state

2015-04-05 Thread Christoph Hellwig
On Fri, Apr 03, 2015 at 09:58:19AM -0600, Jens Axboe wrote: +static inline void *scsi_mq_scmd_to_pdu(struct scsi_cmnd *scmd) +{ + return blk_mq_rq_to_pdu(scmd-request) + sizeof(*scmd); +} We've already got scsi_cmd_priv to cover this. +static inline bool scsi_mq_scmd_started(struct

Re: [PATCH 4/7] scsi: add scsi-mq helper for iterating over busy commands

2015-04-05 Thread Christoph Hellwig
On Fri, Apr 03, 2015 at 09:58:20AM -0600, Jens Axboe wrote: This is basically just a wrapper around blk_mq_queue_busy_iter(), so that LLDs don't have to deal with or worry about blk-mq hardware queues. I'd prefer not to expose this to drivers, but if we do it needs to work for the !mq case. --

Re: [PATCH 5/7] scsi: add host template init/exit_command hooks

2015-04-05 Thread Christoph Hellwig
On Fri, Apr 03, 2015 at 09:58:21AM -0600, Jens Axboe wrote: If a LLD has hardware commands in the request pdu, then we need some helper hooks to help the driver initialize state at load time, and potentially to tear down state at rmmod time. Add a host template -init_command() and

Re: [PATCH 15/21] lpfc: Implement support for wire-only DIF devices

2015-04-05 Thread Christoph Hellwig
On Fri, Apr 03, 2015 at 05:13:00PM -0400, James Smart wrote: Implement support for wire-only DIF devices This patch adds the ability to support auto-enablement of wire-only DIF (DIF is generated on TX to target, stripped on RX; OS unaware DIF in use) for a select set of devices. Currently,

Re: [PATCH 6/7] mpt2sas: store scsi io tracker data in the scsi command / request

2015-04-05 Thread Christoph Hellwig
On Fri, Apr 03, 2015 at 09:58:22AM -0600, Jens Axboe wrote: +struct scsiio_tracker * +mpt2sas_get_st_from_smid(struct MPT2SAS_ADAPTER *ioc, u16 smid) +{ + if (shost_use_blk_mq(ioc-shost)) { + struct scsi_cmnd *scmd; + + scmd = scsi_mq_find_tag(ioc-shost, smid -

Re: [PATCH 00/20] mpt3sas: driver update

2015-04-05 Thread Christoph Hellwig
This seems to be missing the corresponding mpt2 updates. Nak to anything that gets these drivers further out of sync. Btw, I still need a second ACK for http://www.spinics.net/lists/linux-scsi/msg82027.html as well, so we can start getting rid of this duplication mess. -- To unsubscribe from