Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44299
b: refs/heads/master
c: 2a7e9a2
h: refs/heads/master
i:
  44297: 62d768d
  44295: 8cd97ab
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 12, 2006
1 parent d40e874 commit f84c157
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 30 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: 11c302c14d8ddc47504bd3b650bc9e8da7c717b7
refs/heads/master: 2a7e9a260ede3b17b5bc25c540a033a45bbf0461
12 changes: 12 additions & 0 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev)
}
EXPORT_SYMBOL(blk_get_backing_dev_info);

void blk_queue_activity_fn(request_queue_t *q, activity_fn *fn, void *data)
{
q->activity_fn = fn;
q->activity_data = data;
}
EXPORT_SYMBOL(blk_queue_activity_fn);

/**
* blk_queue_prep_rq - set a prepare_request function for queue
* @q: queue
Expand Down Expand Up @@ -231,6 +238,8 @@ void blk_queue_make_request(request_queue_t * q, make_request_fn * mfn)
* by default assume old behaviour and bounce for any highmem page
*/
blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);

blk_queue_activity_fn(q, NULL, NULL);
}

EXPORT_SYMBOL(blk_queue_make_request);
Expand Down Expand Up @@ -2687,6 +2696,9 @@ static inline void add_request(request_queue_t * q, struct request * req)
{
drive_stat_acct(req, req->nr_sectors, 1);

if (q->activity_fn)
q->activity_fn(q->activity_data, rq_data_dir(req));

/*
* elevator indicated where it wants this request to be
* inserted at elevator_merge time
Expand Down
10 changes: 7 additions & 3 deletions trunk/block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ static int sg_io(struct file *file, request_queue_t *q,
struct request *rq;
char sense[SCSI_SENSE_BUFFERSIZE];
unsigned char cmd[BLK_MAX_CDB];
struct bio *bio;

if (hdr->interface_id != 'S')
return -EINVAL;
Expand Down Expand Up @@ -271,6 +270,13 @@ static int sg_io(struct file *file, request_queue_t *q,

rq->cmd_type = REQ_TYPE_BLOCK_PC;

/*
* bounce this after holding a reference to the original bio, it's
* needed for proper unmapping
*/
if (rq->bio)
blk_queue_bounce(q, &rq->bio);

rq->timeout = jiffies_to_msecs(hdr->timeout);
if (!rq->timeout)
rq->timeout = q->sg_timeout;
Expand Down Expand Up @@ -302,7 +308,6 @@ static int sg_io(struct file *file, request_queue_t *q,
if (ret)
goto out;

bio = rq->bio;
rq->retries = 0;

start_time = jiffies;
Expand Down Expand Up @@ -333,7 +338,6 @@ static int sg_io(struct file *file, request_queue_t *q,
hdr->sb_len_wr = len;
}

rq->bio = bio;
if (blk_rq_unmap_user(rq))
ret = -EFAULT;

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,10 @@ static int ide_init_queue(ide_drive_t *drive)
/* needs drive->queue to be set */
ide_toggle_bounce(drive, 1);

/* enable led activity for disk drives only */
if (drive->media == ide_disk && hwif->led_act)
blk_queue_activity_fn(q, hwif->led_act, drive);

return 0;
}

Expand Down
14 changes: 9 additions & 5 deletions trunk/drivers/media/video/usbvision/usbvision-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]");
#define PDEBUG(level, fmt, args...) \
if (i2c_debug & (level)) info("[%s:%d] " fmt, __PRETTY_FUNCTION__, __LINE__ , ## args)

static int usbvision_i2c_write(void *data, unsigned char addr, char *buf,
short len);
static int usbvision_i2c_read(void *data, unsigned char addr, char *buf,
short len);

static inline int try_write_address(struct i2c_adapter *i2c_adap,
unsigned char addr, int retries)
{
Expand All @@ -61,7 +66,7 @@ static inline int try_write_address(struct i2c_adapter *i2c_adap,
data = i2c_get_adapdata(i2c_adap);
buf[0] = 0x00;
for (i = 0; i <= retries; i++) {
ret = (adap->outb(data, addr, buf, 1));
ret = (usbvision_i2c_write(data, addr, buf, 1));
if (ret == 1)
break; /* success! */
udelay(5 /*adap->udelay */ );
Expand All @@ -86,7 +91,7 @@ static inline int try_read_address(struct i2c_adapter *i2c_adap,

data = i2c_get_adapdata(i2c_adap);
for (i = 0; i <= retries; i++) {
ret = (adap->inb(data, addr, buf, 1));
ret = (usbvision_i2c_read(data, addr, buf, 1));
if (ret == 1)
break; /* success! */
udelay(5 /*adap->udelay */ );
Expand Down Expand Up @@ -153,7 +158,6 @@ static int
usb_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
{
struct i2c_msg *pmsg;
struct i2c_algo_usb_data *adap = i2c_adap->algo_data;
void *data;
int i, ret;
unsigned char addr;
Expand All @@ -170,13 +174,13 @@ usb_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)

if (pmsg->flags & I2C_M_RD) {
/* read bytes into buffer */
ret = (adap->inb(data, addr, pmsg->buf, pmsg->len));
ret = (usbvision_i2c_read(data, addr, pmsg->buf, pmsg->len));
if (ret < pmsg->len) {
return (ret < 0) ? ret : -EREMOTEIO;
}
} else {
/* write bytes from buffer */
ret = (adap->outb(data, addr, pmsg->buf, pmsg->len));
ret = (usbvision_i2c_write(data, addr, pmsg->buf, pmsg->len));
if (ret < pmsg->len) {
return (ret < 0) ? ret : -EREMOTEIO;
}
Expand Down
42 changes: 21 additions & 21 deletions trunk/fs/jfs/jfs_filsys.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,38 @@
/*
* file system option (superblock flag)
*/

/* directory option */
#define JFS_UNICODE 0x00000001 /* unicode name */
/* mount time flag to disable journaling to disk */
#define JFS_NOINTEGRITY 0x00000010

/* mount time flags for error handling */
#define JFS_ERR_REMOUNT_RO 0x00000002 /* remount read-only */
#define JFS_ERR_CONTINUE 0x00000004 /* continue */
#define JFS_ERR_PANIC 0x00000008 /* panic */

/* Quota support */
#define JFS_USRQUOTA 0x00000010
#define JFS_GRPQUOTA 0x00000020

/* mount time flag to disable journaling to disk */
#define JFS_NOINTEGRITY 0x00000040
/* platform option (conditional compilation) */
#define JFS_AIX 0x80000000 /* AIX support */
/* POSIX name/directory support */

#define JFS_OS2 0x40000000 /* OS/2 support */
/* case-insensitive name/directory support */

#define JFS_DFS 0x20000000 /* DCE DFS LFS support */

#define JFS_LINUX 0x10000000 /* Linux support */
/* case-sensitive name/directory support */

/* directory option */
#define JFS_UNICODE 0x00000001 /* unicode name */

/* commit option */
#define JFS_COMMIT 0x00000f00 /* commit option mask */
#define JFS_GROUPCOMMIT 0x00000100 /* group (of 1) commit */
#define JFS_LAZYCOMMIT 0x00000200 /* lazy commit */
#define JFS_TMPFS 0x00000400 /* temporary file system -
* do not log/commit:
* Never implemented
*/

/* log logical volume option */
Expand All @@ -65,25 +74,16 @@
#define JFS_SPARSE 0x00020000 /* sparse regular file */

/* DASD Limits F226941 */
#define JFS_DASD_ENABLED 0x00040000 /* DASD limits enabled */
#define JFS_DASD_PRIME 0x00080000 /* Prime DASD usage on boot */
#define JFS_DASD_ENABLED 0x00040000 /* DASD limits enabled */
#define JFS_DASD_PRIME 0x00080000 /* Prime DASD usage on boot */

/* big endian flag */
#define JFS_SWAP_BYTES 0x00100000 /* running on big endian computer */
#define JFS_SWAP_BYTES 0x00100000 /* running on big endian computer */

/* Directory index */
#define JFS_DIR_INDEX 0x00200000 /* Persistent index for */
#define JFS_DIR_INDEX 0x00200000 /* Persistent index for */
/* directory entries */

/* platform options */
#define JFS_LINUX 0x10000000 /* Linux support */
#define JFS_DFS 0x20000000 /* DCE DFS LFS support */
/* Never implemented */

#define JFS_OS2 0x40000000 /* OS/2 support */
/* case-insensitive name/directory support */

#define JFS_AIX 0x80000000 /* AIX support */
/* POSIX name/directory support - Never implemented*/

/*
* buffer cache configuration
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ typedef void (unplug_fn) (request_queue_t *);

struct bio_vec;
typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *);
typedef void (activity_fn) (void *data, int rw);
typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *);
typedef void (prepare_flush_fn) (request_queue_t *, struct request *);
typedef void (softirq_done_fn)(struct request *);
Expand Down Expand Up @@ -383,6 +384,7 @@ struct request_queue
prep_rq_fn *prep_rq_fn;
unplug_fn *unplug_fn;
merge_bvec_fn *merge_bvec_fn;
activity_fn *activity_fn;
issue_flush_fn *issue_flush_fn;
prepare_flush_fn *prepare_flush_fn;
softirq_done_fn *softirq_done_fn;
Expand All @@ -409,6 +411,8 @@ struct request_queue
*/
void *queuedata;

void *activity_data;

/*
* queue needs bounce pages for pages above this limit
*/
Expand Down Expand Up @@ -673,6 +677,7 @@ extern void blk_sync_queue(struct request_queue *q);
extern void __blk_stop_queue(request_queue_t *q);
extern void blk_run_queue(request_queue_t *);
extern void blk_start_queueing(request_queue_t *);
extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long);
extern int blk_rq_unmap_user(struct request *);
extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t);
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 @@ -804,6 +804,8 @@ typedef struct hwif_s {
void *hwif_data; /* extra hwif data */

unsigned dma;

void (*led_act)(void *data, int rw);
} ____cacheline_internodealigned_in_smp ide_hwif_t;

/*
Expand Down

0 comments on commit f84c157

Please sign in to comment.