Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168708
b: refs/heads/master
c: 4175f3e
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Nov 18, 2009
1 parent 8d36bf8 commit d2b0d05
Show file tree
Hide file tree
Showing 21 changed files with 73 additions and 122 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: 978b4053aefd422713f289f2a315ce2acba62018
refs/heads/master: 4175f3e31cc7157669aa66d46dc79de6ae0126ce
8 changes: 2 additions & 6 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3084,13 +3084,9 @@ F: kernel/kgdb.c

KMEMCHECK
M: Vegard Nossum <vegardno@ifi.uio.no>
M: Pekka Enberg <penberg@cs.helsinki.fi>
P Pekka Enberg
M: penberg@cs.helsinki.fi
S: Maintained
F: Documentation/kmemcheck.txt
F: arch/x86/include/asm/kmemcheck.h
F: arch/x86/mm/kmemcheck/
F: include/linux/kmemcheck.h
F: mm/kmemcheck.c

KMEMLEAK
M: Catalin Marinas <catalin.marinas@arm.com>
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/char/tty_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ int tty_port_block_til_ready(struct tty_port *port,
the port has just hung up or is in another error state */
if ((filp->f_flags & O_NONBLOCK) ||
(tty->flags & (1 << TTY_IO_ERROR))) {
/* Indicate we are open */
if (tty->termios->c_cflag & CBAUD)
tty_port_raise_dtr_rts(port);
port->flags |= ASYNC_NORMAL_ACTIVE;
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/scsi/bfa/bfad_fwimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ u32 *bfi_image_cb;

#define BFAD_FW_FILE_CT "ctfw.bin"
#define BFAD_FW_FILE_CB "cbfw.bin"
MODULE_FIRMWARE(BFAD_FW_FILE_CT);
MODULE_FIRMWARE(BFAD_FW_FILE_CB);

u32 *
bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/bfa/bfad_im.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port)
if (bfad_supported_fc4s & (BFA_PORT_ROLE_FCP_IM | BFA_PORT_ROLE_FCP_TM))
/* For FCP type 0x08 */
fc_host_supported_fc4s(host)[2] = 1;
if (bfad_supported_fc4s & BFA_PORT_ROLE_FCP_IPFC)
if (bfad_supported_fc4s | BFA_PORT_ROLE_FCP_IPFC)
/* For LLC/SNAP type 0x05 */
fc_host_supported_fc4s(host)[3] = 0x20;
/* For fibre channel services type 0x20 */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/gdth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2900,7 +2900,7 @@ static int gdth_read_event(gdth_ha_str *ha, int handle, gdth_evt_str *estr)
eindex = handle;
estr->event_source = 0;

if (eindex < 0 || eindex >= MAX_EVENTS) {
if (eindex >= MAX_EVENTS) {
spin_unlock_irqrestore(&ha->smp_lock, flags);
return eindex;
}
Expand Down
42 changes: 9 additions & 33 deletions trunk/drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4188,25 +4188,6 @@ static irqreturn_t ipr_handle_other_interrupt(struct ipr_ioa_cfg *ioa_cfg,
return rc;
}

/**
* ipr_isr_eh - Interrupt service routine error handler
* @ioa_cfg: ioa config struct
* @msg: message to log
*
* Return value:
* none
**/
static void ipr_isr_eh(struct ipr_ioa_cfg *ioa_cfg, char *msg)
{
ioa_cfg->errors_logged++;
dev_err(&ioa_cfg->pdev->dev, "%s\n", msg);

if (WAIT_FOR_DUMP == ioa_cfg->sdt_state)
ioa_cfg->sdt_state = GET_DUMP;

ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE);
}

/**
* ipr_isr - Interrupt service routine
* @irq: irq number
Expand All @@ -4222,7 +4203,6 @@ static irqreturn_t ipr_isr(int irq, void *devp)
volatile u32 int_reg, int_mask_reg;
u32 ioasc;
u16 cmd_index;
int num_hrrq = 0;
struct ipr_cmnd *ipr_cmd;
irqreturn_t rc = IRQ_NONE;

Expand Down Expand Up @@ -4253,7 +4233,13 @@ static irqreturn_t ipr_isr(int irq, void *devp)
IPR_HRRQ_REQ_RESP_HANDLE_MASK) >> IPR_HRRQ_REQ_RESP_HANDLE_SHIFT;

if (unlikely(cmd_index >= IPR_NUM_CMD_BLKS)) {
ipr_isr_eh(ioa_cfg, "Invalid response handle from IOA");
ioa_cfg->errors_logged++;
dev_err(&ioa_cfg->pdev->dev, "Invalid response handle from IOA\n");

if (WAIT_FOR_DUMP == ioa_cfg->sdt_state)
ioa_cfg->sdt_state = GET_DUMP;

ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE);
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
return IRQ_HANDLED;
}
Expand All @@ -4280,18 +4266,8 @@ static irqreturn_t ipr_isr(int irq, void *devp)

if (ipr_cmd != NULL) {
/* Clear the PCI interrupt */
do {
writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg);
int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
} while (int_reg & IPR_PCII_HRRQ_UPDATED &&
num_hrrq++ < IPR_MAX_HRRQ_RETRIES);

