* [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
@ 2017-09-15 17:04 ` Dave Carroll
0 siblings, 0 replies; 11+ messages in thread
From: Dave Carroll @ 2017-09-15 17:04 UTC (permalink / raw)
To: Martin K . Petersen, James Bottomley
Cc: Dave Carroll, linux-scsi, aacraid, Scott Benesh, Brian King, stable
The logic for supporting large drives was previously tied to 4Kn support
for SmartIOC-2000. As SmartIOC-2000 does not support volumes using 4Kn
drives, use the intended option flag AAC_OPT_NEW_COMM_64 to determine
support for volumes greater than 2T.
cc: stable@vger.kernel.org
Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
---
drivers/scsi/aacraid/aachba.c | 12 ++++++------
drivers/scsi/aacraid/aacraid.h | 5 +++++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 4591113..18a1a1f 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -695,13 +695,13 @@ static void _aac_probe_container1(void * context, struct fib * fibptr)
int status;
dresp = (struct aac_mount *) fib_data(fibptr);
- if (!(fibptr->dev->supplement_adapter_info.supported_options2 &
- AAC_OPTION_VARIABLE_BLOCK_SIZE))
+ if (!aac_supports_2T(fibptr->dev)) {
dresp->mnt[0].capacityhigh = 0;
- if ((le32_to_cpu(dresp->status) != ST_OK) ||
- (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
- _aac_probe_container2(context, fibptr);
- return;
+ if ((le32_to_cpu(dresp->status) == ST_OK) &&
+ (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
+ _aac_probe_container2(context, fibptr);
+ return;
+ }
}
scsicmd = (struct scsi_cmnd *) context;
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 6981299..998fbad 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -2701,6 +2701,11 @@ static inline int aac_is_src(struct aac_dev *dev)
return 0;
}
+static inline int aac_supports_2T(struct aac_dev *dev)
+{
+ return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64);
+}
+
char * get_container_type(unsigned type);
extern int numacb;
extern char aac_driver_version[];
--
2.8.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
@ 2017-09-15 17:04 ` Dave Carroll
0 siblings, 0 replies; 11+ messages in thread
From: Dave Carroll @ 2017-09-15 17:04 UTC (permalink / raw)
To: Martin K . Petersen, James Bottomley
Cc: Dave Carroll, linux-scsi, aacraid, Scott Benesh, Brian King, stable
The logic for supporting large drives was previously tied to 4Kn support
for SmartIOC-2000. As SmartIOC-2000 does not support volumes using 4Kn
drives, use the intended option flag AAC_OPT_NEW_COMM_64 to determine
support for volumes greater than 2T.
cc: stable@vger.kernel.org
Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
---
drivers/scsi/aacraid/aachba.c | 12 ++++++------
drivers/scsi/aacraid/aacraid.h | 5 +++++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 4591113..18a1a1f 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -695,13 +695,13 @@ static void _aac_probe_container1(void * context, struct fib * fibptr)
int status;
dresp = (struct aac_mount *) fib_data(fibptr);
- if (!(fibptr->dev->supplement_adapter_info.supported_options2 &
- AAC_OPTION_VARIABLE_BLOCK_SIZE))
+ if (!aac_supports_2T(fibptr->dev)) {
dresp->mnt[0].capacityhigh = 0;
- if ((le32_to_cpu(dresp->status) != ST_OK) ||
- (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
- _aac_probe_container2(context, fibptr);
- return;
+ if ((le32_to_cpu(dresp->status) == ST_OK) &&
+ (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
+ _aac_probe_container2(context, fibptr);
+ return;
+ }
}
scsicmd = (struct scsi_cmnd *) context;
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 6981299..998fbad 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -2701,6 +2701,11 @@ static inline int aac_is_src(struct aac_dev *dev)
return 0;
}
+static inline int aac_supports_2T(struct aac_dev *dev)
+{
+ return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64);
+}
+
char * get_container_type(unsigned type);
extern int numacb;
extern char aac_driver_version[];
--
2.8.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
2017-09-15 17:04 ` Dave Carroll
(?)
@ 2017-09-15 18:01 ` Christoph Hellwig
2017-09-15 23:37 ` Dave Carroll
-1 siblings, 1 reply; 11+ messages in thread
From: Christoph Hellwig @ 2017-09-15 18:01 UTC (permalink / raw)
To: Dave Carroll
Cc: Martin K . Petersen, James Bottomley, linux-scsi, aacraid,
Scott Benesh, Brian King, stable
> + if ((le32_to_cpu(dresp->status) == ST_OK) &&
> + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> + _aac_probe_container2(context, fibptr);
> + return;
if (dresp->status == cpu_to_le32(ST_OK) &&
dresp->mnt[0].vol != cpu_to_le32(CT_NONE)) {
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
2017-09-15 17:04 ` Dave Carroll
@ 2017-09-15 19:20 ` Raghava Aditya Renukunta
-1 siblings, 0 replies; 11+ messages in thread
From: Raghava Aditya Renukunta @ 2017-09-15 19:20 UTC (permalink / raw)
To: Dave Carroll, Martin K . Petersen, James Bottomley
Cc: Dave Carroll, linux-scsi, dl-esc-Aacraid Linux Driver,
Scott Benesh, Brian King, stable
> -----Original Message-----
> From: Dave Carroll [mailto:david.carroll@microsemi.com]
> Sent: Friday, September 15, 2017 10:04 AM
> To: Martin K . Petersen <martin.petersen@oracle.com>; James Bottomley
> <jejb@linux.vnet.ibm.com>
> Cc: Dave Carroll <david.carroll@microsemi.com>; linux-scsi <linux-
> scsi@vger.kernel.org>; dl-esc-Aacraid Linux Driver
> <aacraid@microsemi.com>; Scott Benesh <scott.benesh@microsemi.com>;
> Brian King <brking@linux.vnet.ibm.com>; stable@vger.kernel.org
> Subject: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
>
> The logic for supporting large drives was previously tied to 4Kn support
> for SmartIOC-2000. As SmartIOC-2000 does not support volumes using 4Kn
> drives, use the intended option flag AAC_OPT_NEW_COMM_64 to
> determine
> support for volumes greater than 2T.
>
> cc: stable@vger.kernel.org
> Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
>
> ---
> drivers/scsi/aacraid/aachba.c | 12 ++++++------
> drivers/scsi/aacraid/aacraid.h | 5 +++++
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
> index 4591113..18a1a1f 100644
> --- a/drivers/scsi/aacraid/aachba.c
> +++ b/drivers/scsi/aacraid/aachba.c
> @@ -695,13 +695,13 @@ static void _aac_probe_container1(void * context,
> struct fib * fibptr)
> int status;
>
> dresp = (struct aac_mount *) fib_data(fibptr);
> - if (!(fibptr->dev->supplement_adapter_info.supported_options2 &
> - AAC_OPTION_VARIABLE_BLOCK_SIZE))
> + if (!aac_supports_2T(fibptr->dev)) {
> dresp->mnt[0].capacityhigh = 0;
> - if ((le32_to_cpu(dresp->status) != ST_OK) ||
> - (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> - _aac_probe_container2(context, fibptr);
> - return;
> + if ((le32_to_cpu(dresp->status) == ST_OK) &&
> + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> + _aac_probe_container2(context, fibptr);
> + return;
> + }
> }
> scsicmd = (struct scsi_cmnd *) context;
>
> diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
> index 6981299..998fbad 100644
> --- a/drivers/scsi/aacraid/aacraid.h
> +++ b/drivers/scsi/aacraid/aacraid.h
> @@ -2701,6 +2701,11 @@ static inline int aac_is_src(struct aac_dev *dev)
> return 0;
> }
>
> +static inline int aac_supports_2T(struct aac_dev *dev)
> +{
> + return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64);
> +}
> +
> char * get_container_type(unsigned type);
> extern int numacb;
> extern char aac_driver_version[];
> --
> 2.8.4
Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
@ 2017-09-15 19:20 ` Raghava Aditya Renukunta
0 siblings, 0 replies; 11+ messages in thread
From: Raghava Aditya Renukunta @ 2017-09-15 19:20 UTC (permalink / raw)
To: Martin K . Petersen, James Bottomley
Cc: Dave Carroll, linux-scsi, dl-esc-Aacraid Linux Driver,
Scott Benesh, Brian King, stable
> -----Original Message-----
> From: Dave Carroll [mailto:david.carroll@microsemi.com]
> Sent: Friday, September 15, 2017 10:04 AM
> To: Martin K . Petersen <martin.petersen@oracle.com>; James Bottomley
> <jejb@linux.vnet.ibm.com>
> Cc: Dave Carroll <david.carroll@microsemi.com>; linux-scsi <linux-
> scsi@vger.kernel.org>; dl-esc-Aacraid Linux Driver
> <aacraid@microsemi.com>; Scott Benesh <scott.benesh@microsemi.com>;
> Brian King <brking@linux.vnet.ibm.com>; stable@vger.kernel.org
> Subject: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
>
> The logic for supporting large drives was previously tied to 4Kn support
> for SmartIOC-2000. As SmartIOC-2000 does not support volumes using 4Kn
> drives, use the intended option flag AAC_OPT_NEW_COMM_64 to
> determine
> support for volumes greater than 2T.
>
> cc: stable@vger.kernel.org
> Signed-off-by: Dave Carroll <david.carroll@microsemi.com>
>
> ---
> drivers/scsi/aacraid/aachba.c | 12 ++++++------
> drivers/scsi/aacraid/aacraid.h | 5 +++++
> 2 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
> index 4591113..18a1a1f 100644
> --- a/drivers/scsi/aacraid/aachba.c
> +++ b/drivers/scsi/aacraid/aachba.c
> @@ -695,13 +695,13 @@ static void _aac_probe_container1(void * context,
> struct fib * fibptr)
> int status;
>
> dresp = (struct aac_mount *) fib_data(fibptr);
> - if (!(fibptr->dev->supplement_adapter_info.supported_options2 &
> - AAC_OPTION_VARIABLE_BLOCK_SIZE))
> + if (!aac_supports_2T(fibptr->dev)) {
> dresp->mnt[0].capacityhigh = 0;
> - if ((le32_to_cpu(dresp->status) != ST_OK) ||
> - (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> - _aac_probe_container2(context, fibptr);
> - return;
> + if ((le32_to_cpu(dresp->status) == ST_OK) &&
> + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> + _aac_probe_container2(context, fibptr);
> + return;
> + }
> }
> scsicmd = (struct scsi_cmnd *) context;
>
> diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
> index 6981299..998fbad 100644
> --- a/drivers/scsi/aacraid/aacraid.h
> +++ b/drivers/scsi/aacraid/aacraid.h
> @@ -2701,6 +2701,11 @@ static inline int aac_is_src(struct aac_dev *dev)
> return 0;
> }
>
> +static inline int aac_supports_2T(struct aac_dev *dev)
> +{
> + return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64);
> +}
> +
> char * get_container_type(unsigned type);
> extern int numacb;
> extern char aac_driver_version[];
> --
> 2.8.4
Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
2017-09-15 17:04 ` Dave Carroll
@ 2017-09-15 19:50 ` Martin K. Petersen
-1 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2017-09-15 19:50 UTC (permalink / raw)
To: Dave Carroll
Cc: Martin K . Petersen, James Bottomley, linux-scsi, aacraid,
Scott Benesh, Brian King, stable
Dave,
> The logic for supporting large drives was previously tied to 4Kn
> support for SmartIOC-2000. As SmartIOC-2000 does not support volumes
> using 4Kn drives, use the intended option flag AAC_OPT_NEW_COMM_64 to
> determine support for volumes greater than 2T.
Applied to 4.14/scsi-fixes. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
@ 2017-09-15 19:50 ` Martin K. Petersen
0 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2017-09-15 19:50 UTC (permalink / raw)
To: Dave Carroll
Cc: Martin K . Petersen, James Bottomley, linux-scsi, aacraid,
Scott Benesh, Brian King, stable
Dave,
> The logic for supporting large drives was previously tied to 4Kn
> support for SmartIOC-2000. As SmartIOC-2000 does not support volumes
> using 4Kn drives, use the intended option flag AAC_OPT_NEW_COMM_64 to
> determine support for volumes greater than 2T.
Applied to 4.14/scsi-fixes. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
2017-09-15 18:01 ` Christoph Hellwig
@ 2017-09-15 23:37 ` Dave Carroll
2017-09-16 1:10 ` Martin K. Petersen
0 siblings, 1 reply; 11+ messages in thread
From: Dave Carroll @ 2017-09-15 23:37 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Martin K . Petersen, James Bottomley, linux-scsi,
dl-esc-Aacraid Linux Driver, Scott Benesh, Brian King, stable
Hi Christoph,
> > + if ((le32_to_cpu(dresp->status) == ST_OK) &&
> > + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> > + _aac_probe_container2(context, fibptr);
> > + return;
>
> if (dresp->status == cpu_to_le32(ST_OK) &&
> dresp->mnt[0].vol != cpu_to_le32(CT_NONE)) {
>
I've contemplated this all day, and it looked like sematics, but I assume you were
Indicating that the cpu_to_le32() of a constant is a compiler issue, vs le32_to_cpu() is a
runtime issue. If so, thanks! If not could you elaborate ...
Thanks, -Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
2017-09-15 23:37 ` Dave Carroll
@ 2017-09-16 1:10 ` Martin K. Petersen
0 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2017-09-16 1:10 UTC (permalink / raw)
To: Dave Carroll
Cc: Christoph Hellwig, Martin K . Petersen, James Bottomley,
linux-scsi, dl-esc-Aacraid Linux Driver, Scott Benesh,
Brian King, stable
Dave,
> Hi Christoph,
>
>> > + if ((le32_to_cpu(dresp->status) == ST_OK) &&
>> > + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
>> > + _aac_probe_container2(context, fibptr);
>> > + return;
>>
>> if (dresp->status == cpu_to_le32(ST_OK) &&
>> dresp->mnt[0].vol != cpu_to_le32(CT_NONE)) {
>>
>
> I've contemplated this all day, and it looked like sematics, but I
> assume you were Indicating that the cpu_to_le32() of a constant is a
> compiler issue, vs le32_to_cpu() is a runtime issue. If so, thanks! If
> not could you elaborate ...
FWIW, I applied your patch as-is for consistency with the rest of the
driver. I do prefer Christoph's version, though, but that can be a
follow-on patch.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
@ 2017-09-16 1:10 ` Martin K. Petersen
0 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2017-09-16 1:10 UTC (permalink / raw)
To: Dave Carroll
Cc: Christoph Hellwig, Martin K . Petersen, James Bottomley,
linux-scsi, dl-esc-Aacraid Linux Driver, Scott Benesh,
Brian King, stable
Dave,
> Hi Christoph,
>
>> > + if ((le32_to_cpu(dresp->status) == ST_OK) &&
>> > + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
>> > + _aac_probe_container2(context, fibptr);
>> > + return;
>>
>> if (dresp->status == cpu_to_le32(ST_OK) &&
>> dresp->mnt[0].vol != cpu_to_le32(CT_NONE)) {
>>
>
> I've contemplated this all day, and it looked like sematics, but I
> assume you were Indicating that the cpu_to_le32() of a constant is a
> compiler issue, vs le32_to_cpu() is a runtime issue. If so, thanks! If
> not could you elaborate ...
FWIW, I applied your patch as-is for consistency with the rest of the
driver. I do prefer Christoph's version, though, but that can be a
follow-on patch.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000
2017-09-16 1:10 ` Martin K. Petersen
(?)
@ 2017-09-17 1:23 ` Dave Carroll
-1 siblings, 0 replies; 11+ messages in thread
From: Dave Carroll @ 2017-09-17 1:23 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Christoph Hellwig, James Bottomley, linux-scsi,
dl-esc-Aacraid Linux Driver, Scott Benesh, Brian King, stable
> Dave,
>
> > Hi Christoph,
> >
> >> > + if ((le32_to_cpu(dresp->status) == ST_OK) &&
> >> > + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> >> > + _aac_probe_container2(context, fibptr);
> >> > + return;
> >>
> >> if (dresp->status == cpu_to_le32(ST_OK) &&
> >> dresp->mnt[0].vol != cpu_to_le32(CT_NONE)) {
> >>
> >
> > I've contemplated this all day, and it looked like sematics, but I
> > assume you were Indicating that the cpu_to_le32() of a constant is a
> > compiler issue, vs le32_to_cpu() is a runtime issue. If so, thanks! If
> > not could you elaborate ...
>
> FWIW, I applied your patch as-is for consistency with the rest of the driver. I do
> prefer Christoph's version, though, but that can be a follow-on patch.
>
Hi Martin,
If I'm right regarding Christph's intentions, and you seem to imply, which since I've been an LE person most of my life, I will instill in my development team, and propose another patch to fix that ...
Thanks, -Dave
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-09-17 1:24 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 17:04 [PATCH RESEND] aacraid: Fix 2T+ drives on SmartIOC-2000 Dave Carroll
2017-09-15 17:04 ` Dave Carroll
2017-09-15 18:01 ` Christoph Hellwig
2017-09-15 23:37 ` Dave Carroll
2017-09-16 1:10 ` Martin K. Petersen
2017-09-16 1:10 ` Martin K. Petersen
2017-09-17 1:23 ` Dave Carroll
2017-09-15 19:20 ` Raghava Aditya Renukunta
2017-09-15 19:20 ` Raghava Aditya Renukunta
2017-09-15 19:50 ` Martin K. Petersen
2017-09-15 19:50 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.