diff options
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/a100u2w.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 4 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 10 | ||||
-rw-r--r-- | drivers/scsi/megaraid.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla1280.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_mbx.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_scan.c | 3 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 109 |
9 files changed, 84 insertions, 56 deletions
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index 3c298c7253ee..964769f66eac 100644 --- a/drivers/scsi/a100u2w.c +++ b/drivers/scsi/a100u2w.c @@ -633,7 +633,7 @@ static int orc_device_reset(struct orc_host * host, struct scsi_cmnd *cmd, unsig return FAILED; } - /* Reset device is handled by the firmare, we fill in an SCB and + /* Reset device is handled by the firmware, we fill in an SCB and fire it at the controller, it does the rest */ scb->opcode = ORC_BUSDEVRST; scb->target = target; diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 8c64494444bf..311ed6dea726 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -1964,10 +1964,10 @@ lpfc_set_disctmo(struct lpfc_vport *vport) uint32_t tmo; if (vport->port_state == LPFC_LOCAL_CFG_LINK) { - /* For FAN, timeout should be greater then edtov */ + /* For FAN, timeout should be greater than edtov */ tmo = (((phba->fc_edtov + 999) / 1000) + 1); } else { - /* Normal discovery timeout should be > then ELS/CT timeout + /* Normal discovery timeout should be > than ELS/CT timeout * FC spec states we need 3 * ratov for CT requests */ tmo = ((phba->fc_ratov * 3) + 3); diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 01dfdc8696f8..a36a120561e2 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -420,7 +420,7 @@ lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring) if (unlikely(pring->local_getidx >= max_cmd_idx)) { lpfc_printf_log(phba, KERN_ERR, LOG_SLI, "0315 Ring %d issue: portCmdGet %d " - "is bigger then cmd ring %d\n", + "is bigger than cmd ring %d\n", pring->ringno, pring->local_getidx, max_cmd_idx); @@ -1628,12 +1628,12 @@ lpfc_sli_rsp_pointers_error(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) { struct lpfc_pgp *pgp = &phba->port_gp[pring->ringno]; /* - * Ring <ringno> handler: portRspPut <portRspPut> is bigger then + * Ring <ringno> handler: portRspPut <portRspPut> is bigger than * rsp ring <portRspMax> */ lpfc_printf_log(phba, KERN_ERR, LOG_SLI, "0312 Ring %d handler: portRspPut %d " - "is bigger then rsp ring %d\n", + "is bigger than rsp ring %d\n", pring->ringno, le32_to_cpu(pgp->rspPutInx), pring->numRiocb); @@ -2083,12 +2083,12 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba *phba, portRspPut = le32_to_cpu(pgp->rspPutInx); if (portRspPut >= portRspMax) { /* - * Ring <ringno> handler: portRspPut <portRspPut> is bigger then + * Ring <ringno> handler: portRspPut <portRspPut> is bigger than * rsp ring <portRspMax> */ lpfc_printf_log(phba, KERN_ERR, LOG_SLI, "0303 Ring %d handler: portRspPut %d " - "is bigger then rsp ring %d\n", + "is bigger than rsp ring %d\n", pring->ringno, portRspPut, portRspMax); phba->link_state = LPFC_HBA_ERROR; diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 7dc62deb4087..9fdcd60c5493 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -1967,8 +1967,8 @@ megaraid_abort_and_reset(adapter_t *adapter, Scsi_Cmnd *cmd, int aor) scb->state |= aor; /* - * Check if this command has firmare owenership. If - * yes, we cannot reset this command. Whenever, f/w + * Check if this command has firmware ownership. If + * yes, we cannot reset this command. Whenever f/w * completes this command, we will return appropriate * status from ISR. */ diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 8cb9240596ab..df09820e8916 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -128,7 +128,7 @@ - Integrate ql12160_set_target_parameters() with 1280 version - Make qla1280_setup() non static - Do not call qla1280_check_for_dead_scsi_bus() on every I/O request - sent to the card - this command pauses the firmare!!! + sent to the card - this command pauses the firmware!!! Rev 3.23.15 Beta March 19, 2002, Jes Sorensen - Clean up qla1280.h - remove obsolete QL_DEBUG_LEVEL_x definitions - Remove a pile of pointless and confusing (srb_t **) and @@ -659,7 +659,7 @@ static int qla1280_read_nvram(struct scsi_qla_host *ha) /* The firmware interface is, um, interesting, in that the * actual firmware image on the chip is little endian, thus, * the process of taking that image to the CPU would end up - * little endian. However, the firmare interface requires it + * little endian. However, the firmware interface requires it * to be read a word (two bytes) at a time. * * The net result of this would be that the word (and diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c index c577d79bd7e8..051b0f5e8c8e 100644 --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++ b/drivers/scsi/qla4xxx/ql4_mbx.c @@ -392,7 +392,7 @@ int qla4xxx_get_firmware_status(struct scsi_qla_host * ha) ha->iocb_hiwat -= IOCB_HIWAT_CUSHION; else dev_info(&ha->pdev->dev, "WARNING!!! You have less than %d " - "firmare IOCBs available (%d).\n", + "firmware IOCBs available (%d).\n", IOCB_HIWAT_CUSHION, ha->iocb_hiwat); return QLA_SUCCESS; diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 381838ebd460..d86ebea9350a 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1650,7 +1650,7 @@ int scsi_error_handler(void *data) * We use TASK_INTERRUPTIBLE so that the thread is not * counted against the load average as a running process. * We never actually get interrupted because kthread_run - * disables singal delivery for the created thread. + * disables signal delivery for the created thread. */ set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 18486b51668d..17914a346f71 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -32,6 +32,7 @@ #include <linux/delay.h> #include <linux/kthread.h> #include <linux/spinlock.h> +#include <linux/async.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> @@ -179,6 +180,8 @@ int scsi_complete_async_scans(void) spin_unlock(&async_scan_lock); kfree(data); + /* Synchronize async operations globally */ + async_synchronize_full(); return 0; } diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 62b28d58e65e..e035c1114010 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -48,6 +48,7 @@ #include <linux/delay.h> #include <linux/mutex.h> #include <linux/string_helpers.h> +#include <linux/async.h> #include <asm/uaccess.h> #include <scsi/scsi.h> @@ -1802,6 +1803,71 @@ static int sd_format_disk_name(char *prefix, int index, char *buf, int buflen) return 0; } +/* + * The asynchronous part of sd_probe + */ +static void sd_probe_async(void *data, async_cookie_t cookie) +{ + struct scsi_disk *sdkp = data; + struct scsi_device *sdp; + struct gendisk *gd; + u32 index; + struct device *dev; + + sdp = sdkp->device; + gd = sdkp->disk; + index = sdkp->index; + dev = &sdp->sdev_gendev; + + if (!sdp->request_queue->rq_timeout) { + if (sdp->type != TYPE_MOD) + blk_queue_rq_timeout(sdp->request_queue, SD_TIMEOUT); + else + blk_queue_rq_timeout(sdp->request_queue, + SD_MOD_TIMEOUT); + } + + device_initialize(&sdkp->dev); + sdkp->dev.parent = &sdp->sdev_gendev; + sdkp->dev.class = &sd_disk_class; + strncpy(sdkp->dev.bus_id, sdp->sdev_gendev.bus_id, BUS_ID_SIZE); + + if (device_add(&sdkp->dev)) + goto out_free_index; + + get_device(&sdp->sdev_gendev); + + if (index < SD_MAX_DISKS) { + gd->major = sd_major((index & 0xf0) >> 4); + gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00); + gd->minors = SD_MINORS; + } + gd->fops = &sd_fops; + gd->private_data = &sdkp->driver; + gd->queue = sdkp->device->request_queue; + + sd_revalidate_disk(gd); + + blk_queue_prep_rq(sdp->request_queue, sd_prep_fn); + + gd->driverfs_dev = &sdp->sdev_gendev; + gd->flags = GENHD_FL_EXT_DEVT | GENHD_FL_DRIVERFS; + if (sdp->removable) + gd->flags |= GENHD_FL_REMOVABLE; + + dev_set_drvdata(dev, sdkp); + add_disk(gd); + sd_dif_config_host(sdkp); + + sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", + sdp->removable ? "removable " : ""); + + return; + + out_free_index: + ida_remove(&sd_index_ida, index); +} + /** * sd_probe - called during driver initialization and whenever a * new scsi device is attached to the system. It is called once @@ -1865,48 +1931,7 @@ static int sd_probe(struct device *dev) sdkp->openers = 0; sdkp->previous_state = 1; - if (!sdp->request_queue->rq_timeout) { - if (sdp->type != TYPE_MOD) - blk_queue_rq_timeout(sdp->request_queue, SD_TIMEOUT); - else - blk_queue_rq_timeout(sdp->request_queue, - SD_MOD_TIMEOUT); - } - - device_initialize(&sdkp->dev); - sdkp->dev.parent = &sdp->sdev_gendev; - sdkp->dev.class = &sd_disk_class; - strncpy(sdkp->dev.bus_id, sdp->sdev_gendev.bus_id, BUS_ID_SIZE); - - if (device_add(&sdkp->dev)) - goto out_free_index; - - get_device(&sdp->sdev_gendev); - - if (index < SD_MAX_DISKS) { - gd->major = sd_major((index & 0xf0) >> 4); - gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00); - gd->minors = SD_MINORS; - } - gd->fops = &sd_fops; - gd->private_data = &sdkp->driver; - gd->queue = sdkp->device->request_queue; - - sd_revalidate_disk(gd); - - blk_queue_prep_rq(sdp->request_queue, sd_prep_fn); - - gd->driverfs_dev = &sdp->sdev_gendev; - gd->flags = GENHD_FL_EXT_DEVT | GENHD_FL_DRIVERFS; - if (sdp->removable) - gd->flags |= GENHD_FL_REMOVABLE; - - dev_set_drvdata(dev, sdkp); - add_disk(gd); - sd_dif_config_host(sdkp); - - sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", - sdp->removable ? "removable " : ""); + async_schedule(sd_probe_async, sdkp); return 0; |