diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/53c700.h | 6 | ||||
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 15 | ||||
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 6 | ||||
-rw-r--r-- | drivers/scsi/arm/queue.c | 6 | ||||
-rw-r--r-- | drivers/scsi/ibmmca.c | 3 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/megaraid.c | 2 | ||||
-rw-r--r-- | drivers/scsi/osst.c | 2 | ||||
-rw-r--r-- | drivers/scsi/st.c | 2 | ||||
-rw-r--r-- | drivers/scsi/wd33c93.c | 4 |
10 files changed, 21 insertions, 31 deletions
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h index d8041952b1b5..7f22a06fe5ec 100644 --- a/drivers/scsi/53c700.h +++ b/drivers/scsi/53c700.h | |||
@@ -474,8 +474,7 @@ NCR_700_readl(struct Scsi_Host *host, __u32 reg) | |||
474 | ioread32(hostdata->base + reg); | 474 | ioread32(hostdata->base + reg); |
475 | #if 1 | 475 | #if 1 |
476 | /* sanity check the register */ | 476 | /* sanity check the register */ |
477 | if((reg & 0x3) != 0) | 477 | BUG_ON((reg & 0x3) != 0); |
478 | BUG(); | ||
479 | #endif | 478 | #endif |
480 | 479 | ||
481 | return value; | 480 | return value; |
@@ -498,8 +497,7 @@ NCR_700_writel(__u32 value, struct Scsi_Host *host, __u32 reg) | |||
498 | 497 | ||
499 | #if 1 | 498 | #if 1 |
500 | /* sanity check the register */ | 499 | /* sanity check the register */ |
501 | if((reg & 0x3) != 0) | 500 | BUG_ON((reg & 0x3) != 0); |
502 | BUG(); | ||
503 | #endif | 501 | #endif |
504 | 502 | ||
505 | bEBus ? iowrite32be(value, hostdata->base + reg): | 503 | bEBus ? iowrite32be(value, hostdata->base + reg): |
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index ea9e038813eb..83b5c7d085f2 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -396,8 +396,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr) | |||
396 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; | 396 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; |
397 | 397 | ||
398 | dprintk((KERN_DEBUG "get_container_name_callback[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies)); | 398 | dprintk((KERN_DEBUG "get_container_name_callback[cpu %d]: t = %ld.\n", smp_processor_id(), jiffies)); |
399 | if (fibptr == NULL) | 399 | BUG_ON(fibptr == NULL); |
400 | BUG(); | ||
401 | 400 | ||
402 | get_name_reply = (struct aac_get_name_resp *) fib_data(fibptr); | 401 | get_name_reply = (struct aac_get_name_resp *) fib_data(fibptr); |
403 | /* Failure is irrelevant, using default value instead */ | 402 | /* Failure is irrelevant, using default value instead */ |
@@ -956,8 +955,7 @@ static void io_callback(void *context, struct fib * fibptr) | |||
956 | smp_processor_id(), (unsigned long long)lba, jiffies); | 955 | smp_processor_id(), (unsigned long long)lba, jiffies); |
957 | } | 956 | } |
958 | 957 | ||
959 | if (fibptr == NULL) | 958 | BUG_ON(fibptr == NULL); |
960 | BUG(); | ||
961 | 959 | ||
962 | if(scsicmd->use_sg) | 960 | if(scsicmd->use_sg) |
963 | pci_unmap_sg(dev->pdev, | 961 | pci_unmap_sg(dev->pdev, |
@@ -1092,8 +1090,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1092 | 1090 | ||
1093 | aac_build_sgraw(scsicmd, &readcmd->sg); | 1091 | aac_build_sgraw(scsicmd, &readcmd->sg); |
1094 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(readcmd->sg.count) - 1) * sizeof (struct sgentryraw)); | 1092 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(readcmd->sg.count) - 1) * sizeof (struct sgentryraw)); |
1095 | if (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))) | 1093 | BUG_ON(fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))); |
1096 | BUG(); | ||
1097 | /* | 1094 | /* |
1098 | * Now send the Fib to the adapter | 1095 | * Now send the Fib to the adapter |
1099 | */ | 1096 | */ |
@@ -1261,8 +1258,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) | |||
1261 | 1258 | ||
1262 | aac_build_sgraw(scsicmd, &writecmd->sg); | 1259 | aac_build_sgraw(scsicmd, &writecmd->sg); |
1263 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(writecmd->sg.count) - 1) * sizeof (struct sgentryraw)); | 1260 | fibsize = sizeof(struct aac_raw_io) + ((le32_to_cpu(writecmd->sg.count) - 1) * sizeof (struct sgentryraw)); |
1264 | if (fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))) | 1261 | BUG_ON(fibsize > (dev->max_fib_size - sizeof(struct aac_fibhdr))); |
1265 | BUG(); | ||
1266 | /* | 1262 | /* |
1267 | * Now send the Fib to the adapter | 1263 | * Now send the Fib to the adapter |
1268 | */ | 1264 | */ |
@@ -1904,8 +1900,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr) | |||
1904 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; | 1900 | scsicmd->SCp.phase = AAC_OWNER_MIDLEVEL; |
1905 | dev = (struct aac_dev *)scsicmd->device->host->hostdata; | 1901 | dev = (struct aac_dev *)scsicmd->device->host->hostdata; |
1906 | 1902 | ||
1907 | if (fibptr == NULL) | 1903 | BUG_ON(fibptr == NULL); |
1908 | BUG(); | ||
1909 | 1904 | ||
1910 | srbreply = (struct aac_srb_reply *) fib_data(fibptr); | 1905 | srbreply = (struct aac_srb_reply *) fib_data(fibptr); |
1911 | 1906 | ||
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index d2ef17ea44fa..3f27419c66af 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
@@ -229,8 +229,7 @@ void aac_fib_init(struct fib *fibptr) | |||
229 | static void fib_dealloc(struct fib * fibptr) | 229 | static void fib_dealloc(struct fib * fibptr) |
230 | { | 230 | { |
231 | struct hw_fib *hw_fib = fibptr->hw_fib; | 231 | struct hw_fib *hw_fib = fibptr->hw_fib; |
232 | if(hw_fib->header.StructType != FIB_MAGIC) | 232 | BUG_ON(hw_fib->header.StructType != FIB_MAGIC); |
233 | BUG(); | ||
234 | hw_fib->header.XferState = 0; | 233 | hw_fib->header.XferState = 0; |
235 | } | 234 | } |
236 | 235 | ||
@@ -530,8 +529,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, | |||
530 | } | 529 | } |
531 | } else | 530 | } else |
532 | down(&fibptr->event_wait); | 531 | down(&fibptr->event_wait); |
533 | if(fibptr->done == 0) | 532 | BUG_ON(fibptr->done == 0); |
534 | BUG(); | ||
535 | 533 | ||
536 | if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ | 534 | if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){ |
537 | return -ETIMEDOUT; | 535 | return -ETIMEDOUT; |
diff --git a/drivers/scsi/arm/queue.c b/drivers/scsi/arm/queue.c index b10750bb5c09..8caa5903ce38 100644 --- a/drivers/scsi/arm/queue.c +++ b/drivers/scsi/arm/queue.c | |||
@@ -118,8 +118,7 @@ int __queue_add(Queue_t *queue, Scsi_Cmnd *SCpnt, int head) | |||
118 | list_del(l); | 118 | list_del(l); |
119 | 119 | ||
120 | q = list_entry(l, QE_t, list); | 120 | q = list_entry(l, QE_t, list); |
121 | if (BAD_MAGIC(q, QUEUE_MAGIC_FREE)) | 121 | BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_FREE)); |
122 | BUG(); | ||
123 | 122 | ||
124 | SET_MAGIC(q, QUEUE_MAGIC_USED); | 123 | SET_MAGIC(q, QUEUE_MAGIC_USED); |
125 | q->SCpnt = SCpnt; | 124 | q->SCpnt = SCpnt; |
@@ -144,8 +143,7 @@ static Scsi_Cmnd *__queue_remove(Queue_t *queue, struct list_head *ent) | |||
144 | */ | 143 | */ |
145 | list_del(ent); | 144 | list_del(ent); |
146 | q = list_entry(ent, QE_t, list); | 145 | q = list_entry(ent, QE_t, list); |
147 | if (BAD_MAGIC(q, QUEUE_MAGIC_USED)) | 146 | BUG_ON(BAD_MAGIC(q, QUEUE_MAGIC_USED)); |
148 | BUG(); | ||
149 | 147 | ||
150 | SET_MAGIC(q, QUEUE_MAGIC_FREE); | 148 | SET_MAGIC(q, QUEUE_MAGIC_FREE); |
151 | list_add(ent, &queue->free); | 149 | list_add(ent, &queue->free); |
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index 0c6dc31bb14d..115f55471ed3 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c | |||
@@ -2241,8 +2241,7 @@ static int __ibmmca_host_reset(Scsi_Cmnd * cmd) | |||
2241 | int host_index; | 2241 | int host_index; |
2242 | unsigned long imm_command; | 2242 | unsigned long imm_command; |
2243 | 2243 | ||
2244 | if (cmd == NULL) | 2244 | BUG_ON(cmd == NULL); |
2245 | BUG(); | ||
2246 | 2245 | ||
2247 | ticks = IM_RESET_DELAY * HZ; | 2246 | ticks = IM_RESET_DELAY * HZ; |
2248 | shpnt = cmd->device->host; | 2247 | shpnt = cmd->device->host; |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 39b760a24241..988e6f7af01a 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -600,8 +600,7 @@ static ide_startstop_t idescsi_transfer_pc(ide_drive_t *drive) | |||
600 | "issuing a packet command\n"); | 600 | "issuing a packet command\n"); |
601 | return ide_do_reset (drive); | 601 | return ide_do_reset (drive); |
602 | } | 602 | } |
603 | if (HWGROUP(drive)->handler != NULL) | 603 | BUG_ON(HWGROUP(drive)->handler != NULL); |
604 | BUG(); | ||
605 | /* Set the interrupt routine */ | 604 | /* Set the interrupt routine */ |
606 | ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); | 605 | ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), idescsi_expiry); |
607 | /* Send the actual packet */ | 606 | /* Send the actual packet */ |
@@ -691,8 +690,7 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc) | |||
691 | set_bit(PC_DMA_OK, &pc->flags); | 690 | set_bit(PC_DMA_OK, &pc->flags); |
692 | 691 | ||
693 | if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) { | 692 | if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) { |
694 | if (HWGROUP(drive)->handler != NULL) | 693 | BUG_ON(HWGROUP(drive)->handler != NULL); |
695 | BUG(); | ||
696 | ide_set_handler(drive, &idescsi_transfer_pc, | 694 | ide_set_handler(drive, &idescsi_transfer_pc, |
697 | get_timeout(pc), idescsi_expiry); | 695 | get_timeout(pc), idescsi_expiry); |
698 | /* Issue the packet command */ | 696 | /* Issue the packet command */ |
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index c33857e7b33b..5d2cefb5e52d 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -1828,7 +1828,7 @@ mega_build_sglist(adapter_t *adapter, scb_t *scb, u32 *buf, u32 *len) | |||
1828 | 1828 | ||
1829 | scb->dma_type = MEGA_SGLIST; | 1829 | scb->dma_type = MEGA_SGLIST; |
1830 | 1830 | ||
1831 | if( sgcnt > adapter->sglen ) BUG(); | 1831 | BUG_ON(sgcnt > adapter->sglen); |
1832 | 1832 | ||
1833 | *len = 0; | 1833 | *len = 0; |
1834 | 1834 | ||
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index ce0ba3a174f9..4a2fed350d4e 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -4724,7 +4724,7 @@ err_out: | |||
4724 | 4724 | ||
4725 | 4725 | ||
4726 | /* Flush the tape buffer before close */ | 4726 | /* Flush the tape buffer before close */ |
4727 | static int os_scsi_tape_flush(struct file * filp) | 4727 | static int os_scsi_tape_flush(struct file * filp, fl_owner_t id) |
4728 | { | 4728 | { |
4729 | int result = 0, result2; | 4729 | int result = 0, result2; |
4730 | struct osst_tape * STp = filp->private_data; | 4730 | struct osst_tape * STp = filp->private_data; |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index ad87d73f88ee..1272dd249af3 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -1193,7 +1193,7 @@ static int st_open(struct inode *inode, struct file *filp) | |||
1193 | 1193 | ||
1194 | 1194 | ||
1195 | /* Flush the tape buffer before close */ | 1195 | /* Flush the tape buffer before close */ |
1196 | static int st_flush(struct file *filp) | 1196 | static int st_flush(struct file *filp, fl_owner_t id) |
1197 | { | 1197 | { |
1198 | int result = 0, result2; | 1198 | int result = 0, result2; |
1199 | unsigned char cmd[MAX_COMMAND_SIZE]; | 1199 | unsigned char cmd[MAX_COMMAND_SIZE]; |
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index 9341703dee00..27307fe5a4c8 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c | |||
@@ -939,6 +939,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
939 | DB(DB_INTR, printk("%02x", cmd->SCp.Status)) | 939 | DB(DB_INTR, printk("%02x", cmd->SCp.Status)) |
940 | if (hostdata->level2 >= L2_BASIC) { | 940 | if (hostdata->level2 >= L2_BASIC) { |
941 | sr = read_wd33c93(regs, WD_SCSI_STATUS); /* clear interrupt */ | 941 | sr = read_wd33c93(regs, WD_SCSI_STATUS); /* clear interrupt */ |
942 | udelay(7); | ||
942 | hostdata->state = S_RUNNING_LEVEL2; | 943 | hostdata->state = S_RUNNING_LEVEL2; |
943 | write_wd33c93(regs, WD_COMMAND_PHASE, 0x50); | 944 | write_wd33c93(regs, WD_COMMAND_PHASE, 0x50); |
944 | write_wd33c93_cmd(regs, WD_CMD_SEL_ATN_XFER); | 945 | write_wd33c93_cmd(regs, WD_CMD_SEL_ATN_XFER); |
@@ -955,6 +956,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
955 | 956 | ||
956 | msg = read_1_byte(regs); | 957 | msg = read_1_byte(regs); |
957 | sr = read_wd33c93(regs, WD_SCSI_STATUS); /* clear interrupt */ | 958 | sr = read_wd33c93(regs, WD_SCSI_STATUS); /* clear interrupt */ |
959 | udelay(7); | ||
958 | 960 | ||
959 | hostdata->incoming_msg[hostdata->incoming_ptr] = msg; | 961 | hostdata->incoming_msg[hostdata->incoming_ptr] = msg; |
960 | if (hostdata->incoming_msg[0] == EXTENDED_MESSAGE) | 962 | if (hostdata->incoming_msg[0] == EXTENDED_MESSAGE) |
@@ -1358,6 +1360,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1358 | } else { | 1360 | } else { |
1359 | /* Verify this is a change to MSG_IN and read the message */ | 1361 | /* Verify this is a change to MSG_IN and read the message */ |
1360 | sr = read_wd33c93(regs, WD_SCSI_STATUS); | 1362 | sr = read_wd33c93(regs, WD_SCSI_STATUS); |
1363 | udelay(7); | ||
1361 | if (sr == (CSR_ABORT | PHS_MESS_IN) || | 1364 | if (sr == (CSR_ABORT | PHS_MESS_IN) || |
1362 | sr == (CSR_UNEXP | PHS_MESS_IN) || | 1365 | sr == (CSR_UNEXP | PHS_MESS_IN) || |
1363 | sr == (CSR_SRV_REQ | PHS_MESS_IN)) { | 1366 | sr == (CSR_SRV_REQ | PHS_MESS_IN)) { |
@@ -1374,6 +1377,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1374 | asr); | 1377 | asr); |
1375 | } | 1378 | } |
1376 | sr = read_wd33c93(regs, WD_SCSI_STATUS); | 1379 | sr = read_wd33c93(regs, WD_SCSI_STATUS); |
1380 | udelay(7); | ||
1377 | if (sr != CSR_MSGIN) | 1381 | if (sr != CSR_MSGIN) |
1378 | printk | 1382 | printk |
1379 | ("wd33c93: Not paused with ACK on RESEL (%02x)\n", | 1383 | ("wd33c93: Not paused with ACK on RESEL (%02x)\n", |