scsi: kill command serial number
authorHannes Reinecke <hare@suse.com>
Tue, 26 Feb 2019 14:56:42 +0000 (15:56 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 27 Feb 2019 14:19:24 +0000 (09:19 -0500)
No users left, kill it.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi.c
drivers/scsi/scsi_lib.c
include/scsi/scsi_cmnd.h
include/scsi/scsi_host.h

index 7675ff0ca2ea4ab07b6d9124daa139c2a85669bb..99a7b9f520ae28eab51ff410796cf96e41b34384 100644 (file)
@@ -174,22 +174,6 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
 }
 #endif
 
-/**
- * scsi_cmd_get_serial - Assign a serial number to a command
- * @host: the scsi host
- * @cmd: command to assign serial number to
- *
- * Description: a serial number identifies a request for error recovery
- * and debugging purposes.  Protected by the Host_Lock of host.
- */
-void scsi_cmd_get_serial(struct Scsi_Host *host, struct scsi_cmnd *cmd)
-{
-       cmd->serial_number = host->cmd_serial_number++;
-       if (cmd->serial_number == 0) 
-               cmd->serial_number = host->cmd_serial_number++;
-}
-EXPORT_SYMBOL(scsi_cmd_get_serial);
-
 /**
  * scsi_finish_command - cleanup and pass command back to upper layer
  * @cmd: the command
index c77cb0d31dbc84ee66826f99b017a74210009a65..95466a5bf6d6db8db3256e0b975e92a90f86d300 100644 (file)
@@ -316,7 +316,6 @@ EXPORT_SYMBOL(__scsi_execute);
  */
 static void scsi_init_cmd_errh(struct scsi_cmnd *cmd)
 {
-       cmd->serial_number = 0;
        scsi_set_resid(cmd, 0);
        memset(cmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
        if (cmd->cmd_len == 0)
index 6c7793c2ad013da047627ee8654f4b9013762419..76ed5e4acd38422f9a88d8002e1c676a9e25dd27 100644 (file)
@@ -74,16 +74,6 @@ struct scsi_cmnd {
 
        int eh_eflags;          /* Used by error handlr */
 
-       /*
-        * A SCSI Command is assigned a nonzero serial_number before passed
-        * to the driver's queue command function.  The serial_number is
-        * cleared when scsi_done is entered indicating that the command
-        * has been completed.  It is a bug for LLDDs to use this number
-        * for purposes other than printk (and even that is only useful
-        * for debugging).
-        */
-       unsigned long serial_number;
-
        /*
         * This is set to jiffies as it was when the command was first
         * allocated.  It is used to time how long the command has
index dbbdfbdb1a044997be85e899eaaa2f2a6cb28e02..2b539a1b3f62dbfee7e7532dc2a99033200c9c8e 100644 (file)
@@ -486,7 +486,6 @@ struct scsi_host_template {
                unsigned long irq_flags;                                \
                int rc;                                                 \
                spin_lock_irqsave(shost->host_lock, irq_flags);         \
-               scsi_cmd_get_serial(shost, cmd);                        \
                rc = func_name##_lck (cmd, cmd->scsi_done);                     \
                spin_unlock_irqrestore(shost->host_lock, irq_flags);    \
                return rc;                                              \
@@ -596,12 +595,6 @@ struct Scsi_Host {
         * is nr_hw_queues * can_queue.
         */
        unsigned nr_hw_queues;
-       /* 
-        * Used to assign serial numbers to the cmds.
-        * Protected by the host lock.
-        */
-       unsigned long cmd_serial_number;
-       
        unsigned active_mode:2;
        unsigned unchecked_isa_dma:1;
 
@@ -738,7 +731,6 @@ extern int scsi_host_busy(struct Scsi_Host *shost);
 extern void scsi_host_put(struct Scsi_Host *t);
 extern struct Scsi_Host *scsi_host_lookup(unsigned short);
 extern const char *scsi_host_state_name(enum scsi_host_state);
-extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *);
 
 static inline int __must_check scsi_add_host(struct Scsi_Host *host,
                                             struct device *dev)