aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/request.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-17scsi: isci: Fix an error code problem in isci_io_request_build()Su Hui1-1/+1
Clang static complains that Value stored to 'status' is never read. Return 'status' rather than 'SCI_SUCCESS'. Fixes: f1f52e75939b ("isci: uplevel request infrastructure") Signed-off-by: Su Hui <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Artur Paszkiewicz <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2023-12-05scsi: isci: Remove redundant check in isci_task_request_build()Artem Chernyshev1-4/+1
sci_task_request_construct_ssp() has invariant return. Change this function to void and get rid of unnecessary checks. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
2023-08-21scsi: libsas: Delete sas_ssp_task.task_prioJohn Garry1-1/+1
Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new driver"), sas_ssp_task.task_prio is never set, so delete it and any references which depend on it being set (all of them). Signed-off-by: John Garry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-05-23scsi: isci: Fix typo in commentJulia Lawall1-1/+1
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-19scsi: libsas: Use enum for response frame DATAPRES fieldJohn Garry1-3/+4
As defined in table 126 of the SAS spec 1.1, use an enum for the DATAPRES field, which makes reading the code easier. Also change sas_ssp_task_response() to use a switch statement, which is more suitable (than if-else), as suggested by Christoph. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Xiang Chen <[email protected]> Tested-by: Yihang Li <[email protected]> Tested-by: Damien Le Moal <[email protected]> Reviewed-by: Jack Wang <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: libsas: Drop SAS_TASK_AT_INITIATORJohn Garry1-2/+1
This flag is now only ever set, so delete it. This also avoids a use-after-free in the pm8001 queue path, as reported in the following: https://lore.kernel.org/linux-scsi/[email protected]/T/#m28c94c6d3ff582ec4a9fa54819180740e8bd4cfb https://lore.kernel.org/linux-scsi/[email protected]/ [mkp: checkpatch + two SAS_TASK_AT_INITIATOR references] Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-02-11scsi: isci: Drop SAS_TASK_AT_INITIATOR check in isci_task_abort_task()John Garry1-8/+4
In the queue path, move around when we assign sas_task->lldd_task such that this pointer and the SAS_TASK_AT_INITIATOR flag are set atomically. It is also not required to clear SAS_TASK_AT_INITIATOR in isci_task_execute_task() error path as it is also cleared immediately after in isci_task_refuse() call. Now the following items may be considered: - SAS_TASK_STATE_DONE and SAS_TASK_AT_INITIATOR are mutually exclusive apart from possibly when SAS_TASK_STATE_DONE is set in sas_scsi_find_task(), but that is after .lldd_abort_task, i.e. the considered callback, is called. - If isci_task_refuse() is called in the queue path, then sas_task->lldd_task and SAS_TASK_AT_INITIATOR are cleared atomically in isci_task_refuse(). - In the completion path, SAS_TASK_STATE_DONE is set and SAS_TASK_AT_INITIATOR is cleared atomically before the sas_task.lldd_task is cleared later. So in isci_task_abort_task() if SAS_TASK_STATE_DONE is not set and sas_task.lldd_task is still set, then SAS_TASK_AT_INITIATOR must be set - so we can drop this check on SAS_TASK_AT_INITIATOR. [mkp: checkpatch] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2021-08-11scsi: isci: Use the proper SCSI midlayer interfaces for PIMartin K. Petersen1-2/+2
Use scsi_prot_ref_tag() instead of scsi_get_lba() to get the reference tag for a given I/O. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2021-06-02scsi: libsas: Introduce more SAM status code aliases in enum exec_statusBart Van Assche1-5/+5
This patch prepares for converting SAM status codes into an enum. Without this patch converting SAM status codes into an enumeration type would trigger complaints about enum type mismatches for the SAS code. Link: https://lore.kernel.org/r/[email protected] Cc: Hannes Reinecke <[email protected]> Cc: Artur Paszkiewicz <[email protected]> Cc: Jason Yan <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2021-03-18scsi: isci: request: Fix doc-rot issue relating to 'ireq' paramLee Jones1-1/+1
Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/request.c:496: warning: Function parameter or member 'ireq' not described in 'scu_sata_request_construct_task_context' drivers/scsi/isci/request.c:496: warning: Excess function parameter 'sci_req' description in 'scu_sata_request_construct_task_context' Link: https://lore.kernel.org/r/[email protected] Cc: Artur Paszkiewicz <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2021-03-18scsi: isci: request: Fix a myriad of kernel-doc issuesLee Jones1-30/+28
Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/request.c:211: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/request.c:414: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/request.c:472: warning: Function parameter or member 'ireq' not described in 'scu_ssp_task_request_construct_task_context' drivers/scsi/isci/request.c:472: warning: expecting prototype for The(). Prototype was for scu_ssp_task_request_construct_task_context() instead drivers/scsi/isci/request.c:501: warning: Function parameter or member 'ireq' not described in 'scu_sata_request_construct_task_context' drivers/scsi/isci/request.c:501: warning: expecting prototype for This method is will fill in the SCU Task Context for any type of SATA(). Prototype was for scu_sata_request_construct_task_context() instead drivers/scsi/isci/request.c:597: warning: Cannot understand * drivers/scsi/isci/request.c:785: warning: expecting prototype for sci_req_tx_bytes(). Prototype was for SCU_TASK_CONTEXT_SRAM() instead drivers/scsi/isci/request.c:1399: warning: Cannot understand * drivers/scsi/isci/request.c:1446: warning: Cannot understand * drivers/scsi/isci/request.c:2465: warning: Function parameter or member 'task' not described in 'isci_request_process_response_iu' drivers/scsi/isci/request.c:2465: warning: Excess function parameter 'sas_task' description in 'isci_request_process_response_iu' drivers/scsi/isci/request.c:2501: warning: Function parameter or member 'task' not described in 'isci_request_set_open_reject_status' drivers/scsi/isci/request.c:2524: warning: Function parameter or member 'idev' not described in 'isci_request_handle_controller_specific_errors' drivers/scsi/isci/request.c:2524: warning: Function parameter or member 'task' not described in 'isci_request_handle_controller_specific_errors' drivers/scsi/isci/request.c:3337: warning: Function parameter or member 'idev' not described in 'isci_io_request_build' drivers/scsi/isci/request.c:3337: warning: Excess function parameter 'sci_device' description in 'isci_io_request_build' [mkp: fix typo reported by checkpatch] Link: https://lore.kernel.org/r/[email protected] Cc: Artur Paszkiewicz <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: "Martin K. Petersen" <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2021-02-08scsi: isci: Remove redundant initialization of variable 'status'Yang Li1-6/+2
This patch removes unneeded return variables. It fixes the following warning detected by coccinelle: ./drivers/scsi/isci/request.c:1483:17-23: Unneeded variable: "status". Return "SCI_SUCCESS" on line 1503 ./drivers/scsi/isci/request.c:2157:17-23: Unneeded variable: "status". Return "SCI_SUCCESS" on line 2177 Link: https://lore.kernel.org/r/[email protected] Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2021-01-12scsi: isci: Remove the unneeded variable "status"YANG LI1-3/+1
The variable 'status' is being initialized with SCI_SUCCESS and never updated later with a new value. The initialization is redundant and can be removed. Link: https://lore.kernel.org/r/1609311860-102820-1-git-send-email-abaci-bugfix@linux.alibaba.com Reported-by: Abaci <[email protected]> Signed-off-by: YANG LI <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-23treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva1-1/+1
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <[email protected]>
2020-07-24scsi: isci: Remove redundant initialization of variable 'status'Colin Ian King1-1/+1
The variable 'status' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Addresses-Coverity: ("Unused value")
2019-06-20scsi: libsas: aic94xx: hisi_sas: mvsas: pm8001: Use dev_is_expander()John Garry1-1/+1
Many times in libsas, and in LLDDs which use libsas, the check for an expander device is re-implemented or open coded. Use dev_is_expander() instead. We rename this from sas_dev_type_is_expander() to not spill so many lines in referencing. Signed-off-by: John Garry <[email protected]> Reviewed-by: Jason Yan <[email protected]> Reviewed-by: Jack Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2019-06-18scsi: isci: Grammar s/the its/its/Geert Uytterhoeven1-3/+3
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-20scsi: isci: request: mark expected switch fall-throughGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, a dash is added as a token in order to separate the "Fall through" annotation from the rest of the comment on the same line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <[email protected]> Acked-by: Artur Paszkiewicz <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-10-16scsi: isci: Use proper enumerated type in atapi_d2h_reg_frame_handlerNathan Chancellor1-2/+2
Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/isci/request.c:1629:13: warning: implicit conversion from enumeration type 'enum sci_io_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = SCI_IO_FAILURE_RESPONSE_VALID; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/isci/request.c:1631:12: warning: implicit conversion from enumeration type 'enum sci_io_status' to different enumeration type 'enum sci_status' [-Wenum-conversion] status = SCI_IO_FAILURE_RESPONSE_VALID; ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ status is of type sci_status but SCI_IO_FAILURE_RESPONSE_VALID is of type sci_io_status. Use SCI_FAILURE_IO_RESPONSE_VALID, which is from sci_status and has SCI_IO_FAILURE_RESPONSE_VALID's exact value since that is what SCI_IO_FAILURE_RESPONSE_VALID is mapped to in the isci.h file. Link: https://github.com/ClangBuiltLinux/linux/issues/153 Signed-off-by: Nathan Chancellor <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-07-12scsi: isci: fix typo in function namesColin Ian King1-7/+7
There are a couple of typos in function names and spelling of request where the letters u and e are swapped: scu_ssp_reqeust_construct_task_context scu_sata_reqeust_construct_task_context Fix the spelling of request. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-11-14scsi: isci: fix typo in deg_dbg messageColin Ian King1-1/+1
Trivial fix to typo "repsonse" to "response" in dev_dbg message. Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2016-05-09libata/libsas: Define ATA_CMD_NCQ_NON_DATAHannes Reinecke1-1/+2
Define the NCQ NON DATA command and update libsas to handle it correctly. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2016-05-09libsas: enable FPDMA SEND/RECEIVEHannes Reinecke1-1/+3
Update libsas and dependent drivers to handle FPDMA SEND/RECEIVE correctly. Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2014-11-05libsas: use ata_dev_classify()Hannes Reinecke1-2/+2
Use the ata device class from libata in libsas instead of checking the supported command set and switch to using ata_dev_classify() instead of our own method. Cc: Tejun Heo <[email protected]> Cc: Dan Williams <[email protected]> Acked-by: Christoph Hellwig <[email protected]> Signed-off-by: Hannes Reinecke <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
2014-03-15[SCSI] isci: fix needless ata reset escalationsDan Williams1-6/+2
isci is needlessly tying libata's hands by returning SAM_STAT_CHECK_CONDITION to some ata errors. Instead, prefer SAS_PROTO_RESPONSE to let libata (via sas_ata_task_done()) disposition the device-to-host fis. For example isci is triggering an HSM Violation where AHCI is showing a simple media error for the same bus condition: isci: ata7.00: failed command: READ VERIFY SECTOR(S) ata7.00: cmd 40/00:01:00:00:00/00:00:00:00:00/e0 tag 0 res 01/04:00:00:00:00/00:00:00:00:00/e0 Emask 0x3 (HSM violation) ahci: ata6.00: failed command: READ VERIFY SECTOR(S) ata6.00: cmd 40/00:01:00:00:00/00:00:00:00:00/e0 tag 0 res 51/40:01:00:00:00/00:00:00:00:00/e0 Emask 0x9 (media error) Note that the isci response matches this from sas_ata_task_done(): /* We saw a SAS error. Send a vague error. */ [..] dev->sata_dev.fis[3] = 0x04; /* status err */ dev->sata_dev.fis[2] = ATA_ERR; The end effect is that isci is needlessly triggering hard resets when they are not necessary. Reported-by: Xun Ni <[email protected]> Tested-by: Nelson Cheng <[email protected]> Acked-by: Lukasz Dorau <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-07-24[SCSI] isci: fix breakage caused by >16byte CDB patchJames Bottomley1-1/+1
Oops, apparently no-one I cc'd at intel actually bothered to check this patch for the isci driver: commit e73823f7a2c921dcf068d34ea03bd682498d9e42 Author: James Bottomley <[email protected]> Date: Tue May 7 15:38:18 2013 -0700 [SCSI] libsas: implement > 16 byte CDB support sci_swab32_cpy needs multiples of four, so for commands that aren't that, it's rounding the wrong way. fix by doing (len+3)/4 instead of len/4. Reported-by: Tony Luck <[email protected]> Tested-by: Tony Luck <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-06-04[SCSI] libsas: implement > 16 byte CDB supportJames Bottomley1-2/+2
Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes or less. Instead do all copies via cmd->cmd_len (and use a pointer to this in the libsas task instead of a copy). Note that this still doesn't enable > 16 byte CDB support in the underlying drivers because their internal format has to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is different. the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all updated for this change. Cc: Lukasz Dorau <[email protected]> Cc: Maciej Patelczyk <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Jack Wang <[email protected]> Cc: Lindar Liu <[email protected]> Cc: Xiangliang Yu <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2013-05-10[SCSI] sas: unify the pointlessly separated enums sas_dev_type and ↵James Bottomley1-3/+3
sas_device_type These enums have been separate since the dawn of SAS, mainly because the latter is a procotol only enum and the former includes additional state for libsas. The dichotomy causes endless confusion about which one you should use where and leads to pointless warnings like this: drivers/scsi/mvsas/mv_sas.c: In function 'mvs_update_phyinfo': drivers/scsi/mvsas/mv_sas.c:1162:34: warning: comparison between 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare] Fix by eliminating one of them. The one kept is effectively the sas.h one, but call it sas_device_type and make sure the enums are all properly namespaced with the SAS_ prefix. Signed-off-by: James Bottomley <[email protected]>
2012-11-13[SCSI] isci: copy fis 0x34 response into proper bufferMaciej Patelczyk1-1/+1
SATA MICROCODE DOWNALOAD fails on isci driver. After receiving Register Device to Host (FIS 0x34) frame Initiator resets phy. In the frame handler routine response (FIS 0x34) was copied into wrong buffer and upper layer did not receive any answer which resulted in timeout and reset. This patch corrects this bug. Signed-off-by: Maciej Patelczyk <[email protected]> Signed-off-by: Lukasz Dorau <[email protected]> Cc: <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-09-01treewide: fix comment/printk/variable typosAnatol Pomozov1-1/+1
Signed-off-by: Anatol Pomozov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-05-17isci: Remove obviated host callback list.Jeff Skirvin1-10/+4
Since the callbacks to libsas now occur under scic_lock, there is no longer any reason to save the completed requests in a separate list for completion to libsas. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Restore the ATAPI device RNC management code.Jeff Skirvin1-0/+3
The ATAPI specific and STP general RNC suspension code had been incorrectly removed from the remote device code. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Add protocol indicator for TMF requests.Jeff Skirvin1-0/+6
Requests contructed as task management requests need to have the protocol indicator set so the completion decode can observe any RNC suspension conditions. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Save the suspension hint for upcoming suspensions.Jeff Skirvin1-2/+1
In the case of a suspend call while in SCI_RNC_POSTING or INVALIDATING states, the LLHANG detect needed to be saved so the upcoming suspension would enable it correctly. The unused suspend callback parameters were removed. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Fix the terminated I/O to not call sas_task_abort().Jeff Skirvin1-1/+1
This addresses a regression from the commit "isci: Redesign device suspension, abort, cleanup." in which the sas_task end condition for terminated I/Os was made to call back on sas_task_abort()". This commit will be rolled into the original. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Distinguish between remote device suspension casesJeff Skirvin1-1/+1
For NCQ error conditions among others, there is no need to enable the link layer hang detect timer. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Remove isci_device reqs_in_process and dev_node from isci_device.Jeff Skirvin1-12/+0
Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Redesign device suspension, abort, cleanup.Jeff Skirvin1-363/+146
This commit changes the means by which outstanding I/Os are handled for cleanup. The likelihood is that this commit will be broken into smaller pieces, however that will be a later revision. Among the changes: - All completion structures have been removed from the tmf and abort paths. - Now using one completed I/O list, with the I/O completed in host bit being used to select error or normal callback paths. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Terminate outstanding TCs on TX/RX RNC suspensions.Jeff Skirvin1-10/+12
TCs must only be terminated when RNCs are suspended. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Handle all suspending TC completionsJeff Skirvin1-11/+138
Add comprehensive decode for all TC completions that generate RNC suspensions. Note that this commit also removes unconditional resumptions of ATAPI devices when in the SCI_STP_DEV_ATAPI_ERROR state, and STP devices when in the SCI_STP_DEV_IDLE state. This is because the SCI_STP_DEV_IDLE and SCI_STP_DEV_ATAPI state entry functions manage the RNC resumption. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: refactor initialization for S3/S4Dan Williams1-2/+2
Based on an original implementation by Ed Nadolski and Artur Wojcik In preparation for S3/S4 support refactor initialization so that driver-load and resume-from-suspend can share the common init path of isci_host_init(). Organize the initialization into objects that are self-contained to the driver (initialized by isci_host_init) versus those that have some upward registration (initialized at allocation time asd_sas_phy, asd_sas_port, dma allocations). The largest change is moving the the validation of the oem and module parameters from isci_host_init() to isci_host_alloc(). The S3/S4 approach being taken is that libsas will be tasked with remembering the state of the domain and the lldd is free to be forgetful. In the case of isci we'll just re-init using a subset of the normal driver load path. [clean up some unused / mis-indented function definitions in host.h] Signed-off-by: Ed Nadolski <[email protected]> Signed-off-by: Artur Wojcik <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: kill sci_phy_protocol and sci_request_protocolDan Williams1-5/+5
Holdovers from the initial driver cleanup, replace with enum sas_protocol. Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: kill ->is_direct_attachedDan Williams1-3/+2
domain_device ->parent conveys the same information. Occurrences of ->is_direct_attached appear next to incomplete open-coded versions of dev_is_sata(), clean those up as well. Signed-off-by: Dan Williams <[email protected]>
2012-03-22Merge tag 'scsi-misc' of ↵Linus Torvalds1-201/+169
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 SCSI updates from James Bottomley: "The update includes the usual assortment of driver updates (lpfc, qla2xxx, qla4xxx, bfa, bnx2fc, bnx2i, isci, fcoe, hpsa) plus a huge amount of infrastructure work in the SAS library and transport class as well as an iSCSI update. There's also a new SCSI based virtio driver." * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (177 commits) [SCSI] qla4xxx: Update driver version to 5.02.00-k15 [SCSI] qla4xxx: trivial cleanup [SCSI] qla4xxx: Fix sparse warning [SCSI] qla4xxx: Add support for multiple session per host. [SCSI] qla4xxx: Export CHAP index as sysfs attribute [SCSI] scsi_transport: Export CHAP index as sysfs attribute [SCSI] qla4xxx: Add support to display CHAP list and delete CHAP entry [SCSI] iscsi_transport: Add support to display CHAP list and delete CHAP entry [SCSI] pm8001: fix endian issue with code optimization. [SCSI] pm8001: Fix possible racing condition. [SCSI] pm8001: Fix bogus interrupt state flag issue. [SCSI] ipr: update PCI ID definitions for new adapters [SCSI] qla2xxx: handle default case in qla2x00_request_firmware() [SCSI] isci: improvements in driver unloading routine [SCSI] isci: improve phy event warnings [SCSI] isci: debug, provide state-enum-to-string conversions [SCSI] scsi_transport_sas: 'enable' phys on reset [SCSI] libsas: don't recover end devices attached to disabled phys [SCSI] libsas: fixup target_port_protocols for expanders that don't report sata [SCSI] libsas: set attached device type and target protocols for local phys ...
2012-03-20scsi: remove the second argument of k[un]map_atomic()Cong Wang1-8/+8
Signed-off-by: Cong Wang <[email protected]>
2012-02-29[SCSI] isci: debug, provide state-enum-to-string conversionsDan Williams1-9/+16
Debugging the driver requires tracing the state transtions and tracing state names is less work than decoding numbers. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-02-29[SCSI] isci: stop interpreting ->lldd_lu_reset() as an ata soft-resetDan Williams1-190/+5
Driving resets from libsas-eh is pre-mature as libata will make a decision about performing a softreset. Currently libata determines whether to perform a softreset based on ata_eh_followup_srst_needed(), and none of those conditions apply to isci. Remove the srst implementation and translate ->lldd_lu_reset() for ata devices as a request to drive a reset via libata-eh. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-02-19[SCSI] libsas: remove ata_port.lock management duties from llddsDan Williams1-2/+1
Each libsas driver (mvsas, pm8001, and isci) has invented a different method for managing the ap->lock. The lock is held by the ata ->queuecommand() path. mvsas drops it prior to acquiring any internal locks which allows it to hold its internal lock across calls to task->task_done(). This capability is important as it is the only way the driver can flush task->task_done() instances to guarantee that it no longer has any in-flight references to a domain_device at ->lldd_dev_gone() time. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-02-19[SCSI] isci: T10 DIF supportDave Jiang1-0/+147
This allows the controller to do WRITE_INSERT and READ_STRIP for SAS disks that support protection information. SAS disks must be formatted with protection information to use this feature via sg_format. sg3_utils-1.32 -- sg_format version 1.19 20110730 sg_format usage: sg_format --format --verbose --pinfo /dev/sda Acked-by: Martin K. Petersen <[email protected]> Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2011-10-31[SCSI] isci: Remove redundant isci_request.ttype field.Jeff Skirvin1-33/+12
Use the existing IREQ_TMF flag as a request type indicator. Signed-off-by: Jeff Skirvin <[email protected]> Signed-off-by: Dan Williams <[email protected]> Signed-off-by: James Bottomley <[email protected]>