mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
scsi: qla1280: Prepare for enabling lock context analysis
Document locking requirements with __must_hold(). Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/ddbb3ac055d757d5113096ebda77dfa122606239.1790360262.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
5bb1688785
commit
23d5f939d9
|
|
@ -737,6 +737,7 @@ static void qla1280_mailbox_timeout(struct timer_list *t)
|
|||
static int
|
||||
_qla1280_wait_for_single_command(struct Scsi_Host *host, struct srb *sp,
|
||||
struct completion *wait)
|
||||
__must_hold(&host->host_lock)
|
||||
{
|
||||
int status = FAILED;
|
||||
struct scsi_cmnd *cmd = sp->cmd;
|
||||
|
|
@ -754,6 +755,7 @@ _qla1280_wait_for_single_command(struct Scsi_Host *host, struct srb *sp,
|
|||
|
||||
static int
|
||||
qla1280_wait_for_single_command(struct Scsi_Host *host, struct srb *sp)
|
||||
__must_hold(&host->host_lock)
|
||||
{
|
||||
DECLARE_COMPLETION_ONSTACK(wait);
|
||||
|
||||
|
|
@ -764,6 +766,7 @@ qla1280_wait_for_single_command(struct Scsi_Host *host, struct srb *sp)
|
|||
static int
|
||||
qla1280_wait_for_pending_commands(struct scsi_qla_host *ha, struct Scsi_Host *host,
|
||||
int bus, int target)
|
||||
__must_hold(&host->host_lock)
|
||||
{
|
||||
int cnt;
|
||||
int status;
|
||||
|
|
@ -811,6 +814,7 @@ qla1280_wait_for_pending_commands(struct scsi_qla_host *ha, struct Scsi_Host *ho
|
|||
static int
|
||||
qla1280_error_action(struct Scsi_Host *host, struct scsi_cmnd *cmd,
|
||||
enum action action)
|
||||
__must_hold(&host->host_lock)
|
||||
{
|
||||
struct scsi_qla_host *ha;
|
||||
int bus, target, lun;
|
||||
|
|
@ -1495,6 +1499,7 @@ qla1280_initialize_adapter(struct scsi_qla_host *ha)
|
|||
*/
|
||||
static const struct firmware *
|
||||
qla1280_request_firmware(struct scsi_qla_host *ha)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
const struct firmware *fw;
|
||||
int err;
|
||||
|
|
@ -1660,6 +1665,7 @@ qla1280_chip_diag(struct scsi_qla_host *ha)
|
|||
|
||||
static int
|
||||
qla1280_load_firmware_pio(struct scsi_qla_host *ha)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
/* enter with host_lock acquired */
|
||||
|
||||
|
|
@ -1710,6 +1716,7 @@ qla1280_load_firmware_pio(struct scsi_qla_host *ha)
|
|||
#define DUMP_IT_BACK 0 /* for debug of RISC loading */
|
||||
static int
|
||||
qla1280_load_firmware_dma(struct scsi_qla_host *ha)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
/* enter with host_lock acquired */
|
||||
const struct firmware *fw;
|
||||
|
|
@ -1849,6 +1856,7 @@ qla1280_start_firmware(struct scsi_qla_host *ha)
|
|||
|
||||
static int
|
||||
qla1280_load_firmware(struct scsi_qla_host *ha)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
/* enter with host_lock taken */
|
||||
int err;
|
||||
|
|
@ -2418,6 +2426,7 @@ qla1280_nv_write(struct scsi_qla_host *ha, uint16_t data)
|
|||
*/
|
||||
static int
|
||||
qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
struct device_reg __iomem *reg = ha->iobase;
|
||||
int status = 0;
|
||||
|
|
@ -2543,6 +2552,7 @@ qla1280_poll(struct scsi_qla_host *ha)
|
|||
*/
|
||||
static int
|
||||
qla1280_bus_reset(struct scsi_qla_host *ha, int bus)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
uint16_t mb[MAILBOX_REGISTER_COUNT];
|
||||
uint16_t reset_delay;
|
||||
|
|
@ -2603,6 +2613,7 @@ qla1280_bus_reset(struct scsi_qla_host *ha, int bus)
|
|||
*/
|
||||
static int
|
||||
qla1280_device_reset(struct scsi_qla_host *ha, int bus, int target)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
uint16_t mb[MAILBOX_REGISTER_COUNT];
|
||||
int status;
|
||||
|
|
@ -2637,6 +2648,7 @@ qla1280_device_reset(struct scsi_qla_host *ha, int bus, int target)
|
|||
*/
|
||||
static int
|
||||
qla1280_abort_command(struct scsi_qla_host *ha, struct srb * sp, int handle)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
uint16_t mb[MAILBOX_REGISTER_COUNT];
|
||||
unsigned int bus, target, lun;
|
||||
|
|
@ -3754,6 +3766,7 @@ qla1280_error_entry(struct scsi_qla_host *ha, struct response *pkt,
|
|||
*/
|
||||
static int
|
||||
qla1280_abort_isp(struct scsi_qla_host *ha)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
struct device_reg __iomem *reg = ha->iobase;
|
||||
struct srb *sp;
|
||||
|
|
@ -3886,6 +3899,7 @@ qla1280_check_for_dead_scsi_bus(struct scsi_qla_host *ha, unsigned int bus)
|
|||
static void
|
||||
qla1280_get_target_parameters(struct scsi_qla_host *ha,
|
||||
struct scsi_device *device)
|
||||
__must_hold(&ha->host->host_lock)
|
||||
{
|
||||
uint16_t mb[MAILBOX_REGISTER_COUNT];
|
||||
int bus, target, lun;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user