diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/scsi/a100u2w.c | 9 | ||||
-rw-r--r-- | drivers/scsi/advansys.c | 2 | ||||
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr.h | 14 | ||||
-rw-r--r-- | drivers/scsi/gdth.c | 7 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 5 | ||||
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 1 | ||||
-rw-r--r-- | drivers/scsi/sr.c | 1 |
9 files changed, 29 insertions, 14 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index c46666a24809..b9d374082b65 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -325,7 +325,7 @@ menuconfig SCSI_LOWLEVEL | |||
325 | depends on SCSI!=n | 325 | depends on SCSI!=n |
326 | default y | 326 | default y |
327 | 327 | ||
328 | if SCSI_LOWLEVEL | 328 | if SCSI_LOWLEVEL && SCSI |
329 | 329 | ||
330 | config ISCSI_TCP | 330 | config ISCSI_TCP |
331 | tristate "iSCSI Initiator over TCP/IP" | 331 | tristate "iSCSI Initiator over TCP/IP" |
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index f608d4a1d6da..792b2e807bf3 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c | |||
@@ -674,12 +674,13 @@ static struct orc_scb *__orc_alloc_scb(struct orc_host * host) | |||
674 | for (index = 0; index < 32; index++) { | 674 | for (index = 0; index < 32; index++) { |
675 | if ((host->allocation_map[channel][i] >> index) & 0x01) { | 675 | if ((host->allocation_map[channel][i] >> index) & 0x01) { |
676 | host->allocation_map[channel][i] &= ~(1 << index); | 676 | host->allocation_map[channel][i] &= ~(1 << index); |
677 | break; | 677 | idx = index + 32 * i; |
678 | /* | ||
679 | * Translate the index to a structure instance | ||
680 | */ | ||
681 | return host->scb_virt + idx; | ||
678 | } | 682 | } |
679 | } | 683 | } |
680 | idx = index + 32 * i; | ||
681 | /* Translate the index to a structure instance */ | ||
682 | return (struct orc_scb *) ((unsigned long) host->scb_virt + (idx * sizeof(struct orc_scb))); | ||
683 | } | 684 | } |
684 | return NULL; | 685 | return NULL; |
685 | } | 686 | } |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 3c2d6888bb8c..8591585e5cc5 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -6439,7 +6439,7 @@ static int AdvLoadMicrocode(AdvPortAddr iop_base, unsigned char *buf, int size, | |||
6439 | i += 2; | 6439 | i += 2; |
6440 | len += 2; | 6440 | len += 2; |
6441 | } else { | 6441 | } else { |
6442 | unsigned char off = buf[i] * 2; | 6442 | unsigned int off = buf[i] * 2; |
6443 | unsigned short word = (buf[off + 1] << 8) | buf[off]; | 6443 | unsigned short word = (buf[off + 1] << 8) | buf[off]; |
6444 | AdvWriteWordAutoIncLram(iop_base, word); | 6444 | AdvWriteWordAutoIncLram(iop_base, word); |
6445 | len += 2; | 6445 | len += 2; |
diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index 0393707bdfce..3288be2e49f8 100644 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h | |||
@@ -341,13 +341,13 @@ struct MessageUnit_B | |||
341 | uint32_t done_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; | 341 | uint32_t done_qbuffer[ARCMSR_MAX_HBB_POSTQUEUE]; |
342 | uint32_t postq_index; | 342 | uint32_t postq_index; |
343 | uint32_t doneq_index; | 343 | uint32_t doneq_index; |
344 | uint32_t __iomem *drv2iop_doorbell_reg; | 344 | void __iomem *drv2iop_doorbell_reg; |
345 | uint32_t __iomem *drv2iop_doorbell_mask_reg; | 345 | void __iomem *drv2iop_doorbell_mask_reg; |
346 | uint32_t __iomem *iop2drv_doorbell_reg; | 346 | void __iomem *iop2drv_doorbell_reg; |
347 | uint32_t __iomem *iop2drv_doorbell_mask_reg; | 347 | void __iomem *iop2drv_doorbell_mask_reg; |
348 | uint32_t __iomem *msgcode_rwbuffer_reg; | 348 | void __iomem *msgcode_rwbuffer_reg; |
349 | uint32_t __iomem *ioctl_wbuffer_reg; | 349 | void __iomem *ioctl_wbuffer_reg; |
350 | uint32_t __iomem *ioctl_rbuffer_reg; | 350 | void __iomem *ioctl_rbuffer_reg; |
351 | }; | 351 | }; |
352 | 352 | ||
353 | /* | 353 | /* |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 27ebd336409b..0b2080d33575 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -493,6 +493,12 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd, | |||
493 | if (!scp) | 493 | if (!scp) |
494 | return -ENOMEM; | 494 | return -ENOMEM; |
495 | 495 | ||
496 | scp->sense_buffer = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_KERNEL); | ||
497 | if (!scp->sense_buffer) { | ||
498 | kfree(scp); | ||
499 | return -ENOMEM; | ||
500 | } | ||
501 | |||
496 | scp->device = sdev; | 502 | scp->device = sdev; |
497 | memset(&cmndinfo, 0, sizeof(cmndinfo)); | 503 | memset(&cmndinfo, 0, sizeof(cmndinfo)); |
498 | 504 | ||
@@ -513,6 +519,7 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd, | |||
513 | rval = cmndinfo.status; | 519 | rval = cmndinfo.status; |
514 | if (info) | 520 | if (info) |
515 | *info = cmndinfo.info; | 521 | *info = cmndinfo.info; |
522 | kfree(scp->sense_buffer); | ||
516 | kfree(scp); | 523 | kfree(scp); |
517 | return rval; | 524 | return rval; |
518 | } | 525 | } |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ba21d97d1855..f40898dc2d14 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -2162,10 +2162,15 @@ void sdev_evt_send(struct scsi_device *sdev, struct scsi_event *evt) | |||
2162 | { | 2162 | { |
2163 | unsigned long flags; | 2163 | unsigned long flags; |
2164 | 2164 | ||
2165 | #if 0 | ||
2166 | /* FIXME: currently this check eliminates all media change events | ||
2167 | * for polled devices. Need to update to discriminate between AN | ||
2168 | * and polled events */ | ||
2165 | if (!test_bit(evt->evt_type, sdev->supported_events)) { | 2169 | if (!test_bit(evt->evt_type, sdev->supported_events)) { |
2166 | kfree(evt); | 2170 | kfree(evt); |
2167 | return; | 2171 | return; |
2168 | } | 2172 | } |
2173 | #endif | ||
2169 | 2174 | ||
2170 | spin_lock_irqsave(&sdev->list_lock, flags); | 2175 | spin_lock_irqsave(&sdev->list_lock, flags); |
2171 | list_add_tail(&evt->node, &sdev->event_list); | 2176 | list_add_tail(&evt->node, &sdev->event_list); |
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index ed83cdb6e67d..b9b09a704584 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -294,6 +294,7 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work) | |||
294 | } | 294 | } |
295 | 295 | ||
296 | if (sdev->request_queue) { | 296 | if (sdev->request_queue) { |
297 | bsg_unregister_queue(sdev->request_queue); | ||
297 | sdev->request_queue->queuedata = NULL; | 298 | sdev->request_queue->queuedata = NULL; |
298 | /* user context needed to free queue */ | 299 | /* user context needed to free queue */ |
299 | scsi_free_queue(sdev->request_queue); | 300 | scsi_free_queue(sdev->request_queue); |
@@ -857,7 +858,6 @@ void __scsi_remove_device(struct scsi_device *sdev) | |||
857 | if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0) | 858 | if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0) |
858 | return; | 859 | return; |
859 | 860 | ||
860 | bsg_unregister_queue(sdev->request_queue); | ||
861 | class_device_unregister(&sdev->sdev_classdev); | 861 | class_device_unregister(&sdev->sdev_classdev); |
862 | transport_remove_device(dev); | 862 | transport_remove_device(dev); |
863 | device_del(dev); | 863 | device_del(dev); |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7aee64dbfbeb..5fe7aaed904c 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1654,6 +1654,7 @@ static int sd_probe(struct device *dev) | |||
1654 | sdkp->disk = gd; | 1654 | sdkp->disk = gd; |
1655 | sdkp->index = index; | 1655 | sdkp->index = index; |
1656 | sdkp->openers = 0; | 1656 | sdkp->openers = 0; |
1657 | sdkp->previous_state = 1; | ||
1657 | 1658 | ||
1658 | if (!sdp->timeout) { | 1659 | if (!sdp->timeout) { |
1659 | if (sdp->type != TYPE_MOD) | 1660 | if (sdp->type != TYPE_MOD) |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 208565bdbe8e..7ee86d4a7618 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -623,6 +623,7 @@ static int sr_probe(struct device *dev) | |||
623 | cd->disk = disk; | 623 | cd->disk = disk; |
624 | cd->capacity = 0x1fffff; | 624 | cd->capacity = 0x1fffff; |
625 | cd->device->changed = 1; /* force recheck CD type */ | 625 | cd->device->changed = 1; /* force recheck CD type */ |
626 | cd->previous_state = 1; | ||
626 | cd->use = 1; | 627 | cd->use = 1; |
627 | cd->readcd_known = 0; | 628 | cd->readcd_known = 0; |
628 | cd->readcd_cdda = 0; | 629 | cd->readcd_cdda = 0; |