- 10 5月, 2016 4 次提交
-
-
由 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 提交于
If a device is disabled after error recovery it doesn't make any sense to generate an ATA sense, but we should rather return a generic sense code indicating the device is gone. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 05 4月, 2016 11 次提交
-
-
由 Hannes Reinecke 提交于
Whenever the sense key is set to 'invalid parameter' we should be filling out the sense-key specific information field in the sense buffer. tj: Added description of @fp for ata_mselect_*(). Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
When generating a sense code of 'Invalid field in CDB' we should be setting the bit pointer where appropriate. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
If the sense code is 'Invalid field in CDB' we should be setting the field pointer to the offending byte. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Implement MODE SELECT for the control mode page to allow the OS to switch to descriptor sense. tj: Dropped s/sb/cmd->sense_buffer/ in ata_gen_ata_sense(). Added @dev description to ata_msense_ctl_mode(). Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Generate ATA pass-through sense for both fixed and descriptor format sense. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Use ata_scsi_set_sense() throughout to ensure the sense code format is consistent. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
If NCQ autosense or the sense data reporting feature is enabled the LBA of the offending command should be stored in the sense data 'information' field. tj: s/(u64)-1/U64_MAX/ Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Use scsi_set_sense_information() instead of hand-crafted function. Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
Return U64_MAX if ata_tf_read_block() could not decode the LBA address, and do not set the information sense descriptor in ata_gen_ata_sense() in these cases. tj: s/(u64)-1/U64_MAX/ Signed-off-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Hannes Reinecke 提交于
ata_to_sense_error() is called conditionally, so we should be generating a default sense if the condition is not met. Signed-off-by: NHannes Reinecke <hare@suse.com> 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>
-
- 19 2月, 2016 1 次提交
-
-
由 Tejun Heo 提交于
ata_scsi_park_show() was pairing spin_lock_irqsave() with spin_unlock_irq(). As the function is always called with irq enabled, it didn't actually break anything. Use spin_lock_irq() instead. Signed-off-by: NTejun Heo <tj@kernel.org> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Cc: Elias Oltmanns <eo@nebensachen.de>
-
- 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>
-
- 10 11月, 2015 1 次提交
-
-
由 Christoph Hellwig 提交于
This patch changes the !blk-mq path to the same defaults as the blk-mq I/O path by always enabling block tagging, and always using host wide tags. We've had blk-mq available for a few releases so bugs with this mode should have been ironed out, and this ensures we get better coverage of over tagging setup over different configs. Signed-off-by: NChristoph Hellwig <hch@lst.de> Acked-by: NJens Axboe <axboe@kernel.dk> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
-
- 27 10月, 2015 2 次提交
-
-
由 Vinayak Kale 提交于
Enable LBA in taskfile flags for ata_scsi_pass_thru() Signed-off-by: NVinayak Kale <vinayak.kale@seagate.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
由 Vinayak Kale 提交于
This patch is needed to make NCQ commands with FPDMA protocol value (eg READ/WRITE FPDMA) work over SCSI Generic (SG) interface. Signed-off-by: NVinayak Kale <vinayak.kale@seagate.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 13 10月, 2015 1 次提交
-
-
由 Christoph Hellwig 提交于
When calling ->done before releasing resources we could run into a race where the SCSI midlayer sends another command and races with the resources beeing manipulated. For libata this can't currently happen as synchronization happens at a higher level, but I'd still like to fix it to future proof libata and to avoid copy & paste into SCSI drivers where this pattern has led to reproducible crashes. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 05 10月, 2015 1 次提交
-
-
由 Christoph Hellwig 提交于
Remove an incorrect comment and untangle an if statement in ata_scsi_qc_complete. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 01 10月, 2015 1 次提交
-
-
由 Manuel Lauss 提交于
If the AHCI ports' HPCP or ESP bits are set, the port should be considered external (e.g. eSATA) and is marked as removable. Userspace tools like udisks then treat it like an usb drive. With this patch applied, when I plug a drive into the esata port, KDE pops up a window asking what to do with the drives(s), just like it does for any random USB stick. Removability is indicated to the upper layers by way of the SCSI RMB bit, as I haven't found another way to signal userspace to treat a sata disk like any usb stick. Signed-off-by: NManuel Lauss <manuel.lauss@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 04 8月, 2015 1 次提交
-
-
由 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+
-
- 03 8月, 2015 1 次提交
-
-
由 Tejun Heo 提交于
This reverts commit a1524f22. 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+
-
- 24 7月, 2015 1 次提交
-
-
由 Sagi Grimberg 提交于
Make sure that the input sense buffer has sufficient length to fit the information descriptor (12 additional bytes). Modify scsi_set_sense_information to receive the sense buffer length and adjust its callers scsi target and libata. (Fix patch fuzz in scsi_set_sense_information - nab) Reported-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NSagi Grimberg <sagig@mellanox.com> Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Cc: Tejun Heo <tj@kernel.org> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
-
- 15 7月, 2015 1 次提交
-
-
由 Arne Fitzenreiter 提交于
Some devices lose data on TRIM whether queued or not. This patch adds a horkage to disable TRIM. tj: Collapsed unnecessary if() nesting. Signed-off-by: NArne Fitzenreiter <arne_f@ipfire.org> Signed-off-by: NTejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org
-
- 27 3月, 2015 5 次提交
-
-
由 Hannes Reinecke 提交于
If NCQ autosense or the sense data reporting feature is enabled the LBA of the offending command should be stored in the sense data 'information' field. 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 提交于
Use the bit definitions for better readability. 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 提交于
Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 25 3月, 2015 1 次提交
-
-
由 Tejun Heo 提交于
sata_sil24 for some reason pukes when tags are allocated round-robin which helps tag ordered controllers. To work around the issue, 72dd299d ("libata: allow sata_sil24 to opt-out of tag ordered submission") introduced ATA_FLAG_LOWTAG which tells libata tag allocation to do lowest-first. However, with the recent switch to blk-mq tag allocation, the liata tag allocation code path is no longer used and the workaround is now implemented in the block layer and selected by setting scsi_host_template->tag_alloc_policy to BLK_TAG_ALLOC_FIFO. See 9269e234 ("libata: make sata_sil24 use fifo tag allocator"). This leaves ATA_FLAG_LOWTAG withoout any actual user. Remove it. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Shaohua Li <shli@fb.com> Cc: Dan Williams <dan.j.williams@intel.com>
-
- 25 1月, 2015 1 次提交
-
-
由 Shaohua Li 提交于
Basically move the sas ata tag allocation to libata-scsi.c to make it clear these staffs are just for sas. Signed-off-by: NShaohua Li <shli@fb.com> Signed-off-by: NJens Axboe <axboe@fb.com>
-
- 24 1月, 2015 1 次提交
-
-
由 Shaohua Li 提交于
libata uses its own tag management which is duplication and the implementation is poor. And if we switch to blk-mq, tag is build-in. It's time to switch to generic taging. The SAS driver has its own tag management, and looks we can't directly map the host controler tag to SATA tag. So I just bypassed the SAS case. I changed the code/variable name for the tag management of libata to make it self contained. Only sas will use it. Later if libsas implements its tag management, the tag management code in libata can be deleted easily. Cc: Jens Axboe <axboe@fb.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: NShaohua Li <shli@fb.com> Acked-by: NTejun Heo <tj@kernel.org> Signed-off-by: NJens Axboe <axboe@fb.com>
-
- 08 1月, 2015 1 次提交
-
-
由 Martin K. Petersen 提交于
As defined, the DRAT (Deterministic Read After Trim) and RZAT (Return Zero After Trim) flags in the ATA Command Set are unreliable in the sense that they only define what happens if the device successfully executed the DSM TRIM command. TRIM is only advisory, however, and the device is free to silently ignore all or parts of the request. In practice this renders the DRAT and RZAT flags completely useless and because the results are unpredictable we decided to disable discard in MD for 3.18 to avoid the risk of data corruption. Hardware vendors in the real world obviously need better guarantees than what the standards bodies provide. Unfortuntely those guarantees are encoded in product requirements documents rather than somewhere we can key off of them programatically. So we are compelled to disabling discard_zeroes_data for all devices unless we explicitly have data to support whitelisting them. This patch whitelists SSDs from a few of the main vendors. None of the whitelists are based on written guarantees. They are purely based on empirical evidence collected from internal and external users that have tested or qualified these drives in RAID deployments. The whitelist is only meant as a starting point and is by no means comprehensive: - All intel SSD models except for 510 - Micron M5?0/M600 - Samsung SSDs - Seagate SSDs Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NChristoph Hellwig <hch@lst.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>
-
- 05 12月, 2014 1 次提交
-
-
由 Nicholas Krause 提交于
Remove the FIXME comment in atapi_request_sense() asking whether memset of sense buffer is necessary. The buffer may be partially or fully filled by the device. We want it to be cleared. tj: Updated description. Signed-off-by: NNicholas Krause <xerofoify@gmail.com> Signed-off-by: NTejun Heo <tj@kernel.org>
-
- 25 11月, 2014 1 次提交
-
-
由 Hannes Reinecke 提交于
SPC-3 defines SERVICE ACTION IN(12) and SERVICE ACTION IN(16). So rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to be consistent with SPC and to allow for better distinction. Signed-off-by: NHannes Reinecke <hare@suse.de> Tested-by: NRobert Elliott <elliott@hp.com> Reviewed-by: NRobert Elliott <elliott@hp.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 24 11月, 2014 1 次提交
-
-
由 Christoph Hellwig 提交于
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NMike Christie <michaelc@cs.wisc.edu> Reviewed-by: NHannes Reinecke <hare@suse.de>
-