Commit c6295cdf authored by 's avatar Committed by James Bottomley
Browse files

[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field



scsi_cmnd->serial_number_at_timeout doesn't serve any purpose
anymore.  All serial_number == serial_number_at_timeout tests
are always true in abort callbacks.  Kill the field.  Also, as
->pid always equals ->serial_number and ->serial_number
doesn't have any special meaning anymore, update comments
above ->serial_number accordingly.  Once we remove all uses of
this field from all lldd's, this field should go.

Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent d3a933dc
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -2957,13 +2957,6 @@ static int BusLogic_AbortCommand(struct scsi_cmnd *Command)
	int TargetID = Command->device->id;
	struct BusLogic_CCB *CCB;
	BusLogic_IncrementErrorCounter(&HostAdapter->TargetStatistics[TargetID].CommandAbortsRequested);
	/*
	   If this Command has already completed, then no Abort is necessary.
	 */
	if (Command->serial_number != Command->serial_number_at_timeout) {
		BusLogic_Warning("Unable to Abort Command to Target %d - " "Already Completed\n", HostAdapter, TargetID);
		return SUCCESS;
	}
	/*
	   Attempt to find an Active CCB for this Command.  If no Active CCB for this
	   Command is found, then no Abort is necessary.
+2 −3
Original line number Diff line number Diff line
@@ -9198,9 +9198,8 @@ asc_prt_scsi_cmnd(struct scsi_cmnd *s)
        s->use_sg, s->sglist_len, s->abort_reason);
    printk(
" serial_number 0x%x, serial_number_at_timeout 0x%x, retries %d, allowed %d\n",
        (unsigned) s->serial_number, (unsigned) s->serial_number_at_timeout,
         s->retries, s->allowed);
" serial_number 0x%x, retries %d, allowed %d\n",
        (unsigned) s->serial_number, s->retries, s->allowed);
    printk(
" timeout_per_command %d, timeout_total %d, timeout %d\n",
+0 −7
Original line number Diff line number Diff line
@@ -833,13 +833,6 @@ ips_eh_abort(Scsi_Cmnd * SC)
	if (!ha->active)
		return (FAILED);

	if (SC->serial_number != SC->serial_number_at_timeout) {
		/* HMM, looks like a bogus command */
		DEBUG(1, "Abort called with bogus scsi command");

		return (FAILED);
	}

	/* See if the command is on the copp queue */
	item = ha->copp_waitlist.head;
	while ((item) && (item->scsi_cmd != SC))
+2 −12
Original line number Diff line number Diff line
@@ -7486,24 +7486,14 @@ static int ncr53c8xx_abort(struct scsi_cmnd *cmd)
	struct scsi_cmnd *done_list;

#if defined SCSI_RESET_SYNCHRONOUS && defined SCSI_RESET_ASYNCHRONOUS
	printk("ncr53c8xx_abort: pid=%lu serial_number=%ld serial_number_at_timeout=%ld\n",
		cmd->pid, cmd->serial_number, cmd->serial_number_at_timeout);
	printk("ncr53c8xx_abort: pid=%lu serial_number=%ld\n",
		cmd->pid, cmd->serial_number);
#else
	printk("ncr53c8xx_abort: command pid %lu\n", cmd->pid);
#endif

	NCR_LOCK_NCB(np, flags);

#if defined SCSI_RESET_SYNCHRONOUS && defined SCSI_RESET_ASYNCHRONOUS
	/*
	 * We have to just ignore abort requests in some situations.
	 */
	if (cmd->serial_number != cmd->serial_number_at_timeout) {
		sts = SCSI_ABORT_NOT_RUNNING;
		goto out;
	}
#endif

	sts = ncr_abort_command(np, cmd);
out:
	done_list     = np->done_list;
+2 −4
Original line number Diff line number Diff line
@@ -1050,10 +1050,8 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
	for (i = 0; i < cmd->cmd_len; i++) {
		printk("0x%02x ", cmd->cmnd[i]);
	}
	printk("\n  seg_cnt=%d, allowed=%d, retries=%d, "
	    "serial_number_at_timeout=0x%lx\n",
	    cmd->use_sg, cmd->allowed, cmd->retries,
	    cmd->serial_number_at_timeout);
	printk("\n  seg_cnt=%d, allowed=%d, retries=%d\n",
	    cmd->use_sg, cmd->allowed, cmd->retries);
	printk("  request buffer=0x%p, request buffer len=0x%x\n",
	    cmd->request_buffer, cmd->request_bufflen);
	printk("  tag=%d, transfersize=0x%x\n",
Loading