mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
for-5.3/libata-20190708
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl0jrJYQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgph+gEADWLWfSuVlLlhtihYHHDRRzSuxE6VlIDtVi d/y/aRv12qoJ7DZS4/dXN74luWfF3bS3gagu9nNAcfqd8ZqmpylGD1HTrU2tyj4I 9RgHIhDv4bTDJjjhp1LCk/K384Ayk6X/0I9KuM36V85+tOsJk1LW/KOeix4IcAwb 7/a49IhANBILp210zttIYu2vJLUjRAT8DLoF1Cb+jnu79sjAGNUpAnBwhgwCjMWp 66bFOwXtfQZAEfkglIQPNdR/aOsUzhAGl/FnFQ961HPkeleVQKpVjL+1rtUsv9k2 p5b00oDAx5D66/ILpfgRSZ/4h/ZqpL/PZBSJ4jfSCIOKaiPGt7AffVeGE5N/VTG6 qsAq9YW5Ew/CIR6beUOR7RGvr3LXx5Q7TBTx/GE75hgk95uMbS4arcVeOh87+7/F eJm9Xl1wcGm36OCxVvjBSLgfs4fgJrkhF3GlhmS6PPjEH9zeYo+uKJZ3AIcOMXv9 8nxoO4tzlkY4emTG7ccytsRUxIZZLP/1oYT/3S7h1GtKYCRHJAm0gs8k9MyH+ZVp UpA4sSWugaD+f9yP/4AU+L8vhxVDa0eWOuVOm0sjwJNXIYY1Kwik1FxzgzlUkkyP 78a3ugxQHz8OUpd5rJREcw4bPigL8dsDfsKEf78DdBtkZ3aNgpCQz1fNenC08+eR mwc1K+MQBg== =nbLD -----END PGP SIGNATURE----- Merge tag 'for-5.3/libata-20190708' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "These are the changes that are reviewed, tested, and queued up for this merge window. This contains: - Removal of redundant memset after dmam_alloc_coherent (Fuqian) - Expand blacklist check for ST1000LM024, making it independent of firmware version (Hans) - Request sense fix (Tejun) - ahci_sunxi FIFO fix (Uenal)" * tag 'for-5.3/libata-20190708' of git://git.kernel.dk/linux-block: drivers: ata: ahci_sunxi: Increased SATA/AHCI DMA TX/RX FIFOs libata: Drop firmware version check from the ST1000LM024 quirk ata: sata_sil24: Remove call to memset after dmam_alloc_coherent ata:sata_qstor: Remove call to memset after dmam_alloc_coherent ata: sata_nv: Remove call to memset after dmam_alloc_coherent ata: pdc_adma: Remove call to memset after dmam_alloc_coherent ata: libahci: Remove call to memset after dmam_alloc_coherent ata: acard-ahci: Remove call to memset after dmam_alloc_coherent libata: don't request sense data on !ZAC ATA devices
This commit is contained in:
commit
cdc5ffc410
@ -344,7 +344,6 @@ static int acard_ahci_port_start(struct ata_port *ap)
|
||||
mem = dmam_alloc_coherent(dev, dma_sz, &mem_dma, GFP_KERNEL);
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
memset(mem, 0, dma_sz);
|
||||
|
||||
/*
|
||||
* First item in chunk of DMA memory: 32-slot command table,
|
||||
|
@ -149,8 +149,51 @@ static void ahci_sunxi_start_engine(struct ata_port *ap)
|
||||
void __iomem *port_mmio = ahci_port_base(ap);
|
||||
struct ahci_host_priv *hpriv = ap->host->private_data;
|
||||
|
||||
/* Setup DMA before DMA start */
|
||||
sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ff00, 0x00004400);
|
||||
/* Setup DMA before DMA start
|
||||
*
|
||||
* NOTE: A similar SoC with SATA/AHCI by Texas Instruments documents
|
||||
* this Vendor Specific Port (P0DMACR, aka PxDMACR) in its
|
||||
* User's Guide document (TMS320C674x/OMAP-L1x Processor
|
||||
* Serial ATA (SATA) Controller, Literature Number: SPRUGJ8C,
|
||||
* March 2011, Chapter 4.33 Port DMA Control Register (P0DMACR),
|
||||
* p.68, https://www.ti.com/lit/ug/sprugj8c/sprugj8c.pdf)
|
||||
* as equivalent to the following struct:
|
||||
*
|
||||
* struct AHCI_P0DMACR_t
|
||||
* {
|
||||
* unsigned TXTS : 4;
|
||||
* unsigned RXTS : 4;
|
||||
* unsigned TXABL : 4;
|
||||
* unsigned RXABL : 4;
|
||||
* unsigned Reserved : 16;
|
||||
* };
|
||||
*
|
||||
* TXTS: Transmit Transaction Size (TX_TRANSACTION_SIZE).
|
||||
* This field defines the DMA transaction size in DWORDs for
|
||||
* transmit (system bus read, device write) operation. [...]
|
||||
*
|
||||
* RXTS: Receive Transaction Size (RX_TRANSACTION_SIZE).
|
||||
* This field defines the Port DMA transaction size in DWORDs
|
||||
* for receive (system bus write, device read) operation. [...]
|
||||
*
|
||||
* TXABL: Transmit Burst Limit.
|
||||
* This field allows software to limit the VBUSP master read
|
||||
* burst size. [...]
|
||||
*
|
||||
* RXABL: Receive Burst Limit.
|
||||
* Allows software to limit the VBUSP master write burst
|
||||
* size. [...]
|
||||
*
|
||||
* Reserved: Reserved.
|
||||
*
|
||||
*
|
||||
* NOTE: According to the above document, the following alternative
|
||||
* to the code below could perhaps be a better option
|
||||
* (or preparation) for possible further improvements later:
|
||||
* sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ffff,
|
||||
* 0x00000033);
|
||||
*/
|
||||
sunxi_clrsetbits(hpriv->mmio + AHCI_P0DMACR, 0x0000ffff, 0x00004433);
|
||||
|
||||
/* Start DMA */
|
||||
sunxi_setbits(port_mmio + PORT_CMD, PORT_CMD_START);
|
||||
|
@ -2365,7 +2365,6 @@ static int ahci_port_start(struct ata_port *ap)
|
||||
mem = dmam_alloc_coherent(dev, dma_sz, &mem_dma, GFP_KERNEL);
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
memset(mem, 0, dma_sz);
|
||||
|
||||
/*
|
||||
* First item in chunk of DMA memory: 32-slot command table,
|
||||
|
@ -4462,9 +4462,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
||||
|
||||
/* drives which fail FPDMA_AA activation (some may freeze afterwards)
|
||||
the ST disks also have LPM issues */
|
||||
{ "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA |
|
||||
ATA_HORKAGE_NOLPM, },
|
||||
{ "ST1000LM024 HN-M101MBB", "2BA30001", ATA_HORKAGE_BROKEN_FPDMA_AA |
|
||||
{ "ST1000LM024 HN-M101MBB", NULL, ATA_HORKAGE_BROKEN_FPDMA_AA |
|
||||
ATA_HORKAGE_NOLPM, },
|
||||
{ "VB0250EAVER", "HPG7", ATA_HORKAGE_BROKEN_FPDMA_AA },
|
||||
|
||||
|
@ -1469,7 +1469,7 @@ static int ata_eh_read_log_10h(struct ata_device *dev,
|
||||
tf->hob_lbah = buf[10];
|
||||
tf->nsect = buf[12];
|
||||
tf->hob_nsect = buf[13];
|
||||
if (ata_id_has_ncq_autosense(dev->id))
|
||||
if (dev->class == ATA_DEV_ZAC && ata_id_has_ncq_autosense(dev->id))
|
||||
tf->auxiliary = buf[14] << 16 | buf[15] << 8 | buf[16];
|
||||
|
||||
return 0;
|
||||
@ -1716,7 +1716,8 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
|
||||
memcpy(&qc->result_tf, &tf, sizeof(tf));
|
||||
qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
|
||||
qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ;
|
||||
if ((qc->result_tf.command & ATA_SENSE) || qc->result_tf.auxiliary) {
|
||||
if (dev->class == ATA_DEV_ZAC &&
|
||||
((qc->result_tf.command & ATA_SENSE) || qc->result_tf.auxiliary)) {
|
||||
char sense_key, asc, ascq;
|
||||
|
||||
sense_key = (qc->result_tf.auxiliary >> 16) & 0xff;
|
||||
@ -1770,10 +1771,11 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
|
||||
}
|
||||
|
||||
switch (qc->dev->class) {
|
||||
case ATA_DEV_ATA:
|
||||
case ATA_DEV_ZAC:
|
||||
if (stat & ATA_SENSE)
|
||||
ata_eh_request_sense(qc, qc->scsicmd);
|
||||
/* fall through */
|
||||
case ATA_DEV_ATA:
|
||||
if (err & ATA_ICRC)
|
||||
qc->err_mask |= AC_ERR_ATA_BUS;
|
||||
if (err & (ATA_UNC | ATA_AMNF))
|
||||
|
@ -550,7 +550,6 @@ static int adma_port_start(struct ata_port *ap)
|
||||
(u32)pp->pkt_dma);
|
||||
return -ENOMEM;
|
||||
}
|
||||
memset(pp->pkt, 0, ADMA_PKT_BYTES);
|
||||
ap->private_data = pp;
|
||||
adma_reinit_engine(ap);
|
||||
return 0;
|
||||
|
@ -1136,7 +1136,6 @@ static int nv_adma_port_start(struct ata_port *ap)
|
||||
&mem_dma, GFP_KERNEL);
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
memset(mem, 0, NV_ADMA_PORT_PRIV_DMA_SZ);
|
||||
|
||||
/*
|
||||
* First item in chunk of DMA memory:
|
||||
@ -1946,7 +1945,6 @@ static int nv_swncq_port_start(struct ata_port *ap)
|
||||
&pp->prd_dma, GFP_KERNEL);
|
||||
if (!pp->prd)
|
||||
return -ENOMEM;
|
||||
memset(pp->prd, 0, ATA_PRD_TBL_SZ * ATA_MAX_QUEUE);
|
||||
|
||||
ap->private_data = pp;
|
||||
pp->sactive_block = ap->ioaddr.scr_addr + 4 * SCR_ACTIVE;
|
||||
|
@ -477,7 +477,6 @@ static int qs_port_start(struct ata_port *ap)
|
||||
GFP_KERNEL);
|
||||
if (!pp->pkt)
|
||||
return -ENOMEM;
|
||||
memset(pp->pkt, 0, QS_PKT_BYTES);
|
||||
ap->private_data = pp;
|
||||
|
||||
qs_enter_reg_mode(ap);
|
||||
|
@ -1202,7 +1202,6 @@ static int sil24_port_start(struct ata_port *ap)
|
||||
cb = dmam_alloc_coherent(dev, cb_size, &cb_dma, GFP_KERNEL);
|
||||
if (!cb)
|
||||
return -ENOMEM;
|
||||
memset(cb, 0, cb_size);
|
||||
|
||||
pp->cmd_block = cb;
|
||||
pp->cmd_block_dma = cb_dma;
|
||||
|
Loading…
Reference in New Issue
Block a user