Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119597
b: refs/heads/master
c: 89c223a
h: refs/heads/master
i:
  119595: 86662ec
v: v3
  • Loading branch information
Finn Thain authored and Geert Uytterhoeven committed Dec 2, 2008
1 parent f93364f commit 2d5548d
Show file tree
Hide file tree
Showing 25 changed files with 129 additions and 146 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2e29831cc463f4be61d4e36b8699ae7e071a685
refs/heads/master: 89c223a616cddd9eab792b860f61f99cec53c4e8
35 changes: 28 additions & 7 deletions trunk/arch/mn10300/kernel/module.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* MN10300 Kernel module helper routines
*
* Copyright (C) 2007, 2008 Red Hat, Inc. All Rights Reserved.
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
* Written by Mark Salter (msalter@redhat.com)
* - Derived from arch/i386/kernel/module.c
*
Expand Down Expand Up @@ -64,6 +64,21 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
return 0;
}

static uint32_t reloc_get16(uint8_t *p)
{
return p[0] | (p[1] << 8);
}

static uint32_t reloc_get24(uint8_t *p)
{
return reloc_get16(p) | (p[2] << 16);
}

static uint32_t reloc_get32(uint8_t *p)
{
return reloc_get16(p) | (reloc_get16(p+2) << 16);
}

static void reloc_put16(uint8_t *p, uint32_t val)
{
p[0] = val & 0xff;
Expand Down Expand Up @@ -129,19 +144,25 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
relocation = sym->st_value + rel[i].r_addend;

switch (ELF32_R_TYPE(rel[i].r_info)) {
/* for the first four relocation types, we simply
* store the adjustment at the location given */
/* for the first four relocation types, we add the
* adjustment into the value at the location given */
case R_MN10300_32:
reloc_put32(location, relocation);
value = reloc_get32(location);
value += relocation;
reloc_put32(location, value);
break;
case R_MN10300_24:
reloc_put24(location, relocation);
value = reloc_get24(location);
value += relocation;
reloc_put24(location, value);
break;
case R_MN10300_16:
reloc_put16(location, relocation);
value = reloc_get16(location);
value += relocation;
reloc_put16(location, value);
break;
case R_MN10300_8:
*location = relocation;
*location += relocation;
break;

/* for the next three relocation types, we write the
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ static int irq_choose_cpu(unsigned int virt_irq)
cpuid = first_cpu(tmp);
}

return get_hard_smp_processor_id(cpuid);
return cpuid;
}
#else
static int irq_choose_cpu(unsigned int virt_irq)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/alim15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ static int __init ali15x3_ide_init(void)

static void __exit ali15x3_ide_exit(void)
{
pci_unregister_driver(&alim15x3_pci_driver);
return pci_unregister_driver(&alim15x3_pci_driver);
}

module_init(ali15x3_ide_init);
Expand Down
11 changes: 1 addition & 10 deletions trunk/drivers/ide/amd74xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* IDE driver for Linux.
*
* Copyright (c) 2000-2002 Vojtech Pavlik
* Copyright (c) 2007-2008 Bartlomiej Zolnierkiewicz
* Copyright (c) 2007 Bartlomiej Zolnierkiewicz
*
* Based on the work of:
* Andre Hedrick
Expand Down Expand Up @@ -263,15 +263,6 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
d.udma_mask = ATA_UDMA5;
}

/*
* It seems that on some nVidia controllers using AltStatus
* register can be unreliable so default to Status register
* if the device is in Compatibility Mode.
*/
if (dev->vendor == PCI_VENDOR_ID_NVIDIA &&
ide_pci_is_in_compatibility_mode(dev))
d.host_flags |= IDE_HFLAG_BROKEN_ALTSTATUS;

printk(KERN_INFO "%s %s: UDMA%s controller\n",
d.name, pci_name(dev), amd_dma[fls(d.udma_mask) - 1]);

Expand Down
30 changes: 16 additions & 14 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,10 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors)
}
EXPORT_SYMBOL(ide_end_request);

