- 10 5月, 2016 7 次提交
-
-
由 Hannes Reinecke 提交于
Add NCQ encapsulation for ZAC MANAGEMENT OUT and evaluate NCQ Non-Data log pages to figure out if NCQ encapsulation is supported. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
ZAC drives implement a 'ZAC Management Out' command template, which maps onto the ZBC OUT command. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
ZAC drives implement a 'ZAC Management In' command template, which maps onto the ZBC IN command. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Some commands like FPDMA RECEIVE or NCQ NON DATA can encapsulate other commands to NCQ transport. So decode the subcmds, too. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
When reading the NCQ Send/Recv log it might actually not supported, thereby causing irritating messages 'READ LOG DMA EXT failed'. Instead we should be reading the log directory first to figure out if the log is actually supported before trying to access it. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
ACS-4 defines an NCQ encapsulation for READ LOG DMA EXT. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Define the NCQ NON DATA command and update libsas to handle it correctly. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 05 4月, 2016 2 次提交
-
-
由 Hannes Reinecke 提交于
ACS-4 defines a sense data reporting feature set. This patch implements support for it. tj: Cosmetic formatting updates. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Some newer devices support NCQ autosense (cf ACS-4), so we should be using it to retrieve the sense code and speed up recovery. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 11 2月, 2016 1 次提交
-
-
由 Arnd Bergmann 提交于
As reported by Soohoon Lee, the HDIO_GET_32BIT ioctl does not work correctly in compat mode with libata. I have investigated the issue further and found multiple problems that all appeared with the same commit that originally introduced HDIO_GET_32BIT handling in libata back in linux-2.6.8 and presumably also linux-2.4, as the code uses "copy_to_user(arg, &val, 1)" to copy a 'long' variable containing either 0 or 1 to user space. The problems with this are: * On big-endian machines, this will always write a zero because it stores the wrong byte into user space. * In compat mode, the upper three bytes of the variable are updated by the compat_hdio_ioctl() function, but they now contain uninitialized stack data. * The hdparm tool calling this ioctl uses a 'static long' variable to store the result. This means at least the upper bytes are initialized to zero, but calling another ioctl like HDIO_GET_MULTCOUNT would fill them with data that remains stale when the low byte is overwritten. Fortunately libata doesn't implement any of the affected ioctl commands, so this would only happen when we query both an IDE and an ATA device in the same command such as "hdparm -N -c /dev/hda /dev/sda" * The libata code for unknown reasons started using ATA_IOC_GET_IO32 and ATA_IOC_SET_IO32 as aliases for HDIO_GET_32BIT and HDIO_SET_32BIT, while the ioctl commands that were added later use the normal HDIO_* names. This is harmless but rather confusing. This addresses all four issues by changing the code to use put_user() on an 'unsigned long' variable in HDIO_GET_32BIT, like the IDE subsystem does, and by clarifying the names of the ioctl commands. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Reported-by: NSoohoon Lee <Soohoon.Lee@f5.com> Tested-by: NSoohoon Lee <Soohoon.Lee@f5.com> Cc: stable@vger.kernel.org Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 04 8月, 2015 2 次提交
-
-
由 Tejun Heo 提交于
This reverts commit 42b966fb. As implemented, ACS-4 sense reporting for ATA devices bypasses error diagnosis and handling in libata degrading EH behavior significantly. Revert the related changes for now. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Hannes Reinecke <hare@suse.de> Cc: stable@vger.kernel.org #v4.1+
-
由 Tejun Heo 提交于
This reverts commit fe7173c2. As implemented, ACS-4 sense reporting for ATA devices bypasses error diagnosis and handling in libata degrading EH behavior significantly. Revert the related changes for now. ATA_ID_COMMAND_SET_3/4 constants are not reverted as they're used by later changes. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Hannes Reinecke <hare@suse.de> Cc: stable@vger.kernel.org #v4.1+
-
- 15 7月, 2015 1 次提交
-
-
由 David Milburn 提交于
Since no longer limiting max_sectors to BLK_DEF_MAX_SECTORS (commit 34b48db6), data corruption may occur on ST380013AS drive configured on 82801JI (ICH10 Family) SATA controller. This patch will allow the driver to limit max_sectors as before # cat /sys/block/sdb/queue/max_sectors_kb 512 I was able to double the max_sectors_kb value up to 16384 on linux-4.2.0-rc2 before seeing corruption, but seems safer to use previous limit. Without this patch max_sectors_kb will be 32767. tj: Minor comment update. Reported-by: NJeff Moyer <jmoyer@redhat.com> Signed-off-by: NDavid Milburn <dmilburn@redhat.com> Signed-off-by: NTejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org # v3.19 and later Fixes: 34b48db6 ("block: remove artifical max_hw_sectors cap")
-
- 05 5月, 2015 1 次提交
-
-
由 Martin K. Petersen 提交于
Support for the READ/WRITE LOG DMA EXT commands can be signaled either in page 119 or page 120. We should check both pages. Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 27 3月, 2015 4 次提交
-
-
由 Hannes Reinecke 提交于
ACS-4 defines a sense data reporting feature set. This patch implements support for it. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Some newer devices support NCQ autosense (cf ACS-4), so we should be using it to retrieve the sense code and speed up recovery. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
ATA-8 defines bit 1 as 'ATA_SENSE', not 'ATA_IDX'. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
If READ_LOG_DMA_EXT is supported we should try to use it for reading the log pages. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 26 12月, 2014 1 次提交
-
-
由 Nicholas Krause 提交于
Changes the spelling typos of removeable to removable where ata_id_removeable is defined in ata.h and called in libata-scsi.c respectively. Signed-off-by: NNicholas Krause <xerofoify@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 27 10月, 2013 1 次提交
-
-
由 Robert Hancock 提交于
Add some missing command enumerations from the ATA-8 ACS-3 spec into include/linux/ata.h, and add the corresponding human-readable command descriptions in libata-eh.c. Signed-off-by: NRobert Hancock <hancockrwd@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 25 8月, 2013 1 次提交
-
-
由 Marc Carino 提交于
Add support for the following ATA opcodes, which are present in SATA 3.1 and T13 ATA ACS-3: SEND FPDMA QUEUED RECEIVE FPDMA QUEUED Signed-off-by: NMarc Carino <marc.ceeeee@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 16 7月, 2013 1 次提交
-
-
由 Sergei Shtylyov 提交于
Move 'struct ata_taskfile', ata_prot_flags() and their friends from <linux/ata.h> to <linux/libata.h>. They were misplaced from the beginning, as <linux/ata.h> should cover ATA/ATAPI and related standards only -- to which the aforementioned structure and function have only remote relation. I would have moved 'enum ata_tf_protocols' closely related to 'struct ata_taskfile' but it unfortunately gets used by 'drivers/ide/ide-ioctls.c'... Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 04 4月, 2013 1 次提交
-
-
由 Shan Hai 提交于
The function returns type of ATAPI drives so it should return integer value. The commit 4dce8ba9 (libata: Use 'bool' return value for ata_id_XXX) since v2.6.39 changed the type of return value from int to bool, the change would cause all of the ATAPI class drives to be treated as TYPE_TAPE and the max_sectors of the drives to be set to 65535 because of the commit f8d8e579(libata: increase 128 KB / cmd limit for ATAPI tape drives), for the function would return true for all ATAPI class drives and the TYPE_TAPE is defined as 0x01. Cc: stable@vger.kernel.org Signed-off-by: NShan Hai <shan.hai@windriver.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 15 1月, 2013 1 次提交
-
-
由 Shane Huang 提交于
NCQ capability was used to check availability of SATA Settings page from Identify Device Data Log, which contains DevSlp timing variables. It does not work on some HDDs and leads to error messages. IDENTIFY word 78 bit 5(Hardware Feature Control) can't work either because it is only the sufficient condition of Identify Device data log, not the necessary condition. This patch replaced ata_device->sata_settings with ->devslp_timing to only save DevSlp timing variables(8 bytes), instead of the whole SATA Settings page(512 bytes). Addresses https://bugzilla.kernel.org/show_bug.cgi?id=51881Reported-by: NBorislav Petkov <bp@alien8.de> Signed-off-by: NShane Huang <shane.huang@amd.com> Cc: stable@vger.kernel.org Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 14 12月, 2012 1 次提交
-
-
由 Jeff Garzik 提交于
This reverts commit de90cd71. Shane Huang writes: Please suspend this patch because I just received two new DevSlp drives but found word 78 bit 5 is _not_ set. I'm checking with the drive vendor whether he gave me the wrong information. If bit 5 is not the necessary and sufficient condition, I will implement another patch to replace ata_device->sata_settings into ->devslp_timing. Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 03 12月, 2012 1 次提交
-
-
由 Shane Huang 提交于
NCQ capability was used to check availability of SATA Settings page from Identify Device Data Log, which contains DevSlp timing variables. It does not work on some HDDs and leads to error messages. IDENTIFY word 78 bit 5(Hardware Feature Control) should be used. Quoting SATA spec 3.1: If Hardware Feature Control is supported, then: a) IDENTIFY DEVICE data word 78 bit 5 (see 13.2.1.18) shall be set to one; b) the SET FEATURES Select Hardware Feature Control subcommand shall be supported (see 13.3.8); c) page 08h of the Identify Device Data log (see 13.7.7) shall be supported; This patch is not tested on SATA HDD with DevSlp supported. Reported-by: NBorislav Petkov <bp@amd64.org> Signed-off-by: NShane Huang <shane.huang@amd.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 13 9月, 2012 2 次提交
-
-
由 Shane Huang 提交于
Device Sleep is a feature as described in AHCI 1.3.1 Technical Proposal. This feature enables an HBA and SATA storage device to enter the DevSleep interface state, enabling lower power SATA-based systems. Aggressive Device Sleep enables the HBA to assert the DEVSLP signal as soon as there are no commands outstanding to the device and the port specific Device Sleep idle timer has expired. This enables autonomous entry into the DevSleep interface state without waiting for software in power sensitive systems. This patch enables Aggressive Device Sleep only if both host controller and device support it. Tested on AMD reference board together with Device Sleep supported device sample. Signed-off-by: NShane Huang <shane.huang@amd.com> Reviewed-by: NAaron Lu <aaron.lwe@gmail.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Shane Huang 提交于
Define enumeration constants for IDENTIFY DEVICE words. Signed-off-by: NShane Huang <shane.huang@amd.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 29 6月, 2012 1 次提交
-
-
由 Lin Ming 提交于
Add a new flag ATA_DFLAG_DA to indicate that device supports "Device Attention". Acked-by: NAaron Lu <aaron.lu@amd.com> Signed-off-by: NLin Ming <ming.m.lin@intel.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 15 3月, 2011 1 次提交
-
-
由 Hannes Reinecke 提交于
Most ata_id_XXX inlines are simple tests, so we should set the return value to 'bool' here. Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
-
- 14 3月, 2011 1 次提交
-
-
由 Hannes Reinecke 提交于
As per SAT-3 the WWN ID should be included in the VPD page 0x83 (device identification) emulation. Signed-off-by: NHannes Reinecke <hare@suse.de> Acked-by: NTejun Heo <tj@kernel.org> Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
-
- 22 10月, 2010 1 次提交
-
-
由 Grant Grundler 提交于
This change enables my x86 machine to recognize and talk to a "Native 4K" SATA device. When I started working on this, I didn't know Matthew Wilcox had posted a similar patch 2 years ago: http://git.kernel.org/?p=linux/kernel/git/willy/ata.git;a=shortlog;h=refs/heads/ata-large-sectors Gwendal Grignou pointed me at the the above code and small portions of this patch include Matthew's work. That's why Mathew is first on the "Signed-off-by:". I've NOT included his use of a bitmap to determine 512 vs Native for ATA command block size - just used a simple table. And bugs are almost certainly mine. Lastly, the patch has been tested with a native 4K 'Engineering Sample' drive provided by Hitachi GST. Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com> Signed-off-by: NGrant Grundler <grundler@google.com> Reviewed-by: NGwendal Grignou <gwendal@google.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 20 5月, 2010 1 次提交
-
-
由 Tejun Heo 提交于
struct ata_prd and ap->prd are BMDMA specific. Add bmdma_ prefix to them and move them inside CONFIG_ATA_SFF. Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 09 4月, 2010 1 次提交
-
-
由 Mark Lord 提交于
Most drives from Seagate, Hitachi, and possibly other brands, do not allow LBA28 access to sector number 0x0fffffff (2^28 - 1). So instead use LBA48 for such accesses. This bug could bite a lot of systems, especially when the user has taken care to align partitions to 4KB boundaries. On misaligned systems, it is less likely to be encountered, since a 4KB read would end at 0x10000000 rather than at 0x0fffffff. Signed-off-by: NMark Lord <mlord@pobox.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 02 3月, 2010 1 次提交
-
-
由 Ben Gardner 提交于
I have a Delkin Devices compact flash card that isn't being recognized using the SATA/PATA drivers. The card is recognized and works with the deprecated ATA drivers. The error I am seeing is: ata1.00: failed to IDENTIFY (device reports invalid type, err_mask=0x0) I tracked it down to ata_id_is_cfa() in include/linux/ata.h. The Delkin card has id[0] set to 0x844a and id[83] set to 0. This isn't what the kernel expects and is probably incorrect. The simplest work-around is to add a check for 0x844a to ata_id_is_cfa(). Signed-off-by: NBen Gardner <gardner.ben@gmail.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 04 2月, 2010 1 次提交
-
-
由 Christoph Hellwig 提交于
The value we get from the low byte of the ATA_ID_SECTOR_SIZE word is not not a plain multiple, but the log of it, so fix the helper to give the correct answer. Without this we'll get an incorrect minimal I/O size in the block limits VPD page for 4k sector drives. Also change the return value of ata_id_logical_per_physical_sectors to u16 for the unlikely case of very large logical sectors. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 04 12月, 2009 2 次提交
-
-
由 Martin K. Petersen 提交于
ata_set_lba_range_entries used the variable max for two different things which was confusing. Make the function take a buffer size in bytes as argument and return the used buffer size upon completion. Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
由 Martin K. Petersen 提交于
Our current TRIM payload is a single sector that can accommodate 64 * 65535 blocks being unmapped. Report this value in the Block Limits Maximum Unmap LBA count field. If a storage device supports TRIM and the DRAT and RZAT bits are set, report TPRZ=1 in Read Capacity(16). Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 03 12月, 2009 1 次提交
-
-
由 Christoph Hellwig 提交于
Add support for the ATA TRIM command in libata. We translate a WRITE SAME 16 command with the unmap bit set into an ATA TRIM command and export enough information in READ CAPACITY 16 and the block limits EVPD page so that the new SCSI layer discard support will driver this for us. Note that I hardcode the WRITE_SAME_16 opcode for now as the patch to introduce the symbolic is not in 2.6.32 yet but only in the SCSI tree - as soon as it is merged we can fix it up to properly use the symbolic name. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-
- 06 10月, 2009 1 次提交
-
-
由 Tejun Heo 提交于
Currently libata-acpi can only filter DIPM among SATA feature enables via _GTF. This patch adds the capability to filter out FPDMA non-zero offset, in-order guarantee and auto-activation. Signed-off-by: NTejun Heo <tj@kernel.org> Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
-