Re: [Open-FCoE] [PATCH RFC 5/5] qedf: Add FIP request handling

2017-01-09 Thread Hannes Reinecke
On 01/09/2017 05:47 PM, Chad Dupuis wrote:
> 
> On Wed, 28 Dec 2016, 9:11am -, Hannes Reinecke wrote:
> 
>> On 12/23/2016 08:17 PM, Dupuis, Chad wrote:
>>> From: "Dupuis, Chad" 
>>>
>>> This patch adds handling for FIP requests and responses that are handled by
>>> the driver itself and not by libfcoe.
>>>
>>> Signed-off-by: Nilesh Javali 
>>> Signed-off-by: Manish Rangankar 
>>> Signed-off-by: Saurav Kashyap 
>>> Signed-off-by: Chad Dupuis 
>>> ---
>>>  drivers/scsi/qedf/qedf_fip.c | 267 
>>> +++
>>>  1 file changed, 267 insertions(+)
>>>  create mode 100644 drivers/scsi/qedf/qedf_fip.c
>>>
>>> diff --git a/drivers/scsi/qedf/qedf_fip.c b/drivers/scsi/qedf/qedf_fip.c
>>> new file mode 100644
>>> index 000..4f185c6
>>> --- /dev/null
>>> +++ b/drivers/scsi/qedf/qedf_fip.c
>>> @@ -0,0 +1,267 @@
>>> +/*
>>> + *  QLogic FCoE Offload Driver
>>> + *  Copyright (c) 2016 Cavium Inc.
>>> + *
>>> + *  This software is available under the terms of the GNU General Public 
>>> License
>>> + *  (GPL) Version 2, available from the file COPYING in the main directory 
>>> of
>>> + *  this source tree.
>>> + */
>>> +#include 
>>> +#include 
>>> +#include "qedf.h"
>>> +
>>> +extern const struct qed_fcoe_ops *qed_ops;
>>> +/*
>>> + * FIP VLAN functions that will eventually move to libfcoe.
>>> + */
>>> +
>>> +void qedf_fcoe_send_vlan_req(struct qedf_ctx *qedf)
>>> +{
>>> +   struct sk_buff *skb;
>>> +   char *eth_fr;
>>> +   int fr_len;
>>> +   struct fip_vlan *vlan;
>>> +#define MY_FIP_ALL_FCF_MACS((__u8[6]) { 1, 0x10, 0x18, 1, 0, 2 })
>>> +   static u8 my_fcoe_all_fcfs[ETH_ALEN] = MY_FIP_ALL_FCF_MACS;
>>
>> Do you support VN2VN, too?
> 
> Not currently, no.
> 
Ah.

Too bad. Any plans for it?
It certainly eases up P2P setups for FCoE...

Cheers,

Hannes
-- 
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Open-FCoE] [PATCH RFC 2/5] qedf: Add QLogic FastLinQ offload FCoE driver framework.

2017-01-09 Thread Hannes Reinecke
On 01/09/2017 05:45 PM, Chad Dupuis wrote:
> 
> On Wed, 28 Dec 2016, 9:00am -, Hannes Reinecke wrote:
> 
>> On 12/23/2016 08:17 PM, Dupuis, Chad wrote:
>>> From: "Dupuis, Chad" 
>>>
>>> The QLogic FastLinQ Driver for FCoE (qedf) is the FCoE specific module
>>> for 41000 Series Converged Network Adapters by QLogic.
>>>
>>> This patch consists of following changes:
>>>   - MAINTAINERS Makefile and Kconfig changes for qedf
>>>   - PCI driver registration
>>>   - libfc/fcoe host level initialization
>>>   - SCSI host template initialization and callbacks
>>>   - Debugfs and log level infrastructure
>>>   - Link handling
>>>   - Firmware interface structures
>>>   - QED core module initialization
>>>   - Light L2 interface callbacks
>>>
>>> Signed-off-by: Nilesh Javali 
>>> Signed-off-by: Manish Rangankar 
>>> Signed-off-by: Saurav Kashyap 
>>> Signed-off-by: Chad Dupuis 
>>> ---
>>>  MAINTAINERS  |6 +
>>>  drivers/scsi/Kconfig |1 +
>>>  drivers/scsi/qedf/Kconfig|   11 +
>>>  drivers/scsi/qedf/Makefile   |5 +
>>>  drivers/scsi/qedf/qedf.h |  555 ++
>>>  drivers/scsi/qedf/qedf_attr.c|  165 ++
>>>  drivers/scsi/qedf/qedf_dbg.c |  192 +++
>>>  drivers/scsi/qedf/qedf_dbg.h |  153 ++
>>>  drivers/scsi/qedf/qedf_debugfs.c |  472 +
>>>  drivers/scsi/qedf/qedf_main.c| 3519 
>>> ++
>>>  drivers/scsi/qedf/qedf_version.h |   15 +
>>>  11 files changed, 5094 insertions(+)
>>>  create mode 100644 drivers/scsi/qedf/Kconfig
>>>  create mode 100644 drivers/scsi/qedf/Makefile
>>>  create mode 100644 drivers/scsi/qedf/qedf.h
>>>  create mode 100644 drivers/scsi/qedf/qedf_attr.c
>>>  create mode 100644 drivers/scsi/qedf/qedf_dbg.c
>>>  create mode 100644 drivers/scsi/qedf/qedf_dbg.h
>>>  create mode 100644 drivers/scsi/qedf/qedf_debugfs.c
>>>  create mode 100644 drivers/scsi/qedf/qedf_main.c
>>>  create mode 100644 drivers/scsi/qedf/qedf_version.h
>>>
>> [ .. ]
>>> +/* Returns true if we have a valid vlan, false otherwise */
>>> +static bool qedf_initiate_fipvlan_req(struct qedf_ctx *qedf)
>>> +{
>>> +   int rc;
>>> +
>>> +   if (atomic_read(>link_state) != QEDF_LINK_UP) {
>>> +   QEDF_ERR(&(qedf->dbg_ctx), "Link not up.\n");
>>> +   return  false;
>>> +   }
>>> +
>>> +   while (qedf->fipvlan_retries--) {
>>> +   if (qedf->vlan_id > 0)
>>> +   return true;
>> Some weird FCoE bridges (most notably HP VirtualConnect) return a VLAN
>> ID of '0'. Shouldn't you rather test for '>= 0' here?
> 
> Will look into this but isn't a VLAN ID of 0 not valid?
> 
Well, a VLAN ID of '0' indicates no VLAN at all but rather use the base
interface.
But you still will be seeing a VLAN ID '0' in the FIP VLAN response.


Cheers,

Hannes
-- 
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-09 Thread Andrew Donnellan

On 10/01/17 16:00, Martin K. Petersen wrote:

The first three patches in the series were submitted by you but do not
carry your Signed-off-by:...


hmm, over in linuxppc-land I don't think we particularly enforce this. 
Thanks for the reminder!


--
Andrew Donnellan  OzLabs, ADL Canberra
andrew.donnel...@au1.ibm.com  IBM Australia Limited

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] cxlflash: Enhancements, cleanup and fixes

2017-01-09 Thread Martin K. Petersen
> "Uma" == Uma Krishnan  writes:

Uma,

Uma> This patch series includes an enhancement to support a new command
Uma> queuing model and also cleans up prints throughout the driver. The
Uma> last patch in the series fixes a racing issue.

Uma> The series is based upon v4.10-rc2, intended for 4.11 and is
Uma> bisectable.

Uma> Matthew R. Ochs (3):
Uma>   cxlflash: Refactor context reset to share reset logic cxlflash:
Uma>   Support SQ Command Mode cxlflash: Cleanup prints

The first three patches in the series were submitted by you but do not
carry your Signed-off-by:...

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] scsi: esas2r: Fix format string type mistakes

