diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-05-12 21:05:59 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-05-12 21:05:59 +0000 |
commit | ba2dacab305c598cd4c34a604f8e276bf5bab5ff (patch) | |
tree | 78670a0139bf4d5ace617b29b7eba82bbc74d602 /drivers/scsi | |
parent | b77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff) |
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/NCR5380.c | 9 | ||||
-rw-r--r-- | drivers/scsi/aha152x.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx.c | 14 | ||||
-rw-r--r-- | drivers/scsi/ini9100u.c | 16 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/aha152x_stub.c | 11 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/fdomain_stub.c | 11 | ||||
-rw-r--r-- | drivers/scsi/pcmcia/qlogic_stub.c | 11 | ||||
-rw-r--r-- | drivers/scsi/pluto.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi.c | 12 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 6 |
10 files changed, 46 insertions, 50 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index df412e35b..cac8329c3 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -563,14 +563,10 @@ static volatile int main_running = 0; static __inline__ void run_main(void) { - unsigned long flags; - save_flags(flags); - cli(); if (!main_running) { main_running = 1; NCR5380_main(); } - restore_flags(flags); } #ifdef USLEEP @@ -667,9 +663,7 @@ static int NCR5380_set_timer(struct Scsi_Host *instance) ((struct NCR5380_hostdata *) instance->hostdata)->next_timer = tmp; *prev = instance; - del_timer(&usleep_timer); - usleep_timer.expires = ((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires; - add_timer(&usleep_timer); + mod_timer(&usleep_timer, ((struct NCR5380_hostdata *) expires_first->hostdata)->time_expires); restore_flags(flags); return 0; } @@ -1226,7 +1220,6 @@ int NCR5380_queue_command(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) { * sense data is only guaranteed to be valid while the condition exists. */ - cli(); if (!(hostdata->issue_queue) || (cmd->cmnd[0] == REQUEST_SENSE)) { LIST(cmd, hostdata->issue_queue); cmd->host_scribble = (unsigned char *) hostdata->issue_queue; diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 30faaa9ad..b11872c42 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c @@ -676,8 +676,10 @@ static struct signature { { { "Adaptec AHA-1520 BIOS", 0x102e, 21 }, /* Adaptec 152x */ - { "Adaptec AHA-1520B", 0x000b, 19 }, + { "Adaptec AHA-1520B", 0x000b, 17 }, /* Adaptec 152x rev B */ + { "Adaptec AHA-1520B", 0x0026, 17 }, + /* Iomega Jaz Jet ISA (AIC6370Q) */ { "Adaptec ASW-B626 BIOS", 0x1029, 21 }, /* on-board controller */ { "Adaptec BIOS: ASW-B626", 0x000f, 22 }, diff --git a/drivers/scsi/aic7xxx.c b/drivers/scsi/aic7xxx.c index 40ccb2fa8..8d041639b 100644 --- a/drivers/scsi/aic7xxx.c +++ b/drivers/scsi/aic7xxx.c @@ -3585,9 +3585,7 @@ aic7xxx_reset_device(struct aic7xxx_host *p, int target, int channel, if ( !(p->dev_timer_active & (0x01 << MAX_TARGETS)) || time_after_eq(p->dev_timer.expires, p->dev_expires[i]) ) { - del_timer(&p->dev_timer); - p->dev_timer.expires = p->dev_expires[i]; - add_timer(&p->dev_timer); + mod_timer(&p->dev_timer, p->dev_expires[i]); p->dev_timer_active |= (0x01 << MAX_TARGETS); } } @@ -5045,11 +5043,7 @@ aic7xxx_handle_seqint(struct aic7xxx_host *p, unsigned char intstat) } else if ( time_after_eq(p->dev_timer.expires, p->dev_expires[tindex]) ) - { - del_timer(&p->dev_timer); - p->dev_timer.expires = p->dev_expires[tindex]; - add_timer(&p->dev_timer); - } + mod_timer(&p->dev_timer, p->dev_expires[tindex]); } #ifdef AIC7XXX_VERBOSE_DEBUGGING if( (aic7xxx_verbose & VERBOSE_MINOR_ERROR) || @@ -12058,9 +12052,7 @@ aic7xxx_reset(Scsi_Cmnd *cmd, unsigned int flags) if ( !(p->dev_timer_active & (0x01 << MAX_TARGETS)) || time_after_eq(p->dev_timer.expires, p->dev_expires[p->scsi_id]) ) { - del_timer(&p->dev_timer); - p->dev_timer.expires = p->dev_expires[p->scsi_id]; - add_timer(&p->dev_timer); + mod_timer(&p->dev_timer, p->dev_expires[p->scsi_id]); p->dev_timer_active |= (0x01 << MAX_TARGETS); } aic7xxx_reset_channel(p, cmd->channel, TRUE); diff --git a/drivers/scsi/ini9100u.c b/drivers/scsi/ini9100u.c index 9cbab2949..e44bc7929 100644 --- a/drivers/scsi/ini9100u.c +++ b/drivers/scsi/ini9100u.c @@ -403,28 +403,28 @@ int i91u_detect(Scsi_Host_Template * tpnt) /* Initial tulip chip */ switch (i) { case 0: - ok = request_irq(pHCB->HCS_Intr, i91u_intr0, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr0, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; case 1: - ok = request_irq(pHCB->HCS_Intr, i91u_intr1, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr1, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; case 2: - ok = request_irq(pHCB->HCS_Intr, i91u_intr2, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr2, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; case 3: - ok = request_irq(pHCB->HCS_Intr, i91u_intr3, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr3, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; case 4: - ok = request_irq(pHCB->HCS_Intr, i91u_intr4, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr4, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; case 5: - ok = request_irq(pHCB->HCS_Intr, i91u_intr5, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr5, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; case 6: - ok = request_irq(pHCB->HCS_Intr, i91u_intr6, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr6, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; case 7: - ok = request_irq(pHCB->HCS_Intr, i91u_intr7, SA_INTERRUPT | SA_SHIRQ, "i91u", NULL); + ok = request_irq(pHCB->HCS_Intr, i91u_intr7, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); break; default: i91u_panic("i91u: Too many host adapters\n"); diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c index 7450470a1..195e131d0 100644 --- a/drivers/scsi/pcmcia/aha152x_stub.c +++ b/drivers/scsi/pcmcia/aha152x_stub.c @@ -5,7 +5,7 @@ This driver supports the Adaptec AHA-1460, the New Media Bus Toaster, and the New Media Toast & Jam. - aha152x_cs.c 1.52 2000/01/11 01:04:31 + aha152x_cs.c 1.53 2000/05/04 01:30:00 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file @@ -62,7 +62,7 @@ static int pc_debug = PCMCIA_DEBUG; MODULE_PARM(pc_debug, "i"); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = -"aha152x_cs.c 1.52 2000/01/11 01:04:31 (David Hinds)"; +"aha152x_cs.c 1.53 2000/05/04 01:30:00 (David Hinds)"; #else #define DEBUG(n, args...) #endif @@ -194,6 +194,7 @@ static void aha152x_detach(dev_link_t *link) if (*linkp == NULL) return; + del_timer(&link->release); if (link->state & DEV_CONFIG) { aha152x_release_cs((u_long)link); if (link->state & DEV_STALE_CONFIG) { @@ -379,10 +380,8 @@ static int aha152x_event(event_t event, int priority, switch (event) { case CS_EVENT_CARD_REMOVAL: link->state &= ~DEV_PRESENT; - if (link->state & DEV_CONFIG) { - link->release.expires = jiffies + HZ/20; - add_timer(&link->release); - } + if (link->state & DEV_CONFIG) + mod_timer(&link->release, jiffies + HZ/20); break; case CS_EVENT_CARD_INSERTION: link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index 558bf3317..533bf5a50 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c @@ -2,7 +2,7 @@ A driver for Future Domain-compatible PCMCIA SCSI cards - fdomain_cs.c 1.41 1999/11/15 06:05:48 + fdomain_cs.c 1.42 2000/05/04 01:30:00 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file @@ -59,7 +59,7 @@ static int pc_debug = PCMCIA_DEBUG; MODULE_PARM(pc_debug, "i"); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = -"fdomain_cs.c 1.41 1999/11/15 06:05:48 (David Hinds)"; +"fdomain_cs.c 1.42 2000/05/04 01:30:00 (David Hinds)"; #else #define DEBUG(n, args...) #endif @@ -176,6 +176,7 @@ static void fdomain_detach(dev_link_t *link) if (*linkp == NULL) return; + del_timer(&link->release); if (link->state & DEV_CONFIG) { fdomain_release((u_long)link); if (link->state & DEV_STALE_CONFIG) { @@ -343,10 +344,8 @@ static int fdomain_event(event_t event, int priority, switch (event) { case CS_EVENT_CARD_REMOVAL: link->state &= ~DEV_PRESENT; - if (link->state & DEV_CONFIG) { - link->release.expires = jiffies + HZ/20; - add_timer(&link->release); - } + if (link->state & DEV_CONFIG) + mod_timer(&link->release, jiffies + HZ/20); break; case CS_EVENT_CARD_INSERTION: link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c index c3f1d03a5..bcbbecfb8 100644 --- a/drivers/scsi/pcmcia/qlogic_stub.c +++ b/drivers/scsi/pcmcia/qlogic_stub.c @@ -2,7 +2,7 @@ A driver for the Qlogic SCSI card - qlogic_cs.c 1.77 2000/02/01 19:08:09 + qlogic_cs.c 1.78 2000/05/04 01:30:00 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file @@ -66,7 +66,7 @@ static int pc_debug = PCMCIA_DEBUG; MODULE_PARM(pc_debug, "i"); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = -"qlogic_cs.c 1.77 2000/02/01 19:08:09 (David Hinds)"; +"qlogic_cs.c 1.78 2000/05/04 01:30:00 (David Hinds)"; #else #define DEBUG(n, args...) #endif @@ -182,6 +182,7 @@ static void qlogic_detach(dev_link_t *link) if (*linkp == NULL) return; + del_timer(&link->release); if (link->state & DEV_CONFIG) { qlogic_release((u_long)link); if (link->state & DEV_STALE_CONFIG) { @@ -365,10 +366,8 @@ static int qlogic_event(event_t event, int priority, switch (event) { case CS_EVENT_CARD_REMOVAL: link->state &= ~DEV_PRESENT; - if (link->state & DEV_CONFIG) { - link->release.expires = jiffies + HZ/20; - add_timer(&link->release); - } + if (link->state & DEV_CONFIG) + mod_timer(&link->release, jiffies + HZ/20); break; case CS_EVENT_CARD_INSERTION: link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c index b54f074e9..518f1e26e 100644 --- a/drivers/scsi/pluto.c +++ b/drivers/scsi/pluto.c @@ -48,7 +48,7 @@ static struct ctrl_inquiry { } *fcs __initdata = { 0 }; static int fcscount __initdata = 0; static atomic_t fcss __initdata = ATOMIC_INIT(0); -static struct timer_list fc_timer __initdata = { 0 }; +static struct timer_list fc_timer __initdata = { function: NULL }; DECLARE_MUTEX_LOCKED(fc_sem); static int pluto_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cmnd *fcmd); diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 0b52d4a15..6ae59e9dd 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -447,8 +447,10 @@ Scsi_Cmnd *scsi_allocate_device(Scsi_Device * device, int wait, * to the user. */ if( interruptable ) { - if (signal_pending(current)) + if (signal_pending(current)) { + spin_unlock_irqrestore(&device_request_lock, flags); return NULL; + } } } else { spin_unlock_irqrestore(&device_request_lock, flags); @@ -1417,7 +1419,11 @@ void scsi_build_commandblocks(Scsi_Device * SDpnt) spin_lock_irqsave(&device_request_lock, flags); if (SDpnt->queue_depth == 0) + { SDpnt->queue_depth = host->cmd_per_lun; + if (SDpnt->queue_depth == 0) + SDpnt->queue_depth = 1; /* live to fight another day */ + } SDpnt->device_queue = NULL; for (j = 0; j < SDpnt->queue_depth; j++) { @@ -1809,8 +1815,8 @@ static int proc_scsi_gen_write(struct file * file, const char * buf, /* FIXME (DB) This assumes that the queue_depth routines can be used in this context as well, while they were all designed to be called only once after the detect routine. (DB) */ - if (HBA_ptr->select_queue_depths != NULL) - (HBA_ptr->select_queue_depths) (HBA_ptr, HBA_ptr->host_queue); + /* queue_depth routine moved to inside scan_scsis(,1,,,) so + it is called before build_commandblocks() */ err = length; goto out; diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 0bd06ea0f..7f67db94c 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -347,6 +347,12 @@ void scan_scsis(struct Scsi_Host *shpnt, if (SDpnt != oldSDpnt) { /* it could happen the blockdevice hasn't yet been inited */ + /* queue_depth() moved from scsi_proc_info() so that + it is called before scsi_build_commandblocks() */ + if (shpnt->select_queue_depths != NULL) + (shpnt->select_queue_depths)(shpnt, + shpnt->host_queue); + for (sdtpnt = scsi_devicelist; sdtpnt; sdtpnt = sdtpnt->next) if (sdtpnt->init && sdtpnt->dev_noticed) (*sdtpnt->init) (); |