Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154323
b: refs/heads/master
c: aa71528
h: refs/heads/master
i:
  154321: e10ed34
  154319: 8c934f2
v: v3
  • Loading branch information
Thomas Gleixner committed Jun 25, 2009
1 parent 18b7238 commit 9fe62c3
Show file tree
Hide file tree
Showing 18 changed files with 95 additions and 78 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: f4fa446883959c1c5f314a043e750dbfe3728c55
refs/heads/master: aa715284b4d28cabde6c25c568d769a6be712bc8
1 change: 1 addition & 0 deletions trunk/arch/um/drivers/slip_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ static void slip_init(struct net_device *dev, void *data)

slip_proto_init(&spri->slip);

dev->init = NULL;
dev->hard_header_len = 0;
dev->header_ops = NULL;
dev->addr_len = 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/um/drivers/slirp_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void slirp_init(struct net_device *dev, void *data)

slip_proto_init(&spri->slip);

dev->init = NULL;
dev->hard_header_len = 0;
dev->header_ops = NULL;
dev->addr_len = 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/um/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
}

static inline void
dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size,
enum dma_data_direction direction)
{
BUG();
}

static inline void
dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems,
enum dma_data_direction direction)
{
BUG();
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ config I2C_DAVINCI

config I2C_DESIGNWARE
tristate "Synopsys DesignWare"
depends on HAVE_CLK
help
If you say yes to this option, support will be included for the
Synopsys DesignWare I2C adapter. Only master mode is supported.
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ide/cs5520.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic

ide_pci_setup_ports(dev, d, &hw[0], &hws[0]);
hw[0].irq = 14;
hw[1].irq = 15;

return ide_host_add(d, hws, 2, NULL);
}
Expand Down
10 changes: 4 additions & 6 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,22 +876,20 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
return stat;

/*
* Sanity check the given block size, in so far as making
* sure the sectors_per_frame we give to the caller won't
* end up being bogus.
* Sanity check the given block size
*/
blocklen = be32_to_cpu(capbuf.blocklen);
blocklen = (blocklen >> SECTOR_BITS) << SECTOR_BITS;
switch (blocklen) {
case 512:
case 1024:
case 2048:
case 4096:
break;
default:
printk_once(KERN_ERR PFX "%s: weird block size %u; "
"setting default block size to 2048\n",
printk(KERN_ERR PFX "%s: weird block size %u\n",
drive->name, blocklen);
printk(KERN_ERR PFX "%s: default to 2kb block size\n",
drive->name);
blocklen = 2048;
break;
}
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ static int ide_tune_dma(ide_drive_t *drive)
if (__ide_dma_bad_drive(drive))
return 0;

if (ide_id_dma_bug(drive))
return 0;

if (hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA)
return config_drive_for_dma(drive);

Expand Down Expand Up @@ -391,6 +394,24 @@ static int ide_dma_check(ide_drive_t *drive)
return -1;
}

int ide_id_dma_bug(ide_drive_t *drive)
{
u16 *id = drive->id;

if (id[ATA_ID_FIELD_VALID] & 4) {
if ((id[ATA_ID_UDMA_MODES] >> 8) &&
(id[ATA_ID_MWDMA_MODES] >> 8))
goto err_out;
} else if ((id[ATA_ID_MWDMA_MODES] >> 8) &&
(id[ATA_ID_SWDMA_MODES] >> 8))
goto err_out;

return 0;
err_out:
printk(KERN_ERR "%s: bad DMA info in identify block\n", drive->name);
return 1;
}

