ata fixes for 6.5-rc4

- Fix error message output in the pata_arasan_cf driver (Minjie).
 
  - Fix invalid error return in the pata_octeon_cf driver initialization
    (Yingliang).
 
  - Fix a compilation warning due to a missing static function
    declaration in the pata_ns87415 driver (Arnd).
 
  - Fix the condition evaluating when to fetch sense data for successful
    completions, which should be done only when command duration limits
    are being used (Niklas).
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSRPv8tYSvhwAzJdzjdoc3SxdoYdgUCZMRjYwAKCRDdoc3SxdoY
 diudAP909al9o4HjzwfwP8SMUs3eoWPxK7EPlRG1p1CiamJ0OQEA/Ua78mS+eNNE
 Zu3Q3LFrrwc/jYdlaFyQBnMq2Mos8QE=
 =9Sh7
 -----END PGP SIGNATURE-----

Merge tag 'ata-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata

Pull ata fixes from Damien Le Moal:

 - Fix error message output in the pata_arasan_cf driver (Minjie)

 - Fix invalid error return in the pata_octeon_cf driver initialization
   (Yingliang)

 - Fix a compilation warning due to a missing static function
   declaration in the pata_ns87415 driver (Arnd)

 - Fix the condition evaluating when to fetch sense data for successful
   completions, which should be done only when command duration limits
   are being used (Niklas)

* tag 'ata-6.5-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
  ata: libata-core: fix when to fetch sense data for successful commands
  ata: pata_ns87415: mark ns87560_tf_read static
  ata: pata_octeon_cf: fix error return code in octeon_cf_probe()
  ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer()
This commit is contained in:
Linus Torvalds 2023-07-28 18:31:18 -07:00
commit ffabf7c731
4 changed files with 8 additions and 7 deletions

View File

@ -4938,8 +4938,8 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
if (qc->result_tf.status & ATA_SENSE &&
((ata_is_ncq(qc->tf.protocol) &&
dev->flags & ATA_DFLAG_CDL_ENABLED) ||
(!(ata_is_ncq(qc->tf.protocol) &&
ata_id_sense_reporting_enabled(dev->id))))) {
(!ata_is_ncq(qc->tf.protocol) &&
ata_id_sense_reporting_enabled(dev->id)))) {
/*
* Tell SCSI EH to not overwrite scmd->result even if
* this command is finished with result SAM_STAT_GOOD.

View File

@ -529,7 +529,8 @@ static void data_xfer(struct work_struct *work)
/* dma_request_channel may sleep, so calling from process context */
acdev->dma_chan = dma_request_chan(acdev->host->dev, "data");
if (IS_ERR(acdev->dma_chan)) {
dev_err(acdev->host->dev, "Unable to get dma_chan\n");
dev_err_probe(acdev->host->dev, PTR_ERR(acdev->dma_chan),
"Unable to get dma_chan\n");
acdev->dma_chan = NULL;
goto chan_request_fail;
}

View File

@ -260,7 +260,7 @@ static u8 ns87560_check_status(struct ata_port *ap)
* LOCKING:
* Inherited from caller.
*/
void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
static void ns87560_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
{
struct ata_ioports *ioaddr = &ap->ioaddr;

View File

@ -815,8 +815,8 @@ static int octeon_cf_probe(struct platform_device *pdev)
irq_handler_t irq_handler = NULL;
void __iomem *base;
struct octeon_cf_port *cf_port;
int rv = -ENOMEM;
u32 bus_width;
int rv;
node = pdev->dev.of_node;
if (node == NULL)
@ -893,12 +893,12 @@ static int octeon_cf_probe(struct platform_device *pdev)
cs0 = devm_ioremap(&pdev->dev, res_cs0->start,
resource_size(res_cs0));
if (!cs0)
return rv;
return -ENOMEM;
/* allocate host */
host = ata_host_alloc(&pdev->dev, 1);
if (!host)
return rv;
return -ENOMEM;
ap = host->ports[0];
ap->private_data = cf_port;