2017-01-09 Thread Martin K. Petersen
> "Kees" == Kees Cook  writes:

Kees> From: Emese Revfy  This adds the missing
Kees> __printf attribute which allows compile time format string
Kees> checking (and will be used by the coming initify gcc
Kees> plugin). Additionally, this fixes the warnings exposed by the
Kees> attribute.

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] scsi: mpt3sas: fix hang on ata passthru commands

2017-01-09 Thread Martin K. Petersen
> "Sreekanth" == Sreekanth Reddy  writes:

Sreekanth> We are fine with this patch. Can we rename function
Sreekanth> 'set_satl_pending()' name to '_scsih_set_satl_pending()' and
Sreekanth> can add headers to this function.

Sreekanth> other wise I am OK.

Sreekanth> Acked-by: Sreekanth Reddy 

James: Please tweak and post an updated patch.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] pmcraid: switch to pci_alloc_irq_vectors

2017-01-09 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig  writes:

Christoph> On Tue, Nov 29, 2016 at 11:42:35AM -0500, Martin K. Petersen wrote:
>> > "Christoph" == Christoph Hellwig  writes:
>> 
>> Somebody please review.

Christoph> review ping^2

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] bfa: remove bfa_fcs_mod_s

2017-01-09 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig  writes:

Christoph> Just call the functions directly instead of obsfucating the
Christoph> call chain.  This was in reply to a patch from Kees Cook to
Christoph> constify the function pointer struct bfa_fcs_mod_s, but it
Christoph> turns out there is no reason to have this indirection at all.

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] qla2xxx: rename {vendor|hba}_indentifer to {vendor|hba}_identifer

2017-01-09 Thread Martin K. Petersen
> "Colin" == Colin King  writes:

Colin> Rename the Colin> vendor_indentifer and hba_indentifer fields to
correct spelling.

Applied to 4.11/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: scsi: qla2xxx: Fix apparent cut-n-paste error.

2017-01-09 Thread Martin K. Petersen
> "Dave" == Dave Jones  writes:

Dave> commit 093df73771bac8a37d607c0e705d157a8cef4c5c introduces two
Dave> bodies of code that look similar but with s/req/rsp/ in the second
Dave> instance.  But in one case, it looks like this conversion was
Dave> missed.

Applied to 4.10/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] scsi: qla2xxx: silent -Wformat-security warning

2017-01-09 Thread Martin K. Petersen
> "Nicolas" == Nicolas Iooss  writes:

Nicolas> qla24xx_enable_msix() calls scnprintf() with a non-literal
Nicolas> format string. This makes clang report -Wformat-security
Nicolas> warnings when compiling this function:

Applied 1+2 to 4.11/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] qla2xxx: Get mutex lock before checking optrom_state

2017-01-09 Thread Martin K. Petersen
> "Milan" == Milan P Gandhi  writes:

Milan> There is a race condition with qla2xxx optrom functions where one
Milan> thread might modify optrom buffer, optrom_state while other
Milan> thread is still reading from it.

Applied to 4.10/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] qla2xxx: rename {vendor|hba}_indentifer to {vendor|hba}_identifer

2017-01-09 Thread Madhani, Himanshu

On 12/29/16, 2:20 PM, "Colin King"  wrote:

