libata push 1 of 2
Subsystems (2)
PATCH 1/1 libata push 1 of 2
Nothing major in this push, really. Notes:
1) sata_sil DMA restrictions got removed by using a private chip DMA engine rather than the chip's IDE-compatible legacy DMA engine (it has two engines, yes).
We need to watch for data corruption.
2) The [non-libata] DMI change was discussed upstream, and is a "better fix" for the DMI matching change added to ata_piix late in 2.6.28-rc.
3) As the title indicates, there is a second push coming, mostly consisting of Alan PATA material.
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 | 8 +- drivers/ata/ata_generic.c | 5 +- drivers/ata/ata_piix.c | 21 ++--- drivers/ata/libata-acpi.c | 19 ++-- drivers/ata/libata-core.c | 204 ++++++++++++++++++++++++--------------- drivers/ata/libata-eh.c | 116 +++++++++++++---------- drivers/ata/libata-pmp.c | 22 ++-- drivers/ata/libata-scsi.c | 22 ++-- drivers/ata/pata_bf54x.c | 1 - drivers/ata/pata_it821x.c | 34 +++---- drivers/ata/pata_ixp4xx_cf.c | 14 +-- drivers/ata/pata_legacy.c | 18 ++-- drivers/ata/pata_oldpiix.c | 1 - drivers/ata/pata_pdc2027x.c | 29 +++---- drivers/ata/pata_platform.c | 14 +-- drivers/ata/pata_radisys.c | 1 - drivers/ata/pata_rz1000.c | 16 ++-- drivers/ata/pata_scc.c | 1 - drivers/ata/pata_serverworks.c | 1 - drivers/ata/pata_sis.c | 1 - drivers/ata/sata_mv.c | 1 - drivers/ata/sata_sil.c | 98 +++++++++++++++++++- drivers/firmware/dmi_scan.c | 16 +++ include/linux/dmi.h | 3 + include/linux/libata.h | 71 +++++++++++---- 25 files changed, 457 insertions(+), 280 deletions(-)
Jiri Slaby (2):
DMI: add dmi_match
[libata] ata_piix: cleanup dmi strings checking
Lubomir Bulej (1):
libata: blacklist NCQ on OCZ CORE 2 SSD (resend)
Qinghuang Feng (1):
[libata] Update kernel-doc comments to match source code
Robert Hancock (1):
sata_sil: add Large Block Transfer support
Tejun Heo (3):
libata: beef up iterators
libata: when restoring SControl during detach do the PMP links first
libata: perform port detach in EH
drivers/ata/ahci.c +4 -4
@@ -1119,14 +1119,14 @@ static void ahci_start_port(struct ata_port *ap)/* turn on LEDs */ if (ap->flags &ATA_FLAG_EM ) { -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) { emp = &pp->em_priv[link->pmp];ahci_transmit_led_message (ap, emp->led_state,4 ); } }if (ap->flags &ATA_FLAG_SW_ACTIVITY ) -ata_port_for_each_link (link, ap) +ata_for_each_link (link, ap,EDGE )ahci_init_sw_activity (link); }
@@ -1361,7 +1361,7 @@ static ssize_t ahci_led_show(struct ata_port *ap, char *buf)struct ahci_em_priv *emp;int rc =0 ; -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) { emp = &pp->em_priv[link->pmp]; rc +=sprintf (buf,"%lx\n" , emp->led_state); }
@@ -1941,7 +1941,7 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)u32 serror;/* determine active link */ -ata_port_for_each_link (link, ap) +ata_for_each_link (link, ap,EDGE )if (ata_link_active (link))break ;if (!link)
drivers/ata/ata_generic.c +1 -4
@@ -57,10 +57,7 @@ static int generic_set_mode(struct ata_link *link, struct ata_device **unused)if (pdev->vendor ==PCI_VENDOR_ID_CENATEK ) dma_enabled =0xFF ; -ata_link_for_each_dev (dev, link) { -if (!ata_dev_enabled (dev)) -continue ; - +ata_for_each_dev (dev, link,ENABLED ) {/* We don't really care */ dev->pio_mode =XFER_PIO_0 ; dev->dma_mode =XFER_MW_DMA_0 ;
drivers/ata/ata_piix.c +7 -14
@@ -1072,20 +1072,13 @@ static int piix_broken_suspend(void)* matching is necessary because dmi_system_id.matches is * limited to four entries. */ -if (dmi_get_system_info (DMI_SYS_VENDOR ) && -dmi_get_system_info (DMI_PRODUCT_NAME ) && -dmi_get_system_info (DMI_PRODUCT_VERSION ) && -dmi_get_system_info (DMI_PRODUCT_SERIAL ) && -dmi_get_system_info (DMI_BOARD_VENDOR ) && -dmi_get_system_info (DMI_BOARD_NAME ) && -dmi_get_system_info (DMI_BOARD_VERSION ) && - !strcmp (dmi_get_system_info (DMI_SYS_VENDOR ),"TOSHIBA" ) && - !strcmp (dmi_get_system_info (DMI_PRODUCT_NAME ),"000000" ) && - !strcmp (dmi_get_system_info (DMI_PRODUCT_VERSION ),"000000" ) && - !strcmp (dmi_get_system_info (DMI_PRODUCT_SERIAL ),"000000" ) && - !strcmp (dmi_get_system_info (DMI_BOARD_VENDOR ),"TOSHIBA" ) && - !strcmp (dmi_get_system_info (DMI_BOARD_NAME ),"Portable PC" ) && - !strcmp (dmi_get_system_info (DMI_BOARD_VERSION ),"Version A0" )) +if (dmi_match (DMI_SYS_VENDOR ,"TOSHIBA" ) && +dmi_match (DMI_PRODUCT_NAME ,"000000" ) && +dmi_match (DMI_PRODUCT_VERSION ,"000000" ) && +dmi_match (DMI_PRODUCT_SERIAL ,"000000" ) && +dmi_match (DMI_BOARD_VENDOR ,"TOSHIBA" ) && +dmi_match (DMI_BOARD_NAME ,"Portable PC" ) && +dmi_match (DMI_BOARD_VERSION ,"Version A0" ))return 1 ;return 0 ;
drivers/ata/libata-acpi.c +8 -11
@@ -89,7 +89,7 @@ void ata_acpi_associate_sata_port(struct ata_port *ap) ap->link.device->acpi_handle =NULL ; -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) {acpi_integer adr =SATA_ADR (ap->port_no, link->pmp); link->device->acpi_handle =
@@ -129,8 +129,8 @@ static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev)struct ata_link *tlink;struct ata_device *tdev; -ata_port_for_each_link (tlink, ap) -ata_link_for_each_dev (tdev, tlink) +ata_for_each_link (tlink, ap,EDGE ) +ata_for_each_dev (tdev, tlink,ALL ) tdev->flags |=ATA_DFLAG_DETACH ; }
@@ -588,12 +588,9 @@ int ata_acpi_cbl_80wire(struct ata_port *ap, const struct ata_acpi_gtm *gtm) {struct ata_device *dev; -ata_link_for_each_dev (dev, &ap->link) { +ata_for_each_dev (dev, &ap->link,ENABLED ) {unsigned long xfer_mask, udma_mask; -if (!ata_dev_enabled (dev)) -continue ; - xfer_mask =ata_acpi_gtm_xfermask (dev, gtm);ata_unpack_xfermask (xfer_mask,NULL ,NULL , &udma_mask);
@@ -893,7 +890,7 @@ void ata_acpi_on_resume(struct ata_port *ap)* use values set by _STM. Cache _GTF result and * schedule _GTF. */ -ata_link_for_each_dev (dev, &ap->link) { +ata_for_each_dev (dev, &ap->link,ALL ) {ata_acpi_clear_gtf (dev);if (ata_dev_enabled (dev) &&ata_dev_get_GTF (dev,NULL ) >=0 )
@@ -904,7 +901,7 @@ void ata_acpi_on_resume(struct ata_port *ap)* there's no reason to evaluate IDE _GTF early * without _STM. Clear cache and schedule _GTF. */ -ata_link_for_each_dev (dev, &ap->link) { +ata_for_each_dev (dev, &ap->link,ALL ) {ata_acpi_clear_gtf (dev);if (ata_dev_enabled (dev)) dev->flags |=ATA_DFLAG_ACPI_PENDING ;
@@ -932,8 +929,8 @@ void ata_acpi_set_state(struct ata_port *ap, pm_message_t state)if (state.event ==PM_EVENT_ON )acpi_bus_set_power (ap->acpi_handle,ACPI_STATE_D0 ); -ata_link_for_each_dev (dev, &ap->link) { -if (dev->acpi_handle &&ata_dev_enabled (dev)) +ata_for_each_dev (dev, &ap->link,ENABLED ) { +if (dev->acpi_handle)acpi_bus_set_power (dev->acpi_handle, state.event ==PM_EVENT_ON ?ACPI_STATE_D0 :ACPI_STATE_D3 );
drivers/ata/libata-core.c +125 -79
348 lines not on this page · raw message
drivers/ata/libata-eh.c +68 -48
331 lines not on this page · raw message
drivers/ata/libata-pmp.c +11 -11
@@ -321,7 +321,7 @@ static void sata_pmp_quirks(struct ata_port *ap)if (vendor ==0x1095 && devid ==0x3726 ) {/* sil3726 quirks */ -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) {/* Class code report is unreliable and SRST * times out under certain configurations. */
@@ -336,7 +336,7 @@ static void sata_pmp_quirks(struct ata_port *ap) } }else if (vendor ==0x1095 && devid ==0x4723 ) {/* sil4723 quirks */ -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) {/* class code report is unreliable */ if (link->pmp <2 ) link->flags |=ATA_LFLAG_ASSUME_ATA ;
@@ -348,7 +348,7 @@ static void sata_pmp_quirks(struct ata_port *ap) } }else if (vendor ==0x1095 && devid ==0x4726 ) {/* sil4726 quirks */ -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) {/* Class code report is unreliable and SRST * times out under certain configurations. * Config device can be at port 0 or 5 and
@@ -450,7 +450,7 @@ int sata_pmp_attach(struct ata_device *dev)if (ap->ops->pmp_attach) ap->ops->pmp_attach (ap); -ata_port_for_each_link (tlink, ap) +ata_for_each_link (tlink, ap,EDGE )sata_link_init_spd (tlink);ata_acpi_associate_sata_port (ap);
@@ -487,7 +487,7 @@ static void sata_pmp_detach(struct ata_device *dev)if (ap->ops->pmp_detach) ap->ops->pmp_detach (ap); -ata_port_for_each_link (tlink, ap) +ata_for_each_link (tlink, ap,EDGE )ata_eh_detach_dev (tlink->device);spin_lock_irqsave (ap->lock, flags);
@@ -700,7 +700,7 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap, }/* PMP is reset, SErrors cannot be trusted, scan all */ -ata_port_for_each_link (tlink, ap) { +ata_for_each_link (tlink, ap,EDGE ) {struct ata_eh_context *ehc = &tlink->eh_context; ehc->i.probe_mask |=ATA_ALL_DEVICES ;
@@ -768,7 +768,7 @@ static int sata_pmp_eh_handle_disabled_links(struct ata_port *ap)spin_lock_irqsave (ap->lock, flags); -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) {if (!(link->flags &ATA_LFLAG_DISABLED ))continue ;
@@ -852,7 +852,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap)int cnt, rc; pmp_tries =ATA_EH_PMP_TRIES ; -ata_port_for_each_link (link, ap) +ata_for_each_link (link, ap,EDGE ) link_tries[link->pmp] =ATA_EH_PMP_LINK_TRIES ; retry:
@@ -861,7 +861,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap) rc =ata_eh_recover (ap, ops->prereset, ops->softreset, ops->hardreset, ops->postreset,NULL );if (rc) { -ata_link_for_each_dev (dev, &ap->link) +ata_for_each_dev (dev, &ap->link,ALL )ata_dev_disable (dev);return rc; }
@@ -870,7 +870,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap)return 0 ;/* new PMP online */ -ata_port_for_each_link (link, ap) +ata_for_each_link (link, ap,EDGE ) link_tries[link->pmp] =ATA_EH_PMP_LINK_TRIES ;/* fall through */
@@ -942,7 +942,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap) } cnt =0 ; -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) {if (!(gscr_error & (1 << link->pmp)))continue ;
drivers/ata/libata-scsi.c +11 -11
@@ -3229,12 +3229,12 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)return ; repeat: -ata_port_for_each_link (link, ap) { -ata_link_for_each_dev (dev, link) { +ata_for_each_link (link, ap,EDGE ) { +ata_for_each_dev (dev, link,ENABLED ) {struct scsi_device *sdev;int channel =0 , id =0 ; -if (!ata_dev_enabled (dev) || dev->sdev) +if (dev->sdev)continue ;if (ata_is_host_link (link))
@@ -3255,9 +3255,9 @@ void ata_scsi_scan_host(struct ata_port *ap, int sync)* failure occurred, scan would have failed silently. Check * whether all devices are attached. */ -ata_port_for_each_link (link, ap) { -ata_link_for_each_dev (dev, link) { -if (ata_dev_enabled (dev) && !dev->sdev) +ata_for_each_link (link, ap,EDGE ) { +ata_for_each_dev (dev, link,ENABLED ) { +if (!dev->sdev) goto exit_loop; } }
@@ -3381,7 +3381,7 @@ static void ata_scsi_handle_link_detach(struct ata_link *link)struct ata_port *ap = link->ap;struct ata_device *dev; -ata_link_for_each_dev (dev, link) { +ata_for_each_dev (dev, link,ALL ) {unsigned long flags;if (!(dev->flags &ATA_DFLAG_DETACHED ))
@@ -3496,7 +3496,7 @@ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,if (devno ==SCAN_WILD_CARD ) {struct ata_link *link; -ata_port_for_each_link (link, ap) { +ata_for_each_link (link, ap,EDGE ) {struct ata_eh_info *ehi = &link->eh_info; ehi->probe_mask |=ATA_ALL_DEVICES ; ehi->action |=ATA_EH_RESET ;
@@ -3544,11 +3544,11 @@ void ata_scsi_dev_rescan(struct work_struct *work)spin_lock_irqsave (ap->lock, flags); -ata_port_for_each_link (link, ap) { -ata_link_for_each_dev (dev, link) { +ata_for_each_link (link, ap,EDGE ) { +ata_for_each_dev (dev, link,ENABLED ) {struct scsi_device *sdev = dev->sdev; -if (!ata_dev_enabled (dev) || !sdev) +if (!sdev)continue ;if (scsi_device_get (sdev))continue ;
drivers/ata/pata_bf54x.c +0 -1
@@ -356,7 +356,6 @@ static void bfin_set_piomode(struct ata_port *ap, struct ata_device *adev)* bfin_set_dmamode - Initialize host controller PATA DMA timings * @ap: Port whose timings we are configuring * @adev: um -* @udma: udma mode, 0 - 6 * * Set UDMA mode for device. *
drivers/ata/pata_it821x.c +16 -18
@@ -465,24 +465,22 @@ static int it821x_smart_set_mode(struct ata_link *link, struct ata_device **unus {struct ata_device *dev; -ata_link_for_each_dev (dev, link) { -if (ata_dev_enabled (dev)) { -/* We don't really care */ - dev->pio_mode =XFER_PIO_0 ; - dev->dma_mode =XFER_MW_DMA_0 ; -/* We do need the right mode information for DMA or PIO -and this comes from the current configuration flags */ -if (ata_id_has_dma (dev->id)) { -ata_dev_printk (dev,KERN_INFO ,"configured for DMA\n" ); - dev->xfer_mode =XFER_MW_DMA_0 ; - dev->xfer_shift =ATA_SHIFT_MWDMA ; - dev->flags &= ~ATA_DFLAG_PIO ; - }else { -ata_dev_printk (dev,KERN_INFO ,"configured for PIO\n" ); - dev->xfer_mode =XFER_PIO_0 ; - dev->xfer_shift =ATA_SHIFT_PIO ; - dev->flags |=ATA_DFLAG_PIO ; - } +ata_for_each_dev (dev, link,ENABLED ) { +/* We don't really care */ + dev->pio_mode =XFER_PIO_0 ; + dev->dma_mode =XFER_MW_DMA_0 ; +/* We do need the right mode information for DMA or PIO +and this comes from the current configuration flags */ +if (ata_id_has_dma (dev->id)) { +ata_dev_printk (dev,KERN_INFO ,"configured for DMA\n" ); + dev->xfer_mode =XFER_MW_DMA_0 ; + dev->xfer_shift =ATA_SHIFT_MWDMA ; + dev->flags &= ~ATA_DFLAG_PIO ; + }else { +ata_dev_printk (dev,KERN_INFO ,"configured for PIO\n" ); + dev->xfer_mode =XFER_PIO_0 ; + dev->xfer_shift =ATA_SHIFT_PIO ; + dev->flags |=ATA_DFLAG_PIO ; } }return 0 ;
drivers/ata/pata_ixp4xx_cf.c +6 -8
@@ -30,14 +30,12 @@ static int ixp4xx_set_mode(struct ata_link *link, struct ata_device **error) {struct ata_device *dev; -ata_link_for_each_dev (dev, link) { -if (ata_dev_enabled (dev)) { -ata_dev_printk (dev,KERN_INFO ,"configured for PIO0\n" ); - dev->pio_mode =XFER_PIO_0 ; - dev->xfer_mode =XFER_PIO_0 ; - dev->xfer_shift =ATA_SHIFT_PIO ; - dev->flags |=ATA_DFLAG_PIO ; - } +ata_for_each_dev (dev, link,ENABLED ) { +ata_dev_printk (dev,KERN_INFO ,"configured for PIO0\n" ); + dev->pio_mode =XFER_PIO_0 ; + dev->xfer_mode =XFER_PIO_0 ; + dev->xfer_shift =ATA_SHIFT_PIO ; + dev->flags |=ATA_DFLAG_PIO ; }return 0 ; }
drivers/ata/pata_legacy.c +7 -11
@@ -194,15 +194,12 @@ static int legacy_set_mode(struct ata_link *link, struct ata_device **unused) {struct ata_device *dev; -ata_link_for_each_dev (dev, link) { -if (ata_dev_enabled (dev)) { -ata_dev_printk (dev,KERN_INFO , -"configured for PIO\n" ); - dev->pio_mode =XFER_PIO_0 ; - dev->xfer_mode =XFER_PIO_0 ; - dev->xfer_shift =ATA_SHIFT_PIO ; - dev->flags |=ATA_DFLAG_PIO ; - } +ata_for_each_dev (dev, link,ENABLED ) { +ata_dev_printk (dev,KERN_INFO ,"configured for PIO\n" ); + dev->pio_mode =XFER_PIO_0 ; + dev->xfer_mode =XFER_PIO_0 ; + dev->xfer_shift =ATA_SHIFT_PIO ; + dev->flags |=ATA_DFLAG_PIO ; }return 0 ; }
@@ -641,7 +638,6 @@ static void qdi6500_set_piomode(struct ata_port *ap, struct ata_device *adev)* qdi6580dp_set_piomode - PIO setup for dual channel * @ap: Port * @adev: Device -* @irq: interrupt line * * In dual channel mode the 6580 has one clock per channel and we have * to software clockswitch in qc_issue.
@@ -1028,7 +1024,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)/* Nothing found means we drop the port as its probably not there */ ret = -ENODEV ; -ata_link_for_each_dev (dev, &ap->link) { +ata_for_each_dev (dev, &ap->link,ALL ) {if (!ata_dev_absent (dev)) { legacy_host[probe->slot] = host; ld->platform_dev = pdev;
drivers/ata/pata_oldpiix.c +0 -1
@@ -116,7 +116,6 @@ static void oldpiix_set_piomode (struct ata_port *ap, struct ata_device *adev)* oldpiix_set_dmamode - Initialize host controller PATA DMA timings * @ap: Port whose timings we are configuring * @adev: Device to program -* @isich: True if the device is an ICH and has IOCFG registers * * Set MWDMA mode for device, in host controller PCI config space. *
drivers/ata/pata_pdc2027x.c +12 -17
@@ -281,7 +281,6 @@ static unsigned long pdc2027x_mode_filter(struct ata_device *adev, unsigned long* pdc2027x_set_piomode - Initialize host controller PATA PIO timings * @ap: Port to configure * @adev: um -* @pio: PIO mode, 0 - 4 * * Set PIO mode for device. *
@@ -326,7 +325,6 @@ static void pdc2027x_set_piomode(struct ata_port *ap, struct ata_device *adev)* pdc2027x_set_dmamode - Initialize host controller PATA UDMA timings * @ap: Port to configure * @adev: um -* @udma: udma mode, XFER_UDMA_0 to XFER_UDMA_6 * * Set UDMA mode for device. *
@@ -406,23 +404,20 @@ static int pdc2027x_set_mode(struct ata_link *link, struct ata_device **r_failedif (rc <0 )return rc; -ata_link_for_each_dev (dev, link) { -if (ata_dev_enabled (dev)) { +ata_for_each_dev (dev, link,ENABLED ) { +pdc2027x_set_piomode (ap, dev); -pdc2027x_set_piomode (ap, dev); +/* +* Enable prefetch if the device support PIO only. +*/ +if (dev->xfer_shift ==ATA_SHIFT_PIO ) { +u32 ctcr1 =ioread32 (dev_mmio (ap, dev,PDC_CTCR1 )); + ctcr1 |= (1 <<25 ); +iowrite32 (ctcr1,dev_mmio (ap, dev,PDC_CTCR1 )); -/* -* Enable prefetch if the device support PIO only. -*/ -if (dev->xfer_shift ==ATA_SHIFT_PIO ) { -u32 ctcr1 =ioread32 (dev_mmio (ap, dev,PDC_CTCR1 )); - ctcr1 |= (1 <<25 ); -iowrite32 (ctcr1,dev_mmio (ap, dev,PDC_CTCR1 )); - -PDPRINTK ("Turn on prefetch\n" ); - }else { -pdc2027x_set_dmamode (ap, dev); - } +PDPRINTK ("Turn on prefetch\n" ); + }else { +pdc2027x_set_dmamode (ap, dev); } }return 0 ;
drivers/ata/pata_platform.c +6 -8
@@ -34,14 +34,12 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu {struct ata_device *dev; -ata_link_for_each_dev (dev, link) { -if (ata_dev_enabled (dev)) { -/* We don't really care */ - dev->pio_mode = dev->xfer_mode =XFER_PIO_0 ; - dev->xfer_shift =ATA_SHIFT_PIO ; - dev->flags |=ATA_DFLAG_PIO ; -ata_dev_printk (dev,KERN_INFO ,"configured for PIO\n" ); - } +ata_for_each_dev (dev, link,ENABLED ) { +/* We don't really care */ + dev->pio_mode = dev->xfer_mode =XFER_PIO_0 ; + dev->xfer_shift =ATA_SHIFT_PIO ; + dev->flags |=ATA_DFLAG_PIO ; +ata_dev_printk (dev,KERN_INFO ,"configured for PIO\n" ); }return 0 ; }
drivers/ata/pata_radisys.c +0 -1
@@ -81,7 +81,6 @@ static void radisys_set_piomode (struct ata_port *ap, struct ata_device *adev)* radisys_set_dmamode - Initialize host controller PATA DMA timings * @ap: Port whose timings we are configuring * @adev: Device to program -* @isich: True if the device is an ICH and has IOCFG registers * * Set MWDMA mode for device, in host controller PCI config space. *
drivers/ata/pata_rz1000.c +7 -9
@@ -38,15 +38,13 @@ static int rz1000_set_mode(struct ata_link *link, struct ata_device **unused) {struct ata_device *dev; -ata_link_for_each_dev (dev, link) { -if (ata_dev_enabled (dev)) { -/* We don't really care */ - dev->pio_mode =XFER_PIO_0 ; - dev->xfer_mode =XFER_PIO_0 ; - dev->xfer_shift =ATA_SHIFT_PIO ; - dev->flags |=ATA_DFLAG_PIO ; -ata_dev_printk (dev,KERN_INFO ,"configured for PIO\n" ); - } +ata_for_each_dev (dev, link,ENABLED ) { +/* We don't really care */ + dev->pio_mode =XFER_PIO_0 ; + dev->xfer_mode =XFER_PIO_0 ; + dev->xfer_shift =ATA_SHIFT_PIO ; + dev->flags |=ATA_DFLAG_PIO ; +ata_dev_printk (dev,KERN_INFO ,"configured for PIO\n" ); }return 0 ; }
drivers/ata/pata_scc.c +0 -1
@@ -210,7 +210,6 @@ static void scc_set_piomode (struct ata_port *ap, struct ata_device *adev)* scc_set_dmamode - Initialize host controller PATA DMA timings * @ap: Port whose timings we are configuring * @adev: um -* @udma: udma mode, 0 - 6 * * Set UDMA mode for device. *
drivers/ata/pata_serverworks.c +0 -1
@@ -138,7 +138,6 @@ static struct sv_cable_table cable_detect[] = {/** * serverworks_cable_detect - cable detection * @ap: ATA port -* @deadline: deadline jiffies for the operation * * Perform cable detection according to the device and subvendor * identifications
drivers/ata/pata_sis.c +0 -1
@@ -112,7 +112,6 @@ static int sis_133_cable_detect(struct ata_port *ap)/** * sis_66_cable_detect - check for 40/80 pin * @ap: Port -* @deadline: deadline jiffies for the operation * * Perform cable detection on the UDMA66, UDMA100 and early UDMA133 * SiS IDE controllers.
drivers/ata/sata_mv.c +0 -1
@@ -1836,7 +1836,6 @@ static void mv_unexpected_intr(struct ata_port *ap, int edma_was_enabled)/** * mv_err_intr - Handle error interrupts on the port * @ap: ATA channel to manipulate -* @qc: affected command (non-NCQ), or NULL * * Most cases require a full reset of the chip's state machine, * which also performs a COMRESET.
drivers/ata/sata_sil.c +95 -3
134 lines not on this page · raw message
drivers/firmware/dmi_scan.c +16 -0
@@ -582,3 +582,19 @@ int dmi_walk(void (*decode)(const struct dmi_header *))return 0 ; }EXPORT_SYMBOL_GPL (dmi_walk); + +/** +* dmi_match - compare a string to the dmi field (if exists) +* +* Returns true if the requested field equals to the str (including NULL). +*/ +bool dmi_match (enum dmi_field f,const char *str) +{ +const char *info =dmi_get_system_info (f); + +if (info ==NULL || str ==NULL ) +return info == str; + +return !strcmp (info, str); +} +EXPORT_SYMBOL_GPL (dmi_match);
include/linux/dmi.h +3 -0
@@ -47,6 +47,7 @@ extern int dmi_name_in_vendors(const char *str);extern int dmi_name_in_serial (const char *str);extern int dmi_available;extern int dmi_walk (void (*decode)(const struct dmi_header *)); +extern bool dmi_match (enum dmi_field f,const char *str);#else
@@ -61,6 +62,8 @@ static inline int dmi_name_in_serial(const char *s) { return 0; }#define dmi_available 0static inline int dmi_walk (void (*decode)(const struct dmi_header *)) {return -1 ; } +static inline bool dmi_match (enum dmi_field f,const char *str) + {return false; }#endif
include/linux/libata.h +54 -17
90 lines not on this page · raw message