libata updates
PATCH 1/1 libata updates
Lots of little bits. The only notable piece is Alan's 32-bit PIO support; but even that is small and nicely contained, thanks to the nifty inheritance system from Tejun.
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 | 10 ++- drivers/ata/ata_piix.c | 51 ++++++++---- drivers/ata/libata-core.c | 5 + drivers/ata/libata-sff.c | 185 ++++++++++++++++++++++++++++--------------- drivers/ata/pata_ali.c | 107 ++++++++++++++++--------- drivers/ata/pata_amd.c | 4 +- drivers/ata/pata_hpt366.c | 109 ++++++++++--------------- drivers/ata/pata_hpt3x3.c | 49 ++++++++++- drivers/ata/pata_mpiix.c | 3 +- drivers/ata/pata_platform.c | 2 +- drivers/ata/pata_sil680.c | 4 +- drivers/ata/sata_sil24.c | 7 -- include/linux/libata.h | 3 + 13 files changed, 336 insertions(+), 203 deletions(-)
Alan Cox (5):
pata_hpt3x3: Workarounds for chipset
pata_ali: force initialise a few bits
pata_ali: Fix and workaround for FIFO DMA bug
libata: Add 32bit PIO support
libata: clean up the SFF code for coding style
David Daney (1):
libata: Add special ata_pio_need_iordy() handling for Compact Flash.
Grant Grundler (1):
sata_sil24: remove unused sil24_port_multiplier
Jeff Garzik (1):
[libata] pata_hpt3x3: correct _freeze() function declaration
Shane Huang (2):
[libata] ahci: Add SATA GEN3 related messages [libata] ahci: Withdraw IGN_SERR_INTERNAL for SB800 SATA
Sonic Zhang (1):
pata_platform: __pata_platform_remove() shouldn't be in discard section
Tejun Heo (2):
ata_piix: save, use saved and restore IOCFG
pata_hpt366: reimplement mode programming
drivers/ata/ahci.c +8 -2
@@ -105,7 +105,7 @@ enum { board_ahci_ign_iferr =2 , board_ahci_sb600 =3 , board_ahci_mv =4 , - board_ahci_sb700 =5 , + board_ahci_sb700 =5 ,/* for SB700 and SB800 */ board_ahci_mcp65 =6 , board_ahci_nopmp = 7,
@@ -439,7 +439,7 @@ static const struct ata_port_info ahci_port_info[] = { .udma_mask = ATA_UDMA6, .port_ops = &ahci_ops, }, -/* board_ahci_sb700 */ +/* board_ahci_sb700, for SB700 and SB800 */ { AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL), .flags = AHCI_FLAG_COMMON,
@@ -2446,6 +2446,8 @@ static void ahci_print_info(struct ata_host *host) speed_s ="1.5" ; else if (speed == 2) speed_s ="3" ; + else if (speed == 3) + speed_s ="6" ; else speed_s ="?" ;
@@ -2610,6 +2612,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) (pdev->revision == 0xa1 || pdev->revision == 0xa2)) hpriv->flags |= AHCI_HFLAG_NO_MSI; +/* SB800 does NOT need the workaround to ignore SERR_INTERNAL */ +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 );
drivers/ata/ata_piix.c +35 -16
131 lines not on this page · raw message
drivers/ata/libata-core.c +5 -0
@@ -1007,6 +1007,7 @@ static const char *sata_spd_string(unsigned int spd)static const char *const spd_str[] = {"1.5 Gbps" ,"3.0 Gbps" , +"6.0 Gbps" , };if (spd ==0 || (spd -1 ) >=ARRAY_SIZE (spd_str))
@@ -2000,6 +2001,10 @@ unsigned int ata_pio_need_iordy(const struct ata_device *adev)as the caller should know this */ if (adev->link->ap->flags &ATA_FLAG_NO_IORDY )return 0 ; +/* CF spec. r4.1 Table 22 says no iordy on PIO5 and PIO6. */ +if (ata_id_is_cfa (adev->id) + && (adev->pio_mode ==XFER_PIO_5 || adev->pio_mode ==XFER_PIO_6 )) +return 0 ;/* PIO3 and higher it is mandatory */ if (adev->pio_mode >XFER_PIO_2 )return 1 ;
drivers/ata/libata-sff.c +120 -65
548 lines not on this page · raw message
drivers/ata/pata_ali.c +70 -37
212 lines not on this page · raw message
drivers/ata/pata_amd.c +2 -2
@@ -24,7 +24,7 @@#include <linux/libata.h> #define DRV_NAME "pata_amd" -#define DRV_VERSION "0.3.10" +#define DRV_VERSION "0.3.11"/** * timing_setup - shared timing computation and load
@@ -345,7 +345,7 @@ static struct scsi_host_template amd_sht = { };static const struct ata_port_operations amd_base_port_ops = { - .inherits = &ata_bmdma_port_ops, + .inherits = &ata_bmdma32_port_ops, .prereset = amd_pre_reset, };
drivers/ata/pata_hpt366.c +44 -65
144 lines not on this page · raw message
drivers/ata/pata_hpt3x3.c +44 -5
83 lines not on this page · raw message
drivers/ata/pata_mpiix.c +2 -1
@@ -35,7 +35,7 @@#include <linux/libata.h> #define DRV_NAME "pata_mpiix" -#define DRV_VERSION "0.7.6" +#define DRV_VERSION "0.7.7"enum {IDETIM =0x6C ,/* IDE control register */
@@ -146,6 +146,7 @@ static struct ata_port_operations mpiix_port_ops = { .cable_detect = ata_cable_40wire, .set_piomode = mpiix_set_piomode, .prereset = mpiix_pre_reset, + .sff_data_xfer = ata_sff_data_xfer32, };static int mpiix_init_one (struct pci_dev *dev,const struct pci_device_id *id)
drivers/ata/pata_platform.c +1 -1
@@ -186,7 +186,7 @@ EXPORT_SYMBOL_GPL(__pata_platform_probe);* A platform bus ATA device has been unplugged. Perform the needed * cleanup. Also called on module unload for any active devices. */ -int __devexit __pata_platform_remove(struct device *dev) +int __pata_platform_remove (struct device *dev) {struct ata_host *host =dev_get_drvdata (dev);
drivers/ata/pata_sil680.c +2 -2
@@ -32,7 +32,7 @@#include <linux/libata.h> #define DRV_NAME "pata_sil680" -#define DRV_VERSION "0.4.8" +#define DRV_VERSION "0.4.9"#define SIL680_MMIO_BAR 5
@@ -195,7 +195,7 @@ static struct scsi_host_template sil680_sht = { };static struct ata_port_operations sil680_port_ops = { - .inherits = &ata_bmdma_port_ops, + .inherits = &ata_bmdma32_port_ops, .cable_detect = sil680_cable_detect, .set_piomode = sil680_set_piomode, .set_dmamode = sil680_set_dmamode,
drivers/ata/sata_sil24.c +0 -7
@@ -51,13 +51,6 @@ struct sil24_sge {__le32 flags; }; -/* -* Port multiplier -*/ -struct sil24_port_multiplier { -__le32 diag; -__le32 sactive; -};enum {SIL24_HOST_BAR =0 ,
include/linux/libata.h +3 -0
@@ -1518,6 +1518,7 @@ extern void sata_pmp_error_handler(struct ata_port *ap);extern const struct ata_port_operations ata_sff_port_ops;extern const struct ata_port_operations ata_bmdma_port_ops; +extern const struct ata_port_operations ata_bmdma32_port_ops;/* PIO only, sg_tablesize and dma_boundary limits can be removed */ #define ATA_PIO_SHT (drv_name) \
@@ -1545,6 +1546,8 @@ extern void ata_sff_exec_command(struct ata_port *ap, const struct ata_taskfile *tf);extern unsigned int ata_sff_data_xfer (struct ata_device *dev,unsigned char *buf,unsigned int buflen,int rw); +extern unsigned int ata_sff_data_xfer32 (struct ata_device *dev, +unsigned char *buf,unsigned int buflen,int rw);extern unsigned int ata_sff_data_xfer_noirq (struct ata_device *dev,unsigned char *buf,unsigned int buflen,int rw);extern u8 ata_sff_irq_on (struct ata_port *ap);