static void ide_complete_power_step(ide_drive_t *drive, struct request *rq)
static void ide_complete_power_step(ide_drive_t *drive, struct request *rq, u8 stat, u8 error)
{
struct request_pm_state *pm = rq->data;

#ifdef DEBUG_PM
printk(KERN_INFO "%s: complete_power_step(step: %d)\n",
drive->name, pm->pm_step);
#endif
if (drive->media != ide_disk)
return;

Expand Down Expand Up @@ -176,7 +172,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
/* Not supported? Switch to next step now. */
if (ata_id_flush_enabled(drive->id) == 0 ||
(drive->dev_flags & IDE_DFLAG_WCACHE) == 0) {
ide_complete_power_step(drive, rq);
ide_complete_power_step(drive, rq, 0, 0);
return ide_stopped;
}
if (ata_id_flush_ext_enabled(drive->id))
Expand All @@ -195,7 +191,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
if (drive->media != ide_disk)
pm->pm_step = IDE_PM_RESTORE_DMA;
else
ide_complete_power_step(drive, rq);
ide_complete_power_step(drive, rq, 0, 0);
return ide_stopped;
case IDE_PM_IDLE: /* Resume step 2 (idle) */
args->tf.command = ATA_CMD_IDLEIMMEDIATE;
Expand All @@ -208,8 +204,10 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
*/
if (drive->hwif->dma_ops == NULL)
break;
if (drive->dev_flags & IDE_DFLAG_USING_DMA)
ide_set_dma(drive);
/*
* TODO: respect IDE_DFLAG_USING_DMA
*/
ide_set_dma(drive);
break;
}