if (int_reg & IPR_PCII_HRRQ_UPDATED) {
ipr_isr_eh(ioa_cfg, "Error clearing HRRQ");
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
return IRQ_HANDLED;
}

writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg);
int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
} else
break;
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/scsi/ipr.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
#define IPR_IOA_MAX_SECTORS 32767
#define IPR_VSET_MAX_SECTORS 512
#define IPR_MAX_CDB_LEN 16
#define IPR_MAX_HRRQ_RETRIES 3

#define IPR_DEFAULT_BUS_WIDTH 16
#define IPR_80MBs_SCSI_RATE ((80 * 10) / (IPR_DEFAULT_BUS_WIDTH / 8))
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/libsas/sas_expander.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ static int sas_ex_discover_dev(struct domain_device *dev, int phy_id)

}
}
res = 0;
}

return res;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/scsi/pmcraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ static struct pmcraid_cmd *pmcraid_init_hcam

ioarcb->data_transfer_length = cpu_to_le32(rcb_size);

ioadl[0].flags |= IOADL_FLAGS_READ_LAST;
ioadl[0].flags |= cpu_to_le32(IOADL_FLAGS_READ_LAST);
ioadl[0].data_len = cpu_to_le32(rcb_size);
ioadl[0].address = cpu_to_le32(dma);

Expand Down Expand Up @@ -2251,7 +2251,7 @@ static void pmcraid_request_sense(struct pmcraid_cmd *cmd)

ioadl->address = cpu_to_le64(cmd->sense_buffer_dma);
ioadl->data_len = cpu_to_le32(SCSI_SENSE_BUFFERSIZE);
ioadl->flags = IOADL_FLAGS_LAST_DESC;
ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);

/* request sense might be called as part of error response processing
* which runs in tasklets context. It is possible that mid-layer might
Expand Down Expand Up @@ -3017,7 +3017,7 @@ static int pmcraid_build_ioadl(
ioadl[i].flags = 0;
}
/* setup last descriptor */
ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC;
ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);

return 0;
}
Expand Down Expand Up @@ -3387,7 +3387,7 @@ static int pmcraid_build_passthrough_ioadls(
}

/* setup the last descriptor */
ioadl[i - 1].flags = IOADL_FLAGS_LAST_DESC;
ioadl[i - 1].flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);

return 0;
}
Expand Down Expand Up @@ -5314,7 +5314,7 @@ static void pmcraid_querycfg(struct pmcraid_cmd *cmd)
cpu_to_le32(sizeof(struct pmcraid_config_table));

