libata updates
Subsystems (2)
PATCH 1/1 libata updates
No major 2.6.29 fixes have cropped up so far, since release.
Summary, nothing highly notable:
- sata_mv: large update, include ATAPI support (previously thought impossible)
- core updates from Alan that should help with error handling on SFF hardware
- large "magic number" -> "named constant" cleanup
- other minor updates, see shortlog below
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus
to receive the following updates:
drivers/ata/ahci.c | 31 +- drivers/ata/ata_generic.c | 4 +- drivers/ata/ata_piix.c | 60 ++-- drivers/ata/libata-core.c | 14 +- drivers/ata/libata-eh.c | 19 +- drivers/ata/libata-sff.c | 91 ++++- drivers/ata/libata.h | 2 - drivers/ata/pata_acpi.c | 6 +- drivers/ata/pata_ali.c | 28 +- drivers/ata/pata_amd.c | 70 ++-- drivers/ata/pata_artop.c | 49 ++- drivers/ata/pata_at32.c | 4 +- drivers/ata/pata_atiixp.c | 6 +- drivers/ata/pata_bf54x.c | 2 +- drivers/ata/pata_cmd640.c | 2 +- drivers/ata/pata_cmd64x.c | 24 +- drivers/ata/pata_cs5520.c | 2 +- drivers/ata/pata_cs5530.c | 8 +- drivers/ata/pata_cs5535.c | 4 +- drivers/ata/pata_cs5536.c | 4 +- drivers/ata/pata_cypress.c | 4 +- drivers/ata/pata_efar.c | 6 +- drivers/ata/pata_hpt366.c | 4 +- drivers/ata/pata_hpt37x.c | 28 +- drivers/ata/pata_hpt3x2n.c | 4 +- drivers/ata/pata_hpt3x3.c | 6 +- drivers/ata/pata_icside.c | 4 +- drivers/ata/pata_isapnp.c | 14 +- drivers/ata/pata_it8213.c | 4 +- drivers/ata/pata_it821x.c | 16 +- drivers/ata/pata_ixp4xx_cf.c | 2 +- drivers/ata/pata_jmicron.c | 4 +- drivers/ata/pata_legacy.c | 2 +- drivers/ata/pata_marvell.c | 8 +- drivers/ata/pata_mpc52xx.c | 4 +- drivers/ata/pata_mpiix.c | 2 +- drivers/ata/pata_netcell.c | 4 +- drivers/ata/pata_ninja32.c | 2 +- drivers/ata/pata_ns87410.c | 2 +- drivers/ata/pata_ns87415.c | 8 +- drivers/ata/pata_octeon_cf.c | 4 +- drivers/ata/pata_oldpiix.c | 4 +- drivers/ata/pata_opti.c | 2 +- drivers/ata/pata_optidma.c | 10 +- drivers/ata/pata_pcmcia.c | 36 ++- drivers/ata/pata_pdc2027x.c | 12 +- drivers/ata/pata_pdc202xx_old.c | 12 +- drivers/ata/pata_qdi.c | 4 +- drivers/ata/pata_radisys.c | 6 +- drivers/ata/pata_rb532_cf.c | 64 +--- drivers/ata/pata_rz1000.c | 2 +- drivers/ata/pata_sc1200.c | 35 ++- drivers/ata/pata_scc.c | 4 +- drivers/ata/pata_sch.c | 6 +- drivers/ata/pata_serverworks.c | 20 +- drivers/ata/pata_sil680.c | 8 +- drivers/ata/pata_sis.c | 32 +- drivers/ata/pata_sl82c105.c | 6 +- drivers/ata/pata_triflex.c | 4 +- drivers/ata/pata_via.c | 24 +- drivers/ata/pata_winbond.c | 2 +- drivers/ata/pdc_adma.c | 4 +- drivers/ata/sata_fsl.c | 4 +- drivers/ata/sata_inic162x.c | 4 +- drivers/ata/sata_mv.c | 868 +++++++++++++++++++++++++++++++++------ drivers/ata/sata_nv.c | 7 +- drivers/ata/sata_promise.c | 30 +- drivers/ata/sata_qstor.c | 3 +- drivers/ata/sata_sil.c | 16 +- drivers/ata/sata_sil24.c | 18 +- drivers/ata/sata_sis.c | 4 +- drivers/ata/sata_svw.c | 16 +- drivers/ata/sata_sx4.c | 4 +- drivers/ata/sata_uli.c | 2 +- drivers/ata/sata_via.c | 16 +- drivers/ata/sata_vsc.c | 7 +- include/linux/ata.h | 6 + include/linux/libata.h | 8 + 78 files changed, 1330 insertions(+), 542 deletions(-)
Alan Cox (4):
pata_artop: Serializing support
pata_sc1200: Activate secondary channel
[libata] Drain data on errors
[libata] Improve timeout handling
David Milburn (1):
[libata] ahci: correct enclosure LED state save
Erik Inge Bolsø (4):
include/linux/ata.h: add some more transfer masks [libata] convert drivers to use ata.h mode mask defines
pata_radisys: fix mwdma_mask to exclude mwdma0
pata_efar: fix *dma_mask
Florian Fainelli (1):
pata-rb532-cf: platform_get_irq() fix ignored failure
Maciej Rutecki (1):
ahci: Blacklist HP Compaq 6720s that spins off disks during ACPI power off
Mark Lord (19):
sata_mv: cleanup chipset GENeration FLAGS
sata_mv: rearrange mv_start_dma() and friends
sata_mv: restructure mv_qc_issue
sata_mv: update ata_qc_from_tag
sata_mv: mv_fill_sg fixes v2
sata_mv: introduce support for ATAPI devices
sata_mv: optimize use of mv_edma_cfg
sata_mv: remove leftovers
[libata] sata_mv: cache frequently-accessed registers [libata] sata_mv: Enable use of (basic) DMA for ATAPI on GEN_IIE chips [libata] sata_mv: Tighten up interrupt masking in mv_qc_issue() [libata] sata_mv: Add a new mv_sff_check_status() function to sata_mv. [libata] Export ata_pio_queue_task() so that it can be used from sata_mv. [libata] sata_mv: Implement direct FIS transmission via mv_qc_issue_fis().
sata_mv: cosmetic preparations for IRQ coalescing
sata_mv: implement IRQ coalescing (v2)
sata_mv: optimize IRQ coalescing for 8-port chips
sata_mv: fix LED blinking for SoC+NCQ
[libata] More robust parsing for IDENTIFY DEVICE multi_count field
Phil Sutter (4):
pata-rb532-cf: replace rb532_pata_finish_io()
pata-rb532-cf: use ata_sff_exec_command()
pata-rb532-cf: use ata_sff_data_xfer32()
pata-rb532-cf: drop custom freeze and thawTejun Heo (1):
ahci: drop intx manipulation on msi enable
drivers/ata/ahci.c +20 -11
@@ -404,7 +404,7 @@ static const struct ata_port_info ahci_port_info[] = {/* board_ahci */ { .flags = AHCI_FLAG_COMMON, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, },
@@ -412,7 +412,7 @@ static const struct ata_port_info ahci_port_info[] = { { AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_PMP), .flags = AHCI_FLAG_COMMON, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_vt8251_ops, },
@@ -420,7 +420,7 @@ static const struct ata_port_info ahci_port_info[] = { { AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR), .flags = AHCI_FLAG_COMMON, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, },
@@ -430,7 +430,7 @@ static const struct ata_port_info ahci_port_info[] = {AHCI_HFLAG_32BIT_ONLY |AHCI_HFLAG_NO_MSI | AHCI_HFLAG_SECT255), .flags = AHCI_FLAG_COMMON, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_sb600_ops, },
@@ -440,7 +440,7 @@ static const struct ata_port_info ahci_port_info[] = { AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP), .flags =ATA_FLAG_SATA |ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, },
@@ -448,7 +448,7 @@ static const struct ata_port_info ahci_port_info[] = { { AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), .flags = AHCI_FLAG_COMMON, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_sb600_ops, },
@@ -456,7 +456,7 @@ static const struct ata_port_info ahci_port_info[] = { { AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ), .flags = AHCI_FLAG_COMMON, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, },
@@ -464,7 +464,7 @@ static const struct ata_port_info ahci_port_info[] = { { AHCI_HFLAGS (AHCI_HFLAG_NO_PMP), .flags = AHCI_FLAG_COMMON, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, },
@@ -1348,7 +1348,7 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state,writel (message[1 ], mmio + hpriv->em_loc+4 );/* save off new led state for port/slot */ - emp->led_state = message[1 ]; + emp->led_state = state;/* * tell hardware to transmit the message
@@ -2565,6 +2565,15 @@ static bool ahci_broken_system_poweroff(struct pci_dev *pdev)/* PCI slot number of the controller */ .driver_data = (void *)0x1FUL, }, + { + .ident = "HP Compaq 6720s", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6720s"), + }, + /* PCI slot number of the controller */ + .driver_data = (void *)0x1FUL, + }, { } /* terminate list */ };
@@ -2647,8 +2656,8 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)if (board_id == board_ahci_sb700 && pdev->revision >=0x40 ) hpriv->flags &= ~AHCI_HFLAG_IGN_SERR_INTERNAL ; -if ((hpriv->flags &AHCI_HFLAG_NO_MSI ) ||pci_enable_msi (pdev)) -pci_intx (pdev,1 ); +if (!(hpriv->flags &AHCI_HFLAG_NO_MSI )) +pci_enable_msi (pdev);/* save initial config */ ahci_save_initial_config (pdev, hpriv);
drivers/ata/ata_generic.c +2 -2
@@ -118,8 +118,8 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_idu16 command;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &generic_port_ops };
drivers/ata/ata_piix.c +30 -30
138 lines not on this page · raw message
drivers/ata/libata-core.c +12 -2
@@ -57,6 +57,7 @@#include <linux/scatterlist.h> #include <linux/io.h> #include <linux/async.h> +#include <linux/log2.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_host.h>
@@ -2389,6 +2390,7 @@ int ata_dev_configure(struct ata_device *dev) dev->cylinders =0 ; dev->heads =0 ; dev->sectors =0 ; + dev->multi_count =0 ;/* * common ATA, ATAPI feature tests
@@ -2426,8 +2428,15 @@ int ata_dev_configure(struct ata_device *dev) dev->n_sectors =ata_id_n_sectors (id); -if (dev->id[59 ] &0x100 ) - dev->multi_count = dev->id[59 ] &0xff ; +/* get current R/W Multiple count setting */ +if ((dev->id[47 ] >>8 ) ==0x80 && (dev->id[59 ] &0x100 )) { +unsigned int max = dev->id[47 ] &0xff ; +unsigned int cnt = dev->id[59 ] &0xff ; +/* only recognize/allow powers of two here */ +if (is_power_of_2 (max) &&is_power_of_2 (cnt)) +if (cnt <= max) + dev->multi_count = cnt; + }if (ata_id_has_lba (id)) {const char *lba_desc;
@@ -6709,6 +6718,7 @@ EXPORT_SYMBOL_GPL(ata_id_c_string);EXPORT_SYMBOL_GPL (ata_do_dev_read_id);EXPORT_SYMBOL_GPL (ata_scsi_simulate); +EXPORT_SYMBOL_GPL (ata_pio_queue_task);EXPORT_SYMBOL_GPL (ata_pio_need_iordy);EXPORT_SYMBOL_GPL (ata_timing_find_mode);EXPORT_SYMBOL_GPL (ata_timing_compute);
drivers/ata/libata-eh.c +17 -2
@@ -547,7 +547,7 @@ void ata_scsi_error(struct Scsi_Host *host)/* For new EH, all qcs are finished in one of three ways - * normal completion, error completion, and SCSI timeout. -* Both cmpletions can race against SCSI timeout. When normal +* Both completions can race against SCSI timeout. When normal * completion wins, the qc never reaches EH. When error * completion wins, the qc has ATA_QCFLAG_FAILED set. *
@@ -562,7 +562,19 @@ void ata_scsi_error(struct Scsi_Host *host)int nr_timedout =0 ;spin_lock_irqsave (ap->lock, flags); - + +/* This must occur under the ap->lock as we don't want +a polled recovery to race the real interrupt handler ++ The lost_interrupt handler checks for any completed but +non-notified command and completes much like an IRQ handler. ++ We then fall into the error recovery code which will treat +this as if normal completion won the race */ + +if (ap->ops->lost_interrupt) + ap->ops->lost_interrupt (ap); +list_for_each_entry_safe (scmd, tmp, &host->eh_cmd_q, eh_entry) {struct ata_queued_cmd *qc;
@@ -606,6 +618,9 @@ void ata_scsi_error(struct Scsi_Host *host) ap->eh_tries =ATA_EH_MAX_TRIES ; }else spin_unlock_wait (ap->lock); + +/* If we timed raced normal completion and there is nothing to +recover nr_timedout == 0 why exactly are we doing error recovery ? */ repeat:/* invoke error handler */
drivers/ata/libata-sff.c +88 -3
136 lines not on this page · raw message
drivers/ata/libata.h +0 -2
@@ -79,8 +79,6 @@ extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, u64 block, u32 n_block, unsigned int tf_flags, unsigned int tag);extern u64 ata_tf_read_block (struct ata_taskfile *tf,struct ata_device *dev); -extern void ata_pio_queue_task (struct ata_port *ap,void *data, -unsigned long delay);extern void ata_port_flush_task (struct ata_port *ap); extern unsigned ata_exec_internal(struct ata_device *dev, struct ata_taskfile *tf, const u8 *cdb,
drivers/ata/pata_acpi.c +3 -3
@@ -246,9 +246,9 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id)static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_SRST , - .pio_mask =0x1f , - .mwdma_mask =0x07 , - .udma_mask =0x7f , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA6 , .port_ops = &pacpi_ops, };
drivers/ata/pata_ali.c +14 -14
@@ -492,53 +492,53 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) {static const struct ata_port_info info_early = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , .port_ops = &ali_early_port_ops };/* Revision 0x20 added DMA */ static const struct ata_port_info info_20 = { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_PIO_LBA48 , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &ali_20_port_ops };/* Revision 0x20 with support logic added UDMA */ static const struct ata_port_info info_20_udma = { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_PIO_LBA48 , - .pio_mask =0x1f , - .mwdma_mask =0x07 , - .udma_mask =0x07 ,/* UDMA33 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA2 , .port_ops = &ali_20_port_ops };/* Revision 0xC2 adds UDMA66 */ static const struct ata_port_info info_c2 = { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_PIO_LBA48 , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &ali_c2_port_ops };/* Revision 0xC3 is UDMA66 for now */ static const struct ata_port_info info_c3 = { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_PIO_LBA48 , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &ali_c2_port_ops };/* Revision 0xC4 is UDMA100 */ static const struct ata_port_info info_c4 = { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_PIO_LBA48 , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &ali_c4_port_ops };/* Revision 0xC5 is UDMA133 with LBA48 DMA */ static const struct ata_port_info info_c5 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &ali_c5_port_ops };
drivers/ata/pata_amd.c +35 -35
109 lines not on this page · raw message
drivers/ata/pata_artop.c +35 -14
102 lines not on this page · raw message
drivers/ata/pata_at32.c +3 -1
@@ -67,7 +67,9 @@* * Alter PIO_MASK below according to table to set maximal PIO mode. */ -#define PIO_MASK (0x1f) +enum { +PIO_MASK =ATA_PIO4 , +};/* * Struct containing private information about device.
drivers/ata/pata_atiixp.c +3 -3
@@ -220,9 +220,9 @@ static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x06 ,/* No MWDMA0 support */ - .udma_mask =0x3F , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA12_ONLY , + .udma_mask =ATA_UDMA5 , .port_ops = &atiixp_port_ops };static const struct pci_bits atiixp_enable_bits[] = {
drivers/ata/pata_bf54x.c +1 -1
@@ -1502,7 +1502,7 @@ static struct ata_port_info bfin_port_info[] = { .flags = ATA_FLAG_SLAVE_POSS |ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY, - .pio_mask = 0x1f, /* pio0-4 */ + .pio_mask = ATA_PIO4, .mwdma_mask = 0, .udma_mask = 0, .port_ops = &bfin_pata_ops,
drivers/ata/pata_cmd640.c +1 -1
@@ -211,7 +211,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , .port_ops = &cmd640_port_ops };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_cmd64x.c +12 -12
@@ -299,40 +299,40 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)static const struct ata_port_info cmd_info[6 ] = { {/* CMD 643 - no UDMA */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &cmd64x_port_ops }, {/* CMD 646 with broken UDMA */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &cmd64x_port_ops }, {/* CMD 646 with working UDMA */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA2 , .port_ops = &cmd64x_port_ops }, {/* CMD 646 rev 1 */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &cmd646r1_port_ops }, {/* CMD 648 */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &cmd648_port_ops }, {/* CMD 649 */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &cmd648_port_ops }
drivers/ata/pata_cs5520.c +1 -1
@@ -158,7 +158,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devistatic const unsigned int ctl_port[] = {0x3F6 ,0x376 };struct ata_port_info pi = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , .port_ops = &cs5520_port_ops, };const struct ata_port_info *ppi[2 ];
drivers/ata/pata_cs5530.c +4 -4
@@ -298,15 +298,15 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , - .udma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA2 , .port_ops = &cs5530_port_ops };/* The docking connector doesn't do UDMA, and it seems not MWDMA */ static const struct ata_port_info info_palmax_secondary = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , .port_ops = &cs5530_port_ops };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_cs5535.c +2 -2
@@ -181,8 +181,8 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &cs5535_port_ops };
drivers/ata/pata_cs5536.c +2 -2
@@ -241,8 +241,8 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &cs5536_port_ops, };
drivers/ata/pata_cypress.c +2 -2
@@ -124,8 +124,8 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &cy82c693_port_ops };const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info };
drivers/ata/pata_efar.c +3 -3
@@ -251,9 +251,9 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)static int printed_version;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 ,/* mwdma1-2 */ - .udma_mask =0x0f ,/* UDMA 66 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA4 , .port_ops = &efar_ops, };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_hpt366.c +2 -2
@@ -336,8 +336,8 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info_hpt366 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &hpt366_port_ops };
drivers/ata/pata_hpt37x.c +14 -14
@@ -753,55 +753,55 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)/* HPT370 - UDMA100 */ static const struct ata_port_info info_hpt370 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &hpt370_port_ops };/* HPT370A - UDMA100 */ static const struct ata_port_info info_hpt370a = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &hpt370a_port_ops };/* HPT370 - UDMA100 */ static const struct ata_port_info info_hpt370_33 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &hpt370_port_ops };/* HPT370A - UDMA100 */ static const struct ata_port_info info_hpt370a_33 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &hpt370a_port_ops };/* HPT371, 372 and friends - UDMA133 */ static const struct ata_port_info info_hpt372 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &hpt372_port_ops };/* HPT374 - UDMA100, function 1 uses different prereset method */ static const struct ata_port_info info_hpt374_fn0 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &hpt372_port_ops };static const struct ata_port_info info_hpt374_fn1 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &hpt374_fn1_port_ops };
drivers/ata/pata_hpt3x2n.c +2 -2
@@ -441,8 +441,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id)/* HPT372N and friends - UDMA133 */ static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &hpt3x2n_port_ops };
drivers/ata/pata_hpt3x3.c +3 -3
@@ -188,11 +188,11 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)static int printed_version;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , #if defined(CONFIG_PATA_HPT3X3_DMA)/* Further debug needed */ - .mwdma_mask =0x07 , - .udma_mask =0x07 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA2 , #endif .port_ops = &hpt3x3_port_ops };
drivers/ata/pata_icside.c +2 -2
@@ -297,7 +297,7 @@ static int icside_dma_init(struct pata_icside_info *info)if (ec->dma !=NO_DMA && !request_dma (ec->dma,DRV_NAME )) { state->dma = ec->dma; - info->mwdma_mask =0x07 ;/* MW0..2 */ + info->mwdma_mask =ATA_MWDMA2 ; }return 0 ;
@@ -473,7 +473,7 @@ static int __devinit pata_icside_add_ports(struct pata_icside_info *info)for (i =0 ; i < info->nr_ports; i++) {struct ata_port *ap = host->ports[i]; - ap->pio_mask =0x1f ; + ap->pio_mask =ATA_PIO4 ; ap->mwdma_mask = info->mwdma_mask; ap->flags |=ATA_FLAG_SLAVE_POSS ; ap->ops = &pata_icside_port_ops;
drivers/ata/pata_isapnp.c +11 -3
@@ -17,7 +17,7 @@#include <linux/libata.h> #define DRV_NAME "pata_isapnp" -#define DRV_VERSION "0.2.2" +#define DRV_VERSION "0.2.5"static struct scsi_host_template isapnp_sht = {ATA_PIO_SHT (DRV_NAME ),
@@ -28,6 +28,13 @@ static struct ata_port_operations isapnp_port_ops = { .cable_detect = ata_cable_40wire, }; +static struct ata_port_operations isapnp_noalt_port_ops = { + .inherits = &ata_sff_port_ops, + .cable_detect = ata_cable_40wire, +/* No altstatus so we don't want to use the lost interrupt poll */ + .lost_interrupt =ATA_OP_NULL , +}; +/** * isapnp_init_one - attach an isapnp interface * @idev: PnP device
@@ -65,8 +72,8 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev ap = host->ports[0 ]; - ap->ops = &isapnp_port_ops; - ap->pio_mask =1 ; + ap->ops = &isapnp_noalt_port_ops; + ap->pio_mask =ATA_PIO0 ; ap->flags |=ATA_FLAG_SLAVE_POSS ; ap->ioaddr.cmd_addr = cmd_addr;
@@ -76,6 +83,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev pnp_port_start(idev, 1), 1); ap->ioaddr.altstatus_addr = ctl_addr; ap->ioaddr.ctl_addr = ctl_addr; + ap->ops = &isapnp_port_ops; }ata_sff_std_ports (&ap->ioaddr);
drivers/ata/pata_it8213.c +2 -2
@@ -262,8 +262,8 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *enstatic int printed_version;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 ,/* mwdma0-2 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 ,/* FIXME: want UDMA 100? */ .port_ops = &it8213_ops, };
drivers/ata/pata_it821x.c +8 -8
@@ -875,29 +875,29 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)static const struct ata_port_info info_smart = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &it821x_smart_port_ops };static const struct ata_port_info info_passthru = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &it821x_passthru_port_ops };static const struct ata_port_info info_rdc = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &it821x_rdc_port_ops };static const struct ata_port_info info_rdc_11 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 ,/* No UDMA */ .port_ops = &it821x_rdc_port_ops };
drivers/ata/pata_ixp4xx_cf.c +1 -1
@@ -176,7 +176,7 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) ap = host->ports[0 ]; ap->ops = &ixp4xx_port_ops; - ap->pio_mask =0x1f ;/* PIO4 */ + ap->pio_mask =ATA_PIO4 ; ap->flags |=ATA_FLAG_MMIO |ATA_FLAG_NO_LEGACY |ATA_FLAG_NO_ATAPI ;ixp4xx_setup_port (ap, data, cs0->start, cs1->start);
drivers/ata/pata_jmicron.c +2 -2
@@ -136,8 +136,8 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *istatic const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &jmicron_ops,
drivers/ata/pata_legacy.c +1 -1
@@ -129,7 +129,7 @@ static int qdi; /* Set to probe QDI controllers */static int winbond;/* Set to probe Winbond controllers, give I/O port if non standard */ static int autospeed;/* Chip present which snoops speed changes */ -static int pio_mask =0x1F ;/* PIO range for autospeed devices */ +static int pio_mask =ATA_PIO4 ;/* PIO range for autospeed devices */ static int iordy_mask =0xFFFFFFFF ;/* Use iordy if available */ /**
drivers/ata/pata_marvell.c +4 -4
@@ -126,8 +126,8 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *istatic const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &marvell_ops,
@@ -136,8 +136,8 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i/* Slave possible as its magically mapped not real */ .flags = ATA_FLAG_SLAVE_POSS, - .pio_mask = 0x1f, - .mwdma_mask = 0x07, + .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA6, .port_ops = &marvell_ops,
drivers/ata/pata_mpc52xx.c +2 -2
@@ -737,10 +737,10 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)*/ prop =of_get_property (op->node,"mwdma-mode" , &proplen);if ((prop) && (proplen >=4 )) - mwdma_mask =0x7 & ((1 << (*prop +1 )) -1 ); + mwdma_mask =ATA_MWDMA2 & ((1 << (*prop +1 )) -1 ); prop =of_get_property (op->node,"udma-mode" , &proplen);if ((prop) && (proplen >=4 )) - udma_mask =0x7 & ((1 << (*prop +1 )) -1 ); + udma_mask =ATA_UDMA2 & ((1 << (*prop +1 )) -1 ); ata_irq =irq_of_parse_and_map (op->node,0 );if (ata_irq ==NO_IRQ ) {
drivers/ata/pata_mpiix.c +1 -1
@@ -200,7 +200,7 @@ static int mpiix_init_one(struct pci_dev *dev, const struct pci_device_id *id)the MPIIX your box goes castors up */ ap->ops = &mpiix_port_ops; - ap->pio_mask =0x1F ; + ap->pio_mask =ATA_PIO4 ; ap->flags |=ATA_FLAG_SLAVE_POSS ; ap->ioaddr.cmd_addr = cmd_addr;
drivers/ata/pata_netcell.c +2 -2
@@ -51,8 +51,8 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e .flags = ATA_FLAG_SLAVE_POSS,/* Actually we don't really care about these as the firmware deals with it */ - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ + .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, .udma_mask = ATA_UDMA5, /* UDMA 133 */ .port_ops = &netcell_ops, };
drivers/ata/pata_ninja32.c +1 -1
@@ -136,7 +136,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)if (!base)return -ENOMEM ; ap->ops = &ninja32_port_ops; - ap->pio_mask =0x1F ; + ap->pio_mask =ATA_PIO4 ; ap->flags |=ATA_FLAG_SLAVE_POSS ; ap->ioaddr.cmd_addr = base +0x10 ;
drivers/ata/pata_ns87410.c +1 -1
@@ -144,7 +144,7 @@ static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x0F , + .pio_mask =ATA_PIO3 , .port_ops = &ns87410_port_ops };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_ns87415.c +4 -4
@@ -346,8 +346,8 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *estatic int printed_version;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 ,/* mwdma0-2 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &ns87415_pata_ops, };const struct ata_port_info *ppi[] = { &info,NULL };
@@ -355,8 +355,8 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e#if defined(CONFIG_SUPERIO )static const struct ata_port_info info87560 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 ,/* mwdma0-2 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &ns87560_pata_ops, };
drivers/ata/pata_octeon_cf.c +2 -2
@@ -871,7 +871,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev) ap->private_data = cf_port; cf_port->ap = ap; ap->ops = &octeon_cf_ops; - ap->pio_mask =0x7f ;/* Support PIO 0-6 */ + ap->pio_mask =ATA_PIO6 ; ap->flags |=ATA_FLAG_MMIO |ATA_FLAG_NO_LEGACY |ATA_FLAG_NO_ATAPI |ATA_FLAG_PIO_POLLING ;
@@ -900,7 +900,7 @@ static int __devinit octeon_cf_probe(struct platform_device *pdev) ap->ioaddr.ctl_addr = cs1 + (6 <<1 ) +1 ; octeon_cf_ops.sff_data_xfer = octeon_cf_data_xfer16; - ap->mwdma_mask =0x1f ;/* Support MWDMA 0-4 */ + ap->mwdma_mask =ATA_MWDMA4 ; irq =platform_get_irq (pdev,0 ); irq_handler = octeon_cf_interrupt;
drivers/ata/pata_oldpiix.c +2 -2
@@ -238,8 +238,8 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *estatic int printed_version;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 ,/* mwdma1-2 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &oldpiix_pata_ops, };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_opti.c +1 -1
@@ -163,7 +163,7 @@ static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , .port_ops = &opti_port_ops };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_optidma.c +5 -5
@@ -399,15 +399,15 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info_82c700 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &optidma_port_ops };static const struct ata_port_info info_82c700_udma = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , - .udma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA2 , .port_ops = &optiplus_port_ops };const struct ata_port_info *ppi[] = { &info_82c700,NULL };
drivers/ata/pata_pcmcia.c +34 -2
@@ -42,7 +42,7 @@#define DRV_NAME "pata_pcmcia" -#define DRV_VERSION "0.3.3" +#define DRV_VERSION "0.3.5"/* * Private data structure to glue stuff together
@@ -126,6 +126,37 @@ static unsigned int ata_data_xfer_8bit(struct ata_device *dev,return buflen; } +/** +* pcmcia_8bit_drain_fifo - Stock FIFO drain logic for SFF controllers +* @qc: command +* +* Drain the FIFO and device of any stuck data following a command +* failing to complete. In some cases this is neccessary before a +* reset will recover the device. +* +*/ + +void pcmcia_8bit_drain_fifo (struct ata_queued_cmd *qc) +{ +int count; +struct ata_port *ap; + +/* We only need to flush incoming data when a command was running */ +if (qc ==NULL || qc->dma_dir ==DMA_TO_DEVICE ) +return ; + + ap = qc->ap; + +/* Drain up to 64K of data before we give up this recovery method */ +for (count =0 ; (ap->ops->sff_check_status (ap) &ATA_DRQ ) + && count++ <65536 ;) +ioread8 (ap->ioaddr.data_addr); + +if (count) +ata_port_printk (ap,KERN_WARNING ,"drained %d bytes to clear DRQ.\n" , + count); + +}static struct scsi_host_template pcmcia_sht = {ATA_PIO_SHT (DRV_NAME ),
@@ -143,6 +174,7 @@ static struct ata_port_operations pcmcia_8bit_port_ops = { .sff_data_xfer = ata_data_xfer_8bit, .cable_detect = ata_cable_40wire, .set_mode = pcmcia_set_mode_8bit, + .drain_fifo = pcmcia_8bit_drain_fifo, };#define CS_CHECK (fn, ret) \
@@ -299,7 +331,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) ap = host->ports[p]; ap->ops = ops; - ap->pio_mask =1 ;/* ISA so PIO 0 cycles */ + ap->pio_mask =ATA_PIO0 ;/* ISA so PIO 0 cycles */ ap->flags |=ATA_FLAG_SLAVE_POSS ; ap->ioaddr.cmd_addr = io_addr +0x10 * p; ap->ioaddr.altstatus_addr = ctl_addr +0x10 * p;
drivers/ata/pata_pdc2027x.c +6 -6
@@ -152,18 +152,18 @@ static struct ata_port_info pdc2027x_port_info[] = { { .flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_SLAVE_POSS | ATA_FLAG_MMIO, - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ - .udma_mask = ATA_UDMA5, /* udma0-5 */ + .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA5, .port_ops = &pdc2027x_pata100_ops, },/* PDC_UDMA_133 */ { .flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_SLAVE_POSS | ATA_FLAG_MMIO, - .pio_mask = 0x1f, /* pio0-4 */ - .mwdma_mask = 0x07, /* mwdma0-2 */ - .udma_mask = ATA_UDMA6, /* udma0-6 */ + .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA6, .port_ops = &pdc2027x_pata133_ops, }, };
drivers/ata/pata_pdc202xx_old.c +6 -6
@@ -291,22 +291,22 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *idstatic const struct ata_port_info info[3 ] = { { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA2 , .port_ops = &pdc2024x_port_ops }, { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &pdc2026x_port_ops }, { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &pdc2026x_port_ops }
drivers/ata/pata_qdi.c +2 -2
@@ -212,11 +212,11 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, iif (type ==6580 ) { ap->ops = &qdi6580_port_ops; - ap->pio_mask =0x1F ; + ap->pio_mask =ATA_PIO4 ; ap->flags |=ATA_FLAG_SLAVE_POSS ; }else { ap->ops = &qdi6500_port_ops; - ap->pio_mask =0x07 ;/* Actually PIO3 !IORDY is possible */ + ap->pio_mask =ATA_PIO2 ;/* Actually PIO3 !IORDY is possible */ ap->flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_NO_IORDY ; }
drivers/ata/pata_radisys.c +3 -3
@@ -216,9 +216,9 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *estatic int printed_version;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 ,/* mwdma1-2 */ - .udma_mask =0x14 ,/* UDMA33/66 only */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA12_ONLY , + .udma_mask =ATA_UDMA24_ONLY , .port_ops = &radisys_pata_ops, };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_rb532_cf.c +4 -60
99 lines not on this page · raw message
drivers/ata/pata_rz1000.c +1 -1
@@ -88,7 +88,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *enstatic int printed_version;static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , .port_ops = &rz1000_port_ops };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_sc1200.c +30 -5
@@ -2,7 +2,6 @@* New ATA layer SC1200 driver Alan Cox <[email protected]> * * TODO: Mode selection filtering -* TODO: Can't enable second channel until ATA core has serialize * TODO: Needs custom DMA cleanup code * * Based very heavily on
@@ -178,6 +177,31 @@ static unsigned int sc1200_qc_issue(struct ata_queued_cmd *qc)return ata_sff_qc_issue (qc); } +/** +* sc1200_qc_defer - implement serialization +* @qc: command +* +* Serialize command issue on this controller. +*/ + +static int sc1200_qc_defer (struct ata_queued_cmd *qc) +{ +struct ata_host *host = qc->ap->host; +struct ata_port *alt = host->ports[1 ^ qc->ap->port_no]; +int rc; + +/* First apply the usual rules */ + rc =ata_std_qc_defer (qc); +if (rc !=0 ) +return rc; + +/* Now apply serialization rules. Only allow a command if the +other channel state machine is idle */ +if (alt && alt->qc_active) +return ATA_DEFER_PORT ; +return 0 ; +} +static struct scsi_host_template sc1200_sht = {ATA_BMDMA_SHT (DRV_NAME ), .sg_tablesize =LIBATA_DUMB_MAX_PRD ,
@@ -187,6 +211,7 @@ static struct ata_port_operations sc1200_port_ops = { .inherits = &ata_bmdma_port_ops, .qc_prep = ata_sff_dumb_qc_prep, .qc_issue = sc1200_qc_issue, + .qc_defer = sc1200_qc_defer, .cable_detect = ata_cable_40wire, .set_piomode = sc1200_set_piomode, .set_dmamode = sc1200_set_dmamode,
@@ -205,13 +230,13 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , - .udma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA2 , .port_ops = &sc1200_port_ops };/* Can't enable port 2 yet, see top comments */ -const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info }; +const struct ata_port_info *ppi[] = { &info, };return ata_pci_sff_init_one (dev, ppi, &sc1200_sht,NULL ); }
drivers/ata/pata_scc.c +2 -2
@@ -1001,8 +1001,8 @@ static struct ata_port_operations scc_pata_ops = {static struct ata_port_info scc_port_info[] = { { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_MMIO |ATA_FLAG_NO_LEGACY , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x00 , + .pio_mask =ATA_PIO4 , +/* No MWDMA */ .udma_mask =ATA_UDMA6 , .port_ops = &scc_pata_ops, },
drivers/ata/pata_sch.c +3 -3
@@ -84,9 +84,9 @@ static struct ata_port_operations sch_pata_ops = {static struct ata_port_info sch_port_info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =ATA_PIO4 ,/* pio0-4 */ - .mwdma_mask =ATA_MWDMA2 ,/* mwdma0-2 */ - .udma_mask =ATA_UDMA5 ,/* udma0-5 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA5 , .port_ops = &sch_pata_ops, };
drivers/ata/pata_serverworks.c +10 -10
@@ -398,26 +398,26 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_idstatic const struct ata_port_info info[4 ] = { {/* OSB4 */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , - .udma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA2 , .port_ops = &serverworks_osb4_port_ops }, {/* OSB4 no UDMA */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , - .udma_mask =0x00 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , +/* No UDMA */ .port_ops = &serverworks_osb4_port_ops }, {/* CSB5 */ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &serverworks_csb_port_ops }, {/* CSB5 - later revisions*/ .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &serverworks_csb_port_ops }
drivers/ata/pata_sil680.c +4 -4
@@ -282,15 +282,15 @@ static int __devinit sil680_init_one(struct pci_dev *pdev, {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &sil680_port_ops };static const struct ata_port_info info_slow = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &sil680_port_ops };
drivers/ata/pata_sis.c +19 -13
@@ -552,51 +552,57 @@ static struct ata_port_operations sis_old_ops = {static const struct ata_port_info sis_info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 , - .udma_mask =0 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , +/* No UDMA */ .port_ops = &sis_old_ops, };static const struct ata_port_info sis_info33 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 , - .udma_mask =ATA_UDMA2 ,/* UDMA 33 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , + .udma_mask =ATA_UDMA2 , .port_ops = &sis_old_ops, };static const struct ata_port_info sis_info66 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ - .udma_mask =ATA_UDMA4 ,/* UDMA 66 */ + .pio_mask =ATA_PIO4 , +/* No MWDMA */ + .udma_mask =ATA_UDMA4 , .port_ops = &sis_66_ops, };static const struct ata_port_info sis_info100 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ + .pio_mask =ATA_PIO4 , +/* No MWDMA */ .udma_mask =ATA_UDMA5 , .port_ops = &sis_100_ops, };static const struct ata_port_info sis_info100_early = { .flags =ATA_FLAG_SLAVE_POSS , + .pio_mask =ATA_PIO4 , +/* No MWDMA */ .udma_mask =ATA_UDMA5 , - .pio_mask =0x1f ,/* pio0-4 */ .port_ops = &sis_66_ops, };static const struct ata_port_info sis_info133 = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ + .pio_mask =ATA_PIO4 , +/* No MWDMA */ .udma_mask =ATA_UDMA6 , .port_ops = &sis_133_ops, };const struct ata_port_info sis_info133_for_sata = { .flags =ATA_FLAG_SLAVE_POSS |ATA_FLAG_SRST , - .pio_mask =0x1f ,/* pio0-4 */ + .pio_mask =ATA_PIO4 , +/* No MWDMA */ .udma_mask =ATA_UDMA6 , .port_ops = &sis_133_for_sata_ops, };static const struct ata_port_info sis_info133_early = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f ,/* pio0-4 */ + .pio_mask =ATA_PIO4 , +/* No MWDMA */ .udma_mask =ATA_UDMA6 , .port_ops = &sis_133_early_ops, };
drivers/ata/pata_sl82c105.c +3 -3
@@ -283,13 +283,13 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id {static const struct ata_port_info info_dma = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &sl82c105_port_ops };static const struct ata_port_info info_early = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , + .pio_mask =ATA_PIO4 , .port_ops = &sl82c105_port_ops };/* for now use only the first port */
drivers/ata/pata_triflex.c +2 -2
@@ -191,8 +191,8 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) {static const struct ata_port_info info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &triflex_port_ops };const struct ata_port_info *ppi[] = { &info,NULL };
drivers/ata/pata_via.c +12 -12
@@ -422,46 +422,46 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)/* Early VIA without UDMA support */ static const struct ata_port_info via_mwdma_info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &via_port_ops };/* Ditto with IRQ masking required */ static const struct ata_port_info via_mwdma_info_borked = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .port_ops = &via_port_ops_noirq, };/* VIA UDMA 33 devices (and borked 66) */ static const struct ata_port_info via_udma33_info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA2 , .port_ops = &via_port_ops };/* VIA UDMA 66 devices */ static const struct ata_port_info via_udma66_info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA4 , .port_ops = &via_port_ops };/* VIA UDMA 100 devices */ static const struct ata_port_info via_udma100_info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA5 , .port_ops = &via_port_ops };/* UDMA133 with bad AST (All current 133) */ static const struct ata_port_info via_udma133_info = { .flags =ATA_FLAG_SLAVE_POSS , - .pio_mask =0x1f , - .mwdma_mask =0x07 , + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 ,/* FIXME: should check north bridge */ .port_ops = &via_port_ops };
drivers/ata/pata_winbond.c +1 -1
@@ -193,7 +193,7 @@ static __init int winbond_init_one(unsigned long port)ata_port_desc (ap,"cmd 0x%lx ctl 0x%lx" , cmd_port, ctl_port); ap->ops = &winbond_port_ops; - ap->pio_mask =0x1F ; + ap->pio_mask =ATA_PIO4 ; ap->flags |=ATA_FLAG_SLAVE_POSS ; ap->ioaddr.cmd_addr = cmd_addr; ap->ioaddr.altstatus_addr = ctl_addr;
drivers/ata/pdc_adma.c +3 -1
@@ -148,6 +148,8 @@ static struct scsi_host_template adma_ata_sht = {static struct ata_port_operations adma_ata_ops = { .inherits = &ata_sff_port_ops, + .lost_interrupt =ATA_OP_NULL , + .check_atapi_dma = adma_check_atapi_dma, .qc_prep = adma_qc_prep, .qc_issue = adma_qc_issue,
@@ -166,7 +168,7 @@ static struct ata_port_info adma_port_info[] = { .flags = ATA_FLAG_SLAVE_POSS |ATA_FLAG_NO_LEGACY |ATA_FLAG_MMIO | ATA_FLAG_PIO_POLLING, - .pio_mask = 0x10, /* pio4 */ + .pio_mask = ATA_PIO4_ONLY, .udma_mask = ATA_UDMA4, .port_ops = &adma_ata_ops, },
drivers/ata/sata_fsl.c +2 -2
@@ -1279,8 +1279,8 @@ static struct ata_port_operations sata_fsl_ops = {static const struct ata_port_info sata_fsl_port_info[] = { { .flags =SATA_FSL_HOST_FLAGS , - .pio_mask =0x1f ,/* pio 0-4 */ - .udma_mask =0x7f ,/* udma 0-6 */ + .pio_mask =ATA_PIO4 , + .udma_mask =ATA_UDMA6 , .port_ops = &sata_fsl_ops, }, };
drivers/ata/sata_inic162x.c +2 -2
@@ -744,8 +744,8 @@ static struct ata_port_operations inic_port_ops = {static struct ata_port_info inic_port_info = { .flags =ATA_FLAG_SATA |ATA_FLAG_PIO_DMA , - .pio_mask =0x1f ,/* pio0-4 */ - .mwdma_mask =0x07 ,/* mwdma0-2 */ + .pio_mask =ATA_PIO4 , + .mwdma_mask =ATA_MWDMA2 , .udma_mask =ATA_UDMA6 , .port_ops = &inic_port_ops };
drivers/ata/sata_mv.c +739 -129
1,136 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.