Skip to content

Commit

Permalink
Merge tag 'ata-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/dlemoal/libata

Pull ATA updates from Damien Le Moal:

 - Small cleanup of the pata_octeon driver to drop a useless platform
   callback (Uwe)

 - Simplify ata_scsi_cmd_error_handler() code using the fact that
   ap->ops->error_handler is NULL most of the time (Wenchao)

 - Several patches improving libata error handling. This is in
   preparation for supporting the command duration limits (CDL) feature.
   The changes allow handling corner cases of ATA NCQ errors which do
   not happen with regular drives but will be triggered with CDL drives
   (Niklas)

 - Simplify the qc_fill_rtf operation (me)

 - Improve SCSI command translation for REPORT_SUPPORTED_OPERATION_CODES
   command (me)

 - Cleanup of libata FUA handling.

   This falls short of enabling FUA for ATA drives that support it by
   default as there were concerns that old drives would break. The
   series however fixes several issues with the FUA support to ensure
   that FUA is reported as being supported only for drives that can
   handle all possible write cases (NCQ and non-NCQ). A check in the
   block layer is also added to ensure that we never see read FUA
   commands (current behavior) (me)

 - Several patches to move the old PARIDE (parallel port IDE) driver to
   libata as pata_parport. Given that this driver also needs protocol
   modules, the driver code resides in its own pata_parport directoy
   under drivers/ata (Ondrej)

* tag 'ata-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
  ata: pata_parport: Fix ida_alloc return value error check
  drivers/block: Move PARIDE protocol modules to drivers/ata/pata_parport
  drivers/block: Remove PARIDE core and high-level protocols
  ata: pata_parport: add driver (PARIDE replacement)
  ata: libata: exclude FUA support for known buggy drives
  ata: libata: Fix FUA handling in ata_build_rw_tf()
  ata: libata: cleanup fua support detection
  ata: libata: Rename and cleanup ata_rwcmd_protocol()
  ata: libata: Introduce ata_ncq_supported()
  block: add a sanity check for non-write flush/fua bios
  ata: libata-scsi: improve ata_scsiop_maint_in()
  ata: libata-scsi: do not overwrite SCSI ML and status bytes
  ata: libata: move NCQ related ATA_DFLAGs
  ata: libata: respect successfully completed commands during errors
  ata: libata: read the shared status for successful NCQ commands once
  ata: libata: simplify qc_fill_rtf port operation interface
  ata: scsi: rename flag ATA_QCFLAG_FAILED to ATA_QCFLAG_EH
  ata: libata-eh: Cleanup ata_scsi_cmd_error_handler()
  ata: octeon: Drop empty platform remove function
  • Loading branch information
torvalds committed Feb 22, 2023
2 parents f0b2769 + 8844f0a commit 6861eaf
Show file tree
Hide file tree
Showing 58 changed files with 1,483 additions and 6,742 deletions.
388 changes: 78 additions & 310 deletions Documentation/admin-guide/blockdev/paride.rst

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Documentation/admin-guide/kernel-parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ parameter is applicable::
NFS Appropriate NFS support is enabled.
OF Devicetree is enabled.
PV_OPS A paravirtualized kernel is enabled.
PARIDE The ParIDE (parallel port IDE) subsystem is enabled.
PARISC The PA-RISC architecture is enabled.
PCI PCI bus support is enabled.
PCIE PCI Express support is enabled.
Expand Down
19 changes: 3 additions & 16 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,9 @@
* [no]setxfer: Indicate if transfer speed mode setting
should be skipped.

* [no]fua: Disable or enable FUA (Force Unit Access)
support for devices supporting this feature.

* dump_id: Dump IDENTIFY data.

* disable: Disable this device.
Expand Down Expand Up @@ -4114,10 +4117,6 @@

pcbit= [HW,ISDN]

pcd. [PARIDE]
See header of drivers/block/paride/pcd.c.
See also Documentation/admin-guide/blockdev/paride.rst.

pci=option[,option...] [PCI] various PCI subsystem options.

Some options herein operate on a specific device
Expand Down Expand Up @@ -4380,9 +4379,6 @@
for debug and development, but should not be
needed on a platform with proper driver support.

pd. [PARIDE]
See Documentation/admin-guide/blockdev/paride.rst.

pdcchassis= [PARISC,HW] Disable/Enable PDC Chassis Status codes at
boot time.
Format: { 0 | 1 }
Expand All @@ -4395,12 +4391,6 @@
allocator. This parameter is primarily for debugging
and performance comparison.

pf. [PARIDE]
See Documentation/admin-guide/blockdev/paride.rst.

pg. [PARIDE]
See Documentation/admin-guide/blockdev/paride.rst.

pirq= [SMP,APIC] Manual mp-table setup
See Documentation/x86/i386/IO-APIC.rst.

Expand Down Expand Up @@ -4562,9 +4552,6 @@

pstore.backend= Specify the name of the pstore backend to use

pt. [PARIDE]
See Documentation/admin-guide/blockdev/paride.rst.