ioadl = &(ioarcb->add_data.u.ioadl[0]);
ioadl->flags = IOADL_FLAGS_LAST_DESC;
ioadl->flags = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
ioadl->address = cpu_to_le64(pinstance->cfg_table_bus_addr);
ioadl->data_len = cpu_to_le32(sizeof(struct pmcraid_config_table));

Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3656,7 +3656,6 @@ fc_bsg_host_dispatch(struct request_queue *q, struct Scsi_Host *shost,
fail_host_msg:
/* return the errno failure code as the only status */
BUG_ON(job->reply_len < sizeof(uint32_t));
job->reply->reply_payload_rcv_len = 0;
job->reply->result = ret;
job->reply_len = sizeof(uint32_t);
fc_bsg_jobdone(job);
Expand Down Expand Up @@ -3742,7 +3741,6 @@ fc_bsg_rport_dispatch(struct request_queue *q, struct Scsi_Host *shost,
fail_rport_msg:
/* return the errno failure code as the only status */
BUG_ON(job->reply_len < sizeof(uint32_t));
job->reply->reply_payload_rcv_len = 0;
job->reply->result = ret;
job->reply_len = sizeof(uint32_t);
fc_bsg_jobdone(job);
Expand Down Expand Up @@ -3799,7 +3797,6 @@ fc_bsg_request_handler(struct request_queue *q, struct Scsi_Host *shost,
/* check if we have the msgcode value at least */
if (job->request_len < sizeof(uint32_t)) {
BUG_ON(job->reply_len < sizeof(uint32_t));
job->reply->reply_payload_rcv_len = 0;
job->reply->result = -ENOMSG;
job->reply_len = sizeof(uint32_t);
fc_bsg_jobdone(job);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/spi/spi_stmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static int stmp_spi_txrx_dma(struct stmp_spi *ss, int cs,
wait_for_completion(&ss->done);

if (!busy_wait(readl(ss->regs + HW_SSP_CTRL0) & BM_SSP_CTRL0_RUN))
status = -ETIMEDOUT;
status = ETIMEDOUT;

if (!dma_buf)
dma_unmap_single(ss->master_dev, spi_buf_dma, len, dir);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/da8xx-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ static int __init fb_probe(struct platform_device *device)

if (i == ARRAY_SIZE(known_lcd_panels)) {
dev_err(&device->dev, "GLCD: No valid panel found\n");
ret = -ENODEV;
ret = ENODEV;
goto err_clk_disable;
} else
dev_info(&device->dev, "GLCD: Found %s panel\n",
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg)
type = PIDTYPE_PID;
break;

case F_OWNER_PGRP:
case F_OWNER_GID:
type = PIDTYPE_PGID;
break;

Expand Down Expand Up @@ -321,7 +321,7 @@ static int f_getown_ex(struct file *filp, unsigned long arg)
break;

case PIDTYPE_PGID:
owner.type = F_OWNER_PGRP;
owner.type = F_OWNER_GID;
break;

default:
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/proc/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
rsslim,
mm ? mm->start_code : 0,
mm ? mm->end_code : 0,
(permitted && mm) ? task->stack_start : 0,
(permitted) ? task->stack_start : 0,
esp,
eip,
/* The signal information here is obsolete.
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-generic/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

#define F_OWNER_TID 0
#define F_OWNER_PID 1
#define F_OWNER_PGRP 2
#define F_OWNER_GID 2

struct f_owner_ex {
int type;
Expand Down
21 changes: 2 additions & 19 deletions trunk/include/linux/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,32 +301,15 @@ static inline int unregister_pm_notifier(struct notifier_block *nb)
#define pm_notifier(fn, pri) do { (void)(fn); } while (0)
#endif /* !CONFIG_PM_SLEEP */

extern struct mutex pm_mutex;

#ifndef CONFIG_HIBERNATION
static inline void register_nosave_region(unsigned long b, unsigned long e)
{
}
static inline void register_nosave_region_late(unsigned long b, unsigned long e)
{
}

static inline void lock_system_sleep(void) {}
static inline void unlock_system_sleep(void) {}

#else

/* Let some subsystems like memory hotadd exclude hibernation */

static inline void lock_system_sleep(void)
{
mutex_lock(&pm_mutex);
}

static inline void unlock_system_sleep(void)
{
mutex_unlock(&pm_mutex);
}
#endif

extern struct mutex pm_mutex;

#endif /* _LINUX_SUSPEND_H */
29 changes: 18 additions & 11 deletions trunk/include/scsi/scsi_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,23 +797,30 @@ static inline unsigned int scsi_host_get_prot(struct Scsi_Host *shost)

static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsigned int target_type)
{
static unsigned char cap[] = { 0,
SHOST_DIF_TYPE1_PROTECTION,
SHOST_DIF_TYPE2_PROTECTION,
SHOST_DIF_TYPE3_PROTECTION };
switch (target_type) {
case 1:
if (shost->prot_capabilities & SHOST_DIF_TYPE1_PROTECTION)
return target_type;
case 2:
if (shost->prot_capabilities & SHOST_DIF_TYPE2_PROTECTION)
return target_type;
case 3:
if (shost->prot_capabilities & SHOST_DIF_TYPE3_PROTECTION)
return target_type;
}

return shost->prot_capabilities & cap[target_type] ? target_type : 0;
return 0;
}

static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type)
{
#if defined(CONFIG_BLK_DEV_INTEGRITY)
static unsigned char cap[] = { SHOST_DIX_TYPE0_PROTECTION,
SHOST_DIX_TYPE1_PROTECTION,
SHOST_DIX_TYPE2_PROTECTION,
SHOST_DIX_TYPE3_PROTECTION };

return shost->prot_capabilities & cap[target_type];
switch (target_type) {
case 0: return shost->prot_capabilities & SHOST_DIX_TYPE0_PROTECTION;
case 1: return shost->prot_capabilities & SHOST_DIX_TYPE1_PROTECTION;
case 2: return shost->prot_capabilities & SHOST_DIX_TYPE2_PROTECTION;
case 3: return shost->prot_capabilities & SHOST_DIX_TYPE3_PROTECTION;
}
#endif
return 0;
}
Expand Down
28 changes: 15 additions & 13 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,29 +692,31 @@ int schedule_on_each_cpu(work_func_t func)
if (!works)
return -ENOMEM;

get_online_cpus();

/*
* When running in keventd don't schedule a work item on
* itself. Can just call directly because the work queue is
* already bound. This also is faster.
* when running in keventd don't schedule a work item on itself.
* Can just call directly because the work queue is already bound.
* This also is faster.
* Make this a generic parameter for other workqueues?
*/
if (current_is_keventd())
if (current_is_keventd()) {
orig = raw_smp_processor_id();
INIT_WORK(per_cpu_ptr(works, orig), func);
func(per_cpu_ptr(works, orig));
}

get_online_cpus();
for_each_online_cpu(cpu) {
struct work_struct *work = per_cpu_ptr(works, cpu);

if (cpu == orig)
continue;
INIT_WORK(work, func);
schedule_work_on(cpu, work);
}
for_each_online_cpu(cpu) {
if (cpu != orig)
schedule_work_on(cpu, work);
flush_work(per_cpu_ptr(works, cpu));
}
if (orig >= 0)
func(per_cpu_ptr(works, orig));

for_each_online_cpu(cpu)
flush_work(per_cpu_ptr(works, cpu));

put_online_cpus();
free_percpu(works);
return 0;
Expand Down
Loading

0 comments on commit d2b0d05

Please sign in to comment.