Skip to content

Commit 35766eb

Browse files
author
James Bottomley
committed
Merge raven.il.steeleye.com:/home/jejb/BK/scsi-misc-2.5
into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5
2 parents a2dd146 + 78ef52e commit 35766eb

25 files changed

+600
-1223
lines changed

drivers/scsi/53c700.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,10 +1718,10 @@ NCR_700_proc_directory_info(char *proc_buf, char **startp,
17181718
hostdata = (struct NCR_700_Host_Parameters *)host->hostdata[0];
17191719
len += sprintf(&buf[len], "Total commands outstanding: %d\n", hostdata->command_slot_count);
17201720
len += sprintf(&buf[len],"\
1721-
Target Depth Active Next Tag\n\
1722-
====== ===== ====== ========\n");
1721+
Target Active Next Tag\n\
1722+
====== ====== ========\n");
17231723
list_for_each_entry(SDp, &host->my_devices, siblings) {
1724-
len += sprintf(&buf[len]," %2d:%2d %4d %4d %4d\n", SDp->id, SDp->lun, SDp->current_queue_depth, NCR_700_get_depth(SDp), SDp->current_tag);
1724+
len += sprintf(&buf[len]," %2d:%2d %4d %4d\n", SDp->id, SDp->lun, NCR_700_get_depth(SDp), SDp->current_tag);
17251725
}
17261726
if((len -= offset) <= 0)
17271727
return 0;

drivers/scsi/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ menu "SCSI low-level drivers"
176176
config SGIWD93_SCSI
177177
tristate "SGI WD93C93 SCSI Driver"
178178
depends on SGI_IP22 && SCSI
179+
help
180+
If you have a Western Digital WD93 SCSI controller on
181+
an SGI MIPS system, say Y. Otherwise, say N.
179182

180183
config SCSI_DECNCR
181184
tristate "DEC NCR53C94 Scsi Driver"
@@ -1342,6 +1345,10 @@ config SCSI_QLOGIC_FC
13421345
config SCSI_QLOGIC_FC_FIRMWARE
13431346
bool "Include loadable firmware in driver"
13441347
depends on SCSI_QLOGIC_FC
1348+
help
1349+
Say Y to include ISP2100 Fabric Initiator/Target Firmware, with
1350+
expanded LUN addressing and FcTape (FCP-2) support, in the
1351+
Qlogic QLA 1280 driver. This is required on some platforms.
13451352

13461353
config SCSI_QLOGIC_1280
13471354
tristate "Qlogic QLA 1280 SCSI support"

drivers/scsi/aacraid/linit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ static int aac_slave_configure(Scsi_Device * dev )
536536

537537
dprintk((KERN_DEBUG "(scsi%d:%d:%d:%d) Tagged Queue depth %2d, "
538538
"%s\n", dev->host->host_no, dev->channel,
539-
dev->id, dev->lun, dev->new_queue_depth,
539+
dev->id, dev->lun, dev->queue_depth,
540540
dev->online ? "OnLine" : "OffLine"));
541541
return 0;
542542
}

drivers/scsi/advansys.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8417,25 +8417,6 @@ asc_prt_driver_conf(struct Scsi_Host *shp, char *cp, int cplen)
84178417
chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id;
84188418
}
84198419

8420-
if (boardp->flags & ASC_SELECT_QUEUE_DEPTHS) {
8421-
len = asc_prt_line(cp, leftlen, " queue_depth:");
8422-
ASC_PRT_NEXT();
8423-
for (i = 0; i <= ADV_MAX_TID; i++) {
8424-
if ((chip_scsi_id == i) ||
8425-
((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
8426-
continue;
8427-
}
8428-
if (boardp->device[i] == NULL) {
8429-
continue;
8430-
}
8431-
len = asc_prt_line(cp, leftlen, " %X:%d",
8432-
i, boardp->device[i]->current_queue_depth);
8433-
ASC_PRT_NEXT();
8434-
}
8435-
len = asc_prt_line(cp, leftlen, "\n");
8436-
ASC_PRT_NEXT();
8437-
}
8438-
84398420
return totlen;
84408421
}
84418422

drivers/scsi/aic7xxx_old.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4068,7 +4068,7 @@ aic7xxx_handle_seqint(struct aic7xxx_host *p, unsigned char intstat)
40684068
* normal.
40694069
*/
40704070
scsi_adjust_queue_depth(scb->cmd->device, MSG_SIMPLE_TAG,
4071-
scb->cmd->device->new_queue_depth);
4071+
scb->cmd->device->queue_depth);
40724072
scb->tag_action = MSG_SIMPLE_Q_TAG;
40734073
scb->hscb->control &= ~SCB_TAG_TYPE;
40744074
scb->hscb->control |= MSG_SIMPLE_Q_TAG;

