projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b320a0a
)
ata: Fix ZBC_OUT all bit handling
author
Damien Le Moal
<
[email protected]
>
Tue, 26 Jun 2018 11:56:55 +0000
(20:56 +0900)
committer
Tejun Heo
<
[email protected]
>
Mon, 2 Jul 2018 15:59:26 +0000
(08:59 -0700)
If the ALL bit is set in the ZBC_OUT command, the command zone ID field
(block) should be ignored.
Reported-by: David Butterfield <
[email protected]
>
Signed-off-by: Damien Le Moal <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Tejun Heo <
[email protected]
>
drivers/ata/libata-scsi.c
patch
|
blob
|
history
diff --git
a/drivers/ata/libata-scsi.c
b/drivers/ata/libata-scsi.c
index a5543751f44638f2e005d0caec190c339021f1d3..aad1b01447de6924df4b1c1713d5fc402df112a0 100644
(file)
--- a/
drivers/ata/libata-scsi.c
+++ b/
drivers/ata/libata-scsi.c
@@
-3805,7
+3805,14
@@
static unsigned int ata_scsi_zbc_out_xlat(struct ata_queued_cmd *qc)
*/
goto invalid_param_len;
}
- if (block >= dev->n_sectors) {
+
+ all = cdb[14] & 0x1;
+ if (all) {
+ /*
+ * Ignore the block address (zone ID) as defined by ZBC.
+ */
+ block = 0;
+ } else if (block >= dev->n_sectors) {
/*
* Block must be a valid zone ID (a zone start LBA).
*/
@@
-3813,8
+3820,6
@@
static unsigned int ata_scsi_zbc_out_xlat(struct ata_queued_cmd *qc)
goto invalid_fld;
}
- all = cdb[14] & 0x1;
-
if (ata_ncq_enabled(qc->dev) &&
ata_fpdma_zac_mgmt_out_supported(qc->dev)) {
tf->protocol = ATA_PROT_NCQ_NODATA;