2.4.28-pre libata updates
Subsystems (3)
PATCH 1/1 2.4.28-pre libata updates
Please do a
bk pull bk://kernel.bkbits.net/jgarzik/libata-upstream-2.4
This will update the following files:
drivers/scsi/ata_piix.c | 26 +- drivers/scsi/libata-core.c | 401 ++++++++++++++++++++++++++------------------ drivers/scsi/sata_nv.c | 66 ++----- drivers/scsi/sata_promise.c | 10 - drivers/scsi/sata_sil.c | 14 - drivers/scsi/sata_sis.c | 60 ++---- drivers/scsi/sata_svw.c | 76 +++++++- drivers/scsi/sata_sx4.c | 10 - drivers/scsi/sata_via.c | 55 ++---- drivers/scsi/sata_vsc.c | 10 - include/linux/compiler.h | 1 include/linux/libata.h | 40 ++-- 12 files changed, 428 insertions(+), 341 deletions(-)
through these ChangeSets:
<[email protected]> (04/09/14 1.1543.1.7)
[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.1543.1.6)
[libata] minor comment updates, preparing for iomap merge
<[email protected]> (04/09/13 1.1543.1.5)
[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.1543.1.4)
[libata] remove distinction between MMIO/PIO helper functions
Prepare for use of new generic iomap API.
<[email protected]> (04/09/13 1.1543.1.3)
[libata] resync with 2.6.x
Only whitespace changes.
<[email protected]> (04/09/13 1.1543.1.2)
linux/compiler.h: dummy __iomem macro (an sparse annotation)
<[email protected]> (04/09/13 1.1543.1.1)
libata: initial PCI memory annotations
drivers/scsi/ata_piix.c +13 -13
@@ -106,7 +106,7 @@ .name = DRV_NAME, .detect = ata_scsi_detect, .release = ata_scsi_release, - .ioctl = ata_scsi_ioctl, + .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, .eh_strategy_handler = ata_scsi_error, .can_queue = ATA_DEF_QUEUE,
@@ -126,15 +126,15 @@ .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, .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,
@@ -150,15 +150,15 @@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, .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 +237 -164
730 lines not on this page · raw message
drivers/scsi/sata_nv.c +22 -44
109 lines not on this page · raw message
drivers/scsi/sata_promise.c +5 -5
@@ -91,7 +91,7 @@ .name = DRV_NAME, .detect = ata_scsi_detect, .release = ata_scsi_release, - .ioctl = ata_scsi_ioctl, + .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, .eh_strategy_handler = ata_scsi_error, .can_queue = ATA_DEF_QUEUE,
@@ -109,8 +109,8 @@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, .phy_reset = pdc_phy_reset, .qc_prep = pdc_qc_prep,
@@ -470,7 +470,7 @@ {WARN_ON (tf->protocol ==ATA_PROT_DMA || tf->protocol ==ATA_PROT_NODATA ); -ata_tf_load_mmio (ap, tf); +ata_tf_load (ap, tf); }
@@ -478,7 +478,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 -7
@@ -108,7 +108,7 @@ .name = DRV_NAME, .detect = ata_scsi_detect, .release = ata_scsi_release, - .ioctl = ata_scsi_ioctl, + .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, .eh_strategy_handler = ata_scsi_error, .can_queue = ATA_DEF_QUEUE,
@@ -126,14 +126,14 @@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, .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 -38
106 lines not on this page · raw message
drivers/scsi/sata_svw.c +72 -4
102 lines not on this page · raw message
drivers/scsi/sata_sx4.c +5 -5
@@ -176,7 +176,7 @@ .name = DRV_NAME, .detect = ata_scsi_detect, .release = ata_scsi_release, - .ioctl = ata_scsi_ioctl, + .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, .eh_strategy_handler = ata_scsi_error, .can_queue = ATA_DEF_QUEUE,
@@ -194,8 +194,8 @@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, .phy_reset = pdc_20621_phy_reset, .qc_prep = pdc20621_qc_prep,
@@ -888,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); }
@@ -896,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 -35
96 lines not on this page · raw message
drivers/scsi/sata_vsc.c +5 -5
@@ -192,7 +192,7 @@ .name = DRV_NAME, .detect = ata_scsi_detect, .release = ata_scsi_release, - .ioctl = ata_scsi_ioctl, + .ioctl = ata_scsi_ioctl, .queuecommand = ata_scsi_queuecmd, .eh_strategy_handler = ata_scsi_error, .can_queue = ATA_DEF_QUEUE,
@@ -212,11 +212,11 @@ .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, .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/compiler.h +1 -0
@@ -37,5 +37,6 @@/* no checker support, so we unconditionally define this as (null) */ #define __user +#define __iomem#endif /* __LINUX_COMPILER_H */
include/linux/libata.h +19 -21
@@ -197,7 +197,7 @@unsigned long irq;unsigned int irq_flags;unsigned long host_flags; -void *mmio_base; +void __iomem *mmio_base;void *private_data; };
@@ -205,7 +205,7 @@spinlock_t lock;struct pci_dev *pdev;unsigned long irq; -void *mmio_base; +void __iomem *mmio_base;unsigned int n_ports;void *private_data;struct ata_port_operations *ops;
@@ -380,19 +380,19 @@/* * 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 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,
@@ -401,10 +401,8 @@ unsigned int n_elem);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);
@@ -433,7 +431,7 @@static inline u8 ata_chk_err (struct ata_port *ap) {if (ap->flags &ATA_FLAG_MMIO ) { -return readb ((void *) ap->ioaddr.error_addr); +return readb ((void __iomem *) ap->ioaddr.error_addr); }return inb (ap->ioaddr.error_addr); }
@@ -446,7 +444,7 @@static inline u8 ata_altstatus (struct ata_port *ap) {if (ap->flags &ATA_FLAG_MMIO ) -return readb (ap->ioaddr.altstatus_addr); +return readb ((void __iomem *)ap->ioaddr.altstatus_addr);return inb (ap->ioaddr.altstatus_addr); }
@@ -517,7 +515,7 @@ ap->last_ctl = ap->ctl;if (ap->flags &ATA_FLAG_MMIO ) -writeb (ap->ctl, ioaddr->ctl_addr); +writeb (ap->ctl, (void __iomem *) ioaddr->ctl_addr);else outb (ap->ctl, ioaddr->ctl_addr); tmp =ata_wait_idle (ap);
@@ -538,7 +536,7 @@/* get controller status; clear intr, err bits */ if (ap->flags &ATA_FLAG_MMIO ) { -void *mmio = (void *) ap->ioaddr.bmdma_addr; +void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; host_stat =readb (mmio +ATA_DMA_STATUS );writeb (host_stat |ATA_DMA_INTR |ATA_DMA_ERR , mmio +ATA_DMA_STATUS );
@@ -576,7 +574,7 @@static inline void ata_bmdma_stop (struct ata_port *ap) {if (ap->flags &ATA_FLAG_MMIO ) { -void *mmio = (void *) ap->ioaddr.bmdma_addr; +void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;/* clear start/stop bit */ writeb(readb(mmio + ATA_DMA_CMD) & ~ATA_DMA_START,
@@ -594,7 +592,7 @@static inline void ata_bmdma_ack_irq (struct ata_port *ap) {if (ap->flags &ATA_FLAG_MMIO ) { -void *mmio = ((void *) ap->ioaddr.bmdma_addr) +ATA_DMA_STATUS ; +void __iomem *mmio = ((void __iomem *) ap->ioaddr.bmdma_addr) +ATA_DMA_STATUS ;writeb (readb (mmio), mmio); }else {unsigned long addr = ap->ioaddr.bmdma_addr +ATA_DMA_STATUS ;
@@ -606,7 +604,7 @@ {u8 host_stat;if (ap->flags &ATA_FLAG_MMIO ) { -void *mmio = (void *) ap->ioaddr.bmdma_addr; +void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; host_stat =readb (mmio +ATA_DMA_STATUS ); }else host_stat =inb (ap->ioaddr.bmdma_addr +ATA_DMA_STATUS );