libata updates
Subsystems (2)
PATCH 1/1 libata updates
Tejun's Port Multiplier support, one of the larger libata merge items for 2.6.23, is still pending. This is mostly cleanups and minor improvements, though sata_mv received a much-needed facelift.
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/Kconfig | 10 +- drivers/ata/ata_piix.c | 2 +- drivers/ata/libata-core.c | 74 +--- drivers/ata/libata-eh.c | 96 +++--- drivers/ata/libata-sff.c | 288 ++------------- drivers/ata/pata_hpt3x3.c | 93 ++++- drivers/ata/pata_mpc52xx.c | 18 +- drivers/ata/pata_scc.c | 54 ++- drivers/ata/pata_sis.c | 3 + drivers/ata/sata_mv.c | 887 ++++++++++++++++++++++++++++---------------- drivers/ata/sata_nv.c | 2 +- drivers/ata/sata_promise.c | 41 ++- drivers/ata/sata_sis.c | 2 +- drivers/ata/sata_uli.c | 2 +- drivers/ata/sata_via.c | 2 +- include/linux/ata.h | 29 ++ include/linux/libata.h | 12 +- 17 files changed, 890 insertions(+), 725 deletions(-)
Akira Iguchi (1):
pata_scc.c: Workaround for errata A308
Alan Cox (2):
pata_sis: FIFO whack
pata_hpt3x3: major reworking and testing
Albert Lee (1):
libata: remove irq_on from ata_bus_reset() and ata_std_postreset()
Chuck Ebbert (1):
libata: add another Maxtor drive with broken NCQ to the list
Domen Puncer (1):
pata_mpc52xx: suspend/resume support
Jeff Garzik (5):
pata_hpt3x3: fix DMA Kconfig option to actually have a hope of working [libata] sata_mv: Minor cleanups and renaming, preparing for new EH & NCQ [libata] sata_mv: minor bug fixes, enhancements, and cleanups (prep for new EH) [libata] sata_mv: Convert to new exception handling (EH) infrastructure [libata] sata_mv: Fix and clean up per-chip-generation tests
Mikael Pettersson (1):
sata_promise: SATA hotplug support, take 2
Oleg Nesterov (1):
libata-core: convert to use cancel_rearming_delayed_work()
Prarit Bhargava (1):
Add Hitachi HDS7250SASUN500G 0621KTAWSD to NCQ blacklist
Tejun Heo (7):
libata: simplify PCI legacy SFF host handling
libata: quirk IOMEGA ZIP 250 ATAPI FLOPPY
libata: clean up horkage handling
libata: add FUJITSU MHV2080BH to NCQ blacklist
libata-link: separate out ata_eh_handle_dev_fail()
libata-link: add PMP related ATA constants
ata_piix: kill incorrect invalid map value warning
drivers/ata/Kconfig +9 -1
@@ -309,7 +309,7 @@ config PATA_HPT3X2N If unsure, say N. config PATA_HPT3X3 - tristate "HPT 343/363 PATA support (Experimental)" + tristate "HPT 343/363 PATA support" depends on PCI help This option enables support for the HPT 343/363
@@ -317,6 +317,14 @@ config PATA_HPT3X3 If unsure, say N. +config PATA_HPT3X3_DMA + bool "HPT 343/363 DMA support (Experimental)" + depends on PATA_HPT3X3 + help + This option enables DMA support for the HPT343/363 + controllers. Enable with care as there are still some + problems with DMA on this chipset. + config PATA_ISAPNP tristate "ISA Plug and Play PATA support (Experimental)" depends on EXPERIMENTAL && ISAPNP
drivers/ata/ata_piix.c +1 -1
@@ -414,7 +414,7 @@ static const struct piix_map_db ich6m_map_db = {*/ .map = {/* PM PS SM SS MAP */ - { P0, P2, RV, RV }, /* 00b */ + { P0, P2, NA, NA }, /* 00b */ { IDE, IDE, P1, P3 }, /* 01b */ { P0, P2, IDE, IDE }, /* 10b */ { RV, RV, RV, RV },
drivers/ata/libata-core.c +20 -54
177 lines not on this page · raw message
drivers/ata/libata-eh.c +52 -44
108 lines not on this page · raw message
drivers/ata/libata-sff.c +32 -256
348 lines not on this page · raw message
drivers/ata/pata_hpt3x3.c +80 -13
157 lines not on this page · raw message
drivers/ata/pata_mpc52xx.c +16 -2
@@ -467,13 +467,27 @@ mpc52xx_ata_remove(struct of_device *op)static int mpc52xx_ata_suspend (struct of_device *op,pm_message_t state) { -return 0 ;/* FIXME : What to do here ? */ +struct ata_host *host =dev_get_drvdata (&op->dev); + +return ata_host_suspend (host, state); }static int mpc52xx_ata_resume (struct of_device *op) { -return 0 ;/* FIXME : What to do here ? */ +struct ata_host *host =dev_get_drvdata (&op->dev); +struct mpc52xx_ata_priv *priv = host->private_data; +int rv; + + rv =mpc52xx_ata_hw_init (priv); +if (rv) { + printk(KERN_ERR DRV_NAME ": Error during HW init\n"); +return rv; + } + +ata_host_resume (host); + +return 0 ; }#endif
drivers/ata/pata_scc.c +35 -19
73 lines not on this page · raw message
drivers/ata/pata_sis.c +3 -0
@@ -149,6 +149,9 @@ static int sis_pre_reset(struct ata_port *ap, unsigned long deadline)if (!pci_test_config_bits (pdev, &sis_enable_bits[ap->port_no]))return -ENOENT ; +/* Clear the FIFO settings. We can't enable the FIFO until +we know we are poking at a disk */ +pci_write_config_byte (pdev,0x4B ,0 );return ata_std_prereset (ap, deadline); }
drivers/ata/sata_mv.c +568 -319
1,358 lines not on this page · raw message
drivers/ata/sata_nv.c +1 -1
@@ -1560,7 +1560,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) } ppi[0 ] = &nv_port_info[type]; - rc =ata_pci_prepare_native_host (pdev, ppi, &host); + rc =ata_pci_prepare_sff_host (pdev, ppi, &host);if (rc)return rc;
drivers/ata/sata_promise.c +36 -5
84 lines not on this page · raw message
drivers/ata/sata_sis.c +1 -1
@@ -334,7 +334,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)break ; } - rc =ata_pci_prepare_native_host (pdev, ppi, &host); + rc =ata_pci_prepare_sff_host (pdev, ppi, &host);if (rc)return rc;
drivers/ata/sata_uli.c +1 -1
@@ -213,7 +213,7 @@ static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) host->private_data = hpriv;/* the first two ports are standard SFF */ - rc =ata_pci_init_native_host (host); + rc =ata_pci_init_sff_host (host);if (rc)return rc;
drivers/ata/sata_via.c +1 -1
@@ -412,7 +412,7 @@ static int vt6420_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)struct ata_host *host;int rc; - rc =ata_pci_prepare_native_host (pdev, ppi, &host); + rc =ata_pci_prepare_sff_host (pdev, ppi, &host);if (rc)return rc; *r_host = host;
include/linux/ata.h +29 -0
@@ -164,6 +164,8 @@ enum {ATA_CMD_SET_MAX =0xF9 ,ATA_CMD_SET_MAX_EXT =0x37 ,ATA_CMD_READ_LOG_EXT =0x2f , +ATA_CMD_PMP_READ =0xE4 , +ATA_CMD_PMP_WRITE =0xE8 ,/* READ_LOG_EXT pages */ ATA_LOG_SATA_NCQ = 0x10,
@@ -212,6 +214,28 @@ enum {0=to device, 1=to host */ ATAPI_CDB_LEN =16 , +/* PMP stuff */ +SATA_PMP_MAX_PORTS =15 , +SATA_PMP_CTRL_PORT =15 , + +SATA_PMP_GSCR_DWORDS =128 , +SATA_PMP_GSCR_PROD_ID =0 , +SATA_PMP_GSCR_REV =1 , +SATA_PMP_GSCR_PORT_INFO =2 , +SATA_PMP_GSCR_ERROR =32 , +SATA_PMP_GSCR_ERROR_EN =33 , +SATA_PMP_GSCR_FEAT =64 , +SATA_PMP_GSCR_FEAT_EN =96 , + +SATA_PMP_PSCR_STATUS =0 , +SATA_PMP_PSCR_ERROR =1 , +SATA_PMP_PSCR_CONTROL =2 , + +SATA_PMP_FEAT_BIST = (1 <<0 ), +SATA_PMP_FEAT_PMREQ = (1 <<1 ), +SATA_PMP_FEAT_DYNSSC = (1 <<2 ), +SATA_PMP_FEAT_NOTIFY = (1 <<3 ), +/* cable types */ ATA_CBL_NONE =0 , ATA_CBL_PATA40 = 1,
@@ -418,4 +442,9 @@ static inline int lba_48_ok(u64 block, u32 n_block) return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); } +#define sata_pmp_gscr_vendor (gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] & 0xffff) +#define sata_pmp_gscr_devid (gscr) ((gscr)[SATA_PMP_GSCR_PROD_ID] >> 16) +#define sata_pmp_gscr_rev (gscr) (((gscr)[SATA_PMP_GSCR_REV] >> 8) & 0xff) +#define sata_pmp_gscr_ports (gscr) ((gscr)[SATA_PMP_GSCR_PORT_INFO] & 0xf) +#endif /* __LINUX_ATA_H__ */
include/linux/libata.h +5 -7
@@ -196,7 +196,6 @@ enum {ATA_PFLAG_SCSI_HOTPLUG = (1 <<6 ),/* SCSI hotplug scheduled */ ATA_PFLAG_INITIALIZING = (1 <<7 ),/* being initialized, don't touch */ -ATA_PFLAG_FLUSH_PORT_TASK = (1 <<16 ),/* flush port task */ ATA_PFLAG_SUSPENDED = (1 <<17 ),/* port is suspended (power) */ ATA_PFLAG_PM_PENDING = (1 <<18 ),/* PM operation pending */ ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */
@@ -435,6 +434,7 @@ struct ata_device {struct ata_port *ap;unsigned int devno;/* 0 or 1 */ unsigned long flags;/* ATA_DFLAG_xxx */ +unsigned int horkage;/* List of broken features */ struct scsi_device *sdev;/* attached SCSI device */ #ifdef CONFIG_ATA_ACPI acpi_handle acpi_handle;
@@ -466,7 +466,6 @@ struct ata_device {/* error history */ struct ata_ering ering;int spdn_cnt; -unsigned int horkage;/* List of broken features */ };/* Offset into struct ata_device. Fields above it are maintained
@@ -794,7 +793,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s,extern void ata_id_c_string (const u16 *id,unsigned char *s,unsigned int ofs,unsigned int len);extern void ata_id_to_dma_mode (struct ata_device *dev,u8 unknown); -extern unsigned long ata_device_blacklisted (const struct ata_device *dev);extern void ata_bmdma_setup (struct ata_queued_cmd *qc);extern void ata_bmdma_start (struct ata_queued_cmd *qc);extern void ata_bmdma_stop (struct ata_queued_cmd *qc);
@@ -871,11 +869,11 @@ struct pci_bits { unsigned long val; }; -extern int ata_pci_init_native_host (struct ata_host *host); +extern int ata_pci_init_sff_host (struct ata_host *host);extern int ata_pci_init_bmdma (struct ata_host *host); -extern int ata_pci_prepare_native_host (struct pci_dev *pdev, -const struct ata_port_info *const * ppi, -struct ata_host **r_host); +extern int ata_pci_prepare_sff_host (struct pci_dev *pdev, +const struct ata_port_info *const * ppi, +struct ata_host **r_host);extern int pci_test_config_bits (struct pci_dev *pdev,const struct pci_bits *bits);extern unsigned long ata_pci_default_filter (struct ata_device *,unsigned long );#endif /* CONFIG_PCI */