* [PATCH] libsas: Fixup transport protocol definition in sas_get_ata_info()
@ 2015-04-07 8:45 Hannes Reinecke
2015-04-07 8:47 ` Hannes Reinecke
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2015-04-07 8:45 UTC (permalink / raw)
To: James Bottomley; +Cc: Christoph Hellwig, linux-scsi, Hannes Reinecke
'tproto' specifies the transport protocol, not the device type.
So use the correct definitions here.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/libsas/sas_ata.c | 2 +-
drivers/scsi/sd.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 9c706d8..83b182a 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -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;
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index ec512b8..19e6154 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -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--;
--
1.8.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libsas: Fixup transport protocol definition in sas_get_ata_info()
2015-04-07 8:45 [PATCH] libsas: Fixup transport protocol definition in sas_get_ata_info() Hannes Reinecke
@ 2015-04-07 8:47 ` Hannes Reinecke
0 siblings, 0 replies; 2+ messages in thread
From: Hannes Reinecke @ 2015-04-07 8:47 UTC (permalink / raw)
To: James Bottomley; +Cc: Christoph Hellwig, linux-scsi
On 04/07/2015 10:45 AM, Hannes Reinecke wrote:
> 'tproto' specifies the transport protocol, not the device type.
> So use the correct definitions here.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/scsi/libsas/sas_ata.c | 2 +-
> drivers/scsi/sd.c | 7 +++++++
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
> index 9c706d8..83b182a 100644
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -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;
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index ec512b8..19e6154 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -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--;
>
>
Bah. That doesn't belong here.
Will be resending.
Sorry.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-07 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07 8:45 [PATCH] libsas: Fixup transport protocol definition in sas_get_ata_info() Hannes Reinecke
2015-04-07 8:47 ` Hannes Reinecke
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.