From 9c15546eb46c2af3c5524833b38f818944e3a84d Mon Sep 17 00:00:00 2001 From: Jeremy Higdon Date: Thu, 15 Dec 2005 02:10:35 +0100 Subject: [PATCH] --- yaml --- r: 15150 b: refs/heads/master c: deb5e5c0c68e59b1bf9ede66da9e6a89f6557595 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/kernel/module.c | 2 -- trunk/arch/arm/mach-pxa/pm.c | 9 +++--- trunk/arch/ia64/kernel/process.c | 2 -- trunk/drivers/ide/pci/sgiioc4.c | 8 ++++- trunk/drivers/input/mouse/alps.c | 2 +- trunk/drivers/mmc/mmc.c | 10 +------ trunk/drivers/scsi/ibmvscsi/ibmvscsi.h | 2 +- trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c | 3 +- trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c | 8 +---- trunk/drivers/scsi/megaraid.c | 2 +- trunk/drivers/scsi/qla2xxx/qla_def.h | 10 ++++++- trunk/drivers/scsi/qla2xxx/qla_init.c | 6 ++-- trunk/drivers/scsi/qla2xxx/qla_isr.c | 15 ---------- trunk/drivers/scsi/scsi_error.c | 7 +---- trunk/drivers/scsi/scsi_lib.c | 33 ++++++++------------- trunk/drivers/scsi/sd.c | 16 +++++++++- trunk/drivers/scsi/sr.c | 20 +++++++++++-- trunk/drivers/scsi/st.c | 19 +++++++++++- trunk/drivers/scsi/sym53c8xx_2/sym_hipd.c | 4 +-- trunk/fs/reiserfs/inode.c | 26 +++++----------- trunk/fs/reiserfs/journal.c | 18 +++-------- trunk/include/asm-arm/elf.h | 2 -- trunk/include/scsi/scsi_cmnd.h | 1 - trunk/init/Kconfig | 26 ++++++++-------- trunk/net/8021q/vlan_dev.c | 3 -- trunk/net/ipv4/ip_gre.c | 2 +- 27 files changed, 120 insertions(+), 138 deletions(-) diff --git a/[refs] b/[refs] index 3b99b52f3d28..5cf9f3a2e820 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2499604960fff307fe99ff4d4363c50eaa69235a +refs/heads/master: deb5e5c0c68e59b1bf9ede66da9e6a89f6557595 diff --git a/trunk/arch/arm/kernel/module.c b/trunk/arch/arm/kernel/module.c index 055bf5d28894..6055e1427ba3 100644 --- a/trunk/arch/arm/kernel/module.c +++ b/trunk/arch/arm/kernel/module.c @@ -101,8 +101,6 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, break; case R_ARM_PC24: - case R_ARM_CALL: - case R_ARM_JUMP24: offset = (*(u32 *)loc & 0x00ffffff) << 2; if (offset & 0x02000000) offset -= 0x04000000; diff --git a/trunk/arch/arm/mach-pxa/pm.c b/trunk/arch/arm/mach-pxa/pm.c index 852ea72d8c80..f74b9af112dc 100644 --- a/trunk/arch/arm/mach-pxa/pm.c +++ b/trunk/arch/arm/mach-pxa/pm.c @@ -155,20 +155,19 @@ int pxa_pm_enter(suspend_state_t state) PSPR = 0; /* restore registers */ - RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); - RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); RESTORE(GAFR0_L); RESTORE(GAFR0_U); RESTORE(GAFR1_L); RESTORE(GAFR1_U); RESTORE(GAFR2_L); RESTORE(GAFR2_U); + RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2); + RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2); RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2); RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2); RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); #ifdef CONFIG_PXA27x RESTORE(MDREFR); - RESTORE_GPLEVEL(3); RESTORE(GPDR3); - RESTORE(GAFR3_L); RESTORE(GAFR3_U); - RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); + RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3); + RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER); RESTORE(PFER); RESTORE(PKWR); #endif diff --git a/trunk/arch/ia64/kernel/process.c b/trunk/arch/ia64/kernel/process.c index e9904c74d2ba..a4da715a360c 100644 --- a/trunk/arch/ia64/kernel/process.c +++ b/trunk/arch/ia64/kernel/process.c @@ -721,13 +721,11 @@ flush_thread (void) /* drop floating-point and debug-register state if it exists: */ current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); ia64_drop_fpu(current); -#ifdef CONFIG_IA32_SUPPORT if (IS_IA32_PROCESS(ia64_task_regs(current))) { ia32_drop_partial_page_list(current); current->thread.task_size = IA32_PAGE_OFFSET; set_fs(USER_DS); } -#endif } /* diff --git a/trunk/drivers/ide/pci/sgiioc4.c b/trunk/drivers/ide/pci/sgiioc4.c index af526b671c4e..4ee597d08797 100644 --- a/trunk/drivers/ide/pci/sgiioc4.c +++ b/trunk/drivers/ide/pci/sgiioc4.c @@ -622,12 +622,18 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d) ide_hwif_t *hwif; int h; + /* + * Find an empty HWIF; if none available, return -ENOMEM. + */ for (h = 0; h < MAX_HWIFS; ++h) { hwif = &ide_hwifs[h]; - /* Find an empty HWIF */ if (hwif->chipset == ide_unknown) break; } + if (h == MAX_HWIFS) { + printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n", d->name); + return -ENOMEM; + } /* Get the CmdBlk and CtrlBlk Base Registers */ base = pci_resource_start(dev, 0) + IOC4_CMD_OFFSET; diff --git a/trunk/drivers/input/mouse/alps.c b/trunk/drivers/input/mouse/alps.c index 4f41ec3e4332..4acc7fd4cd0f 100644 --- a/trunk/drivers/input/mouse/alps.c +++ b/trunk/drivers/input/mouse/alps.c @@ -42,7 +42,7 @@ static struct alps_model_info alps_model_data[] = { { { 0x53, 0x02, 0x14 }, 0xf8, 0xf8, 0 }, { { 0x63, 0x02, 0x0a }, 0xf8, 0xf8, 0 }, { { 0x63, 0x02, 0x14 }, 0xf8, 0xf8, 0 }, - { { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */ + { { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, 0 }, { { 0x63, 0x02, 0x3c }, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */ { { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */ { { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 }, diff --git a/trunk/drivers/mmc/mmc.c b/trunk/drivers/mmc/mmc.c index eb41391e06e9..b586a83a9b4c 100644 --- a/trunk/drivers/mmc/mmc.c +++ b/trunk/drivers/mmc/mmc.c @@ -679,15 +679,7 @@ static void mmc_idle_cards(struct mmc_host *host) } /* - * Apply power to the MMC stack. This is a two-stage process. - * First, we enable power to the card without the clock running. - * We then wait a bit for the power to stabilise. Finally, - * enable the bus drivers and clock to the card. - * - * We must _NOT_ enable the clock prior to power stablising. - * - * If a host does all the power sequencing itself, ignore the - * initial MMC_POWER_UP stage. + * Apply power to the MMC stack. */ static void mmc_power_up(struct mmc_host *host) { diff --git a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h index 5b0edd1f1921..8bec0438dc8a 100644 --- a/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h +++ b/trunk/drivers/scsi/ibmvscsi/ibmvscsi.h @@ -100,7 +100,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, void ibmvscsi_release_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata, int max_requests); -int ibmvscsi_reset_crq_queue(struct crq_queue *queue, +void ibmvscsi_reset_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata); void ibmvscsi_handle_crq(struct viosrp_crq *crq, diff --git a/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c b/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c index ce15d9e39621..1045872b0175 100644 --- a/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/iseries_vscsi.c @@ -117,10 +117,9 @@ void ibmvscsi_release_crq_queue(struct crq_queue *queue, * * no-op for iSeries */ -int ibmvscsi_reset_crq_queue(struct crq_queue *queue, +void ibmvscsi_reset_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata) { - return 0; } /** diff --git a/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c b/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c index 75db2f5c545e..8bf5652f1060 100644 --- a/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/trunk/drivers/scsi/ibmvscsi/rpa_vscsi.c @@ -230,11 +230,6 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, rc = plpar_hcall_norets(H_REG_CRQ, vdev->unit_address, queue->msg_token, PAGE_SIZE); - if (rc == H_Resource) - /* maybe kexecing and resource is busy. try a reset */ - rc = ibmvscsi_reset_crq_queue(queue, - hostdata); - if (rc == 2) { /* Adapter is good, but other end is not ready */ printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n"); @@ -286,7 +281,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue, * @hostdata: ibmvscsi_host_data of host * */ -int ibmvscsi_reset_crq_queue(struct crq_queue *queue, +void ibmvscsi_reset_crq_queue(struct crq_queue *queue, struct ibmvscsi_host_data *hostdata) { int rc; @@ -314,5 +309,4 @@ int ibmvscsi_reset_crq_queue(struct crq_queue *queue, printk(KERN_WARNING "ibmvscsi: couldn't register crq--rc 0x%x\n", rc); } - return rc; } diff --git a/trunk/drivers/scsi/megaraid.c b/trunk/drivers/scsi/megaraid.c index 578143e93a6f..f9792528e33f 100644 --- a/trunk/drivers/scsi/megaraid.c +++ b/trunk/drivers/scsi/megaraid.c @@ -664,7 +664,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy) sg->offset; } else buf = cmd->request_buffer; - memset(buf, 0, cmd->cmnd[4]); + memset(cmd->request_buffer, 0, cmd->cmnd[4]); if (cmd->use_sg) { struct scatterlist *sg; diff --git a/trunk/drivers/scsi/qla2xxx/qla_def.h b/trunk/drivers/scsi/qla2xxx/qla_def.h index 7b3efd531297..7096945ea234 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_def.h +++ b/trunk/drivers/scsi/qla2xxx/qla_def.h @@ -2476,9 +2476,17 @@ typedef struct scsi_qla_host { */ #define LOOP_TRANSITION(ha) \ (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \ - test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) + +#define LOOP_NOT_READY(ha) \ + ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \ + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || \ + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ + test_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) || \ atomic_read(&ha->loop_state) == LOOP_DOWN) +#define LOOP_RDY(ha) (!LOOP_NOT_READY(ha)) + #define TGT_Q(ha, t) (ha->otgt[t]) #define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata) diff --git a/trunk/drivers/scsi/qla2xxx/qla_init.c b/trunk/drivers/scsi/qla2xxx/qla_init.c index c46d2469b85f..2d720121a0d3 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_init.c +++ b/trunk/drivers/scsi/qla2xxx/qla_init.c @@ -1259,7 +1259,7 @@ qla2x00_configure_hba(scsi_qla_host_t *ha) rval = qla2x00_get_adapter_id(ha, &loop_id, &al_pa, &area, &domain, &topo); if (rval != QLA_SUCCESS) { - if (LOOP_TRANSITION(ha) || atomic_read(&ha->loop_down_timer) || + if (LOOP_NOT_READY(ha) || atomic_read(&ha->loop_down_timer) || (rval == QLA_COMMAND_ERROR && loop_id == 0x7)) { DEBUG2(printk("%s(%ld) Loop is in a transition state\n", __func__, ha->host_no)); @@ -1796,7 +1796,7 @@ qla2x00_configure_loop(scsi_qla_host_t *ha) } if (rval == QLA_SUCCESS && test_bit(RSCN_UPDATE, &flags)) { - if (LOOP_TRANSITION(ha)) { + if (LOOP_NOT_READY(ha)) { rval = QLA_FUNCTION_FAILED; } else { rval = qla2x00_configure_fabric(ha); @@ -2369,7 +2369,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports) if (qla2x00_is_reserved_id(ha, loop_id)) continue; - if (atomic_read(&ha->loop_down_timer) || LOOP_TRANSITION(ha)) + if (atomic_read(&ha->loop_down_timer) || LOOP_NOT_READY(ha)) break; if (swl != NULL) { diff --git a/trunk/drivers/scsi/qla2xxx/qla_isr.c b/trunk/drivers/scsi/qla2xxx/qla_isr.c index 5181d966fecb..09afc0f06bd4 100644 --- a/trunk/drivers/scsi/qla2xxx/qla_isr.c +++ b/trunk/drivers/scsi/qla2xxx/qla_isr.c @@ -909,21 +909,6 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) resid = resid_len; cp->resid = resid; CMD_RESID_LEN(cp) = resid; - - if (!lscsi_status && - ((unsigned)(cp->request_bufflen - resid) < - cp->underflow)) { - qla_printk(KERN_INFO, ha, - "scsi(%ld:%d:%d:%d): Mid-layer underflow " - "detected (%x of %x bytes)...returning " - "error status.\n", ha->host_no, - cp->device->channel, cp->device->id, - cp->device->lun, resid, - cp->request_bufflen); - - cp->result = DID_ERROR << 16; - break; - } } cp->result = DID_OK << 16 | lscsi_status; diff --git a/trunk/drivers/scsi/scsi_error.c b/trunk/drivers/scsi/scsi_error.c index c0ae9e965f6f..18c5d2523014 100644 --- a/trunk/drivers/scsi/scsi_error.c +++ b/trunk/drivers/scsi/scsi_error.c @@ -422,15 +422,10 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd) **/ static void scsi_eh_done(struct scsi_cmnd *scmd) { - struct completion *eh_action; - SCSI_LOG_ERROR_RECOVERY(3, printk("%s scmd: %p result: %x\n", __FUNCTION__, scmd, scmd->result)); - - eh_action = scmd->device->host->eh_action; - if (eh_action) - complete(eh_action); + complete(scmd->device->host->eh_action); } /** diff --git a/trunk/drivers/scsi/scsi_lib.c b/trunk/drivers/scsi/scsi_lib.c index dc249cb970ea..ce9d73a292e2 100644 --- a/trunk/drivers/scsi/scsi_lib.c +++ b/trunk/drivers/scsi/scsi_lib.c @@ -1085,26 +1085,6 @@ static void scsi_generic_done(struct scsi_cmnd *cmd) scsi_io_completion(cmd, cmd->result == 0 ? cmd->bufflen : 0, 0); } -void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd, int retries) -{ - struct request *req = cmd->request; - - BUG_ON(sizeof(req->cmd) > sizeof(cmd->cmnd)); - memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd)); - cmd->cmd_len = req->cmd_len; - if (!req->data_len) - cmd->sc_data_direction = DMA_NONE; - else if (rq_data_dir(req) == WRITE) - cmd->sc_data_direction = DMA_TO_DEVICE; - else - cmd->sc_data_direction = DMA_FROM_DEVICE; - - cmd->transfersize = req->data_len; - cmd->allowed = retries; - cmd->timeout_per_command = req->timeout; -} -EXPORT_SYMBOL_GPL(scsi_setup_blk_pc_cmnd); - static int scsi_prep_fn(struct request_queue *q, struct request *req) { struct scsi_device *sdev = q->queuedata; @@ -1240,7 +1220,18 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) goto kill; } } else { - scsi_setup_blk_pc_cmnd(cmd, 3); + memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd)); + cmd->cmd_len = req->cmd_len; + if (rq_data_dir(req) == WRITE) + cmd->sc_data_direction = DMA_TO_DEVICE; + else if (req->data_len) + cmd->sc_data_direction = DMA_FROM_DEVICE; + else + cmd->sc_data_direction = DMA_NONE; + + cmd->transfersize = req->data_len; + cmd->allowed = 3; + cmd->timeout_per_command = req->timeout; cmd->done = scsi_generic_done; } } diff --git a/trunk/drivers/scsi/sd.c b/trunk/drivers/scsi/sd.c index 03fcbab30033..8613a1317712 100644 --- a/trunk/drivers/scsi/sd.c +++ b/trunk/drivers/scsi/sd.c @@ -245,10 +245,24 @@ static int sd_init_command(struct scsi_cmnd * SCpnt) * SG_IO from block layer already setup, just copy cdb basically */ if (blk_pc_request(rq)) { - scsi_setup_blk_pc_cmnd(SCpnt, SD_PASSTHROUGH_RETRIES); + if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) + return 0; + + memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); + SCpnt->cmd_len = rq->cmd_len; + if (rq_data_dir(rq) == WRITE) + SCpnt->sc_data_direction = DMA_TO_DEVICE; + else if (rq->data_len) + SCpnt->sc_data_direction = DMA_FROM_DEVICE; + else + SCpnt->sc_data_direction = DMA_NONE; + + this_count = rq->data_len; if (rq->timeout) timeout = rq->timeout; + SCpnt->transfersize = rq->data_len; + SCpnt->allowed = SD_PASSTHROUGH_RETRIES; goto queue; } diff --git a/trunk/drivers/scsi/sr.c b/trunk/drivers/scsi/sr.c index fb4012b5c188..d68cea753bb2 100644 --- a/trunk/drivers/scsi/sr.c +++ b/trunk/drivers/scsi/sr.c @@ -320,11 +320,25 @@ static int sr_init_command(struct scsi_cmnd * SCpnt) * these are already setup, just copy cdb basically */ if (SCpnt->request->flags & REQ_BLOCK_PC) { - scsi_setup_blk_pc_cmnd(SCpnt, MAX_RETRIES); + struct request *rq = SCpnt->request; - if (SCpnt->timeout_per_command) - timeout = SCpnt->timeout_per_command; + if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) + return 0; + + memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); + SCpnt->cmd_len = rq->cmd_len; + if (!rq->data_len) + SCpnt->sc_data_direction = DMA_NONE; + else if (rq_data_dir(rq) == WRITE) + SCpnt->sc_data_direction = DMA_TO_DEVICE; + else + SCpnt->sc_data_direction = DMA_FROM_DEVICE; + + this_count = rq->data_len; + if (rq->timeout) + timeout = rq->timeout; + SCpnt->transfersize = rq->data_len; goto queue; } diff --git a/trunk/drivers/scsi/st.c b/trunk/drivers/scsi/st.c index dd592f6a2529..7ac6ea141fff 100644 --- a/trunk/drivers/scsi/st.c +++ b/trunk/drivers/scsi/st.c @@ -4194,10 +4194,27 @@ static void st_intr(struct scsi_cmnd *SCpnt) */ static int st_init_command(struct scsi_cmnd *SCpnt) { + struct request *rq; + if (!(SCpnt->request->flags & REQ_BLOCK_PC)) return 0; - scsi_setup_blk_pc_cmnd(SCpnt, 0); + rq = SCpnt->request; + if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd)) + return 0; + + memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd)); + SCpnt->cmd_len = rq->cmd_len; + + if (rq_data_dir(rq) == WRITE) + SCpnt->sc_data_direction = DMA_TO_DEVICE; + else if (rq->data_len) + SCpnt->sc_data_direction = DMA_FROM_DEVICE; + else + SCpnt->sc_data_direction = DMA_NONE; + + SCpnt->timeout_per_command = rq->timeout; + SCpnt->transfersize = rq->data_len; SCpnt->done = st_intr; return 1; } diff --git a/trunk/drivers/scsi/sym53c8xx_2/sym_hipd.c b/trunk/drivers/scsi/sym53c8xx_2/sym_hipd.c index 1564ca203a3e..a7420cad4547 100644 --- a/trunk/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/trunk/drivers/scsi/sym53c8xx_2/sym_hipd.c @@ -1405,6 +1405,7 @@ static void sym_check_goals(struct sym_hcb *np, struct scsi_target *starget, goal->iu = 0; goal->dt = 0; goal->qas = 0; + goal->period = 0; goal->offset = 0; return; } @@ -1464,8 +1465,7 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp * Many devices implement PPR in a buggy way, so only use it if we * really want to. */ - if (goal->offset && - (goal->iu || goal->dt || goal->qas || (goal->period < 0xa))) { + if (goal->iu || goal->dt || goal->qas || (goal->period < 0xa)) { nego = NS_PPR; } else if (spi_width(starget) != goal->width) { nego = NS_WIDE; diff --git a/trunk/fs/reiserfs/inode.c b/trunk/fs/reiserfs/inode.c index a5e3a0ddbe53..0a044ad98885 100644 --- a/trunk/fs/reiserfs/inode.c +++ b/trunk/fs/reiserfs/inode.c @@ -32,7 +32,6 @@ void reiserfs_delete_inode(struct inode *inode) JOURNAL_PER_BALANCE_CNT * 2 + 2 * REISERFS_QUOTA_INIT_BLOCKS(inode->i_sb); struct reiserfs_transaction_handle th; - int err; truncate_inode_pages(&inode->i_data, 0); @@ -50,13 +49,15 @@ void reiserfs_delete_inode(struct inode *inode) } reiserfs_update_inode_transaction(inode); - err = reiserfs_delete_object(&th, inode); + if (reiserfs_delete_object(&th, inode)) { + up(&inode->i_sem); + goto out; + } /* Do quota update inside a transaction for journaled quotas. We must do that * after delete_object so that quota updates go into the same transaction as * stat data deletion */ - if (!err) - DQUOT_FREE_INODE(inode); + DQUOT_FREE_INODE(inode); if (journal_end(&th, inode->i_sb, jbegin_count)) { up(&inode->i_sem); @@ -65,12 +66,6 @@ void reiserfs_delete_inode(struct inode *inode) up(&inode->i_sem); - /* check return value from reiserfs_delete_object after - * ending the transaction - */ - if (err) - goto out; - /* all items of file are deleted, so we can remove "save" link */ remove_save_link(inode, 0 /* not truncate */ ); /* we can't do anything * about an error here */ @@ -2104,7 +2099,6 @@ int reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) struct page *page = NULL; int error; struct buffer_head *bh = NULL; - int err2; reiserfs_write_lock(p_s_inode->i_sb); @@ -2142,18 +2136,14 @@ int reiserfs_truncate_file(struct inode *p_s_inode, int update_timestamps) transaction of truncating gets committed - on reboot the file either appears truncated properly or not truncated at all */ add_save_link(&th, p_s_inode, 1); - err2 = reiserfs_do_truncate(&th, p_s_inode, page, update_timestamps); + error = reiserfs_do_truncate(&th, p_s_inode, page, update_timestamps); + if (error) + goto out; error = journal_end(&th, p_s_inode->i_sb, JOURNAL_PER_BALANCE_CNT * 2 + 1); if (error) goto out; - /* check reiserfs_do_truncate after ending the transaction */ - if (err2) { - error = err2; - goto out; - } - if (update_timestamps) { error = remove_save_link(p_s_inode, 1 /* truncate */ ); if (error) diff --git a/trunk/fs/reiserfs/journal.c b/trunk/fs/reiserfs/journal.c index 3f17ef844fb6..68b7b78638ff 100644 --- a/trunk/fs/reiserfs/journal.c +++ b/trunk/fs/reiserfs/journal.c @@ -1039,10 +1039,6 @@ static int flush_commit_list(struct super_block *s, } atomic_dec(&journal->j_async_throttle); - /* We're skipping the commit if there's an error */ - if (retval || reiserfs_is_journal_aborted(journal)) - barrier = 0; - /* wait on everything written so far before writing the commit * if we are in barrier mode, send the commit down now */ @@ -1081,16 +1077,10 @@ static int flush_commit_list(struct super_block *s, BUG_ON(atomic_read(&(jl->j_commit_left)) != 1); if (!barrier) { - /* If there was a write error in the journal - we can't commit - * this transaction - it will be invalid and, if successful, - * will just end up propogating the write error out to - * the file system. */ - if (likely(!retval && !reiserfs_is_journal_aborted (journal))) { - if (buffer_dirty(jl->j_commit_bh)) - BUG(); - mark_buffer_dirty(jl->j_commit_bh) ; - sync_dirty_buffer(jl->j_commit_bh) ; - } + if (buffer_dirty(jl->j_commit_bh)) + BUG(); + mark_buffer_dirty(jl->j_commit_bh); + sync_dirty_buffer(jl->j_commit_bh); } else wait_on_buffer(jl->j_commit_bh); diff --git a/trunk/include/asm-arm/elf.h b/trunk/include/asm-arm/elf.h index 2d44b42d1847..7da97a937548 100644 --- a/trunk/include/asm-arm/elf.h +++ b/trunk/include/asm-arm/elf.h @@ -22,8 +22,6 @@ typedef unsigned long elf_freg_t[3]; #define R_ARM_NONE 0 #define R_ARM_PC24 1 #define R_ARM_ABS32 2 -#define R_ARM_CALL 28 -#define R_ARM_JUMP24 29 #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) typedef elf_greg_t elf_gregset_t[ELF_NGREG]; diff --git a/trunk/include/scsi/scsi_cmnd.h b/trunk/include/scsi/scsi_cmnd.h index 20da282d4abb..7529f4388bb4 100644 --- a/trunk/include/scsi/scsi_cmnd.h +++ b/trunk/include/scsi/scsi_cmnd.h @@ -151,6 +151,5 @@ extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); extern void scsi_put_command(struct scsi_cmnd *); extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); extern void scsi_finish_command(struct scsi_cmnd *cmd); -extern void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd, int retries); #endif /* _SCSI_SCSI_CMND_H */ diff --git a/trunk/init/Kconfig b/trunk/init/Kconfig index 6c5dbedc6e96..be74adb389ea 100644 --- a/trunk/init/Kconfig +++ b/trunk/init/Kconfig @@ -256,20 +256,6 @@ config CPUSETS source "usr/Kconfig" -config CC_OPTIMIZE_FOR_SIZE - bool "Optimize for size (Look out for broken compilers!)" - default y - depends on ARM || H8300 || EXPERIMENTAL - depends on !SPARC64 - help - Enabling this option will pass "-Os" instead of "-O2" to gcc - resulting in a smaller kernel. - - WARNING: some versions of gcc may generate incorrect code with this - option. If problems are observed, a gcc upgrade may be needed. - - If unsure, say N. - menuconfig EMBEDDED bool "Configure standard kernel features (for small systems)" help @@ -352,6 +338,18 @@ config EPOLL Disabling this option will cause the kernel to be built without support for epoll family of system calls. +config CC_OPTIMIZE_FOR_SIZE + bool "Optimize for size" + default y if ARM || H8300 + help + Enabling this option will pass "-Os" instead of "-O2" to gcc + resulting in a smaller kernel. + + WARNING: some versions of gcc may generate incorrect code with this + option. If problems are observed, a gcc upgrade may be needed. + + If unsure, say N. + config SHMEM bool "Use full shmem filesystem" if EMBEDDED default y diff --git a/trunk/net/8021q/vlan_dev.c b/trunk/net/8021q/vlan_dev.c index f2a8750bbf1d..b74864889670 100644 --- a/trunk/net/8021q/vlan_dev.c +++ b/trunk/net/8021q/vlan_dev.c @@ -165,9 +165,6 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, skb_pull(skb, VLAN_HLEN); /* take off the VLAN header (4 bytes currently) */ - /* Need to correct hardware checksum */ - skb_postpull_rcsum(skb, vhdr, VLAN_HLEN); - /* Ok, lets check to make sure the device (dev) we * came in on is what this VLAN is attached to. */ diff --git a/trunk/net/ipv4/ip_gre.c b/trunk/net/ipv4/ip_gre.c index 46f9d9cf7a5f..a4c347c3b8e3 100644 --- a/trunk/net/ipv4/ip_gre.c +++ b/trunk/net/ipv4/ip_gre.c @@ -618,7 +618,7 @@ static int ipgre_rcv(struct sk_buff *skb) skb->mac.raw = skb->nh.raw; skb->nh.raw = __pskb_pull(skb, offset); - skb_postpull_rcsum(skb, skb->h.raw, offset); + skb_postpull_rcsum(skb, skb->mac.raw, offset); memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); skb->pkt_type = PACKET_HOST; #ifdef CONFIG_NET_IPGRE_BROADCAST