libsas: Fixup transport protocol definition in sas_get_ata_info()
Subsystems (2)
PATCH 1/1 libsas: Fixup transport protocol definition in sas_get_ata_info()
'tproto' specifies the transport protocol, not the device type. So use the correct definitions here.
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/scsi/libsas/sas_ata.c | 2 +- drivers/scsi/sd.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/scsi/libsas/sas_ata.c +1 -1
@@ -279,7 +279,7 @@ int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy)if (phy->attached_tproto &SAS_PROTOCOL_STP ) dev->tproto = phy->attached_tproto;if (phy->attached_sata_dev) - dev->tproto |=SAS_SATA_DEV ; + dev->tproto |=SAS_PROTOCOL_SATA ;if (phy->attached_dev_type ==SAS_SATA_PENDING ) dev->dev_type =SAS_SATA_PENDING ;
drivers/scsi/sd.c +7 -0
@@ -2127,6 +2127,13 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp,* give it one more chance */ if (--reset_retries >0 )continue ; +if (sense_valid && + sshdr.sense_key ==UNIT_ATTENTION && + sshdr.asc ==0x29 && sshdr.ascq ==0x00 ) +/* Device reset might occur several times, +* give it one more chance */ +if (--reset_retries >0 ) +continue ; } retries--;
Signature · 1 line
1.8.5.2
Quoted 31 lines · Hannes Reinecke
'tproto' specifies the transport protocol, not the device type. So use the correct definitions here.
Signed-off-by Hannes Reinecke <[email protected]>--- drivers/scsi/libsas/sas_ata.c | 2 +- drivers/scsi/sd.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)drivers/scsi/libsas/sas_ata.c +1
-1@@ -279,7 +279,7 @@ int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy)if (phy->attached_tproto &SAS_PROTOCOL_STP ) dev->tproto = phy->attached_tproto;if (phy->attached_sata_dev) - dev->tproto |=SAS_SATA_DEV ; + dev->tproto |=SAS_PROTOCOL_SATA ;if (phy->attached_dev_type ==SAS_SATA_PENDING ) dev->dev_type =SAS_SATA_PENDING ;drivers/scsi/sd.c +0
-0@@ -2127,6 +2127,13 @@ static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp,* give it one more chance */ if (--reset_retries >0 )continue ;
drivers/scsi/sd.c static int read_capacity_16(struct scsi_disk *sdkp, struct scsi_device *sdp, · line 2139
Quoted 10 lines
drivers/scsi/sd.c +7
-0+if (sense_valid && + sshdr.sense_key ==UNIT_ATTENTION && + sshdr.asc ==0x29 && sshdr.ascq ==0x00 ) +/* Device reset might occur several times, +* give it one more chance */ +if (--reset_retries >0 ) +continue ; } retries--;
Bah. That doesn't belong here.
Will be resending.
Sorry.
Cheers,
Hannes
Signature · 9 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html