drivers/scsi/aic7xxx_old/aic7xxx_proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ aic7xxx_proc_info ( char *buffer, char **start, off_t offset, int length,
313313
p->user[tindex].options);
314314
if(sdptr->simple_tags)
315315
{
316-
size += sprintf(BLS, " Tagged Command Queueing Enabled, Ordered Tags %s, Depth %d/%d\n", sdptr->ordered_tags ? "Enabled" : "Disabled", sdptr->new_queue_depth, aic_dev->max_q_depth);
316+
size += sprintf(BLS, " Tagged Command Queueing Enabled, Ordered Tags %s, Depth %d/%d\n", sdptr->ordered_tags ? "Enabled" : "Disabled", sdptr->queue_depth, aic_dev->max_q_depth);
317317
}
318318
if(aic_dev->barrier_total)
319319
size += sprintf(BLS, " Total transfers %ld:\n (%ld/%ld/%ld/%ld reads/writes/REQ_BARRIER/Ordered Tags)\n",

drivers/scsi/cpqfcTSinit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ return -ENOTSUPP;
16041604

16051605
scsi_cdb[0] = RELEASE;
16061606

1607-
SCpnt = scsi_getset_command(ScsiDev, GFP_KERNEL);
1607+
SCpnt = scsi_get_command(ScsiDev, GFP_KERNEL);
16081608
{
16091609
CPQFC_DECLARE_COMPLETION(wait);
16101610

drivers/scsi/eata.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ static int eata2x_slave_configure(Scsi_Device *dev) {
895895
tag_suffix = "";
896896
}
897897

898-
if (TLDEV(dev->type) && linked_comm && dev->new_queue_depth > 2)
898+
if (TLDEV(dev->type) && linked_comm && dev->queue_depth > 2)
899899
link_suffix = ", sorted";
900900
else if (TLDEV(dev->type))
901901
link_suffix = ", unsorted";
@@ -904,7 +904,7 @@ static int eata2x_slave_configure(Scsi_Device *dev) {
904904

905905
printk("%s: scsi%d, channel %d, id %d, lun %d, cmds/lun %d%s%s.\n",
906906
BN(j), host->host_no, dev->channel, dev->id, dev->lun,
907-
dev->new_queue_depth, link_suffix, tag_suffix);
907+
dev->queue_depth, link_suffix, tag_suffix);
908908

909909
return FALSE;
910910
}
@@ -1699,7 +1699,7 @@ static int eata2x_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) {
16991699
/* Map DMA buffers and SG list */
17001700
map_dma(i, j);
17011701

1702-
if (linked_comm && SCpnt->device->new_queue_depth > 2
1702+
if (linked_comm && SCpnt->device->queue_depth > 2
17031703
&& TLDEV(SCpnt->device->type)) {
17041704
HD(j)->cp_stat[i] = READY;
17051705
flush_dev(SCpnt->device, SCpnt->request->sector, j, FALSE);
@@ -2207,7 +2207,7 @@ static void ihdlr(int irq, unsigned int j) {
22072207

22082208
sync_dma(i, j);
22092209

2210-
if (linked_comm && SCpnt->device->new_queue_depth > 2
2210+
if (linked_comm && SCpnt->device->queue_depth > 2
22112211
&& TLDEV(SCpnt->device->type))
22122212
flush_dev(SCpnt->device, SCpnt->request->sector, j, TRUE);
22132213

drivers/scsi/gdth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4637,7 +4637,7 @@ static void gdth_flush(int hanum)
46374637

46384638
#if LINUX_VERSION_CODE >= 0x020322
46394639
sdev = scsi_get_host_dev(gdth_ctr_tab[hanum]);
4640-
scp = scsi_getset_command(sdev, GFP_KERNEL);
4640+
scp = scsi_get_command(sdev, GFP_KERNEL);
46414641
scp->cmd_len = 12;
46424642
scp->use_sg = 0;
46434643
#else
@@ -4711,7 +4711,7 @@ void gdth_halt(void)
47114711
memset(cmnd, 0xff, MAX_COMMAND_SIZE);
47124712
#if LINUX_VERSION_CODE >= 0x020322
47134713
sdev = scsi_get_host_dev(gdth_ctr_tab[hanum]);
4714-
scp = scsi_getset_command(sdev, GFP_KERNEL);
4714+
scp = scsi_get_command(sdev, GFP_KERNEL);
47154715
scp->cmd_len = 12;
47164716
scp->use_sg = 0;
47174717
#else

drivers/scsi/gdth_proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int gdth_set_info(char *buffer,int length,int vh,int hanum,int busnum)
4848

4949
#if LINUX_VERSION_CODE >= 0x020322
5050
sdev = scsi_get_host_dev(gdth_ctr_vtab[vh]);
51-
scp = scsi_getset_command(sdev, GFP_KERNEL);
51+
scp = scsi_get_command(sdev, GFP_KERNEL);
5252
if (!scp)
5353
return -ENOMEM;
5454
scp->cmd_len = 12;
@@ -712,7 +712,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,
712712

713713
#if LINUX_VERSION_CODE >= 0x020322
714714
sdev = scsi_get_host_dev(gdth_ctr_vtab[vh]);
715-
scp = scsi_getset_command(sdev, GFP_KERNEL);
715+
scp = scsi_get_command(sdev, GFP_KERNEL);
716716
if (!scp)
717717
return -ENOMEM;
718718
scp->cmd_len = 12;

drivers/scsi/hosts.c

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,15 @@ int scsi_remove_host(struct Scsi_Host *shost)
285285
return 0;
286286
}
287287

288-
int __scsi_add_host(struct Scsi_Host *shost)
288+
/**
289+
* scsi_add_host - add a scsi host
290+
* @shost: scsi host pointer to add
291+
* @dev: a struct device of type scsi class
292+
*
293+
* Return value:
294+
* 0 on success / != 0 for error
295+
**/
296+
int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
289297
{
290298
Scsi_Host_Template *sht = shost->hostt;
291299
struct scsi_device *sdev;
@@ -294,6 +302,11 @@ int __scsi_add_host(struct Scsi_Host *shost)
294302
printk(KERN_INFO "scsi%d : %s\n", shost->host_no,
295303
sht->info ? sht->info(shost) : sht->name);
296304

305+
if (dev) {
306+
dev->class_data = shost;
307+
shost->host_gendev = dev;
308+
}
309+
297310
scsi_scan_host(shost);
298311

299312
list_for_each_entry (sdev, &shost->my_devices, siblings) {
@@ -305,23 +318,6 @@ int __scsi_add_host(struct Scsi_Host *shost)
305318
return saved_error;
306319
}
307320

308-
/**
309-
* scsi_add_host - add a scsi host
310-
* @shost: scsi host pointer to add
311-
* @dev: a struct device of type scsi class
312-
*
313-
* Return value:
314-
* 0 on success / != 0 for error
315-
**/
316-
int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
317-
{
318-
if (dev) {
319-
dev->class_data = shost;
320-
shost->host_gendev = dev;
321-
}
322-
return __scsi_add_host(shost);
323-
}
324-
325321
/**
326322
* scsi_unregister - unregister a scsi host
327323
* @shost: scsi host to be unregistered
@@ -346,17 +342,8 @@ void scsi_unregister(struct Scsi_Host *shost)
346342
}
347343

348344
shost->hostt->present--;
349-
350-
/* Cleanup proc */
351345
scsi_proc_host_rm(shost);
352-
353-
while (!list_empty(&shost->free_list)) {
354-
struct scsi_cmnd *cmd;
355-
cmd = list_entry(shost->free_list.next,struct scsi_cmnd,list);
356-
list_del_init(&cmd->list);
357-
kmem_cache_free(scsi_core->scsi_cmd_cache, cmd);
358-
}
359-
346+
scsi_destroy_command_freelist(shost);
360347
kfree(shost);
361348
}
362349

@@ -377,8 +364,7 @@ extern int blk_nohighio;
377364
struct Scsi_Host * scsi_register(Scsi_Host_Template *shost_tp, int xtr_bytes)
378365
{
379366
struct Scsi_Host *shost, *shost_scr;
380-
struct scsi_cmnd *cmd = NULL;
381-
int gfp_mask;
367+
int gfp_mask, rval;
382368
DECLARE_COMPLETION(sem);
383369

384370
/* Check to see if this host has any error handling facilities */
@@ -406,7 +392,6 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template *shost_tp, int xtr_bytes)
406392

407393
spin_lock_init(&shost->default_lock);
408394
scsi_assign_lock(shost, &shost->default_lock);
409-
atomic_set(&shost->host_active,0);
410395
INIT_LIST_HEAD(&shost->my_devices);
411396

412397
init_waitqueue_head(&shost->host_wait);
@@ -445,7 +430,7 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template *shost_tp, int xtr_bytes)
445430
shost->unchecked_isa_dma = shost_tp->unchecked_isa_dma;
446431
shost->use_clustering = shost_tp->use_clustering;
447432
if (!blk_nohighio)
448-
shost->highmem_io = shost_tp->highmem_io;
433+
shost->highmem_io = shost_tp->highmem_io;
449434

450435
shost->max_sectors = shost_tp->max_sectors;
451436
shost->use_blk_tcq = shost_tp->use_blk_tcq;
@@ -467,16 +452,9 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template *shost_tp, int xtr_bytes)
467452
found:
468453
spin_unlock(&scsi_host_list_lock);
469454

470-
spin_lock_init(&shost->free_list_lock);
471-
INIT_LIST_HEAD(&shost->free_list);
472-
473-
/* Get one backup command for this host. */
474-
cmd = scsi_get_command(shost, GFP_KERNEL);
475-
if (cmd)
476-
list_add(&cmd->list, &shost->free_list);
477-
else
478-
printk(KERN_NOTICE "The system is running low in memory.\n");
479-
455+
rval = scsi_setup_command_freelist(shost);
456+
if (rval)
457+
goto fail;
480458
scsi_proc_host_add(shost);
481459

482460
shost->eh_notify = &sem;
@@ -487,10 +465,15 @@ struct Scsi_Host * scsi_register(Scsi_Host_Template *shost_tp, int xtr_bytes)
487465
*/
488466
wait_for_completion(&sem);
489467
shost->eh_notify = NULL;
490-
491468
shost->hostt->present++;
492-
493469
return shost;
470+
471+
fail:
472+
spin_lock(&scsi_host_list_lock);
473+
list_del(&shost->sh_list);
474+
spin_unlock(&scsi_host_list_lock);
475+
kfree(shost);
476+
return NULL;
494477
}
495478

496479
/**
@@ -523,7 +506,7 @@ int scsi_register_host(Scsi_Host_Template *shost_tp)
523506
*/
524507
list_for_each_entry(shost, &scsi_host_list, sh_list)
525508
if (shost->hostt == shost_tp)
526-
if (__scsi_add_host(shost))
509+
if (scsi_add_host(shost, NULL))
527510
goto out_of_space;
528511

529512
return 0;

drivers/scsi/hosts.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
#include <linux/types.h>
3030
#include <linux/pci.h>
3131

32+
struct scsi_host_cmd_pool;
33+
34+
3235
/* It is senseless to set SG_ALL any higher than this - the performance
3336
* does not get any better, and it wastes memory
3437
*/
@@ -375,6 +378,7 @@ struct Scsi_Host
375378
struct list_head sh_list;
376379
struct list_head my_devices;
377380

381+
struct scsi_host_cmd_pool *cmd_pool;
378382
spinlock_t free_list_lock;
379383
struct list_head free_list; /* backup store of cmd structs */
380384

@@ -392,7 +396,6 @@ struct Scsi_Host
392396
unsigned int eh_kill:1; /* set when killing the eh thread */
393397
wait_queue_head_t host_wait;
394398
Scsi_Host_Template * hostt;
395-
atomic_t host_active; /* commands checked out */
396399
volatile unsigned short host_busy; /* commands actually active on low-level */
397400
volatile unsigned short host_failed; /* commands that failed. */
398401

0 commit comments

Comments
 (0)