Re: [PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
On Tue, Feb 16, 2016 at 10:03:24PM -0500, Martin K. Petersen wrote: > > "Tyrel" == Tyrel Datwylerwrites: > > >> Is there some reason you didn't carry the review tag over from this: > >> > >> http://mid.gmane.org/20160204084459.gw27...@c203.arch.suse.de > >> > >> ? > >> > >> James > > Tyrel> The patch is slightly changed from v1. A define for AIX os type > Tyrel> was added as mentioned in the cover letter v2 changes, and I > Tyrel> moved the defines to the mad_adapter_info_data structure around > Tyrel> the fields they apply. > > Johannes: Mind checking this out? I'm sorry I though I already did. Reviewed-by: Johannes Thumshirn > > https://patchwork.kernel.org/patch/8276101/ > > -- > Martin K. PetersenOracle Linux Engineering -- 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 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
> "Tyrel" == Tyrel Datwylerwrites: >> Is there some reason you didn't carry the review tag over from this: >> >> http://mid.gmane.org/20160204084459.gw27...@c203.arch.suse.de >> >> ? >> >> James Tyrel> The patch is slightly changed from v1. A define for AIX os type Tyrel> was added as mentioned in the cover letter v2 changes, and I Tyrel> moved the defines to the mad_adapter_info_data structure around Tyrel> the fields they apply. Johannes: Mind checking this out? https://patchwork.kernel.org/patch/8276101/ -- Martin K. Petersen Oracle Linux Engineering ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
On Wed, 2016-02-10 at 19:32 -0600, Tyrel Datwyler wrote: > Add defines for mad version and mad os_type, and replace the magic > numbers in set_adapter_info() accordingly. > > Signed-off-by: Tyrel Datwyler> --- Is there some reason you didn't carry the review tag over from this: http://mid.gmane.org/20160204084459.gw27...@c203.arch.suse.de ? James ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
On Fri, 2016-02-12 at 08:51 -0800, Tyrel Datwyler wrote: > On 02/12/2016 08:43 AM, James Bottomley wrote: > > On Wed, 2016-02-10 at 19:32 -0600, Tyrel Datwyler wrote: > > > Add defines for mad version and mad os_type, and replace the > > > magic > > > numbers in set_adapter_info() accordingly. > > > > > > Signed-off-by: Tyrel Datwyler> > > --- > > > > Is there some reason you didn't carry the review tag over from > > this: > > > > http://mid.gmane.org/20160204084459.gw27...@c203.arch.suse.de > > > > ? > > > > James > > The patch is slightly changed from v1. A define for AIX os type was > added as mentioned in the cover letter v2 changes, and I moved the > defines to the mad_adapter_info_data structure around the fields they > apply. OK we need a re-review then ... James ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
On 02/12/2016 08:43 AM, James Bottomley wrote: > On Wed, 2016-02-10 at 19:32 -0600, Tyrel Datwyler wrote: >> Add defines for mad version and mad os_type, and replace the magic >> numbers in set_adapter_info() accordingly. >> >> Signed-off-by: Tyrel Datwyler>> --- > > Is there some reason you didn't carry the review tag over from this: > > http://mid.gmane.org/20160204084459.gw27...@c203.arch.suse.de > > ? > > James The patch is slightly changed from v1. A define for AIX os type was added as mentioned in the cover letter v2 changes, and I moved the defines to the mad_adapter_info_data structure around the fields they apply. -Tyrel > > -- > 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 > ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
> "James" == James Bottomleywrites: James> OK we need a re-review then ... I'll hold off pushing for now. -- Martin K. Petersen Oracle Linux Engineering ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
Reviewed-by: Manoj Kumar--- Manoj Kumar On 2/10/2016 7:32 PM, Tyrel Datwyler wrote: Add defines for mad version and mad os_type, and replace the magic numbers in set_adapter_info() accordingly. Signed-off-by: Tyrel Datwyler --- drivers/scsi/ibmvscsi/ibmvscsi.c | 8 drivers/scsi/ibmvscsi/viosrp.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index c888ea1..4b09a9b 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -283,8 +283,8 @@ static void set_adapter_info(struct ibmvscsi_host_data *hostdata) hostdata->madapter_info.partition_number = cpu_to_be32(partition_number); - hostdata->madapter_info.mad_version = cpu_to_be32(1); - hostdata->madapter_info.os_type = cpu_to_be32(2); + hostdata->madapter_info.mad_version = cpu_to_be32(SRP_MAD_VERSION_1); + hostdata->madapter_info.os_type = cpu_to_be32(SRP_MAD_OS_LINUX); } /** @@ -1398,7 +1398,7 @@ static void adapter_info_rsp(struct srp_event_struct *evt_struct) hostdata->host->max_sectors = be32_to_cpu(hostdata->madapter_info.port_max_txu[0]) >> 9; - if (be32_to_cpu(hostdata->madapter_info.os_type) == 3 && + if (be32_to_cpu(hostdata->madapter_info.os_type) == SRP_MAD_OS_AIX && strcmp(hostdata->madapter_info.srp_version, "1.6a") <= 0) { dev_err(hostdata->dev, "host (Ver. %s) doesn't support large transfers\n", hostdata->madapter_info.srp_version); @@ -1407,7 +1407,7 @@ static void adapter_info_rsp(struct srp_event_struct *evt_struct) hostdata->host->sg_tablesize = MAX_INDIRECT_BUFS; } - if (be32_to_cpu(hostdata->madapter_info.os_type) == 3) { + if (be32_to_cpu(hostdata->madapter_info.os_type) == SRP_MAD_OS_AIX) { enable_fast_fail(hostdata); return; } diff --git a/drivers/scsi/ibmvscsi/viosrp.h b/drivers/scsi/ibmvscsi/viosrp.h index 3d20851..d0f689b 100644 --- a/drivers/scsi/ibmvscsi/viosrp.h +++ b/drivers/scsi/ibmvscsi/viosrp.h @@ -221,7 +221,10 @@ struct mad_adapter_info_data { char srp_version[8]; char partition_name[96]; __be32 partition_number; +#define SRP_MAD_VERSION_1 1 __be32 mad_version; +#define SRP_MAD_OS_LINUX 2 +#define SRP_MAD_OS_AIX 3 __be32 os_type; __be32 port_max_txu[8]; /* per-port maximum transfer */ }; ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2 3/7] ibmvscsi: Replace magic values in set_adpater_info() with defines
Add defines for mad version and mad os_type, and replace the magic numbers in set_adapter_info() accordingly. Signed-off-by: Tyrel Datwyler--- drivers/scsi/ibmvscsi/ibmvscsi.c | 8 drivers/scsi/ibmvscsi/viosrp.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index c888ea1..4b09a9b 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -283,8 +283,8 @@ static void set_adapter_info(struct ibmvscsi_host_data *hostdata) hostdata->madapter_info.partition_number = cpu_to_be32(partition_number); - hostdata->madapter_info.mad_version = cpu_to_be32(1); - hostdata->madapter_info.os_type = cpu_to_be32(2); + hostdata->madapter_info.mad_version = cpu_to_be32(SRP_MAD_VERSION_1); + hostdata->madapter_info.os_type = cpu_to_be32(SRP_MAD_OS_LINUX); } /** @@ -1398,7 +1398,7 @@ static void adapter_info_rsp(struct srp_event_struct *evt_struct) hostdata->host->max_sectors = be32_to_cpu(hostdata->madapter_info.port_max_txu[0]) >> 9; - if (be32_to_cpu(hostdata->madapter_info.os_type) == 3 && + if (be32_to_cpu(hostdata->madapter_info.os_type) == SRP_MAD_OS_AIX && strcmp(hostdata->madapter_info.srp_version, "1.6a") <= 0) { dev_err(hostdata->dev, "host (Ver. %s) doesn't support large transfers\n", hostdata->madapter_info.srp_version); @@ -1407,7 +1407,7 @@ static void adapter_info_rsp(struct srp_event_struct *evt_struct) hostdata->host->sg_tablesize = MAX_INDIRECT_BUFS; } - if (be32_to_cpu(hostdata->madapter_info.os_type) == 3) { + if (be32_to_cpu(hostdata->madapter_info.os_type) == SRP_MAD_OS_AIX) { enable_fast_fail(hostdata); return; } diff --git a/drivers/scsi/ibmvscsi/viosrp.h b/drivers/scsi/ibmvscsi/viosrp.h index 3d20851..d0f689b 100644 --- a/drivers/scsi/ibmvscsi/viosrp.h +++ b/drivers/scsi/ibmvscsi/viosrp.h @@ -221,7 +221,10 @@ struct mad_adapter_info_data { char srp_version[8]; char partition_name[96]; __be32 partition_number; +#define SRP_MAD_VERSION_1 1 __be32 mad_version; +#define SRP_MAD_OS_LINUX 2 +#define SRP_MAD_OS_AIX 3 __be32 os_type; __be32 port_max_txu[8]; /* per-port maximum transfer */ }; -- 2.5.0 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev