Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130716
b: refs/heads/master
c: 9e772d0
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Feb 2, 2009
1 parent c5fec09 commit ada2769
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 178 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: 17294ab2ca8e8c46f2e4825c55541b2b88e52bf4
refs/heads/master: 9e772d0135a5b5f8355320be429efa339700d52d
63 changes: 0 additions & 63 deletions trunk/Documentation/block/queue-sysfs.txt

This file was deleted.

6 changes: 3 additions & 3 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static void drive_stat_acct(struct request *rq, int new_io)
int rw = rq_data_dir(rq);
int cpu;

if (!blk_fs_request(rq) || !disk || !blk_do_io_stat(disk->queue))
if (!blk_fs_request(rq) || !disk || !blk_queue_io_stat(disk->queue))
return;

cpu = part_stat_lock();
Expand Down Expand Up @@ -1667,7 +1667,7 @@ static void blk_account_io_completion(struct request *req, unsigned int bytes)
{
struct gendisk *disk = req->rq_disk;

if (!disk || !blk_do_io_stat(disk->queue))
if (!disk || !blk_queue_io_stat(disk->queue))
return;

if (blk_fs_request(req)) {
Expand All @@ -1686,7 +1686,7 @@ static void blk_account_io_done(struct request *req)
{
struct gendisk *disk = req->rq_disk;

if (!disk || !blk_do_io_stat(disk->queue))
if (!disk || !blk_queue_io_stat(disk->queue))
return;

/*
Expand Down
8 changes: 0 additions & 8 deletions trunk/block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,4 @@ static inline int blk_cpu_to_group(int cpu)
#endif
}

static inline int blk_do_io_stat(struct request_queue *q)
{
if (q)
return blk_queue_io_stat(q);

return 0;
}

#endif
3 changes: 3 additions & 0 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
if (blk_fs_request(rq)) {
ide_end_request(drive, 1, rq->nr_sectors);
return ide_stopped;
} else if (rq->cmd_type == REQ_TYPE_ATA_PC && !rq->bio) {
ide_end_request(drive, 1, 1);
return ide_stopped;
}
goto end_request;
}
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,14 @@ void ide_map_sg(ide_drive_t *drive, struct request *rq)
ide_hwif_t *hwif = drive->hwif;
struct scatterlist *sg = hwif->sg_table;

if (rq->cmd_type != REQ_TYPE_ATA_TASKFILE) {
hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
} else {
if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE);
hwif->sg_nents = 1;
} else if (!rq->bio) {
sg_init_one(sg, rq->data, rq->data_len);
hwif->sg_nents = 1;
} else {
hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg);
}
}

Expand Down
9 changes: 2 additions & 7 deletions trunk/drivers/usb/host/whci/asl.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,12 @@ void asl_stop(struct whc *whc)
void asl_update(struct whc *whc, uint32_t wusbcmd)
{
struct wusbhc *wusbhc = &whc->wusbhc;
long t;

mutex_lock(&wusbhc->mutex);
if (wusbhc->active) {
whc_write_wusbcmd(whc, wusbcmd, wusbcmd);
t = wait_event_timeout(
whc->async_list_wq,
(le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0,
msecs_to_jiffies(1000));
if (t == 0)
whc_hw_error(whc, "ASL update timeout");
wait_event(whc->async_list_wq,
(le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0);
}
mutex_unlock(&wusbhc->mutex);
}
Expand Down
15 changes: 0 additions & 15 deletions trunk/drivers/usb/host/whci/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,3 @@ int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)

return ret;
}

/**
* whc_hw_error - recover from a hardware error
* @whc: the WHCI HC that broke.
* @reason: a description of the failure.
*
* Recover from broken hardware with a full reset.
*/
void whc_hw_error(struct whc *whc, const char *reason)
{
struct wusbhc *wusbhc = &whc->wusbhc;

dev_err(&whc->umc->dev, "hardware error: %s\n", reason);
wusbhc_reset_all(wusbhc);
}
9 changes: 2 additions & 7 deletions trunk/drivers/usb/host/whci/pzl.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,12 @@ void pzl_stop(struct whc *whc)
void pzl_update(struct whc *whc, uint32_t wusbcmd)
{
struct wusbhc *wusbhc = &whc->wusbhc;
long t;

mutex_lock(&wusbhc->mutex);
if (wusbhc->active) {
whc_write_wusbcmd(whc, wusbcmd, wusbcmd);
t = wait_event_timeout(
whc->periodic_list_wq,
(le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0,
msecs_to_jiffies(1000));
if (t == 0)
whc_hw_error(whc, "PZL update timeout");
wait_event(whc->periodic_list_wq,
(le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0);
}
mutex_unlock(&wusbhc->mutex);
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/host/whci/whcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ void whc_clean_up(struct whc *whc);
/* hw.c */
void whc_write_wusbcmd(struct whc *whc, u32 mask, u32 val);
int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len);
void whc_hw_error(struct whc *whc, const char *reason);

/* wusb.c */
int whc_wusbhc_start(struct wusbhc *wusbhc);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/usb/wusbcore/devconnect.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ static void __wusbhc_dev_disconnect(struct wusbhc *wusbhc,
| USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED);
port->change |= USB_PORT_STAT_C_CONNECTION | USB_PORT_STAT_C_ENABLE;
if (wusb_dev) {
dev_dbg(wusbhc->dev, "disconnecting device from port %d\n", wusb_dev->port_idx);
if (!list_empty(&wusb_dev->cack_node))
list_del_init(&wusb_dev->cack_node);
/* For the one in cack_add() */
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/usb/wusbcore/rh.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ static int wusbhc_rh_port_reset(struct wusbhc *wusbhc, u8 port_idx)
struct wusb_port *port = wusb_port_by_idx(wusbhc, port_idx);
struct wusb_dev *wusb_dev = port->wusb_dev;

if (wusb_dev == NULL)
return -ENOTCONN;

port->status |= USB_PORT_STAT_RESET;
port->change |= USB_PORT_STAT_C_RESET;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/uwb/allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/uwb.h>

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/uwb/drp.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg,
} else
dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n");

spin_lock_bh(&rc->rsvs_lock);
spin_lock(&rc->rsvs_lock);
if (rc->set_drp_ie_pending > 1) {
rc->set_drp_ie_pending = 0;
uwb_rsv_queue_update(rc);
} else {
rc->set_drp_ie_pending = 0;
}
spin_unlock_bh(&rc->rsvs_lock);
spin_unlock(&rc->rsvs_lock);
}

/**
Expand Down
21 changes: 6 additions & 15 deletions trunk/drivers/uwb/rsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ void uwb_rsv_dump(char *text, struct uwb_rsv *rsv)
devaddr = rsv->target.devaddr;
uwb_dev_addr_print(target, sizeof(target), &devaddr);

dev_dbg(dev, "rsv %s %s -> %s: %s\n",
text, owner, target, uwb_rsv_state_str(rsv->state));
dev_dbg(dev, "rsv %s -> %s: %s\n", owner, target, uwb_rsv_state_str(rsv->state));
}

static void uwb_rsv_release(struct kref *kref)
Expand Down Expand Up @@ -512,7 +511,8 @@ void uwb_rsv_remove(struct uwb_rsv *rsv)

if (uwb_rsv_is_owner(rsv))
uwb_rsv_put_stream(rsv);


del_timer_sync(&rsv->timer);
uwb_dev_put(rsv->owner);
if (rsv->target.type == UWB_RSV_TARGET_DEV)
uwb_dev_put(rsv->target.dev);
Expand Down Expand Up @@ -870,7 +870,7 @@ void uwb_rsv_queue_update(struct uwb_rc *rc)
*/
void uwb_rsv_sched_update(struct uwb_rc *rc)
{
spin_lock_bh(&rc->rsvs_lock);
spin_lock(&rc->rsvs_lock);
if (!delayed_work_pending(&rc->rsv_update_work)) {
if (rc->set_drp_ie_pending > 0) {
rc->set_drp_ie_pending++;
Expand All @@ -879,7 +879,7 @@ void uwb_rsv_sched_update(struct uwb_rc *rc)
uwb_rsv_queue_update(rc);
}
unlock:
spin_unlock_bh(&rc->rsvs_lock);
spin_unlock(&rc->rsvs_lock);
}

/*
Expand Down Expand Up @@ -943,22 +943,13 @@ void uwb_rsv_remove_all(struct uwb_rc *rc)

mutex_lock(&rc->rsvs_mutex);
list_for_each_entry_safe(rsv, t, &rc->reservations, rc_node) {
if (rsv->state != UWB_RSV_STATE_NONE)
uwb_rsv_set_state(rsv, UWB_RSV_STATE_NONE);
del_timer_sync(&rsv->timer);
uwb_rsv_remove(rsv);
}
/* Cancel any postponed update. */
rc->set_drp_ie_pending = 0;
mutex_unlock(&rc->rsvs_mutex);

cancel_delayed_work_sync(&rc->rsv_update_work);
flush_workqueue(rc->rsv_workq);

mutex_lock(&rc->rsvs_mutex);
list_for_each_entry_safe(rsv, t, &rc->reservations, rc_node) {
uwb_rsv_remove(rsv);
}
mutex_unlock(&rc->rsvs_mutex);
}

void uwb_rsv_init(struct uwb_rc *rc)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/virtio/virtio_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static irqreturn_t vp_interrupt(int irq, void *opaque)
drv = container_of(vp_dev->vdev.dev.driver,
struct virtio_driver, driver);

if (drv && drv->config_changed)
if (drv->config_changed)
drv->config_changed(&vp_dev->vdev);
}

Expand Down
10 changes: 4 additions & 6 deletions trunk/include/linux/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,12 @@ extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly;

#ifdef CONFIG_HIGHMEM
/*
* remember never ever reenable interrupts between a bvec_kmap_irq and
* bvec_kunmap_irq!
* remember to add offset! and never ever reenable interrupts between a
* bvec_kmap_irq and bvec_kunmap_irq!!
*
* This function MUST be inlined - it plays with the CPU interrupt flags.
*/
static __always_inline char *bvec_kmap_irq(struct bio_vec *bvec,
unsigned long *flags)
static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags)
{
unsigned long addr;

Expand All @@ -473,8 +472,7 @@ static __always_inline char *bvec_kmap_irq(struct bio_vec *bvec,
return (char *) addr + bvec->bv_offset;
}

static __always_inline void bvec_kunmap_irq(char *buffer,
unsigned long *flags)
static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags)
{
unsigned long ptr = (unsigned long) buffer & PAGE_MASK;

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ struct request_queue

#define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
(1 << QUEUE_FLAG_CLUSTER) | \
(1 << QUEUE_FLAG_STACKABLE))
1 << QUEUE_FLAG_STACKABLE)

static inline int queue_is_locked(struct request_queue *q)
{
Expand Down
Loading

0 comments on commit ada2769

Please sign in to comment.