pti= [X86-64] Control Page Table Isolation of user and
kernel address spaces. Disabling this feature
removes hardening, but improves performance of
Expand Down
7 changes: 0 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -15770,13 +15770,6 @@ F: arch/*/include/asm/paravirt*.h
F: arch/*/kernel/paravirt*
F: include/linux/hypervisor.h

PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES
M: Tim Waugh <tim@cyberelk.net>
L: linux-parport@lists.infradead.org (subscribers-only)
S: Maintained
F: Documentation/admin-guide/blockdev/paride.rst
F: drivers/block/paride/

PARISC ARCHITECTURE
M: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
M: Helge Deller <deller@gmx.de>
Expand Down
14 changes: 9 additions & 5 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,16 @@ void submit_bio_noacct(struct bio *bio)
* Filter flush bio's early so that bio based drivers without flush
* support don't have to worry about them.
*/
if (op_is_flush(bio->bi_opf) &&
!test_bit(QUEUE_FLAG_WC, &q->queue_flags)) {
bio->bi_opf &= ~(REQ_PREFLUSH | REQ_FUA);
if (!bio_sectors(bio)) {
status = BLK_STS_OK;
if (op_is_flush(bio->bi_opf)) {
if (WARN_ON_ONCE(bio_op(bio) != REQ_OP_WRITE &&
bio_op(bio) != REQ_OP_ZONE_APPEND))
goto end_io;
if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags)) {
bio->bi_opf &= ~(REQ_PREFLUSH | REQ_FUA);
if (!bio_sectors(bio)) {
status = BLK_STS_OK;
goto end_io;
}
}
}

Expand Down
1 change: 0 additions & 1 deletion drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ obj-$(CONFIG_DIO) += dio/
obj-$(CONFIG_SBUS) += sbus/
obj-$(CONFIG_ZORRO) += zorro/
obj-$(CONFIG_ATA_OVER_ETH) += block/aoe/
obj-$(CONFIG_PARIDE) += block/paride/
obj-$(CONFIG_TC) += tc/
obj-$(CONFIG_USB_PHY) += usb/
obj-$(CONFIG_USB) += usb/
Expand Down
14 changes: 14 additions & 0 deletions drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,20 @@ config PATA_WINBOND_VLB
Support for the Winbond W83759A controller on Vesa Local Bus
systems.

config PATA_PARPORT
tristate "Parallel port IDE device support"
depends on PARPORT_PC
help
There are many external CD-ROM and disk devices that connect through
your computer's parallel port. Most of them are actually IDE devices
using a parallel port IDE adapter. This option enables the
PATA_PARPORT subsystem which contains drivers for many of these
external drives.
Read <file:Documentation/admin-guide/blockdev/paride.rst> for more
information.

source "drivers/ata/pata_parport/Kconfig"

comment "Generic fallback / legacy drivers"

config PATA_ACPI
Expand Down
2 changes: 2 additions & 0 deletions drivers/ata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o

obj-$(CONFIG_PATA_PXA) += pata_pxa.o

obj-$(CONFIG_PATA_PARPORT) += pata_parport/

# Should be last but two libata driver
obj-$(CONFIG_PATA_ACPI) += pata_acpi.o
# Should be last but one libata driver
Expand Down
8 changes: 3 additions & 5 deletions drivers/ata/acard-ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct acard_sg {
};

static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc);
static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
static void acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
static int acard_ahci_port_start(struct ata_port *ap);
static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);

Expand Down Expand Up @@ -248,7 +248,7 @@ static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc)
return AC_ERR_OK;
}

static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc)
static void acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc)
{
struct ahci_port_priv *pp = qc->ap->private_data;
u8 *rx_fis = pp->rx_fis;
Expand All @@ -263,13 +263,11 @@ static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc)
* Setup FIS.
*/
if (qc->tf.protocol == ATA_PROT_PIO && qc->dma_dir == DMA_FROM_DEVICE &&
!(qc->flags & ATA_QCFLAG_FAILED)) {
!(qc->flags & ATA_QCFLAG_EH)) {
ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf);
qc->result_tf.status = (rx_fis + RX_FIS_PIO_SETUP)[15];
} else
ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf);

return true;
}

static int acard_ahci_port_start(struct ata_port *ap)
Expand Down
6 changes: 0 additions & 6 deletions drivers/ata/ahci_octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ static int ahci_octeon_probe(struct platform_device *pdev)
return 0;
}

static int ahci_octeon_remove(struct platform_device *pdev)
{
return 0;
}

static const struct of_device_id octeon_ahci_match[] = {
{ .compatible = "cavium,octeon-7130-sata-uctl", },
{ /* sentinel */ }
Expand All @@ -86,7 +81,6 @@ MODULE_DEVICE_TABLE(of, octeon_ahci_match);

static struct platform_driver ahci_octeon_driver = {
.probe = ahci_octeon_probe,
.remove = ahci_octeon_remove,
.driver = {
.name = "octeon-ahci",
.of_match_table = octeon_ahci_match,
Expand Down
Loading

0 comments on commit 6861eaf

Please sign in to comment.