summaryrefslogtreecommitdiffstats
path: root/drivers/ata
Commit message (Collapse)AuthorAgeFilesLines
* pata_pcmcia: Switch to ata_sff_port_startAlan Cox2007-07-031-1/+1
| | | | | | | | | PCMCIA doesn't use DMA and as this driver is used on many platforms we don't want it to fail on those that define the DMA alloc API as a NULL return Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_pdc202xx_old: Correct cable detect logicAlan Cox2007-07-031-2/+2
| | | | | | | We got it backwards and now the other detects are fixed it shows up Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ata_generic: Check the right register for the DMA enabled flagsAlan Cox2007-07-031-1/+1
| | | | | | | Mirrors change in IT821X Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_ali: fix UDMA settingsChuck Ebbert2007-07-031-4/+4
| | | | | | | | | This patch was found to fix some of the problems with the pata_ali driver. https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=156482 Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sata_mv: PCI-ID for Adaptec 1430SA SATA ControllerFlorian Attenberger2007-07-031-0/+3
| | | | | Signed-off-by: Florian Attenberger <valdyn@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: fix assigned IRQ reportingTejun Heo2007-07-033-5/+11
| | | | | | | | | | | | | | host->irq and host->irq2 should be set before ata_host_register() for IRQ reporting to work. Move up host->irq assignment in ata_host_activate() and add it to ata_pci_init_one() native path and pata_cs5520. The port info printing in ata_host_register() doesn't fit all the different controllers. It should probably be moved out to LLDs with some helpers in the future. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [libata] sata_nv: undo merge errorJeff Garzik2007-07-021-1/+0
| | | | | | Only the ADMA entry was supposed to be able to change queue depth. Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: PATA-mode fixes for sis_sataUwe Koziolek2007-07-023-23/+64
| | | | | | | | | | | | | | | | Changed PATA handler for PATA-ports used by sata_sis. This patch was originally submitted by Jeff Garzik. Added PCI-ID 1180 for SiS966 Controller in pata_sis. The 1180 mode is fully compatible to other SiS PATA-controller. The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis. 1183 is not working if simply added to pata_sis. This handling fixes issues with SiS968. Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: add HTS541616J9SA00 to NCQ blacklistTejun Heo2007-07-021-0/+1
| | | | | | | | Another member of HTS5416* family doing spurious NCQ completion. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Enrico Sardi <enricoss@tiscali.it> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sata_nv: allow changing queue depthRobert Hancock2007-07-021-0/+2
| | | | | | | | | The sata_nv driver was missing the change_queue_depth hook in the SCSI host template which the other NCQ-capable libata drivers had. This made it impossible to change the queue depth by user request. Add this in. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sata_inic162x: disable LBA48 devicesTejun Heo2007-07-021-0/+7
| | | | | | | | | sata_inic162x can't do LBA48 properly yet and is likely to corrupt data on drives larger than LBA28 limit. Disable LBA48 devices during device configuration. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: remove reading alt_status from ata_hsm_qc_complete()Albert Lee2007-07-021-2/+0
| | | | | | | | In ata_hsm_qc_complete(): Calling ata_altstatus() after the qc is completed might race with next qc. Remove it. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: pata_pdc2027x PLL input clock fixAlbert Lee2007-07-021-2/+9
| | | | | | | | | | | | | | | Recently the PLL input clock of pata_pdc2027x is sometimes detected higer than expected (e.g. 20.027 MHz compared to 16.714 MHz). It seems sometimes the mdelay() function is not as precise as it used to be. Per Alan's advice, HT or power management might affect the precision of mdelay(). This patch calls gettimeofday() to mesure the time elapsed and calculate the PLL input clock accordingly. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* scsi disk help file is not completeRandy Dunlap2007-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | On Mon, 11 Jun 2007 20:28:16 +0200 api wrote: > Good day, > When doing make menuconfig one comes across CONFIG_BLK_DEV_SD. > The help file states that this is for scsi disks.NO MENTION IS MADE THAT > IT IS NEEDE FOR SATA DISKS AS WELL! > Would have saved me a lot of time if the help was up to date. > I hope this can be changed so others can make a kernel for sata systems > quicker. From: Randy Dunlap <randy.dunlap@oracle.com> Add help info for BLK_DEV_SD referring to its use in SATA or PATA driver configurations. Add help text for "ATA" indicating that it probably needs some SCSI config symbols enabled in order to be useful. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: kill ATA_HORKAGE_DMA_RW_ONLYTejun Heo2007-06-271-6/+1
| | | | | | | | | | ATA_HORKAGE_DMA_RW_ONLY for TORiSAN is verified to be subset of using DMA for ATAPI commands which aren't aligned to 16 bytes. As libata now doesn't use DMA for unaligned ATAPI commands, the horkage is redundant. Kill it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: use PIO for non-16 byte aligned ATAPI commandsTejun Heo2007-06-271-23/+10
| | | | | | | | | | | | | | | | | | | | | | | The IDE driver used DMA for ATAPI commands if READ/WRITE command is multiple of sector size or sg command is multiple of 16 bytes. For libata, READ/WRITE sector alignment is guaranteed by the high level driver (sr), so we only have to worry about the 16 byte alignment. This patch makes ata_check_atapi_dma() always request PIO for all data transfer commands which are not multiple of 16 bytes. The following reports are related to this problem. http://bugzilla.kernel.org/show_bug.cgi?id=8605 (confirmed) http://thread.gmane.org/gmane.linux.kernel/476620 (confirmed) https://bugzilla.novell.com/show_bug.cgi?id=229260 (probably) Albert first pointed out the difference between IDE and libata. Kudos to him. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: call ata_check_atapi_dma() with qc better preparedTejun Heo2007-06-271-12/+8
| | | | | | | | | | In atapi_xlat(), prepare qc better before calling ata_check_atapi_dma() such that ata_check_atapi_dma() can use info from qc. While at it, reformat weird looking if/else block in the function. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: fix infinite EH waiting bugTejun Heo2007-06-271-0/+1
| | | | | | | | | | When EH gives up after repeated exceptions, it doesn't't clear the PENDING bit on exit which leaves PENDING bit set without EH actually scheduled. This makes ata_port_wait_eh() to wait forever makes rmmod hang on such port. Fix it by clearing the flag. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: fix ata_dev_disable()Tejun Heo2007-06-271-2/+3
| | | | | | | Fix silly condition check bug in ata_dev_disable(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_it821x: fix section mismatch warningRandy Dunlap2007-06-271-1/+1
| | | | | | | | | | | Fix section mismatch when CONFIG_HOTPLUG=n (but functions are used for resume): WARNING: drivers/ata/pata_it821x.o(.text+0x3f): Section mismatch: reference to .init.text: (between 'it821x_reinit_one' and 'it821x_program_udma') WARNING: drivers/ata/pata_it821x.o(.text+0x691): Section mismatch: reference to .init.text: (between 'it821x_init_one' and 'it821x_passthru_set_dmamode') Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: remove unused variable from ata_eh_reset()Tejun Heo2007-06-271-3/+1
| | | | | | | Removed unused variable did_followup_srst from ata_eh_reset(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: be less verbose about hpaTejun Heo2007-06-271-6/+5
| | | | | | | | | There's no reason to print out hpa related messages when HPA is not active. Kill the unconditional message and add a warning message which is printed if HPA size is smaller than the current size. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: kill non-sense warning messageTejun Heo2007-06-271-2/+0
| | | | | | | | | prereset() is now allowed to set flag for unsupported reset method. EH layer is responsible for selecting the fallback. Remove non-sense warning message. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* HPT374 is UDMA100 not UDMA133Alan Cox2007-06-271-2/+2
| | | | | | | Propogate change from drivers/ide Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* fix module_param mistake in it821xStas Sergeev2007-06-201-1/+1
| | | | | | | | | | The attached patch fixes a trivial mistake in a MODULE_PARAM_DESC of pata_it821x driver. The parameter name in MODULE_PARAM_DESC should match the one in module_param_named. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ahci: fix PORTS_IMPL overrideTejun Heo2007-06-201-1/+1
| | | | | | | | | | | | | If PORTS_IMPL register is zero, ahci initialize it to full mask corresponding to nr_ports in the CAP register. hpriv->cap, which is initialized at the end of the function, is incorrectly used as value of CAP causing ahci to always override PORTS_IMPL to 0x1 if it's zero. Fix it. This fixes a bug where early ich6 ahci can only access the first port. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* kerneldoc fix in libataHenrik Kretzschmar2007-06-201-1/+1
| | | | | | | Fix parameter name from ata_dev_reread_id() in libata-core.c for kerneldoc. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: more NONCQ devicesTejun Heo2007-06-201-0/+2
| | | | | | | | | More for the NCQ blacklist. One hitachi and one raptor. Other members of these families of drives are already on the list, so no surprises. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* pata_it821x: (partially) fix DMA in RAID modeBartlomiej Zolnierkiewicz2007-06-201-8/+3
| | | | | | | | | | | | | | | | | | | | Code intended to check DMA status was checking DMA command register. Moreover firmware seems to "forget" to set DMA capable bit for the slave device (at least in RAID mode but without ITE RAID volumes) so check device ID for DMA capable bit when deciding whether to use DMA and remove DMA status check completely. Thanks to Pavol Simo for the bugreport and testing the initial fix. This change unfortunately still doesn't fix DMA in RAID mode (which works fine with IDE it821x) but Alan is working on the missing pieces (pata_it821x vs libata EH issues). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* PATA: Add the MCP73/77 support to PATA driverPeer Chen2007-06-201-0/+2
| | | | | | | | Add the MCP73/MCP77 support to PATA driver. The patch base on kernel 2.6.22-rc4 Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: limit post SRST nsect/lbal wait to ~100msTejun Heo2007-06-111-13/+19
| | | | | | | | | | | | | | | | | | | After SRST, libata used to wait for nsect/lbal to be set to 1/1 for the slave device. However, some ATAPI devices don't set nsect/lbal after SRST and the wait itself isn't too useful as we're gonna wait for !BSY right after that anyway. Before reset-seq update, nsect/lbal wait failure used to be ignored and caused 30sec delay during detection. After reset-seq, all timeouts are considered error conditions making libata fail to detect such ATAPI devices. This patch limits nsect/lbal wait to around 100ms. This should give acceptable behavior to such ATAPI devices while not disturbing the heavily used code path too much. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: force PIO on IOMEGA ZIP 250 ATAPITejun Heo2007-06-111-0/+1
| | | | | | | | | | | IOMEGA ZIP 250 ATAPI claims MWDMA0 support but fails SETXFERMODE if asked to configure itself to MWDMA0. Force PIO. This fixes bugzilla bug#8497. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Calvin Walton <calvin.walton@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata passthru: update cached device paramtersAlbert Lee2007-06-091-6/+16
| | | | | | | | | INIT_DEV_PARAMS and SET_MULTI_MODE change the device parameters cached by libata. Re-read IDENTIFY DEVICE info and update the cached device paramters when seeing these commands. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata passthru: always enforce correct DEV bitAlbert Lee2007-06-091-6/+4
| | | | | | | | Always enforce correct DEV bit since we know which drive the command is targeted. SAT demands to ignore the DEV bit, too. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata passthru: map UDMA protocolsAlbert Lee2007-06-091-2/+2
| | | | | | | Map the ATA passthru UDMA protocols to ATA_PROT_DMA. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata passthru: support PIO multi commandsAlbert Lee2007-06-091-4/+16
| | | | | | | support the pass through of PIO multi commands. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata passthru: update protocol numbersAlbert Lee2007-06-091-8/+7
| | | | | | | Update the ATA passthru protocol numbers according to the new spec. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: Correct abuse of languageAlan Cox2007-06-091-1/+1
| | | | | | | | The controller is not reporting an unlawful type, it is reporting an invalid type. Illegal specifically means "prohibited by law" Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata-core/sff: Fix multiple assumptions about DMAAlan Cox2007-06-092-8/+30
| | | | | | | | | | | | | | | The ata IRQ ack functions are only used when debugging. Unfortunately almost every controller that calls them can cause crashes in some configurations as there are missing checks for bmdma presence. In addition ata_port_start insists of installing DMA buffers and pad buffers for controllers regardless. The SFF controllers actually need to make that decision dynamically at controller setup time and all need the same helper - so we add ata_sff_port_start. Future patches will switch the SFF drivers to use this. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ahci: Add MCP73/MCP77 support to AHCI driverPeer Chen2007-06-091-0/+24
| | | | | | | Add the MCP73/MCP77 support to ahci driver. Signed-off-by: Peer Chen <peerchen@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: fix hw_sata_spd_limit initializationTejun Heo2007-06-091-1/+2
| | | | | | | | | hw_sata_spd_limit used to be incorrectly initialized to zero instead of UINT_MAX if SPD is zero in SControl register. This breaks PHY speed down. Fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: print device model and firmware revision for ATAPI devicesAlbert Lee2007-06-091-8/+10
| | | | | | | | For ATA/CFA devices, libata prints out the device model and firmware revision. Do the same for ATAPI devices. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: fix probe time irq printoutsOlof Johansson2007-06-091-0/+3
| | | | | | | | | | | | | | Most drivers don't seem to fill out the host->irq field, resulting in the wrong (no) irq being reported at probe time. For example, sil24 on my system: ata1: SATA max UDMA/100 cmd 0xd00008009001f000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0 ata2: SATA max UDMA/100 cmd 0xd000080090021000 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 0 Since they're allocated and set up in ata_host_activate(), just save them away there. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* libata: disable NCQ for HITACHI HTS541680J9SA00/SB21C7EPTejun Heo2007-06-091-0/+2
| | | | | | | | HITACHI HTS541680J9SA00/SB21C7EP spuriously completes NCQ commands. Blacklist it for NCQ. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* remove unused variable in pata_isapnpYoichi Yuasa2007-06-091-1/+0
| | | | | | | This patch has removed unused variable in pata_ispnp. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sata_promise: use TF interface for polling NODATA commandsTejun Heo2007-06-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | sata_promise uses two different command modes - packet and TF. Packet mode is intelligent low-overhead mode while TF is the same old taskfile interface. As with other advanced interface (ahci/sil24), ATA_TFLAG_POLLING has no effect in packet mode. However, PIO commands are issued using TF interface in polling mode, so pdc_interrupt() considers interrupts spurious if ATA_TFLAG_POLLING is set. This is broken for polling NODATA commands because command is issued using packet mode but the interrupt handler ignores it due to ATA_TFLAG_POLLING. Fix pdc_qc_issue_prot() such that ATA/ATAPI NODATA commands are issued using TF interface if ATA_TFLAG_POLLING is set. This patch fixes detection failure introduced by polling SETXFERMODE. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Mikael Pettersson <mikpe@it.uu.se> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [ATA]: Back out bogus (SPARC64 && !PCI) Kconfig depends.David S. Miller2007-06-041-1/+0
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* libata: always use polling SETXFERTejun Heo2007-06-042-15/+10
| | | | | | | | | | | | | | | | | | | | | | Several people have reported LITE-ON LTR-48246S detection failed because SETXFER fails. It seems the device raises IRQ too early after SETXFER. This is controller independent. The same problem has been reported for different controllers. So, now we have pata_via where the controller raises IRQ before it's ready after SETXFER and a device which does similar thing. This patch makes libata always execute SETXFER via polling. As this only happens during EH, performance impact is nil. Setting ATA_TFLAG_POLLING is also moved from issue hot path to ata_dev_set_xfermode() - the only place where SETXFER can be issued. Note that ATA_TFLAG_POLLING applies only to drivers which implement SFF TF interface and use libata HSM. More advanced controllers ignore the flag. This doesn't matter for this fix as SFF TF controllers are the problematic ones. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [ATA]: Don't allow to enable this for SPARC64 without PCI.David S. Miller2007-06-031-0/+1
| | | | | | Based upon a report from Meelis Roos. Signed-off-by: David S. Miller <davem@davemloft.net>
* [libata] Add drive to NCQ blacklistJeff Garzik2007-05-281-0/+1
| | | | | | Contributed by Simon Griph. Signed-off-by: Jeff Garzik <jeff@garzik.org>
OpenPOWER on IntegriCloud