2.6.x libata update
PATCH 1/1 2.6.x libata update
Please do a
bk pull bk://gkernel.bkbits.net/libata-2.6
This will update the following files:
drivers/scsi/ata_piix.c | 26 +-- drivers/scsi/libata-core.c | 370 +++++++++++++++++++++++++++----------------- drivers/scsi/sata_nv.c | 67 ++----- drivers/scsi/sata_promise.c | 9 - drivers/scsi/sata_sil.c | 13 - drivers/scsi/sata_sis.c | 59 ++----- drivers/scsi/sata_svw.c | 75 ++++++++ drivers/scsi/sata_sx4.c | 11 - drivers/scsi/sata_via.c | 54 ++---- drivers/scsi/sata_vsc.c | 9 - include/linux/libata.h | 27 +-- 11 files changed, 418 insertions(+), 302 deletions(-)
through these ChangeSets:
<[email protected]> (04/09/16 1.1903)
[libata] add hook, and export functions needed for sata2 drivers
* add dev_select hook, and default/noop implementations
* export ata_dev_classify
* fix a couple bugs that cropped up when building with ATA_VERBOSE_DEBUG
* export __sata_phy_reset, a variant that does not call ata_bus_reset
<[email protected]> (04/09/14 1.1867.6.5)
[libata sata_svw] race condition fix, new device support
* address race condition WRT order of DMA-start and ATA command issue (see code comment for more details)
* Add support for Frodo 4/8
<[email protected]> (04/09/14 1.1867.6.4)
[libata] minor comment updates, preparing for iomap merge
<[email protected]> (04/09/13 1.1867.6.3)
[libata] consolidate legacy/native mode init code into helpers
Eliminates duplicate code in sata_nv, sata_sis, and sata_via.
<[email protected]> (04/09/13 1.1867.6.2)
[libata] remove distinction between MMIO/PIO helper functions
Prepare for use of new generic iomap API.
<[email protected]> (04/09/13 1.1867.6.1)
[libata sata_nv] sync with 2.4
Driver should be using LIBATA_MAX_PRD not ATA_MAX_PRD, due to iommu layer splitting.
drivers/scsi/ata_piix.c +14 -12
@@ -125,15 +125,16 @@ .set_piomode = piix_set_piomode, .set_dmamode = piix_set_dmamode, - .tf_load = ata_tf_load_pio, - .tf_read = ata_tf_read_pio, - .check_status = ata_check_status_pio, - .exec_command = ata_exec_command_pio, + .tf_load = ata_tf_load, + .tf_read = ata_tf_read, + .check_status = ata_check_status, + .exec_command = ata_exec_command, + .dev_select = ata_std_dev_select, .phy_reset = piix_pata_phy_reset, - .bmdma_setup = ata_bmdma_setup_pio, - .bmdma_start = ata_bmdma_start_pio, + .bmdma_setup = ata_bmdma_setup, + .bmdma_start = ata_bmdma_start, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot,
@@ -149,15 +150,16 @@static struct ata_port_operations piix_sata_ops = { .port_disable = ata_port_disable, - .tf_load = ata_tf_load_pio, - .tf_read = ata_tf_read_pio, - .check_status = ata_check_status_pio, - .exec_command = ata_exec_command_pio, + .tf_load = ata_tf_load, + .tf_read = ata_tf_read, + .check_status = ata_check_status, + .exec_command = ata_exec_command, + .dev_select = ata_std_dev_select, .phy_reset = piix_sata_phy_reset, - .bmdma_setup = ata_bmdma_setup_pio, - .bmdma_start = ata_bmdma_start_pio, + .bmdma_setup = ata_bmdma_setup, + .bmdma_start = ata_bmdma_start, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot,
drivers/scsi/libata-core.c +229 -141
734 lines not on this page · raw message
drivers/scsi/sata_nv.c +23 -44
110 lines not on this page · raw message
drivers/scsi/sata_promise.c +5 -4
@@ -107,9 +107,10 @@static struct ata_port_operations pdc_sata_ops = { .port_disable = ata_port_disable, .tf_load = pdc_tf_load_mmio, - .tf_read = ata_tf_read_mmio, - .check_status = ata_check_status_mmio, + .tf_read = ata_tf_read, + .check_status = ata_check_status, .exec_command = pdc_exec_command_mmio, + .dev_select = ata_std_dev_select, .phy_reset = pdc_phy_reset, .qc_prep = pdc_qc_prep, .qc_issue = pdc_qc_issue_prot,
@@ -468,7 +469,7 @@ {WARN_ON (tf->protocol ==ATA_PROT_DMA || tf->protocol ==ATA_PROT_NODATA ); -ata_tf_load_mmio (ap, tf); +ata_tf_load (ap, tf); }
@@ -476,7 +477,7 @@ {WARN_ON (tf->protocol ==ATA_PROT_DMA || tf->protocol ==ATA_PROT_NODATA ); -ata_exec_command_mmio (ap, tf); +ata_exec_command (ap, tf); }
drivers/scsi/sata_sil.c +7 -6
@@ -125,14 +125,15 @@static struct ata_port_operations sil_ops = { .port_disable = ata_port_disable, .dev_config = sil_dev_config, - .tf_load = ata_tf_load_mmio, - .tf_read = ata_tf_read_mmio, - .check_status = ata_check_status_mmio, - .exec_command = ata_exec_command_mmio, + .tf_load = ata_tf_load, + .tf_read = ata_tf_read, + .check_status = ata_check_status, + .exec_command = ata_exec_command, + .dev_select = ata_std_dev_select, .phy_reset = sata_phy_reset, .post_set_mode = sil_post_set_mode, - .bmdma_setup = ata_bmdma_setup_mmio, - .bmdma_start = ata_bmdma_start_mmio, + .bmdma_setup = ata_bmdma_setup, + .bmdma_start = ata_bmdma_start, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, .eng_timeout = ata_eng_timeout,
drivers/scsi/sata_sis.c +22 -37
99 lines not on this page · raw message
drivers/scsi/sata_svw.c +72 -3
95 lines not on this page · raw message
drivers/scsi/sata_sx4.c +6 -5
@@ -193,9 +193,10 @@static struct ata_port_operations pdc_20621_ops = { .port_disable = ata_port_disable, .tf_load = pdc_tf_load_mmio, - .tf_read = ata_tf_read_mmio, - .check_status = ata_check_status_mmio, + .tf_read = ata_tf_read, + .check_status = ata_check_status, .exec_command = pdc_exec_command_mmio, + .dev_select = ata_std_dev_select, .phy_reset = pdc_20621_phy_reset, .qc_prep = pdc20621_qc_prep, .qc_issue = pdc20621_qc_issue_prot,
@@ -533,7 +534,7 @@readl (dimm_mmio);/* MMIO PCI posting flush */ -VPRINTK ("ata pkt buf ofs %u, prd size %u, mmio copied\n" , i, sgt_len); +VPRINTK ("ata pkt buf ofs %u, mmio copied\n" , i); }static void pdc20621_qc_prep (struct ata_queued_cmd *qc)
@@ -887,7 +888,7 @@ {WARN_ON (tf->protocol ==ATA_PROT_DMA || tf->protocol ==ATA_PROT_NODATA ); -ata_tf_load_mmio (ap, tf); +ata_tf_load (ap, tf); }
@@ -895,7 +896,7 @@ {WARN_ON (tf->protocol ==ATA_PROT_DMA || tf->protocol ==ATA_PROT_NODATA ); -ata_exec_command_mmio (ap, tf); +ata_exec_command (ap, tf); }
drivers/scsi/sata_via.c +20 -34
89 lines not on this page · raw message
drivers/scsi/sata_vsc.c +5 -4
@@ -211,11 +211,12 @@ .port_disable = ata_port_disable, .tf_load = vsc_sata_tf_load, .tf_read = vsc_sata_tf_read, - .exec_command = ata_exec_command_mmio, - .check_status = ata_check_status_mmio, + .exec_command = ata_exec_command, + .check_status = ata_check_status, + .dev_select = ata_std_dev_select, .phy_reset = sata_phy_reset, - .bmdma_setup = ata_bmdma_setup_mmio, - .bmdma_start = ata_bmdma_start_mmio, + .bmdma_setup = ata_bmdma_setup, + .bmdma_start = ata_bmdma_start, .qc_prep = ata_qc_prep, .qc_issue = ata_qc_issue_prot, .eng_timeout = ata_eng_timeout,
include/linux/libata.h +15 -12
@@ -320,6 +320,7 @@void (*exec_command)(struct ata_port *ap,struct ata_taskfile *tf);u8 (*check_status)(struct ata_port *ap); +void (*dev_select)(struct ata_port *ap,unsigned int device);void (*phy_reset) (struct ata_port *ap);void (*post_set_mode) (struct ata_port *ap);
@@ -362,6 +363,7 @@ };extern void ata_port_probe (struct ata_port *); +extern void __sata_phy_reset (struct ata_port *ap);extern void sata_phy_reset (struct ata_port *ap);extern void ata_bus_reset (struct ata_port *ap);extern void ata_port_disable (struct ata_port *);
@@ -379,31 +381,32 @@/* * Default driver ops implementations */ -extern void ata_tf_load_pio (struct ata_port *ap,struct ata_taskfile *tf); -extern void ata_tf_load_mmio (struct ata_port *ap,struct ata_taskfile *tf); -extern void ata_tf_read_pio (struct ata_port *ap,struct ata_taskfile *tf); -extern void ata_tf_read_mmio (struct ata_port *ap,struct ata_taskfile *tf); +extern void ata_tf_load (struct ata_port *ap,struct ata_taskfile *tf); +extern void ata_tf_read (struct ata_port *ap,struct ata_taskfile *tf);extern void ata_tf_to_fis (struct ata_taskfile *tf,u8 *fis,u8 pmp);extern void ata_tf_from_fis (u8 *fis,struct ata_taskfile *tf); -extern u8 ata_check_status_pio (struct ata_port *ap); -extern u8 ata_check_status_mmio (struct ata_port *ap); -extern void ata_exec_command_pio (struct ata_port *ap,struct ata_taskfile *tf); -extern void ata_exec_command_mmio (struct ata_port *ap,struct ata_taskfile *tf); +extern void ata_noop_dev_select (struct ata_port *ap,unsigned int device); +extern void ata_std_dev_select (struct ata_port *ap,unsigned int device); +extern u8 ata_check_status (struct ata_port *ap); +extern void ata_exec_command (struct ata_port *ap,struct ata_taskfile *tf);extern int ata_port_start (struct ata_port *ap);extern void ata_port_stop (struct ata_port *ap);extern irqreturn_t ata_interrupt (int irq,void *dev_instance,struct pt_regs *regs); +extern struct ata_probe_ent * +ata_pci_init_native_mode (struct pci_dev *pdev,struct ata_port_info **port); +extern struct ata_probe_ent * +ata_pci_init_legacy_mode (struct pci_dev *pdev,struct ata_port_info **port);extern void ata_qc_prep (struct ata_queued_cmd *qc);extern int ata_qc_issue_prot (struct ata_queued_cmd *qc);extern void ata_sg_init_one (struct ata_queued_cmd *qc,void *buf,unsigned int buflen);extern void ata_sg_init (struct ata_queued_cmd *qc,struct scatterlist *sg,unsigned int n_elem); +extern unsigned int ata_dev_classify (struct ata_taskfile *tf);extern void ata_dev_id_string (struct ata_device *dev,unsigned char *s,unsigned int ofs,unsigned int len); -extern void ata_bmdma_setup_mmio (struct ata_queued_cmd *qc); -extern void ata_bmdma_start_mmio (struct ata_queued_cmd *qc); -extern void ata_bmdma_setup_pio (struct ata_queued_cmd *qc); -extern void ata_bmdma_start_pio (struct ata_queued_cmd *qc); +extern void ata_bmdma_setup (struct ata_queued_cmd *qc); +extern void ata_bmdma_start (struct ata_queued_cmd *qc);extern void ata_bmdma_irq_clear (struct ata_port *ap);extern int pci_test_config_bits (struct pci_dev *pdev,struct pci_bits *bits);extern void ata_qc_complete (struct ata_queued_cmd *qc,u8 drv_stat);