Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: drop bus reset for wd33c93-compatible boards

The bus reset function is just a wrapper calling host reset under the
host lock. So move taking of the host lock into the host reset function
and drop bus reset.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Hannes Reinecke and committed by
Martin K. Petersen
ec05e238 63cd2f7f

+2 -83
-17
drivers/scsi/a2091.c
··· 147 147 } 148 148 } 149 149 150 - static int a2091_bus_reset(struct scsi_cmnd *cmd) 151 - { 152 - struct Scsi_Host *instance = cmd->device->host; 153 - 154 - /* FIXME perform bus-specific reset */ 155 - 156 - /* FIXME 2: kill this function, and let midlayer fall back 157 - to the same action, calling wd33c93_host_reset() */ 158 - 159 - spin_lock_irq(instance->host_lock); 160 - wd33c93_host_reset(cmd); 161 - spin_unlock_irq(instance->host_lock); 162 - 163 - return SUCCESS; 164 - } 165 - 166 150 static struct scsi_host_template a2091_scsi_template = { 167 151 .module = THIS_MODULE, 168 152 .name = "Commodore A2091/A590 SCSI", ··· 155 171 .proc_name = "A2901", 156 172 .queuecommand = wd33c93_queuecommand, 157 173 .eh_abort_handler = wd33c93_abort, 158 - .eh_bus_reset_handler = a2091_bus_reset, 159 174 .eh_host_reset_handler = wd33c93_host_reset, 160 175 .can_queue = CAN_QUEUE, 161 176 .this_id = 7,
-17
drivers/scsi/a3000.c
··· 162 162 } 163 163 } 164 164 165 - static int a3000_bus_reset(struct scsi_cmnd *cmd) 166 - { 167 - struct Scsi_Host *instance = cmd->device->host; 168 - 169 - /* FIXME perform bus-specific reset */ 170 - 171 - /* FIXME 2: kill this entire function, which should 172 - cause mid-layer to call wd33c93_host_reset anyway? */ 173 - 174 - spin_lock_irq(instance->host_lock); 175 - wd33c93_host_reset(cmd); 176 - spin_unlock_irq(instance->host_lock); 177 - 178 - return SUCCESS; 179 - } 180 - 181 165 static struct scsi_host_template amiga_a3000_scsi_template = { 182 166 .module = THIS_MODULE, 183 167 .name = "Amiga 3000 built-in SCSI", ··· 170 186 .proc_name = "A3000", 171 187 .queuecommand = wd33c93_queuecommand, 172 188 .eh_abort_handler = wd33c93_abort, 173 - .eh_bus_reset_handler = a3000_bus_reset, 174 189 .eh_host_reset_handler = wd33c93_host_reset, 175 190 .can_queue = CAN_QUEUE, 176 191 .this_id = 7,
-18
drivers/scsi/gvp11.c
··· 171 171 } 172 172 } 173 173 174 - static int gvp11_bus_reset(struct scsi_cmnd *cmd) 175 - { 176 - struct Scsi_Host *instance = cmd->device->host; 177 - 178 - /* FIXME perform bus-specific reset */ 179 - 180 - /* FIXME 2: shouldn't we no-op this function (return 181 - FAILED), and fall back to host reset function, 182 - wd33c93_host_reset ? */ 183 - 184 - spin_lock_irq(instance->host_lock); 185 - wd33c93_host_reset(cmd); 186 - spin_unlock_irq(instance->host_lock); 187 - 188 - return SUCCESS; 189 - } 190 - 191 174 static struct scsi_host_template gvp11_scsi_template = { 192 175 .module = THIS_MODULE, 193 176 .name = "GVP Series II SCSI", ··· 179 196 .proc_name = "GVP11", 180 197 .queuecommand = wd33c93_queuecommand, 181 198 .eh_abort_handler = wd33c93_abort, 182 - .eh_bus_reset_handler = gvp11_bus_reset, 183 199 .eh_host_reset_handler = wd33c93_host_reset, 184 200 .can_queue = CAN_QUEUE, 185 201 .this_id = 7,
-16
drivers/scsi/mvme147.c
··· 121 121 return 0; 122 122 } 123 123 124 - static int mvme147_bus_reset(struct scsi_cmnd *cmd) 125 - { 126 - /* FIXME perform bus-specific reset */ 127 - 128 - /* FIXME 2: kill this function, and let midlayer fallback to 129 - the same result, calling wd33c93_host_reset() */ 130 - 131 - spin_lock_irq(cmd->device->host->host_lock); 132 - wd33c93_host_reset(cmd); 133 - spin_unlock_irq(cmd->device->host->host_lock); 134 - 135 - return SUCCESS; 136 - } 137 - 138 - 139 124 static struct scsi_host_template driver_template = { 140 125 .proc_name = "MVME147", 141 126 .name = "MVME147 built-in SCSI", ··· 128 143 .release = mvme147_release, 129 144 .queuecommand = wd33c93_queuecommand, 130 145 .eh_abort_handler = wd33c93_abort, 131 - .eh_bus_reset_handler = mvme147_bus_reset, 132 146 .eh_host_reset_handler = wd33c93_host_reset, 133 147 .can_queue = CAN_QUEUE, 134 148 .this_id = 7,
-15
drivers/scsi/sgiwd93.c
··· 192 192 hcp->desc.pnext = hdata->dma; 193 193 } 194 194 195 - static int sgiwd93_bus_reset(struct scsi_cmnd *cmd) 196 - { 197 - /* FIXME perform bus-specific reset */ 198 - 199 - /* FIXME 2: kill this function, and let midlayer fallback 200 - to the same result, calling wd33c93_host_reset() */ 201 - 202 - spin_lock_irq(cmd->device->host->host_lock); 203 - wd33c93_host_reset(cmd); 204 - spin_unlock_irq(cmd->device->host->host_lock); 205 - 206 - return SUCCESS; 207 - } 208 - 209 195 /* 210 196 * Kludge alert - the SCSI code calls the abort and reset method with int 211 197 * arguments not with pointers. So this is going to blow up beautyfully ··· 203 217 .name = "SGI WD93", 204 218 .queuecommand = wd33c93_queuecommand, 205 219 .eh_abort_handler = wd33c93_abort, 206 - .eh_bus_reset_handler = sgiwd93_bus_reset, 207 220 .eh_host_reset_handler = wd33c93_host_reset, 208 221 .can_queue = 16, 209 222 .this_id = 7,
+2
drivers/scsi/wd33c93.c
··· 1578 1578 int i; 1579 1579 1580 1580 instance = SCpnt->device->host; 1581 + spin_lock_irq(instance->host_lock); 1581 1582 hostdata = (struct WD33C93_hostdata *) instance->hostdata; 1582 1583 1583 1584 printk("scsi%d: reset. ", instance->host_no); ··· 1604 1603 reset_wd33c93(instance); 1605 1604 SCpnt->result = DID_RESET << 16; 1606 1605 enable_irq(instance->irq); 1606 + spin_unlock_irq(instance->host_lock); 1607 1607 return SUCCESS; 1608 1608 } 1609 1609