mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/libata/linux
This commit is contained in:
@@ -162,7 +162,6 @@ static int ahci_da850_probe(struct platform_device *pdev)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct ahci_host_priv *hpriv;
|
||||
void __iomem *pwrdn_reg;
|
||||
struct resource *res;
|
||||
u32 mpy;
|
||||
int rc;
|
||||
|
||||
@@ -198,22 +197,14 @@ static int ahci_da850_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pwrdn_reg = devm_platform_ioremap_resource(pdev, 1);
|
||||
if (IS_ERR(pwrdn_reg))
|
||||
return PTR_ERR(pwrdn_reg);
|
||||
|
||||
rc = ahci_platform_enable_resources(hpriv);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
if (!res) {
|
||||
rc = -ENODEV;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
pwrdn_reg = devm_ioremap(dev, res->start, resource_size(res));
|
||||
if (!pwrdn_reg) {
|
||||
rc = -ENOMEM;
|
||||
goto disable_resources;
|
||||
}
|
||||
|
||||
da850_sata_init(dev, pwrdn_reg, hpriv->mmio, mpy);
|
||||
|
||||
rc = ahci_platform_init_host(pdev, hpriv, &ahci_da850_port_info,
|
||||
|
||||
@@ -2488,7 +2488,7 @@ static void ata_dev_config_sense_reporting(struct ata_device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
static void ata_dev_config_zac(struct ata_device *dev)
|
||||
static void ata_dev_config_zoned(struct ata_device *dev)
|
||||
{
|
||||
unsigned int err_mask;
|
||||
u8 *identify_buf = dev->sector_buf;
|
||||
@@ -2497,7 +2497,7 @@ static void ata_dev_config_zac(struct ata_device *dev)
|
||||
dev->zac_zones_optimal_nonseq = U32_MAX;
|
||||
dev->zac_zones_max_open = U32_MAX;
|
||||
|
||||
if (!ata_dev_is_zac(dev))
|
||||
if (!ata_dev_is_zoned(dev))
|
||||
return;
|
||||
|
||||
if (!ata_identify_page_supported(dev, ATA_LOG_ZONED_INFORMATION)) {
|
||||
@@ -2705,6 +2705,71 @@ not_supported:
|
||||
ata_dev_cleanup_cdl_resources(dev);
|
||||
}
|
||||
|
||||
static void ata_dev_config_depop(struct ata_device *dev)
|
||||
{
|
||||
unsigned int err_mask;
|
||||
u64 val;
|
||||
|
||||
/* Ignore old drives. */
|
||||
if (ata_id_major_version(dev->id) < 11)
|
||||
goto not_supported;
|
||||
|
||||
/* NCQ Autosense is required. */
|
||||
if (!ata_identify_page_supported(dev, ATA_LOG_SUPPORTED_CAPABILITIES) ||
|
||||
!ata_id_has_ncq_autosense(dev->id))
|
||||
goto not_supported;
|
||||
|
||||
err_mask = ata_read_log_page(dev, ATA_LOG_IDENTIFY_DEVICE,
|
||||
ATA_LOG_SUPPORTED_CAPABILITIES,
|
||||
dev->sector_buf, 1);
|
||||
if (err_mask)
|
||||
goto not_supported;
|
||||
|
||||
/* Check depopulation capabilities bits. */
|
||||
val = get_unaligned_le64(&dev->sector_buf[152]);
|
||||
if (!(val & BIT_ULL(63)))
|
||||
goto not_supported;
|
||||
|
||||
/*
|
||||
* Support for at least the GET PHYSICAL ELEMENT STATUS and
|
||||
* REMOVE ELEMENT AND TRUNCATE commands is mandated.
|
||||
*/
|
||||
if (!(val & BIT_ULL(0)) || !(val & BIT_ULL(1)))
|
||||
goto not_supported;
|
||||
|
||||
dev->flags |= ATA_DFLAG_DEPOP;
|
||||
|
||||
/* Check if RESTORE ELEMENTS AND REBUILD is supported. */
|
||||
if (val & BIT_ULL(2))
|
||||
dev->flags |= ATA_DFLAG_DEPOP_RESTORE;
|
||||
|
||||
/*
|
||||
* For ZAC devices, check if REMOVE ELEMENT AND MODIFY ZONES is
|
||||
* supported.
|
||||
*/
|
||||
if (dev->class != ATA_DEV_ZAC)
|
||||
return;
|
||||
|
||||
err_mask = ata_read_log_page(dev, ATA_LOG_IDENTIFY_DEVICE,
|
||||
ATA_LOG_ZONED_INFORMATION,
|
||||
dev->sector_buf, 1);
|
||||
if (err_mask)
|
||||
return;
|
||||
|
||||
val = get_unaligned_le64(&dev->sector_buf[8]);
|
||||
if (!(val & BIT_ULL(63)))
|
||||
return;
|
||||
|
||||
if (val & BIT_ULL(1))
|
||||
dev->flags |= ATA_DFLAG_DEPOP_MODIFY;
|
||||
|
||||
return;
|
||||
|
||||
not_supported:
|
||||
dev->flags &= ~(ATA_DFLAG_DEPOP | ATA_DFLAG_DEPOP_RESTORE |
|
||||
ATA_DFLAG_DEPOP_MODIFY);
|
||||
}
|
||||
|
||||
static int ata_dev_config_lba(struct ata_device *dev)
|
||||
{
|
||||
const u16 *id = dev->id;
|
||||
@@ -2942,7 +3007,7 @@ static void ata_dev_print_features(struct ata_device *dev)
|
||||
return;
|
||||
|
||||
ata_dev_info(dev,
|
||||
"Features:%s%s%s%s%s%s%s%s%s%s\n",
|
||||
"Features:%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
|
||||
dev->flags & ATA_DFLAG_FUA ? " FUA" : "",
|
||||
dev->flags & ATA_DFLAG_TRUSTED ? " Trust" : "",
|
||||
dev->flags & ATA_DFLAG_DA ? " Dev-Attention" : "",
|
||||
@@ -2952,7 +3017,10 @@ static void ata_dev_print_features(struct ata_device *dev)
|
||||
dev->flags & ATA_DFLAG_NCQ_SEND_RECV ? " NCQ-sndrcv" : "",
|
||||
dev->flags & ATA_DFLAG_NCQ_PRIO ? " NCQ-prio" : "",
|
||||
dev->flags & ATA_DFLAG_CDL ? " CDL" : "",
|
||||
dev->cpr_log ? " CPR" : "");
|
||||
dev->cpr_log ? " CPR" : "",
|
||||
dev->flags & ATA_DFLAG_DEPOP ? " Depop" : "",
|
||||
dev->flags & ATA_DFLAG_DEPOP_RESTORE ? " Depop-Restore" : "",
|
||||
dev->flags & ATA_DFLAG_DEPOP_MODIFY ? " Depop-Modify" : "");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3111,10 +3179,11 @@ int ata_dev_configure(struct ata_device *dev)
|
||||
ata_dev_config_fua(dev);
|
||||
ata_dev_config_devslp(dev);
|
||||
ata_dev_config_sense_reporting(dev);
|
||||
ata_dev_config_zac(dev);
|
||||
ata_dev_config_zoned(dev);
|
||||
ata_dev_config_trusted(dev);
|
||||
ata_dev_config_cpr(dev);
|
||||
ata_dev_config_cdl(dev);
|
||||
ata_dev_config_depop(dev);
|
||||
dev->cdb_len = 32;
|
||||
|
||||
if (print_info)
|
||||
|
||||
@@ -1230,9 +1230,10 @@ static void __ata_eh_qc_complete(struct ata_queued_cmd *qc)
|
||||
* Indicate to the mid and upper layers that an ATA command has
|
||||
* completed. To be used from EH.
|
||||
*/
|
||||
void ata_eh_qc_complete(struct ata_queued_cmd *qc)
|
||||
static void ata_eh_qc_complete(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct scsi_cmnd *scmd = qc->scsicmd;
|
||||
|
||||
scmd->retries = scmd->allowed;
|
||||
__ata_eh_qc_complete(qc);
|
||||
}
|
||||
@@ -1248,9 +1249,10 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
|
||||
* scmd->allowed is incremented for commands which get retried
|
||||
* due to unrelated failures (qc->err_mask is zero).
|
||||
*/
|
||||
void ata_eh_qc_retry(struct ata_queued_cmd *qc)
|
||||
static void ata_eh_qc_retry(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct scsi_cmnd *scmd = qc->scsicmd;
|
||||
|
||||
if (!qc->err_mask)
|
||||
scmd->allowed++;
|
||||
__ata_eh_qc_complete(qc);
|
||||
|
||||
+611
-105
File diff suppressed because it is too large
Load Diff
@@ -1114,8 +1114,14 @@ fsm_start:
|
||||
|
||||
if (ap->hsm_task_state == HSM_ST_LAST &&
|
||||
(!(qc->tf.flags & ATA_TFLAG_WRITE))) {
|
||||
/* all data read */
|
||||
status = ata_wait_idle(ap);
|
||||
status = ata_sff_busy_wait(ap,
|
||||
ATA_BUSY | ATA_DRQ, 10);
|
||||
if (status != 0xff &&
|
||||
(status & (ATA_BUSY | ATA_DRQ))) {
|
||||
qc->tf.flags |= ATA_TFLAG_POLLING;
|
||||
ata_sff_queue_pio_task(link, 0);
|
||||
return 0;
|
||||
}
|
||||
goto fsm_start;
|
||||
}
|
||||
}
|
||||
@@ -1213,7 +1219,7 @@ static void ata_sff_pio_task(struct work_struct *work)
|
||||
container_of(work, struct ata_port, sff_pio_task.work);
|
||||
struct ata_link *link = ap->sff_pio_task_link;
|
||||
struct ata_queued_cmd *qc;
|
||||
u8 status;
|
||||
u8 status, wait_mask;
|
||||
int poll_next;
|
||||
|
||||
spin_lock_irq(ap->lock);
|
||||
@@ -1229,6 +1235,10 @@ static void ata_sff_pio_task(struct work_struct *work)
|
||||
fsm_start:
|
||||
WARN_ON_ONCE(ap->hsm_task_state == HSM_ST_IDLE);
|
||||
|
||||
wait_mask = ATA_BUSY;
|
||||
if (ap->hsm_task_state == HSM_ST_LAST)
|
||||
wait_mask |= ATA_DRQ;
|
||||
|
||||
/*
|
||||
* This is purely heuristic. This is a fast path.
|
||||
* Sometimes when we enter, BSY will be cleared in
|
||||
@@ -1236,14 +1246,14 @@ fsm_start:
|
||||
* or something. Snooze for a couple msecs, then
|
||||
* chk-status again. If still busy, queue delayed work.
|
||||
*/
|
||||
status = ata_sff_busy_wait(ap, ATA_BUSY, 5);
|
||||
if (status & ATA_BUSY) {
|
||||
status = ata_sff_busy_wait(ap, wait_mask, 5);
|
||||
if (status & wait_mask) {
|
||||
spin_unlock_irq(ap->lock);
|
||||
ata_msleep(ap, 2);
|
||||
spin_lock_irq(ap->lock);
|
||||
|
||||
status = ata_sff_busy_wait(ap, ATA_BUSY, 10);
|
||||
if (status & ATA_BUSY) {
|
||||
status = ata_sff_busy_wait(ap, wait_mask, 10);
|
||||
if (status & wait_mask) {
|
||||
ata_sff_queue_pio_task(link, ATA_SHORT_PAUSE);
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ static inline bool ata_sstatus_online(u32 sstatus)
|
||||
return (sstatus & 0xf) == 0x3;
|
||||
}
|
||||
|
||||
static inline bool ata_dev_is_zac(struct ata_device *dev)
|
||||
static inline bool ata_dev_is_zoned(struct ata_device *dev)
|
||||
{
|
||||
/* Host managed device or host aware device */
|
||||
return dev->class == ATA_DEV_ZAC ||
|
||||
|
||||
@@ -656,14 +656,22 @@ static int ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
||||
* start of new transfer.
|
||||
*/
|
||||
drv_data->dma_rx_channel = dma_request_chan(dev, "rx");
|
||||
if (IS_ERR(drv_data->dma_rx_channel))
|
||||
return dev_err_probe(dev, PTR_ERR(drv_data->dma_rx_channel),
|
||||
"rx DMA setup failed\n");
|
||||
if (IS_ERR(drv_data->dma_rx_channel)) {
|
||||
ret = PTR_ERR(drv_data->dma_rx_channel);
|
||||
drv_data->dma_rx_channel = NULL;
|
||||
if (ret == -EPROBE_DEFER)
|
||||
return ret;
|
||||
dev_warn(dev, "rx DMA unavailable, using PIO\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
drv_data->dma_tx_channel = dma_request_chan(&pdev->dev, "tx");
|
||||
if (IS_ERR(drv_data->dma_tx_channel)) {
|
||||
ret = dev_err_probe(dev, PTR_ERR(drv_data->dma_tx_channel),
|
||||
"tx DMA setup failed\n");
|
||||
ret = PTR_ERR(drv_data->dma_tx_channel);
|
||||
drv_data->dma_tx_channel = NULL;
|
||||
if (ret == -EPROBE_DEFER)
|
||||
goto fail_release_rx;
|
||||
dev_warn(dev, "tx DMA unavailable, using PIO\n");
|
||||
goto fail_release_rx;
|
||||
}
|
||||
|
||||
@@ -674,7 +682,7 @@ static int ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
||||
conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
||||
ret = dmaengine_slave_config(drv_data->dma_rx_channel, &conf);
|
||||
if (ret) {
|
||||
dev_err_probe(dev, ret, "failed to configure rx dma channel");
|
||||
dev_warn(dev, "failed to configure rx dma channel, using PIO\n");
|
||||
goto fail_release_dma;
|
||||
}
|
||||
|
||||
@@ -685,7 +693,7 @@ static int ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
||||
conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
|
||||
ret = dmaengine_slave_config(drv_data->dma_tx_channel, &conf);
|
||||
if (ret) {
|
||||
dev_err_probe(dev, ret, "failed to configure tx dma channel");
|
||||
dev_warn(dev, "failed to configure tx dma channel, using PIO\n");
|
||||
goto fail_release_dma;
|
||||
}
|
||||
|
||||
@@ -693,10 +701,14 @@ static int ep93xx_pata_dma_init(struct ep93xx_pata_data *drv_data)
|
||||
|
||||
fail_release_rx:
|
||||
dma_release_channel(drv_data->dma_rx_channel);
|
||||
drv_data->dma_rx_channel = NULL;
|
||||
if (ret == -EPROBE_DEFER)
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
fail_release_dma:
|
||||
ep93xx_pata_release_dma(drv_data);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ep93xx_pata_dma_start(struct ata_queued_cmd *qc)
|
||||
|
||||
@@ -769,10 +769,8 @@ static int mpc52xx_ata_probe(struct platform_device *op)
|
||||
task_irq = bcom_get_task_irq(dmatsk);
|
||||
rv = devm_request_irq(&op->dev, task_irq, &mpc52xx_ata_task_irq, 0,
|
||||
"ATA task", priv);
|
||||
if (rv) {
|
||||
dev_err(&op->dev, "error requesting DMA IRQ\n");
|
||||
if (rv)
|
||||
goto err2;
|
||||
}
|
||||
priv->dmatsk = dmatsk;
|
||||
|
||||
/* Init the hw */
|
||||
|
||||
+10
-42
@@ -161,8 +161,6 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
||||
struct ata_host *host;
|
||||
struct ata_port *ap;
|
||||
struct pata_pxa_data *data;
|
||||
struct resource *cmd_res;
|
||||
struct resource *ctl_res;
|
||||
struct resource *dma_res;
|
||||
struct pata_pxa_pdata *pdata = dev_get_platdata(&pdev->dev);
|
||||
struct dma_slave_config config;
|
||||
@@ -181,20 +179,6 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* CMD port base address
|
||||
*/
|
||||
cmd_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (unlikely(cmd_res == NULL))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* CTL port base address
|
||||
*/
|
||||
ctl_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
if (unlikely(ctl_res == NULL))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* DMA port base address
|
||||
*/
|
||||
@@ -221,14 +205,12 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
||||
ap->pio_mask = ATA_PIO4;
|
||||
ap->mwdma_mask = ATA_MWDMA2;
|
||||
|
||||
ap->ioaddr.cmd_addr = devm_ioremap(&pdev->dev, cmd_res->start,
|
||||
resource_size(cmd_res));
|
||||
if (!ap->ioaddr.cmd_addr)
|
||||
return -ENOMEM;
|
||||
ap->ioaddr.ctl_addr = devm_ioremap(&pdev->dev, ctl_res->start,
|
||||
resource_size(ctl_res));
|
||||
if (!ap->ioaddr.ctl_addr)
|
||||
return -ENOMEM;
|
||||
ap->ioaddr.cmd_addr = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(ap->ioaddr.cmd_addr))
|
||||
return PTR_ERR(ap->ioaddr.cmd_addr);
|
||||
ap->ioaddr.ctl_addr = devm_platform_ioremap_resource(pdev, 1);
|
||||
if (IS_ERR(ap->ioaddr.ctl_addr))
|
||||
return PTR_ERR(ap->ioaddr.ctl_addr);
|
||||
ap->ioaddr.bmdma_addr = devm_ioremap(&pdev->dev, dma_res->start,
|
||||
resource_size(dma_res));
|
||||
if (!ap->ioaddr.bmdma_addr)
|
||||
@@ -280,40 +262,26 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
||||
/*
|
||||
* Request the DMA channel
|
||||
*/
|
||||
data->dma_chan = dma_request_chan(&pdev->dev, "data");
|
||||
data->dma_chan = devm_dma_request_chan(&pdev->dev, "data");
|
||||
if (IS_ERR(data->dma_chan))
|
||||
return PTR_ERR(data->dma_chan);
|
||||
|
||||
ret = dmaengine_slave_config(data->dma_chan, &config);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "dma configuration failed: %d\n", ret);
|
||||
dma_release_channel(data->dma_chan);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Activate the ATA host
|
||||
*/
|
||||
ret = ata_host_activate(host, irq, ata_sff_interrupt,
|
||||
return ata_host_activate(host, irq, ata_sff_interrupt,
|
||||
pdata->irq_flags, &pxa_ata_sht);
|
||||
if (ret)
|
||||
dma_release_channel(data->dma_chan);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void pxa_ata_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ata_host *host = platform_get_drvdata(pdev);
|
||||
struct pata_pxa_data *data = host->ports[0]->private_data;
|
||||
|
||||
dma_release_channel(data->dma_chan);
|
||||
|
||||
ata_host_detach(host);
|
||||
}
|
||||
|
||||
static struct platform_driver pxa_ata_driver = {
|
||||
.probe = pxa_ata_probe,
|
||||
.remove = pxa_ata_remove,
|
||||
.remove = ata_platform_remove_one,
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
},
|
||||
|
||||
@@ -103,16 +103,14 @@ static int rb532_pata_driver_probe(struct platform_device *pdev)
|
||||
{
|
||||
int irq;
|
||||
struct gpio_desc *gpiod;
|
||||
struct resource *res;
|
||||
struct ata_host *ah;
|
||||
struct rb532_cf_info *info;
|
||||
void __iomem *iobase;
|
||||
int ret;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "no IOMEM resource found\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
iobase = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(iobase))
|
||||
return PTR_ERR(iobase);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
@@ -139,11 +137,7 @@ static int rb532_pata_driver_probe(struct platform_device *pdev)
|
||||
ah->private_data = info;
|
||||
info->gpio_line = gpiod;
|
||||
info->irq = irq;
|
||||
|
||||
info->iobase = devm_ioremap(&pdev->dev, res->start,
|
||||
resource_size(res));
|
||||
if (!info->iobase)
|
||||
return -ENOMEM;
|
||||
info->iobase = iobase;
|
||||
|
||||
rb532_pata_setup_ports(ah);
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ static int ahci_highbank_probe(struct platform_device *pdev)
|
||||
struct ahci_host_priv *hpriv;
|
||||
struct ecx_plat_data *pdata;
|
||||
struct ata_host *host;
|
||||
struct resource *mem;
|
||||
void __iomem *mmio;
|
||||
int irq;
|
||||
int i;
|
||||
int rc;
|
||||
@@ -463,11 +463,9 @@ static int ahci_highbank_probe(struct platform_device *pdev)
|
||||
struct ata_port_info pi = ahci_highbank_port_info;
|
||||
const struct ata_port_info *ppi[] = { &pi, NULL };
|
||||
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!mem) {
|
||||
dev_err(dev, "no mmio space\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
mmio = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(mmio))
|
||||
return PTR_ERR(mmio);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
@@ -488,12 +486,7 @@ static int ahci_highbank_probe(struct platform_device *pdev)
|
||||
|
||||
hpriv->irq = irq;
|
||||
hpriv->flags |= (unsigned long)pi.private_data;
|
||||
|
||||
hpriv->mmio = devm_ioremap(dev, mem->start, resource_size(mem));
|
||||
if (!hpriv->mmio) {
|
||||
dev_err(dev, "can't map %pR\n", mem);
|
||||
return -ENOMEM;
|
||||
}
|
||||
hpriv->mmio = mmio;
|
||||
|
||||
rc = highbank_initialize_phys(dev, hpriv->mmio);
|
||||
if (rc)
|
||||
@@ -537,7 +530,6 @@ static int ahci_highbank_probe(struct platform_device *pdev)
|
||||
for (i = 0; i < host->n_ports; i++) {
|
||||
struct ata_port *ap = host->ports[i];
|
||||
|
||||
ata_port_desc(ap, "mmio %pR", mem);
|
||||
ata_port_desc(ap, "port 0x%x", 0x100 + ap->port_no * 0x80);
|
||||
|
||||
/* set enclosure management message type */
|
||||
|
||||
+14
-38
@@ -4054,17 +4054,13 @@ static int mv_platform_probe(struct platform_device *pdev)
|
||||
n_ports);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
|
||||
} else {
|
||||
mv_platform_data = dev_get_platdata(&pdev->dev);
|
||||
n_ports = mv_platform_data->n_ports;
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
}
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
if (!irq)
|
||||
return -EINVAL;
|
||||
|
||||
host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);
|
||||
hpriv = devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL);
|
||||
@@ -4092,21 +4088,19 @@ static int mv_platform_probe(struct platform_device *pdev)
|
||||
|
||||
hpriv->base -= SATAHC0_REG_BASE;
|
||||
|
||||
hpriv->clk = clk_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(hpriv->clk)) {
|
||||
dev_notice(&pdev->dev, "cannot get optional clkdev\n");
|
||||
} else {
|
||||
rc = clk_prepare_enable(hpriv->clk);
|
||||
if (rc)
|
||||
goto err;
|
||||
}
|
||||
hpriv->clk = devm_clk_get_optional_enabled(&pdev->dev, NULL);
|
||||
if (IS_ERR(hpriv->clk))
|
||||
return PTR_ERR(hpriv->clk);
|
||||
|
||||
for (port = 0; port < n_ports; port++) {
|
||||
char port_number[16];
|
||||
sprintf(port_number, "%d", port);
|
||||
hpriv->port_clks[port] = clk_get(&pdev->dev, port_number);
|
||||
if (!IS_ERR(hpriv->port_clks[port]))
|
||||
clk_prepare_enable(hpriv->port_clks[port]);
|
||||
hpriv->port_clks[port] = devm_clk_get_optional_enabled(&pdev->dev, port_number);
|
||||
if (IS_ERR(hpriv->port_clks[port])) {
|
||||
rc = PTR_ERR(hpriv->port_clks[port]);
|
||||
hpriv->n_ports = port;
|
||||
goto err;
|
||||
}
|
||||
|
||||
sprintf(port_number, "port%d", port);
|
||||
hpriv->port_phys[port] = devm_phy_optional_get(&pdev->dev,
|
||||
@@ -4120,8 +4114,8 @@ static int mv_platform_probe(struct platform_device *pdev)
|
||||
/* Cleanup only the initialized ports */
|
||||
hpriv->n_ports = port;
|
||||
goto err;
|
||||
} else
|
||||
phy_power_on(hpriv->port_phys[port]);
|
||||
}
|
||||
phy_power_on(hpriv->port_phys[port]);
|
||||
}
|
||||
|
||||
/* All the ports have been initialized */
|
||||
@@ -4160,17 +4154,8 @@ static int mv_platform_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err:
|
||||
if (!IS_ERR(hpriv->clk)) {
|
||||
clk_disable_unprepare(hpriv->clk);
|
||||
clk_put(hpriv->clk);
|
||||
}
|
||||
for (port = 0; port < hpriv->n_ports; port++) {
|
||||
if (!IS_ERR(hpriv->port_clks[port])) {
|
||||
clk_disable_unprepare(hpriv->port_clks[port]);
|
||||
clk_put(hpriv->port_clks[port]);
|
||||
}
|
||||
for (port = 0; port < hpriv->n_ports; port++)
|
||||
phy_power_off(hpriv->port_phys[port]);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
@@ -4190,17 +4175,8 @@ static void mv_platform_remove(struct platform_device *pdev)
|
||||
int port;
|
||||
ata_host_detach(host);
|
||||
|
||||
if (!IS_ERR(hpriv->clk)) {
|
||||
clk_disable_unprepare(hpriv->clk);
|
||||
clk_put(hpriv->clk);
|
||||
}
|
||||
for (port = 0; port < host->n_ports; port++) {
|
||||
if (!IS_ERR(hpriv->port_clks[port])) {
|
||||
clk_disable_unprepare(hpriv->port_clks[port]);
|
||||
clk_put(hpriv->port_clks[port]);
|
||||
}
|
||||
for (port = 0; port < host->n_ports; port++)
|
||||
phy_power_off(hpriv->port_phys[port]);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
||||
@@ -67,52 +67,6 @@ static const char *sdebug_version_date = "20210520";
|
||||
|
||||
#define MY_NAME "scsi_debug"
|
||||
|
||||
/* Additional Sense Code (ASC) */
|
||||
#define NO_ADDITIONAL_SENSE 0x0
|
||||
#define OVERLAP_ATOMIC_COMMAND_ASC 0x0
|
||||
#define OVERLAP_ATOMIC_COMMAND_ASCQ 0x23
|
||||
#define FILEMARK_DETECTED_ASCQ 0x1
|
||||
#define EOP_EOM_DETECTED_ASCQ 0x2
|
||||
#define BEGINNING_OF_P_M_DETECTED_ASCQ 0x4
|
||||
#define EOD_DETECTED_ASCQ 0x5
|
||||
#define LOGICAL_UNIT_NOT_READY 0x4
|
||||
#define LOGICAL_UNIT_COMMUNICATION_FAILURE 0x8
|
||||
#define UNRECOVERED_READ_ERR 0x11
|
||||
#define PARAMETER_LIST_LENGTH_ERR 0x1a
|
||||
#define INVALID_OPCODE 0x20
|
||||
#define LBA_OUT_OF_RANGE 0x21
|
||||
#define INVALID_FIELD_IN_CDB 0x24
|
||||
#define INVALID_FIELD_IN_PARAM_LIST 0x26
|
||||
#define WRITE_PROTECTED 0x27
|
||||
#define UA_READY_ASC 0x28
|
||||
#define UA_RESET_ASC 0x29
|
||||
#define UA_CHANGED_ASC 0x2a
|
||||
#define TOO_MANY_IN_PARTITION_ASC 0x3b
|
||||
#define TARGET_CHANGED_ASC 0x3f
|
||||
#define LUNS_CHANGED_ASCQ 0x0e
|
||||
#define INSUFF_RES_ASC 0x55
|
||||
#define INSUFF_RES_ASCQ 0x3
|
||||
#define POWER_ON_RESET_ASCQ 0x0
|
||||
#define POWER_ON_OCCURRED_ASCQ 0x1
|
||||
#define BUS_RESET_ASCQ 0x2 /* scsi bus reset occurred */
|
||||
#define MODE_CHANGED_ASCQ 0x1 /* mode parameters changed */
|
||||
#define CAPACITY_CHANGED_ASCQ 0x9
|
||||
#define SAVING_PARAMS_UNSUP 0x39
|
||||
#define TRANSPORT_PROBLEM 0x4b
|
||||
#define THRESHOLD_EXCEEDED 0x5d
|
||||
#define LOW_POWER_COND_ON 0x5e
|
||||
#define MISCOMPARE_VERIFY_ASC 0x1d
|
||||
#define MICROCODE_CHANGED_ASCQ 0x1 /* with TARGET_CHANGED_ASC */
|
||||
#define MICROCODE_CHANGED_WO_RESET_ASCQ 0x16
|
||||
#define WRITE_ERROR_ASC 0xc
|
||||
#define UNALIGNED_WRITE_ASCQ 0x4
|
||||
#define WRITE_BOUNDARY_ASCQ 0x5
|
||||
#define READ_INVDATA_ASCQ 0x6
|
||||
#define READ_BOUNDARY_ASCQ 0x7
|
||||
#define ATTEMPT_ACCESS_GAP 0x9
|
||||
#define INSUFF_ZONE_ASCQ 0xe
|
||||
/* see drivers/scsi/sense_codes.h */
|
||||
|
||||
/* Additional Sense Code Qualifier (ASCQ) */
|
||||
#define ACK_NAK_TO 0x3
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ enum {
|
||||
ATA_ID_HW_CONFIG = 93,
|
||||
ATA_ID_SPG = 98,
|
||||
ATA_ID_LBA_CAPACITY_2 = 100,
|
||||
ATA_ID_MAX_PAGES_PER_DSM = 105,
|
||||
ATA_ID_SECTOR_SIZE = 106,
|
||||
ATA_ID_WWN = 108,
|
||||
ATA_ID_LOGICAL_SECTOR_SIZE = 117, /* and 118 */
|
||||
@@ -288,6 +289,10 @@ enum {
|
||||
ATA_CMD_SANITIZE_DEVICE = 0xB4,
|
||||
ATA_CMD_ZAC_MGMT_IN = 0x4A,
|
||||
ATA_CMD_ZAC_MGMT_OUT = 0x9F,
|
||||
ATA_CMD_GET_PHYS_ELEMENT_STATUS = 0x12,
|
||||
ATA_CMD_REMOVE_ELEMENT_AND_TRUNCATE = 0x7c,
|
||||
ATA_CMD_RESTORE_ELEMENTS_AND_REBUILD = 0x7d,
|
||||
ATA_CMD_REMOVE_ELEMENT_AND_MODIFY_ZONES = 0x7e,
|
||||
|
||||
/* marked obsolete in the ATA/ATAPI-7 spec */
|
||||
ATA_CMD_RESTORE = 0x10,
|
||||
@@ -928,6 +933,18 @@ static inline bool ata_id_has_trim(const u16 *id)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline u16 ata_id_dsm_max_pages(const u16 *id)
|
||||
{
|
||||
/*
|
||||
* IDENTIFY DEVICE word 105: MAX PAGES PER DSM COMMAND. Maximum number
|
||||
* of 512-byte pages of LBA Range Entries the device accepts in a
|
||||
* single DATA SET MANAGEMENT command. Zero means the device does not
|
||||
* specify a limit. The field is reserved unless TRIM is supported, so
|
||||
* callers must gate on ata_id_has_trim().
|
||||
*/
|
||||
return id[ATA_ID_MAX_PAGES_PER_DSM];
|
||||
}
|
||||
|
||||
static inline bool ata_id_has_zero_after_trim(const u16 *id)
|
||||
{
|
||||
/* DSM supported, deterministic read, and read zero after trim set */
|
||||
|
||||
+50
-43
@@ -121,6 +121,55 @@ enum {
|
||||
ATA_QUIRK_NO_FUA = BIT_ULL(__ATA_QUIRK_NO_FUA),
|
||||
};
|
||||
|
||||
/*
|
||||
* struct ata_device flags
|
||||
*/
|
||||
enum {
|
||||
ATA_DFLAG_LBA = (1UL << 0), /* device supports LBA */
|
||||
ATA_DFLAG_LBA48 = (1UL << 1), /* device supports LBA48 */
|
||||
ATA_DFLAG_CDB_INTR = (1UL << 2), /* device asserts INTRQ when ready for CDB */
|
||||
ATA_DFLAG_NCQ = (1UL << 3), /* device supports NCQ */
|
||||
ATA_DFLAG_FLUSH_EXT = (1UL << 4), /* do FLUSH_EXT instead of FLUSH */
|
||||
ATA_DFLAG_ACPI_PENDING = (1UL << 5), /* ACPI resume action pending */
|
||||
ATA_DFLAG_ACPI_FAILED = (1UL << 6), /* ACPI on devcfg has failed */
|
||||
ATA_DFLAG_AN = (1UL << 7), /* AN configured */
|
||||
ATA_DFLAG_TRUSTED = (1UL << 8), /* device supports trusted send/recv */
|
||||
ATA_DFLAG_FUA = (1UL << 9), /* device supports FUA */
|
||||
ATA_DFLAG_DMADIR = (1UL << 10), /* device requires DMADIR */
|
||||
ATA_DFLAG_NCQ_SEND_RECV = (1UL << 11), /* device supports NCQ SEND and RECV */
|
||||
ATA_DFLAG_NCQ_PRIO = (1UL << 12), /* device supports NCQ priority */
|
||||
ATA_DFLAG_CDL = (1UL << 13), /* supports cmd duration limits */
|
||||
ATA_DFLAG_DEPOP = (1UL << 14), /* supports depopulation capability */
|
||||
ATA_DFLAG_DEPOP_RESTORE = (1UL << 15), /* supports depopulation restoration */
|
||||
ATA_DFLAG_DEPOP_MODIFY = (1UL << 16), /* supports zoned depopulation */
|
||||
ATA_DFLAG_CFG_MASK = (1UL << 17) - 1,
|
||||
|
||||
ATA_DFLAG_PIO = (1UL << 17), /* device limited to PIO mode */
|
||||
ATA_DFLAG_NCQ_OFF = (1UL << 18), /* device limited to non-NCQ mode */
|
||||
ATA_DFLAG_SLEEPING = (1UL << 19), /* device is sleeping */
|
||||
ATA_DFLAG_DUBIOUS_XFER = (1UL << 20), /* data transfer not verified */
|
||||
ATA_DFLAG_NO_UNLOAD = (1UL << 21), /* device doesn't support unload */
|
||||
ATA_DFLAG_UNLOCK_HPA = (1UL << 22), /* unlock HPA */
|
||||
ATA_DFLAG_INIT_MASK = (1UL << 23) - 1,
|
||||
|
||||
ATA_DFLAG_NCQ_PRIO_ENABLED = (1UL << 23), /* Priority cmds sent to dev */
|
||||
ATA_DFLAG_CDL_ENABLED = (1UL << 24), /* cmd duration limits is enabled */
|
||||
ATA_DFLAG_RESUMING = (1UL << 25), /* Device is resuming */
|
||||
ATA_DFLAG_DETACH = (1UL << 26),
|
||||
ATA_DFLAG_DETACHED = (1UL << 27),
|
||||
ATA_DFLAG_DA = (1UL << 28), /* device supports Device Attention */
|
||||
ATA_DFLAG_DEVSLP = (1UL << 29), /* device supports Device Sleep */
|
||||
ATA_DFLAG_ACPI_DISABLED = (1UL << 30), /* ACPI for the device is disabled */
|
||||
ATA_DFLAG_D_SENSE = (1UL << 31), /* Descriptor sense requested */
|
||||
|
||||
ATA_DFLAG_FEATURES_MASK = (ATA_DFLAG_TRUSTED | ATA_DFLAG_DA | \
|
||||
ATA_DFLAG_DEVSLP | ATA_DFLAG_NCQ_SEND_RECV | \
|
||||
ATA_DFLAG_NCQ_PRIO | ATA_DFLAG_FUA | \
|
||||
ATA_DFLAG_CDL | ATA_DFLAG_DEPOP | \
|
||||
ATA_DFLAG_DEPOP_RESTORE |
|
||||
ATA_DFLAG_DEPOP_MODIFY)
|
||||
};
|
||||
|
||||
enum {
|
||||
/* various global constants */
|
||||
LIBATA_MAX_PRD = ATA_MAX_PRD / 2,
|
||||
@@ -146,46 +195,7 @@ enum {
|
||||
ATA_TFLAG_FUA = (1 << 5), /* enable FUA */
|
||||
ATA_TFLAG_POLLING = (1 << 6), /* set nIEN to 1 and use polling */
|
||||
|
||||
/* struct ata_device stuff */
|
||||
ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */
|
||||
ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */
|
||||
ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */
|
||||
ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */
|
||||
ATA_DFLAG_FLUSH_EXT = (1 << 4), /* do FLUSH_EXT instead of FLUSH */
|
||||
ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */
|
||||
ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */
|
||||
ATA_DFLAG_AN = (1 << 7), /* AN configured */
|
||||
ATA_DFLAG_TRUSTED = (1 << 8), /* device supports trusted send/recv */
|
||||
ATA_DFLAG_FUA = (1 << 9), /* device supports FUA */
|
||||
ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */
|
||||
ATA_DFLAG_NCQ_SEND_RECV = (1 << 11), /* device supports NCQ SEND and RECV */
|
||||
ATA_DFLAG_NCQ_PRIO = (1 << 12), /* device supports NCQ priority */
|
||||
ATA_DFLAG_CDL = (1 << 13), /* supports cmd duration limits */
|
||||
ATA_DFLAG_CFG_MASK = (1 << 14) - 1,
|
||||
|
||||
ATA_DFLAG_PIO = (1 << 14), /* device limited to PIO mode */
|
||||
ATA_DFLAG_NCQ_OFF = (1 << 15), /* device limited to non-NCQ mode */
|
||||
ATA_DFLAG_SLEEPING = (1 << 16), /* device is sleeping */
|
||||
ATA_DFLAG_DUBIOUS_XFER = (1 << 17), /* data transfer not verified */
|
||||
ATA_DFLAG_NO_UNLOAD = (1 << 18), /* device doesn't support unload */
|
||||
ATA_DFLAG_UNLOCK_HPA = (1 << 19), /* unlock HPA */
|
||||
ATA_DFLAG_INIT_MASK = (1 << 20) - 1,
|
||||
|
||||
ATA_DFLAG_NCQ_PRIO_ENABLED = (1 << 20), /* Priority cmds sent to dev */
|
||||
ATA_DFLAG_CDL_ENABLED = (1 << 21), /* cmd duration limits is enabled */
|
||||
ATA_DFLAG_RESUMING = (1 << 22), /* Device is resuming */
|
||||
ATA_DFLAG_DETACH = (1 << 24),
|
||||
ATA_DFLAG_DETACHED = (1 << 25),
|
||||
ATA_DFLAG_DA = (1 << 26), /* device supports Device Attention */
|
||||
ATA_DFLAG_DEVSLP = (1 << 27), /* device supports Device Sleep */
|
||||
ATA_DFLAG_ACPI_DISABLED = (1 << 28), /* ACPI for the device is disabled */
|
||||
ATA_DFLAG_D_SENSE = (1 << 29), /* Descriptor sense requested */
|
||||
|
||||
ATA_DFLAG_FEATURES_MASK = (ATA_DFLAG_TRUSTED | ATA_DFLAG_DA | \
|
||||
ATA_DFLAG_DEVSLP | ATA_DFLAG_NCQ_SEND_RECV | \
|
||||
ATA_DFLAG_NCQ_PRIO | ATA_DFLAG_FUA | \
|
||||
ATA_DFLAG_CDL),
|
||||
|
||||
/* sturct ata_device class. */
|
||||
ATA_DEV_UNKNOWN = 0, /* unknown device */
|
||||
ATA_DEV_ATA = 1, /* ATA device */
|
||||
ATA_DEV_ATA_UNSUP = 2, /* ATA device (unsupported) */
|
||||
@@ -1418,9 +1428,6 @@ extern int ata_port_freeze(struct ata_port *ap);
|
||||
extern void ata_eh_freeze_port(struct ata_port *ap);
|
||||
extern void ata_eh_thaw_port(struct ata_port *ap);
|
||||
|
||||
extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
|
||||
extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
|
||||
|
||||
extern void ata_std_error_handler(struct ata_port *ap)
|
||||
__must_hold(&ap->host->eh_mutex);
|
||||
extern void ata_std_sched_eh(struct ata_port *ap);
|
||||
|
||||
@@ -129,6 +129,10 @@
|
||||
#define SAI_GET_LBA_STATUS 0x12
|
||||
#define SAI_REPORT_REFERRALS 0x13
|
||||
#define SAI_GET_STREAM_STATUS 0x16
|
||||
#define SAI_GET_PHYSICAL_ELEMENT_STATUS 0x17
|
||||
#define SAI_REMOVE_ELEMENT_AND_TRUNCATE 0x18
|
||||
#define SAI_RESTORE_ELEMENTS_AND_REBUILD 0x19
|
||||
#define SAI_REMOVE_ELEMENT_AND_MODIFY_ZONES 0x1a
|
||||
/* values for maintenance in */
|
||||
#define MI_REPORT_IDENTIFYING_INFORMATION 0x05
|
||||
#define MI_REPORT_TARGET_PGS 0x0a
|
||||
@@ -233,6 +237,57 @@ enum sam_status {
|
||||
#define MISCOMPARE 0x0e
|
||||
#define COMPLETED 0x0f
|
||||
|
||||
/*
|
||||
* Additional Sense Codes (ASC).
|
||||
*/
|
||||
#define NO_ADDITIONAL_SENSE 0x00
|
||||
#define OVERLAP_ATOMIC_COMMAND_ASC 0x00
|
||||
#define LOGICAL_UNIT_NOT_READY 0x04
|
||||
#define LOGICAL_UNIT_COMMUNICATION_FAILURE 0x8
|
||||
#define WRITE_ERROR_ASC 0x0c
|
||||
#define UNRECOVERED_READ_ERR 0x11
|
||||
#define PARAMETER_LIST_LENGTH_ERR 0x1a
|
||||
#define MISCOMPARE_VERIFY_ASC 0x1d
|
||||
#define INVALID_OPCODE 0x20
|
||||
#define LBA_OUT_OF_RANGE 0x21
|
||||
#define INVALID_FIELD_IN_CDB 0x24
|
||||
#define INVALID_FIELD_IN_PARAM_LIST 0x26
|
||||
#define WRITE_PROTECTED 0x27
|
||||
#define UA_READY_ASC 0x28
|
||||
#define UA_RESET_ASC 0x29
|
||||
#define UA_CHANGED_ASC 0x2a
|
||||
#define TOO_MANY_IN_PARTITION_ASC 0x3b
|
||||
#define TARGET_CHANGED_ASC 0x3f
|
||||
#define SAVING_PARAMS_UNSUP 0x39
|
||||
#define TRANSPORT_PROBLEM 0x4b
|
||||
#define INSUFF_RES_ASC 0x55
|
||||
#define LOW_POWER_COND_ON 0x5e
|
||||
#define THRESHOLD_EXCEEDED 0x5d
|
||||
|
||||
/*
|
||||
* Additional Sense Code Qualifiers (ASCQ).
|
||||
*/
|
||||
#define POWER_ON_RESET_ASCQ 0x00
|
||||
#define MODE_CHANGED_ASCQ 0x01 /* mode parameters changed */
|
||||
#define FILEMARK_DETECTED_ASCQ 0x01
|
||||
#define POWER_ON_OCCURRED_ASCQ 0x01
|
||||
#define MICROCODE_CHANGED_ASCQ 0x01 /* with TARGET_CHANGED_ASC */
|
||||
#define BUS_RESET_ASCQ 0x02 /* scsi bus reset occurred */
|
||||
#define EOP_EOM_DETECTED_ASCQ 0x02
|
||||
#define INSUFF_RES_ASCQ 0x03
|
||||
#define BEGINNING_OF_P_M_DETECTED_ASCQ 0x04
|
||||
#define UNALIGNED_WRITE_ASCQ 0x04
|
||||
#define EOD_DETECTED_ASCQ 0x05
|
||||
#define WRITE_BOUNDARY_ASCQ 0x05
|
||||
#define READ_INVDATA_ASCQ 0x06
|
||||
#define READ_BOUNDARY_ASCQ 0x07
|
||||
#define CAPACITY_CHANGED_ASCQ 0x09
|
||||
#define ATTEMPT_ACCESS_GAP 0x09
|
||||
#define LUNS_CHANGED_ASCQ 0x0e
|
||||
#define INSUFF_ZONE_ASCQ 0x0e
|
||||
#define MICROCODE_CHANGED_WO_RESET_ASCQ 0x16
|
||||
#define OVERLAP_ATOMIC_COMMAND_ASCQ 0x23
|
||||
|
||||
/*
|
||||
* DEVICE TYPES
|
||||
* Please keep them in 0x%02x format for $MODALIAS to work
|
||||
@@ -413,6 +468,25 @@ enum zbc_zone_alignment_method {
|
||||
ZBC_CONSTANT_ZONE_START_OFFSET = 0x8,
|
||||
};
|
||||
|
||||
/* SCSI physical element types */
|
||||
enum scsi_phys_element_type {
|
||||
SCSI_PHYS_ELEM_TYPE_ALL_ACCESS_STORAGE = 0x1,
|
||||
SCSI_PHYS_ELEM_TYPE_FRAC_ACCESS_STORAGE = 0x2,
|
||||
};
|
||||
|
||||
/* SCSI physical element health. */
|
||||
enum scsi_phys_element_health {
|
||||
SCSI_PHYS_ELEM_HEALTH_NOT_REPORTED = 0x00,
|
||||
SCSI_PHYS_ELEM_HEALTH_WITHIN_SPEC_LIMITS = 0x01,
|
||||
SCSI_PHYS_ELEM_HEALTH_AT_SPEC_LIMITS = 0x64,
|
||||
SCSI_PHYS_ELEM_HEALTH_OUTSIDE_SPEC_LIMITS = 0x65,
|
||||
SCSI_PHYS_ELEM_HEALTH_DEPOP_REVOKE_ERR = 0xFB,
|
||||
SCSI_PHYS_ELEM_HEALTH_DEPOP_REVOKE_IN_PROGRESS = 0xFC,
|
||||
SCSI_PHYS_ELEM_HEALTH_DEPOP_ERR = 0xFD,
|
||||
SCSI_PHYS_ELEM_HEALTH_DEPOP_IN_PROGRESS = 0xFE,
|
||||
SCSI_PHYS_ELEM_HEALTH_DEPOP_OK = 0xFF,
|
||||
};
|
||||
|
||||
/* Version descriptor values for INQUIRY */
|
||||
enum scsi_version_descriptor {
|
||||
SCSI_VERSION_DESCRIPTOR_FCP4 = 0x0a40,
|
||||
|
||||
Reference in New Issue
Block a user