Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168719
b: refs/heads/master
c: 2d5bc23
h: refs/heads/master
i:
  168717: 891b83f
  168715: 2e79001
  168711: d0ab04b
  168703: 98fbea8
v: v3
  • Loading branch information
Linus Torvalds committed Nov 18, 2009
1 parent 2006111 commit ecfaec2
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 70 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: ff854ce0b17161a86b5ae444c6cb0aa221720fab
refs/heads/master: 2d5bc23b32e0ec6fe9c1cdd9f371063881dc1ffc
8 changes: 6 additions & 2 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3084,9 +3084,13 @@ F: kernel/kgdb.c

KMEMCHECK
M: Vegard Nossum <vegardno@ifi.uio.no>
P Pekka Enberg
M: penberg@cs.helsinki.fi
M: Pekka Enberg <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: 2 additions & 0 deletions trunk/drivers/scsi/bfa/bfad_fwimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ 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 >= MAX_EVENTS) {
if (eindex < 0 || eindex >= MAX_EVENTS) {
spin_unlock_irqrestore(&ha->smp_lock, flags);
return eindex;
}
Expand Down
42 changes: 33 additions & 9 deletions trunk/drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4188,6 +4188,25 @@ 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 @@ -4203,6 +4222,7 @@ 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 @@ -4233,13 +4253,7 @@ 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)) {
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);
ipr_isr_eh(ioa_cfg, "Invalid response handle from IOA");
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
return IRQ_HANDLED;
}
Expand All @@ -4266,8 +4280,18 @@ static irqreturn_t ipr_isr(int irq, void *devp)

if (ipr_cmd != NULL) {
/* Clear the PCI interrupt */
writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg);
int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
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;
}

} else
break;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/ipr.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
#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: 0 additions & 1 deletion trunk/drivers/scsi/libsas/sas_expander.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,6 @@ 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 |= cpu_to_le32(IOADL_FLAGS_READ_LAST);
ioadl[0].flags |= 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 = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
ioadl->flags = 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 = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
ioadl[i - 1].flags = 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 = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
ioadl[i - 1].flags = 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 = cpu_to_le32(IOADL_FLAGS_LAST_DESC);
ioadl->flags = 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: 3 additions & 0 deletions trunk/drivers/scsi/scsi_transport_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3656,6 +3656,7 @@ 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 @@ -3741,6 +3742,7 @@ 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 @@ -3797,6 +3799,7 @@ 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
21 changes: 21 additions & 0 deletions trunk/drivers/usb/serial/cp210x.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *,
static void cp210x_break_ctl(struct tty_struct *, int);
static int cp210x_startup(struct usb_serial *);
static void cp210x_disconnect(struct usb_serial *);
static void cp210x_dtr_rts(struct usb_serial_port *p, int on);
static int cp210x_carrier_raised(struct usb_serial_port *p);

static int debug;

Expand Down Expand Up @@ -143,6 +145,8 @@ static struct usb_serial_driver cp210x_device = {
.tiocmset = cp210x_tiocmset,
.attach = cp210x_startup,
.disconnect = cp210x_disconnect,
.dtr_rts = cp210x_dtr_rts,
.carrier_raised = cp210x_carrier_raised
};

/* Config request types */
Expand Down Expand Up @@ -746,6 +750,14 @@ static int cp210x_tiocmset_port(struct usb_serial_port *port, struct file *file,
return cp210x_set_config(port, CP210X_SET_MHS, &control, 2);
}

static void cp210x_dtr_rts(struct usb_serial_port *p, int on)
{
if (on)
cp210x_tiocmset_port(p, NULL, TIOCM_DTR|TIOCM_RTS, 0);
else
cp210x_tiocmset_port(p, NULL, 0, TIOCM_DTR|TIOCM_RTS);
}

static int cp210x_tiocmget (struct tty_struct *tty, struct file *file)
{
struct usb_serial_port *port = tty->driver_data;
Expand All @@ -768,6 +780,15 @@ static int cp210x_tiocmget (struct tty_struct *tty, struct file *file)
return result;
}

static int cp210x_carrier_raised(struct usb_serial_port *p)
{
unsigned int control;
cp210x_get_config(p, CP210X_GET_MDMSTS, &control, 1);
if (control & CONTROL_DCD)
return 1;
return 0;
}

static void cp210x_break_ctl (struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
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_GID:
case F_OWNER_PGRP:
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_GID;
owner.type = F_OWNER_PGRP;
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) ? task->stack_start : 0,
(permitted && mm) ? 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_GID 2
#define F_OWNER_PGRP 2

struct f_owner_ex {
int type;
Expand Down
21 changes: 19 additions & 2 deletions trunk/include/linux/suspend.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,32 @@ 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)
{
}
#endif

extern struct mutex pm_mutex;
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

#endif /* _LINUX_SUSPEND_H */
29 changes: 11 additions & 18 deletions trunk/include/scsi/scsi_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -797,30 +797,23 @@ 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)
{
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;
}
static unsigned char cap[] = { 0,
SHOST_DIF_TYPE1_PROTECTION,
SHOST_DIF_TYPE2_PROTECTION,
SHOST_DIF_TYPE3_PROTECTION };

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

static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsigned int target_type)
{
#if defined(CONFIG_BLK_DEV_INTEGRITY)
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;
}
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];
#endif
return 0;
}
Expand Down
Loading

0 comments on commit ecfaec2

Please sign in to comment.