diff options
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 34 | ||||
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 10 | ||||
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aacraid/comminit.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 6 | ||||
-rw-r--r-- | drivers/scsi/aacraid/dpcsup.c | 6 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 18 | ||||
-rw-r--r-- | drivers/scsi/aacraid/rkt.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aacraid/rx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aacraid/sa.c | 8 |
10 files changed, 40 insertions, 55 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 642a3b4e5937..ea9e038813eb 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -148,6 +148,8 @@ static int nondasd = -1; | |||
148 | static int dacmode = -1; | 148 | static int dacmode = -1; |
149 | 149 | ||
150 | static int commit = -1; | 150 | static int commit = -1; |
151 | int startup_timeout = 180; | ||
152 | int aif_timeout = 120; | ||
151 | 153 | ||
152 | module_param(nondasd, int, S_IRUGO|S_IWUSR); | 154 | module_param(nondasd, int, S_IRUGO|S_IWUSR); |
153 | MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on"); | 155 | MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on"); |
@@ -155,6 +157,10 @@ module_param(dacmode, int, S_IRUGO|S_IWUSR); | |||
155 | MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on"); | 157 | MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on"); |
156 | module_param(commit, int, S_IRUGO|S_IWUSR); | 158 | module_param(commit, int, S_IRUGO|S_IWUSR); |
157 | MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on"); | 159 | MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on"); |
160 | module_param(startup_timeout, int, S_IRUGO|S_IWUSR); | ||
161 | MODULE_PARM_DESC(startup_timeout, "The duration of time in seconds to wait for adapter to have it's kernel up and\nrunning. This is typically adjusted for large systems that do not have a BIOS."); | ||
162 | module_param(aif_timeout, int, S_IRUGO|S_IWUSR); | ||
163 | MODULE_PARM_DESC(aif_timeout, "The duration of time in seconds to wait for applications to pick up AIFs before\nderegistering them. This is typically adjusted for heavily burdened systems."); | ||
158 | 164 | ||
159 | int numacb = -1; | 165 | int numacb = -1; |
160 | module_param(numacb, int, S_IRUGO|S_IWUSR); | 166 | module_param(numacb, int, S_IRUGO|S_IWUSR); |
@@ -635,13 +641,13 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex) | |||
635 | cp[sizeof(str->pid)] = c; | 641 | cp[sizeof(str->pid)] = c; |
636 | } else { | 642 | } else { |
637 | struct aac_driver_ident *mp = aac_get_driver_ident(dev->cardtype); | 643 | struct aac_driver_ident *mp = aac_get_driver_ident(dev->cardtype); |
638 | 644 | ||
639 | inqstrcpy (mp->vname, str->vid); | 645 | inqstrcpy (mp->vname, str->vid); |
640 | /* last six chars reserved for vol type */ | 646 | /* last six chars reserved for vol type */ |
641 | inqstrcpy (mp->model, str->pid); | 647 | inqstrcpy (mp->model, str->pid); |
642 | } | 648 | } |
643 | 649 | ||
644 | if (tindex < (sizeof(container_types)/sizeof(char *))){ | 650 | if (tindex < ARRAY_SIZE(container_types)){ |
645 | char *findit = str->pid; | 651 | char *findit = str->pid; |
646 | 652 | ||
647 | for ( ; *findit != ' '; findit++); /* walk till we find a space */ | 653 | for ( ; *findit != ' '; findit++); /* walk till we find a space */ |
@@ -955,7 +961,7 @@ static void io_callback(void *context, struct fib * fibptr) | |||
955 | 961 | ||
956 | if(scsicmd->use_sg) | 962 | if(scsicmd->use_sg) |
957 | pci_unmap_sg(dev->pdev, | 963 | pci_unmap_sg(dev->pdev, |
958 | (struct scatterlist *)scsicmd->buffer, | 964 | (struct scatterlist *)scsicmd->request_buffer, |
959 | scsicmd->use_sg, | 965 | scsicmd->use_sg, |
960 | scsicmd->sc_data_direction); | 966 | scsicmd->sc_data_direction); |
961 | else if(scsicmd->request_bufflen) | 967 | else if(scsicmd->request_bufflen) |
@@ -1570,7 +1576,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1570 | * see: <vendor>.c i.e. aac.c | 1576 | * see: <vendor>.c i.e. aac.c |
1571 | */ | 1577 | */ |
1572 | if (scmd_id(scsicmd) == host->this_id) { | 1578 | if (scmd_id(scsicmd) == host->this_id) { |
1573 | setinqstr(dev, (void *) (inq_data.inqd_vid), (sizeof(container_types)/sizeof(char *))); | 1579 | setinqstr(dev, (void *) (inq_data.inqd_vid), ARRAY_SIZE(container_types)); |
1574 | inq_data.inqd_pdt = INQD_PDT_PROC; /* Processor device */ | 1580 | inq_data.inqd_pdt = INQD_PDT_PROC; /* Processor device */ |
1575 | aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); | 1581 | aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); |
1576 | scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD; | 1582 | scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD; |
@@ -1913,7 +1919,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr) | |||
1913 | 1919 | ||
1914 | if(scsicmd->use_sg) | 1920 | if(scsicmd->use_sg) |
1915 | pci_unmap_sg(dev->pdev, | 1921 | pci_unmap_sg(dev->pdev, |
1916 | (struct scatterlist *)scsicmd->buffer, | 1922 | (struct scatterlist *)scsicmd->request_buffer, |
1917 | scsicmd->use_sg, | 1923 | scsicmd->use_sg, |
1918 | scsicmd->sc_data_direction); | 1924 | scsicmd->sc_data_direction); |
1919 | else if(scsicmd->request_bufflen) | 1925 | else if(scsicmd->request_bufflen) |
@@ -2218,15 +2224,15 @@ static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* psg) | |||
2218 | } | 2224 | } |
2219 | } | 2225 | } |
2220 | else if(scsicmd->request_bufflen) { | 2226 | else if(scsicmd->request_bufflen) { |
2221 | dma_addr_t addr; | 2227 | u32 addr; |
2222 | addr = pci_map_single(dev->pdev, | 2228 | scsicmd->SCp.dma_handle = pci_map_single(dev->pdev, |
2223 | scsicmd->request_buffer, | 2229 | scsicmd->request_buffer, |
2224 | scsicmd->request_bufflen, | 2230 | scsicmd->request_bufflen, |
2225 | scsicmd->sc_data_direction); | 2231 | scsicmd->sc_data_direction); |
2232 | addr = scsicmd->SCp.dma_handle; | ||
2226 | psg->count = cpu_to_le32(1); | 2233 | psg->count = cpu_to_le32(1); |
2227 | psg->sg[0].addr = cpu_to_le32(addr); | 2234 | psg->sg[0].addr = cpu_to_le32(addr); |
2228 | psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); | 2235 | psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); |
2229 | scsicmd->SCp.dma_handle = addr; | ||
2230 | byte_count = scsicmd->request_bufflen; | 2236 | byte_count = scsicmd->request_bufflen; |
2231 | } | 2237 | } |
2232 | return byte_count; | 2238 | return byte_count; |
@@ -2375,7 +2381,7 @@ static struct aac_srb_status_info srb_status_info[] = { | |||
2375 | { SRB_STATUS_SUCCESS, "Success"}, | 2381 | { SRB_STATUS_SUCCESS, "Success"}, |
2376 | { SRB_STATUS_ABORTED, "Aborted Command"}, | 2382 | { SRB_STATUS_ABORTED, "Aborted Command"}, |
2377 | { SRB_STATUS_ABORT_FAILED, "Abort Failed"}, | 2383 | { SRB_STATUS_ABORT_FAILED, "Abort Failed"}, |
2378 | { SRB_STATUS_ERROR, "Error Event"}, | 2384 | { SRB_STATUS_ERROR, "Error Event"}, |
2379 | { SRB_STATUS_BUSY, "Device Busy"}, | 2385 | { SRB_STATUS_BUSY, "Device Busy"}, |
2380 | { SRB_STATUS_INVALID_REQUEST, "Invalid Request"}, | 2386 | { SRB_STATUS_INVALID_REQUEST, "Invalid Request"}, |
2381 | { SRB_STATUS_INVALID_PATH_ID, "Invalid Path ID"}, | 2387 | { SRB_STATUS_INVALID_PATH_ID, "Invalid Path ID"}, |
@@ -2394,7 +2400,7 @@ static struct aac_srb_status_info srb_status_info[] = { | |||
2394 | { SRB_STATUS_BAD_SRB_BLOCK_LENGTH,"Bad Srb Block Length"}, | 2400 | { SRB_STATUS_BAD_SRB_BLOCK_LENGTH,"Bad Srb Block Length"}, |
2395 | { SRB_STATUS_REQUEST_FLUSHED, "Request Flushed"}, | 2401 | { SRB_STATUS_REQUEST_FLUSHED, "Request Flushed"}, |
2396 | { SRB_STATUS_DELAYED_RETRY, "Delayed Retry"}, | 2402 | { SRB_STATUS_DELAYED_RETRY, "Delayed Retry"}, |
2397 | { SRB_STATUS_INVALID_LUN, "Invalid LUN"}, | 2403 | { SRB_STATUS_INVALID_LUN, "Invalid LUN"}, |
2398 | { SRB_STATUS_INVALID_TARGET_ID, "Invalid TARGET ID"}, | 2404 | { SRB_STATUS_INVALID_TARGET_ID, "Invalid TARGET ID"}, |
2399 | { SRB_STATUS_BAD_FUNCTION, "Bad Function"}, | 2405 | { SRB_STATUS_BAD_FUNCTION, "Bad Function"}, |
2400 | { SRB_STATUS_ERROR_RECOVERY, "Error Recovery"}, | 2406 | { SRB_STATUS_ERROR_RECOVERY, "Error Recovery"}, |
@@ -2409,11 +2415,9 @@ char *aac_get_status_string(u32 status) | |||
2409 | { | 2415 | { |
2410 | int i; | 2416 | int i; |
2411 | 2417 | ||
2412 | for(i=0; i < (sizeof(srb_status_info)/sizeof(struct aac_srb_status_info)); i++ ){ | 2418 | for (i = 0; i < ARRAY_SIZE(srb_status_info); i++) |
2413 | if(srb_status_info[i].status == status){ | 2419 | if (srb_status_info[i].status == status) |
2414 | return srb_status_info[i].str; | 2420 | return srb_status_info[i].str; |
2415 | } | ||
2416 | } | ||
2417 | 2421 | ||
2418 | return "Bad Status Code"; | 2422 | return "Bad Status Code"; |
2419 | } | 2423 | } |
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index f773b0dcfc95..d0eecd4bec83 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #ifndef AAC_DRIVER_BUILD | 13 | #ifndef AAC_DRIVER_BUILD |
14 | # define AAC_DRIVER_BUILD 2409 | 14 | # define AAC_DRIVER_BUILD 2409 |
15 | # define AAC_DRIVER_BRANCH "-mh1" | 15 | # define AAC_DRIVER_BRANCH "-mh2" |
16 | #endif | 16 | #endif |
17 | #define MAXIMUM_NUM_CONTAINERS 32 | 17 | #define MAXIMUM_NUM_CONTAINERS 32 |
18 | 18 | ||
@@ -563,7 +563,6 @@ struct aac_queue { | |||
563 | spinlock_t lockdata; /* Actual lock (used only on one side of the lock) */ | 563 | spinlock_t lockdata; /* Actual lock (used only on one side of the lock) */ |
564 | struct list_head cmdq; /* A queue of FIBs which need to be prcessed by the FS thread. This is */ | 564 | struct list_head cmdq; /* A queue of FIBs which need to be prcessed by the FS thread. This is */ |
565 | /* only valid for command queues which receive entries from the adapter. */ | 565 | /* only valid for command queues which receive entries from the adapter. */ |
566 | struct list_head pendingq; /* A queue of outstanding fib's to the adapter. */ | ||
567 | u32 numpending; /* Number of entries on outstanding queue. */ | 566 | u32 numpending; /* Number of entries on outstanding queue. */ |
568 | struct aac_dev * dev; /* Back pointer to adapter structure */ | 567 | struct aac_dev * dev; /* Back pointer to adapter structure */ |
569 | }; | 568 | }; |
@@ -823,11 +822,6 @@ struct fib { | |||
823 | void *callback_data; | 822 | void *callback_data; |
824 | u32 flags; // u32 dmb was ulong | 823 | u32 flags; // u32 dmb was ulong |
825 | /* | 824 | /* |
826 | * The following is used to put this fib context onto the | ||
827 | * Outstanding I/O queue. | ||
828 | */ | ||
829 | struct list_head queue; | ||
830 | /* | ||
831 | * And for the internal issue/reply queues (we may be able | 825 | * And for the internal issue/reply queues (we may be able |
832 | * to merge these two) | 826 | * to merge these two) |
833 | */ | 827 | */ |
@@ -1815,3 +1809,5 @@ int aac_probe_container(struct aac_dev *dev, int cid); | |||
1815 | extern int numacb; | 1809 | extern int numacb; |
1816 | extern int acbsize; | 1810 | extern int acbsize; |
1817 | extern char aac_driver_version[]; | 1811 | extern char aac_driver_version[]; |
1812 | extern int startup_timeout; | ||
1813 | extern int aif_timeout; | ||
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 9f75144e5247..255421de9d1a 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c | |||
@@ -535,7 +535,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | |||
535 | default: | 535 | default: |
536 | data_dir = DMA_NONE; | 536 | data_dir = DMA_NONE; |
537 | } | 537 | } |
538 | if (user_srbcmd->sg.count > (sizeof(sg_list)/sizeof(sg_list[0]))) { | 538 | if (user_srbcmd->sg.count > ARRAY_SIZE(sg_list)) { |
539 | dprintk((KERN_DEBUG"aacraid: too many sg entries %d\n", | 539 | dprintk((KERN_DEBUG"aacraid: too many sg entries %d\n", |
540 | le32_to_cpu(srbcmd->sg.count))); | 540 | le32_to_cpu(srbcmd->sg.count))); |
541 | rcode = -EINVAL; | 541 | rcode = -EINVAL; |
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 19397453bae7..35b0a6ebd3f5 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c | |||
@@ -103,7 +103,7 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co | |||
103 | * This assumes the memory is mapped zero->n, which isnt | 103 | * This assumes the memory is mapped zero->n, which isnt |
104 | * always true on real computers. It also has some slight problems | 104 | * always true on real computers. It also has some slight problems |
105 | * with the GART on x86-64. I've btw never tried DMA from PCI space | 105 | * with the GART on x86-64. I've btw never tried DMA from PCI space |
106 | * on this platform but don't be suprised if its problematic. | 106 | * on this platform but don't be surprised if its problematic. |
107 | */ | 107 | */ |
108 | #ifndef CONFIG_GART_IOMMU | 108 | #ifndef CONFIG_GART_IOMMU |
109 | if ((num_physpages << (PAGE_SHIFT - 12)) <= AAC_MAX_HOSTPHYSMEMPAGES) { | 109 | if ((num_physpages << (PAGE_SHIFT - 12)) <= AAC_MAX_HOSTPHYSMEMPAGES) { |
@@ -159,7 +159,6 @@ static void aac_queue_init(struct aac_dev * dev, struct aac_queue * q, u32 *mem, | |||
159 | { | 159 | { |
160 | q->numpending = 0; | 160 | q->numpending = 0; |
161 | q->dev = dev; | 161 | q->dev = dev; |
162 | INIT_LIST_HEAD(&q->pendingq); | ||
163 | init_waitqueue_head(&q->cmdready); | 162 | init_waitqueue_head(&q->cmdready); |
164 | INIT_LIST_HEAD(&q->cmdq); | 163 | INIT_LIST_HEAD(&q->cmdq); |
165 | init_waitqueue_head(&q->qfull); | 164 | init_waitqueue_head(&q->qfull); |
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 9f9f4aae23c0..d2ef17ea44fa 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
@@ -472,7 +472,6 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
472 | spin_lock_irqsave(q->lock, qflags); | 472 | spin_lock_irqsave(q->lock, qflags); |
473 | if (dev->new_comm_interface) { | 473 | if (dev->new_comm_interface) { |
474 | unsigned long count = 10000000L; /* 50 seconds */ | 474 | unsigned long count = 10000000L; /* 50 seconds */ |
475 | list_add_tail(&fibptr->queue, &q->pendingq); | ||
476 | q->numpending++; | 475 | q->numpending++; |
477 | spin_unlock_irqrestore(q->lock, qflags); | 476 | spin_unlock_irqrestore(q->lock, qflags); |
478 | while (aac_adapter_send(fibptr) != 0) { | 477 | while (aac_adapter_send(fibptr) != 0) { |
@@ -481,7 +480,6 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
481 | spin_unlock_irqrestore(&fibptr->event_lock, flags); | 480 | spin_unlock_irqrestore(&fibptr->event_lock, flags); |
482 | spin_lock_irqsave(q->lock, qflags); | 481 | spin_lock_irqsave(q->lock, qflags); |
483 | q->numpending--; | 482 | q->numpending--; |
484 | list_del(&fibptr->queue); | ||
485 | spin_unlock_irqrestore(q->lock, qflags); | 483 | spin_unlock_irqrestore(q->lock, qflags); |
486 | return -ETIMEDOUT; | 484 | return -ETIMEDOUT; |
487 | } | 485 | } |
@@ -492,7 +490,6 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
492 | unsigned long nointr = 0; | 490 | unsigned long nointr = 0; |
493 | aac_queue_get( dev, &index, AdapNormCmdQueue, hw_fib, 1, fibptr, &nointr); | 491 | aac_queue_get( dev, &index, AdapNormCmdQueue, hw_fib, 1, fibptr, &nointr); |
494 | 492 | ||
495 | list_add_tail(&fibptr->queue, &q->pendingq); | ||
496 | q->numpending++; | 493 | q->numpending++; |
497 | *(q->headers.producer) = cpu_to_le32(index + 1); | 494 | *(q->headers.producer) = cpu_to_le32(index + 1); |
498 | spin_unlock_irqrestore(q->lock, qflags); | 495 | spin_unlock_irqrestore(q->lock, qflags); |
@@ -520,7 +517,6 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
520 | if (--count == 0) { | 517 | if (--count == 0) { |
521 | spin_lock_irqsave(q->lock, qflags); | 518 | spin_lock_irqsave(q->lock, qflags); |
522 | q->numpending--; | 519 | q->numpending--; |
523 | list_del(&fibptr->queue); | ||
524 | spin_unlock_irqrestore(q->lock, qflags); | 520 | spin_unlock_irqrestore(q->lock, qflags); |
525 | if (wait == -1) { | 521 | if (wait == -1) { |
526 | printk(KERN_ERR "aacraid: aac_fib_send: first asynchronous command timed out.\n" | 522 | printk(KERN_ERR "aacraid: aac_fib_send: first asynchronous command timed out.\n" |
@@ -1214,7 +1210,7 @@ int aac_command_thread(void *data) | |||
1214 | * since the last read off | 1210 | * since the last read off |
1215 | * the queue? | 1211 | * the queue? |
1216 | */ | 1212 | */ |
1217 | if ((time_now - time_last) > 120) { | 1213 | if ((time_now - time_last) > aif_timeout) { |
1218 | entry = entry->next; | 1214 | entry = entry->next; |
1219 | aac_close_fib_context(dev, fibctx); | 1215 | aac_close_fib_context(dev, fibctx); |
1220 | continue; | 1216 | continue; |
diff --git a/drivers/scsi/aacraid/dpcsup.c b/drivers/scsi/aacraid/dpcsup.c index f6bcb9486f85..b2a5c7262f36 100644 --- a/drivers/scsi/aacraid/dpcsup.c +++ b/drivers/scsi/aacraid/dpcsup.c | |||
@@ -85,10 +85,9 @@ unsigned int aac_response_normal(struct aac_queue * q) | |||
85 | * continue. The caller has already been notified that | 85 | * continue. The caller has already been notified that |
86 | * the fib timed out. | 86 | * the fib timed out. |
87 | */ | 87 | */ |
88 | if (!(fib->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) { | 88 | if (!(fib->flags & FIB_CONTEXT_FLAG_TIMED_OUT)) |
89 | list_del(&fib->queue); | ||
90 | dev->queues->queue[AdapNormCmdQueue].numpending--; | 89 | dev->queues->queue[AdapNormCmdQueue].numpending--; |
91 | } else { | 90 | else { |
92 | printk(KERN_WARNING "aacraid: FIB timeout (%x).\n", fib->flags); | 91 | printk(KERN_WARNING "aacraid: FIB timeout (%x).\n", fib->flags); |
93 | printk(KERN_DEBUG"aacraid: hwfib=%p fib index=%i fib=%p\n",hwfib, hwfib->header.SenderData,fib); | 92 | printk(KERN_DEBUG"aacraid: hwfib=%p fib index=%i fib=%p\n",hwfib, hwfib->header.SenderData,fib); |
94 | continue; | 93 | continue; |
@@ -284,7 +283,6 @@ unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index) | |||
284 | return 0; | 283 | return 0; |
285 | } | 284 | } |
286 | 285 | ||
287 | list_del(&fib->queue); | ||
288 | dev->queues->queue[AdapNormCmdQueue].numpending--; | 286 | dev->queues->queue[AdapNormCmdQueue].numpending--; |
289 | 287 | ||
290 | if (fast) { | 288 | if (fast) { |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 6ef89c99dd12..e42a479ce64a 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -119,7 +119,7 @@ static struct pci_device_id aac_pci_tbl[] = { | |||
119 | { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */ | 119 | { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */ |
120 | { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */ | 120 | { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */ |
121 | { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */ | 121 | { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */ |
122 | { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5085AU (Hurricane) */ | 122 | { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5445AU (Hurricane44) */ |
123 | { 0x9005, 0x0285, 0x9005, 0x02a4, 0, 0, 30 }, /* ICP9085LI (Marauder-X) */ | 123 | { 0x9005, 0x0285, 0x9005, 0x02a4, 0, 0, 30 }, /* ICP9085LI (Marauder-X) */ |
124 | { 0x9005, 0x0285, 0x9005, 0x02a5, 0, 0, 31 }, /* ICP5085BR (Marauder-E) */ | 124 | { 0x9005, 0x0285, 0x9005, 0x02a5, 0, 0, 31 }, /* ICP5085BR (Marauder-E) */ |
125 | { 0x9005, 0x0286, 0x9005, 0x02a6, 0, 0, 32 }, /* ICP9067MA (Intruder-6) */ | 125 | { 0x9005, 0x0286, 0x9005, 0x02a6, 0, 0, 32 }, /* ICP9067MA (Intruder-6) */ |
@@ -143,7 +143,7 @@ static struct pci_device_id aac_pci_tbl[] = { | |||
143 | { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000SAS (BlackBird) */ | 143 | { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000SAS (BlackBird) */ |
144 | { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */ | 144 | { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */ |
145 | { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */ | 145 | { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */ |
146 | { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-4810SAS (Hurricane */ | 146 | { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800SAS (Hurricane44) */ |
147 | 147 | ||
148 | { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/ | 148 | { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/ |
149 | { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/ | 149 | { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/ |
@@ -195,7 +195,7 @@ static struct aac_driver_ident aac_drivers[] = { | |||
195 | { aac_rkt_init, "aacraid", "ICP ", "ICP9014R0 ", 1 }, /* ICP9014R0 (Lancer) */ | 195 | { aac_rkt_init, "aacraid", "ICP ", "ICP9014R0 ", 1 }, /* ICP9014R0 (Lancer) */ |
196 | { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */ | 196 | { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */ |
197 | { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */ | 197 | { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */ |
198 | { aac_rkt_init, "aacraid", "ICP ", "ICP5085AU ", 1 }, /* ICP5085AU (Hurricane) */ | 198 | { aac_rkt_init, "aacraid", "ICP ", "ICP5445AU ", 1 }, /* ICP5445AU (Hurricane44) */ |
199 | { aac_rx_init, "aacraid", "ICP ", "ICP9085LI ", 1 }, /* ICP9085LI (Marauder-X) */ | 199 | { aac_rx_init, "aacraid", "ICP ", "ICP9085LI ", 1 }, /* ICP9085LI (Marauder-X) */ |
200 | { aac_rx_init, "aacraid", "ICP ", "ICP5085BR ", 1 }, /* ICP5085BR (Marauder-E) */ | 200 | { aac_rx_init, "aacraid", "ICP ", "ICP5085BR ", 1 }, /* ICP5085BR (Marauder-E) */ |
201 | { aac_rkt_init, "aacraid", "ICP ", "ICP9067MA ", 1 }, /* ICP9067MA (Intruder-6) */ | 201 | { aac_rkt_init, "aacraid", "ICP ", "ICP9067MA ", 1 }, /* ICP9067MA (Intruder-6) */ |
@@ -217,7 +217,7 @@ static struct aac_driver_ident aac_drivers[] = { | |||
217 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */ | 217 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */ |
218 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ | 218 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ |
219 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ | 219 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ |
220 | { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-4810SAS ", 1 }, /* ASR-4810SAS (Hurricane) */ | 220 | { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-3800SAS ", 1 }, /* ASR-3800SAS (Hurricane44) */ |
221 | 221 | ||
222 | { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ | 222 | { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ |
223 | { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ | 223 | { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ |
@@ -453,15 +453,10 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) | |||
453 | 453 | ||
454 | printk(KERN_ERR "%s: Host adapter reset request. SCSI hang ?\n", | 454 | printk(KERN_ERR "%s: Host adapter reset request. SCSI hang ?\n", |
455 | AAC_DRIVERNAME); | 455 | AAC_DRIVERNAME); |
456 | |||
457 | |||
458 | spin_lock_irq(host->host_lock); | ||
459 | |||
460 | aac = (struct aac_dev *)host->hostdata; | 456 | aac = (struct aac_dev *)host->hostdata; |
461 | if (aac_adapter_check_health(aac)) { | 457 | if (aac_adapter_check_health(aac)) { |
462 | printk(KERN_ERR "%s: Host adapter appears dead\n", | 458 | printk(KERN_ERR "%s: Host adapter appears dead\n", |
463 | AAC_DRIVERNAME); | 459 | AAC_DRIVERNAME); |
464 | spin_unlock_irq(host->host_lock); | ||
465 | return -ENODEV; | 460 | return -ENODEV; |
466 | } | 461 | } |
467 | /* | 462 | /* |
@@ -487,13 +482,10 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) | |||
487 | /* | 482 | /* |
488 | * We can exit If all the commands are complete | 483 | * We can exit If all the commands are complete |
489 | */ | 484 | */ |
490 | spin_unlock_irq(host->host_lock); | ||
491 | if (active == 0) | 485 | if (active == 0) |
492 | return SUCCESS; | 486 | return SUCCESS; |
493 | ssleep(1); | 487 | ssleep(1); |
494 | spin_lock_irq(host->host_lock); | ||
495 | } | 488 | } |
496 | spin_unlock_irq(host->host_lock); | ||
497 | printk(KERN_ERR "%s: SCSI bus appears hung\n", AAC_DRIVERNAME); | 489 | printk(KERN_ERR "%s: SCSI bus appears hung\n", AAC_DRIVERNAME); |
498 | return -ETIMEDOUT; | 490 | return -ETIMEDOUT; |
499 | } | 491 | } |
@@ -572,7 +564,7 @@ static long aac_compat_do_ioctl(struct aac_dev *dev, unsigned cmd, unsigned long | |||
572 | 564 | ||
573 | f = compat_alloc_user_space(sizeof(*f)); | 565 | f = compat_alloc_user_space(sizeof(*f)); |
574 | ret = 0; | 566 | ret = 0; |
575 | if (clear_user(f, sizeof(*f)) != sizeof(*f)) | 567 | if (clear_user(f, sizeof(*f))) |
576 | ret = -EFAULT; | 568 | ret = -EFAULT; |
577 | if (copy_in_user(f, (void __user *)arg, sizeof(struct fib_ioctl) - sizeof(u32))) | 569 | if (copy_in_user(f, (void __user *)arg, sizeof(struct fib_ioctl) - sizeof(u32))) |
578 | ret = -EFAULT; | 570 | ret = -EFAULT; |
diff --git a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c index 7a23e027eb78..5b52966bbbf3 100644 --- a/drivers/scsi/aacraid/rkt.c +++ b/drivers/scsi/aacraid/rkt.c | |||
@@ -444,14 +444,14 @@ int aac_rkt_init(struct aac_dev *dev) | |||
444 | */ | 444 | */ |
445 | while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING)) | 445 | while (!(rkt_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING)) |
446 | { | 446 | { |
447 | if(time_after(jiffies, start+180*HZ)) | 447 | if(time_after(jiffies, start+startup_timeout*HZ)) |
448 | { | 448 | { |
449 | status = rkt_readl(dev, MUnit.OMRx[0]); | 449 | status = rkt_readl(dev, MUnit.OMRx[0]); |
450 | printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", | 450 | printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", |
451 | dev->name, instance, status); | 451 | dev->name, instance, status); |
452 | goto error_iounmap; | 452 | goto error_iounmap; |
453 | } | 453 | } |
454 | schedule_timeout_uninterruptible(1); | 454 | msleep(1); |
455 | } | 455 | } |
456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) | 456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) |
457 | { | 457 | { |
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 729b9eb268c2..9dadfb28b3f1 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c | |||
@@ -444,14 +444,14 @@ int aac_rx_init(struct aac_dev *dev) | |||
444 | while ((!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING)) | 444 | while ((!(rx_readl(dev, IndexRegs.Mailbox[7]) & KERNEL_UP_AND_RUNNING)) |
445 | || (!(rx_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))) | 445 | || (!(rx_readl(dev, MUnit.OMRx[0]) & KERNEL_UP_AND_RUNNING))) |
446 | { | 446 | { |
447 | if(time_after(jiffies, start+180*HZ)) | 447 | if(time_after(jiffies, start+startup_timeout*HZ)) |
448 | { | 448 | { |
449 | status = rx_readl(dev, IndexRegs.Mailbox[7]); | 449 | status = rx_readl(dev, IndexRegs.Mailbox[7]); |
450 | printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", | 450 | printk(KERN_ERR "%s%d: adapter kernel failed to start, init status = %lx.\n", |
451 | dev->name, instance, status); | 451 | dev->name, instance, status); |
452 | goto error_iounmap; | 452 | goto error_iounmap; |
453 | } | 453 | } |
454 | schedule_timeout_uninterruptible(1); | 454 | msleep(1); |
455 | } | 455 | } |
456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) | 456 | if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) |
457 | { | 457 | { |
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index a53454908205..88d400fccc94 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c | |||
@@ -66,11 +66,11 @@ static irqreturn_t aac_sa_intr(int irq, void *dev_id, struct pt_regs *regs) | |||
66 | sa_writew(dev, DoorbellClrReg_p, PrintfReady); /* clear PrintfReady */ | 66 | sa_writew(dev, DoorbellClrReg_p, PrintfReady); /* clear PrintfReady */ |
67 | sa_writew(dev, DoorbellReg_s, PrintfDone); | 67 | sa_writew(dev, DoorbellReg_s, PrintfDone); |
68 | } else if (intstat & DOORBELL_1) { // dev -> Host Normal Command Ready | 68 | } else if (intstat & DOORBELL_1) { // dev -> Host Normal Command Ready |
69 | aac_command_normal(&dev->queues->queue[HostNormCmdQueue]); | ||
70 | sa_writew(dev, DoorbellClrReg_p, DOORBELL_1); | 69 | sa_writew(dev, DoorbellClrReg_p, DOORBELL_1); |
70 | aac_command_normal(&dev->queues->queue[HostNormCmdQueue]); | ||
71 | } else if (intstat & DOORBELL_2) { // dev -> Host Normal Response Ready | 71 | } else if (intstat & DOORBELL_2) { // dev -> Host Normal Response Ready |
72 | aac_response_normal(&dev->queues->queue[HostNormRespQueue]); | ||
73 | sa_writew(dev, DoorbellClrReg_p, DOORBELL_2); | 72 | sa_writew(dev, DoorbellClrReg_p, DOORBELL_2); |
73 | aac_response_normal(&dev->queues->queue[HostNormRespQueue]); | ||
74 | } else if (intstat & DOORBELL_3) { // dev -> Host Normal Command Not Full | 74 | } else if (intstat & DOORBELL_3) { // dev -> Host Normal Command Not Full |
75 | sa_writew(dev, DoorbellClrReg_p, DOORBELL_3); | 75 | sa_writew(dev, DoorbellClrReg_p, DOORBELL_3); |
76 | } else if (intstat & DOORBELL_4) { // dev -> Host Normal Response Not Full | 76 | } else if (intstat & DOORBELL_4) { // dev -> Host Normal Response Not Full |
@@ -318,13 +318,13 @@ int aac_sa_init(struct aac_dev *dev) | |||
318 | * Wait for the adapter to be up and running. Wait up to 3 minutes. | 318 | * Wait for the adapter to be up and running. Wait up to 3 minutes. |
319 | */ | 319 | */ |
320 | while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) { | 320 | while (!(sa_readl(dev, Mailbox7) & KERNEL_UP_AND_RUNNING)) { |
321 | if (time_after(jiffies, start+180*HZ)) { | 321 | if (time_after(jiffies, start+startup_timeout*HZ)) { |
322 | status = sa_readl(dev, Mailbox7); | 322 | status = sa_readl(dev, Mailbox7); |
323 | printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n", | 323 | printk(KERN_WARNING "%s%d: adapter kernel failed to start, init status = %lx.\n", |
324 | name, instance, status); | 324 | name, instance, status); |
325 | goto error_iounmap; | 325 | goto error_iounmap; |
326 | } | 326 | } |
327 | schedule_timeout_uninterruptible(1); | 327 | msleep(1); |
328 | } | 328 | } |
329 | 329 | ||
330 | if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) { | 330 | if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) { |