int ide_set_dma(ide_drive_t *drive)
{
int rc;
Expand Down
54 changes: 32 additions & 22 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,10 @@ void do_ide_request(struct request_queue *q)

if (!ide_lock_port(hwif)) {
ide_hwif_t *prev_port;

WARN_ON_ONCE(hwif->rq);
repeat:
prev_port = hwif->host->cur_port;

if (drive->dev_flags & IDE_DFLAG_BLOCKED)
rq = hwif->rq;
else
WARN_ON_ONCE(hwif->rq);

if (drive->dev_flags & IDE_DFLAG_SLEEPING &&
time_after(drive->sleep, jiffies)) {
ide_unlock_port(hwif);
Expand All @@ -510,29 +506,43 @@ void do_ide_request(struct request_queue *q)
hwif->cur_dev = drive;
drive->dev_flags &= ~(IDE_DFLAG_SLEEPING | IDE_DFLAG_PARKED);

if (rq == NULL) {
spin_unlock_irq(&hwif->lock);
spin_lock_irq(q->queue_lock);
/*
* we know that the queue isn't empty, but this can
* happen if ->prep_rq_fn() decides to kill a request
*/
spin_unlock_irq(&hwif->lock);
spin_lock_irq(q->queue_lock);
/*
* we know that the queue isn't empty, but this can happen
* if the q->prep_rq_fn() decides to kill a request
*/
if (!rq)
rq = blk_fetch_request(drive->queue);
spin_unlock_irq(q->queue_lock);
spin_lock_irq(&hwif->lock);

if (rq == NULL) {
ide_unlock_port(hwif);
goto out;
}
spin_unlock_irq(q->queue_lock);
spin_lock_irq(&hwif->lock);

if (!rq) {
ide_unlock_port(hwif);
goto out;
}

/*
* Sanity: don't accept a request that isn't a PM request
* if we are currently power managed.
* if we are currently power managed. This is very important as
* blk_stop_queue() doesn't prevent the blk_fetch_request()
* above to return us whatever is in the queue. Since we call
* ide_do_request() ourselves, we end up taking requests while
* the queue is blocked...
*
* We let requests forced at head of queue with ide-preempt
* though. I hope that doesn't happen too much, hopefully not
* unless the subdriver triggers such a thing in its own PM
* state machine.
*/
BUG_ON((drive->dev_flags & IDE_DFLAG_BLOCKED) &&
blk_pm_request(rq) == 0);
if ((drive->dev_flags & IDE_DFLAG_BLOCKED) &&
blk_pm_request(rq) == 0 &&
(rq->cmd_flags & REQ_PREEMPT) == 0) {
/* there should be no pending command at this point */
ide_unlock_port(hwif);
goto plug_device;
}

hwif->rq = rq;

Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ EXPORT_SYMBOL_GPL(ide_in_drive_list);
*/
static const struct drive_list_entry ivb_list[] = {
{ "QUANTUM FIREBALLlct10 05" , "A03.0900" },
{ "QUANTUM FIREBALLlct20 30" , "APL.0900" },
{ "TSSTcorp CDDVDW SH-S202J" , "SB00" },
{ "TSSTcorp CDDVDW SH-S202J" , "SB01" },
{ "TSSTcorp CDDVDW SH-S202N" , "SB00" },
Expand Down Expand Up @@ -330,6 +329,9 @@ int ide_driveid_update(ide_drive_t *drive)

kfree(id);

if ((drive->dev_flags & IDE_DFLAG_USING_DMA) && ide_id_dma_bug(drive))
ide_dma_off(drive);

return 1;
out_err:
if (rc == 2)
Expand Down
23 changes: 3 additions & 20 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,24 +818,6 @@ static int ide_port_setup_devices(ide_hwif_t *hwif)
return j;
}

static void ide_host_enable_irqs(struct ide_host *host)
{
ide_hwif_t *hwif;
int i;

ide_host_for_each_port(i, hwif, host) {
if (hwif == NULL)
continue;

/* clear any pending IRQs */
hwif->tp_ops->read_status(hwif);

/* unmask IRQs */
if (hwif->io_ports.ctl_addr)
hwif->tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS);
}
}

/*
* This routine sets up the IRQ for an IDE interface.
*/
Expand All @@ -849,6 +831,9 @@ static int init_irq (ide_hwif_t *hwif)
if (irq_handler == NULL)
irq_handler = ide_intr;

if (io_ports->ctl_addr)
hwif->tp_ops->write_devctl(hwif, ATA_DEVCTL_OBS);

if (request_irq(hwif->irq, irq_handler, sa, hwif->name, hwif))
goto out_up;

Expand Down Expand Up @@ -1419,8 +1404,6 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
ide_port_tune_devices(hwif);
}

ide_host_enable_irqs(host);

ide_host_for_each_port(i, hwif, host) {
if (hwif == NULL)
continue;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ static void acm_waker(struct work_struct *waker)
static int acm_tty_open(struct tty_struct *tty, struct file *filp)
{
struct acm *acm;
int rv = -ENODEV;
int rv = -EINVAL;
int i;
dbg("Entering acm_tty_open.");

Expand Down Expand Up @@ -677,7 +677,7 @@ static void acm_tty_close(struct tty_struct *tty, struct file *filp)

/* Perform the closing process and see if we need to do the hardware
shutdown */
if (!acm || tty_port_close_start(&acm->port, tty, filp) == 0)
if (tty_port_close_start(&acm->port, tty, filp) == 0)
return;
acm_port_down(acm, 0);
tty_port_close_end(&acm->port, tty);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,6 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
{
struct usb_serial_port *port = tty->driver_data;

if (!port)
return;

dbg("%s - port %d", __func__, port->number);


Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,7 @@ int ide_in_drive_list(u16 *, const struct drive_list_entry *);
#ifdef CONFIG_BLK_DEV_IDEDMA
int ide_dma_good_drive(ide_drive_t *);
int __ide_dma_bad_drive(ide_drive_t *);
int ide_id_dma_bug(ide_drive_t *);

u8 ide_find_dma_mode(ide_drive_t *, u8);

Expand Down Expand Up @@ -1401,6 +1402,7 @@ void ide_dma_lost_irq(ide_drive_t *);
ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int);

#else
static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; }
static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; }
static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; }
static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; }
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ extern int make_pages_present(unsigned long addr, unsigned long end);
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);

int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, int nr_pages, int write, int force,
unsigned long start, int len, int write, int force,
struct page **pages, struct vm_area_struct **vmas);
int get_user_pages_fast(unsigned long start, int nr_pages, int write,
struct page **pages);
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void put_futex_key(int fshared, union futex_key *key)
static int fault_in_user_writeable(u32 __user *uaddr)
{
int ret = get_user_pages(current, current->mm, (unsigned long)uaddr,
sizeof(*uaddr), 1, 0, NULL, NULL);
1, 1, 0, NULL, NULL);
return ret < 0 ? ret : 0;
}

Expand Down
Loading

0 comments on commit 9fe62c3

Please sign in to comment.