diff mbox series

[12/14] scsi: sd: sd_read_cpr() requires VPD pages

Message ID 20220302053559.32147-13-martin.petersen@oracle.com
State New
Headers show
Series [01/14] scsi: mpt3sas: Use cached ATA Information VPD page | expand

Commit Message

Martin K. Petersen March 2, 2022, 5:35 a.m. UTC
As such it should be called inside the scsi_device_supports_vpd()
conditional.

Cc: Damien Le Moal <damien.lemoal@wdc.com>
Fixes: e815d36548f0 ("scsi: sd: add concurrent positioning ranges support")
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
 drivers/scsi/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Thumshirn March 4, 2022, 9:33 a.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Damien Le Moal April 6, 2022, 1:29 a.m. UTC | #2
On 3/2/22 19:45, Damien Le Moal wrote:
> On 2022/03/02 7:35, Martin K. Petersen wrote:
>> As such it should be called inside the scsi_device_supports_vpd()
>> conditional.
>>
>> Cc: Damien Le Moal <damien.lemoal@wdc.com>
>> Fixes: e815d36548f0 ("scsi: sd: add concurrent positioning ranges support")
>> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> 
> I thought this was already queued :)
> 
> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

Martin,

I still do not see this patch in 5.18-rc1... Did it fell through the 
cracks ? It also needs cc stable...
See: https://bugzilla.kernel.org/show_bug.cgi?id=215788

> 
>> ---
>>   drivers/scsi/sd.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
>> index 2c2e86738578..9d6b2205339d 100644
>> --- a/drivers/scsi/sd.c
>> +++ b/drivers/scsi/sd.c
>> @@ -3396,6 +3396,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
>>   			sd_read_block_limits(sdkp);
>>   			sd_read_block_characteristics(sdkp);
>>   			sd_zbc_read_zones(sdkp, buffer);
>> +			sd_read_cpr(sdkp);
>>   		}
>>   
>>   		sd_print_capacity(sdkp, old_capacity);
>> @@ -3405,7 +3406,6 @@ static int sd_revalidate_disk(struct gendisk *disk)
>>   		sd_read_app_tag_own(sdkp, buffer);
>>   		sd_read_write_same(sdkp, buffer);
>>   		sd_read_security(sdkp, buffer);
>> -		sd_read_cpr(sdkp);
>>   		sd_config_write_same(sdkp);
>>   		sd_config_discard(sdkp, SD_LBP_DEFAULT);
>>   		sd_config_write_zeroes(sdkp, SD_ZERO_DEFAULT);
> 
>
Martin K. Petersen April 7, 2022, 2:19 a.m. UTC | #3
Damien,

> I still do not see this patch in 5.18-rc1... Did it fell through the
> cracks ? It also needs cc stable...

It was part of my discovery series which I ended up holding back from
5.18 due to a regression. But I'll apply this particular fix.
Damien Le Moal April 7, 2022, 2:36 a.m. UTC | #4
On Wed, 2022-04-06 at 22:19 -0400, Martin K. Petersen wrote:
> Damien,
> 
> > I still do not see this patch in 5.18-rc1... Did it fell through the
> > cracks ? It also needs cc stable...
> 
> It was part of my discovery series which I ended up holding back from
> 5.18 due to a regression. But I'll apply this particular fix.

Thanks.

Unfortunately, the patch did not help with that Areca RAID controller
problem. It looks like the HBA is crashing when the VPD page 0xb9 command
is in the discovery. No issues when manually doing a sg_vpd of that page,
which fails as the RAID volume does not support it. I am tempted in
putting this problem on a buggy adapter FW... Any other idea what could be
wrong ?
Martin K. Petersen April 7, 2022, 2:48 a.m. UTC | #5
Damien,

> Unfortunately, the patch did not help with that Areca RAID controller
> problem. It looks like the HBA is crashing when the VPD page 0xb9
> command is in the discovery. No issues when manually doing a sg_vpd of
> that page, which fails as the RAID volume does not support it. I am
> tempted in putting this problem on a buggy adapter FW... Any other
> idea what could be wrong ?

Yeah, I saw the bugzilla updates.

It would be good to know if the tweaked VPD code in

	https://git.kernel.org/mkp/h/5.18/discovery

makes a difference...
diff mbox series

Patch

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 2c2e86738578..9d6b2205339d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3396,6 +3396,7 @@  static int sd_revalidate_disk(struct gendisk *disk)
 			sd_read_block_limits(sdkp);
 			sd_read_block_characteristics(sdkp);
 			sd_zbc_read_zones(sdkp, buffer);
+			sd_read_cpr(sdkp);
 		}
 
 		sd_print_capacity(sdkp, old_capacity);
@@ -3405,7 +3406,6 @@  static int sd_revalidate_disk(struct gendisk *disk)
 		sd_read_app_tag_own(sdkp, buffer);
 		sd_read_write_same(sdkp, buffer);
 		sd_read_security(sdkp, buffer);
-		sd_read_cpr(sdkp);
 		sd_config_write_same(sdkp);
 		sd_config_discard(sdkp, SD_LBP_DEFAULT);
 		sd_config_write_zeroes(sdkp, SD_ZERO_DEFAULT);