Expand Down Expand Up @@ -324,8 +322,11 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
}
} else if (blk_pm_request(rq)) {
struct request_pm_state *pm = rq->data;

ide_complete_power_step(drive, rq);
#ifdef DEBUG_PM
printk("%s: complete_power_step(step: %d, stat: %x, err: %x)\n",
drive->name, rq->pm->pm_step, stat, err);
#endif
ide_complete_power_step(drive, rq, stat, err);
if (pm->pm_step == IDE_PM_COMPLETED)
ide_complete_pm_request(drive, rq);
return;
Expand Down Expand Up @@ -803,7 +804,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
struct request_pm_state *pm = rq->data;
#ifdef DEBUG_PM
printk("%s: start_power_step(step: %d)\n",
drive->name, pm->pm_step);
drive->name, rq->pm->pm_step);
#endif
startstop = ide_start_power_step(drive, rq);
if (startstop == ide_stopped &&
Expand Down Expand Up @@ -966,13 +967,14 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
ide_startstop_t startstop;
int loops = 0;

/* for atari only: POSSIBLY BROKEN HERE(?) */
ide_get_lock(ide_intr, hwgroup);

/* caller must own ide_lock */
BUG_ON(!irqs_disabled());

while (!hwgroup->busy) {
hwgroup->busy = 1;
/* for atari only */
ide_get_lock(ide_intr, hwgroup);
drive = choose_drive(hwgroup);
if (drive == NULL) {
int sleeping = 0;
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,14 +457,18 @@ int drive_is_ready (ide_drive_t *drive)
if (drive->waiting_for_dma)
return hwif->dma_ops->dma_test_irq(drive);

#if 0
/* need to guarantee 400ns since last command was issued */
udelay(1);
#endif

/*
* We do a passive status test under shared PCI interrupts on
* cards that truly share the ATA side interrupt, but may also share
* an interrupt with another pci card/device. We make no assumptions
* about possible isa-pnp and pci-pnp issues yet.
*/
if (hwif->io_ports.ctl_addr &&
(hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0)
if (hwif->io_ports.ctl_addr)
stat = hwif->tp_ops->read_altstatus(hwif);
else
/* Note: this may clear a pending IRQ!! */
Expand Down Expand Up @@ -606,7 +610,6 @@ static const struct drive_list_entry ivb_list[] = {
{ "TSSTcorp CDDVDW SH-S202N" , "SB01" },
{ "TSSTcorp CDDVDW SH-S202H" , "SB00" },
{ "TSSTcorp CDDVDW SH-S202H" , "SB01" },
{ "SAMSUNG SP0822N" , "WA100-10" },
{ NULL , NULL }
};

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd)
/* take a deep breath */
msleep(50);

if (io_ports->ctl_addr &&
(hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0) {
if (io_ports->ctl_addr) {
a = tp_ops->read_altstatus(hwif);
s = tp_ops->read_status(hwif);
if ((a ^ s) & ~ATA_IDX)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/misc/sgi-gru/grufile.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ struct vm_operations_struct gru_vm_ops = {
.fault = gru_fault,
};

fs_initcall(gru_init);
module_init(gru_init);
module_exit(gru_exit);

module_param(gru_options, ulong, 0644);
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/s390/scsi/zfcp_erp.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ static int zfcp_erp_adapter_strategy_generic(struct zfcp_erp_action *act,
goto failed_openfcp;

atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &act->adapter->status);
schedule_work(&act->adapter->scan_work);

return ZFCP_ERP_SUCCEEDED;

Expand Down Expand Up @@ -1185,9 +1186,7 @@ static void zfcp_erp_scsi_scan(struct work_struct *work)
container_of(work, struct zfcp_erp_add_work, work);
struct zfcp_unit *unit = p->unit;
struct fc_rport *rport = unit->port->rport;

if (rport && rport->port_state == FC_PORTSTATE_ONLINE)
scsi_scan_target(&rport->dev, 0, rport->scsi_target_id,
scsi_scan_target(&rport->dev, 0, rport->scsi_target_id,
scsilun_to_int((struct scsi_lun *)&unit->fcp_lun), 0);
atomic_clear_mask(ZFCP_STATUS_UNIT_SCSI_WORK_PENDING, &unit->status);
zfcp_unit_put(unit);
Expand Down Expand Up @@ -1283,8 +1282,6 @@ static void zfcp_erp_action_cleanup(struct zfcp_erp_action *act, int result)
case ZFCP_ERP_ACTION_REOPEN_ADAPTER:
if (result != ZFCP_ERP_SUCCEEDED)
zfcp_erp_rports_del(adapter);
else
schedule_work(&adapter->scan_work);
zfcp_adapter_put(adapter);
break;
}
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/s390/scsi/zfcp_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ static int zfcp_wka_port_get(struct zfcp_wka_port *wka_port)
if (mutex_lock_interruptible(&wka_port->mutex))
return -ERESTARTSYS;

if (wka_port->status == ZFCP_WKA_PORT_OFFLINE ||
wka_port->status == ZFCP_WKA_PORT_CLOSING) {
if (wka_port->status != ZFCP_WKA_PORT_ONLINE) {
wka_port->status = ZFCP_WKA_PORT_OPENING;
if (zfcp_fsf_open_wka_port(wka_port))
wka_port->status = ZFCP_WKA_PORT_OFFLINE;
Expand Down Expand Up @@ -126,7 +125,8 @@ static void _zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req, u32 range,

read_lock_irqsave(&zfcp_data.config_lock, flags);
list_for_each_entry(port, &fsf_req->adapter->port_list_head, list) {
if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_PHYS_OPEN))
/* FIXME: ZFCP_STATUS_PORT_DID_DID check is racy */
if (!(atomic_read(&port->status) & ZFCP_STATUS_PORT_DID_DID))
/* Try to connect to unused ports anyway. */
zfcp_erp_port_reopen(port,
ZFCP_STATUS_COMMON_ERP_FAILED,
Expand Down Expand Up @@ -610,6 +610,7 @@ int zfcp_scan_ports(struct zfcp_adapter *adapter)
int ret, i;
struct zfcp_gpn_ft *gpn_ft;

zfcp_erp_wait(adapter); /* wait until adapter is finished with ERP */
if (fc_host_port_type(adapter->scsi_host) != FC_PORTTYPE_NPORT)
return 0;

Expand Down
20 changes: 6 additions & 14 deletions trunk/drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,8 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND,
req_flags, adapter->pool.fsf_req_abort);
if (IS_ERR(req)) {
req = NULL;
if (IS_ERR(req))
goto out;
}

if (unlikely(!(atomic_read(&unit->status) &
ZFCP_STATUS_COMMON_UNBLOCKED)))
Expand Down Expand Up @@ -1586,7 +1584,6 @@ static void zfcp_fsf_open_wka_port_handler(struct zfcp_fsf_req *req)
wka_port->status = ZFCP_WKA_PORT_OFFLINE;
break;
case FSF_PORT_ALREADY_OPEN:
break;
case FSF_GOOD:
wka_port->handle = header->port_handle;
wka_port->status = ZFCP_WKA_PORT_ONLINE;
Expand Down Expand Up @@ -2116,20 +2113,17 @@ static inline void zfcp_fsf_trace_latency(struct zfcp_fsf_req *fsf_req)

static void zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *req)
{
struct scsi_cmnd *scpnt;
struct scsi_cmnd *scpnt = req->data;
struct fcp_rsp_iu *fcp_rsp_iu = (struct fcp_rsp_iu *)
&(req->qtcb->bottom.io.fcp_rsp);
u32 sns_len;
char *fcp_rsp_info = (unsigned char *) &fcp_rsp_iu[1];
unsigned long flags;

read_lock_irqsave(&req->adapter->abort_lock, flags);

scpnt = req->data;
if (unlikely(!scpnt)) {
read_unlock_irqrestore(&req->adapter->abort_lock, flags);
if (unlikely(!scpnt))
return;
}

read_lock_irqsave(&req->adapter->abort_lock, flags);

if (unlikely(req->status & ZFCP_STATUS_FSFREQ_ABORTED)) {
set_host_byte(scpnt, DID_SOFT_ERROR);
Expand Down Expand Up @@ -2448,10 +2442,8 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
goto out;
req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags,
adapter->pool.fsf_req_scsi);
if (IS_ERR(req)) {
req = NULL;
if (IS_ERR(req))
goto out;
}

req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT;
req->data = unit;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static int zfcp_scsi_queuecommand(struct scsi_cmnd *scpnt,
ret = zfcp_fsf_send_fcp_command_task(adapter, unit, scpnt, 0,
ZFCP_REQ_AUTO_CLEANUP);
if (unlikely(ret == -EBUSY))
return SCSI_MLQUEUE_DEVICE_BUSY;
zfcp_scsi_command_fail(scpnt, DID_NO_CONNECT);
else if (unlikely(ret < 0))
return SCSI_MLQUEUE_HOST_BUSY;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
* Firmware has an individual device recovery time typically
* of 35 seconds, give us a margin.
*/
if (sdev->request_queue->rq_timeout < (45 * HZ))
blk_queue_rq_timeout(sdev->request_queue, 45*HZ);
if (sdev->timeout < (45 * HZ))
sdev->timeout = 45 * HZ;
for (cid = 0; cid < aac->maximum_num_containers; ++cid)
if (aac->fsa_dev[cid].valid)
++num_lsu;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/ibmvscsi/ibmvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@ static int ibmvscsi_slave_configure(struct scsi_device *sdev)
spin_lock_irqsave(shost->host_lock, lock_flags);
if (sdev->type == TYPE_DISK) {
sdev->allow_restart = 1;
blk_queue_rq_timeout(sdev->request_queue, 60 * HZ);
sdev->timeout = 60 * HZ;
}
scsi_adjust_queue_depth(sdev, 0, shost->cmd_per_lun);
spin_unlock_irqrestore(shost->host_lock, lock_flags);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,8 +1016,7 @@ static int megasas_slave_configure(struct scsi_device *sdev)
* The RAID firmware may require extended timeouts.
*/
if (sdev->channel >= MEGASAS_MAX_PD_CHANNELS)
blk_queue_rq_timeout(sdev->request_queue,
MEGASAS_DEFAULT_CMD_TIMEOUT * HZ);
sdev->timeout = MEGASAS_DEFAULT_CMD_TIMEOUT * HZ;
return 0;
}

Expand Down
Loading

0 comments on commit 2d5548d

Please sign in to comment.