>From: Colin Ian King 
>
>Rename the vendor_indentifer and hba_indentifer fields to correct spelling.
>
>Signed-off-by: Colin Ian King 
>---
> drivers/scsi/qla2xxx/qla_def.h | 4 ++--
> drivers/scsi/qla2xxx/qla_gs.c  | 6 +++---
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
>index f7df01b..ef699b6 100644
>--- a/drivers/scsi/qla2xxx/qla_def.h
>+++ b/drivers/scsi/qla2xxx/qla_def.h
>@@ -2247,7 +2247,7 @@ struct ct_fdmiv2_hba_attr {
>   uint32_t num_ports;
>   uint8_t fabric_name[WWN_SIZE];
>   uint8_t bios_name[32];
>-  uint8_t vendor_indentifer[8];
>+  uint8_t vendor_identifier[8];
>   } a;
> };
> 
>@@ -2422,7 +2422,7 @@ struct ct_sns_req {
>   } rsnn_nn;
> 
>   struct {
>-  uint8_t hba_indentifier[8];
>+  uint8_t hba_identifier[8];
>   } ghat;
> 
>   struct {
>diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
>index 94e8a85..ee3df87 100644
>--- a/drivers/scsi/qla2xxx/qla_gs.c
>+++ b/drivers/scsi/qla2xxx/qla_gs.c
>@@ -1939,15 +1939,15 @@ qla2x00_fdmiv2_rhba(scsi_qla_host_t *vha)
>   /* Vendor Identifier */
>   eiter = entries + size;
>   eiter->type = cpu_to_be16(FDMI_HBA_TYPE_VENDOR_IDENTIFIER);
>-  snprintf(eiter->a.vendor_indentifer, sizeof(eiter->a.vendor_indentifer),
>+  snprintf(eiter->a.vendor_identifier, sizeof(eiter->a.vendor_identifier),
>   "%s", "QLGC");
>-  alen = strlen(eiter->a.vendor_indentifer);
>+  alen = strlen(eiter->a.vendor_identifier);
>   alen += 4 - (alen & 3);
>   eiter->len = cpu_to_be16(4 + alen);
>   size += 4 + alen;
> 
>   ql_dbg(ql_dbg_disc, vha, 0x20b1,
>-  "Vendor Identifier = %s.\n", eiter->a.vendor_indentifer);
>+  "Vendor Identifier = %s.\n", eiter->a.vendor_identifier);
> 
>   /* Update MS request size. */
>   qla2x00_update_ms_fdmi_iocb(vha, size + 16);
>-- 
>2.10.2

Looks good

Acked-by: Himanshu Madhani 
>
N�r��yb�X��ǧv�^�)޺{.n�+{���"�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

[PATCH] ses: Fix SAS device detection in enclosure

2017-01-09 Thread Ewan D. Milne
From: "Ewan D. Milne" 

The call to scsi_is_sas_rphy() needs to be made on the
SAS end_device, not on the SCSI device.

Fixes: 835831c57e9b ("ses: use scsi_is_sas_rphy instead of is_sas_attached")
Reviewed-by: Johannes Thumshirn 
Signed-off-by: Ewan D. Milne 
---
 drivers/scsi/ses.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 8c9a35c..50adabb 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -587,7 +587,7 @@ static void ses_match_to_enclosure(struct enclosure_device 
*edev,
 
ses_enclosure_data_process(edev, to_scsi_device(edev->edev.parent), 0);
 
-   if (scsi_is_sas_rphy(>sdev_gendev))
+   if (scsi_is_sas_rphy(sdev->sdev_target->dev.parent))
efd.addr = sas_get_address(sdev);
 
if (efd.addr) {
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2017-01-09 Thread Johannes Weiner
On Mon, Jan 09, 2017 at 09:30:05PM +0100, Jan Kara wrote:
> On Sat 07-01-17 21:02:00, Johannes Weiner wrote:
> > On Tue, Jan 03, 2017 at 01:28:25PM +0100, Jan Kara wrote:
> > > On Mon 02-01-17 16:11:36, Johannes Weiner wrote:
> > > > On Fri, Dec 23, 2016 at 03:33:29AM -0500, Johannes Weiner wrote:
> > > > > On Fri, Dec 23, 2016 at 02:32:41AM -0500, Johannes Weiner wrote:
> > > > > > On Thu, Dec 22, 2016 at 12:22:27PM -0800, Hugh Dickins wrote:
> > > > > > > On Wed, 21 Dec 2016, Linus Torvalds wrote:
> > > > > > > > On Wed, Dec 21, 2016 at 9:13 PM, Dave Chinner 
> > > > > > > >  wrote:
> > > > > > > > > I unmounted the fs, mkfs'd it again, ran the
> > > > > > > > > workload again and about a minute in this fired:
> > > > > > > > >
> > > > > > > > > [628867.607417] [ cut here ]
> > > > > > > > > [628867.608603] WARNING: CPU: 2 PID: 16925 at 
> > > > > > > > > mm/workingset.c:461 shadow_lru_isolate+0x171/0x220
> > > > > > > > 
> > > > > > > > Well, part of the changes during the merge window were the 
> > > > > > > > shadow
> > > > > > > > entry tracking changes that came in through Andrew's tree. 
> > > > > > > > Adding
> > > > > > > > Johannes Weiner to the participants.
> > 
> > Okay, the below patch should address this problem. Dave Jones managed
> > to reproduce it with the added WARN_ONs, and they made it obvious. He
> > cannot trigger it anymore with this fix applied. Thanks Dave!
> 
> FWIW the patch looks good to me. I'd just note that the need to pass the
> callback to deletion function and the fact that we do it only in cases
> where we think it is needed appears errorprone. With the warning you've
> added it should at least catch the cases where we got it wrong but more
> robust would be if the radix tree root contained a pointer to the callback
> function so that we would not rely on passing the callback to every place
> which can possibly free a node. Also conceptually this would make more
> sense to me since the fact that we may need to do some cleanup on node
> deletion is a property of the particular radix tree and how we use it.
> OTOH that would mean growing radix tree root by one pointer which would be
> unpopular I guess.

The last sentence is the crux, unfortunately. The first iteration of
the shadow shrinker linked up mappings that contained shadow entries,
rather than nodes. The code would have been drastically simpler in
pretty much all regards, without changes to the radix tree API. But
Dave Chinner objected to adding a pointer to the inode when we could
stick them into empty space (slab fragmentation) inside the nodes. A
fair point, I guess, especially when you consider metadata-intense
workloads. But now we're kind of stuck with the complexity of this.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2017-01-09 Thread Jan Kara
On Sat 07-01-17 21:02:00, Johannes Weiner wrote:
> On Tue, Jan 03, 2017 at 01:28:25PM +0100, Jan Kara wrote:
> > On Mon 02-01-17 16:11:36, Johannes Weiner wrote:
> > > On Fri, Dec 23, 2016 at 03:33:29AM -0500, Johannes Weiner wrote:
> > > > On Fri, Dec 23, 2016 at 02:32:41AM -0500, Johannes Weiner wrote:
> > > > > On Thu, Dec 22, 2016 at 12:22:27PM -0800, Hugh Dickins wrote:
> > > > > > On Wed, 21 Dec 2016, Linus Torvalds wrote:
> > > > > > > On Wed, Dec 21, 2016 at 9:13 PM, Dave Chinner 
> > > > > > >  wrote:
> > > > > > > > I unmounted the fs, mkfs'd it again, ran the
> > > > > > > > workload again and about a minute in this fired:
> > > > > > > >
> > > > > > > > [628867.607417] [ cut here ]
> > > > > > > > [628867.608603] WARNING: CPU: 2 PID: 16925 at 
> > > > > > > > mm/workingset.c:461 shadow_lru_isolate+0x171/0x220
> > > > > > > 
> > > > > > > Well, part of the changes during the merge window were the shadow
> > > > > > > entry tracking changes that came in through Andrew's tree. Adding
> > > > > > > Johannes Weiner to the participants.
> 
> Okay, the below patch should address this problem. Dave Jones managed
> to reproduce it with the added WARN_ONs, and they made it obvious. He
> cannot trigger it anymore with this fix applied. Thanks Dave!

FWIW the patch looks good to me. I'd just note that the need to pass the
callback to deletion function and the fact that we do it only in cases
where we think it is needed appears errorprone. With the warning you've
added it should at least catch the cases where we got it wrong but more
robust would be if the radix tree root contained a pointer to the callback
function so that we would not rely on passing the callback to every place
which can possibly free a node. Also conceptually this would make more
sense to me since the fact that we may need to do some cleanup on node
deletion is a property of the particular radix tree and how we use it.
OTOH that would mean growing radix tree root by one pointer which would be
unpopular I guess.

Honza

-- 
Jan Kara 
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: scsi: qla2xxx: Fix apparent cut-n-paste error.

2017-01-09 Thread Tran, Quinn

-Original Message-
From: "Martin K. Petersen" 
Organization: Oracle Corporation
Date: Thursday, January 5, 2017 at 5:52 PM
To: Dave Jones 
Cc: "linux-scsi@vger.kernel.org" , "Tran, Quinn" 

Subject: Re: scsi: qla2xxx: Fix apparent cut-n-paste error.

> "Dave" == Dave Jones  writes:

Dave> commit 093df73771bac8a37d607c0e705d157a8cef4c5c introduces two
Dave> bodies of code that look similar but with s/req/rsp/ in the second
Dave> instance.  But in one case, it looks like this conversion was
Dave> missed.

Quinn?

Good catch. Thanks.  

-- 
Martin K. Petersen  Oracle Linux Engineering




Re: [PATCH 03/11] qla2xxx: Make trace flags more readable.

2017-01-09 Thread Madhani, Himanshu


On 1/9/17, 5:11 AM, "Christoph Hellwig"  wrote:

>On Fri, Dec 23, 2016 at 08:23:31PM -0800, Himanshu Madhani wrote:
>> From: Quinn Tran 
>> 
>> This patch does not change any functionality.
>
>...
>> +++ b/drivers/scsi/qla2xxx/qla_target.c
>> @@ -3294,7 +3294,6 @@ int qlt_abort_cmd(struct qla_tgt_cmd *cmd)
>>  return EIO;
>>  }
>>  cmd->aborted = 1;
>> -cmd->cmd_flags |= BIT_6;
>
>This seems to be a change in behavior.
>

Will fix the patch. Intent was not to change any behavior. Just update the 
flags to make it readable.

>
N�r��yb�X��ǧv�^�)޺{.n�+{���"�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

Re: [PATCH 05/11] qla2xxx: Fix wrong argument in sp done callback.

2017-01-09 Thread Madhani, Himanshu

On 1/9/17, 5:17 AM, "Christoph Hellwig"  wrote:

>On Fri, Dec 23, 2016 at 08:23:33PM -0800, Himanshu Madhani wrote:
>> From: Quinn Tran 
>> 
>> Callback for sp->done expects scsi_qla_host is passed in as argument,
>> Instead qla_hw_data is passed in.
>
>Please also fix the prototype of the done and free callbacks to use the
>actual type instead of two void pointers, so that the compiler can catch
>bugs like this in the future.

I have patch for the fixing of prototype of done and free callbacks which I was
planning to send out after this series. I’ll include that in V2 of this series.

>
N�r��yb�X��ǧv�^�)޺{.n�+{���"�{ay�ʇڙ�,j��f���h���z��w���
���j:+v���w�j�mzZ+�ݢj"��!�i

Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code

2017-01-09 Thread Greg KH
On Mon, Jan 09, 2017 at 11:23:23AM -0600, Bryant G. Ly wrote:
> On 1/9/17 10:47 AM, Greg KH wrote:
> 
> > On Mon, Jan 09, 2017 at 10:21:20AM -0600, Bryant G. Ly wrote:
> > > From: "Bryant G. Ly" 
> > > 
> > > If srp_transfer_data fails within ibmvscsis_write_pending, then
> > > the most likely scenario is that the client timed out the op and
> > > removed the TCE mapping. Thus it will loop forever retrying the
> > > op that is pretty much guaranteed to fail forever. A better return
> > > code would be EIO instead of EAGAIN.
> > > 
> > > Cc: sta...@vger.kernel.org
> > > Reported-by: Steven Royer 
> > > Tested-by: Steven Royer 
> > > Signed-off-by: Bryant G. Ly 
> > > ---
> > >   drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > Why are you sending this to me?
> > 
> > confused,
> > 
> > greg k-h
> Sorry I meant to put --to target-de...@vger.kernel.org, and just --cc you.

Why even cc: me?

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code

2017-01-09 Thread Bryant G. Ly

On 1/9/17 10:47 AM, Greg KH wrote:


On Mon, Jan 09, 2017 at 10:21:20AM -0600, Bryant G. Ly wrote:

From: "Bryant G. Ly" 

If srp_transfer_data fails within ibmvscsis_write_pending, then
the most likely scenario is that the client timed out the op and
removed the TCE mapping. Thus it will loop forever retrying the
op that is pretty much guaranteed to fail forever. A better return
code would be EIO instead of EAGAIN.

Cc: sta...@vger.kernel.org
Reported-by: Steven Royer 
Tested-by: Steven Royer 
Signed-off-by: Bryant G. Ly 
---
  drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Why are you sending this to me?

confused,

greg k-h

Sorry I meant to put --to target-de...@vger.kernel.org, and just --cc you.

-Bryant

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Open-FCoE] [PATCH RFC 5/5] qedf: Add FIP request handling

2017-01-09 Thread Chad Dupuis

On Wed, 28 Dec 2016, 9:11am -, Hannes Reinecke wrote:

> On 12/23/2016 08:17 PM, Dupuis, Chad wrote:
> > From: "Dupuis, Chad" 
> > 
> > This patch adds handling for FIP requests and responses that are handled by
> > the driver itself and not by libfcoe.
> > 
> > Signed-off-by: Nilesh Javali 
> > Signed-off-by: Manish Rangankar 
> > Signed-off-by: Saurav Kashyap 
> > Signed-off-by: Chad Dupuis 
> > ---
> >  drivers/scsi/qedf/qedf_fip.c | 267 
> > +++
> >  1 file changed, 267 insertions(+)
> >  create mode 100644 drivers/scsi/qedf/qedf_fip.c
> > 
> > diff --git a/drivers/scsi/qedf/qedf_fip.c b/drivers/scsi/qedf/qedf_fip.c
> > new file mode 100644
> > index 000..4f185c6
> > --- /dev/null
> > +++ b/drivers/scsi/qedf/qedf_fip.c
> > @@ -0,0 +1,267 @@
> > +/*
> > + *  QLogic FCoE Offload Driver
> > + *  Copyright (c) 2016 Cavium Inc.
> > + *
> > + *  This software is available under the terms of the GNU General Public 
> > License
> > + *  (GPL) Version 2, available from the file COPYING in the main directory 
> > of
> > + *  this source tree.
> > + */
> > +#include 
> > +#include 
> > +#include "qedf.h"
> > +
> > +extern const struct qed_fcoe_ops *qed_ops;
> > +/*
> > + * FIP VLAN functions that will eventually move to libfcoe.
> > + */
> > +
> > +void qedf_fcoe_send_vlan_req(struct qedf_ctx *qedf)
> > +{
> > +   struct sk_buff *skb;
> > +   char *eth_fr;
> > +   int fr_len;
> > +   struct fip_vlan *vlan;
> > +#define MY_FIP_ALL_FCF_MACS((__u8[6]) { 1, 0x10, 0x18, 1, 0, 2 })
> > +   static u8 my_fcoe_all_fcfs[ETH_ALEN] = MY_FIP_ALL_FCF_MACS;
> 
> Do you support VN2VN, too?

Not currently, no.

> 
> Cheers,
> 
> Hannes
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code

2017-01-09 Thread Greg KH
On Mon, Jan 09, 2017 at 10:21:20AM -0600, Bryant G. Ly wrote:
> From: "Bryant G. Ly" 
> 
> If srp_transfer_data fails within ibmvscsis_write_pending, then
> the most likely scenario is that the client timed out the op and
> removed the TCE mapping. Thus it will loop forever retrying the
> op that is pretty much guaranteed to fail forever. A better return
> code would be EIO instead of EAGAIN.
> 
> Cc: sta...@vger.kernel.org
> Reported-by: Steven Royer 
> Tested-by: Steven Royer 
> Signed-off-by: Bryant G. Ly 
> ---
>  drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Why are you sending this to me?

confused,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Open-FCoE] [PATCH RFC 3/5] qedf: Add offloaded I/O request functions.

2017-01-09 Thread Chad Dupuis

On Wed, 28 Dec 2016, 9:08am -, Hannes Reinecke wrote:

> On 12/23/2016 08:17 PM, Dupuis, Chad wrote:
> > From: "Dupuis, Chad" 
> > 
> > This patch adds various I/O requests types that are handled in firmware:
> > 
> > - Normal I/O requests
> > - ABTS requests
> > - Cleanup requests
> > - Task management requests
> > 
> > It also contains:
> > 
> > - I/O request initialization
> > - Firmware completion handling
> > 
> > Signed-off-by: Nilesh Javali 
> > Signed-off-by: Manish Rangankar 
> > Signed-off-by: Saurav Kashyap 
> > Signed-off-by: Chad Dupuis 
> > ---
> >  drivers/scsi/qedf/qedf_hsi.h |  427 
> >  drivers/scsi/qedf/qedf_io.c  | 2303 
> > ++
> >  2 files changed, 2730 insertions(+)
> >  create mode 100644 drivers/scsi/qedf/qedf_hsi.h
> >  create mode 100644 drivers/scsi/qedf/qedf_io.c
> > 
> [ .. ]
> 
> > +static int qedf_execute_tmf(struct qedf_rport *fcport, struct scsi_cmnd 
> > *sc_cmd,
> > +   uint8_t tm_flags)
> > +{
> > +   struct qedf_ioreq *io_req;
> > +   struct qedf_mp_req *tm_req;
> > +   struct fcoe_task_context *task;
> > +   struct fc_frame_header *fc_hdr;
> > +   struct fcp_cmnd *fcp_cmnd;
> > +   struct qedf_ctx *qedf = fcport->qedf;
> > +   int rc = 0;
> > +   uint16_t xid;
> > +   uint32_t sid, did;
> > +   int tmo = 0;
> > +   unsigned long flags;
> > +
> > +   if (!sc_cmd) {
> > +   QEDF_ERR(&(qedf->dbg_ctx), "invalid arg\n");
> > +   return FAILED;
> > +   }
> > +
> > +   if (!(test_bit(QEDF_RPORT_SESSION_READY, >flags))) {
> > +   QEDF_ERR(&(qedf->dbg_ctx), "fcport not offloaded\n");
> > +   rc = FAILED;
> > +   return FAILED;
> > +   }
> > +
> > +   scsi_block_requests(qedf->lport->host);
> > +
> Typically, EH commands will be executed after the scsi host is stopped
> and no commands are outstanding.
> So there's no point in issuing 'scsi_block_requests()' here.
> 

Will remove.

> Cheers,
> 
> Hannes
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Open-FCoE] [PATCH RFC 2/5] qedf: Add QLogic FastLinQ offload FCoE driver framework.

2017-01-09 Thread Chad Dupuis

On Wed, 28 Dec 2016, 9:00am -, Hannes Reinecke wrote:

> On 12/23/2016 08:17 PM, Dupuis, Chad wrote:
> > From: "Dupuis, Chad" 
> > 
> > The QLogic FastLinQ Driver for FCoE (qedf) is the FCoE specific module
> > for 41000 Series Converged Network Adapters by QLogic.
> > 
> > This patch consists of following changes:
> >   - MAINTAINERS Makefile and Kconfig changes for qedf
> >   - PCI driver registration
> >   - libfc/fcoe host level initialization
> >   - SCSI host template initialization and callbacks
> >   - Debugfs and log level infrastructure
> >   - Link handling
> >   - Firmware interface structures
> >   - QED core module initialization
> >   - Light L2 interface callbacks
> > 
> > Signed-off-by: Nilesh Javali 
> > Signed-off-by: Manish Rangankar 
> > Signed-off-by: Saurav Kashyap 
> > Signed-off-by: Chad Dupuis 
> > ---
> >  MAINTAINERS  |6 +
> >  drivers/scsi/Kconfig |1 +
> >  drivers/scsi/qedf/Kconfig|   11 +
> >  drivers/scsi/qedf/Makefile   |5 +
> >  drivers/scsi/qedf/qedf.h |  555 ++
> >  drivers/scsi/qedf/qedf_attr.c|  165 ++
> >  drivers/scsi/qedf/qedf_dbg.c |  192 +++
> >  drivers/scsi/qedf/qedf_dbg.h |  153 ++
> >  drivers/scsi/qedf/qedf_debugfs.c |  472 +
> >  drivers/scsi/qedf/qedf_main.c| 3519 
> > ++
> >  drivers/scsi/qedf/qedf_version.h |   15 +
> >  11 files changed, 5094 insertions(+)
> >  create mode 100644 drivers/scsi/qedf/Kconfig
> >  create mode 100644 drivers/scsi/qedf/Makefile
> >  create mode 100644 drivers/scsi/qedf/qedf.h
> >  create mode 100644 drivers/scsi/qedf/qedf_attr.c
> >  create mode 100644 drivers/scsi/qedf/qedf_dbg.c
> >  create mode 100644 drivers/scsi/qedf/qedf_dbg.h
> >  create mode 100644 drivers/scsi/qedf/qedf_debugfs.c
> >  create mode 100644 drivers/scsi/qedf/qedf_main.c
> >  create mode 100644 drivers/scsi/qedf/qedf_version.h
> > 
> [ .. ]
> > +/* Returns true if we have a valid vlan, false otherwise */
> > +static bool qedf_initiate_fipvlan_req(struct qedf_ctx *qedf)
> > +{
> > +   int rc;
> > +
> > +   if (atomic_read(>link_state) != QEDF_LINK_UP) {
> > +   QEDF_ERR(&(qedf->dbg_ctx), "Link not up.\n");
> > +   return  false;
> > +   }
> > +
> > +   while (qedf->fipvlan_retries--) {
> > +   if (qedf->vlan_id > 0)
> > +   return true;
> Some weird FCoE bridges (most notably HP VirtualConnect) return a VLAN
> ID of '0'. Shouldn't you rather test for '>= 0' here?

Will look into this but isn't a VLAN ID of 0 not valid?

> 
> [ .. ]
> > +
> > +static void qedf_flogi_resp(struct fc_seq *seq, struct fc_frame *fp,
> > +   void *arg)
> > +{
> > +   struct fc_exch *exch = fc_seq_exch(seq);
> > +   struct fc_lport *lport = exch->lp;
> > +   struct qedf_ctx *qedf = lport_priv(lport);
> > +
> > +   if (!qedf) {
> > +   QEDF_ERR(NULL, "qedf is NULL.\n");
> > +   return;
> > +   }
> > +
> > +   /*
> > +* If ERR_PTR is set then don't try to stat anything as it will cause
> > +* a crash when we access fp.
> > +*/
> > +   if (fp == ERR_PTR(-FC_EX_TIMEOUT) ||
> > +   fp == ERR_PTR(-FC_EX_CLOSED)) {
> > +   QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS,
> > +   "fp has ERR_PTR() set.\n");
> > +   goto skip_stat;
> > +   }
> 
> Please use
> 
> if (IS_ERR(fp)) {
> 
> here instead of checking for individual error codes; if 'fp' has a
> different error value you'll continue with an invalid fp from here on.
>

Will fix up.
 
> [ .. ]
> 
> > +/**
> > + * qedf_xmit - qedf FCoE frame transmit function
> > + *
> > + */
> > +static int qedf_xmit(struct fc_lport *lport, struct fc_frame *fp)
> > +{
> > +   struct fc_lport *base_lport;
> > +   struct qedf_ctx *qedf;
> > +   struct ethhdr   *eh;
> > +   struct fcoe_crc_eof *cp;
> > +   struct sk_buff  *skb;
> > +   struct fc_frame_header  *fh;
> > +   struct fcoe_hdr *hp;
> > +   u8  sof, eof;
> > +   u32 crc;
> > +   unsigned inthlen, tlen, elen;
> > +   int wlen;
> > +   struct fc_stats *stats;
> > +   struct fc_lport *tmp_lport;
> > +   struct fc_lport *vn_port = NULL;
> > +   struct qedf_rport *fcport;
> > +   int rc;
> > +   u16 vlan_tci = 0;
> > +   unsigned long flags;
> > +
> > +   qedf = (struct qedf_ctx *)lport_priv(lport);
> > +
> > +   fh = fc_frame_header_get(fp);
> > +   skb = fp_skb(fp);
> > +
> > +   /* Filter out traffic to other NPIV ports on the same host */
> > +   if (lport->vport)
> > +   base_lport = shost_priv(vport_to_shost(lport->vport));
> > +   else
> > +   base_lport = lport;
> > +
> > +   /* Flag if the destination is the base port */
> > +   if (base_lport->port_id == ntoh24(fh->fh_d_id)) {
> > +   vn_port = 

[PATCH] ibmvscsis: Fix srp_transfer_data fail return code

2017-01-09 Thread Bryant G. Ly
From: "Bryant G. Ly" 

If srp_transfer_data fails within ibmvscsis_write_pending, then
the most likely scenario is that the client timed out the op and
removed the TCE mapping. Thus it will loop forever retrying the
op that is pretty much guaranteed to fail forever. A better return
code would be EIO instead of EAGAIN.

Cc: sta...@vger.kernel.org
Reported-by: Steven Royer 
Tested-by: Steven Royer 
Signed-off-by: Bryant G. Ly 
---
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c 
b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index 3d3768a..8fb5c54 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -3585,7 +3585,7 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
   1, 1);
if (rc) {
pr_err("srp_transfer_data() failed: %d\n", rc);
-   return -EAGAIN;
+   return -EIO;
}
/*
 * We now tell TCM to add this WRITE CDB directly into the TCM storage
-- 
2.5.4 (Apple Git-61)

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


LSF/MM 2017: Call for Proposals closes January 15th

2017-01-09 Thread Jeff Layton
We initially sent this pretty early this year, so this is a resend in   
case anyone missed the first posting. The call for topics and attendance
requests is open until January 15th, 2017.

The original message follows:

--8<

The annual Linux Storage, Filesystem and Memory Management (LSF/MM)
Summit for 2017 will be held on March 20th and 21st at the Hyatt
Cambridge, Cambridge, MA. LSF/MM is an invitation-only technical
workshop to map out improvements to the Linux storage, filesystem and
memory management subsystems that will make their way into the mainline
kernel within the coming years.


http://events.linuxfoundation.org/events/linux-storage-filesystem-and-mm-summit

Like last year, LSF/MM will be colocated with the Linux Foundation Vault
conference which takes place on March 22nd and 23rd in the same Venue.
For those that do not know, Vault is designed to be an event where open
source storage and filesystem practitioners meet storage implementors
and, as such, it would be of benefit for LSF/MM attendees to attend.

Unlike past years, Vault admission is not free for LSF/MM attendees this
year unless they're giving a talk. There is a discount for LSF/MM
attendees, however we would also like to encourage folks to submit talk
proposals to speak at the Vault conference.

http://events.linuxfoundation.org/events/vault

On behalf of the committee I am issuing a call for agenda proposals that
are suitable for cross-track discussion as well as technical subjects
for the breakout sessions.

If advance notice is required for visa applications then please point
that out in your proposal or request to attend, and submit the topic
as soon as possible.

1) Proposals for agenda topics should be sent before January 15th, 2016
to:

lsf...@lists.linux-foundation.org

and cc the Linux list or lists that are relevant for the topic in
question:

ATA:   linux-...@vger.kernel.org
Block: linux-bl...@vger.kernel.org
FS:linux-fsde...@vger.kernel.org
MM:linux...@kvack.org
SCSI:  linux-scsi@vger.kernel.org
NVMe:  linux-n...@lists.infradead.org

Please tag your proposal with [LSF/MM TOPIC] to make it easier to track.
In addition, please make sure to start a new thread for each topic
rather than following up to an existing one.  Agenda topics and
attendees will be selected by the program committee, but the final
agenda will be formed by consensus of the attendees on the day.

2) Requests to attend the summit for those that are not proposing a
topic should be sent to:

lsf...@lists.linux-foundation.org

Please summarise what expertise you will bring to the meeting, and what
you would like to discuss. Please also tag your email with [LSF/MM
ATTEND] and send it as a new thread so there is less chance of it
getting lost.

We will try to cap attendance at around 25-30 per track to facilitate
discussions although the final numbers will depend on the room sizes at
the venue.

Brief presentations are allowed to guide discussion, but are strongly
discouraged. There will be no recording or audio bridge. However, we
expect that written minutes will be published as we did in previous
years:

2016: https://lwn.net/Articles/lsfmm2016/

2015: https://lwn.net/Articles/lsfmm2015/

2014: http://lwn.net/Articles/LSFMM2014/

2013: http://lwn.net/Articles/548089/

3) If you have feedback on last year's meeting that we can use to
improve this year's, please also send that to:

lsf...@lists.linux-foundation.org

Thank you on behalf of the program committee:

Storage:
James Bottomley
Martin K. Petersen (track chair)
Sagi Grimberg

Filesystems:
Anna Schumaker
Chris Mason
Eric Sandeen
Jan Kara
Jeff Layton (summit chair)
Josef Bacik (track chair)
Trond Myklebust

MM:
Johannes Weiner
Rik van Riel (track chair)
-- 
Jeff Layton 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/11] qla2xxx: Track I-T nexus as single fc_port struct.

2017-01-09 Thread Christoph Hellwig
> +typedef struct {
> + struct list_headlist;
> + u8  iocb[64];   /* imm_ntfy_from_isp */

Please keep it as struct imm_ntfy_from_isp so that all the crazy
casts in the new code can be removed.

> + qlt_plogi_ack_t* plogi_link[QLT_PLOGI_LINK_MAX];

qlt_plogi_ack_t *plogi_link[QLT_PLOGI_LINK_MAX];

> + if (con)
> + {

if (con) {

>   spin_lock_irqsave(>tgt.sess_lock, flags);
> + ha->tgt.tgt_ops->put_sess(sess);
>   spin_unlock_irqrestore(>tgt.sess_lock, flags);

This pattern happens a lot and should probably be factored into a
helper.

> + struct fc_port  *sess = container_of(kref,
> + struct fc_port, sess_kref);

This can fit into a single line:

struct fc_port *sess = container_of(kref, struct fc_port, sess_kref);

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 06/11] qla2xxx: Use d_id instead of s_id for more clarity.

2017-01-09 Thread Christoph Hellwig
Looks fine,

Reviewed-by: Christoph Hellwig 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 05/11] qla2xxx: Fix wrong argument in sp done callback.

2017-01-09 Thread Christoph Hellwig
On Fri, Dec 23, 2016 at 08:23:33PM -0800, Himanshu Madhani wrote:
> From: Quinn Tran 
> 
> Callback for sp->done expects scsi_qla_host is passed in as argument,
> Instead qla_hw_data is passed in.

Please also fix the prototype of the done and free callbacks to use the
actual type instead of two void pointers, so that the compiler can catch
bugs like this in the future.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 03/11] qla2xxx: Make trace flags more readable.

2017-01-09 Thread Christoph Hellwig
On Fri, Dec 23, 2016 at 08:23:31PM -0800, Himanshu Madhani wrote:
> From: Quinn Tran 
> 
> This patch does not change any functionality.

...
> +++ b/drivers/scsi/qla2xxx/qla_target.c
> @@ -3294,7 +3294,6 @@ int qlt_abort_cmd(struct qla_tgt_cmd *cmd)
>   return EIO;
>   }
>   cmd->aborted = 1;
> - cmd->cmd_flags |= BIT_6;

This seems to be a change in behavior.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/11] qla2xxx: Cleanup SRR code.

2017-01-09 Thread Christoph Hellwig
s/Cleanup/Remove/ ?

Maybe add a little blurb on why we even had this huge pile of dead code
despite not using selective retransmissions, and why you don't plan to
use it any time soon.

Otherwise looks fine:

Reviewed-by: Christoph Hellwig 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[no subject]

2017-01-09 Thread anthonia
Bitte tut mir leid, dass ich Sie stören kann, können Sie mich auf
E-Mail-Adresse, so dass ich in der Lage, Ihnen meine Bilder
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] pmcraid: switch to pci_alloc_irq_vectors

2017-01-09 Thread Hannes Reinecke

On 11/18/2016 07:28 AM, Christoph Hellwig wrote:

Signed-off-by: Christoph Hellwig 
---
 drivers/scsi/pmcraid.c | 92 ++
 drivers/scsi/pmcraid.h |  1 -
 2 files changed, 41 insertions(+), 52 deletions(-)


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] bfa: remove bfa_fcs_mod_s

2017-01-09 Thread Hannes Reinecke

On 01/08/2017 10:41 AM, Christoph Hellwig wrote:

Just call the functions directly instead of obsfucating the call chain.
This was in reply to a patch from Kees Cook to constify the function
pointer struct bfa_fcs_mod_s, but it turns out there is no reason to
have this indirection at all.

Signed-off-by: Christoph Hellwig 
---
 drivers/scsi/bfa/bfa_fcs.c | 181 -
 drivers/scsi/bfa/bfa_fcs.h |   4 -
 2 files changed, 46 insertions(+), 139 deletions(-)


Any cleanup of the bfa driver is a good cleanup.

Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes ReineckeTeamlead Storage & Networking
h...@suse.de   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Uninitialized variable in bfad_im_bsg_els_ct_request

2017-01-09 Thread Johannes Thumshirn
On Sun, Dec 18, 2016 at 09:44:27PM +0100, Nicolas Iooss wrote:
> Hello,
> 
> Currently on Linus master tree and in linux-next [1],
> bfad_im_bsg_els_ct_request() code starts with the following code:
> 
> int
> bfad_im_bsg_els_ct_request(struct bsg_job *job)
> {
>   /*...*/
>   struct fc_bsg_request *bsg_request = bsg_request;
>   struct fc_bsg_reply *bsg_reply = job->reply;
>   uint32_t command_type = bsg_request->msgcode;
> 
> The local variable "bsg_request" is initialized to itself (which would
> usually mean it is uninitialized) but it is dereferenced in order to get
> its "msgcode" field. As I am quite new to the kernel code and
> dereferencing self-initialized local variables looks black magic to me,
> could you please describe why this code is valid?
> 
> It has recently been introduced by commit 01e0e15c8b3b ("scsi: don't use
> fc_bsg_job::request and fc_bsg_job::reply directly").
> 
> Thanks,
> Nicolas Iooss
> 
> [1]
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/scsi/bfa/bfad_bsg.c?id=06548160dfecd1983ffd9d6795242a5cda095da5#n3356

Yes this is wrong. bsg_request should point to job->request:

diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index a9a0016..b2e8c0d 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -3363,7 +3363,7 @@ struct bfad_buf_info *
struct bfad_fcxp*drv_fcxp;
struct bfa_fcs_lport_s *fcs_port;
struct bfa_fcs_rport_s *fcs_rport;
-   struct fc_bsg_request *bsg_request = bsg_request;
+   struct fc_bsg_request *bsg_request = job->request;
struct fc_bsg_reply *bsg_reply = job->reply;
uint32_t command_type = bsg_request->msgcode;
unsigned long flags;

I'll send out an official patch soon, thanks for the report.
Johannes

-- 
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 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html