Loading drivers/scsi/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -497,7 +497,7 @@ config SCSI_ATA_PIIX If unsure, say N. config SCSI_SATA_MV tristate "Marvell SATA support" tristate "Marvell SATA support (HIGHLY EXPERIMENTAL)" depends on SCSI_SATA && PCI && EXPERIMENTAL help This option enables support for the Marvell Serial ATA family. Loading drivers/scsi/ahci.c +16 −14 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ #include <asm/io.h> #define DRV_NAME "ahci" #define DRV_VERSION "1.01" #define DRV_VERSION "1.2" enum { Loading Loading @@ -558,13 +558,15 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) pp->cmd_slot[0].opts |= cpu_to_le32(n_elem << 16); } static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) static void ahci_restart_port(struct ata_port *ap, u32 irq_stat) { void __iomem *mmio = ap->host_set->mmio_base; void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); u32 tmp; int work; if ((ap->device[0].class != ATA_DEV_ATAPI) || ((irq_stat & PORT_IRQ_TF_ERR) == 0)) printk(KERN_WARNING "ata%u: port reset, " "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n", ap->id, Loading Loading @@ -632,7 +634,7 @@ static void ahci_eng_timeout(struct ata_port *ap) printk(KERN_ERR "ata%u: BUG: timeout without command\n", ap->id); } else { ahci_intr_error(ap, readl(port_mmio + PORT_IRQ_STAT)); ahci_restart_port(ap, readl(port_mmio + PORT_IRQ_STAT)); /* hack alert! We cannot use the supplied completion * function from inside the ->eh_strategy_handler() thread. Loading Loading @@ -677,7 +679,7 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) err_mask = AC_ERR_HOST_BUS; /* command processing has stopped due to error; restart */ ahci_intr_error(ap, status); ahci_restart_port(ap, status); if (qc) ata_qc_complete(qc, err_mask); Loading drivers/scsi/ata_piix.c +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ #include <linux/libata.h> #define DRV_NAME "ata_piix" #define DRV_VERSION "1.04" #define DRV_VERSION "1.05" enum { PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ Loading drivers/scsi/libata-core.c +32 −6 Original line number Diff line number Diff line Loading @@ -1046,6 +1046,30 @@ static unsigned int ata_pio_modes(const struct ata_device *adev) return modes; } static int ata_qc_wait_err(struct ata_queued_cmd *qc, struct completion *wait) { int rc = 0; if (wait_for_completion_timeout(wait, 30 * HZ) < 1) { /* timeout handling */ unsigned int err_mask = ac_err_mask(ata_chk_status(qc->ap)); if (!err_mask) { printk(KERN_WARNING "ata%u: slow completion (cmd %x)\n", qc->ap->id, qc->tf.command); } else { printk(KERN_WARNING "ata%u: qc timeout (cmd %x)\n", qc->ap->id, qc->tf.command); rc = -EIO; } ata_qc_complete(qc, err_mask); } return rc; } /** * ata_dev_identify - obtain IDENTIFY x DEVICE page * @ap: port on which device we wish to probe resides Loading Loading @@ -1125,7 +1149,7 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device) if (rc) goto err_out; else wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); spin_lock_irqsave(&ap->host_set->lock, flags); ap->ops->tf_read(ap, &qc->tf); Loading Loading @@ -1575,6 +1599,8 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed, if (!(s = ata_timing_find_mode(speed))) return -EINVAL; memcpy(t, s, sizeof(*s)); /* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MW_DMA cycle timing. Loading @@ -1595,7 +1621,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed, * Convert the timing to bus clock counts. */ ata_timing_quantize(s, t, T, UT); ata_timing_quantize(t, t, T, UT); /* * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T Loading Loading @@ -2267,7 +2293,7 @@ static void ata_dev_set_xfermode(struct ata_port *ap, struct ata_device *dev) if (rc) ata_port_disable(ap); else wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); DPRINTK("EXIT\n"); } Loading Loading @@ -2315,7 +2341,7 @@ static void ata_dev_reread_id(struct ata_port *ap, struct ata_device *dev) if (rc) goto err_out; wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); swap_buf_le16(dev->id, ATA_ID_WORDS); Loading Loading @@ -2371,7 +2397,7 @@ static void ata_dev_init_params(struct ata_port *ap, struct ata_device *dev) if (rc) ata_port_disable(ap); else wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); DPRINTK("EXIT\n"); } Loading drivers/scsi/libata.h +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ #define __LIBATA_H__ #define DRV_NAME "libata" #define DRV_VERSION "1.12" /* must be exactly four chars */ #define DRV_VERSION "1.20" /* must be exactly four chars */ struct ata_scsi_args { u16 *id; Loading Loading
drivers/scsi/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -497,7 +497,7 @@ config SCSI_ATA_PIIX If unsure, say N. config SCSI_SATA_MV tristate "Marvell SATA support" tristate "Marvell SATA support (HIGHLY EXPERIMENTAL)" depends on SCSI_SATA && PCI && EXPERIMENTAL help This option enables support for the Marvell Serial ATA family. Loading
drivers/scsi/ahci.c +16 −14 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ #include <asm/io.h> #define DRV_NAME "ahci" #define DRV_VERSION "1.01" #define DRV_VERSION "1.2" enum { Loading Loading @@ -558,13 +558,15 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) pp->cmd_slot[0].opts |= cpu_to_le32(n_elem << 16); } static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) static void ahci_restart_port(struct ata_port *ap, u32 irq_stat) { void __iomem *mmio = ap->host_set->mmio_base; void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); u32 tmp; int work; if ((ap->device[0].class != ATA_DEV_ATAPI) || ((irq_stat & PORT_IRQ_TF_ERR) == 0)) printk(KERN_WARNING "ata%u: port reset, " "p_is %x is %x pis %x cmd %x tf %x ss %x se %x\n", ap->id, Loading Loading @@ -632,7 +634,7 @@ static void ahci_eng_timeout(struct ata_port *ap) printk(KERN_ERR "ata%u: BUG: timeout without command\n", ap->id); } else { ahci_intr_error(ap, readl(port_mmio + PORT_IRQ_STAT)); ahci_restart_port(ap, readl(port_mmio + PORT_IRQ_STAT)); /* hack alert! We cannot use the supplied completion * function from inside the ->eh_strategy_handler() thread. Loading Loading @@ -677,7 +679,7 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) err_mask = AC_ERR_HOST_BUS; /* command processing has stopped due to error; restart */ ahci_intr_error(ap, status); ahci_restart_port(ap, status); if (qc) ata_qc_complete(qc, err_mask); Loading
drivers/scsi/ata_piix.c +1 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,7 @@ #include <linux/libata.h> #define DRV_NAME "ata_piix" #define DRV_VERSION "1.04" #define DRV_VERSION "1.05" enum { PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ Loading
drivers/scsi/libata-core.c +32 −6 Original line number Diff line number Diff line Loading @@ -1046,6 +1046,30 @@ static unsigned int ata_pio_modes(const struct ata_device *adev) return modes; } static int ata_qc_wait_err(struct ata_queued_cmd *qc, struct completion *wait) { int rc = 0; if (wait_for_completion_timeout(wait, 30 * HZ) < 1) { /* timeout handling */ unsigned int err_mask = ac_err_mask(ata_chk_status(qc->ap)); if (!err_mask) { printk(KERN_WARNING "ata%u: slow completion (cmd %x)\n", qc->ap->id, qc->tf.command); } else { printk(KERN_WARNING "ata%u: qc timeout (cmd %x)\n", qc->ap->id, qc->tf.command); rc = -EIO; } ata_qc_complete(qc, err_mask); } return rc; } /** * ata_dev_identify - obtain IDENTIFY x DEVICE page * @ap: port on which device we wish to probe resides Loading Loading @@ -1125,7 +1149,7 @@ static void ata_dev_identify(struct ata_port *ap, unsigned int device) if (rc) goto err_out; else wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); spin_lock_irqsave(&ap->host_set->lock, flags); ap->ops->tf_read(ap, &qc->tf); Loading Loading @@ -1575,6 +1599,8 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed, if (!(s = ata_timing_find_mode(speed))) return -EINVAL; memcpy(t, s, sizeof(*s)); /* * If the drive is an EIDE drive, it can tell us it needs extended * PIO/MW_DMA cycle timing. Loading @@ -1595,7 +1621,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed, * Convert the timing to bus clock counts. */ ata_timing_quantize(s, t, T, UT); ata_timing_quantize(t, t, T, UT); /* * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T Loading Loading @@ -2267,7 +2293,7 @@ static void ata_dev_set_xfermode(struct ata_port *ap, struct ata_device *dev) if (rc) ata_port_disable(ap); else wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); DPRINTK("EXIT\n"); } Loading Loading @@ -2315,7 +2341,7 @@ static void ata_dev_reread_id(struct ata_port *ap, struct ata_device *dev) if (rc) goto err_out; wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); swap_buf_le16(dev->id, ATA_ID_WORDS); Loading Loading @@ -2371,7 +2397,7 @@ static void ata_dev_init_params(struct ata_port *ap, struct ata_device *dev) if (rc) ata_port_disable(ap); else wait_for_completion(&wait); ata_qc_wait_err(qc, &wait); DPRINTK("EXIT\n"); } Loading
drivers/scsi/libata.h +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ #define __LIBATA_H__ #define DRV_NAME "libata" #define DRV_VERSION "1.12" /* must be exactly four chars */ #define DRV_VERSION "1.20" /* must be exactly four chars */ struct ata_scsi_args { u16 *id; Loading